@salla.sa/twilight-components 2.14.289 → 2.14.291
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-Dm0x0O8b.js → filepond-l0In8JzI.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-PiBaM_bd.js → filepond-plugin-file-poster--TMslLdw.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-C-D9xlEy.js → filepond-plugin-file-validate-size-asc4GviL.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-C4TIjZKW.js → filepond-plugin-file-validate-type-MAcIW_lX.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Ck73YGpU.js → filepond-plugin-image-edit-8yC2fM_b.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DXbTakAd.js → filepond-plugin-image-exif-orientation-D2TaYNJz.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Dt9MTqMH.js → filepond-plugin-image-preview-ZhHJTUGt.js} +1 -1
- package/dist/cjs/{index-DN2d5u5h.js → index-BCqSMje8.js} +1 -1
- package/dist/cjs/{index-5Ofzde3D.js → index-CD__TuQ1.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +21 -16
- package/dist/cjs/salla-advertisement.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-cart-item-offers.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-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.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-metadata.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.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-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +13 -8
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.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-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +3 -3
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +12 -7
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-login-modal.js +3 -3
- package/dist/components/salla-order-totals-card.js +12 -7
- package/dist/components/salla-quick-buy2.js +8 -3
- package/dist/components/salla-user-menu.js +1 -1
- package/dist/esm/{filepond-LS0BnT_g.js → filepond-D-hh7StM.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B6DCphFr.js → filepond-plugin-file-poster-B9peApDJ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CRSgWaGm.js → filepond-plugin-file-validate-size-Clsj6zmt.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DdqIvBew.js → filepond-plugin-file-validate-type-NUNR5wrE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DtDPmD-D.js → filepond-plugin-image-edit-D9mIu1qc.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DS8OKi5c.js → filepond-plugin-image-exif-orientation-DjJUiKBi.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-B8C1Jcst.js → filepond-plugin-image-preview-Dqa9Qh69.js} +1 -1
- package/dist/esm/{index-DlKVFFYY.js → index-BdPAI7KX.js} +2 -2
- package/dist/esm/{index-BNVbLIaP.js → index-r_fPtAzd.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +21 -16
- package/dist/esm/salla-advertisement.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-cart-item-offers.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-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.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-metadata.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.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-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +13 -8
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.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-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/twilight/p-0230315b.entry.js +4 -0
- package/dist/twilight/{p-6d1b429d.entry.js → p-025d49de.entry.js} +1 -1
- package/dist/twilight/{p-bd051f83.entry.js → p-0a7758ed.entry.js} +1 -1
- package/dist/twilight/{p-b049c84f.entry.js → p-0c5e2e36.entry.js} +1 -1
- package/dist/twilight/{p-2cb7f4d0.entry.js → p-23541825.entry.js} +1 -1
- package/dist/twilight/{p-a5c02e26.entry.js → p-2684045e.entry.js} +1 -1
- package/dist/twilight/{p-90e8e793.entry.js → p-2a4d5b5a.entry.js} +1 -1
- package/dist/twilight/{p-7e3e158d.entry.js → p-2d563fd2.entry.js} +1 -1
- package/dist/twilight/{p-5016c1ef.entry.js → p-2d7377e6.entry.js} +1 -1
- package/dist/twilight/{p-a1ee98f7.entry.js → p-2e338f09.entry.js} +1 -1
- package/dist/twilight/{p-03db9f1b.entry.js → p-2ebf898f.entry.js} +1 -1
- package/dist/twilight/{p-bb18243d.entry.js → p-3420836d.entry.js} +1 -1
- package/dist/twilight/{p-ed2158c7.entry.js → p-362bbc51.entry.js} +1 -1
- package/dist/twilight/{p-edf4c9a6.entry.js → p-4b2e8325.entry.js} +1 -1
- package/dist/twilight/{p-9f0aac15.entry.js → p-54a6b727.entry.js} +1 -1
- package/dist/twilight/{p-8c946816.entry.js → p-5b2567af.entry.js} +1 -1
- package/dist/twilight/{p-9a34b6a3.entry.js → p-5bff3464.entry.js} +1 -1
- package/dist/twilight/{p-8eb59229.entry.js → p-62f6d935.entry.js} +1 -1
- package/dist/twilight/p-70567b55.entry.js +11 -0
- package/dist/twilight/{p-a8895ce7.entry.js → p-7ce146ac.entry.js} +1 -1
- package/dist/twilight/{p-9d805e14.entry.js → p-8110e635.entry.js} +1 -1
- package/dist/twilight/{p-82e75430.entry.js → p-84f7d6ff.entry.js} +1 -1
- package/dist/twilight/{p-5634d90b.entry.js → p-85d33ec2.entry.js} +1 -1
- package/dist/twilight/{p-b787f1bc.entry.js → p-9706a388.entry.js} +1 -1
- package/dist/twilight/{p-55b3ced1.entry.js → p-9b001f92.entry.js} +1 -1
- package/dist/twilight/{p-30745d8f.entry.js → p-9e190a6a.entry.js} +1 -1
- package/dist/twilight/{p-8spsplmU.js → p-BOK_dArT.js} +1 -1
- package/dist/twilight/{p-CSilg0z8.js → p-BUxBV1_U.js} +1 -1
- package/dist/twilight/{p-DlKVFFYY.js → p-BdPAI7KX.js} +1 -1
- package/dist/twilight/{p-B9NDobR7.js → p-CJ4oSd-N.js} +1 -1
- package/dist/twilight/{p-Bc1lpXBc.js → p-DVxWyl5d.js} +1 -1
- package/dist/twilight/{p-RlJbbtgA.js → p-Dkl8u_H6.js} +1 -1
- package/dist/twilight/{p-CYYvuyYZ.js → p-DuzBFC4S.js} +1 -1
- package/dist/twilight/{p-BpMC61PN.js → p-TjgJW4j-.js} +1 -1
- package/dist/twilight/{p-03bec6db.entry.js → p-aa85a960.entry.js} +1 -1
- package/dist/twilight/{p-2917778e.entry.js → p-b2378248.entry.js} +1 -1
- package/dist/twilight/{p-00ef717d.entry.js → p-b354fb32.entry.js} +1 -1
- package/dist/twilight/{p-e1c317d4.entry.js → p-b609c0a3.entry.js} +1 -1
- package/dist/twilight/{p-fa8d3613.entry.js → p-c96ebac7.entry.js} +1 -1
- package/dist/twilight/{p-e0d34781.entry.js → p-ef28a883.entry.js} +1 -1
- package/dist/twilight/{p-ff9873e2.entry.js → p-efdf02d5.entry.js} +1 -1
- package/dist/twilight/{p-DvOSgera.js → p-oMzSzsXO.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-order-totals-card/interfaces.d.ts +1 -0
- package/dist/types/components/salla-order-totals-card/salla-order-totals-card.d.ts +2 -1
- package/package.json +5 -5
- package/dist/twilight/p-20a33ba3.entry.js +0 -4
- package/dist/twilight/p-453b5bd6.entry.js +0 -11
|
@@ -225,10 +225,10 @@ const SallaLoginModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoginModal
|
|
|
225
225
|
this.modal.close();
|
|
226
226
|
Salla.auth.event.tokenFetched(token);
|
|
227
227
|
try {
|
|
228
|
-
await Salla.cart.
|
|
228
|
+
await Salla.api.cart.assign();
|
|
229
229
|
}
|
|
230
|
-
catch (
|
|
231
|
-
Salla.log('Error on assign');
|
|
230
|
+
catch (err) {
|
|
231
|
+
Salla.log('Error on assign after handle iframe', err);
|
|
232
232
|
}
|
|
233
233
|
withCartReset && Salla.cart.reset();
|
|
234
234
|
!Salla.auth.api.isSessionless() && await Salla.auth.api.request('auth/jwt');
|
|
@@ -19,7 +19,7 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
async componentWillLoad() {
|
|
22
|
-
await
|
|
22
|
+
await Salla.onReady();
|
|
23
23
|
if (this.order) {
|
|
24
24
|
this.setSummaryFromProp(this.order);
|
|
25
25
|
}
|
|
@@ -37,8 +37,11 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
37
37
|
renderTotalRow(label, amount, labelClass, valueClass, isBold) {
|
|
38
38
|
return (h("div", { class: "s-order-totals-card-row" }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: labelClass || 's-order-totals-card-label' }, label), h("dd", { class: valueClass || 's-order-totals-card-value' }, isBold ? (h("b", { innerHTML: salla.money(amount) })) : (h("span", { innerHTML: salla.money(amount) }))))));
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
return
|
|
40
|
+
renderDiscountRow() {
|
|
41
|
+
return this.summary?.discounts?.map(discount => (h("div", { class: "s-order-totals-card-row", key: discount.name }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: "s-order-totals-card-discount" }, discount.name), h("dd", { class: "s-order-totals-card-value" }, discount.discount)))));
|
|
42
|
+
}
|
|
43
|
+
renderRefundRow(amount) {
|
|
44
|
+
return (h("div", { class: "s-order-totals-card-row" }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: "s-order-totals-card-refund-label" }, h("span", { class: "s-order-totals-card-refund-icon" }, h("i", { class: "sicon-info" })), h("span", null, " ", salla.lang.get('pages.orders.refund_amount'))), h("dd", { class: "s-order-totals-card-refund-value" }, h("b", { innerHTML: salla.money(amount) })))));
|
|
42
45
|
}
|
|
43
46
|
render() {
|
|
44
47
|
if (!this.summary) {
|
|
@@ -47,12 +50,14 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
47
50
|
const { summary } = this;
|
|
48
51
|
const hasOptions = Array.isArray(summary.options) ? summary.options.length > 0 : false;
|
|
49
52
|
return (h(Host, { class: "s-order-totals-card-wrapper" }, h("div", { class: "s-order-totals-card-panel" }, h("h2", { id: "summary-heading", class: "s-order-totals-card-heading" }, salla.lang.get('pages.orders.summary')), h("div", { class: "s-order-totals-card-flow" }, h("dl", { class: "s-order-totals-card-list" }, this.renderTotalRow(salla.lang.get('pages.cart.items_total'), summary.sub_total), hasOptions &&
|
|
50
|
-
this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.
|
|
53
|
+
this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDiscountRow(), summary.cod_cost &&
|
|
51
54
|
this.renderTotalRow(salla.lang.get('pages.orders.cod_cost'), summary.cod_cost, ''), summary.shipping_cost &&
|
|
52
55
|
this.renderTotalRow(salla.lang.get('pages.orders.shipping_cost'), summary.shipping_cost, 's-order-totals-card-shipping'), summary.tax &&
|
|
53
|
-
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount
|
|
54
|
-
this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
|
|
55
|
-
|
|
56
|
+
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount
|
|
57
|
+
? this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
|
|
58
|
+
: null, summary.remaining_amount
|
|
59
|
+
? this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '')
|
|
60
|
+
: null, h("div", { class: "s-order-totals-card-total" }, this.renderTotalRow(salla.lang.get('pages.orders.final_total'), summary.total, 's-order-totals-card-total-label', 's-order-totals-card-total-value', true)), summary.refund_amount ? (h("div", { class: "s-order-totals-card-refund" }, this.renderRefundRow(summary.refund_amount))) : null)))));
|
|
56
61
|
}
|
|
57
62
|
static get watchers() { return {
|
|
58
63
|
"order": ["handleOrderChange"]
|
|
@@ -662,13 +662,18 @@ window.SallaApplePay = {
|
|
|
662
662
|
|
|
663
663
|
selectApplePayShippingMethod: (company_id, private_company_id) => {
|
|
664
664
|
salla.logger.log('🍏 Pay: select shipping method ', 'company_id : ' + company_id, 'private_company_id: ' + private_company_id);
|
|
665
|
-
|
|
666
|
-
return Http.requestWithSupportAjax(SallaApplePay.detail.shippingMethodSelected.url.replace('{id}', SallaApplePay.id), {
|
|
665
|
+
const payload = {
|
|
667
666
|
address_id: SallaApplePay.address_id,
|
|
668
667
|
company_id: company_id,
|
|
669
668
|
private_company_id: private_company_id,
|
|
670
669
|
payment_method: 'apple_pay'
|
|
671
|
-
}
|
|
670
|
+
};
|
|
671
|
+
const selectedShippingMethod = SallaApplePay.shipping_methods?.find((item)=> item.company === company_id || item.ship_id === company_id);
|
|
672
|
+
if (selectedShippingMethod?.route_id){
|
|
673
|
+
payload.shipping_route_id = selectedShippingMethod.route_id;
|
|
674
|
+
payload.type = selectedShippingMethod.type;
|
|
675
|
+
}
|
|
676
|
+
return Http.requestWithSupportAjax(SallaApplePay.detail.shippingMethodSelected.url.replace('{id}', SallaApplePay.id), payload, 'post').then(() => {
|
|
672
677
|
if (typeof SallaApplePay.detail.shippingMethodSelected.onSuccess === 'function') {
|
|
673
678
|
SallaApplePay.detail.shippingMethodSelected.onSuccess(data);
|
|
674
679
|
}
|
|
@@ -216,7 +216,7 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
|
|
|
216
216
|
return (h("li", { class: {
|
|
217
217
|
's-user-menu-dropdown-item': true,
|
|
218
218
|
's-user-menu-dropdown-item-logout': i + 1 == Object.entries(this.items).length,
|
|
219
|
-
} }, h("a", { href: salla.url.get(item[0]), onClick: event => this.menuItemClicked(event, item) }, h("i", { innerHTML: item[1] }, " "), h("span", { class: "s-user-menu-dropdown-item-title" }, this[item[0]]), !['٠', '0', undefined].includes(this.badges[item[0]]) ? (h("span", { class: "s-user-menu-dropdown-item-badge" }, this.badges[item[0]])) : (''))));
|
|
219
|
+
} }, h("a", { href: salla.url.get(item[0] === 'loyalty_program' ? 'loyalty' : item[0]), onClick: event => this.menuItemClicked(event, item) }, h("i", { innerHTML: item[1] }, " "), h("span", { class: "s-user-menu-dropdown-item-title" }, this[item[0]]), !['٠', '0', undefined].includes(this.badges[item[0]]) ? (h("span", { class: "s-user-menu-dropdown-item-badge" }, this.badges[item[0]])) : (''))));
|
|
220
220
|
}
|
|
221
221
|
componentShouldUpdate() {
|
|
222
222
|
if (!this.opened) {
|