@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
|
@@ -116,7 +116,7 @@ const SallaProductsList = /*@__PURE__*/ proxyCustomElement(class SallaProductsLi
|
|
|
116
116
|
return salla.config.get('store.settings.product.filters') && this.filtersResults;
|
|
117
117
|
}
|
|
118
118
|
isSourceWithoutValue() {
|
|
119
|
-
return ['offers', 'latest', 'sales', 'wishlist', 'top-rated'].includes(this.getSource());
|
|
119
|
+
return ['offers', 'latest', 'sales', 'wishlist', 'top-rated', 'reorder'].includes(this.getSource());
|
|
120
120
|
}
|
|
121
121
|
animateItems() {
|
|
122
122
|
anime({
|
|
@@ -71,7 +71,7 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
|
|
|
71
71
|
notifications: salla.helpers.number(salla.storage.get('user.notifications') || 0),
|
|
72
72
|
pending_orders: salla.helpers.number(salla.storage.get('user.pending_orders') || 0),
|
|
73
73
|
};
|
|
74
|
-
this.sallaAccountEnabled =
|
|
74
|
+
this.sallaAccountEnabled = false;
|
|
75
75
|
this.hasBadges = Number(salla.storage.get('user.pending_orders')) > 0 ||
|
|
76
76
|
Number(salla.storage.get('user.notifications')) > 0;
|
|
77
77
|
/**
|
|
@@ -157,18 +157,19 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
componentWillLoad() {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
160
|
+
async componentWillLoad() {
|
|
161
|
+
await salla.onReady();
|
|
162
|
+
await salla.lang.onLoaded();
|
|
163
|
+
this.sallaAccountEnabled = Salla.config.get('store.features')?.includes('salla-account');
|
|
164
|
+
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')}`;
|
|
165
|
+
const trigger = this.host.querySelector('[slot="trigger"]');
|
|
166
|
+
this.triggerSlot =
|
|
167
|
+
'<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>';
|
|
168
|
+
if (!trigger) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.triggerSlot = trigger.innerHTML;
|
|
172
|
+
trigger.innerHTML = this.replaceParams(trigger.innerHTML);
|
|
172
173
|
}
|
|
173
174
|
fetchFreshProfile() {
|
|
174
175
|
//don't request fetchFreshProfile unless token is injected into the api
|
|
@@ -220,20 +221,18 @@ const SallaUserMenu$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserMenu ext
|
|
|
220
221
|
}, id: "trigger-slot", onClick: e => this.open(e), onKeyUp: e => this.open(e), innerHTML: this.replaceParams(this.triggerSlot) }));
|
|
221
222
|
}
|
|
222
223
|
getItemAnchorLinkAttrs(itemKey) {
|
|
223
|
-
if (itemKey === 'profile' && this.profileUrl) {
|
|
224
|
-
return this.
|
|
225
|
-
{ href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' } :
|
|
226
|
-
{ href: '/profile' };
|
|
224
|
+
if (itemKey === 'profile' && this.profileUrl && this.sallaAccountEnabled) {
|
|
225
|
+
return { href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' };
|
|
227
226
|
}
|
|
228
227
|
// Fix loyalty program URL mapping from master
|
|
229
228
|
const urlKey = itemKey === 'loyalty_program' ? 'loyalty' : itemKey;
|
|
230
|
-
return { href:
|
|
229
|
+
return { href: Salla.url.get(urlKey) };
|
|
231
230
|
}
|
|
232
231
|
getMenuItem([itemKey, itemValue], i) {
|
|
233
232
|
//todo:: enhancement support slot here
|
|
234
233
|
if (itemKey === 'wallet' && !window.can_access_wallet)
|
|
235
234
|
return;
|
|
236
|
-
if (itemKey === 'loyalty_program' && !
|
|
235
|
+
if (itemKey === 'loyalty_program' && !Salla.config.get('store.features').includes('loyalty-system'))
|
|
237
236
|
return;
|
|
238
237
|
return (h("li", { class: {
|
|
239
238
|
's-user-menu-dropdown-item': true,
|