@salla.sa/twilight-components 2.11.95 → 2.11.96
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/salla-add-product-button_40.cjs.entry.js +11 -5
- package/dist/cjs/salla-add-product-button_40.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +2 -3
- package/dist/cjs/salla-products-list.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -3
- package/dist/cjs/salla-products-slider.cjs.entry.js.map +1 -1
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +1 -1
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js.map +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -2
- package/dist/collection/components/salla-product-card/salla-product-card.js.map +1 -1
- package/dist/collection/components/salla-products-list/salla-products-list.js +2 -3
- package/dist/collection/components/salla-products-list/salla-products-list.js.map +1 -1
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +2 -3
- package/dist/collection/components/salla-products-slider/salla-products-slider.js.map +1 -1
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +5 -2
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js.map +1 -1
- package/dist/components/salla-add-product-button2.js +1 -1
- package/dist/components/salla-add-product-button2.js.map +1 -1
- package/dist/components/salla-product-card2.js +5 -2
- package/dist/components/salla-product-card2.js.map +1 -1
- package/dist/components/salla-products-list.js +2 -3
- package/dist/components/salla-products-list.js.map +1 -1
- package/dist/components/salla-products-slider.js +2 -3
- package/dist/components/salla-products-slider.js.map +1 -1
- package/dist/components/salla-progress-bar2.js +5 -2
- package/dist/components/salla-progress-bar2.js.map +1 -1
- package/dist/esm/salla-add-product-button_40.entry.js +11 -5
- package/dist/esm/salla-add-product-button_40.entry.js.map +1 -1
- package/dist/esm/salla-products-list.entry.js +2 -3
- package/dist/esm/salla-products-list.entry.js.map +1 -1
- package/dist/esm/salla-products-slider.entry.js +2 -3
- package/dist/esm/salla-products-slider.entry.js.map +1 -1
- package/dist/esm-es5/salla-add-product-button_40.entry.js +2 -2
- package/dist/esm-es5/salla-add-product-button_40.entry.js.map +1 -1
- package/dist/esm-es5/salla-products-list.entry.js +1 -1
- package/dist/esm-es5/salla-products-list.entry.js.map +1 -1
- package/dist/esm-es5/salla-products-slider.entry.js +1 -1
- package/dist/esm-es5/salla-products-slider.entry.js.map +1 -1
- package/dist/twilight/p-009ab1f2.system.entry.js +5 -0
- package/dist/twilight/p-009ab1f2.system.entry.js.map +1 -0
- package/dist/twilight/{p-b28388c6.entry.js → p-23f7c19e.entry.js} +3 -3
- package/dist/twilight/p-23f7c19e.entry.js.map +1 -0
- package/dist/twilight/p-437c62e8.system.js +1 -1
- package/dist/twilight/p-69a92ff4.system.entry.js +5 -0
- package/dist/twilight/p-69a92ff4.system.entry.js.map +1 -0
- package/dist/twilight/{p-152e1cd4.system.entry.js → p-6a906858.system.entry.js} +3 -3
- package/dist/twilight/p-6a906858.system.entry.js.map +1 -0
- package/dist/twilight/p-a7196205.entry.js +5 -0
- package/dist/twilight/p-a7196205.entry.js.map +1 -0
- package/dist/twilight/p-ffcd40eb.entry.js +5 -0
- package/dist/twilight/p-ffcd40eb.entry.js.map +1 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-product-card/salla-product-card.d.ts +1 -0
- package/package.json +2 -2
- package/dist/twilight/p-07d3cdea.entry.js +0 -5
- package/dist/twilight/p-07d3cdea.entry.js.map +0 -1
- package/dist/twilight/p-152e1cd4.system.entry.js.map +0 -1
- package/dist/twilight/p-18d654a0.entry.js +0 -5
- package/dist/twilight/p-18d654a0.entry.js.map +0 -1
- package/dist/twilight/p-5316354e.system.entry.js +0 -5
- package/dist/twilight/p-5316354e.system.entry.js.map +0 -1
- package/dist/twilight/p-affbcb10.system.entry.js +0 -5
- package/dist/twilight/p-affbcb10.system.entry.js.map +0 -1
- package/dist/twilight/p-b28388c6.entry.js.map +0 -1
|
@@ -70,7 +70,7 @@ const SallaAddProductButton = class {
|
|
|
70
70
|
*/
|
|
71
71
|
const data = Object.entries({
|
|
72
72
|
id: this.productId,
|
|
73
|
-
|
|
73
|
+
donation_amount: this.donatingAmount,
|
|
74
74
|
quantity: this.quantity,
|
|
75
75
|
endpoint: 'quickAdd'
|
|
76
76
|
}).reduce((a, [k, v]) => (v ? (a[k] = v, a) : a), {});
|
|
@@ -23703,12 +23703,15 @@ const SallaProductCard = class {
|
|
|
23703
23703
|
index.h("p", { class: "s-product-card-content-subtitle" }, (_t = this.productData) === null || _t === void 0 ? void 0 : _t.subtitle)
|
|
23704
23704
|
: ''), ((_u = this.productData) === null || _u === void 0 ? void 0 : _u.is_donation) && !this.minimal && !this.fullImage ?
|
|
23705
23705
|
[index.h("salla-progress-bar", { donation: (_v = this.productData) === null || _v === void 0 ? void 0 : _v.donation }), index.h("div", { class: "s-product-card-donation-input" }, ((_w = this.productData) === null || _w === void 0 ? void 0 : _w.can_donate) ?
|
|
23706
|
-
[index.h("label", { htmlFor: "donation-amount" }, this.donationAmount, " ", index.h("span", null, "*")), index.h("input", { type: "text",
|
|
23706
|
+
[index.h("label", { htmlFor: "donation-amount" }, this.donationAmount, " ", index.h("span", null, "*")), index.h("input", { type: "text", onInput: e => {
|
|
23707
|
+
salla.helpers.inputDigitsOnly(e.target);
|
|
23708
|
+
this.addBtn.donatingAmount = e.target.value;
|
|
23709
|
+
}, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
|
|
23707
23710
|
: '')]
|
|
23708
23711
|
: '', index.h("div", { class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice()), this.isSpecial && this.productData.discount_ends
|
|
23709
23712
|
? index.h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
|
|
23710
23713
|
: '', !this.hideAddBtn ?
|
|
23711
|
-
index.h("div", { class: "s-product-card-content-footer" }, index.h("salla-add-product-button", { fill: "outline", width: "wide", "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type }, index.h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)), this.horizontal || this.fullImage ?
|
|
23714
|
+
index.h("div", { class: "s-product-card-content-footer" }, index.h("salla-add-product-button", { fill: "outline", width: "wide", ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type }, index.h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)), this.horizontal || this.fullImage ?
|
|
23712
23715
|
index.h("salla-button", { shape: "icon", fill: "none", color: "light", ref: el => this.wishlistBtn = el, "aria-label": "Add or remove to wishlist", class: "s-product-card-wishlist-btn animated", onClick: () => salla.wishlist.toggle(this.productData.id), "data-id": "{{ product.id }}" }, index.h("span", { class: "text-xl", innerHTML: Heart }))
|
|
23713
23716
|
: '')
|
|
23714
23717
|
: '')));
|
|
@@ -23799,14 +23802,17 @@ const SallaProgressBar = class {
|
|
|
23799
23802
|
try {
|
|
23800
23803
|
if (this.donation) {
|
|
23801
23804
|
let donationJson = typeof this.donation == 'string' ? JSON.parse(this.donation) : this.donation;
|
|
23802
|
-
if (donationJson.can_donate) {
|
|
23805
|
+
if (donationJson.can_donate && donationJson.target_amount) {
|
|
23803
23806
|
this.value = donationJson.collected_amount;
|
|
23804
23807
|
this.target = donationJson.target_amount;
|
|
23805
23808
|
this.header = salla.lang.get('pages.products.target');
|
|
23806
23809
|
this.message = donationJson.target_end_date == '0000-00-00' ? '' : salla.lang.get('pages.products.donation_target_date') + ' ' + donationJson.target_end_date;
|
|
23807
23810
|
}
|
|
23808
23811
|
else {
|
|
23809
|
-
|
|
23812
|
+
//in case the product is not enabled target campaign
|
|
23813
|
+
this.message = donationJson.target_amount
|
|
23814
|
+
? donationJson.target_message
|
|
23815
|
+
: '';
|
|
23810
23816
|
}
|
|
23811
23817
|
}
|
|
23812
23818
|
}
|