@salla.sa/twilight-components 2.14.298 → 2.14.300
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/{Helper-C9UmWIYn.js → Helper-B5NunIdR.js} +1 -0
- package/dist/cjs/{filepond-Dn-jnnWy.js → filepond-BScg3EjA.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-4K4RC5sx.js → filepond-plugin-file-poster-C0equ1tk.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-B85pytvJ.js → filepond-plugin-file-validate-size-DbSDO39t.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-vWh-hrFq.js → filepond-plugin-file-validate-type-oNrCSQ4M.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-B3-_-hIs.js → filepond-plugin-image-edit-CEs1Wvna.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-Cbkb7_k1.js → filepond-plugin-image-exif-orientation-CR0z9rwJ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CqcNMHtt.js → filepond-plugin-image-preview-QCP0yf11.js} +1 -1
- package/dist/cjs/{index-Z2nWod3c.js → index-bUFB5h9D.js} +1 -1
- package/dist/cjs/{index-DENUwtYT.js → index-tXQykYB9.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +29 -30
- 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-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- 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/Helpers/Helper.js +1 -0
- package/dist/collection/components/salla-products-list/salla-products-list.js +3 -3
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +18 -19
- package/dist/components/Helper.js +1 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-products-list2.js +1 -1
- package/dist/components/salla-user-menu.js +18 -19
- package/dist/esm/{Helper-B51hb0bi.js → Helper-Bt5Zv9cl.js} +1 -0
- package/dist/esm/{filepond-q8kfR-qI.js → filepond-DZgILbOT.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CAkqJrqM.js → filepond-plugin-file-poster-DMXXHQ1L.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-lHUJVKW0.js → filepond-plugin-file-validate-size-uKHV0jNp.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-FHDAVW2X.js → filepond-plugin-file-validate-type-D8hhJ9EB.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-drdbdxxE.js → filepond-plugin-image-edit-0X2RSyN6.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-Kqs0PJBo.js → filepond-plugin-image-exif-orientation-0v28bqEm.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BZGs88rC.js → filepond-plugin-image-preview-rwaj1mis.js} +1 -1
- package/dist/esm/{index-CPlWMNOm.js → index-DA5HnTzR.js} +1 -1
- package/dist/esm/{index-Bh2SK07N.js → index-Vf9-v4wr.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +29 -30
- 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-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/esm/salla-orders.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- 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-BLPRGu3L.js → p--XHnNbTg.js} +1 -1
- package/dist/twilight/{p-62fd72e0.entry.js → p-060b76fc.entry.js} +1 -1
- package/dist/twilight/{p-d6c99665.entry.js → p-10627275.entry.js} +1 -1
- package/dist/twilight/{p-c31e0731.entry.js → p-11258ae1.entry.js} +1 -1
- package/dist/twilight/{p-5460b611.entry.js → p-11734c15.entry.js} +2 -2
- package/dist/twilight/{p-dbce8093.entry.js → p-11e3381f.entry.js} +1 -1
- package/dist/twilight/{p-c69d87e4.entry.js → p-151c103f.entry.js} +1 -1
- package/dist/twilight/{p-8d246fcd.entry.js → p-20c4c8af.entry.js} +1 -1
- package/dist/twilight/{p-6891ae55.entry.js → p-3d92ba5c.entry.js} +1 -1
- package/dist/twilight/{p-5789243f.entry.js → p-446bd291.entry.js} +1 -1
- package/dist/twilight/{p-de903389.entry.js → p-4ba71acf.entry.js} +1 -1
- package/dist/twilight/{p-4c74e526.entry.js → p-4d3071a5.entry.js} +1 -1
- package/dist/twilight/{p-842debd3.entry.js → p-53ad8f04.entry.js} +1 -1
- package/dist/twilight/{p-4df42ff8.entry.js → p-5426fed3.entry.js} +1 -1
- package/dist/twilight/{p-1863db37.entry.js → p-65103ff7.entry.js} +1 -1
- package/dist/twilight/{p-85d168c9.entry.js → p-6d112428.entry.js} +1 -1
- package/dist/twilight/{p-7d3b2c8d.entry.js → p-70750924.entry.js} +1 -1
- package/dist/twilight/{p-11d325ba.entry.js → p-7a980667.entry.js} +1 -1
- package/dist/twilight/{p-af92eed9.entry.js → p-81f65a33.entry.js} +1 -1
- package/dist/twilight/{p-b4127acc.entry.js → p-83a0e642.entry.js} +1 -1
- package/dist/twilight/{p-b2ab5fcc.entry.js → p-8f3f3530.entry.js} +1 -1
- package/dist/twilight/{p-ccfd9c1e.entry.js → p-91b68094.entry.js} +1 -1
- package/dist/twilight/{p-5981c13b.entry.js → p-9795c6d0.entry.js} +1 -1
- package/dist/twilight/{p-5f46651c.entry.js → p-97e6602f.entry.js} +1 -1
- package/dist/twilight/{p-CtJEHiDh.js → p-B7BW4Mdj.js} +1 -1
- package/dist/twilight/{p-BcA-Dpxf.js → p-BmD3prgX.js} +1 -1
- package/dist/twilight/{p-HMoEZhqa.js → p-CPQv1htQ.js} +1 -1
- package/dist/twilight/p-DQd7LCNI.js +9 -0
- package/dist/twilight/{p-sK70mswA.js → p-DUIBkQ0L.js} +1 -1
- package/dist/twilight/p-Dljb4XCt.js +4 -0
- package/dist/twilight/{p-DykGR1vx.js → p-EFshmXnQ.js} +1 -1
- package/dist/twilight/{p-Bh2SK07N.js → p-Vf9-v4wr.js} +1 -1
- package/dist/twilight/{p-ecddf6ff.entry.js → p-a9adb89e.entry.js} +1 -1
- package/dist/twilight/{p-e584c46f.entry.js → p-afeeefb3.entry.js} +1 -1
- package/dist/twilight/{p-cef92263.entry.js → p-b7ca90d8.entry.js} +1 -1
- package/dist/twilight/{p-3f62e05b.entry.js → p-bb3a0dbc.entry.js} +1 -1
- package/dist/twilight/{p-0d04ca56.entry.js → p-c77da76a.entry.js} +1 -1
- package/dist/twilight/{p-9d46ba91.entry.js → p-d062aafc.entry.js} +1 -1
- package/dist/twilight/{p-b2548a59.entry.js → p-ddd3cb10.entry.js} +1 -1
- package/dist/twilight/{p-8f481f80.entry.js → p-dfb1f2bb.entry.js} +1 -1
- package/dist/twilight/{p-5f815dc4.entry.js → p-f155cb58.entry.js} +1 -1
- package/dist/twilight/{p-99b49b76.entry.js → p-f54b0939.entry.js} +1 -1
- package/dist/twilight/{p-e23f38dc.entry.js → p-fadae641.entry.js} +1 -1
- package/dist/twilight/{p-B0jU8m7y.js → p-ozyDVWVs.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +2 -2
- package/dist/types/components.d.ts +2 -2
- package/package.json +5 -5
- package/dist/twilight/p-DFYs0E0K.js +0 -9
- package/dist/twilight/p-X-ZUrwUQ.js +0 -4
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
var specialDiscount = require('./special-discount-OVG_9Kf9.js');
|
|
9
9
|
var check = require('./check-CLRvuniI.js');
|
|
10
|
-
var Helper = require('./Helper-
|
|
10
|
+
var Helper = require('./Helper-B5NunIdR.js');
|
|
11
11
|
var arrowLeft = require('./arrow-left-xSEmRpp6.js');
|
|
12
12
|
var interfaces = require('./interfaces-CX9-6aLf.js');
|
|
13
13
|
var shoppingBag = require('./shopping-bag-C1gvTVHr.js');
|
|
@@ -3544,13 +3544,13 @@ const SallaFileUpload = class {
|
|
|
3544
3544
|
return;
|
|
3545
3545
|
try {
|
|
3546
3546
|
const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
|
|
3547
|
-
Promise.resolve().then(function () { return require('./filepond-
|
|
3548
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-
|
|
3549
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-
|
|
3550
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-
|
|
3551
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-
|
|
3552
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-
|
|
3553
|
-
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-
|
|
3547
|
+
Promise.resolve().then(function () { return require('./filepond-BScg3EjA.js'); }).then(function (n) { return n.filepond; }),
|
|
3548
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-DbSDO39t.js'); }).then(function (n) { return n.filepondPluginFileValidateSize; }),
|
|
3549
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-CR0z9rwJ.js'); }).then(function (n) { return n.filepondPluginImageExifOrientation; }),
|
|
3550
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-QCP0yf11.js'); }).then(function (n) { return n.filepondPluginImagePreview; }),
|
|
3551
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-CEs1Wvna.js'); }).then(function (n) { return n.filepondPluginImageEdit; }),
|
|
3552
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-oNrCSQ4M.js'); }).then(function (n) { return n.filepondPluginFileValidateType; }),
|
|
3553
|
+
Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-C0equ1tk.js'); }).then(function (n) { return n.filepondPluginFilePoster; })
|
|
3554
3554
|
]);
|
|
3555
3555
|
this.FilePond = FilePondModule;
|
|
3556
3556
|
// Register plugins
|
|
@@ -8654,7 +8654,7 @@ const SallaProductsList = class {
|
|
|
8654
8654
|
return salla.config.get('store.settings.product.filters') && this.filtersResults;
|
|
8655
8655
|
}
|
|
8656
8656
|
isSourceWithoutValue() {
|
|
8657
|
-
return ['offers', 'latest', 'sales', 'wishlist', 'top-rated'].includes(this.getSource());
|
|
8657
|
+
return ['offers', 'latest', 'sales', 'wishlist', 'top-rated', 'reorder'].includes(this.getSource());
|
|
8658
8658
|
}
|
|
8659
8659
|
animateItems() {
|
|
8660
8660
|
anime_es.anime({
|
|
@@ -12530,7 +12530,7 @@ const SallaTelInput = class {
|
|
|
12530
12530
|
if (this.TelInput)
|
|
12531
12531
|
return;
|
|
12532
12532
|
try {
|
|
12533
|
-
const telInputModule = await Promise.resolve().then(function () { return require('./index-
|
|
12533
|
+
const telInputModule = await Promise.resolve().then(function () { return require('./index-bUFB5h9D.js'); }).then(function (n) { return n.index; });
|
|
12534
12534
|
this.TelInput = telInputModule.default;
|
|
12535
12535
|
}
|
|
12536
12536
|
catch (error) {
|
|
@@ -12713,7 +12713,7 @@ const SallaUserMenu = class {
|
|
|
12713
12713
|
notifications: salla.helpers.number(salla.storage.get('user.notifications') || 0),
|
|
12714
12714
|
pending_orders: salla.helpers.number(salla.storage.get('user.pending_orders') || 0),
|
|
12715
12715
|
};
|
|
12716
|
-
this.sallaAccountEnabled =
|
|
12716
|
+
this.sallaAccountEnabled = false;
|
|
12717
12717
|
this.hasBadges = Number(salla.storage.get('user.pending_orders')) > 0 ||
|
|
12718
12718
|
Number(salla.storage.get('user.notifications')) > 0;
|
|
12719
12719
|
/**
|
|
@@ -12799,18 +12799,19 @@ const SallaUserMenu = class {
|
|
|
12799
12799
|
}
|
|
12800
12800
|
});
|
|
12801
12801
|
}
|
|
12802
|
-
componentWillLoad() {
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12802
|
+
async componentWillLoad() {
|
|
12803
|
+
await salla.onReady();
|
|
12804
|
+
await salla.lang.onLoaded();
|
|
12805
|
+
this.sallaAccountEnabled = Salla.config.get('store.features')?.includes('salla-account');
|
|
12806
|
+
this.profileUrl = `${salla.config.get('account.url', 'https://accounts.salla.com')}/${salla.config.get('user.language_code')}/user?store=${salla.config.get('store.id')}&info=${salla.storage.get('token')}`;
|
|
12807
|
+
const trigger = this.host.querySelector('[slot="trigger"]');
|
|
12808
|
+
this.triggerSlot =
|
|
12809
|
+
'<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>';
|
|
12810
|
+
if (!trigger) {
|
|
12811
|
+
return;
|
|
12812
|
+
}
|
|
12813
|
+
this.triggerSlot = trigger.innerHTML;
|
|
12814
|
+
trigger.innerHTML = this.replaceParams(trigger.innerHTML);
|
|
12814
12815
|
}
|
|
12815
12816
|
fetchFreshProfile() {
|
|
12816
12817
|
//don't request fetchFreshProfile unless token is injected into the api
|
|
@@ -12862,20 +12863,18 @@ const SallaUserMenu = class {
|
|
|
12862
12863
|
}, id: "trigger-slot", onClick: e => this.open(e), onKeyUp: e => this.open(e), innerHTML: this.replaceParams(this.triggerSlot) }));
|
|
12863
12864
|
}
|
|
12864
12865
|
getItemAnchorLinkAttrs(itemKey) {
|
|
12865
|
-
if (itemKey === 'profile' && this.profileUrl) {
|
|
12866
|
-
return this.
|
|
12867
|
-
{ href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' } :
|
|
12868
|
-
{ href: '/profile' };
|
|
12866
|
+
if (itemKey === 'profile' && this.profileUrl && this.sallaAccountEnabled) {
|
|
12867
|
+
return { href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' };
|
|
12869
12868
|
}
|
|
12870
12869
|
// Fix loyalty program URL mapping from master
|
|
12871
12870
|
const urlKey = itemKey === 'loyalty_program' ? 'loyalty' : itemKey;
|
|
12872
|
-
return { href:
|
|
12871
|
+
return { href: Salla.url.get(urlKey) };
|
|
12873
12872
|
}
|
|
12874
12873
|
getMenuItem([itemKey, itemValue], i) {
|
|
12875
12874
|
//todo:: enhancement support slot here
|
|
12876
12875
|
if (itemKey === 'wallet' && !window.can_access_wallet)
|
|
12877
12876
|
return;
|
|
12878
|
-
if (itemKey === 'loyalty_program' && !
|
|
12877
|
+
if (itemKey === 'loyalty_program' && !Salla.config.get('store.features').includes('loyalty-system'))
|
|
12879
12878
|
return;
|
|
12880
12879
|
return (index.h("li", { class: {
|
|
12881
12880
|
's-user-menu-dropdown-item': true,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var Helper = require('./Helper-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
|
+
var Helper = require('./Helper-B5NunIdR.js');
|
|
8
8
|
var interfaces = require('./interfaces-DZDQwN6-.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
var interfaces = require('./interfaces-DZDQwN6-.js');
|
|
8
|
-
var Helper = require('./Helper-
|
|
8
|
+
var Helper = require('./Helper-B5NunIdR.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
11
11
|
const sallaFiltersCss = ":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
|
|
8
8
|
const sallaInstallmentCss = "salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:flex;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:flex;flex-direction:row-reverse;width:100%;justify-content:space-between;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var Helper = require('./Helper-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
|
+
var Helper = require('./Helper-B5NunIdR.js');
|
|
8
8
|
require('./anime.es-BqW8JHZi.js');
|
|
9
9
|
|
|
10
10
|
const sallaNotificationsCss = "";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var Helper = require('./Helper-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
|
+
var Helper = require('./Helper-B5NunIdR.js');
|
|
8
8
|
require('./anime.es-BqW8JHZi.js');
|
|
9
9
|
|
|
10
10
|
const sallaOrdersCss = ":host{display:block}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
var check = require('./check-CLRvuniI.js');
|
|
8
8
|
|
|
9
9
|
var IconStar2 = ` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
var shoppingBag = require('./shopping-bag-C1gvTVHr.js');
|
|
8
|
-
var Helper = require('./Helper-
|
|
8
|
+
var Helper = require('./Helper-B5NunIdR.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
11
11
|
var now_1;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
var arrowLeft = require('./arrow-left-xSEmRpp6.js');
|
|
8
|
-
var Helper = require('./Helper-
|
|
8
|
+
var Helper = require('./Helper-B5NunIdR.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
10
10
|
|
|
11
11
|
var IconQuoteOpen = `<!-- Generated by IcoMoon.io -->
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
|
|
8
8
|
const sallaTooltipCss = ".s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-tXQykYB9.js');
|
|
7
7
|
|
|
8
8
|
const sallaWalletCss = ".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";
|
|
9
9
|
|
package/dist/cjs/twilight.cjs.js
CHANGED
|
@@ -110,7 +110,7 @@ export class SallaProductsList {
|
|
|
110
110
|
return salla.config.get('store.settings.product.filters') && this.filtersResults;
|
|
111
111
|
}
|
|
112
112
|
isSourceWithoutValue() {
|
|
113
|
-
return ['offers', 'latest', 'sales', 'wishlist', 'top-rated'].includes(this.getSource());
|
|
113
|
+
return ['offers', 'latest', 'sales', 'wishlist', 'top-rated', 'reorder'].includes(this.getSource());
|
|
114
114
|
}
|
|
115
115
|
animateItems() {
|
|
116
116
|
anime({
|
|
@@ -759,8 +759,8 @@ export class SallaProductsList {
|
|
|
759
759
|
"attribute": "source",
|
|
760
760
|
"mutable": true,
|
|
761
761
|
"complexType": {
|
|
762
|
-
"original": "'categories' | 'latest' | 'related' | 'brands' | 'json' | 'search' | 'tags' | 'selected' | 'offers' | 'landing-page' | 'sales' | 'wishlist' | 'top-rated'",
|
|
763
|
-
"resolved": "\"brands\" | \"categories\" | \"json\" | \"landing-page\" | \"latest\" | \"offers\" | \"related\" | \"sales\" | \"search\" | \"selected\" | \"tags\" | \"top-rated\" | \"wishlist\"",
|
|
762
|
+
"original": "'categories' | 'latest' | 'related' | 'brands' | 'json' | 'search' | 'tags' | 'selected' | 'offers' | 'landing-page' | 'sales' | 'wishlist' | 'top-rated' | 'reorder'",
|
|
763
|
+
"resolved": "\"brands\" | \"categories\" | \"json\" | \"landing-page\" | \"latest\" | \"offers\" | \"related\" | \"reorder\" | \"sales\" | \"search\" | \"selected\" | \"tags\" | \"top-rated\" | \"wishlist\"",
|
|
764
764
|
"references": {}
|
|
765
765
|
},
|
|
766
766
|
"required": false,
|
|
@@ -42,7 +42,7 @@ export class SallaUserMenu {
|
|
|
42
42
|
notifications: salla.helpers.number(salla.storage.get('user.notifications') || 0),
|
|
43
43
|
pending_orders: salla.helpers.number(salla.storage.get('user.pending_orders') || 0),
|
|
44
44
|
};
|
|
45
|
-
this.sallaAccountEnabled =
|
|
45
|
+
this.sallaAccountEnabled = false;
|
|
46
46
|
this.hasBadges = Number(salla.storage.get('user.pending_orders')) > 0 ||
|
|
47
47
|
Number(salla.storage.get('user.notifications')) > 0;
|
|
48
48
|
/**
|
|
@@ -128,18 +128,19 @@ export class SallaUserMenu {
|
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
componentWillLoad() {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
131
|
+
async componentWillLoad() {
|
|
132
|
+
await salla.onReady();
|
|
133
|
+
await salla.lang.onLoaded();
|
|
134
|
+
this.sallaAccountEnabled = Salla.config.get('store.features')?.includes('salla-account');
|
|
135
|
+
this.profileUrl = `${salla.config.get('account.url', 'https://accounts.salla.com')}/${salla.config.get('user.language_code')}/user?store=${salla.config.get('store.id')}&info=${salla.storage.get('token')}`;
|
|
136
|
+
const trigger = this.host.querySelector('[slot="trigger"]');
|
|
137
|
+
this.triggerSlot =
|
|
138
|
+
'<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>';
|
|
139
|
+
if (!trigger) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this.triggerSlot = trigger.innerHTML;
|
|
143
|
+
trigger.innerHTML = this.replaceParams(trigger.innerHTML);
|
|
143
144
|
}
|
|
144
145
|
fetchFreshProfile() {
|
|
145
146
|
//don't request fetchFreshProfile unless token is injected into the api
|
|
@@ -191,20 +192,18 @@ export class SallaUserMenu {
|
|
|
191
192
|
}, id: "trigger-slot", onClick: e => this.open(e), onKeyUp: e => this.open(e), innerHTML: this.replaceParams(this.triggerSlot) }));
|
|
192
193
|
}
|
|
193
194
|
getItemAnchorLinkAttrs(itemKey) {
|
|
194
|
-
if (itemKey === 'profile' && this.profileUrl) {
|
|
195
|
-
return this.
|
|
196
|
-
{ href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' } :
|
|
197
|
-
{ href: '/profile' };
|
|
195
|
+
if (itemKey === 'profile' && this.profileUrl && this.sallaAccountEnabled) {
|
|
196
|
+
return { href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' };
|
|
198
197
|
}
|
|
199
198
|
// Fix loyalty program URL mapping from master
|
|
200
199
|
const urlKey = itemKey === 'loyalty_program' ? 'loyalty' : itemKey;
|
|
201
|
-
return { href:
|
|
200
|
+
return { href: Salla.url.get(urlKey) };
|
|
202
201
|
}
|
|
203
202
|
getMenuItem([itemKey, itemValue], i) {
|
|
204
203
|
//todo:: enhancement support slot here
|
|
205
204
|
if (itemKey === 'wallet' && !window.can_access_wallet)
|
|
206
205
|
return;
|
|
207
|
-
if (itemKey === 'loyalty_program' && !
|
|
206
|
+
if (itemKey === 'loyalty_program' && !Salla.config.get('store.features').includes('loyalty-system'))
|
|
208
207
|
return;
|
|
209
208
|
return (h("li", { class: {
|
|
210
209
|
's-user-menu-dropdown-item': true,
|