@salla.sa/twilight-components 2.14.418 → 2.14.420
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-C1_8U7ht.js → filepond-CTL5dLDP.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-C2QZkcu0.js → filepond-plugin-file-poster-B-C_VVcX.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CbVRd24w.js → filepond-plugin-file-validate-size-CzKg3e_q.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-63RP4vcL.js → filepond-plugin-file-validate-type-vnM88Tws.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CjWMhhkZ.js → filepond-plugin-image-edit-DI2Woa_n.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CJxStqYG.js → filepond-plugin-image-exif-orientation-DfOieqsR.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview--RTa59Q8.js → filepond-plugin-image-preview-BnoA6sXp.js} +1 -1
- package/dist/cjs/{functions-T48FHZw8.js → functions-DlISHrKx.js} +1 -1
- package/dist/cjs/helpers-BJ2rnhxz.js +197 -0
- package/dist/cjs/{index-CQ4zjhzH.js → index-tOrYNNsf.js} +1 -1
- package/dist/cjs/{index-DO_QXaSt.js → index-vstkdqRz.js} +10 -6
- package/dist/cjs/interfaces-Bh7W0bEU.js +33 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +36 -58
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +12 -12
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +4 -4
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +8 -6
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +14 -3
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +28 -29
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +41 -0
- package/dist/cjs/salla-order-edit.cjs.entry.js +339 -40
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +3 -3
- package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-card_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +38 -15
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +15 -8
- package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
- package/dist/cjs/salla-search.cjs.entry.js +6 -6
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/{tracked-promise-BnNAgCN_.js → tracked-promise-BJe1J-1V.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-wbE79zwn.js → vanilla-picker-nnRs4Y1U.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +24 -2
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-panel.js +5 -3
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +12 -5
- package/dist/collection/components/salla-order-edit/helpers.js +181 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.css +3 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +42 -30
- package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.css +4 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +93 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit.css +3 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit.js +353 -39
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-options/salla-product-options.js +28 -0
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-products-list/salla-products-list.js +54 -14
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +5 -5
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-loyalty-panel.js +5 -3
- package/dist/components/salla-loyalty.js +16 -3
- package/dist/components/salla-order-edit-item2.js +207 -30
- package/dist/components/salla-order-edit-product-card.d.ts +11 -0
- package/dist/components/salla-order-edit-product-card.js +59 -0
- package/dist/components/salla-order-edit.js +378 -65
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-options2.js +8 -1
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-products-list2.js +39 -15
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +1 -1
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-reward-details2.js +12 -5
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +5 -5
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/esm/{filepond-BaqNYv3C.js → filepond-DcrhDD5e.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-nENZqIRv.js → filepond-plugin-file-poster-meDD1pU1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DGOq4RG8.js → filepond-plugin-file-validate-size-Ta6h96xm.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DwM-3UO7.js → filepond-plugin-file-validate-type-PVDX_x_z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BCqDiFWK.js → filepond-plugin-image-edit-BR1HO3-K.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DiuxhjrQ.js → filepond-plugin-image-exif-orientation-CEWqrOc9.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DbFvPPQQ.js → filepond-plugin-image-preview-6ACW1Nfe.js} +1 -1
- package/dist/esm/{functions-JPNAXx4d.js → functions-DqpTrGHa.js} +1 -1
- package/dist/esm/helpers-DR_vlSvU.js +184 -0
- package/dist/esm/{index-DElBWCVR.js → index-COvJOSNr.js} +1 -1
- package/dist/esm/{index-BwsreBbG.js → index-Cb4NFvMH.js} +10 -6
- package/dist/esm/interfaces-CoQJOPRz.js +33 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +10 -32
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +12 -12
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +4 -4
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +8 -6
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +14 -3
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +28 -29
- package/dist/esm/salla-order-edit-product-card.entry.js +39 -0
- package/dist/esm/salla-order-edit.entry.js +339 -40
- package/dist/esm/salla-order-summary.entry.js +2 -2
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +3 -3
- package/dist/esm/salla-placeholder.entry.js +2 -2
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-product-card_2.entry.js +6 -6
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +38 -15
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-reward-action_4.entry.js +15 -8
- package/dist/esm/salla-scopes.entry.js +2 -2
- package/dist/esm/salla-search.entry.js +6 -6
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/{tracked-promise-BD-FZk2P.js → tracked-promise-Dl5Y2VO1.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CqoFxJJE.js → vanilla-picker-CuBrX87l.js} +1 -1
- package/dist/twilight/p-03c91b77.entry.js +4 -0
- package/dist/twilight/{p-af84c7b8.entry.js → p-0bb36191.entry.js} +1 -1
- package/dist/twilight/{p-a3a0bafa.entry.js → p-0c0df6f7.entry.js} +1 -1
- package/dist/twilight/p-142ed3d7.entry.js +4 -0
- package/dist/twilight/{p-CbukOCNI.js → p-14uV0Dqq.js} +1 -1
- package/dist/twilight/{p-46088f51.entry.js → p-15c3ec6b.entry.js} +1 -1
- package/dist/twilight/{p-7d3722ad.entry.js → p-15f015b1.entry.js} +1 -1
- package/dist/twilight/{p-ce588635.entry.js → p-213cee5f.entry.js} +1 -1
- package/dist/twilight/{p-c5e18341.entry.js → p-2726ea01.entry.js} +1 -1
- package/dist/twilight/{p-57451f00.entry.js → p-28208f79.entry.js} +1 -1
- package/dist/twilight/{p-b6dce61a.entry.js → p-293fa7ae.entry.js} +1 -1
- package/dist/twilight/{p-993bdcbe.entry.js → p-29f8baaa.entry.js} +1 -1
- package/dist/twilight/{p-60878c2e.entry.js → p-324dc99a.entry.js} +1 -1
- package/dist/twilight/p-3383da76.entry.js +4 -0
- package/dist/twilight/{p-d9c4d2ed.entry.js → p-38ae0da1.entry.js} +1 -1
- package/dist/twilight/{p-0a786447.entry.js → p-3bd864fe.entry.js} +1 -1
- package/dist/twilight/p-3e6f7773.entry.js +4 -0
- package/dist/twilight/p-408ed55f.entry.js +4 -0
- package/dist/twilight/{p-695e3211.entry.js → p-40a41577.entry.js} +1 -1
- package/dist/twilight/{p-aaff5603.entry.js → p-4105a9cd.entry.js} +1 -1
- package/dist/twilight/{p-91d74168.entry.js → p-45f138dd.entry.js} +1 -1
- package/dist/twilight/{p-0654ccca.entry.js → p-4a788634.entry.js} +1 -1
- package/dist/twilight/{p-ad762138.entry.js → p-4c3d17a1.entry.js} +1 -1
- package/dist/twilight/{p-4c57de7b.entry.js → p-52f5ccfe.entry.js} +1 -1
- package/dist/twilight/p-59a083e4.entry.js +4 -0
- package/dist/twilight/{p-1c1ac203.entry.js → p-5b7970ef.entry.js} +1 -1
- package/dist/twilight/{p-ab5e0aef.entry.js → p-5e62a40f.entry.js} +1 -1
- package/dist/twilight/{p-b9c9c487.entry.js → p-5fbf4640.entry.js} +1 -1
- package/dist/twilight/{p-9c73e42a.entry.js → p-6135ad16.entry.js} +1 -1
- package/dist/twilight/{p-2f833767.entry.js → p-628a8e24.entry.js} +1 -1
- package/dist/twilight/{p-167f5262.entry.js → p-65c18d39.entry.js} +1 -1
- package/dist/twilight/{p-ff90dbf0.entry.js → p-686eecd6.entry.js} +1 -1
- package/dist/twilight/{p-fec6b08b.entry.js → p-68f21f26.entry.js} +1 -1
- package/dist/twilight/{p-3f50a52d.entry.js → p-691c3a17.entry.js} +1 -1
- package/dist/twilight/{p-9134d94d.entry.js → p-6cb4a60b.entry.js} +1 -1
- package/dist/twilight/{p-44db7163.entry.js → p-6f2edfae.entry.js} +1 -1
- package/dist/twilight/{p-edaba475.entry.js → p-6fb7d4f8.entry.js} +1 -1
- package/dist/twilight/{p-dcc65eb2.entry.js → p-72e169bd.entry.js} +1 -1
- package/dist/twilight/{p-681953ef.entry.js → p-73ba81cc.entry.js} +1 -1
- package/dist/twilight/{p-f88806d7.entry.js → p-7444a1ed.entry.js} +1 -1
- package/dist/twilight/{p-10884e6e.entry.js → p-752f162a.entry.js} +1 -1
- package/dist/twilight/{p-b737dbcb.entry.js → p-772b766c.entry.js} +1 -1
- package/dist/twilight/{p-03c39b2d.entry.js → p-774461b2.entry.js} +1 -1
- package/dist/twilight/p-7cba634a.entry.js +4 -0
- package/dist/twilight/p-7d37007a.entry.js +4 -0
- package/dist/twilight/{p-2bd83486.entry.js → p-7e47c403.entry.js} +1 -1
- package/dist/twilight/{p-ac008da7.entry.js → p-7ec0ac91.entry.js} +1 -1
- package/dist/twilight/{p-57e0b11b.entry.js → p-825cc1f7.entry.js} +1 -1
- package/dist/twilight/{p-f73c7b43.entry.js → p-85a15cc1.entry.js} +1 -1
- package/dist/twilight/p-8e96221d.entry.js +4 -0
- package/dist/twilight/{p-5ac81ffe.entry.js → p-95f3620c.entry.js} +1 -1
- package/dist/twilight/{p-29fc145b.entry.js → p-95ff1eb1.entry.js} +1 -1
- package/dist/twilight/{p-cd6fc43c.entry.js → p-96343e93.entry.js} +1 -1
- package/dist/twilight/{p-a00015ec.entry.js → p-96b64fd6.entry.js} +1 -1
- package/dist/twilight/{p-580441f5.entry.js → p-9a6dfcde.entry.js} +1 -1
- package/dist/twilight/{p-f653f2bb.entry.js → p-9b865b2c.entry.js} +1 -1
- package/dist/twilight/{p-5b371b1f.entry.js → p-9ba89557.entry.js} +1 -1
- package/dist/twilight/{p-Dw7mGaHj.js → p-B9znPMU0.js} +1 -1
- package/dist/twilight/{p-Cw0Ky-u0.js → p-BCTUg3S2.js} +1 -1
- package/dist/twilight/{p-LWKLIOwS.js → p-BII4XUuF.js} +1 -1
- package/dist/twilight/{p-GgHo6Cr_.js → p-BIai7zYt.js} +1 -1
- package/dist/twilight/p-C8xwacGT.js +4 -0
- package/dist/twilight/{p-DPgASjJ8.js → p-CBJQc5Lg.js} +1 -1
- package/dist/twilight/{p-BwsreBbG.js → p-Cb4NFvMH.js} +1 -1
- package/dist/twilight/{p-BuNOvMeU.js → p-Ch9nMk63.js} +1 -1
- package/dist/twilight/p-CoQJOPRz.js +4 -0
- package/dist/twilight/{p-CEuTw3-D.js → p-DQjeyM6u.js} +1 -1
- package/dist/twilight/{p-DlGhggDp.js → p-DXTkDRjS.js} +1 -1
- package/dist/twilight/{p-f-qXMnue.js → p-DvkL8Ozv.js} +1 -1
- package/dist/twilight/{p-4807586a.entry.js → p-acf5c683.entry.js} +1 -1
- package/dist/twilight/{p-9d8e4e7c.entry.js → p-aec7b53d.entry.js} +1 -1
- package/dist/twilight/{p-e5325563.entry.js → p-b495fd3a.entry.js} +1 -1
- package/dist/twilight/{p-d739ae41.entry.js → p-b5b0d57a.entry.js} +1 -1
- package/dist/twilight/{p-d0cf9b68.entry.js → p-b8d87ece.entry.js} +1 -1
- package/dist/twilight/{p-af1474dd.entry.js → p-bc8070a0.entry.js} +1 -1
- package/dist/twilight/{p-19e82de2.entry.js → p-befbbd96.entry.js} +1 -1
- package/dist/twilight/{p-b9062150.entry.js → p-c4c7efc7.entry.js} +1 -1
- package/dist/twilight/{p-7d492d3c.entry.js → p-c4f7d697.entry.js} +1 -1
- package/dist/twilight/{p-b6ac7a22.entry.js → p-cb70fe7f.entry.js} +1 -1
- package/dist/twilight/{p-0bf11f89.entry.js → p-d4b7ef45.entry.js} +1 -1
- package/dist/twilight/{p-fbe07d2d.entry.js → p-d4d61e9d.entry.js} +1 -1
- package/dist/twilight/{p-59657a19.entry.js → p-d6cfb7cf.entry.js} +1 -1
- package/dist/twilight/p-dfad4e49.entry.js +4 -0
- package/dist/twilight/{p-4edf67be.entry.js → p-e30f5be9.entry.js} +1 -1
- package/dist/twilight/{p-d469525b.entry.js → p-e64af075.entry.js} +1 -1
- package/dist/twilight/{p-c1d4db6f.entry.js → p-e7fd1dab.entry.js} +1 -1
- package/dist/twilight/{p-ceb9458e.entry.js → p-e85f1f4a.entry.js} +1 -1
- package/dist/twilight/{p-201926a3.entry.js → p-e9251839.entry.js} +1 -1
- package/dist/twilight/{p-1c3e0dbc.entry.js → p-e94f7e62.entry.js} +1 -1
- package/dist/twilight/p-ebc19788.entry.js +4 -0
- package/dist/twilight/{p-b4fd50ef.entry.js → p-f6bc9645.entry.js} +1 -1
- package/dist/twilight/p-f6da3fad.entry.js +4 -0
- package/dist/twilight/{p-a96ec635.entry.js → p-fbfa12cf.entry.js} +1 -1
- package/dist/twilight/{p-069485ec.entry.js → p-fca860eb.entry.js} +1 -1
- package/dist/twilight/{p-61215f22.entry.js → p-fd4eec62.entry.js} +1 -1
- package/dist/twilight/{p-CTyl0UJE.js → p-pyjmoRFm.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +3 -0
- package/dist/types/components/salla-order-edit/helpers.d.ts +25 -0
- package/dist/types/components/salla-order-edit/interfaces.d.ts +22 -25
- package/dist/types/components/salla-order-edit/salla-order-edit-item.d.ts +7 -5
- package/dist/types/components/salla-order-edit/salla-order-edit-product-card.d.ts +11 -0
- package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +56 -4
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +4 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +5 -0
- package/dist/types/components.d.ts +51 -4
- package/package.json +5 -5
- package/dist/twilight/p-25104b13.entry.js +0 -4
- package/dist/twilight/p-36048354.entry.js +0 -4
- package/dist/twilight/p-4110e600.entry.js +0 -4
- package/dist/twilight/p-60d875cc.entry.js +0 -4
- package/dist/twilight/p-7a33e83b.entry.js +0 -4
- package/dist/twilight/p-86cfa253.entry.js +0 -4
- package/dist/twilight/p-c0b690b2.entry.js +0 -4
- package/dist/twilight/p-c968dab0.entry.js +0 -4
- package/dist/twilight/p-e07f938a.entry.js +0 -4
- package/dist/twilight/p-f2815da9.entry.js +0 -4
- package/dist/twilight/p-f7b21078.entry.js +0 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-vstkdqRz.js');
|
|
7
7
|
|
|
8
8
|
function nearestLowerMultiple(number, multipleOf = window.matchMedia('(min-width: 768px)').matches ? 3 : 2) {
|
|
9
9
|
return number < multipleOf ? number : number - (number % multipleOf);
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var interfaces = require('./interfaces-Bh7W0bEU.js');
|
|
7
|
+
|
|
8
|
+
let addedOrderItemCounter = 0;
|
|
9
|
+
function generateAddedOrderItemId(productId) {
|
|
10
|
+
const cryptoRef = (typeof globalThis !== 'undefined' ? globalThis.crypto : undefined);
|
|
11
|
+
if (cryptoRef && typeof cryptoRef.randomUUID === 'function') {
|
|
12
|
+
return `new-${productId}-${cryptoRef.randomUUID()}`;
|
|
13
|
+
}
|
|
14
|
+
addedOrderItemCounter += 1;
|
|
15
|
+
return `new-${productId}-${Date.now()}-${addedOrderItemCounter}`;
|
|
16
|
+
}
|
|
17
|
+
function cloneOrderEditProduct(product) {
|
|
18
|
+
if (product == null) {
|
|
19
|
+
return product;
|
|
20
|
+
}
|
|
21
|
+
return typeof structuredClone === 'function'
|
|
22
|
+
? structuredClone(product)
|
|
23
|
+
: JSON.parse(JSON.stringify(product));
|
|
24
|
+
}
|
|
25
|
+
function buildSavePayload(payload) {
|
|
26
|
+
return {
|
|
27
|
+
items: {
|
|
28
|
+
update: payload.items.update,
|
|
29
|
+
remove: payload.items.remove,
|
|
30
|
+
add: payload.items.add.map(({ itemId, ...addItem }) => addItem),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function createAddedOrderItem(product, quantity, optionDefinitions, selectedOptions = {}) {
|
|
35
|
+
const productData = cloneOrderEditProduct(product);
|
|
36
|
+
return {
|
|
37
|
+
id: generateAddedOrderItemId(product.id),
|
|
38
|
+
quantity,
|
|
39
|
+
isNew: true,
|
|
40
|
+
selectedOptions,
|
|
41
|
+
product: {
|
|
42
|
+
...productData,
|
|
43
|
+
options: cloneOrderEditProduct(optionDefinitions),
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function normalizeOrderEditOptionValue(value) {
|
|
48
|
+
if (typeof File !== 'undefined' && value instanceof File) {
|
|
49
|
+
return value.name;
|
|
50
|
+
}
|
|
51
|
+
return String(value);
|
|
52
|
+
}
|
|
53
|
+
function normalizeSelectedOptions(selectedOptions = {}) {
|
|
54
|
+
return JSON.stringify(Object.entries(selectedOptions)
|
|
55
|
+
.filter(([, value]) => value != null && normalizeOrderEditOptionValue(value).length > 0)
|
|
56
|
+
.map(([optionId, value]) => [String(optionId), normalizeOrderEditOptionValue(value)])
|
|
57
|
+
.sort(([leftId], [rightId]) => leftId.localeCompare(rightId)));
|
|
58
|
+
}
|
|
59
|
+
function hasSelectedOptions(selectedOptions) {
|
|
60
|
+
return Boolean(selectedOptions &&
|
|
61
|
+
Object.values(selectedOptions).some(value => value != null && normalizeOrderEditOptionValue(value).length > 0));
|
|
62
|
+
}
|
|
63
|
+
const detailIdOptionTypes = new Set([
|
|
64
|
+
interfaces.DisplayType.COLOR,
|
|
65
|
+
interfaces.DisplayType.COUNTRY,
|
|
66
|
+
interfaces.DisplayType.DIGITAL_CARD_VALUE,
|
|
67
|
+
interfaces.DisplayType.MULTIPLE_OPTIONS,
|
|
68
|
+
interfaces.DisplayType.RADIO,
|
|
69
|
+
interfaces.DisplayType.SINGLE_OPTION,
|
|
70
|
+
interfaces.DisplayType.THUMBNAIL,
|
|
71
|
+
]);
|
|
72
|
+
function getProductOptionSelectedOptions(options = []) {
|
|
73
|
+
return options.reduce((acc, option) => {
|
|
74
|
+
if (option?.id == null) {
|
|
75
|
+
return acc;
|
|
76
|
+
}
|
|
77
|
+
const selectedDetails = option.details?.filter(detail => detail?.is_selected) || [];
|
|
78
|
+
const selectedDetail = selectedDetails[selectedDetails.length - 1];
|
|
79
|
+
const value = selectedDetail?.id ?? option.value;
|
|
80
|
+
if (value == null || String(value).length === 0) {
|
|
81
|
+
return acc;
|
|
82
|
+
}
|
|
83
|
+
acc[String(option.id)] = String(value);
|
|
84
|
+
return acc;
|
|
85
|
+
}, {});
|
|
86
|
+
}
|
|
87
|
+
function getOrderDetailSelectedOptionValue(item, optionId, value) {
|
|
88
|
+
const productOption = item?.product?.options?.find(option => String(option.id) === String(optionId));
|
|
89
|
+
const normalizedValue = String(value);
|
|
90
|
+
if (!productOption?.details?.length || !detailIdOptionTypes.has(productOption.type)) {
|
|
91
|
+
return normalizedValue;
|
|
92
|
+
}
|
|
93
|
+
const selectedDetail = productOption.details.find(detail => [
|
|
94
|
+
detail.id,
|
|
95
|
+
detail.name,
|
|
96
|
+
detail.option_value,
|
|
97
|
+
detail.color,
|
|
98
|
+
detail.image,
|
|
99
|
+
detail.code,
|
|
100
|
+
detail.display_value,
|
|
101
|
+
].some(detailValue => detailValue != null && String(detailValue) === normalizedValue));
|
|
102
|
+
return selectedDetail ? String(selectedDetail.id) : normalizedValue;
|
|
103
|
+
}
|
|
104
|
+
function getOrderDetailsSelectedOptions(item) {
|
|
105
|
+
return (item?.options || []).reduce((acc, option) => {
|
|
106
|
+
if (option?.id == null) {
|
|
107
|
+
return acc;
|
|
108
|
+
}
|
|
109
|
+
const value = option.value ?? option.display_value;
|
|
110
|
+
if (value == null || String(value).length === 0) {
|
|
111
|
+
return acc;
|
|
112
|
+
}
|
|
113
|
+
acc[String(option.id)] = getOrderDetailSelectedOptionValue(item, option.id, value);
|
|
114
|
+
return acc;
|
|
115
|
+
}, {});
|
|
116
|
+
}
|
|
117
|
+
function getOrderItemSelectedOptions(item) {
|
|
118
|
+
if (hasSelectedOptions(item?.selectedOptions)) {
|
|
119
|
+
return item.selectedOptions;
|
|
120
|
+
}
|
|
121
|
+
const productSelectedOptions = getProductOptionSelectedOptions(item?.product?.options);
|
|
122
|
+
if (hasSelectedOptions(productSelectedOptions)) {
|
|
123
|
+
return productSelectedOptions;
|
|
124
|
+
}
|
|
125
|
+
return getOrderDetailsSelectedOptions(item);
|
|
126
|
+
}
|
|
127
|
+
function findMergeableItem(items = [], productId, selectedOptions = {}) {
|
|
128
|
+
const targetSelectedOptions = normalizeSelectedOptions(selectedOptions);
|
|
129
|
+
return items.find(item => String(item.product?.id) === String(productId) &&
|
|
130
|
+
normalizeSelectedOptions(getOrderItemSelectedOptions(item)) === targetSelectedOptions);
|
|
131
|
+
}
|
|
132
|
+
function getOrderEditProductMaxQuantity(product) {
|
|
133
|
+
const rawQuantity = product?.max_quantity ?? product?.max_quantity_per_order;
|
|
134
|
+
const parsedQuantity = Number(rawQuantity);
|
|
135
|
+
return Number.isFinite(parsedQuantity) && parsedQuantity > 0 ? parsedQuantity : undefined;
|
|
136
|
+
}
|
|
137
|
+
function clampOrderEditQuantity(quantity, maxQuantity) {
|
|
138
|
+
if (!Number.isFinite(quantity) || quantity < 1) {
|
|
139
|
+
return 1;
|
|
140
|
+
}
|
|
141
|
+
if (maxQuantity && quantity > maxQuantity) {
|
|
142
|
+
return maxQuantity;
|
|
143
|
+
}
|
|
144
|
+
return quantity;
|
|
145
|
+
}
|
|
146
|
+
function patchOrderItem(item, quantity, optionDefinitions, selectedOptions) {
|
|
147
|
+
return {
|
|
148
|
+
...item,
|
|
149
|
+
quantity,
|
|
150
|
+
selectedOptions: selectedOptions ?? getOrderItemSelectedOptions(item),
|
|
151
|
+
product: item.product
|
|
152
|
+
? {
|
|
153
|
+
...item.product,
|
|
154
|
+
options: optionDefinitions ?? item.product.options,
|
|
155
|
+
}
|
|
156
|
+
: item.product,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function updateOrderItems(items = [], itemId, quantity, optionDefinitions, selectedOptions) {
|
|
160
|
+
return items.map(item => item.id === itemId ? patchOrderItem(item, quantity, optionDefinitions, selectedOptions) : item);
|
|
161
|
+
}
|
|
162
|
+
function removeOrderItems(items = [], itemId) {
|
|
163
|
+
return items.filter(item => item.id !== itemId);
|
|
164
|
+
}
|
|
165
|
+
function mergePayloadItems(items, patch) {
|
|
166
|
+
return {
|
|
167
|
+
...items,
|
|
168
|
+
...patch,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function upsertPayloadUpdateList(updateList = [], itemId, quantity, options = {}) {
|
|
172
|
+
const nextUpdateList = updateList.filter(item => item.id !== itemId);
|
|
173
|
+
nextUpdateList.push({ id: itemId, quantity, options });
|
|
174
|
+
return nextUpdateList;
|
|
175
|
+
}
|
|
176
|
+
function updateAddedPayloadList(addList = [], itemId, quantity, options) {
|
|
177
|
+
return addList.map(item => item.itemId === itemId
|
|
178
|
+
? {
|
|
179
|
+
...item,
|
|
180
|
+
quantity,
|
|
181
|
+
options: options ?? item.options,
|
|
182
|
+
}
|
|
183
|
+
: item);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
exports.buildSavePayload = buildSavePayload;
|
|
187
|
+
exports.clampOrderEditQuantity = clampOrderEditQuantity;
|
|
188
|
+
exports.cloneOrderEditProduct = cloneOrderEditProduct;
|
|
189
|
+
exports.createAddedOrderItem = createAddedOrderItem;
|
|
190
|
+
exports.findMergeableItem = findMergeableItem;
|
|
191
|
+
exports.getOrderEditProductMaxQuantity = getOrderEditProductMaxQuantity;
|
|
192
|
+
exports.getOrderItemSelectedOptions = getOrderItemSelectedOptions;
|
|
193
|
+
exports.mergePayloadItems = mergePayloadItems;
|
|
194
|
+
exports.removeOrderItems = removeOrderItems;
|
|
195
|
+
exports.updateAddedPayloadList = updateAddedPayloadList;
|
|
196
|
+
exports.updateOrderItems = updateOrderItems;
|
|
197
|
+
exports.upsertPayloadUpdateList = upsertPayloadUpdateList;
|