@salla.sa/twilight-components 2.14.393 → 2.14.394
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-D7RVR_w_.js → filepond-C_gLbAbF.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DTuZK2ot.js → filepond-plugin-file-poster-DXWo2FUU.js} +2 -2
- package/dist/cjs/{filepond-plugin-file-validate-size-DHc6pF_j.js → filepond-plugin-file-validate-size-fBXMP7ez.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DnkcvJVc.js → filepond-plugin-file-validate-type-DEo7juC7.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-vrZ1s7kw.js → filepond-plugin-image-edit-4j4e1VEp.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-Bn5JSzQK.js → filepond-plugin-image-exif-orientation-DWqiXxv1.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-8qWUFe9n.js → filepond-plugin-image-preview-emT_teia.js} +1 -1
- package/dist/cjs/{index-C5VeFDQ0.js → index-B03mYCWz.js} +547 -780
- package/dist/cjs/{index-CwD81m7i.js → index-Y-2uyQDK.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-accordion_6.cjs.entry.js +15 -19
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +10 -12
- package/dist/cjs/salla-advertisement.cjs.entry.js +3 -3
- package/dist/cjs/salla-alert_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +3 -3
- package/dist/cjs/salla-apps-icons.cjs.entry.js +3 -3
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +23 -25
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +3 -3
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +3 -3
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +17 -17
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +3 -3
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +3 -3
- package/dist/cjs/salla-count-down.cjs.entry.js +3 -3
- package/dist/cjs/salla-custom-fields.cjs.entry.js +3 -3
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +3 -3
- package/dist/cjs/salla-filters.cjs.entry.js +3 -3
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +3 -3
- package/dist/cjs/salla-hook.cjs.entry.js +2 -5
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +3 -3
- package/dist/cjs/salla-installment.cjs.entry.js +3 -3
- package/dist/cjs/salla-list-tile.cjs.entry.js +3 -3
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- 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 +3 -3
- package/dist/cjs/salla-menu.cjs.entry.js +3 -3
- package/dist/cjs/salla-metadata.cjs.entry.js +3 -3
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -8
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +4 -6
- package/dist/cjs/salla-notification-item.cjs.entry.js +3 -3
- package/dist/cjs/salla-notifications.cjs.entry.js +3 -3
- package/dist/cjs/salla-offer-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-offer.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-details-options.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-details.cjs.entry.js +4 -6
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-edit.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +4 -6
- package/dist/cjs/salla-orders.cjs.entry.js +3 -3
- package/dist/cjs/salla-payments.cjs.entry.js +3 -3
- package/dist/cjs/salla-placeholder.cjs.entry.js +3 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-card.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-slider.cjs.entry.js +3 -3
- package/dist/cjs/salla-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-scopes.cjs.entry.js +3 -3
- package/dist/cjs/salla-search.cjs.entry.js +4 -6
- package/dist/cjs/salla-skeleton.cjs.entry.js +3 -3
- package/dist/cjs/salla-slider.cjs.entry.js +3 -3
- package/dist/cjs/salla-social-share.cjs.entry.js +3 -3
- package/dist/cjs/salla-social.cjs.entry.js +3 -3
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +7 -7
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +3 -3
- package/dist/cjs/salla-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/salla-trust-badges.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-profile.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-settings.cjs.entry.js +3 -3
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +3 -3
- package/dist/cjs/twilight.cjs.js +4 -5
- package/dist/cjs/{vanilla-picker-yKERbLpx.js → vanilla-picker-CKZvBtHS.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -3
- package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
- package/dist/collection/components/salla-accordion/salla-accordion.js +4 -4
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +19 -19
- package/dist/collection/components/salla-alert/salla-alert.js +5 -5
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -6
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +4 -4
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +9 -9
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +3 -6
- package/dist/collection/components/salla-button/salla-button.js +11 -11
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +1 -2
- package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +8 -8
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +14 -20
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +6 -6
- package/dist/collection/components/salla-comments/salla-comment-item.js +3 -2
- package/dist/collection/components/salla-comments/salla-comments.js +17 -18
- package/dist/collection/components/salla-contacts/salla-contacts.js +10 -10
- package/dist/collection/components/salla-count-down/salla-count-down.js +34 -34
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +7 -9
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +65 -69
- package/dist/collection/components/salla-drawer/salla-drawer.js +11 -11
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +84 -85
- package/dist/collection/components/salla-filters/salla-filters.js +2 -2
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +5 -4
- package/dist/collection/components/salla-gifting/salla-gifting.js +11 -11
- package/dist/collection/components/salla-hook/salla-hook.js +2 -2
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -6
- package/dist/collection/components/salla-installment/salla-installment.js +5 -5
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +2 -2
- package/dist/collection/components/salla-loading/salla-loading.js +4 -4
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +5 -5
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +14 -14
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +3 -4
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -13
- package/dist/collection/components/salla-map/salla-map.js +14 -14
- package/dist/collection/components/salla-menu/salla-menu.js +9 -10
- package/dist/collection/components/salla-metadata/salla-metadata.js +3 -3
- package/dist/collection/components/salla-modal/salla-modal.js +11 -11
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +2 -2
- 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 +2 -4
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +7 -8
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +2 -2
- package/dist/collection/components/salla-notifications/salla-notification-item.js +2 -2
- package/dist/collection/components/salla-notifications/salla-notifications.js +3 -3
- package/dist/collection/components/salla-offer/salla-offer.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +5 -5
- package/dist/collection/components/salla-order-details/salla-order-details-options.js +5 -6
- package/dist/collection/components/salla-order-details/salla-order-details.js +3 -4
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +4 -4
- package/dist/collection/components/salla-order-edit/salla-order-edit.js +4 -4
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +2 -2
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +3 -4
- package/dist/collection/components/salla-orders/salla-orders.js +4 -4
- package/dist/collection/components/salla-payments/salla-payments.js +1 -0
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +3 -3
- package/dist/collection/components/salla-price-range/salla-price-range.js +8 -8
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +6 -6
- package/dist/collection/components/salla-product-card/salla-product-card.js +18 -18
- package/dist/collection/components/salla-product-options/salla-product-options.js +13 -15
- package/dist/collection/components/salla-products-list/salla-products-list.js +21 -20
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +23 -22
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +20 -21
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +2 -2
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +17 -16
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +11 -11
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +2 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +8 -8
- package/dist/collection/components/salla-review-card/salla-review-card.js +3 -3
- package/dist/collection/components/salla-reviews/salla-reviews.js +13 -16
- package/dist/collection/components/salla-reviews-summary/salla-reviews-summary.js +2 -2
- package/dist/collection/components/salla-scopes/salla-scopes.js +2 -2
- package/dist/collection/components/salla-search/salla-search.js +6 -6
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +3 -3
- package/dist/collection/components/salla-slider/salla-slider.js +25 -25
- package/dist/collection/components/salla-social-share/salla-social-share.js +3 -3
- package/dist/collection/components/salla-tabs/salla-tab-content.js +2 -2
- package/dist/collection/components/salla-tabs/salla-tab-header.js +5 -5
- package/dist/collection/components/salla-tabs/salla-tabs.js +2 -2
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +8 -9
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +5 -5
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +1 -1
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +5 -5
- package/dist/collection/components/salla-user-profile/salla-user-profile.js +1 -1
- package/dist/collection/components/salla-verify/salla-verify.js +4 -4
- package/dist/components/Helper.js +432 -1
- package/dist/components/_commonjsHelpers.js +7 -1
- package/dist/components/anime.es.js +1310 -1
- package/dist/components/arrow-left.js +8 -1
- package/dist/components/axios.js +4240 -2
- package/dist/components/bell-ring.js +8 -1
- package/dist/components/camera.js +8 -1
- package/dist/components/cancel.js +8 -1
- package/dist/components/cart.js +8 -1
- package/dist/components/check-circle2.js +15 -1
- package/dist/components/check.js +8 -1
- package/dist/components/facebook.js +10 -1
- package/dist/components/filepond-plugin-file-poster.js +662 -2
- package/dist/components/filepond-plugin-file-validate-size.js +204 -2
- package/dist/components/filepond-plugin-file-validate-type.js +262 -2
- package/dist/components/filepond-plugin-image-edit.js +487 -2
- package/dist/components/filepond-plugin-image-exif-orientation.js +214 -2
- package/dist/components/filepond-plugin-image-preview.js +2237 -2
- package/dist/components/filepond.js +11286 -2
- package/dist/components/gift.js +8 -1
- package/dist/components/image.js +8 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +8220 -1
- package/dist/components/index2.js +1709 -1
- package/dist/components/index3.js +2550 -1
- package/dist/components/interfaces.js +12 -1
- package/dist/components/isObject.js +292 -1
- package/dist/components/keyboard_arrow_down.js +8 -1
- package/dist/components/keyboard_arrow_right.js +15 -1
- package/dist/components/location.js +11 -1
- package/dist/components/mail.js +8 -1
- package/dist/components/minus.js +15 -1
- package/dist/components/salla-accordion-body.js +6 -1
- package/dist/components/salla-accordion-body2.js +30 -1
- package/dist/components/salla-accordion-head.js +6 -1
- package/dist/components/salla-accordion-head2.js +63 -1
- package/dist/components/salla-accordion.js +6 -1
- package/dist/components/salla-accordion2.js +68 -1
- package/dist/components/salla-add-product-button.js +6 -1
- package/dist/components/salla-add-product-button2.js +306 -1
- package/dist/components/salla-advertisement.js +155 -1
- package/dist/components/salla-alert.js +59 -1
- package/dist/components/salla-app-install-alert.js +91 -1
- package/dist/components/salla-apps-icons.js +63 -1
- package/dist/components/salla-booking-field.js +6 -1
- package/dist/components/salla-booking-field2.js +221 -1
- package/dist/components/salla-bottom-alert.js +214 -1
- package/dist/components/salla-breadcrumb.js +226 -1
- package/dist/components/salla-bullet-delivery.js +2114 -1
- package/dist/components/salla-button.js +6 -1
- package/dist/components/salla-button2.js +174 -1
- package/dist/components/salla-cart-coupons.js +284 -1
- package/dist/components/salla-cart-item-offers.js +143 -1
- package/dist/components/salla-cart-summary.js +136 -1
- package/dist/components/salla-color-picker.js +6 -1
- package/dist/components/salla-color-picker2.js +260 -1
- package/dist/components/salla-comment-form.js +6 -1
- package/dist/components/salla-comment-form2.js +64 -1
- package/dist/components/salla-comment-item.js +6 -1
- package/dist/components/salla-comment-item2.js +217 -1
- package/dist/components/salla-comments.js +395 -1
- package/dist/components/salla-conditional-fields.js +6 -1
- package/dist/components/salla-conditional-fields2.js +137 -1
- package/dist/components/salla-conditional-offer.js +194 -1
- package/dist/components/salla-contacts.js +125 -1
- package/dist/components/salla-cookies-bar.js +107 -1
- package/dist/components/salla-count-down.js +6 -1
- package/dist/components/salla-count-down2.js +271 -1
- package/dist/components/salla-custom-fields.js +175 -1
- package/dist/components/salla-datetime-picker.js +6 -1
- package/dist/components/salla-datetime-picker2.js +342 -1
- package/dist/components/salla-delivery-promise.js +263 -1
- package/dist/components/salla-drawer.js +6 -1
- package/dist/components/salla-drawer2.js +214 -1
- package/dist/components/salla-file-upload.js +6 -1
- package/dist/components/salla-file-upload2.js +583 -1
- package/dist/components/salla-filters-widget.js +6 -1
- package/dist/components/salla-filters-widget2.js +245 -1
- package/dist/components/salla-filters.js +253 -1
- package/dist/components/salla-fulfillment-methods.js +61 -1
- package/dist/components/salla-gifting.js +732 -1
- package/dist/components/salla-hook.js +47 -1
- package/dist/components/salla-infinite-scroll.js +112 -1
- package/dist/components/salla-installment.js +306 -1
- package/dist/components/salla-list-tile.js +6 -1
- package/dist/components/salla-list-tile2.js +47 -1
- package/dist/components/salla-loading.js +6 -1
- package/dist/components/salla-loading2.js +51 -1
- package/dist/components/salla-localization-modal.js +296 -1
- package/dist/components/salla-login-modal.js +6 -1
- package/dist/components/salla-login-modal2.js +359 -1
- package/dist/components/salla-loyalty-prize-item.js +39 -1
- package/dist/components/salla-loyalty-program.js +115 -1
- package/dist/components/salla-loyalty.js +304 -1
- package/dist/components/salla-maintenance-alert.js +57 -1
- package/dist/components/salla-map.js +6 -1
- package/dist/components/salla-map2.js +766 -1
- package/dist/components/salla-menu.js +165 -1
- package/dist/components/salla-metadata.js +97 -1
- package/dist/components/salla-modal.js +6 -1
- package/dist/components/salla-modal2.js +215 -1
- package/dist/components/salla-multiple-bundle-product-cart.js +6 -1
- package/dist/components/salla-multiple-bundle-product-cart2.js +151 -1
- package/dist/components/salla-multiple-bundle-product-details.js +6 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +296 -1
- package/dist/components/salla-multiple-bundle-product-options-modal.js +6 -1
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +598 -1
- package/dist/components/salla-multiple-bundle-product-slider.js +6 -1
- package/dist/components/salla-multiple-bundle-product-slider2.js +136 -1
- package/dist/components/salla-multiple-bundle-product.js +207 -1
- package/dist/components/salla-notification-item.js +6 -1
- package/dist/components/salla-notification-item2.js +32 -1
- package/dist/components/salla-notifications.js +190 -1
- package/dist/components/salla-offer-modal.js +328 -1
- package/dist/components/salla-offer.js +478 -1
- package/dist/components/salla-order-details-multiple-bundle-product.js +6 -1
- package/dist/components/salla-order-details-multiple-bundle-product2.js +122 -1
- package/dist/components/salla-order-details-options.js +6 -1
- package/dist/components/salla-order-details-options2.js +140 -1
- package/dist/components/salla-order-details.js +122 -1
- package/dist/components/salla-order-edit-item.js +6 -1
- package/dist/components/salla-order-edit-item2.js +181 -1
- package/dist/components/salla-order-edit.js +288 -1
- package/dist/components/salla-order-summary.js +132 -1
- package/dist/components/salla-order-totals-card.js +87 -1
- package/dist/components/salla-orders.js +271 -1
- package/dist/components/salla-payments.js +76 -1
- package/dist/components/salla-placeholder.js +6 -1
- package/dist/components/salla-placeholder2.js +66 -1
- package/dist/components/salla-price-range.js +6 -1
- package/dist/components/salla-price-range2.js +204 -1
- package/dist/components/salla-product-availability.js +6 -1
- package/dist/components/salla-product-availability2.js +206 -1
- package/dist/components/salla-product-card.js +6 -1
- package/dist/components/salla-product-card2.js +241 -1
- package/dist/components/salla-product-options.js +6 -1
- package/dist/components/salla-product-options2.js +962 -1
- package/dist/components/salla-product-size-guide.js +130 -1
- package/dist/components/salla-products-list.js +6 -1
- package/dist/components/salla-products-list2.js +812 -1
- package/dist/components/salla-products-slider.js +6 -1
- package/dist/components/salla-products-slider2.js +215 -1
- package/dist/components/salla-progress-bar.js +6 -1
- package/dist/components/salla-progress-bar2.js +94 -1
- package/dist/components/salla-quantity-input.js +6 -1
- package/dist/components/salla-quantity-input2.js +127 -1
- package/dist/components/salla-quick-buy.js +6 -1
- package/dist/components/salla-quick-buy2.js +1181 -1
- package/dist/components/salla-quick-order.js +299 -1
- package/dist/components/salla-rating-modal.js +530 -1
- package/dist/components/salla-rating-stars.js +6 -1
- package/dist/components/salla-rating-stars2.js +162 -1
- package/dist/components/salla-review-card.js +6 -1
- package/dist/components/salla-review-card2.js +198 -1
- package/dist/components/salla-reviews-page.js +726 -1
- package/dist/components/salla-reviews-summary.js +6 -1
- package/dist/components/salla-reviews-summary2.js +132 -1
- package/dist/components/salla-reviews.js +143 -1
- package/dist/components/salla-scopes.js +249 -1
- package/dist/components/salla-search.js +213 -1
- package/dist/components/salla-skeleton.js +6 -1
- package/dist/components/salla-skeleton2.js +50 -1
- package/dist/components/salla-slider.js +6 -1
- package/dist/components/salla-slider2.js +10489 -1
- package/dist/components/salla-social-share.js +194 -1
- package/dist/components/salla-social.js +89 -1
- package/dist/components/salla-tab-content.js +6 -1
- package/dist/components/salla-tab-content2.js +55 -1
- package/dist/components/salla-tab-header.js +6 -1
- package/dist/components/salla-tab-header2.js +85 -1
- package/dist/components/salla-tabs.js +6 -1
- package/dist/components/salla-tabs2.js +75 -1
- package/dist/components/salla-tel-input.js +6 -1
- package/dist/components/salla-tel-input2.js +168 -1
- package/dist/components/salla-tiered-offer.js +366 -1
- package/dist/components/salla-tooltip.js +6 -1
- package/dist/components/salla-tooltip2.js +57 -1
- package/dist/components/salla-trust-badges.js +90 -1
- package/dist/components/salla-user-menu.js +344 -1
- package/dist/components/salla-user-profile.js +203 -1
- package/dist/components/salla-user-settings.js +139 -1
- package/dist/components/salla-verify.js +303 -1
- package/dist/components/salla-wallet.js +114 -1
- package/dist/components/search.js +8 -1
- package/dist/components/shopping-bag.js +8 -1
- package/dist/components/special-discount.js +8 -1
- package/dist/components/star.js +8 -1
- package/dist/components/star2.js +8 -1
- package/dist/components/vanilla-picker.js +1034 -2
- package/dist/components/whatsapp2.js +8 -1
- package/dist/esm/{filepond-DlGaLh8N.js → filepond-Be7JObSq.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BTVFYcQx.js → filepond-plugin-file-poster-DF0NWKCQ.js} +2 -2
- package/dist/esm/{filepond-plugin-file-validate-size-DGryLmWv.js → filepond-plugin-file-validate-size-DJFlJHtE.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DxKfCD0V.js → filepond-plugin-file-validate-type-DykpLW1Z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-2W7pu9hn.js → filepond-plugin-image-edit-CyIHxrnW.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-OQu-IvPH.js → filepond-plugin-image-exif-orientation-DbCOAhSu.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DEW_tSNR.js → filepond-plugin-image-preview-CGRGZcft.js} +1 -1
- package/dist/esm/{index-DYB20YqN.js → index-Cz6cYzxG.js} +547 -780
- package/dist/esm/{index-BDqMkCqE.js → index-_kPnZdm0.js} +1 -1
- package/dist/esm/loader.js +3 -4
- package/dist/esm/salla-accordion-body_2.entry.js +5 -5
- package/dist/esm/salla-accordion_6.entry.js +15 -19
- package/dist/esm/salla-add-product-button_4.entry.js +10 -12
- package/dist/esm/salla-advertisement.entry.js +3 -3
- package/dist/esm/salla-alert_2.entry.js +5 -5
- package/dist/esm/salla-app-install-alert.entry.js +3 -3
- package/dist/esm/salla-apps-icons.entry.js +3 -3
- package/dist/esm/salla-booking-field_7.entry.js +23 -25
- package/dist/esm/salla-bullet-delivery.entry.js +3 -3
- package/dist/esm/salla-cart-coupons.entry.js +3 -3
- package/dist/esm/salla-cart-item-offers_2.entry.js +5 -5
- package/dist/esm/salla-comment-form_8.entry.js +17 -17
- package/dist/esm/salla-conditional-offer.entry.js +3 -3
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +3 -3
- package/dist/esm/salla-count-down.entry.js +3 -3
- package/dist/esm/salla-custom-fields.entry.js +3 -3
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +3 -3
- package/dist/esm/salla-filters.entry.js +3 -3
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +3 -3
- package/dist/esm/salla-hook.entry.js +2 -5
- package/dist/esm/salla-infinite-scroll.entry.js +3 -3
- package/dist/esm/salla-installment.entry.js +3 -3
- package/dist/esm/salla-list-tile.entry.js +3 -3
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +3 -3
- package/dist/esm/salla-loyalty-prize-item.entry.js +3 -3
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- 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 +3 -3
- package/dist/esm/salla-menu.entry.js +3 -3
- package/dist/esm/salla-metadata.entry.js +3 -3
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +5 -5
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -8
- package/dist/esm/salla-multiple-bundle-product.entry.js +4 -6
- package/dist/esm/salla-notification-item.entry.js +3 -3
- package/dist/esm/salla-notifications.entry.js +3 -3
- package/dist/esm/salla-offer-modal.entry.js +3 -3
- package/dist/esm/salla-offer.entry.js +3 -3
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +3 -3
- package/dist/esm/salla-order-details-options.entry.js +3 -3
- package/dist/esm/salla-order-details.entry.js +4 -6
- package/dist/esm/salla-order-edit-item.entry.js +3 -3
- package/dist/esm/salla-order-edit.entry.js +3 -3
- package/dist/esm/salla-order-summary.entry.js +3 -3
- package/dist/esm/salla-order-totals-card.entry.js +4 -6
- package/dist/esm/salla-orders.entry.js +3 -3
- package/dist/esm/salla-payments.entry.js +3 -3
- package/dist/esm/salla-placeholder.entry.js +3 -3
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-product-card.entry.js +3 -3
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +3 -3
- package/dist/esm/salla-products-slider.entry.js +3 -3
- package/dist/esm/salla-progress-bar.entry.js +3 -3
- package/dist/esm/salla-quick-order.entry.js +3 -3
- package/dist/esm/salla-rating-modal.entry.js +3 -3
- package/dist/esm/salla-scopes.entry.js +3 -3
- package/dist/esm/salla-search.entry.js +4 -6
- package/dist/esm/salla-skeleton.entry.js +3 -3
- package/dist/esm/salla-slider.entry.js +3 -3
- package/dist/esm/salla-social-share.entry.js +3 -3
- package/dist/esm/salla-social.entry.js +3 -3
- package/dist/esm/salla-tab-content_3.entry.js +7 -7
- package/dist/esm/salla-tiered-offer.entry.js +3 -3
- package/dist/esm/salla-tooltip.entry.js +3 -3
- package/dist/esm/salla-trust-badges.entry.js +3 -3
- package/dist/esm/salla-user-menu.entry.js +3 -3
- package/dist/esm/salla-user-profile.entry.js +3 -3
- package/dist/esm/salla-user-settings.entry.js +3 -3
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +3 -3
- package/dist/esm/twilight.js +4 -5
- package/dist/esm/{vanilla-picker-Dt9vZPZF.js → vanilla-picker-C_YV5LtA.js} +1 -1
- package/dist/twilight/{p-33779828.entry.js → p-0200cddd.entry.js} +1 -1
- package/dist/twilight/p-04dc0b71.entry.js +4 -0
- package/dist/twilight/{p-105b1dab.entry.js → p-0bac200e.entry.js} +1 -1
- package/dist/twilight/{p-ccfe5308.entry.js → p-0ef99df1.entry.js} +1 -1
- package/dist/twilight/{p-647b6d76.entry.js → p-1087f0dd.entry.js} +1 -1
- package/dist/twilight/{p-1875537e.entry.js → p-17dd8b68.entry.js} +1 -1
- package/dist/twilight/{p-aa7c5de0.entry.js → p-25a9bf1b.entry.js} +1 -1
- package/dist/twilight/{p-34b670fc.entry.js → p-2602927d.entry.js} +1 -1
- package/dist/twilight/p-268695ff.entry.js +4 -0
- package/dist/twilight/{p-aaa0c743.entry.js → p-34920aac.entry.js} +1 -1
- package/dist/twilight/{p-817b8ba5.entry.js → p-3656b48d.entry.js} +1 -1
- package/dist/twilight/{p-4932857d.entry.js → p-3857beb4.entry.js} +1 -1
- package/dist/twilight/{p-af3c74f4.entry.js → p-39c601e3.entry.js} +1 -1
- package/dist/twilight/{p-b598c0f7.entry.js → p-3c810881.entry.js} +1 -1
- package/dist/twilight/{p-d371d450.entry.js → p-3cf5c61f.entry.js} +1 -1
- package/dist/twilight/{p-3ccc532d.entry.js → p-413a7236.entry.js} +1 -1
- package/dist/twilight/{p-f176d41d.entry.js → p-42778349.entry.js} +1 -1
- package/dist/twilight/{p-b17d055d.entry.js → p-45e4f6f4.entry.js} +1 -1
- package/dist/twilight/{p-2abaa633.entry.js → p-4680956b.entry.js} +1 -1
- package/dist/twilight/{p-96a20515.entry.js → p-468b999f.entry.js} +1 -1
- package/dist/twilight/{p-df6853b5.entry.js → p-46d1823f.entry.js} +1 -1
- package/dist/twilight/{p-c87951a2.entry.js → p-49db497f.entry.js} +1 -1
- package/dist/twilight/{p-18bb0181.entry.js → p-4b033276.entry.js} +1 -1
- package/dist/twilight/{p-296d2dd0.entry.js → p-4f7bc9c3.entry.js} +1 -1
- package/dist/twilight/{p-4fa4547a.entry.js → p-543ee624.entry.js} +1 -1
- package/dist/twilight/{p-2fe01e44.entry.js → p-5957f774.entry.js} +1 -1
- package/dist/twilight/{p-96e78428.entry.js → p-5a4f0b99.entry.js} +1 -1
- package/dist/twilight/{p-87c0ca91.entry.js → p-5a8c0fd2.entry.js} +1 -1
- package/dist/twilight/{p-e28c0773.entry.js → p-5ab7a295.entry.js} +1 -1
- package/dist/twilight/{p-542d3277.entry.js → p-5e496aaa.entry.js} +1 -1
- package/dist/twilight/{p-c3ffb88a.entry.js → p-5f440956.entry.js} +1 -1
- package/dist/twilight/{p-94dbc1e9.entry.js → p-60fafcd9.entry.js} +1 -1
- package/dist/twilight/{p-1ef2602d.entry.js → p-708f02db.entry.js} +1 -1
- package/dist/twilight/{p-b64f3155.entry.js → p-7829ea8a.entry.js} +1 -1
- package/dist/twilight/{p-7093a427.entry.js → p-7d3e592a.entry.js} +1 -1
- package/dist/twilight/{p-96d03a28.entry.js → p-81876026.entry.js} +1 -1
- package/dist/twilight/{p-d9f5a8cd.entry.js → p-8306ef5e.entry.js} +1 -1
- package/dist/twilight/{p-d4a242f8.entry.js → p-8403cd93.entry.js} +1 -1
- package/dist/twilight/{p-7abddca8.entry.js → p-8474c4f6.entry.js} +1 -1
- package/dist/twilight/p-8552160a.entry.js +4 -0
- package/dist/twilight/p-8c9b0e2a.entry.js +4 -0
- package/dist/twilight/{p-2881bb33.entry.js → p-8f2dfc57.entry.js} +1 -1
- package/dist/twilight/{p-c091e2dc.entry.js → p-94b1a2ae.entry.js} +1 -1
- package/dist/twilight/{p-ede67a08.entry.js → p-95dad1af.entry.js} +1 -1
- package/dist/twilight/{p-eac718cd.entry.js → p-964b7db9.entry.js} +1 -1
- package/dist/twilight/{p-e3b8e0e1.entry.js → p-99735748.entry.js} +1 -1
- package/dist/twilight/{p-X6Yi3bYP.js → p-BZKDQg1s.js} +1 -1
- package/dist/twilight/{p-Cw3UBzjl.js → p-B_sN7OnY.js} +1 -1
- package/dist/twilight/{p-8r0S6BcZ.js → p-Bpi0aG1F.js} +1 -1
- package/dist/twilight/{p-BkClxrC4.js → p-CP8rFQ5n.js} +1 -1
- package/dist/twilight/{p-bNzv71Xl.js → p-CfmIbM8B.js} +1 -1
- package/dist/twilight/{p-bScl0xMh.js → p-CpO1SrBd.js} +1 -1
- package/dist/twilight/p-Cz6cYzxG.js +5 -0
- package/dist/twilight/p-Do4hSOGo.js +9 -0
- package/dist/twilight/{p-Ck4zxCil.js → p-JJmlh-ji.js} +1 -1
- package/dist/twilight/{p-dd2bd5dc.entry.js → p-a4aedcfe.entry.js} +1 -1
- package/dist/twilight/{p-06fa7327.entry.js → p-b0d01f9f.entry.js} +1 -1
- package/dist/twilight/p-b8404cfb.entry.js +4 -0
- package/dist/twilight/{p-108d8c8b.entry.js → p-b8e3e180.entry.js} +1 -1
- package/dist/twilight/{p-ad07f67a.entry.js → p-bd687cd0.entry.js} +1 -1
- package/dist/twilight/{p-44fa7521.entry.js → p-c0037fac.entry.js} +1 -1
- package/dist/twilight/{p-293c6cf3.entry.js → p-c121f8e4.entry.js} +1 -1
- package/dist/twilight/{p-a01f1992.entry.js → p-c29907df.entry.js} +1 -1
- package/dist/twilight/p-c39675ef.entry.js +4 -0
- package/dist/twilight/{p-bff4c7b3.entry.js → p-cb7a985e.entry.js} +1 -1
- package/dist/twilight/p-cbe620c4.entry.js +4 -0
- package/dist/twilight/{p-6f36541a.entry.js → p-d2fd79b4.entry.js} +1 -1
- package/dist/twilight/{p-d337c399.entry.js → p-d6cf0ffd.entry.js} +1 -1
- package/dist/twilight/{p-748df7e6.entry.js → p-d8f60f2f.entry.js} +1 -1
- package/dist/twilight/p-d99610f9.entry.js +4 -0
- package/dist/twilight/{p-e6bbf50d.entry.js → p-dc897bdd.entry.js} +1 -1
- package/dist/twilight/{p-f7999a6d.entry.js → p-dca46236.entry.js} +1 -1
- package/dist/twilight/{p-e94f217b.entry.js → p-e48853c9.entry.js} +1 -1
- package/dist/twilight/{p-09d39785.entry.js → p-e4fdb206.entry.js} +1 -1
- package/dist/twilight/p-ed913ae7.entry.js +4 -0
- package/dist/twilight/p-f067fcd6.entry.js +4 -0
- package/dist/twilight/{p-57ff1f25.entry.js → p-f2cd6975.entry.js} +1 -1
- package/dist/twilight/{p-ad041ab5.entry.js → p-f2ffbfbb.entry.js} +1 -1
- package/dist/twilight/{p-f5d15e71.entry.js → p-f3166e60.entry.js} +1 -1
- package/dist/twilight/{p-59ae82bd.entry.js → p-f8fcc8f4.entry.js} +1 -1
- package/dist/twilight/{p-c1fd45b1.entry.js → p-f9e52fd9.entry.js} +1 -1
- package/dist/twilight/p-fcddbfc3.entry.js +4 -0
- package/dist/twilight/{p-41c733c2.entry.js → p-fe7ac9bb.entry.js} +1 -1
- package/dist/twilight/{p-0add06f9.entry.js → p-ff14dca3.entry.js} +1 -1
- package/dist/twilight/{p-BZnoSB1s.js → p-mlFGjxcj.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components.d.ts +177 -763
- package/dist/types/stencil-public-runtime.d.ts +11 -169
- package/package.json +5 -5
- package/dist/cjs/app-globals-oehrC7QI.js +0 -39
- package/dist/esm/app-globals-BFryt7-C.js +0 -37
- package/dist/twilight/p-1daeed6e.entry.js +0 -4
- package/dist/twilight/p-2ddb3fce.entry.js +0 -4
- package/dist/twilight/p-34968e31.entry.js +0 -4
- package/dist/twilight/p-665189b4.entry.js +0 -4
- package/dist/twilight/p-776c9d33.entry.js +0 -4
- package/dist/twilight/p-7b8313ef.entry.js +0 -4
- package/dist/twilight/p-7bd0ede5.entry.js +0 -4
- package/dist/twilight/p-8e8d9d7d.entry.js +0 -4
- package/dist/twilight/p-D1vqXXNX.js +0 -9
- package/dist/twilight/p-DYB20YqN.js +0 -5
- package/dist/twilight/p-Vl6qpttb.js +0 -4
- package/dist/twilight/p-af60e72a.entry.js +0 -4
- package/dist/twilight/p-e679884a.entry.js +0 -4
- package/dist/twilight/p-efab88c5.entry.js +0 -4
|
@@ -1,4 +1,586 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{transformTag as e,proxyCustomElement as t,HTMLElement as i,createEvent as o,h as a,Host as n}from"@stencil/core/internal/client";const l=t(class extends i{async loadFilePond(){if(!this.filePondLoaded)try{const[e,t,i,o,a,n,l]=await Promise.all([import("./filepond.js").then((function(e){return e.f})),import("./filepond-plugin-file-validate-size.js").then((function(e){return e.f})),import("./filepond-plugin-image-exif-orientation.js").then((function(e){return e.f})),import("./filepond-plugin-image-preview.js").then((function(e){return e.f})),import("./filepond-plugin-image-edit.js").then((function(e){return e.f})),import("./filepond-plugin-file-validate-type.js").then((function(e){return e.f})),import("./filepond-plugin-file-poster.js").then((function(e){return e.f}))]);this.FilePond=e,this.FilePond.registerPlugin(o.default,i.default,t.default,a.default,n.default,l.default),this.filePondLoaded=!0}catch(e){throw console.error("Failed to load FilePond:",e),salla.notify?.error?.("Failed to load file uploader. Please refresh the page."),e}}constructor(e){super(),!1!==e&&this.__registerHost(),this.added=o(this,"added",7),this.invalidInput=o(this,"invalidInput",7),this.uploaded=o(this,"uploaded",7),this.removed=o(this,"removed",7),this.filePondLoaded=!1,this.max_images_count=e=>salla.lang.get("common.uploader.max_images_count",{count:e}),this.max_count_hint=e=>salla.lang.get("common.uploader.max_count_hint",{count:e}),this.uploadedFiles=[],this.isListScrollerListenerAdded=!1,this.showMaxCountHint=!1,this.profileImage=!1,this.payloadParams={},this.accept="image/png, image/jpeg, image/jpg, image/gif",this.method="POST",this.formData="{}",this.allowDrop=!0,this.allowBrowse=!0,this.allowReplace=!0,this.allowRevert=!0,this.allowRemove=!0,this.allowImagePreview=!0,this.imagePreviewHeight=null,this.filePosterHeight=null,this.maxFilesCount=1,this.maxParallelUploads=3,this.itemInsertLocation="after",this.itemInsertInterval=75,this.dropOnElement=!0,this.ignoredFiles=[".ds_store","thumbs.db","desktop.ini"],this.chunkSize=5e6,this.chunkRetryDelays=[500,1e3,3e3],this.labelDecimalSeparator=void 0,this.labelThousandsSeparator=void 0,this.iconRemove="<svg>...</svg>",this.iconProcess="<svg>...</svg>",this.iconRetry="<svg>...</svg>",this.iconUndo="<svg>...</svg>",this.openFileBrowser=()=>{this.filepond.browse()},!this.url&&this.cartItemId&&(this.url=salla.cart.getUploadImageEndpoint(),this.instantUpload=!0),!this.url&&this.profileImage&&(this.url=salla.url.api("profile/update"),this.instantUpload=!0,this.host.hasAttribute("name")||(this.name="avatar")),this.name||(this.name="file"),salla.lang.onLoaded((()=>{this.host.querySelectorAll(".filepond--drop-label>label").forEach((e=>e.innerHTML=this.getLabel())),this.filepond&&(this.filepond.labelFileTypeNotAllowed=salla.lang.get("common.uploader.invalid_type"),this.filepond.labelMaxFileSizeExceeded=salla.lang.get("common.uploader.too_large"),this.filepond.labelFileSizeNotAvailable=salla.lang.get("common.uploader.size_not_available"),this.filepond.labelFileLoading=salla.lang.get("common.elements.loading"),this.filepond.labelFileLoadError=salla.lang.get("common.uploader.failed_to_load"),this.filepond.labelFileProcessingAborted=salla.lang.get("common.uploader.upload_cancelled"),this.filepond.labelTapToCancel=salla.lang.get("common.elements.cancel"),this.filepond.labelTapToRetry=salla.lang.get("common.elements.retry"),this.filepond.labelButtonRemoveItem=salla.lang.get("common.elements.remove"),this.filepond.labelButtonUndoItemProcessing=salla.lang.get("common.elements.undo"),this.filepond.labelButtonProcessItem=salla.lang.get("common.uploader.upload"),this.filepond.labelFileProcessingComplete=salla.lang.get("common.uploader.file_processing_complete"),this.filepond.labelTapToUndo=salla.lang.get("common.uploader.tap_to_undo"),this.filepond.labelFileProcessing=salla.lang.get("common.uploader.file_processing"),this.filepond.labelFileProcessingError=salla.lang.get("common.uploader.file_processing_error"));const e=(e,t,i)=>new Promise((o=>{salla.helpers.setNested(salla.lang.messages[e],t,i),o(!0)}));this.max_count_hint=e=>salla.lang.get("common.uploader.max_count_hint",{count:e}),this.max_images_count=e=>salla.lang.get("common.uploader.max_images_count",{count:e}),(async()=>{await e("ar.trans","common.uploader.max_images_count",".أضف :count صور كحد أقصى"),await e("en.trans","common.uploader.max_images_count","Add up to :count images maximum."),await e("ar.trans","common.uploader.max_count_hint","يمكنك رفع حتى :count صور"),await e("en.trans","common.uploader.max_count_hint","You can upload up to :count images.")})()}))}addedHandler(e,t){if(this.added.emit({error:e,file:t}),this.host.querySelector(".filepond--root").classList.remove("s-file-upload-has-error"),e||!t.file.type)return void this.host.querySelector(".filepond--root").classList.add("s-file-upload-has-error");let i=new DataTransfer,o=this.getFormDataFileInput();i.items.add(t.file),o.type="file",o.files=i.files,o.dispatchEvent(new window.Event("change",{bubbles:!0}))}uploadedHandler(){let e=this.getFormDataFileInput();return e.type="hidden",e.value=this.value,this.hiddenInput.value=this.value,e.dispatchEvent(new window.Event("change",{bubbles:!0})),this.uploaded.emit(this.value)}removedHandler(e){let t=this.getFormDataFileInput();t.type="hidden",t.value="",this.host.closest(".s-product-options-option")?.removeAttribute("data-has-value"),salla.url.is_page("cart")&&e.getMetadata("id")&&salla.cart.api.deleteImage(e.getMetadata("id")),this.height&&setTimeout((()=>this.host.querySelector(".filepond--root").style.height=this.height),1e3),this.hiddenInput.value="",t.dispatchEvent(new window.Event("change",{bubbles:!0}));let i=this.allowMultiple?e.getMetadata("id"):e;return this.removed.emit(i)}async setOption(e,t){this.filepond[e]=t}getLabel(){return this.labelIdle?this.labelIdle.replace("common.uploader.drag_and_drop",salla.lang.get("common.uploader.drag_and_drop")).replace("common.uploader.browse",salla.lang.get("common.uploader.browse")):`${salla.lang.get("common.uploader.drag_and_drop")}<span class="filepond--label-action"> ${salla.lang.get("common.uploader.browse")} </span>`}getFileSize(e){let t=new XMLHttpRequest;return t.open("HEAD",e,!1),t.send(null),200===t.status?t.getResponseHeader("content-length"):""}getFormDataFileInput(){return this.host.querySelector(".filepond--data input")}getFiles(){if(!this.value&&!this.files)return[];try{let e=this.files?"string"==typeof this.files?JSON.parse(this.files):this.files:this.value.split(",").map((e=>({url:e})));return e.length&&this.host.closest(".s-product-options-option")?.setAttribute("data-has-value","true"),e.map((e=>({source:e.id?`${e.id}`:e.url,options:{type:"local",file:{name:e.url.substring(e.url.lastIndexOf("/")+1),size:this.getFileSize(e.url)},metadata:{poster:e.url,name:e.url,id:e.id}}})))}catch(e){salla.log("failed To get files from: "+(this.files||this.value))}return[]}async componentWillLoad(){await this.loadFilePond(),this.labelIdle||(this.labelIdle=this.host.innerHTML,this.host.innerHTML="")}render(){return a(n,{key:"978e89fe8713e6b3db913ed8fb3c5d09f6caf705",class:{"s-file-upload":!0,"s-file-upload-profile-image":this.profileImage,"s-file-upload-multiple":this.allowMultiple}},a("input",{key:"acf6197d43b79a80e7a69219afda29271a86d4eb",type:"file",name:this.name,value:this.value,ref:e=>this.fileUploader=e,required:this.required,class:"s-file-upload-wrapper s-file-upload-input",accept:this.accept}),this.allowMultiple&&this.showMaxCountHint?a("div",{class:"s-file-upload-hint s-hidden"},this.max_count_hint(this.maxFilesCount)):"",a("input",{key:"b8624b0fcaba14f14640acce0a28c12feb78701b",class:"s-hidden",name:"hidden-"+this.name,required:this.required,value:this.value,ref:e=>this.hiddenInput=e}))}componentDidLoad(){let e=this.getFiles();this.filepond=this.FilePond.create(this.fileUploader,{name:this.payloadName||this.name,files:e,required:this.required,disabled:this.disabled,allowDrop:this.allowDrop,allowBrowse:this.allowBrowse,allowPaste:this.allowPaste,allowMultiple:this.allowMultiple,allowReplace:this.allowReplace,allowRevert:this.allowRevert,allowProcess:this.allowProcess,allowReorder:this.allowReorder,storeAsFile:this.storeAsFile,forceRevert:this.forceRevert,maxFiles:this.maxFilesCount,imagePreviewHeight:this.imagePreviewHeight,filePosterHeight:this.filePosterHeight,allowImagePreview:this.allowImagePreview,maxParallelUploads:this.maxParallelUploads,checkValidity:this.checkValidity,itemInsertLocation:this.itemInsertLocation,itemInsertInterval:this.itemInsertInterval,credits:this.credits,dropOnPage:this.dropOnPage,dropOnElement:this.dropOnElement,dropValidation:this.dropValidation,ignoredFiles:this.ignoredFiles,onaddfile:(e,t)=>this.addedHandler(e,t),onwarning:e=>{"Max files"===e.body&&salla.notify.error(this.max_images_count(this.maxFilesCount))},onprocessfile:(e,t)=>{if(this.allowMultiple&&!e){const e=t.serverId,i=this.uploadedFiles.find((t=>t.id===e));i&&(t.setMetadata("id",i.id,!0),t.setMetadata("url",i.url,!0),this.value={id:i.id,url:i.url},this.uploadedHandler())}},onupdatefiles:e=>{const t=this.host.querySelector(".filepond--drop-label"),i=this.host.querySelector(".filepond--list-scroller");this.allowMultiple&&(e.length>0?(t.classList.add("s-hidden"),!this.isListScrollerListenerAdded&&e.length<this.maxFilesCount&&(this.showMaxCountHint=!0,i.addEventListener("click",this.openFileBrowser),this.isListScrollerListenerAdded=!0)):(t.classList.remove("s-hidden"),this.isListScrollerListenerAdded&&(i.removeEventListener("click",this.openFileBrowser),this.isListScrollerListenerAdded=!1)),e.length===this.maxFilesCount&&this.isListScrollerListenerAdded&&(i.removeEventListener("click",this.openFileBrowser),this.isListScrollerListenerAdded=!1,this.showMaxCountHint=!1))},server:{url:this.url,method:this.method,revert:null,process:{onload:e=>{let t=JSON.parse(e).data;if((this.instantUpload||this.allowMultiple)&&Array.isArray(t)&&t.length>0){const e=`${this.host.id}-${Math.floor(100+900*Math.random())}`;return this.uploadedFiles.push({id:e,url:t[0]}),e}return this.value=t.filePath||t.url,this.uploadedHandler(),this.value},headers:salla.api.getHeaders(),onerror:e=>{try{let t=JSON.parse(e).error.fields;return t=t[this.payloadName||this.name],t&&t[0]||salla.lang.get("common.errors.error_occurred")}catch(e){return salla.log("FileUpload:: Error",e),salla.lang.get("common.errors.error_occurred")}},ondata:e=>{if(this.allowMultiple){const t=new FormData;return e.forEach((e=>{t.append("files[]",e)})),t.append("type",this.type),t}if(this.payloadName&&this.payloadName!=this.name&&!this.allowMultiple&&(e.append(this.payloadName,this.filepond.getFile(0).file),e.delete(this.name)),this.payloadParams)for(const[t,i]of Object.entries(this.payloadParams))e.append(t,i);this.cartItemId&&e.append("cart_item_id",this.cartItemId);try{Object.entries(JSON.parse(this.formData)).forEach((t=>t[1]&&e.append(t[0],t[1])))}catch(e){salla.log("Error to inject formData",e)}return e}}},instantUpload:this.instantUpload,chunkUploads:this.chunkUploads,chunkForce:this.chunkForce,chunkSize:this.chunkSize,chunkRetryDelays:this.chunkRetryDelays,labelDecimalSeparator:this.labelDecimalSeparator,labelThousandsSeparator:this.labelThousandsSeparator,labelIdle:this.getLabel(),acceptedFileTypes:this.accept.replace(/\s+/g,"").split(","),labelFileTypeNotAllowed:salla.lang.get("common.uploader.invalid_type"),labelFileProcessingComplete:salla.lang.get("common.uploader.file_processing_complete"),labelTapToUndo:salla.lang.get("common.uploader.tap_to_undo"),labelFileProcessing:salla.lang.get("common.uploader.file_processing"),labelFileProcessingError:salla.lang.get("common.uploader.file_processing_error"),fileValidateTypeLabelExpectedTypes:"{allButLastType}, {lastType}",labelMaxFileSizeExceeded:salla.lang.get("common.uploader.too_large"),labelMaxFileSize:"{filesize}",maxFileSize:`${salla.config.get("store.settings.upload_size")}KB`||this.maxFileSize,beforeRemoveFile:e=>new Promise((t=>{this.removedHandler(e),t(!0)}))}),this.hiddenInput.addEventListener("invalid",(e=>{this.invalidInput.emit(e)})),this.hiddenInput.addEventListener("change",(()=>{this.hiddenInput.setCustomValidity(""),this.hiddenInput.reportValidity()}))}get host(){return this}static get style(){return".filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:\"\"}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity;touch-action:auto}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:\"\";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:\"\";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.4;line-height:.85;font-size:11px;color:inherit;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}.filepond--image-preview-markup{position:absolute;left:0;top:0}.filepond--image-preview-wrapper{z-index:2}.filepond--image-preview-overlay{display:block;position:absolute;left:0;top:0;width:100%;min-height:5rem;max-height:7rem;margin:0;opacity:0;z-index:2;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--image-preview-overlay svg{width:100%;height:auto;color:inherit;max-height:inherit}.filepond--image-preview-overlay-idle{mix-blend-mode:multiply;color:rgba(40, 40, 40, 0.85)}.filepond--image-preview-overlay-success{mix-blend-mode:normal;color:rgba(54, 151, 99, 1)}.filepond--image-preview-overlay-failure{mix-blend-mode:normal;color:rgba(196, 78, 71, 1)}@supports (-webkit-marquee-repetition: infinite) and ((-o-object-fit: fill) or (object-fit: fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;left:0;top:0;right:0;height:100%;margin:0;border-radius:0.45em;overflow:hidden;background:rgba(0, 0, 0, 0.01)}.filepond--image-preview{position:absolute;left:0;top:0;z-index:1;display:flex;align-items:center;height:100%;width:100%;pointer-events:none;background:#222;will-change:transform, opacity}.filepond--image-clip{position:relative;overflow:hidden;margin:0 auto;}.filepond--image-clip[data-transparency-indicator='grid'] img,.filepond--image-clip[data-transparency-indicator='grid'] canvas{background-color:#fff;background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0 H50 V50 H0'/%3E%3Cpath d='M50 50 H100 V100 H50'/%3E%3C/svg%3E\");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{position:absolute;left:0;top:0;will-change:transform}.filepond--root[data-style-panel-layout~='integrated'] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~='integrated'] .filepond--image-preview{height:100%;display:flex;justify-content:center;align-items:center}.filepond--root[data-style-panel-layout~='circle'] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~='circle'] .filepond--image-preview-overlay{top:auto;bottom:0;-webkit-transform:scaleY(-1);transform:scaleY(-1)}.filepond--root[data-style-panel-layout~='circle'] .filepond--file .filepond--file-action-button[data-align*='bottom']:not([data-align*='center']){margin-bottom:0.325em}.filepond--root[data-style-panel-layout~='circle'] .filepond--file [data-align*='left']{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--file [data-align*='right']{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='left'],.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='right']{margin-bottom:calc(0.325em + 0.1875em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='center']{margin-top:0;margin-bottom:0.1875em;margin-left:0.1875em}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:0.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*='center']{margin-left:-0.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*='bottom']{margin-bottom:-0.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 0.25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--root[data-style-panel-layout~='circle'] .filepond--action-edit-item{opacity:1 !important;visibility:visible !important}.s-file-upload-wrapper .filepond--file-info-main{-webkit-line-clamp:1;display:-webkit-box;-webkit-box-orient:vertical}"}},[0,"salla-file-upload",{value:[1544],files:[513],height:[513],cartItemId:[1,"cart-item-id"],profileImage:[516,"profile-image"],name:[1537],payloadName:[1,"payload-name"],payloadParams:[16],type:[1],accept:[1537],fileId:[2,"file-id"],url:[1025],method:[1],formData:[1,"form-data"],required:[4],maxFileSize:[1,"max-file-size"],disabled:[4],allowDrop:[4,"allow-drop"],allowBrowse:[4,"allow-browse"],allowPaste:[4,"allow-paste"],allowMultiple:[4,"allow-multiple"],allowReplace:[4,"allow-replace"],allowRevert:[4,"allow-revert"],allowRemove:[4,"allow-remove"],allowProcess:[4,"allow-process"],allowReorder:[4,"allow-reorder"],allowImagePreview:[4,"allow-image-preview"],imagePreviewHeight:[2,"image-preview-height"],filePosterHeight:[2,"file-poster-height"],storeAsFile:[4,"store-as-file"],forceRevert:[4,"force-revert"],maxFilesCount:[2,"max-files-count"],maxParallelUploads:[2,"max-parallel-uploads"],checkValidity:[4,"check-validity"],itemInsertLocation:[1,"item-insert-location"],itemInsertInterval:[2,"item-insert-interval"],credits:[4],dropOnPage:[4,"drop-on-page"],dropOnElement:[4,"drop-on-element"],dropValidation:[4,"drop-validation"],ignoredFiles:[16],instantUpload:[1028,"instant-upload"],chunkUploads:[4,"chunk-uploads"],chunkForce:[4,"chunk-force"],chunkSize:[2,"chunk-size"],chunkRetryDelays:[16],labelDecimalSeparator:[1,"label-decimal-separator"],labelThousandsSeparator:[1,"label-thousands-separator"],labelIdle:[1025,"label-idle"],iconRemove:[1,"icon-remove"],iconProcess:[1,"icon-process"],iconRetry:[1,"icon-retry"],iconUndo:[1,"icon-undo"],max_images_count:[32],max_count_hint:[32],uploadedFiles:[32],isListScrollerListenerAdded:[32],showMaxCountHint:[32],setOption:[64]}]);function r(){"undefined"!=typeof customElements&&["salla-file-upload"].forEach((t=>{"salla-file-upload"===t&&(customElements.get(e(t))||customElements.define(e(t),l))}))}r();export{l as S,r as d}
|
|
4
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
|
|
6
|
+
const sallaFileUploadCss = "/*!\n * FilePond 4.32.12\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */.filepond--assistant{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--browser.filepond--browser{position:absolute;margin:0;padding:0;left:1em;top:1.75em;width:calc(100% - 2em);opacity:0;font-size:0}.filepond--data{position:absolute;width:0;height:0;padding:0;margin:0;border:none;visibility:hidden;pointer-events:none;contain:strict}.filepond--drip{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:.1;pointer-events:none;border-radius:.5em;background:rgba(0,0,0,.01)}.filepond--drip-blob{-webkit-transform-origin:center center;transform-origin:center center;width:8em;height:8em;margin-left:-4em;margin-top:-4em;background:#292625;border-radius:50%}.filepond--drip-blob,.filepond--drop-label{position:absolute;top:0;left:0;will-change:transform,opacity}.filepond--drop-label{right:0;margin:0;color:#4f4f4f;display:flex;justify-content:center;align-items:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--drop-label.filepond--drop-label label{display:block;margin:0;padding:.5em}.filepond--drop-label label{cursor:default;font-size:.875em;font-weight:400;text-align:center;line-height:1.5}.filepond--label-action{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;-webkit-text-decoration-color:#a7a4a4;text-decoration-color:#a7a4a4;cursor:pointer}.filepond--root[data-disabled] .filepond--drop-label label{opacity:.5}.filepond--file-action-button.filepond--file-action-button{font-size:1em;width:1.625em;height:1.625em;font-family:inherit;line-height:inherit;margin:0;padding:0;border:none;outline:none;will-change:transform,opacity}.filepond--file-action-button.filepond--file-action-button span{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file-action-button.filepond--file-action-button svg{width:100%;height:100%}.filepond--file-action-button.filepond--file-action-button:after{position:absolute;left:-.75em;right:-.75em;top:-.75em;bottom:-.75em;content:\"\"}.filepond--file-action-button{cursor:auto;color:#fff;border-radius:50%;background-color:rgba(0,0,0,.5);background-image:none;box-shadow:0 0 0 0 hsla(0,0%,100%,0);transition:box-shadow .25s ease-in}.filepond--file-action-button:focus,.filepond--file-action-button:hover{box-shadow:0 0 0 .125em hsla(0,0%,100%,.9)}.filepond--file-action-button[disabled]{color:hsla(0,0%,100%,.5);background-color:rgba(0,0,0,.25)}.filepond--file-action-button[hidden]{display:none}.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=center]{margin-left:-.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom]{margin-bottom:-.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 .25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--file-info{position:static;display:flex;flex-direction:column;align-items:flex-start;flex:1;margin:0 .5em 0 0;min-width:0;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-info *{margin:0}.filepond--file-info .filepond--file-info-main{font-size:.75em;line-height:1.2;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}.filepond--file-info .filepond--file-info-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out;white-space:nowrap}.filepond--file-info .filepond--file-info-sub:empty{display:none}.filepond--file-status{position:static;display:flex;flex-direction:column;align-items:flex-end;flex-grow:0;flex-shrink:0;margin:0;min-width:2.25em;text-align:right;will-change:transform,opacity;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--file-status *{margin:0;white-space:nowrap}.filepond--file-status .filepond--file-status-main{font-size:.75em;line-height:1.2}.filepond--file-status .filepond--file-status-sub{font-size:.625em;opacity:.5;transition:opacity .25s ease-in-out}.filepond--file-wrapper.filepond--file-wrapper{border:none;margin:0;padding:0;min-width:0;height:100%}.filepond--file-wrapper.filepond--file-wrapper>legend{position:absolute;overflow:hidden;height:1px;width:1px;padding:0;border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.filepond--file{position:static;display:flex;height:100%;align-items:flex-start;padding:.5625em;color:#fff;border-radius:.5em}.filepond--file .filepond--file-status{margin-left:auto;margin-right:2.25em}.filepond--file .filepond--processing-complete-indicator{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}.filepond--file .filepond--file-action-button,.filepond--file .filepond--processing-complete-indicator,.filepond--file .filepond--progress-indicator{position:absolute}.filepond--file [data-align*=left]{left:.5625em}.filepond--file [data-align*=right]{right:.5625em}.filepond--file [data-align*=center]{left:calc(50% - .8125em)}.filepond--file [data-align*=bottom]{bottom:1.125em}.filepond--file [data-align=center]{top:calc(50% - .8125em)}.filepond--file .filepond--progress-indicator{margin-top:.1875em}.filepond--file .filepond--progress-indicator[data-align*=right]{margin-right:.1875em}.filepond--file .filepond--progress-indicator[data-align*=left]{margin-left:.1875em}[data-filepond-item-state*=error] .filepond--file-info,[data-filepond-item-state*=invalid] .filepond--file-info,[data-filepond-item-state=cancelled] .filepond--file-info{margin-right:2.25em}[data-filepond-item-state~=processing] .filepond--file-status-sub{opacity:0}[data-filepond-item-state~=processing] .filepond--action-abort-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-error] .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing~.filepond--file-status .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg{-webkit-animation:fall .5s linear .125s both;animation:fall .5s linear .125s both}[data-filepond-item-state=processing-complete] .filepond--file-status-sub{opacity:.5}[data-filepond-item-state=processing-complete] .filepond--file-info-sub,[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden])~.filepond--file-status .filepond--file-status-sub{opacity:0}[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing~.filepond--file-info .filepond--file-info-sub{opacity:.5}[data-filepond-item-state*=error] .filepond--file-wrapper,[data-filepond-item-state*=error] .filepond--panel,[data-filepond-item-state*=invalid] .filepond--file-wrapper,[data-filepond-item-state*=invalid] .filepond--panel{-webkit-animation:shake .65s linear both;animation:shake .65s linear both}[data-filepond-item-state*=busy] .filepond--progress-indicator svg{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@keyframes shake{10%,90%{-webkit-transform:translateX(-.0625em);transform:translateX(-.0625em)}20%,80%{-webkit-transform:translateX(.125em);transform:translateX(.125em)}30%,50%,70%{-webkit-transform:translateX(-.25em);transform:translateX(-.25em)}40%,60%{-webkit-transform:translateX(.25em);transform:translateX(.25em)}}@-webkit-keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes fall{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}70%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}to{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.filepond--hopper[data-hopper-state=drag-over]>*{pointer-events:none}.filepond--hopper[data-hopper-state=drag-over]:after{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;z-index:100}.filepond--progress-indicator{z-index:103}.filepond--file-action-button{z-index:102}.filepond--file-status{z-index:101}.filepond--file-info{z-index:100}.filepond--item{position:absolute;top:0;left:0;right:0;z-index:1;padding:0;margin:.25em;will-change:transform,opacity;touch-action:auto}.filepond--item>.filepond--panel{z-index:-1}.filepond--item>.filepond--panel .filepond--panel-bottom{box-shadow:0 .0625em .125em -.0625em rgba(0,0,0,.25)}.filepond--item>.filepond--file-wrapper,.filepond--item>.filepond--panel{transition:opacity .15s ease-out}.filepond--item[data-drag-state]{cursor:-webkit-grab;cursor:grab}.filepond--item[data-drag-state]>.filepond--panel{transition:box-shadow .125s ease-in-out;box-shadow:0 0 0 transparent}.filepond--item[data-drag-state=drag]{cursor:-webkit-grabbing;cursor:grabbing}.filepond--item[data-drag-state=drag]>.filepond--panel{box-shadow:0 .125em .3125em rgba(0,0,0,.325)}.filepond--item[data-drag-state]:not([data-drag-state=idle]){z-index:2}.filepond--item-panel{background-color:#64605e}[data-filepond-item-state=processing-complete] .filepond--item-panel{background-color:#369763}[data-filepond-item-state*=error] .filepond--item-panel,[data-filepond-item-state*=invalid] .filepond--item-panel{background-color:#c44e47}.filepond--item-panel{border-radius:.5em;transition:background-color .25s}.filepond--list-scroller{position:absolute;top:0;left:0;right:0;margin:0;will-change:transform}.filepond--list-scroller[data-state=overflow] .filepond--list{bottom:0;right:0}.filepond--list-scroller[data-state=overflow]{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch;-webkit-mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent);mask:linear-gradient(180deg,#000 calc(100% - .5em),transparent)}.filepond--list-scroller::-webkit-scrollbar{background:transparent}.filepond--list-scroller::-webkit-scrollbar:vertical{width:1em}.filepond--list-scroller::-webkit-scrollbar:horizontal{height:0}.filepond--list-scroller::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:99999px;border:.3125em solid transparent;background-clip:content-box}.filepond--list.filepond--list{position:absolute;top:0;margin:0;padding:0;list-style-type:none;will-change:transform}.filepond--list{left:.75em;right:.75em}.filepond--root[data-style-panel-layout~=integrated]{width:100%;height:100%;max-width:none;margin:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root{border-radius:0}.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root>*,.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{bottom:0;height:auto;display:flex;justify-content:center;align-items:center;z-index:7}.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel,.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel{display:none}.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller,.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller{overflow:hidden;height:100%;margin-top:0;margin-bottom:0}.filepond--root[data-style-panel-layout~=compact] .filepond--list,.filepond--root[data-style-panel-layout~=integrated] .filepond--list{left:0;right:0;height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--item,.filepond--root[data-style-panel-layout~=integrated] .filepond--item{margin:0}.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper,.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper{height:100%}.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label,.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label{z-index:7}.filepond--root[data-style-panel-layout~=circle]{border-radius:99999rem;overflow:hidden}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel{border-radius:inherit}.filepond--root[data-style-panel-layout~=circle]>.filepond--panel>*{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--file-info,.filepond--root[data-style-panel-layout~=circle] .filepond--file-status{display:none}.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item{opacity:1!important;visibility:visible!important}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.filepond--root[data-style-panel-layout~=circle]{will-change:transform}}}.filepond--panel-root{border-radius:.5em;background-color:#f1f0ef}.filepond--panel{position:absolute;left:0;top:0;right:0;margin:0;height:100%!important;pointer-events:none}.filepond-panel:not([data-scalable=false]){height:auto!important}.filepond--panel[data-scalable=false]>div{display:none}.filepond--panel[data-scalable=true]{-webkit-transform-style:preserve-3d;transform-style:preserve-3d;background-color:transparent!important;border:none!important}.filepond--panel-bottom,.filepond--panel-center,.filepond--panel-top{position:absolute;left:0;top:0;right:0;margin:0;padding:0}.filepond--panel-bottom,.filepond--panel-top{height:.5em}.filepond--panel-top{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-bottom:none!important}.filepond--panel-top:after{content:\"\";position:absolute;height:2px;left:0;right:0;bottom:-1px;background-color:inherit}.filepond--panel-bottom,.filepond--panel-center{will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:translate3d(0,.5em,0);transform:translate3d(0,.5em,0)}.filepond--panel-bottom{border-top-left-radius:0!important;border-top-right-radius:0!important;border-top:none!important}.filepond--panel-bottom:before{content:\"\";position:absolute;height:2px;left:0;right:0;top:-1px;background-color:inherit}.filepond--panel-center{height:100px!important;border-top:none!important;border-bottom:none!important;border-radius:0!important}.filepond--panel-center:not([style]){visibility:hidden}.filepond--progress-indicator{position:static;width:1.25em;height:1.25em;color:#fff;margin:0;pointer-events:none;will-change:transform,opacity}.filepond--progress-indicator svg{width:100%;height:100%;vertical-align:top;transform-box:fill-box}.filepond--progress-indicator path{fill:none;stroke:currentColor}.filepond--list-scroller{z-index:6}.filepond--drop-label{z-index:5}.filepond--drip{z-index:3}.filepond--root>.filepond--panel{z-index:2}.filepond--browser{z-index:1}.filepond--root{box-sizing:border-box;position:relative;margin-bottom:1em;font-size:1rem;line-height:normal;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-weight:450;text-align:left;text-rendering:optimizeLegibility;direction:ltr;contain:layout style size}.filepond--root *{box-sizing:inherit;line-height:inherit}.filepond--root :not(text){font-size:inherit}.filepond--root[data-disabled]{pointer-events:none}.filepond--root[data-disabled] .filepond--list-scroller{pointer-events:all}.filepond--root[data-disabled] .filepond--list{pointer-events:none}.filepond--root .filepond--drop-label{min-height:4.75em}.filepond--root .filepond--list-scroller{margin-top:1em;margin-bottom:1em}.filepond--root .filepond--credits{position:absolute;right:0;opacity:.4;line-height:.85;font-size:11px;color:inherit;text-decoration:none;z-index:3;bottom:-14px}.filepond--root .filepond--credits[style]{top:0;bottom:auto;margin-top:14px}/*!\n * FilePondPluginImagePreview 4.6.12\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */.filepond--image-preview-markup{position:absolute;left:0;top:0}.filepond--image-preview-wrapper{z-index:2}.filepond--image-preview-overlay{display:block;position:absolute;left:0;top:0;width:100%;min-height:5rem;max-height:7rem;margin:0;opacity:0;z-index:2;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filepond--image-preview-overlay svg{width:100%;height:auto;color:inherit;max-height:inherit}.filepond--image-preview-overlay-idle{mix-blend-mode:multiply;color:rgba(40, 40, 40, 0.85)}.filepond--image-preview-overlay-success{mix-blend-mode:normal;color:rgba(54, 151, 99, 1)}.filepond--image-preview-overlay-failure{mix-blend-mode:normal;color:rgba(196, 78, 71, 1)}@supports (-webkit-marquee-repetition: infinite) and\n ((-o-object-fit: fill) or (object-fit: fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;left:0;top:0;right:0;height:100%;margin:0;border-radius:0.45em;overflow:hidden;background:rgba(0, 0, 0, 0.01)}.filepond--image-preview{position:absolute;left:0;top:0;z-index:1;display:flex;align-items:center;height:100%;width:100%;pointer-events:none;background:#222;will-change:transform, opacity}.filepond--image-clip{position:relative;overflow:hidden;margin:0 auto;}.filepond--image-clip[data-transparency-indicator='grid'] img,.filepond--image-clip[data-transparency-indicator='grid'] canvas{background-color:#fff;background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0 H50 V50 H0'/%3E%3Cpath d='M50 50 H100 V100 H50'/%3E%3C/svg%3E\");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{position:absolute;left:0;top:0;will-change:transform}.filepond--root[data-style-panel-layout~='integrated'] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~='integrated'] .filepond--image-preview{height:100%;display:flex;justify-content:center;align-items:center}.filepond--root[data-style-panel-layout~='circle'] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~='circle'] .filepond--image-preview-overlay{top:auto;bottom:0;-webkit-transform:scaleY(-1);transform:scaleY(-1)}.filepond--root[data-style-panel-layout~='circle'] .filepond--file .filepond--file-action-button[data-align*='bottom']:not([data-align*='center']){margin-bottom:0.325em}.filepond--root[data-style-panel-layout~='circle'] .filepond--file [data-align*='left']{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--file [data-align*='right']{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='left'],.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='right']{margin-bottom:calc(0.325em + 0.1875em)}.filepond--root[data-style-panel-layout~='circle'] .filepond--progress-indicator[data-align*='bottom'][data-align*='center']{margin-top:0;margin-bottom:0.1875em;margin-left:0.1875em}/*!\n * FilePondPluginImageEdit 1.6.3\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */.filepond--action-edit-item.filepond--action-edit-item{width:2em;height:2em;padding:0.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*='center']{margin-left:-0.1875em}.filepond--action-edit-item.filepond--action-edit-item[data-align*='bottom']{margin-bottom:-0.1875em}.filepond--action-edit-item-alt{border:none;line-height:inherit;background:transparent;font-family:inherit;color:inherit;outline:none;padding:0;margin:0 0 0 0.25em;pointer-events:all;position:absolute}.filepond--action-edit-item-alt svg{width:1.3125em;height:1.3125em}.filepond--action-edit-item-alt span{font-size:0;opacity:0}.filepond--root[data-style-panel-layout~='circle'] .filepond--action-edit-item{opacity:1 !important;visibility:visible !important}.s-file-upload-wrapper .filepond--file-info-main{-webkit-line-clamp:1;display:-webkit-box;-webkit-box-orient:vertical}";
|
|
7
|
+
|
|
8
|
+
const SallaFileUpload = /*@__PURE__*/ proxyCustomElement(class SallaFileUpload extends HTMLElement {
|
|
9
|
+
/**
|
|
10
|
+
* Lazy load FilePond and all plugins
|
|
11
|
+
* This reduces initial bundle size by ~200-250KB
|
|
12
|
+
*/
|
|
13
|
+
async loadFilePond() {
|
|
14
|
+
if (this.filePondLoaded)
|
|
15
|
+
return;
|
|
16
|
+
try {
|
|
17
|
+
const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
|
|
18
|
+
import('./filepond.js').then(function (n) { return n.f; }),
|
|
19
|
+
import('./filepond-plugin-file-validate-size.js').then(function (n) { return n.f; }),
|
|
20
|
+
import('./filepond-plugin-image-exif-orientation.js').then(function (n) { return n.f; }),
|
|
21
|
+
import('./filepond-plugin-image-preview.js').then(function (n) { return n.f; }),
|
|
22
|
+
import('./filepond-plugin-image-edit.js').then(function (n) { return n.f; }),
|
|
23
|
+
import('./filepond-plugin-file-validate-type.js').then(function (n) { return n.f; }),
|
|
24
|
+
import('./filepond-plugin-file-poster.js').then(function (n) { return n.f; })
|
|
25
|
+
]);
|
|
26
|
+
this.FilePond = FilePondModule;
|
|
27
|
+
// Register plugins
|
|
28
|
+
this.FilePond.registerPlugin(FilePondPluginImagePreview.default, FilePondPluginImageExifOrientation.default, FilePondPluginFileValidateSize.default, FilePondPluginImageEdit.default, FilePondPluginFileValidateType.default, FilePondPluginFilePoster.default);
|
|
29
|
+
this.filePondLoaded = true;
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.error('Failed to load FilePond:', error);
|
|
33
|
+
salla.notify?.error?.('Failed to load file uploader. Please refresh the page.');
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
constructor() {
|
|
38
|
+
super();
|
|
39
|
+
this.__registerHost();
|
|
40
|
+
this.added = createEvent(this, "added", 7);
|
|
41
|
+
this.invalidInput = createEvent(this, "invalidInput", 7);
|
|
42
|
+
this.uploaded = createEvent(this, "uploaded", 7);
|
|
43
|
+
this.removed = createEvent(this, "removed", 7);
|
|
44
|
+
this.filePondLoaded = false;
|
|
45
|
+
this.max_images_count = (count) => salla.lang.get('common.uploader.max_images_count', { count });
|
|
46
|
+
this.max_count_hint = (count) => salla.lang.get('common.uploader.max_count_hint', { count });
|
|
47
|
+
this.uploadedFiles = [];
|
|
48
|
+
this.isListScrollerListenerAdded = false;
|
|
49
|
+
this.showMaxCountHint = false;
|
|
50
|
+
/**
|
|
51
|
+
* Set the component to be profile image uploader with a preview and a circular shape
|
|
52
|
+
*/
|
|
53
|
+
this.profileImage = false;
|
|
54
|
+
/**
|
|
55
|
+
* Allow to pass extra params to be sent with the upload request
|
|
56
|
+
*/
|
|
57
|
+
this.payloadParams = {};
|
|
58
|
+
/**
|
|
59
|
+
* Accepted file types
|
|
60
|
+
*/
|
|
61
|
+
this.accept = "image/png, image/jpeg, image/jpg, image/gif";
|
|
62
|
+
/**
|
|
63
|
+
* The submit request method.
|
|
64
|
+
*/
|
|
65
|
+
this.method = 'POST';
|
|
66
|
+
/**
|
|
67
|
+
* json formData to be injected in the submit request
|
|
68
|
+
*/
|
|
69
|
+
this.formData = "{}";
|
|
70
|
+
/**
|
|
71
|
+
* Enable or disable drag n' drop
|
|
72
|
+
*/
|
|
73
|
+
this.allowDrop = true;
|
|
74
|
+
/**
|
|
75
|
+
* Enable or disable file browser
|
|
76
|
+
*/
|
|
77
|
+
this.allowBrowse = true;
|
|
78
|
+
/**
|
|
79
|
+
* Allow drop to replace a file, only works when allowMultiple is false
|
|
80
|
+
*/
|
|
81
|
+
this.allowReplace = true;
|
|
82
|
+
/**
|
|
83
|
+
* Enable or disable the revert processing button
|
|
84
|
+
*/
|
|
85
|
+
this.allowRevert = true;
|
|
86
|
+
/**
|
|
87
|
+
* When set to false the remove button is hidden and disabled
|
|
88
|
+
*/
|
|
89
|
+
this.allowRemove = true;
|
|
90
|
+
/**
|
|
91
|
+
* Enable or disable preview mode
|
|
92
|
+
*/
|
|
93
|
+
this.allowImagePreview = true;
|
|
94
|
+
/**
|
|
95
|
+
* Fixed image preview height, overrides min and max preview height
|
|
96
|
+
*/
|
|
97
|
+
this.imagePreviewHeight = null;
|
|
98
|
+
/**
|
|
99
|
+
* Fixed image poster height, overrides min and max preview height
|
|
100
|
+
*/
|
|
101
|
+
this.filePosterHeight = null;
|
|
102
|
+
/**
|
|
103
|
+
* The maximum number of files that the pond can handle
|
|
104
|
+
*/
|
|
105
|
+
this.maxFilesCount = 1;
|
|
106
|
+
/**
|
|
107
|
+
* The maxmimum number of files that can be uploaded in parallel
|
|
108
|
+
*/
|
|
109
|
+
this.maxParallelUploads = 3;
|
|
110
|
+
/**
|
|
111
|
+
* Set to 'after' to add files to end of list (when dropped at the top of the list or added using browse or paste),
|
|
112
|
+
* set to 'before' to add files at start of list.
|
|
113
|
+
* Set to a compare function to automatically sort items when added
|
|
114
|
+
*/
|
|
115
|
+
this.itemInsertLocation = 'after';
|
|
116
|
+
/**
|
|
117
|
+
* The interval to use before showing each item being added to the list
|
|
118
|
+
*/
|
|
119
|
+
this.itemInsertInterval = 75;
|
|
120
|
+
/**
|
|
121
|
+
* Require drop on the FilePond element itself to catch the file.
|
|
122
|
+
*/
|
|
123
|
+
this.dropOnElement = true;
|
|
124
|
+
/**
|
|
125
|
+
* Ignored file names when handling dropped directories. Dropping directories is not supported on all browsers.
|
|
126
|
+
*/
|
|
127
|
+
this.ignoredFiles = ['.ds_store', 'thumbs.db', 'desktop.ini'];
|
|
128
|
+
/**
|
|
129
|
+
* The size of a chunk in bytes
|
|
130
|
+
*/
|
|
131
|
+
this.chunkSize = 5000000;
|
|
132
|
+
/**
|
|
133
|
+
* Amount of times, and delayes, between retried uploading of a chunk
|
|
134
|
+
*/
|
|
135
|
+
this.chunkRetryDelays = [500, 1000, 3000];
|
|
136
|
+
/// Labels Props
|
|
137
|
+
/**
|
|
138
|
+
* The decimal separator used to render numbers. By default this is determined automatically.
|
|
139
|
+
*/
|
|
140
|
+
this.labelDecimalSeparator = undefined;
|
|
141
|
+
/**
|
|
142
|
+
* The thousdands separator used to render numbers. By default this is determined automatically.
|
|
143
|
+
*/
|
|
144
|
+
this.labelThousandsSeparator = undefined;
|
|
145
|
+
/// SVG Icons
|
|
146
|
+
/**
|
|
147
|
+
* The icon used for remove actions
|
|
148
|
+
*/
|
|
149
|
+
this.iconRemove = '<svg>...</svg>';
|
|
150
|
+
/**
|
|
151
|
+
* The icon used for process actions
|
|
152
|
+
*/
|
|
153
|
+
this.iconProcess = '<svg>...</svg>';
|
|
154
|
+
/**
|
|
155
|
+
* The icon used for retry actions
|
|
156
|
+
*/
|
|
157
|
+
this.iconRetry = '<svg>...</svg>';
|
|
158
|
+
/**
|
|
159
|
+
* The icon used for undo actions
|
|
160
|
+
*/
|
|
161
|
+
this.iconUndo = '<svg>...</svg>';
|
|
162
|
+
this.openFileBrowser = () => {
|
|
163
|
+
this.filepond.browse();
|
|
164
|
+
};
|
|
165
|
+
//if cartItemIdIsPassed, we need to set the url
|
|
166
|
+
if (!this.url && this.cartItemId) {
|
|
167
|
+
this.url = salla.cart.getUploadImageEndpoint();
|
|
168
|
+
this.instantUpload = true;
|
|
169
|
+
}
|
|
170
|
+
if (!this.url && this.profileImage) {
|
|
171
|
+
this.url = salla.url.api('profile/update');
|
|
172
|
+
this.instantUpload = true;
|
|
173
|
+
this.host.hasAttribute('name') || (this.name = 'avatar');
|
|
174
|
+
}
|
|
175
|
+
if (!this.name) {
|
|
176
|
+
this.name = 'file';
|
|
177
|
+
}
|
|
178
|
+
salla.lang.onLoaded(() => {
|
|
179
|
+
this.host.querySelectorAll('.filepond--drop-label>label').forEach(label => label.innerHTML = this.getLabel());
|
|
180
|
+
if (this.filepond) {
|
|
181
|
+
this.filepond.labelFileTypeNotAllowed = salla.lang.get('common.uploader.invalid_type');
|
|
182
|
+
this.filepond.labelMaxFileSizeExceeded = salla.lang.get('common.uploader.too_large');
|
|
183
|
+
this.filepond.labelFileSizeNotAvailable = salla.lang.get('common.uploader.size_not_available');
|
|
184
|
+
this.filepond.labelFileLoading = salla.lang.get('common.elements.loading');
|
|
185
|
+
this.filepond.labelFileLoadError = salla.lang.get('common.uploader.failed_to_load');
|
|
186
|
+
this.filepond.labelFileProcessingAborted = salla.lang.get('common.uploader.upload_cancelled');
|
|
187
|
+
this.filepond.labelTapToCancel = salla.lang.get("common.elements.cancel");
|
|
188
|
+
this.filepond.labelTapToRetry = salla.lang.get("common.elements.retry");
|
|
189
|
+
this.filepond.labelButtonRemoveItem = salla.lang.get("common.elements.remove");
|
|
190
|
+
this.filepond.labelButtonUndoItemProcessing = salla.lang.get("common.elements.undo");
|
|
191
|
+
this.filepond.labelButtonProcessItem = salla.lang.get("common.uploader.upload");
|
|
192
|
+
this.filepond.labelFileProcessingComplete = salla.lang.get('common.uploader.file_processing_complete'),
|
|
193
|
+
this.filepond.labelTapToUndo = salla.lang.get('common.uploader.tap_to_undo'),
|
|
194
|
+
this.filepond.labelFileProcessing = salla.lang.get('common.uploader.file_processing'),
|
|
195
|
+
this.filepond.labelFileProcessingError = salla.lang.get('common.uploader.file_processing_error');
|
|
196
|
+
}
|
|
197
|
+
const setNestedAsync = (lang, key, value) => {
|
|
198
|
+
return new Promise((resolve) => {
|
|
199
|
+
salla.helpers.setNested(salla.lang.messages[lang], key, value);
|
|
200
|
+
resolve(true);
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
const setTranslations = async () => {
|
|
204
|
+
await setNestedAsync('ar.trans', 'common.uploader.max_images_count', '.أضف :count صور كحد أقصى');
|
|
205
|
+
await setNestedAsync('en.trans', 'common.uploader.max_images_count', 'Add up to :count images maximum.');
|
|
206
|
+
await setNestedAsync('ar.trans', 'common.uploader.max_count_hint', 'يمكنك رفع حتى :count صور');
|
|
207
|
+
await setNestedAsync('en.trans', 'common.uploader.max_count_hint', 'You can upload up to :count images.');
|
|
208
|
+
};
|
|
209
|
+
this.max_count_hint = (count) => salla.lang.get('common.uploader.max_count_hint', { count });
|
|
210
|
+
this.max_images_count = (count) => salla.lang.get('common.uploader.max_images_count', { count });
|
|
211
|
+
setTranslations();
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
addedHandler(error, file) {
|
|
215
|
+
this.added.emit({ error: error, file: file });
|
|
216
|
+
//if the file passed on initiate will not have type
|
|
217
|
+
this.host.querySelector('.filepond--root').classList.remove('s-file-upload-has-error');
|
|
218
|
+
if (error || !file.file.type) {
|
|
219
|
+
this.host.querySelector('.filepond--root').classList.add('s-file-upload-has-error');
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
let container = new DataTransfer;
|
|
223
|
+
let fileInput = this.getFormDataFileInput();
|
|
224
|
+
// @ts-ignore
|
|
225
|
+
container.items.add(file.file);
|
|
226
|
+
fileInput.type = 'file';
|
|
227
|
+
fileInput.files = container.files;
|
|
228
|
+
fileInput.dispatchEvent(new window.Event('change', { bubbles: true }));
|
|
229
|
+
}
|
|
230
|
+
uploadedHandler() {
|
|
231
|
+
let fileInput = this.getFormDataFileInput();
|
|
232
|
+
fileInput.type = 'hidden';
|
|
233
|
+
fileInput.value = this.value;
|
|
234
|
+
this.hiddenInput.value = this.value;
|
|
235
|
+
fileInput.dispatchEvent(new window.Event('change', { bubbles: true }));
|
|
236
|
+
return this.uploaded.emit(this.value);
|
|
237
|
+
}
|
|
238
|
+
removedHandler(deletedFile) {
|
|
239
|
+
let fileInput = this.getFormDataFileInput();
|
|
240
|
+
fileInput.type = 'hidden';
|
|
241
|
+
fileInput.value = '';
|
|
242
|
+
this.host.closest('.s-product-options-option')?.removeAttribute('data-has-value');
|
|
243
|
+
if (salla.url.is_page("cart") && deletedFile.getMetadata('id')) {
|
|
244
|
+
salla.cart.api.deleteImage(deletedFile.getMetadata('id'));
|
|
245
|
+
}
|
|
246
|
+
if (this.height) {
|
|
247
|
+
setTimeout(() => this.host.querySelector('.filepond--root').style.height = this.height, 1000);
|
|
248
|
+
}
|
|
249
|
+
this.hiddenInput.value = '';
|
|
250
|
+
fileInput.dispatchEvent(new window.Event('change', { bubbles: true }));
|
|
251
|
+
let toDelete = this.allowMultiple ? deletedFile.getMetadata('id') : deletedFile;
|
|
252
|
+
return this.removed.emit(toDelete);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Method to set option for filepond
|
|
256
|
+
* */
|
|
257
|
+
async setOption(key, value) {
|
|
258
|
+
this.filepond[key] = value;
|
|
259
|
+
}
|
|
260
|
+
getLabel() {
|
|
261
|
+
if (this.labelIdle) {
|
|
262
|
+
//some times we are passing label before translations is loaded, so here we will make sure that all translations are translated
|
|
263
|
+
return this.labelIdle
|
|
264
|
+
.replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))
|
|
265
|
+
.replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));
|
|
266
|
+
}
|
|
267
|
+
return `${salla.lang.get('common.uploader.drag_and_drop')}<span class="filepond--label-action"> ${salla.lang.get('common.uploader.browse')} </span>`;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
*
|
|
271
|
+
* This method will fire head request to get the file size, it's head request,so it will be too fast.
|
|
272
|
+
*/
|
|
273
|
+
getFileSize(url) {
|
|
274
|
+
let http = new XMLHttpRequest();
|
|
275
|
+
http.open('HEAD', url, false); // false = Synchronous
|
|
276
|
+
http.send(null); // it will stop here until this http request is complete
|
|
277
|
+
return http.status === 200 ? http.getResponseHeader('content-length') : '';
|
|
278
|
+
}
|
|
279
|
+
getFormDataFileInput() {
|
|
280
|
+
return this.host.querySelector('.filepond--data input');
|
|
281
|
+
}
|
|
282
|
+
getFiles() {
|
|
283
|
+
if (!this.value && !this.files) {
|
|
284
|
+
return [];
|
|
285
|
+
}
|
|
286
|
+
try {
|
|
287
|
+
let files = this.files
|
|
288
|
+
? typeof this.files === 'string' ? JSON.parse(this.files) : this.files
|
|
289
|
+
: this.value.split(',').map(file => ({ url: file }));
|
|
290
|
+
if (files.length) {
|
|
291
|
+
this.host.closest('.s-product-options-option')?.setAttribute('data-has-value', 'true');
|
|
292
|
+
}
|
|
293
|
+
return files.map(file => ({
|
|
294
|
+
source: file.id ? `${file.id}` : file.url,
|
|
295
|
+
options: {
|
|
296
|
+
type: 'local',
|
|
297
|
+
file: {
|
|
298
|
+
name: file.url.substring(file.url.lastIndexOf('/') + 1),
|
|
299
|
+
size: this.getFileSize(file.url)
|
|
300
|
+
},
|
|
301
|
+
metadata: { poster: file.url, name: file.url, id: file.id },
|
|
302
|
+
},
|
|
303
|
+
}));
|
|
304
|
+
}
|
|
305
|
+
catch (e) {
|
|
306
|
+
salla.log('failed To get files from: ' + (this.files || this.value));
|
|
307
|
+
}
|
|
308
|
+
return [];
|
|
309
|
+
}
|
|
310
|
+
async componentWillLoad() {
|
|
311
|
+
// Load FilePond before component renders (reduces initial bundle by ~200-250KB)
|
|
312
|
+
await this.loadFilePond();
|
|
313
|
+
if (!this.labelIdle) {
|
|
314
|
+
this.labelIdle = this.host.innerHTML;
|
|
315
|
+
this.host.innerHTML = '';
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
render() {
|
|
319
|
+
return (h(Host, { key: '978e89fe8713e6b3db913ed8fb3c5d09f6caf705', class: {
|
|
320
|
+
"s-file-upload": true,
|
|
321
|
+
"s-file-upload-profile-image": this.profileImage,
|
|
322
|
+
"s-file-upload-multiple": this.allowMultiple,
|
|
323
|
+
} }, h("input", { key: 'acf6197d43b79a80e7a69219afda29271a86d4eb', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', h("input", { key: 'b8624b0fcaba14f14640acce0a28c12feb78701b', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
|
|
324
|
+
}
|
|
325
|
+
componentDidLoad() {
|
|
326
|
+
let files = this.getFiles();
|
|
327
|
+
this.filepond = this.FilePond.create(this.fileUploader, {
|
|
328
|
+
name: this.payloadName || this.name,
|
|
329
|
+
//@ts-ignore
|
|
330
|
+
files: files,
|
|
331
|
+
required: this.required,
|
|
332
|
+
disabled: this.disabled,
|
|
333
|
+
allowDrop: this.allowDrop,
|
|
334
|
+
allowBrowse: this.allowBrowse,
|
|
335
|
+
allowPaste: this.allowPaste,
|
|
336
|
+
allowMultiple: this.allowMultiple, //||files.length,
|
|
337
|
+
allowReplace: this.allowReplace,
|
|
338
|
+
allowRevert: this.allowRevert,
|
|
339
|
+
allowProcess: this.allowProcess,
|
|
340
|
+
allowReorder: this.allowReorder,
|
|
341
|
+
storeAsFile: this.storeAsFile,
|
|
342
|
+
forceRevert: this.forceRevert,
|
|
343
|
+
maxFiles: this.maxFilesCount,
|
|
344
|
+
imagePreviewHeight: this.imagePreviewHeight,
|
|
345
|
+
filePosterHeight: this.filePosterHeight,
|
|
346
|
+
allowImagePreview: this.allowImagePreview,
|
|
347
|
+
maxParallelUploads: this.maxParallelUploads,
|
|
348
|
+
checkValidity: this.checkValidity,
|
|
349
|
+
itemInsertLocation: this.itemInsertLocation,
|
|
350
|
+
itemInsertInterval: this.itemInsertInterval,
|
|
351
|
+
credits: this.credits,
|
|
352
|
+
dropOnPage: this.dropOnPage,
|
|
353
|
+
dropOnElement: this.dropOnElement,
|
|
354
|
+
dropValidation: this.dropValidation,
|
|
355
|
+
ignoredFiles: this.ignoredFiles,
|
|
356
|
+
onaddfile: (error, file) => this.addedHandler(error, file),
|
|
357
|
+
onwarning: (error, _file, _status) => {
|
|
358
|
+
if (error.body === "Max files") {
|
|
359
|
+
salla.notify.error(this.max_images_count(this.maxFilesCount));
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
onprocessfile: (error, file) => {
|
|
363
|
+
if (this.allowMultiple && !error) {
|
|
364
|
+
// Find the uploaded file data using the serverId returned from onload
|
|
365
|
+
const serverId = file.serverId;
|
|
366
|
+
const uploadedFile = this.uploadedFiles.find(f => f.id === serverId);
|
|
367
|
+
if (uploadedFile) {
|
|
368
|
+
// Set metadata on the file
|
|
369
|
+
file.setMetadata('id', uploadedFile.id, true);
|
|
370
|
+
file.setMetadata('url', uploadedFile.url, true);
|
|
371
|
+
this.value = {
|
|
372
|
+
id: uploadedFile.id,
|
|
373
|
+
url: uploadedFile.url
|
|
374
|
+
};
|
|
375
|
+
this.uploadedHandler();
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
onupdatefiles: (fileItems) => {
|
|
380
|
+
const dropLabel = this.host.querySelector('.filepond--drop-label');
|
|
381
|
+
const listScroller = this.host.querySelector('.filepond--list-scroller');
|
|
382
|
+
if (this.allowMultiple) {
|
|
383
|
+
if (fileItems.length > 0) {
|
|
384
|
+
dropLabel.classList.add('s-hidden');
|
|
385
|
+
if (!this.isListScrollerListenerAdded && fileItems.length < this.maxFilesCount) {
|
|
386
|
+
this.showMaxCountHint = true;
|
|
387
|
+
listScroller.addEventListener('click', this.openFileBrowser);
|
|
388
|
+
this.isListScrollerListenerAdded = true;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
dropLabel.classList.remove('s-hidden');
|
|
393
|
+
if (this.isListScrollerListenerAdded) {
|
|
394
|
+
listScroller.removeEventListener('click', this.openFileBrowser);
|
|
395
|
+
this.isListScrollerListenerAdded = false;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
// Check if fileItems length equals maxFilesCount and remove event listener
|
|
399
|
+
if (fileItems.length === this.maxFilesCount && this.isListScrollerListenerAdded) {
|
|
400
|
+
listScroller.removeEventListener('click', this.openFileBrowser);
|
|
401
|
+
this.isListScrollerListenerAdded = false;
|
|
402
|
+
this.showMaxCountHint = false;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
server: {
|
|
407
|
+
url: this.url,
|
|
408
|
+
method: this.method,
|
|
409
|
+
revert: null,
|
|
410
|
+
// @ts-ignore
|
|
411
|
+
process: {
|
|
412
|
+
onload: (response) => {
|
|
413
|
+
let responseData = JSON.parse(response).data;
|
|
414
|
+
if ((this.instantUpload || this.allowMultiple) && Array.isArray(responseData) && responseData.length > 0) {
|
|
415
|
+
const fileId = `${this.host.id}-${Math.floor(100 + Math.random() * 900)}`;
|
|
416
|
+
const fileUrl = responseData[0];
|
|
417
|
+
// Store the upload result to be picked up by onprocessfile
|
|
418
|
+
this.uploadedFiles.push({
|
|
419
|
+
id: fileId,
|
|
420
|
+
url: fileUrl
|
|
421
|
+
});
|
|
422
|
+
// Return the serverId that FilePond will use to identify this file
|
|
423
|
+
// We'll use the fileId as the serverId
|
|
424
|
+
return fileId;
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
this.value = responseData.filePath || responseData.url;
|
|
428
|
+
this.uploadedHandler();
|
|
429
|
+
return this.value;
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
headers: salla.api.getHeaders(),
|
|
433
|
+
onerror: response => {
|
|
434
|
+
try {
|
|
435
|
+
let field = JSON.parse(response).error.fields;
|
|
436
|
+
field = field[this.payloadName || this.name];
|
|
437
|
+
return (field && field[0]) || salla.lang.get('common.errors.error_occurred');
|
|
438
|
+
}
|
|
439
|
+
catch (e) {
|
|
440
|
+
salla.log('FileUpload:: Error', e);
|
|
441
|
+
return salla.lang.get('common.errors.error_occurred');
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
ondata: formData => {
|
|
445
|
+
if (this.allowMultiple) {
|
|
446
|
+
const newFormData = new FormData();
|
|
447
|
+
// ? This line suppose to send all files in one request but its not working properly
|
|
448
|
+
// const filesArray = this.filepond.getFiles().map(file => file.file);
|
|
449
|
+
formData.forEach((value) => {
|
|
450
|
+
newFormData.append(`files[]`, value);
|
|
451
|
+
});
|
|
452
|
+
newFormData.append("type", this.type);
|
|
453
|
+
return newFormData;
|
|
454
|
+
}
|
|
455
|
+
if (this.payloadName && this.payloadName != this.name && !this.allowMultiple) {
|
|
456
|
+
formData.append(this.payloadName, this.filepond.getFile(0).file);
|
|
457
|
+
formData.delete(this.name);
|
|
458
|
+
}
|
|
459
|
+
if (this.payloadParams) {
|
|
460
|
+
for (const [k, v] of Object.entries(this.payloadParams)) {
|
|
461
|
+
formData.append(k, v);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (this.cartItemId) {
|
|
465
|
+
formData.append('cart_item_id', this.cartItemId);
|
|
466
|
+
}
|
|
467
|
+
try {
|
|
468
|
+
Object.entries(JSON.parse(this.formData)).forEach((value) => value[1] && formData.append(value[0], value[1]));
|
|
469
|
+
}
|
|
470
|
+
catch (e) {
|
|
471
|
+
salla.log('Error to inject formData', e);
|
|
472
|
+
}
|
|
473
|
+
return formData;
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
instantUpload: this.instantUpload,
|
|
478
|
+
chunkUploads: this.chunkUploads,
|
|
479
|
+
chunkForce: this.chunkForce,
|
|
480
|
+
chunkSize: this.chunkSize,
|
|
481
|
+
chunkRetryDelays: this.chunkRetryDelays,
|
|
482
|
+
labelDecimalSeparator: this.labelDecimalSeparator,
|
|
483
|
+
labelThousandsSeparator: this.labelThousandsSeparator,
|
|
484
|
+
labelIdle: this.getLabel(),
|
|
485
|
+
acceptedFileTypes: this.accept.replace(/\s+/g, '').split(','),
|
|
486
|
+
labelFileTypeNotAllowed: salla.lang.get('common.uploader.invalid_type'),
|
|
487
|
+
labelFileProcessingComplete: salla.lang.get('common.uploader.file_processing_complete'),
|
|
488
|
+
labelTapToUndo: salla.lang.get('common.uploader.tap_to_undo'),
|
|
489
|
+
labelFileProcessing: salla.lang.get('common.uploader.file_processing'),
|
|
490
|
+
labelFileProcessingError: salla.lang.get('common.uploader.file_processing_error'),
|
|
491
|
+
fileValidateTypeLabelExpectedTypes: '{allButLastType}, {lastType}',
|
|
492
|
+
labelMaxFileSizeExceeded: salla.lang.get('common.uploader.too_large'),
|
|
493
|
+
labelMaxFileSize: '{filesize}',
|
|
494
|
+
maxFileSize: `${salla.config.get('store.settings.upload_size')}KB` || this.maxFileSize,
|
|
495
|
+
beforeRemoveFile: (deletedFile) => new Promise((resolve) => {
|
|
496
|
+
this.removedHandler(deletedFile);
|
|
497
|
+
resolve(true);
|
|
498
|
+
}),
|
|
499
|
+
});
|
|
500
|
+
this.hiddenInput.addEventListener('invalid', e => {
|
|
501
|
+
this.invalidInput.emit(e);
|
|
502
|
+
});
|
|
503
|
+
this.hiddenInput.addEventListener('change', () => {
|
|
504
|
+
this.hiddenInput.setCustomValidity('');
|
|
505
|
+
this.hiddenInput.reportValidity();
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
get host() { return this; }
|
|
509
|
+
static get style() { return sallaFileUploadCss; }
|
|
510
|
+
}, [0, "salla-file-upload", {
|
|
511
|
+
"value": [1544],
|
|
512
|
+
"files": [513],
|
|
513
|
+
"height": [513],
|
|
514
|
+
"cartItemId": [1, "cart-item-id"],
|
|
515
|
+
"profileImage": [516, "profile-image"],
|
|
516
|
+
"name": [1537],
|
|
517
|
+
"payloadName": [1, "payload-name"],
|
|
518
|
+
"payloadParams": [16, "payload-params"],
|
|
519
|
+
"type": [1],
|
|
520
|
+
"accept": [1537],
|
|
521
|
+
"fileId": [2, "file-id"],
|
|
522
|
+
"url": [1025],
|
|
523
|
+
"method": [1],
|
|
524
|
+
"formData": [1, "form-data"],
|
|
525
|
+
"required": [4],
|
|
526
|
+
"maxFileSize": [1, "max-file-size"],
|
|
527
|
+
"disabled": [4],
|
|
528
|
+
"allowDrop": [4, "allow-drop"],
|
|
529
|
+
"allowBrowse": [4, "allow-browse"],
|
|
530
|
+
"allowPaste": [4, "allow-paste"],
|
|
531
|
+
"allowMultiple": [4, "allow-multiple"],
|
|
532
|
+
"allowReplace": [4, "allow-replace"],
|
|
533
|
+
"allowRevert": [4, "allow-revert"],
|
|
534
|
+
"allowRemove": [4, "allow-remove"],
|
|
535
|
+
"allowProcess": [4, "allow-process"],
|
|
536
|
+
"allowReorder": [4, "allow-reorder"],
|
|
537
|
+
"allowImagePreview": [4, "allow-image-preview"],
|
|
538
|
+
"imagePreviewHeight": [2, "image-preview-height"],
|
|
539
|
+
"filePosterHeight": [2, "file-poster-height"],
|
|
540
|
+
"storeAsFile": [4, "store-as-file"],
|
|
541
|
+
"forceRevert": [4, "force-revert"],
|
|
542
|
+
"maxFilesCount": [2, "max-files-count"],
|
|
543
|
+
"maxParallelUploads": [2, "max-parallel-uploads"],
|
|
544
|
+
"checkValidity": [4, "check-validity"],
|
|
545
|
+
"itemInsertLocation": [1, "item-insert-location"],
|
|
546
|
+
"itemInsertInterval": [2, "item-insert-interval"],
|
|
547
|
+
"credits": [4],
|
|
548
|
+
"dropOnPage": [4, "drop-on-page"],
|
|
549
|
+
"dropOnElement": [4, "drop-on-element"],
|
|
550
|
+
"dropValidation": [4, "drop-validation"],
|
|
551
|
+
"ignoredFiles": [16, "ignored-files"],
|
|
552
|
+
"instantUpload": [1028, "instant-upload"],
|
|
553
|
+
"chunkUploads": [4, "chunk-uploads"],
|
|
554
|
+
"chunkForce": [4, "chunk-force"],
|
|
555
|
+
"chunkSize": [2, "chunk-size"],
|
|
556
|
+
"chunkRetryDelays": [16, "chunk-retry-delays"],
|
|
557
|
+
"labelDecimalSeparator": [1, "label-decimal-separator"],
|
|
558
|
+
"labelThousandsSeparator": [1, "label-thousands-separator"],
|
|
559
|
+
"labelIdle": [1025, "label-idle"],
|
|
560
|
+
"iconRemove": [1, "icon-remove"],
|
|
561
|
+
"iconProcess": [1, "icon-process"],
|
|
562
|
+
"iconRetry": [1, "icon-retry"],
|
|
563
|
+
"iconUndo": [1, "icon-undo"],
|
|
564
|
+
"max_images_count": [32],
|
|
565
|
+
"max_count_hint": [32],
|
|
566
|
+
"uploadedFiles": [32],
|
|
567
|
+
"isListScrollerListenerAdded": [32],
|
|
568
|
+
"showMaxCountHint": [32],
|
|
569
|
+
"setOption": [64]
|
|
570
|
+
}]);
|
|
571
|
+
function defineCustomElement() {
|
|
572
|
+
if (typeof customElements === "undefined") {
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
const components = ["salla-file-upload"];
|
|
576
|
+
components.forEach(tagName => { switch (tagName) {
|
|
577
|
+
case "salla-file-upload":
|
|
578
|
+
if (!customElements.get(tagName)) {
|
|
579
|
+
customElements.define(tagName, SallaFileUpload);
|
|
580
|
+
}
|
|
581
|
+
break;
|
|
582
|
+
} });
|
|
583
|
+
}
|
|
584
|
+
defineCustomElement();
|
|
585
|
+
|
|
586
|
+
export { SallaFileUpload as S, defineCustomElement as d };
|