@salla.sa/twilight-components 2.14.388 → 2.14.390
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-JwtIy_PZ.js → filepond-DFct_qpx.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-HbVPHajC.js → filepond-plugin-file-poster-B_Lr4Ulx.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BfnCLQbe.js → filepond-plugin-file-validate-size-BqkoO_hr.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-ZlRC1VfY.js → filepond-plugin-file-validate-type-DyTH8eH0.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DiQE1wz9.js → filepond-plugin-image-edit-Cxg-WjCl.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DIwNNDxM.js → filepond-plugin-image-exif-orientation-BSVkpMNu.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C51b46QP.js → filepond-plugin-image-preview-DNcmQwuK.js} +1 -1
- package/dist/cjs/{index-DO-q5keQ.js → index-B8vh41va.js} +27 -11
- package/dist/cjs/{index-ByBROVOr.js → index-DnQaQgSB.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +63 -0
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-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 +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +196 -0
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +91 -16
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/{salla-accordion-body_3.cjs.entry.js → salla-map.cjs.entry.js} +1 -57
- 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 +95 -0
- package/dist/cjs/salla-order-edit.cjs.entry.js +181 -0
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/{salla-count-down_2.cjs.entry.js → salla-product-card.cjs.entry.js} +1 -160
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DiJq-dd5.js → vanilla-picker-BZ48aiBi.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/salla-count-down/salla-count-down.css +4 -0
- package/dist/collection/components/salla-count-down/salla-count-down.js +122 -13
- package/dist/collection/components/salla-gifting/salla-gifting.js +96 -15
- package/dist/collection/components/salla-order-edit/interfaces.js +1 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.css +0 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +185 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit.css +0 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit.js +256 -0
- package/dist/components/index.js +3 -3
- package/dist/components/salla-count-down2.js +49 -13
- package/dist/components/salla-gifting.js +96 -15
- package/dist/components/salla-order-edit-item.d.ts +11 -0
- package/dist/components/salla-order-edit-item.js +9 -0
- package/dist/components/salla-order-edit-item2.js +184 -0
- package/dist/components/salla-order-edit.d.ts +11 -0
- package/dist/components/salla-order-edit.js +291 -0
- package/dist/components/salla-quantity-input.js +1 -125
- package/dist/components/salla-quantity-input2.js +130 -0
- package/dist/esm/{filepond-CtRmlCu3.js → filepond-C9FlNeRD.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CMkOcEkV.js → filepond-plugin-file-poster-BfX4exY0.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DzG8gDvA.js → filepond-plugin-file-validate-size-B5-cSfmI.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DSshuV-e.js → filepond-plugin-file-validate-type-DKvNhI35.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-soyMBqQc.js → filepond-plugin-image-edit-DV1-ZICm.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-Bt8OVYG8.js → filepond-plugin-image-exif-orientation-idrSYwAk.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-N0oEw9xZ.js → filepond-plugin-image-preview-os8BCUOs.js} +1 -1
- package/dist/esm/{index-CvIpy7Cj.js → index-BcMtCVX0.js} +27 -11
- package/dist/esm/{index-Cw-jhhOv.js → index-DQCZHaDc.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +60 -0
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_4.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-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 +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +194 -0
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +91 -16
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/{salla-accordion-body_3.entry.js → salla-map.entry.js} +2 -56
- 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 +93 -0
- package/dist/esm/salla-order-edit.entry.js +179 -0
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/{salla-count-down_2.entry.js → salla-product-card.entry.js} +2 -160
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CGGBRKTl.js → vanilla-picker-BBEKwYz7.js} +1 -1
- package/dist/twilight/{p-aa5bf3b5.entry.js → p-00a2d261.entry.js} +1 -1
- package/dist/twilight/{p-073ee1c3.entry.js → p-0b27ca19.entry.js} +1 -1
- package/dist/twilight/{p-7a87c0a9.entry.js → p-0d0ca330.entry.js} +1 -1
- package/dist/twilight/{p-d215b7d2.entry.js → p-1054b66c.entry.js} +1 -1
- package/dist/twilight/{p-a2c5e7bc.entry.js → p-129d6c0c.entry.js} +1 -1
- package/dist/twilight/{p-540297d6.entry.js → p-15a052c7.entry.js} +1 -1
- package/dist/twilight/{p-d4b83f2a.entry.js → p-207950ad.entry.js} +1 -1
- package/dist/twilight/{p-507fac68.entry.js → p-2548fa30.entry.js} +1 -1
- package/dist/twilight/{p-8bd3ba9e.entry.js → p-26cb1fdf.entry.js} +1 -1
- package/dist/twilight/{p-6ca09b34.entry.js → p-2b74eb03.entry.js} +1 -1
- package/dist/twilight/{p-3c8e6e9f.entry.js → p-359b2de3.entry.js} +1 -1
- package/dist/twilight/{p-7c8fe050.entry.js → p-35a2ea22.entry.js} +1 -1
- package/dist/twilight/{p-02aa05b3.entry.js → p-3653ad70.entry.js} +1 -1
- package/dist/twilight/{p-2200f944.entry.js → p-374057f7.entry.js} +1 -1
- package/dist/twilight/p-374c63c7.entry.js +4 -0
- package/dist/twilight/{p-b1e8296d.entry.js → p-412643eb.entry.js} +1 -1
- package/dist/twilight/{p-3d3b3856.entry.js → p-47cd7ceb.entry.js} +1 -1
- package/dist/twilight/{p-31458cbf.entry.js → p-47d1003b.entry.js} +1 -1
- package/dist/twilight/{p-2dfe2197.entry.js → p-48353d62.entry.js} +1 -1
- package/dist/twilight/{p-da155135.entry.js → p-4866439f.entry.js} +1 -1
- package/dist/twilight/{p-d00fc4bf.entry.js → p-4f3964d8.entry.js} +1 -1
- package/dist/twilight/{p-1cb9d96c.entry.js → p-4fefd2df.entry.js} +1 -1
- package/dist/twilight/{p-5f52e482.entry.js → p-5174aa32.entry.js} +1 -1
- package/dist/twilight/{p-8043f8ea.entry.js → p-58c66b0d.entry.js} +1 -1
- package/dist/twilight/{p-ce560f66.entry.js → p-58fa3856.entry.js} +1 -1
- package/dist/twilight/{p-59758658.entry.js → p-596525f9.entry.js} +1 -1
- package/dist/twilight/p-5a629abd.entry.js +4 -0
- package/dist/twilight/{p-b2537237.entry.js → p-5d2ebf97.entry.js} +1 -1
- package/dist/twilight/{p-b4f431bf.entry.js → p-65df6042.entry.js} +1 -1
- package/dist/twilight/{p-694aa670.entry.js → p-67bc002a.entry.js} +1 -1
- package/dist/twilight/{p-221456be.entry.js → p-67cf0723.entry.js} +1 -1
- package/dist/twilight/{p-a97f10a1.entry.js → p-687a597a.entry.js} +1 -1
- package/dist/twilight/{p-9f3f2ac3.entry.js → p-689701b4.entry.js} +1 -1
- package/dist/twilight/{p-e0b13c19.entry.js → p-70e478a6.entry.js} +1 -1
- package/dist/twilight/{p-189b3238.entry.js → p-74472650.entry.js} +1 -1
- package/dist/twilight/{p-4a4c1969.entry.js → p-7855ae93.entry.js} +1 -1
- package/dist/twilight/p-8c86ba24.entry.js +4 -0
- package/dist/twilight/{p-300be242.entry.js → p-8d4d4a0e.entry.js} +1 -1
- package/dist/twilight/{p-93623f07.entry.js → p-8fbd92a2.entry.js} +1 -1
- package/dist/twilight/{p-49b7c969.entry.js → p-983f9f1e.entry.js} +1 -1
- package/dist/twilight/{p-f81195ae.entry.js → p-998a3b5f.entry.js} +1 -1
- package/dist/twilight/{p-e46cb169.entry.js → p-9bf0a7df.entry.js} +1 -1
- package/dist/twilight/{p-c43be30b.entry.js → p-9ff1a4dc.entry.js} +1 -1
- package/dist/twilight/{p-B1ZkITMY.js → p-B21QGKK8.js} +1 -1
- package/dist/twilight/{p-uADDAGsE.js → p-Bc2ExcVy.js} +1 -1
- package/dist/twilight/{p-CvIpy7Cj.js → p-BcMtCVX0.js} +2 -2
- package/dist/twilight/{p-D26J1_uI.js → p-C3Z9uRGX.js} +1 -1
- package/dist/twilight/{p-VRwnn1Qc.js → p-DIeaJrGb.js} +1 -1
- package/dist/twilight/{p-BXOq5BwG.js → p-DbdyybJU.js} +1 -1
- package/dist/twilight/{p-NiLajaRX.js → p-UFbwqsEd.js} +1 -1
- package/dist/twilight/{p-3589bed2.entry.js → p-a39a0eb8.entry.js} +1 -1
- package/dist/twilight/{p-402fc86d.entry.js → p-a54364a3.entry.js} +1 -1
- package/dist/twilight/{p-1b097cea.entry.js → p-a6bb162e.entry.js} +1 -1
- package/dist/twilight/{p-242b6421.entry.js → p-a6cbb4f5.entry.js} +1 -1
- package/dist/twilight/{p-73113e85.entry.js → p-a8fd427d.entry.js} +1 -1
- package/dist/twilight/{p-23099ba2.entry.js → p-a909028d.entry.js} +1 -1
- package/dist/twilight/{p-d07f5e44.entry.js → p-acd70c2f.entry.js} +1 -1
- package/dist/twilight/{p-306c4986.entry.js → p-ae1e338f.entry.js} +1 -1
- package/dist/twilight/{p-48c94220.entry.js → p-b19ace8d.entry.js} +1 -1
- package/dist/twilight/p-b697172b.entry.js +4 -0
- package/dist/twilight/{p-04072cae.entry.js → p-bb98a631.entry.js} +1 -1
- package/dist/twilight/{p-5638111c.entry.js → p-c18179ed.entry.js} +1 -1
- package/dist/twilight/{p-a41f0590.entry.js → p-c2d74b3d.entry.js} +1 -1
- package/dist/twilight/{p-f7f592ab.entry.js → p-c45f2128.entry.js} +1 -1
- package/dist/twilight/p-c5522363.entry.js +4 -0
- package/dist/twilight/{p-249c9d98.entry.js → p-c6e7b06f.entry.js} +1 -1
- package/dist/twilight/{p-bc65bb02.entry.js → p-cc6c624c.entry.js} +1 -1
- package/dist/twilight/{p-wnPgaQoR.js → p-ctIqN5Fo.js} +1 -1
- package/dist/twilight/{p-4c007dc0.entry.js → p-d607bfd3.entry.js} +1 -1
- package/dist/twilight/{p-be1c54e6.entry.js → p-d862646f.entry.js} +1 -1
- package/dist/twilight/{p-e3b4a179.entry.js → p-dbcc0a7f.entry.js} +1 -1
- package/dist/twilight/p-dc6f4d54.entry.js +4 -0
- package/dist/twilight/{p-3c982608.entry.js → p-deb74e2e.entry.js} +1 -1
- package/dist/twilight/{p-4fc10acd.entry.js → p-dfa729d4.entry.js} +1 -1
- package/dist/twilight/p-e7671432.entry.js +4 -0
- package/dist/twilight/{p-4da987fc.entry.js → p-e7932d3d.entry.js} +1 -1
- package/dist/twilight/{p-e9be8c03.entry.js → p-e879fb84.entry.js} +1 -1
- package/dist/twilight/p-e9c7f99a.entry.js +4 -0
- package/dist/twilight/{p-a248f209.entry.js → p-f100cc25.entry.js} +1 -1
- package/dist/twilight/{p-ed08f5e5.entry.js → p-f63999f8.entry.js} +1 -1
- package/dist/twilight/{p-BlMSs0A2.js → p-fbLtV-T9.js} +1 -1
- package/dist/twilight/{p-6257e0cd.entry.js → p-fd22cd01.entry.js} +1 -1
- package/dist/twilight/{p-DWxyBEuT.js → p-ukob-enB.js} +2 -2
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +24 -0
- package/dist/types/components/salla-gifting/gift-schema.d.ts +4 -0
- package/dist/types/components/salla-gifting/intefaces.d.ts +1 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +10 -1
- package/dist/types/components/salla-order-edit/interfaces.d.ts +114 -0
- package/dist/types/components/salla-order-edit/salla-order-edit-item.d.ts +35 -0
- package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +42 -0
- package/dist/types/components.d.ts +170 -0
- package/package.json +5 -5
- package/dist/twilight/p-06eb15e2.entry.js +0 -4
- package/dist/twilight/p-348106f0.entry.js +0 -4
- package/dist/twilight/p-7020a339.entry.js +0 -4
- package/dist/twilight/p-e79ad638.entry.js +0 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { d as defineCustomElement$1 } from './salla-button2.js';
|
|
6
6
|
|
|
7
|
-
const sallaCountDownCss = "";
|
|
7
|
+
const sallaCountDownCss = ".s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}";
|
|
8
8
|
|
|
9
9
|
const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -22,6 +22,11 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
22
22
|
* The digits lang to show in the count down
|
|
23
23
|
* */
|
|
24
24
|
this.digits = 'auto';
|
|
25
|
+
/**
|
|
26
|
+
* If true, hides days segment when days = 0, and hides hours segment when both days and hours = 0.
|
|
27
|
+
* Matches salla-timer behaviour. Off by default for backward compatibility.
|
|
28
|
+
* */
|
|
29
|
+
this.autoSegments = false;
|
|
25
30
|
this.daysLabel = salla.lang.getWithDefault('pages.checkout.day', 'يوم');
|
|
26
31
|
this.hoursLabel = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');
|
|
27
32
|
this.minutesLabel = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');
|
|
@@ -29,6 +34,8 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
29
34
|
this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');
|
|
30
35
|
this.invalidDate = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');
|
|
31
36
|
this.offerEnded = false;
|
|
37
|
+
this.showDays = true;
|
|
38
|
+
this.showHours = true;
|
|
32
39
|
this.days = this.number(0);
|
|
33
40
|
this.hours = this.number(0);
|
|
34
41
|
this.minutes = this.number(0);
|
|
@@ -89,25 +96,48 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
89
96
|
return salla.helpers.number(digit, this.digits === 'en');
|
|
90
97
|
}
|
|
91
98
|
startCountDown() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
const isIsoFormat = this.date.includes('-');
|
|
100
|
+
const isDateOnly = this.endOfDay || this.date.split(' ').length === 1;
|
|
101
|
+
let countDownTime;
|
|
102
|
+
if (isIsoFormat) {
|
|
103
|
+
// Backend KSA date — parse as UTC+3 explicitly
|
|
104
|
+
const dateStr = isDateOnly
|
|
105
|
+
? `${this.date.split(' ')[0]}T23:59:59+03:00`
|
|
106
|
+
: `${this.date.replace(' ', 'T')}+03:00`;
|
|
107
|
+
countDownTime = new Date(dateStr).getTime();
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
// "MMM DD, YYYY HH:mm:ss" format — preserve existing behaviour
|
|
111
|
+
const countDownDate = new Date(this.date);
|
|
112
|
+
if (isDateOnly) {
|
|
113
|
+
countDownDate.setHours(23, 59, 59, 999);
|
|
114
|
+
}
|
|
115
|
+
countDownTime = countDownDate.getTime();
|
|
95
116
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.days = this.number(
|
|
101
|
-
this.hours = this.number(
|
|
117
|
+
const tick = () => {
|
|
118
|
+
const distance = countDownTime - Date.now();
|
|
119
|
+
const dRaw = Math.floor(distance / (1000 * 60 * 60 * 24));
|
|
120
|
+
const hRaw = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
|
121
|
+
this.days = this.number(dRaw);
|
|
122
|
+
this.hours = this.number(hRaw);
|
|
102
123
|
this.minutes = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));
|
|
103
124
|
this.seconds = this.number(Math.floor((distance % (1000 * 60)) / 1000));
|
|
125
|
+
if (this.autoSegments) {
|
|
126
|
+
this.showDays = dRaw > 0;
|
|
127
|
+
this.showHours = dRaw > 0 || hRaw > 0;
|
|
128
|
+
}
|
|
104
129
|
if (distance < 0) {
|
|
105
130
|
this.endCountDown();
|
|
106
131
|
}
|
|
107
|
-
}
|
|
132
|
+
};
|
|
133
|
+
this.countInterval = setInterval(tick, 1000);
|
|
134
|
+
tick();
|
|
108
135
|
}
|
|
109
136
|
renderCountDown() {
|
|
110
|
-
|
|
137
|
+
const listStyle = this.listPadding ? { paddingLeft: this.listPadding, paddingRight: this.listPadding } : undefined;
|
|
138
|
+
const resolvedBoxColor = this.boxTheme ? `var(--color-${this.boxTheme})` : this.boxColor;
|
|
139
|
+
const boxStyle = this.boxed && resolvedBoxColor ? { backgroundColor: resolvedBoxColor } : undefined;
|
|
140
|
+
return (h("ul", { class: `s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}`, style: listStyle }, h("li", { class: "s-count-down-item", style: boxStyle }, h("div", { class: "s-count-down-item-value" }, this.seconds), this.labeled && h("div", { class: "s-count-down-item-label" }, this.secondsLabel)), h("li", { class: "s-count-down-item", style: boxStyle }, h("div", { class: "s-count-down-item-value" }, this.minutes), this.labeled && h("div", { class: "s-count-down-item-label" }, this.minutesLabel)), (!this.autoSegments || this.showHours) && (h("li", { class: "s-count-down-item", style: boxStyle }, h("div", { class: "s-count-down-item-value" }, this.hours), this.labeled && h("div", { class: "s-count-down-item-label" }, this.hoursLabel))), (!this.autoSegments || this.showDays) && (h("li", { class: "s-count-down-item", style: boxStyle }, h("div", { class: "s-count-down-item-value" }, this.days), this.labeled && h("div", { class: "s-count-down-item-label" }, this.daysLabel)))));
|
|
111
141
|
}
|
|
112
142
|
renderInvalidDate() {
|
|
113
143
|
return h("div", { class: "s-count-down-text-center" }, this.invalidDate);
|
|
@@ -158,7 +188,7 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
158
188
|
return this.renderCountDown();
|
|
159
189
|
}
|
|
160
190
|
render() {
|
|
161
|
-
return (h(Host, { key: '
|
|
191
|
+
return (h(Host, { key: '72c0f5f822ea852674814ced58f323e8b99075c0', class: `s-count-down-wrapper ${this.preOrder && this.isValidDate(this.date) ? 's-count-down-pre-order' : ''} ${this.horizontal ? 's-count-down-horizontal' : ''} ${this.withButton ? 's-count-down-with-button' : ''} ${this.offerEnded ? 's-count-down-ended' : ''}` }, this.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
|
|
162
192
|
}
|
|
163
193
|
static get style() { return sallaCountDownCss; }
|
|
164
194
|
}, [0, "salla-count-down", {
|
|
@@ -175,8 +205,12 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
175
205
|
"color": [1],
|
|
176
206
|
"labeled": [4],
|
|
177
207
|
"endText": [1, "end-text"],
|
|
208
|
+
"boxColor": [1, "box-color"],
|
|
209
|
+
"boxTheme": [1, "box-theme"],
|
|
210
|
+
"listPadding": [1, "list-padding"],
|
|
178
211
|
"digits": [1],
|
|
179
212
|
"endOfDay": [4, "end-of-day"],
|
|
213
|
+
"autoSegments": [4, "auto-segments"],
|
|
180
214
|
"daysLabel": [32],
|
|
181
215
|
"hoursLabel": [32],
|
|
182
216
|
"minutesLabel": [32],
|
|
@@ -189,6 +223,8 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
189
223
|
"hours": [32],
|
|
190
224
|
"minutes": [32],
|
|
191
225
|
"seconds": [32],
|
|
226
|
+
"showDays": [32],
|
|
227
|
+
"showHours": [32],
|
|
192
228
|
"endCountDown": [64]
|
|
193
229
|
}]);
|
|
194
230
|
function defineCustomElement() {
|
|
@@ -55,6 +55,11 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
55
55
|
this.selectedCountryId = undefined;
|
|
56
56
|
this.selectedCountryCode = undefined;
|
|
57
57
|
this.loadingCities = false;
|
|
58
|
+
this.loadingRegions = false;
|
|
59
|
+
this.regions = [];
|
|
60
|
+
this.selectedRegionId = undefined;
|
|
61
|
+
this.isKSA = false;
|
|
62
|
+
this.step2Animated = false;
|
|
58
63
|
this.showTextArea = false;
|
|
59
64
|
/// Gift Form Data
|
|
60
65
|
this.selectedImage = undefined;
|
|
@@ -89,6 +94,8 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
89
94
|
this.selectCountry = salla.lang.get('pages.checkout.select_country');
|
|
90
95
|
this.selectCityInfo = salla.lang.get('blocks.buy_as_gift.city_info');
|
|
91
96
|
this.receiverCityFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_city');
|
|
97
|
+
this.receiverRegionFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_region') || salla.lang.get('pages.checkout.region');
|
|
98
|
+
this.selectRegion = salla.lang.get('pages.checkout.select_region');
|
|
92
99
|
this.receiverEmailFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_email');
|
|
93
100
|
this.emailPlaceholder = salla.lang.get('common.elements.email_placeholder');
|
|
94
101
|
this.sendLater = salla.lang.get('blocks.buy_as_gift.send_later');
|
|
@@ -166,7 +173,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
166
173
|
*/
|
|
167
174
|
async setWrapperHeight(asStep = 1, delay = 250, additionSpace = 0, newHeight = 0) {
|
|
168
175
|
let currentStep = document.querySelector(`#${this.hostId} .gift-step-${asStep}`);
|
|
169
|
-
|
|
176
|
+
const updateHeight = () => {
|
|
170
177
|
let currentStepHeight = currentStep.offsetHeight;
|
|
171
178
|
if (newHeight) {
|
|
172
179
|
this.stepsWrapper.style.height = `${newHeight}px`;
|
|
@@ -174,7 +181,13 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
174
181
|
else {
|
|
175
182
|
this.stepsWrapper.style.height = currentStepHeight + additionSpace + 'px';
|
|
176
183
|
}
|
|
177
|
-
}
|
|
184
|
+
};
|
|
185
|
+
if (this.step2Animated && asStep === 2) {
|
|
186
|
+
requestAnimationFrame(updateHeight);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
setTimeout(updateHeight, delay);
|
|
190
|
+
}
|
|
178
191
|
}
|
|
179
192
|
toggleCalendar() {
|
|
180
193
|
this.showCalendar = !this.showCalendar;
|
|
@@ -243,6 +256,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
243
256
|
item.classList.remove('opacity-0');
|
|
244
257
|
item.removeAttribute('style');
|
|
245
258
|
});
|
|
259
|
+
this.step2Animated = true;
|
|
246
260
|
}
|
|
247
261
|
}, '-=1200');
|
|
248
262
|
this.currentStep = 2;
|
|
@@ -284,6 +298,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
284
298
|
}
|
|
285
299
|
}, '-=1200');
|
|
286
300
|
stepBackAnime.play();
|
|
301
|
+
this.step2Animated = false;
|
|
287
302
|
this.setWrapperHeight(1, 600, 0);
|
|
288
303
|
this.currentStep = 1;
|
|
289
304
|
this.parentClass = `is-current-step-${this.currentStep}`;
|
|
@@ -333,23 +348,72 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
333
348
|
this.clearError('receiver.city_id');
|
|
334
349
|
}
|
|
335
350
|
async handleCountryChange(event) {
|
|
336
|
-
const countryId = event.target.value;
|
|
351
|
+
const countryId = Number(event.target.value);
|
|
337
352
|
this.selectedCountryId = countryId;
|
|
338
353
|
this.clearError('receiver.country');
|
|
339
354
|
// Find the selected country and store its country_code
|
|
340
355
|
const selectedCountry = this.gift?.countries?.find(country => country.id == countryId);
|
|
341
356
|
this.selectedCountryCode = selectedCountry?.country_code;
|
|
357
|
+
this.isKSA = selectedCountry?.country_code === 'SA';
|
|
358
|
+
// Reset region and city
|
|
359
|
+
this.regions = [];
|
|
360
|
+
this.selectedRegionId = undefined;
|
|
361
|
+
this.gift = { ...this.gift, cities: [] };
|
|
362
|
+
this.receiverCity = undefined;
|
|
342
363
|
if (!countryId || this.gift?.countries?.length === 0) {
|
|
343
|
-
this.gift = { ...this.gift, cities: [] };
|
|
344
|
-
this.receiverCity = undefined;
|
|
345
364
|
this.selectedCountryCode = undefined;
|
|
365
|
+
this.isKSA = false;
|
|
366
|
+
this.setWrapperHeight(2, 0, 0);
|
|
346
367
|
return;
|
|
347
368
|
}
|
|
348
|
-
this.
|
|
369
|
+
if (this.isKSA) {
|
|
370
|
+
// For KSA, fetch regions first
|
|
371
|
+
this.loadingRegions = true;
|
|
372
|
+
this.setWrapperHeight(2, 0, 0);
|
|
373
|
+
try {
|
|
374
|
+
const response = await salla.api.request(`shipping/countries/${countryId}/regions`);
|
|
375
|
+
if (response && response.data) {
|
|
376
|
+
this.regions = response.data;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
catch (error) {
|
|
380
|
+
console.error('Error fetching regions:', error);
|
|
381
|
+
}
|
|
382
|
+
finally {
|
|
383
|
+
this.loadingRegions = false;
|
|
384
|
+
this.setWrapperHeight(2, 0, 0);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
// For non-KSA, fetch cities directly
|
|
389
|
+
this.loadingCities = true;
|
|
390
|
+
this.setWrapperHeight(2, 0, 0);
|
|
391
|
+
try {
|
|
392
|
+
const response = await salla.api.request(`shipping/cities?for_branch=0&country_id=${countryId}`);
|
|
393
|
+
if (response && response.data) {
|
|
394
|
+
this.gift = { ...this.gift, cities: response.data };
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
catch (error) {
|
|
398
|
+
console.error('Error fetching cities:', error);
|
|
399
|
+
}
|
|
400
|
+
finally {
|
|
401
|
+
this.loadingCities = false;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
async handleRegionChange(event) {
|
|
406
|
+
const regionId = Number(event.target.value);
|
|
407
|
+
this.selectedRegionId = regionId;
|
|
408
|
+
this.clearError('receiver.region');
|
|
409
|
+
// Reset city when region changes
|
|
349
410
|
this.gift = { ...this.gift, cities: [] };
|
|
350
411
|
this.receiverCity = undefined;
|
|
412
|
+
if (!regionId)
|
|
413
|
+
return;
|
|
414
|
+
this.loadingCities = true;
|
|
351
415
|
try {
|
|
352
|
-
const response = await salla.api.request(`shipping/cities?for_branch=0&country_id=${
|
|
416
|
+
const response = await salla.api.request(`shipping/cities?for_branch=0&country_id=${this.selectedCountryId}®ion_id=${regionId}`);
|
|
353
417
|
if (response && response.data) {
|
|
354
418
|
this.gift = { ...this.gift, cities: response.data };
|
|
355
419
|
}
|
|
@@ -359,6 +423,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
359
423
|
}
|
|
360
424
|
finally {
|
|
361
425
|
this.loadingCities = false;
|
|
426
|
+
this.setWrapperHeight(2, 0, 0);
|
|
362
427
|
}
|
|
363
428
|
}
|
|
364
429
|
handleUploadImage(img) {
|
|
@@ -414,6 +479,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
414
479
|
{ key: 'receiver.mobile', value: this.receiverMobile, label: this.receiverMobileFieldLabel },
|
|
415
480
|
...(this.physicalProducts ? [
|
|
416
481
|
{ key: 'receiver.country', value: this.selectedCountryId, label: this.receiverCountryFieldLabel },
|
|
482
|
+
...(this.isKSA ? [{ key: 'receiver.region', value: this.selectedRegionId, label: this.receiverRegionFieldLabel }] : []),
|
|
417
483
|
{ key: 'receiver.city_id', value: this.receiverCity, label: this.receiverCityFieldLabel },
|
|
418
484
|
] : []),
|
|
419
485
|
];
|
|
@@ -440,6 +506,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
440
506
|
mobile_country_code: this.receiverCountryCode,
|
|
441
507
|
mobile: this.receiverMobile,
|
|
442
508
|
...(this.physicalProducts && this.selectedCountryCode ? { country_code: this.selectedCountryCode } : {}),
|
|
509
|
+
...(this.physicalProducts && this.selectedRegionId ? { region_id: this.selectedRegionId } : {}),
|
|
443
510
|
...(this.receiverCity && this.physicalProducts ? { city_id: this.receiverCity } : {})
|
|
444
511
|
},
|
|
445
512
|
has_apple_pay: salla.helpers.hasApplePay(),
|
|
@@ -464,6 +531,10 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
464
531
|
this.setWrapperHeight(2, 150, 0);
|
|
465
532
|
});
|
|
466
533
|
}
|
|
534
|
+
step2ItemClass(extra = '') {
|
|
535
|
+
const base = `anime-item${this.step2Animated ? '' : ' opacity-0'}`;
|
|
536
|
+
return extra ? `${extra} ${base}` : base;
|
|
537
|
+
}
|
|
467
538
|
generateClass() {
|
|
468
539
|
return {
|
|
469
540
|
"s-gifting-widget": true,
|
|
@@ -497,7 +568,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
497
568
|
}
|
|
498
569
|
render() {
|
|
499
570
|
return [
|
|
500
|
-
h("div", { key: '
|
|
571
|
+
h("div", { key: '5d0eec8210f77d166c144704ec78bffcaf1f4ce0' }, h("salla-list-tile", { key: '19cc20b4f70bbb8a7d267f60052db77589901962', class: this.generateClass() }, h("div", { key: '1c3c52b5ac48e71a6ac26c60494657ac28d16457', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: 'e3379fb3ed39d1bc63500346058b26b883c3be13' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'f6c2a522727546aa27cef725faa8be082da063da', slot: "subtitle" }, h("div", { key: '7b58ad967f39fa2cc660369b72e73f8dc49f90dc' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '848396dcd6ce6009ebc4cf1a209a055ad1adbf15', slot: "action" }, h("salla-button", { key: '2ba69b670f1c958784c6f1dca6b2dd0b93f20859', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '6ac9ac339e321fc9433465cfd75f299307ee7152', name: "widget-btn-content" }, h("div", { key: 'c61dd36375886c1ecf87f115e5248dca1af7efc9', class: "s-gifting-widget-action-content" }, h("span", { key: '0c8a3630ba6b15889fc4bf3d55a1279cdf713400', innerHTML: GiftSharing }), " \u00A0", h("span", { key: 'c9299ec752e5393f30a78e1e01d367be9e97ca50' }, this.sectionBtnText)))))), h("salla-modal", { key: '9ee17e79f97eee59d25d9627d5b1cd4ada7cadb3', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'aba3b6a4d3e903934c9b5e629119c3a3b5bc90ab', slot: "loading" }, h("div", { key: 'e03613cc85bf4024f63d2e256a2744ec78f7eabf', class: "s-gifting-skeleton" }, h("div", { key: '01156691d540ce5ef5723902610a1da27fba3ddb', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: 'e45b4868e4fa5633aeb22f758f75f5412290b179', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '2b427d38dd6e0569e16de84ef46eb2052d23b739', class: "s-gifting-modal-title" }, h("div", { key: 'c4f9cb6f513e3ebd2e6ad209648a1f70bcafbcb5', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: 'e684b682a4cca89262128cca13604b7aa9a83cd7', height: '15px', width: '150px' })))), h("div", { key: '2941865d68cd216b4dd82bb8279f6bcbaa062bf3', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '7c4f4235a666930ceef3dc0b38809aea5ee5ce5c', height: '10px', width: '150px' }), h("salla-skeleton", { key: '0257f401762a11b0bf3da7db603b4e5f57bd1aae', height: '230px' }), h("salla-skeleton", { key: 'cced26b189549fcee4eff3a3fbd943a5735b4c6c', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'f5893e5c631564c91bfe42c4102190d43f913947', height: '30px' }), h("salla-skeleton", { key: '64d3738017cf6732b429848c1de4ca16db1adc06', height: '40px' })))), h("slot", { key: '77d5bda8147f7f09d73b97fd7456121626b465a7', name: "header" }), !!this.hasError ?
|
|
501
572
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
502
573
|
:
|
|
503
574
|
[
|
|
@@ -506,14 +577,18 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
506
577
|
h("salla-slider", { id: "gifting-slider", loop: false, "controls-outer": true, class: "s-gifting-slider", type: "carousel" }, h("div", { slot: "items" }, this.gift && this.gift.gift_images ?
|
|
507
578
|
this.gift?.gift_images.map((item) => h("a", { class: "s-gifting-clickable s-gifting-image", onClick: () => this.setPreview(item) }, h("img", { style: { "width": "120px" }, src: item.url, alt: `${item.id}` }))) : ''))
|
|
508
579
|
: ""), h("div", { class: "anime-item" }, h("div", { class: "s-form-group s-gifting-selectText", ref: el => this.textSelect = el }, h("select", { id: "gift-text-selection", name: "gift-text-selection", class: "s-form-control s-gifting-select", onChange: e => this.toggleGiftText(e) }, h("option", { "data-id": null, selected: true }, this.selectGiftMessage), this.gift && this.gift.gift_texts ?
|
|
509
|
-
this.gift?.gift_texts.map((txt) => h("option", { "data-id": txt.id, value: txt.text, key: txt.id }, txt.text)) : '', h("option", { "data-id": "custom" }, this.giftCustomText))), h("div", { class: this.showGiftText ? "s-form-group s-gifting-textarea shown" : "s-form-group s-gifting-textarea hide", ref: (el) => this.customTextArea = el }, h("label", { htmlFor: "gift-custom-text", class: "s-form-label" }, this.giftCustomText), h("div", { class: "mt-1" }, h("textarea", { onInput: (event) => this.handleTextAreaChange(event), rows: 4, ref: (el) => this.textArea = el, name: "gift-custom-text", id: "gift-custom-text", class: "s-form-control" })))), h("div", { class: "anime-item" }, h("salla-button", { color: "primary", width: "wide", onClick: () => this.goToStep2() }, h("span", null, this.nextStep)))), h("div", { class: "s-gifting-step-two gift-step-2", ref: el => this.step2Elems = el }, h("div", { class: this.
|
|
510
|
-
h("span", { class: "s-gifting-error" }, this.errors['sender_name']) : ''), h("div", { class: this.
|
|
511
|
-
h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.
|
|
580
|
+
this.gift?.gift_texts.map((txt) => h("option", { "data-id": txt.id, value: txt.text, key: txt.id }, txt.text)) : '', h("option", { "data-id": "custom" }, this.giftCustomText))), h("div", { class: this.showGiftText ? "s-form-group s-gifting-textarea shown" : "s-form-group s-gifting-textarea hide", ref: (el) => this.customTextArea = el }, h("label", { htmlFor: "gift-custom-text", class: "s-form-label" }, this.giftCustomText), h("div", { class: "mt-1" }, h("textarea", { onInput: (event) => this.handleTextAreaChange(event), rows: 4, ref: (el) => this.textArea = el, name: "gift-custom-text", id: "gift-custom-text", class: "s-form-control" })))), h("div", { class: "anime-item" }, h("salla-button", { color: "primary", width: "wide", onClick: () => this.goToStep2() }, h("span", null, this.nextStep)))), h("div", { class: "s-gifting-step-two gift-step-2", ref: el => this.step2Elems = el }, h("div", { class: this.step2ItemClass(this.errors?.['sender_name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "sender_name", class: "s-form-label" }, this.senderNameLabel), h("input", { type: "text", class: "s-form-control", name: "sender_name", id: "sender_name", value: this.senderName, onInput: (event) => this.handleSenderName(event), placeholder: "" }), this.errors && this.errors['sender_name'] ?
|
|
581
|
+
h("span", { class: "s-gifting-error" }, this.errors['sender_name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "receiver_name", class: "s-form-label" }, this.receiverNameFieldLabel), h("input", { type: "text", class: "s-form-control", name: "receiver_name", id: "receiver_name", value: "", onInput: (event) => this.handleReceiverName(event), placeholder: "" }), this.errors && this.errors['receiver.name'] ?
|
|
582
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.mobile'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.receiverCountryCode, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
|
|
512
583
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.physicalProducts &&
|
|
513
|
-
h("div",
|
|
514
|
-
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''),
|
|
515
|
-
|
|
516
|
-
|
|
584
|
+
h("div", { class: this.step2ItemClass(this.errors?.['receiver.country'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), h("select", { name: "country", class: "s-form-control", onChange: (event) => this.handleCountryChange(event), required: true }, h("option", { value: "" }, this.selectCountry), this.gift?.countries?.map((country) => (h("option", { value: country.id }, country.name)))), this.errors && this.errors['receiver.country'] ?
|
|
585
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), this.physicalProducts && this.isKSA &&
|
|
586
|
+
h("div", { class: this.step2ItemClass(this.errors?.['receiver.region'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverRegionFieldLabel), h("select", { name: "region", class: "s-form-control", onChange: (event) => this.handleRegionChange(event), disabled: this.loadingRegions }, h("option", { value: "", selected: true }, this.loadingRegions ? salla.lang.get('common.elements.loading') : this.selectRegion), this.regions?.map((region) => (h("option", { value: region.id }, region.name)))), this.errors && this.errors['receiver.region'] ?
|
|
587
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.region']) : ''), this.physicalProducts &&
|
|
588
|
+
h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", "aria-label": salla.lang.get('blocks.buy_as_gift.select_city'), class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId) }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
589
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.physicalProducts &&
|
|
590
|
+
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo)), !this.physicalProducts && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
591
|
+
], h("slot", { key: '46da7ff69a3c10b75886a23936f2f9ad8ad0e7bf', name: "footer" })))
|
|
517
592
|
];
|
|
518
593
|
}
|
|
519
594
|
static get style() { return sallaGiftingCss; }
|
|
@@ -544,6 +619,8 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
544
619
|
"selectCity": [32],
|
|
545
620
|
"selectCityInfo": [32],
|
|
546
621
|
"receiverCityFieldLabel": [32],
|
|
622
|
+
"receiverRegionFieldLabel": [32],
|
|
623
|
+
"selectRegion": [32],
|
|
547
624
|
"receiverEmailFieldLabel": [32],
|
|
548
625
|
"emailPlaceholder": [32],
|
|
549
626
|
"sendLater": [32],
|
|
@@ -562,6 +639,10 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
562
639
|
"selectedCountryId": [32],
|
|
563
640
|
"selectedCountryCode": [32],
|
|
564
641
|
"loadingCities": [32],
|
|
642
|
+
"loadingRegions": [32],
|
|
643
|
+
"regions": [32],
|
|
644
|
+
"selectedRegionId": [32],
|
|
645
|
+
"isKSA": [32],
|
|
565
646
|
"parsedFormData": [32],
|
|
566
647
|
"showTextArea": [32],
|
|
567
648
|
"selectedImage": [32],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaOrderEditItem extends Components.SallaOrderEditItem, HTMLElement {}
|
|
4
|
+
export const SallaOrderEditItem: {
|
|
5
|
+
prototype: SallaOrderEditItem;
|
|
6
|
+
new (): SallaOrderEditItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { S as SallaOrderEditItem$1, d as defineCustomElement$1 } from './salla-order-edit-item2.js';
|
|
5
|
+
|
|
6
|
+
const SallaOrderEditItem = SallaOrderEditItem$1;
|
|
7
|
+
const defineCustomElement = defineCustomElement$1;
|
|
8
|
+
|
|
9
|
+
export { SallaOrderEditItem, defineCustomElement };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$c } from './salla-booking-field2.js';
|
|
6
|
+
import { d as defineCustomElement$b } from './salla-button2.js';
|
|
7
|
+
import { d as defineCustomElement$a } from './salla-color-picker2.js';
|
|
8
|
+
import { d as defineCustomElement$9 } from './salla-conditional-fields2.js';
|
|
9
|
+
import { d as defineCustomElement$8 } from './salla-datetime-picker2.js';
|
|
10
|
+
import { d as defineCustomElement$7 } from './salla-file-upload2.js';
|
|
11
|
+
import { d as defineCustomElement$6 } from './salla-loading2.js';
|
|
12
|
+
import { d as defineCustomElement$5 } from './salla-map2.js';
|
|
13
|
+
import { d as defineCustomElement$4 } from './salla-modal2.js';
|
|
14
|
+
import { d as defineCustomElement$3 } from './salla-product-options2.js';
|
|
15
|
+
import { d as defineCustomElement$2 } from './salla-progress-bar2.js';
|
|
16
|
+
import { d as defineCustomElement$1 } from './salla-quantity-input2.js';
|
|
17
|
+
|
|
18
|
+
const sallaOrderEditItemCss = "";
|
|
19
|
+
|
|
20
|
+
const SallaOrderEditItem = /*@__PURE__*/ proxyCustomElement(class SallaOrderEditItem extends HTMLElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.__registerHost();
|
|
24
|
+
this.orderItemUpdated = createEvent(this, "orderItemUpdated", 7);
|
|
25
|
+
this.orderItemRemoved = createEvent(this, "orderItemRemoved", 7);
|
|
26
|
+
this.handleQuantityChange = (event) => {
|
|
27
|
+
const detail = event.detail;
|
|
28
|
+
const newQuantity = detail?.quantity ?? parseInt(event.target.value, 10);
|
|
29
|
+
if (isNaN(newQuantity) || newQuantity < 1)
|
|
30
|
+
return;
|
|
31
|
+
if (newQuantity === this.quantity)
|
|
32
|
+
return;
|
|
33
|
+
this.quantity = newQuantity;
|
|
34
|
+
this.emitUpdate(newQuantity);
|
|
35
|
+
};
|
|
36
|
+
this.handleOptionsChange = () => {
|
|
37
|
+
this.emitUpdate(this.quantity);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
componentWillLoad() {
|
|
41
|
+
this.quantity = this.item?.quantity || 1;
|
|
42
|
+
}
|
|
43
|
+
componentDidLoad() {
|
|
44
|
+
const quantityEl = this.host.querySelector('salla-quantity-input');
|
|
45
|
+
if (quantityEl) {
|
|
46
|
+
quantityEl.addEventListener('change', this.handleQuantityChange);
|
|
47
|
+
}
|
|
48
|
+
const optionsEl = this.host.querySelector('salla-product-options');
|
|
49
|
+
if (optionsEl) {
|
|
50
|
+
optionsEl.addEventListener('change', this.handleOptionsChange);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
const quantityEl = this.host.querySelector('salla-quantity-input');
|
|
55
|
+
if (quantityEl) {
|
|
56
|
+
quantityEl.removeEventListener('change', this.handleQuantityChange);
|
|
57
|
+
}
|
|
58
|
+
const optionsEl = this.host.querySelector('salla-product-options');
|
|
59
|
+
if (optionsEl) {
|
|
60
|
+
optionsEl.removeEventListener('change', this.handleOptionsChange);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
get hasOptions() {
|
|
64
|
+
const options = this.item.product?.options;
|
|
65
|
+
return options && options.length > 0;
|
|
66
|
+
}
|
|
67
|
+
async getSelectedOptions() {
|
|
68
|
+
const optionsEl = this.host.querySelector(`salla-product-options[product-id="${this.item.product?.id}"]`);
|
|
69
|
+
return (await optionsEl?.getSelectedOptionsData()) || {};
|
|
70
|
+
}
|
|
71
|
+
async emitUpdate(quantity) {
|
|
72
|
+
const detail = { itemId: this.item?.id, quantity };
|
|
73
|
+
if (this.hasOptions) {
|
|
74
|
+
detail.options = await this.getSelectedOptions();
|
|
75
|
+
}
|
|
76
|
+
this.orderItemUpdated.emit(detail);
|
|
77
|
+
}
|
|
78
|
+
removeItem() {
|
|
79
|
+
const itemId = this.item?.id;
|
|
80
|
+
if (itemId == null)
|
|
81
|
+
return;
|
|
82
|
+
this.orderItemRemoved.emit({ itemId });
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
if (!this.item)
|
|
86
|
+
return null;
|
|
87
|
+
const product = this.item.product;
|
|
88
|
+
const productName = this.item.name || product?.name || '';
|
|
89
|
+
const imageUrl = product?.image?.url || '';
|
|
90
|
+
const imageAlt = product?.image?.alt || productName;
|
|
91
|
+
const productUrl = product?.url || '#';
|
|
92
|
+
const price = product?.price;
|
|
93
|
+
const maxQuantity = product?.max_quantity;
|
|
94
|
+
const weightLabel = product?.weight_label;
|
|
95
|
+
const options = this.item.product?.options;
|
|
96
|
+
const quantityAttrs = { value: this.quantity };
|
|
97
|
+
if (maxQuantity) {
|
|
98
|
+
quantityAttrs.max = maxQuantity;
|
|
99
|
+
}
|
|
100
|
+
return (h(Host, null, h("div", null, h("div", { class: "s-order-edit-item-header" }, h("div", { class: "s-order-edit-item-media" }, imageUrl && (h("a", { href: productUrl }, h("img", { src: imageUrl, alt: imageAlt, class: "s-order-edit-item-image" }))), h("div", { class: "s-order-edit-item-details" }, h("h2", { class: "s-order-edit-item-name" }, h("a", { href: productUrl, class: "s-order-edit-item-link" }, productName)), price != null && (h("span", { class: "s-order-edit-item-price", innerHTML: salla.money(price) })), weightLabel && (h("p", { class: "s-order-edit-item-weight" }, salla.lang.getWithDefault('pages.products.weight', 'الوزن'), " ", weightLabel)))), h("salla-button", { type: "button", shape: "icon", size: "small", color: "danger", "aria-label": salla.lang.getWithDefault('common.elements.delete', 'حذف'), onClick: () => this.removeItem() }, h("i", { class: "sicon-cancel" }))), h("div", { class: "s-order-edit-item-quantity" }, h("h3", { class: "s-order-edit-item-quantity-label" }, salla.lang.getWithDefault('common.elements.quantity', 'الكمية')), h("div", { class: "s-order-edit-item-quantity-input" }, h("salla-quantity-input", { ...quantityAttrs }))), this.hasOptions && (h("form", { onSubmit: e => e.preventDefault() }, h("salla-product-options", { "product-id": product.id, options: JSON.stringify(options), key: `${product.id}-order-edit-item-options` }))))));
|
|
101
|
+
}
|
|
102
|
+
get host() { return this; }
|
|
103
|
+
static get style() { return sallaOrderEditItemCss; }
|
|
104
|
+
}, [0, "salla-order-edit-item", {
|
|
105
|
+
"item": [16],
|
|
106
|
+
"orderId": [8, "order-id"],
|
|
107
|
+
"quantity": [32]
|
|
108
|
+
}]);
|
|
109
|
+
function defineCustomElement() {
|
|
110
|
+
if (typeof customElements === "undefined") {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const components = ["salla-order-edit-item", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-datetime-picker", "salla-file-upload", "salla-loading", "salla-map", "salla-modal", "salla-product-options", "salla-progress-bar", "salla-quantity-input"];
|
|
114
|
+
components.forEach(tagName => { switch (tagName) {
|
|
115
|
+
case "salla-order-edit-item":
|
|
116
|
+
if (!customElements.get(tagName)) {
|
|
117
|
+
customElements.define(tagName, SallaOrderEditItem);
|
|
118
|
+
}
|
|
119
|
+
break;
|
|
120
|
+
case "salla-booking-field":
|
|
121
|
+
if (!customElements.get(tagName)) {
|
|
122
|
+
defineCustomElement$c();
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
case "salla-button":
|
|
126
|
+
if (!customElements.get(tagName)) {
|
|
127
|
+
defineCustomElement$b();
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
case "salla-color-picker":
|
|
131
|
+
if (!customElements.get(tagName)) {
|
|
132
|
+
defineCustomElement$a();
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
135
|
+
case "salla-conditional-fields":
|
|
136
|
+
if (!customElements.get(tagName)) {
|
|
137
|
+
defineCustomElement$9();
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
140
|
+
case "salla-datetime-picker":
|
|
141
|
+
if (!customElements.get(tagName)) {
|
|
142
|
+
defineCustomElement$8();
|
|
143
|
+
}
|
|
144
|
+
break;
|
|
145
|
+
case "salla-file-upload":
|
|
146
|
+
if (!customElements.get(tagName)) {
|
|
147
|
+
defineCustomElement$7();
|
|
148
|
+
}
|
|
149
|
+
break;
|
|
150
|
+
case "salla-loading":
|
|
151
|
+
if (!customElements.get(tagName)) {
|
|
152
|
+
defineCustomElement$6();
|
|
153
|
+
}
|
|
154
|
+
break;
|
|
155
|
+
case "salla-map":
|
|
156
|
+
if (!customElements.get(tagName)) {
|
|
157
|
+
defineCustomElement$5();
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
case "salla-modal":
|
|
161
|
+
if (!customElements.get(tagName)) {
|
|
162
|
+
defineCustomElement$4();
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
case "salla-product-options":
|
|
166
|
+
if (!customElements.get(tagName)) {
|
|
167
|
+
defineCustomElement$3();
|
|
168
|
+
}
|
|
169
|
+
break;
|
|
170
|
+
case "salla-progress-bar":
|
|
171
|
+
if (!customElements.get(tagName)) {
|
|
172
|
+
defineCustomElement$2();
|
|
173
|
+
}
|
|
174
|
+
break;
|
|
175
|
+
case "salla-quantity-input":
|
|
176
|
+
if (!customElements.get(tagName)) {
|
|
177
|
+
defineCustomElement$1();
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
180
|
+
} });
|
|
181
|
+
}
|
|
182
|
+
defineCustomElement();
|
|
183
|
+
|
|
184
|
+
export { SallaOrderEditItem as S, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaOrderEdit extends Components.SallaOrderEdit, HTMLElement {}
|
|
4
|
+
export const SallaOrderEdit: {
|
|
5
|
+
prototype: SallaOrderEdit;
|
|
6
|
+
new (): SallaOrderEdit;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|