@salla.sa/twilight-components 2.14.394 → 2.14.396
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-C_gLbAbF.js → filepond--eaDMl7y.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DXWo2FUU.js → filepond-plugin-file-poster-Bzu6Vt-X.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-fBXMP7ez.js → filepond-plugin-file-validate-size-Ub_sOKAF.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DEo7juC7.js → filepond-plugin-file-validate-type-3DherKXx.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-4j4e1VEp.js → filepond-plugin-image-edit-BdtV1wyD.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DWqiXxv1.js → filepond-plugin-image-exif-orientation-C5dSiQ0v.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-emT_teia.js → filepond-plugin-image-preview-CazMN__p.js} +1 -1
- package/dist/cjs/{index-Y-2uyQDK.js → index-D53_q3EG.js} +1 -1
- package/dist/cjs/{index-B03mYCWz.js → index-DjB1fbHm.js} +2 -2
- 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_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 +27 -13
- 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-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 +15 -12
- 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-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 +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +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-CKZvBtHS.js → vanilla-picker-B6SlFf8N.js} +1 -1
- package/dist/collection/components/salla-count-down/salla-count-down.js +28 -13
- package/dist/collection/components/salla-gifting/salla-gifting.js +34 -12
- package/dist/components/index.js +2 -2
- package/dist/components/salla-count-down2.js +27 -12
- package/dist/components/salla-gifting.js +15 -11
- package/dist/esm/{filepond-Be7JObSq.js → filepond-B0f66JOy.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DF0NWKCQ.js → filepond-plugin-file-poster-CMK74s0v.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DJFlJHtE.js → filepond-plugin-file-validate-size-DHAPxF9Y.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DykpLW1Z.js → filepond-plugin-file-validate-type-2OXNr5nG.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CyIHxrnW.js → filepond-plugin-image-edit-DQo2yk4F.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DbCOAhSu.js → filepond-plugin-image-exif-orientation-BoHI8HuD.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CGRGZcft.js → filepond-plugin-image-preview-CasnSUaE.js} +1 -1
- package/dist/esm/{index-Cz6cYzxG.js → index-5Ukk6AXG.js} +2 -2
- package/dist/esm/{index-_kPnZdm0.js → index-CoEnP6re.js} +1 -1
- 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_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 +27 -13
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.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 +15 -12
- 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-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 +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +1 -1
- 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-C_YV5LtA.js → vanilla-picker-Dsyxt_RC.js} +1 -1
- package/dist/twilight/{p-543ee624.entry.js → p-016aab09.entry.js} +1 -1
- package/dist/twilight/{p-42778349.entry.js → p-01a7c6fa.entry.js} +1 -1
- package/dist/twilight/{p-d8f60f2f.entry.js → p-086ca2d0.entry.js} +1 -1
- package/dist/twilight/{p-5ab7a295.entry.js → p-0c9809e0.entry.js} +1 -1
- package/dist/twilight/{p-413a7236.entry.js → p-122ba5b4.entry.js} +1 -1
- package/dist/twilight/{p-60fafcd9.entry.js → p-18292248.entry.js} +1 -1
- package/dist/twilight/{p-268695ff.entry.js → p-19296437.entry.js} +1 -1
- package/dist/twilight/{p-dc897bdd.entry.js → p-1cbebced.entry.js} +1 -1
- package/dist/twilight/{p-f067fcd6.entry.js → p-20de7349.entry.js} +1 -1
- package/dist/twilight/{p-39c601e3.entry.js → p-24515d59.entry.js} +1 -1
- package/dist/twilight/{p-c121f8e4.entry.js → p-2a052235.entry.js} +1 -1
- package/dist/twilight/{p-ed913ae7.entry.js → p-2a2c1934.entry.js} +1 -1
- package/dist/twilight/{p-b0d01f9f.entry.js → p-34191f21.entry.js} +1 -1
- package/dist/twilight/{p-49db497f.entry.js → p-3658e24b.entry.js} +1 -1
- package/dist/twilight/{p-17dd8b68.entry.js → p-3d468a50.entry.js} +1 -1
- package/dist/twilight/{p-3cf5c61f.entry.js → p-3f82e437.entry.js} +1 -1
- package/dist/twilight/{p-ff14dca3.entry.js → p-416c7036.entry.js} +1 -1
- package/dist/twilight/{p-3c810881.entry.js → p-49d2f954.entry.js} +1 -1
- package/dist/twilight/{p-f3166e60.entry.js → p-4c05b868.entry.js} +1 -1
- package/dist/twilight/{p-fcddbfc3.entry.js → p-50190eac.entry.js} +1 -1
- package/dist/twilight/{p-c0037fac.entry.js → p-59d15a66.entry.js} +1 -1
- package/dist/twilight/{p-Cz6cYzxG.js → p-5Ukk6AXG.js} +1 -1
- package/dist/twilight/{p-3857beb4.entry.js → p-5ee0ea47.entry.js} +1 -1
- package/dist/twilight/{p-d2fd79b4.entry.js → p-63e52e23.entry.js} +1 -1
- package/dist/twilight/{p-94b1a2ae.entry.js → p-6befa92d.entry.js} +1 -1
- package/dist/twilight/{p-5e496aaa.entry.js → p-6cab5fe3.entry.js} +1 -1
- package/dist/twilight/{p-5a4f0b99.entry.js → p-6d183e79.entry.js} +1 -1
- package/dist/twilight/{p-e48853c9.entry.js → p-75dc285c.entry.js} +1 -1
- package/dist/twilight/{p-964b7db9.entry.js → p-77462b4c.entry.js} +1 -1
- package/dist/twilight/p-78dcf931.entry.js +4 -0
- package/dist/twilight/{p-5957f774.entry.js → p-79cb488c.entry.js} +1 -1
- package/dist/twilight/{p-5a8c0fd2.entry.js → p-7aae8fcd.entry.js} +1 -1
- package/dist/twilight/{p-f2cd6975.entry.js → p-7c90baa3.entry.js} +1 -1
- package/dist/twilight/{p-468b999f.entry.js → p-80fa5afb.entry.js} +1 -1
- package/dist/twilight/{p-8474c4f6.entry.js → p-85321251.entry.js} +1 -1
- package/dist/twilight/{p-7d3e592a.entry.js → p-86a5cbf5.entry.js} +1 -1
- package/dist/twilight/{p-0200cddd.entry.js → p-89f9e09a.entry.js} +1 -1
- package/dist/twilight/{p-d6cf0ffd.entry.js → p-8b27904b.entry.js} +1 -1
- package/dist/twilight/{p-fe7ac9bb.entry.js → p-8dedeeac.entry.js} +1 -1
- package/dist/twilight/{p-4b033276.entry.js → p-927ba1c4.entry.js} +1 -1
- package/dist/twilight/{p-8403cd93.entry.js → p-93a47224.entry.js} +1 -1
- package/dist/twilight/{p-4f7bc9c3.entry.js → p-94937926.entry.js} +1 -1
- package/dist/twilight/{p-CP8rFQ5n.js → p-A3tHV2wb.js} +1 -1
- package/dist/twilight/{p-CpO1SrBd.js → p-B0PVo-WB.js} +1 -1
- package/dist/twilight/{p-mlFGjxcj.js → p-B62srIHZ.js} +1 -1
- package/dist/twilight/{p-Do4hSOGo.js → p-BLMOqwWX.js} +1 -1
- package/dist/twilight/{p-JJmlh-ji.js → p-BgqCVS-Q.js} +1 -1
- package/dist/twilight/{p-CfmIbM8B.js → p-BioPQy2X.js} +1 -1
- package/dist/twilight/{p-B_sN7OnY.js → p-BlPAvwSA.js} +1 -1
- package/dist/twilight/{p-Bpi0aG1F.js → p-C4e80CBy.js} +1 -1
- package/dist/twilight/{p-BZKDQg1s.js → p-K7wyZucF.js} +1 -1
- package/dist/twilight/{p-dca46236.entry.js → p-a454d0f3.entry.js} +1 -1
- package/dist/twilight/{p-cb7a985e.entry.js → p-a639aa86.entry.js} +1 -1
- package/dist/twilight/{p-e4fdb206.entry.js → p-a91f49f1.entry.js} +1 -1
- package/dist/twilight/{p-8552160a.entry.js → p-ae06a21d.entry.js} +1 -1
- package/dist/twilight/{p-8306ef5e.entry.js → p-ae2b376f.entry.js} +1 -1
- package/dist/twilight/{p-b8e3e180.entry.js → p-b7c385e4.entry.js} +1 -1
- package/dist/twilight/{p-0bac200e.entry.js → p-be608838.entry.js} +1 -1
- package/dist/twilight/{p-f2ffbfbb.entry.js → p-bf164ff3.entry.js} +1 -1
- package/dist/twilight/{p-8c9b0e2a.entry.js → p-c17eb48a.entry.js} +1 -1
- package/dist/twilight/{p-d99610f9.entry.js → p-c67bb2a5.entry.js} +1 -1
- package/dist/twilight/{p-1087f0dd.entry.js → p-cb0eeb02.entry.js} +1 -1
- package/dist/twilight/{p-4680956b.entry.js → p-cec496a9.entry.js} +1 -1
- package/dist/twilight/{p-708f02db.entry.js → p-cff91454.entry.js} +1 -1
- package/dist/twilight/p-d015fcf5.entry.js +4 -0
- package/dist/twilight/{p-5f440956.entry.js → p-d0c32e76.entry.js} +1 -1
- package/dist/twilight/{p-bd687cd0.entry.js → p-d69811b1.entry.js} +1 -1
- package/dist/twilight/{p-f9e52fd9.entry.js → p-dccd5f21.entry.js} +1 -1
- package/dist/twilight/{p-04dc0b71.entry.js → p-dd311ef0.entry.js} +1 -1
- package/dist/twilight/{p-c29907df.entry.js → p-dfa6ff37.entry.js} +1 -1
- package/dist/twilight/{p-2602927d.entry.js → p-dfc95a89.entry.js} +1 -1
- package/dist/twilight/{p-81876026.entry.js → p-e0851059.entry.js} +1 -1
- package/dist/twilight/{p-0ef99df1.entry.js → p-e10079a8.entry.js} +1 -1
- package/dist/twilight/{p-c39675ef.entry.js → p-e2d02f50.entry.js} +1 -1
- package/dist/twilight/{p-99735748.entry.js → p-e655ab37.entry.js} +1 -1
- package/dist/twilight/{p-95dad1af.entry.js → p-e74e77b8.entry.js} +1 -1
- package/dist/twilight/{p-46d1823f.entry.js → p-e7f24388.entry.js} +1 -1
- package/dist/twilight/{p-45e4f6f4.entry.js → p-ea1d2cb2.entry.js} +1 -1
- package/dist/twilight/{p-7829ea8a.entry.js → p-ec4ebce6.entry.js} +1 -1
- package/dist/twilight/{p-b8404cfb.entry.js → p-ef657fcb.entry.js} +1 -1
- package/dist/twilight/{p-cbe620c4.entry.js → p-f2923bb7.entry.js} +1 -1
- package/dist/twilight/{p-34920aac.entry.js → p-f6a74c33.entry.js} +1 -1
- package/dist/twilight/{p-8f2dfc57.entry.js → p-f8ec12b9.entry.js} +1 -1
- package/dist/twilight/{p-25a9bf1b.entry.js → p-fe526213.entry.js} +1 -1
- package/dist/twilight/{p-f8fcc8f4.entry.js → p-ffab1808.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +18 -5
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +6 -1
- package/dist/types/components.d.ts +12 -4
- package/package.json +5 -5
- package/dist/twilight/p-3656b48d.entry.js +0 -4
- package/dist/twilight/p-a4aedcfe.entry.js +0 -4
|
@@ -34,6 +34,7 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
34
34
|
this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');
|
|
35
35
|
this.invalidDate = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');
|
|
36
36
|
this.offerEnded = false;
|
|
37
|
+
this.parseFailed = false;
|
|
37
38
|
this.showDays = true;
|
|
38
39
|
this.showHours = true;
|
|
39
40
|
this.days = this.number(0);
|
|
@@ -77,21 +78,19 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
77
78
|
}
|
|
78
79
|
if (this.normalizedPreOrder?.end_date) {
|
|
79
80
|
this.date = this.normalizedPreOrder.end_date;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
}
|
|
82
|
+
if (this.date && this.isValidDate(this.date)) {
|
|
83
|
+
this.startCountDown();
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
|
-
* Normalize
|
|
87
|
-
* Handles formats like "MM-DD-YYYY,HH:mm:ss am/pm" by converting to
|
|
88
|
-
* "MM/DD/YYYY HH:mm:ss am/pm".
|
|
87
|
+
* Normalize US-style date formats to ISO "YYYY-MM-DD[ HH:mm:ss]".
|
|
89
88
|
*/
|
|
90
89
|
normalizeDate(date) {
|
|
91
|
-
//
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
const [, month, day, year, rawHour, min, sec, period] =
|
|
90
|
+
// "MM-DD-YYYY,HH:mm:ss am/pm"
|
|
91
|
+
const dateTimeMatch = date.match(/^(\d{1,2})-(\d{1,2})-(\d{4}),(\d{1,2}):(\d{2}):(\d{2})\s*(am|pm)$/i);
|
|
92
|
+
if (dateTimeMatch) {
|
|
93
|
+
const [, month, day, year, rawHour, min, sec, period] = dateTimeMatch;
|
|
95
94
|
let hour = parseInt(rawHour, 10);
|
|
96
95
|
if (period.toLowerCase() === 'pm' && hour < 12)
|
|
97
96
|
hour += 12;
|
|
@@ -102,6 +101,14 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
102
101
|
const dd = String(day).padStart(2, '0');
|
|
103
102
|
return `${year}-${mm}-${dd} ${hh}:${min}:${sec}`;
|
|
104
103
|
}
|
|
104
|
+
// "MM-DD-YYYY" (date only, 4-digit year at the end distinguishes it from ISO YYYY-MM-DD)
|
|
105
|
+
const dateOnlyMatch = date.match(/^(\d{1,2})-(\d{1,2})-(\d{4})$/);
|
|
106
|
+
if (dateOnlyMatch) {
|
|
107
|
+
const [, month, day, year] = dateOnlyMatch;
|
|
108
|
+
const mm = String(month).padStart(2, '0');
|
|
109
|
+
const dd = String(day).padStart(2, '0');
|
|
110
|
+
return `${year}-${mm}-${dd}`;
|
|
111
|
+
}
|
|
105
112
|
return date;
|
|
106
113
|
}
|
|
107
114
|
isValidDate(date) {
|
|
@@ -138,6 +145,13 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
138
145
|
}
|
|
139
146
|
countDownTime = countDownDate.getTime();
|
|
140
147
|
}
|
|
148
|
+
// Safety net: if parsing fails despite passing isValidDate, show the
|
|
149
|
+
// invalid date message instead of ticking with NaN values.
|
|
150
|
+
if (Number.isNaN(countDownTime)) {
|
|
151
|
+
salla.logger.warn(`[salla-count-down] unable to parse date: "${this.date}"`);
|
|
152
|
+
this.parseFailed = true;
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
141
155
|
const tick = () => {
|
|
142
156
|
const distance = countDownTime - Date.now();
|
|
143
157
|
const dRaw = Math.floor(distance / (1000 * 60 * 60 * 24));
|
|
@@ -203,7 +217,7 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
203
217
|
renderContent() {
|
|
204
218
|
if (!this.date)
|
|
205
219
|
return null;
|
|
206
|
-
if (!this.isValidDate(this.date)) {
|
|
220
|
+
if (!this.isValidDate(this.date) || this.parseFailed) {
|
|
207
221
|
return this.renderInvalidDate();
|
|
208
222
|
}
|
|
209
223
|
if (this.preOrder) {
|
|
@@ -212,7 +226,7 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
212
226
|
return this.renderCountDown();
|
|
213
227
|
}
|
|
214
228
|
render() {
|
|
215
|
-
return (h(Host, { key: '
|
|
229
|
+
return (h(Host, { key: '9922798f1c6e0ddbdedd2529e0e5d24a74ebf3d8', 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()));
|
|
216
230
|
}
|
|
217
231
|
static get style() { return sallaCountDownCss; }
|
|
218
232
|
}, [0, "salla-count-down", {
|
|
@@ -242,6 +256,7 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
242
256
|
"endLabel": [32],
|
|
243
257
|
"invalidDate": [32],
|
|
244
258
|
"offerEnded": [32],
|
|
259
|
+
"parseFailed": [32],
|
|
245
260
|
"countInterval": [32],
|
|
246
261
|
"days": [32],
|
|
247
262
|
"hours": [32],
|
|
@@ -109,6 +109,9 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
109
109
|
this.open();
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
+
isPhysical() {
|
|
113
|
+
return this.physicalProducts || this.physical;
|
|
114
|
+
}
|
|
112
115
|
componentDidLoad() {
|
|
113
116
|
salla.event.product.onPriceUpdated(() => {
|
|
114
117
|
const quantityInput = document.querySelector(`.s-quantity-input-input`);
|
|
@@ -477,7 +480,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
477
480
|
{ key: 'sender_name', value: this.senderName, label: this.senderNameLabel },
|
|
478
481
|
{ key: 'receiver.name', value: this.receiverName, label: this.receiverNameFieldLabel },
|
|
479
482
|
{ key: 'receiver.mobile', value: this.receiverMobile, label: this.receiverMobileFieldLabel },
|
|
480
|
-
...(this.
|
|
483
|
+
...(this.isPhysical() ? [
|
|
481
484
|
{ key: 'receiver.country', value: this.selectedCountryId, label: this.receiverCountryFieldLabel },
|
|
482
485
|
...(this.isKSA ? [{ key: 'receiver.region', value: this.selectedRegionId, label: this.receiverRegionFieldLabel }] : []),
|
|
483
486
|
{ key: 'receiver.city_id', value: this.receiverCity, label: this.receiverCityFieldLabel },
|
|
@@ -505,9 +508,9 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
505
508
|
name: this.receiverName,
|
|
506
509
|
mobile_country_code: this.receiverCountryCode,
|
|
507
510
|
mobile: this.receiverMobile,
|
|
508
|
-
...(this.
|
|
509
|
-
...(this.
|
|
510
|
-
...(this.receiverCity && this.
|
|
511
|
+
...(this.isPhysical() && this.selectedCountryCode ? { country_code: this.selectedCountryCode } : {}),
|
|
512
|
+
...(this.isPhysical() && this.selectedRegionId ? { region_id: this.selectedRegionId } : {}),
|
|
513
|
+
...(this.receiverCity && this.isPhysical() ? { city_id: this.receiverCity } : {})
|
|
511
514
|
},
|
|
512
515
|
has_apple_pay: salla.helpers.hasApplePay(),
|
|
513
516
|
};
|
|
@@ -568,7 +571,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
568
571
|
}
|
|
569
572
|
render() {
|
|
570
573
|
return [
|
|
571
|
-
h("div", { key: '
|
|
574
|
+
h("div", { key: 'ea8b7581fc816b2984ec7a8c9f0d5bfb30710577' }, h("salla-list-tile", { key: '44e4b948c467ecbec4934f894af3e88a01567338', class: this.generateClass() }, h("div", { key: 'c36ccc48ff4209d2aad05123981c8efad4de8642', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: 'd5cfd335582f2af620ef50ae92b431b3fdf84b71' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '9623168820eefb63c833dd14c68c1dc20afe1cd1', slot: "subtitle" }, h("div", { key: 'e2fda7dc68054c0f382f61d74a578589b565a544' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'e888e024772c0ef848e4a4113b218bb4e05d78db', slot: "action" }, h("salla-button", { key: 'd443bfd1f5925299a4e0510fae8fc175d390b55a', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '8df23b83891ee2abf644cde76675ca6bb796db79', name: "widget-btn-content" }, h("div", { key: '6b5153a1f1b9d5e127093c3fcc96e2a0fa4954f4', class: "s-gifting-widget-action-content" }, h("span", { key: '41a7f2e88c8046d7211abf5d7fc9d3f533c02292', innerHTML: GiftSharing }), " \u00A0", h("span", { key: '45ea8eac19ca9cccf37cd34d8f84211e6172cd45' }, this.sectionBtnText)))))), h("salla-modal", { key: '5bd076c54c4d072886671653e536c649763785b1', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '378d12f388bd0627355af5b4e57929c00ae28044', slot: "loading" }, h("div", { key: '1b738d4b461a9ebe3a5184f4de727bb1b4b45890', class: "s-gifting-skeleton" }, h("div", { key: '660c901f477536e68d2a3bacd028438c9726b968', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '46f8e45a0a38c10784fc5f3505092e65ed2bba3a', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '09b3356d736e5eb46bb51df2e2fa539dc9d8c99f', class: "s-gifting-modal-title" }, h("div", { key: 'cc8cb7dece64c65d5891e32e49588316e9009f6c', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '41b30274a655babdd0c9e26e74dc3f0bdd4a2aea', height: '15px', width: '150px' })))), h("div", { key: 'b241162827a085279f646452a151d6483a37cc8e', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '5ac15a8e94b50ea03cd033375b08f9e4406a7e17', height: '10px', width: '150px' }), h("salla-skeleton", { key: '697e157e475df0cb71b79e3752019f522ed847a3', height: '230px' }), h("salla-skeleton", { key: '8a5e586c059b765f6425d7060a18e8d799be3c4f', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'e1ee17daef6904b8302b0f4437e99b221bd6b236', height: '30px' }), h("salla-skeleton", { key: '9dfbca00f18a37348eb83021ef4fec073685fe7d', height: '40px' })))), h("slot", { key: 'da2c687a186ed115acee04cc683eff3a6a73168f', name: "header" }), !!this.hasError ?
|
|
572
575
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
573
576
|
:
|
|
574
577
|
[
|
|
@@ -580,15 +583,15 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
580
583
|
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
584
|
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
585
|
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'] ?
|
|
583
|
-
h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.
|
|
586
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.isPhysical() &&
|
|
584
587
|
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.
|
|
588
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), this.isPhysical() && this.isKSA &&
|
|
586
589
|
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.
|
|
590
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.region']) : ''), this.isPhysical() &&
|
|
588
591
|
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.
|
|
590
|
-
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo)), !this.
|
|
591
|
-
], h("slot", { key: '
|
|
592
|
+
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() &&
|
|
593
|
+
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo)), !this.isPhysical() && 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)))))
|
|
594
|
+
], h("slot", { key: '20793a5a50c708c93be79df033e43a36e615d075', name: "footer" })))
|
|
592
595
|
];
|
|
593
596
|
}
|
|
594
597
|
static get style() { return sallaGiftingCss; }
|
|
@@ -597,6 +600,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
597
600
|
"widgetTitle": [1, "widget-title"],
|
|
598
601
|
"widgetSubtitle": [1, "widget-subtitle"],
|
|
599
602
|
"physicalProducts": [4, "physical-products"],
|
|
603
|
+
"physical": [4],
|
|
600
604
|
"vertical": [4],
|
|
601
605
|
"formSelector": [1025, "form-selector"],
|
|
602
606
|
"sectionTitle": [32],
|