@salla.sa/twilight-components 2.13.53 → 2.13.55
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-134c96cd.js → Helper-11c2f7a7.js} +2 -2
- package/dist/cjs/Helper-11c2f7a7.js.map +1 -0
- package/dist/cjs/{app-globals-8f8d8f50.js → app-globals-db36c588.js} +5 -5
- package/dist/cjs/app-globals-db36c588.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-add-product-button_47.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_47.cjs.entry.js.map +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-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.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-reviews.cjs.entry.js +11 -5
- package/dist/cjs/salla-reviews.cjs.entry.js.map +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/collection/Helpers/Helper.js +1 -1
- package/dist/collection/Helpers/Helper.js.map +1 -1
- package/dist/collection/components/salla-reviews/interfaces.js.map +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +97 -14
- package/dist/collection/components/salla-reviews/salla-reviews.js.map +1 -1
- package/dist/components/Helper.js +1 -1
- package/dist/components/Helper.js.map +1 -1
- package/dist/components/index.js +4 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-quick-buy2.js.map +1 -1
- package/dist/components/salla-reviews.js +14 -5
- package/dist/components/salla-reviews.js.map +1 -1
- package/dist/esm/{Helper-6e1f8269.js → Helper-e84a53b2.js} +2 -2
- package/dist/esm/Helper-e84a53b2.js.map +1 -0
- package/dist/esm/{app-globals-c3c69e17.js → app-globals-29abf3e3.js} +5 -5
- package/dist/esm/app-globals-29abf3e3.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-add-product-button_47.entry.js +1 -1
- package/dist/esm/salla-add-product-button_47.entry.js.map +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-notifications.entry.js +1 -1
- package/dist/esm/salla-orders.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-reviews.entry.js +11 -5
- package/dist/esm/salla-reviews.entry.js.map +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm-es5/{Helper-6e1f8269.js → Helper-e84a53b2.js} +2 -2
- package/dist/esm-es5/Helper-e84a53b2.js.map +1 -0
- package/dist/esm-es5/{app-globals-c3c69e17.js → app-globals-29abf3e3.js} +3 -3
- package/dist/esm-es5/app-globals-29abf3e3.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/salla-add-product-button_47.entry.js +1 -1
- package/dist/esm-es5/salla-add-product-button_47.entry.js.map +1 -1
- package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
- package/dist/esm-es5/salla-filters.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +1 -1
- package/dist/esm-es5/salla-orders.entry.js +1 -1
- package/dist/esm-es5/salla-products-list.entry.js +1 -1
- package/dist/esm-es5/salla-products-slider.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js.map +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/esm-es5/twilight.js.map +1 -1
- package/dist/twilight/p-06221496.js +25 -0
- package/dist/twilight/p-06221496.js.map +1 -0
- package/dist/twilight/{p-868c776b.system.entry.js → p-1079c870.system.entry.js} +2 -2
- package/dist/twilight/{p-e7d5c03c.entry.js → p-20a47e29.entry.js} +2 -2
- package/dist/twilight/p-2866def3.system.entry.js +5 -0
- package/dist/twilight/p-2866def3.system.entry.js.map +1 -0
- package/dist/twilight/{p-d08d5f11.entry.js → p-508a9dbf.entry.js} +2 -2
- package/dist/twilight/p-546db59b.entry.js +5 -0
- package/dist/twilight/p-546db59b.entry.js.map +1 -0
- package/dist/twilight/{p-b0585915.system.entry.js → p-5be05a17.system.entry.js} +2 -2
- package/dist/twilight/{p-b0585915.system.entry.js.map → p-5be05a17.system.entry.js.map} +1 -1
- package/dist/twilight/{p-f629ebf3.js → p-5de9ca19.js} +2 -2
- package/dist/twilight/p-5de9ca19.js.map +1 -0
- package/dist/twilight/{p-49a5b997.entry.js → p-60d513b0.entry.js} +2 -2
- package/dist/twilight/{p-38e9e758.system.entry.js → p-69539ba8.system.entry.js} +2 -2
- package/dist/twilight/{p-7d3b8a00.entry.js → p-708b7673.entry.js} +2 -2
- package/dist/twilight/p-a7b263b2.system.js +25 -0
- package/dist/twilight/p-a7b263b2.system.js.map +1 -0
- package/dist/twilight/{p-b0c8cac2.entry.js → p-a859e3fc.entry.js} +2 -2
- package/dist/twilight/{p-e3444194.system.js → p-af17aa74.system.js} +2 -2
- package/dist/twilight/p-af17aa74.system.js.map +1 -0
- package/dist/twilight/{p-429870cc.entry.js → p-bc7cb3df.entry.js} +2 -2
- package/dist/twilight/{p-429870cc.entry.js.map → p-bc7cb3df.entry.js.map} +1 -1
- package/dist/twilight/{p-3e19dd7e.system.entry.js → p-dcb268c2.system.entry.js} +2 -2
- package/dist/twilight/{p-5e7ea64b.system.entry.js → p-e56c026b.system.entry.js} +2 -2
- package/dist/twilight/{p-09f168ed.system.entry.js → p-eed0af43.system.entry.js} +2 -2
- package/dist/twilight/{p-e8c4822f.system.entry.js → p-f493ef81.system.entry.js} +2 -2
- package/dist/twilight/p-f51c9acb.system.js +5 -0
- package/dist/twilight/{p-64d97ea7.system.js.map → p-f51c9acb.system.js.map} +1 -1
- package/dist/twilight/{p-9d552606.entry.js → p-f5e0d239.entry.js} +2 -2
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.esm.js.map +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +1 -1
- package/dist/types/components/salla-reviews/interfaces.d.ts +4 -2
- package/dist/types/components/salla-reviews/salla-reviews.d.ts +32 -6
- package/dist/types/components.d.ts +41 -9
- package/package.json +5 -5
- package/dist/cjs/Helper-134c96cd.js.map +0 -1
- package/dist/cjs/app-globals-8f8d8f50.js.map +0 -1
- package/dist/esm/Helper-6e1f8269.js.map +0 -1
- package/dist/esm/app-globals-c3c69e17.js.map +0 -1
- package/dist/esm-es5/Helper-6e1f8269.js.map +0 -1
- package/dist/esm-es5/app-globals-c3c69e17.js.map +0 -1
- package/dist/twilight/p-43badfba.js +0 -25
- package/dist/twilight/p-43badfba.js.map +0 -1
- package/dist/twilight/p-52f673f6.system.js +0 -25
- package/dist/twilight/p-52f673f6.system.js.map +0 -1
- package/dist/twilight/p-64d97ea7.system.js +0 -5
- package/dist/twilight/p-6b99863e.system.entry.js +0 -5
- package/dist/twilight/p-6b99863e.system.entry.js.map +0 -1
- package/dist/twilight/p-e3444194.system.js.map +0 -1
- package/dist/twilight/p-f209fb12.entry.js +0 -5
- package/dist/twilight/p-f209fb12.entry.js.map +0 -1
- package/dist/twilight/p-f629ebf3.js.map +0 -1
- /package/dist/twilight/{p-868c776b.system.entry.js.map → p-1079c870.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e7d5c03c.entry.js.map → p-20a47e29.entry.js.map} +0 -0
- /package/dist/twilight/{p-d08d5f11.entry.js.map → p-508a9dbf.entry.js.map} +0 -0
- /package/dist/twilight/{p-49a5b997.entry.js.map → p-60d513b0.entry.js.map} +0 -0
- /package/dist/twilight/{p-38e9e758.system.entry.js.map → p-69539ba8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7d3b8a00.entry.js.map → p-708b7673.entry.js.map} +0 -0
- /package/dist/twilight/{p-b0c8cac2.entry.js.map → p-a859e3fc.entry.js.map} +0 -0
- /package/dist/twilight/{p-3e19dd7e.system.entry.js.map → p-dcb268c2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5e7ea64b.system.entry.js.map → p-e56c026b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-09f168ed.system.entry.js.map → p-eed0af43.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e8c4822f.system.entry.js.map → p-f493ef81.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9d552606.entry.js.map → p-f5e0d239.entry.js.map} +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
|
-
const Helper = require('./Helper-
|
|
9
|
+
const Helper = require('./Helper-11c2f7a7.js');
|
|
10
10
|
const interfaces = require('./interfaces-c3b1e489.js');
|
|
11
11
|
require('./anime.es-78730411.js');
|
|
12
12
|
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
9
|
const interfaces = require('./interfaces-c3b1e489.js');
|
|
10
|
-
const Helper = require('./Helper-
|
|
10
|
+
const Helper = require('./Helper-11c2f7a7.js');
|
|
11
11
|
require('./anime.es-78730411.js');
|
|
12
12
|
|
|
13
13
|
const sallaFiltersCss = ":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
|
-
const Helper = require('./Helper-
|
|
9
|
+
const Helper = require('./Helper-11c2f7a7.js');
|
|
10
10
|
require('./anime.es-78730411.js');
|
|
11
11
|
|
|
12
12
|
const sallaNotificationsCss = "";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
|
-
const Helper = require('./Helper-
|
|
9
|
+
const Helper = require('./Helper-11c2f7a7.js');
|
|
10
10
|
require('./anime.es-78730411.js');
|
|
11
11
|
|
|
12
12
|
const sallaOrdersCss = ":host{display:block}";
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
9
|
const anime_es = require('./anime.es-78730411.js');
|
|
10
|
-
const Helper = require('./Helper-
|
|
10
|
+
const Helper = require('./Helper-11c2f7a7.js');
|
|
11
11
|
|
|
12
12
|
const ShoppingBag = `<!-- Generated by IcoMoon.io -->
|
|
13
13
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
|
-
const Helper = require('./Helper-
|
|
9
|
+
const Helper = require('./Helper-11c2f7a7.js');
|
|
10
10
|
require('./anime.es-78730411.js');
|
|
11
11
|
|
|
12
12
|
const sallaProductsSliderCss = "";
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
9
|
const arrowLeft = require('./arrow-left-21273312.js');
|
|
10
|
-
const Helper = require('./Helper-
|
|
10
|
+
const Helper = require('./Helper-11c2f7a7.js');
|
|
11
11
|
require('./anime.es-78730411.js');
|
|
12
12
|
|
|
13
13
|
const IconQuoteOpen = `<!-- Generated by IcoMoon.io -->
|
|
@@ -24,9 +24,12 @@ const SallaReviews = class {
|
|
|
24
24
|
index.registerInstance(this, hostRef);
|
|
25
25
|
this.displayAllURL = null;
|
|
26
26
|
this.displayAllLink = undefined;
|
|
27
|
-
this.source =
|
|
27
|
+
this.source = undefined;
|
|
28
28
|
this.sourceValue = undefined;
|
|
29
29
|
this.limit = 5;
|
|
30
|
+
this.type = "store";
|
|
31
|
+
this.sort = "latest";
|
|
32
|
+
this.hideCustomerInfo = false;
|
|
30
33
|
this.reviews = [];
|
|
31
34
|
this.isRTL = undefined;
|
|
32
35
|
this.showReviews = false;
|
|
@@ -48,9 +51,12 @@ const SallaReviews = class {
|
|
|
48
51
|
}
|
|
49
52
|
const isJsonEncoded = ['products', 'categories'].includes(this.source);
|
|
50
53
|
const params = {
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
limit: this.limit,
|
|
55
|
+
source: this.source,
|
|
53
56
|
items: isJsonEncoded ? JSON.parse(this.sourceValue) : this.sourceValue,
|
|
57
|
+
sort: this.sort,
|
|
58
|
+
type: this.type,
|
|
59
|
+
hide_customer_info: this.hideCustomerInfo
|
|
54
60
|
};
|
|
55
61
|
return salla.api.request('reviews', { params }, 'get');
|
|
56
62
|
}
|
|
@@ -67,7 +73,7 @@ const SallaReviews = class {
|
|
|
67
73
|
});
|
|
68
74
|
}
|
|
69
75
|
render() {
|
|
70
|
-
return (index.h("div", { class: "s-reviews-container" }, index.h("div", { class: "s-reviews-header-wrapper" }, index.h("h1", { class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (index.h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, index.h("span", { class: "s-reviews-display-all-icon", innerHTML: arrowLeft.arrowLeft }))) : null), index.h("salla-slider", { centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, index.h("div", { slot: "items" }, this.reviews.map((item, index$1) => (index.h("div", { key: index$1, class: "s-reviews-swiper-slide" }, index.h("div", { class: "s-reviews-testimonial" }, index.h("div", { class: "s-reviews-testimonial__inner" }, index.h("div", { class: "s-reviews-testimonial__avatar" }, index.h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index$1, class: "lazy" })), index.h("div", { class: "s-reviews-testimonial__text" }, index.h("p", null, item.
|
|
76
|
+
return (index.h("div", { class: "s-reviews-container" }, index.h("div", { class: "s-reviews-header-wrapper" }, index.h("h1", { class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (index.h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, index.h("span", { class: "s-reviews-display-all-icon", innerHTML: arrowLeft.arrowLeft }))) : null), index.h("salla-slider", { centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, index.h("div", { slot: "items" }, this.reviews.map((item, index$1) => (index.h("div", { key: index$1, class: "s-reviews-swiper-slide" }, index.h("div", { class: "s-reviews-testimonial" }, index.h("div", { class: "s-reviews-testimonial__inner" }, index.h("div", { class: "s-reviews-testimonial__avatar" }, index.h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index$1, class: "lazy" })), index.h("div", { class: "s-reviews-testimonial__text" }, index.h("p", null, item.content), index.h("div", { class: "s-reviews-testimonial__name_wrapper" }, index.h("div", { class: "s-reviews-testimonial__info" }, item.name && index.h("h2", null, `${item.name}`)), index.h("div", { class: "s-reviews-testimonial__rating" }, index.h("salla-rating-stars", { size: "small", value: item.stars })))), index.h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
|
|
71
77
|
}
|
|
72
78
|
};
|
|
73
79
|
SallaReviews.style = sallaReviewsCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"salla-reviews.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,EAAE;;MCYb,YAAY;EACvB;;
|
|
1
|
+
{"file":"salla-reviews.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAA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AI,CAAC,MAAM,SAAS,IAExCA,iBAAK,IAAI,EAAC,OAAO,IACd,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAY,EAAEE,OAAK,MACpCF,iBAAK,GAAG,EAAEE,OAAK,EAAE,KAAK,EAAC,wBAAwB,IAC7CF,iBAAK,KAAK,EAAC,uBAAuB,IAChCA,iBAAK,KAAK,EAAC,8BAA8B,IACvCA,iBAAK,KAAK,EAAC,+BAA+B,IACxCA,iBACE,GAAG,EAAE,oBAAoB,cACf,IAAI,CAAC,MAAM,EACrB,GAAG,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,cAAc,GAAGE,OAAK,EACnD,KAAK,EAAC,MAAM,GACZ,CACE,EACNF,iBAAK,KAAK,EAAC,6BAA6B,IACtCA,mBAAI,IAAI,CAAC,OAAO,CAAK,EACrBA,iBAAK,KAAK,EAAC,qCAAqC,IAC9CA,iBAAK,KAAK,EAAC,6BAA6B,IACrC,IAAI,CAAC,IAAI,IAAIA,oBAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAM,CACnC,EACNA,iBAAK,KAAK,EAAC,+BAA+B,IAExCA,gCAAoB,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAuB,CACrE,CACF,CACF,EAENA,kBAAM,KAAK,EAAC,6BAA6B,EAAC,SAAS,EAAE,aAAa,GAAI,CAClE,CACF,CACF,CACP,CAAC,CACE,CACO,CACX,EACN;GACH;;;;;;","names":["Helper","h","IconArrowLeft","index"],"sources":["src/components/salla-reviews/salla-reviews.scss?tag=salla-reviews","src/components/salla-reviews/salla-reviews.tsx"],"sourcesContent":["","import { Component, Prop, State, h } from '@stencil/core';\nimport IconArrowLeft from '../../assets/svg/arrow-left.svg'\nimport IconQuoteOpen from '../../assets/svg/quote-open.svg'\n\nimport {Source, Review, ReviewType, SortingOption} from \"./interfaces\"\nimport Helper from '../../Helpers/Helper';\n\n\n@Component({\n tag: 'salla-reviews',\n styleUrl: 'salla-reviews.scss',\n})\nexport class SallaReviews {\n constructor(){\n this.source = this.source;\n salla.onReady(() => {\n this.displayAllURL = salla.url.get('testimonials')\n this.isRTL = salla.config.get('theme.is_rtl', true)\n })\n\n salla.lang.onLoaded(() => { \n this.testimonialText = salla.lang.get('blocks.home.testimonials')\n this.displayAllLinkText = salla.lang.get('blocks.home.display_all')\n })\n }\n\n /**\n * Controls the visibility of a link to the reviews page.\n * \n * When set to `true`, a link will be displayed allowing users to navigate to the full reviews section.\n * \n * @type {boolean}\n */\n @Prop({ reflect: true }) displayAllLink: boolean\n\n /**\n * Specifies the data source for reviews.\n * \n * Valid options include:\n * - 'categories': Retrieves reviews for specific product categories.\n * - 'products': Retrieves reviews for individual products.\n * - 'json': Retrieves reviews from a custom JSON payload provided in `sourceValue`.\n * \n * When using 'json' as the source, a valid payload must be provided in `sourceValue`.\n * \n * @type {Source}\n * @default \"store\"\n */\n @Prop({ reflect: true }) source?: Source;\n\n /**\n * Provides data specific to the chosen source.\n * \n * Required when using 'categories', 'products', or 'json' as the source:\n * - 'categories': An array of category IDs.\n * - 'products': An array of product IDs.\n * - 'json': A custom JSON object containing review data.\n * \n * @type {string | object | Array<number>}\n */\n @Prop({ reflect: true }) sourceValue?: string | object | Array<number>;\n\n /**\n * Defines the maximum number of reviews to retrieve from the API.\n * \n * @type {number}\n * @default 5\n */\n @Prop({ reflect: true }) limit = 5\n\n\n /**\n * Specifies the type of reviews to fetch.\n * Available options:\n * - \"all\": Fetches reviews from all sources.\n * - \"store\": Fetches reviews specific to the store.\n * - \"products\": Fetches reviews specific to products.\n * \n * @type {ReviewType}\n * @default store\n */\n @Prop() type: ReviewType = \"store\";\n\n\n /**\n * Specifies the sorting criteria for the fetched reviews.\n * Available options:\n * - \"top_rating\": Sorts reviews based on top ratings.\n * - \"random\": Sorts reviews randomly.\n * - \"latest\": Sorts reviews based on the latest ones (default).\n * \n * @type {SortingOption}\n * @default latest\n */\n @Prop() sort: SortingOption = \"latest\";\n\n\n /**\n * Specifies whether to hide customer information in the component.\n * When set to true, customer information will be hidden.\n * Defaults to false, meaning customer information will be displayed.\n */\n @Prop() hideCustomerInfo: boolean = false;\n\n\n @State() reviews: Array<Review> = [];\n @State() isRTL: boolean\n @State() showReviews: boolean = false;\n @State() testimonialText: string = salla.lang.get('blocks.home.testimonials');\n @State() displayAllLinkText: string = salla.lang.get('blocks.home.display_all');\n\n private displayAllURL = null\n\n fetchReviews() {\n if (this.source === 'json') {\n return Promise.resolve(JSON.parse(this.sourceValue as string));\n }\n const isJsonEncoded = ['products', 'categories'].includes(this.source);\n const params = {\n limit: this.limit,\n source: this.source,\n items: isJsonEncoded ? JSON.parse(this.sourceValue as string) : this.sourceValue,\n sort: this.sort,\n type: this.type,\n hide_customer_info: this.hideCustomerInfo\n };\n return salla.api.request('reviews', { params }, 'get');\n }\n\n\n componentWillLoad() {\n return (new Promise(resolve => salla.onReady(resolve)))\n .then(() => this.fetchReviews())\n .then((resp) => resp.data || [])\n .then(reviews => {\n if (reviews.length) {\n this.reviews = reviews;\n this.showReviews = true;\n Helper.generateReviewSchema(this.reviews);\n }\n });\n }\n\n render() {\n return (\n <div class=\"s-reviews-container\">\n <div class=\"s-reviews-header-wrapper\">\n <h1 class=\"s-reviews-header\">\n {this.testimonialText}\n </h1>\n {!!this.displayAllLink ? (\n <a href={this.displayAllURL} class=\"s-reviews-display-all\">\n {this.displayAllLinkText}\n <span class=\"s-reviews-display-all-icon\" innerHTML={IconArrowLeft} />\n </a>\n ) : null}\n </div>\n <salla-slider\n centered\n slides-per-view={1}\n type=\"testimonials\"\n class=\"s-reviews-testimonials-slider\"\n controls-outer\n auto-play\n id={`testimonials-${this.source}-slider`}\n >\n <div slot=\"items\">\n {this.reviews.map((item: Review, index) => (\n <div key={index} class=\"s-reviews-swiper-slide\">\n <div class=\"s-reviews-testimonial\">\n <div class=\"s-reviews-testimonial__inner\">\n <div class=\"s-reviews-testimonial__avatar\">\n <img\n src={'images/s-empty.png'}\n data-src={item.avatar}\n alt={item.name ? item.name : 'testimonial-' + index}\n class=\"lazy\"\n />\n </div>\n <div class=\"s-reviews-testimonial__text\">\n <p>{item.content}</p>\n <div class=\"s-reviews-testimonial__name_wrapper\">\n <div class=\"s-reviews-testimonial__info\">\n {item.name && <h2>{`${item.name}`}</h2>}\n </div>\n <div class=\"s-reviews-testimonial__rating\">\n {/* TODO stars is missing */}\n <salla-rating-stars size=\"small\" value={item.stars}></salla-rating-stars>\n </div>\n </div>\n </div>\n\n <span class=\"s-reviews-testimonial__icon\" innerHTML={IconQuoteOpen} />\n </div>\n </div>\n </div>\n ))}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n}\n\n"],"version":3}
|
package/dist/cjs/twilight.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-44391cfe.js');
|
|
9
|
-
const appGlobals = require('./app-globals-
|
|
9
|
+
const appGlobals = require('./app-globals-db36c588.js');
|
|
10
10
|
require('./_commonjsHelpers-691dd63b.js');
|
|
11
11
|
|
|
12
12
|
/*
|
|
@@ -23,7 +23,7 @@ const patchBrowser = () => {
|
|
|
23
23
|
|
|
24
24
|
patchBrowser().then(options => {
|
|
25
25
|
appGlobals.globalScripts();
|
|
26
|
-
return index.bootstrapLazy(JSON.parse("[[\"salla-offer.cjs\",[[0,\"salla-offer\",{\"productCardComponent\":[1,\"product-card-component\"],\"offersList\":[32],\"userCurrency\":[32],\"isMultipleBank\":[32],\"title\":[32],\"currentPage\":[32],\"hasCustomComponent\":[32],\"isBankOffer\":[32],\"canRender\":[32],\"showOffer\":[32],\"offer_with_price_text\":[32],\"with_discount_text\":[32],\"product_discount_text\":[32],\"special_offer_text\":[32],\"multipleBankOfferTitleText\":[32],\"multipleBankOfferTitleDescription\":[32],\"buy_quantity_text\":[32]}]]],[\"salla-products-slider.cjs\",[[0,\"salla-products-slider\",{\"blockTitle\":[1,\"block-title\"],\"subTitle\":[1,\"sub-title\"],\"sliderId\":[1,\"slider-id\"],\"displayAllUrl\":[1,\"display-all-url\"],\"autoplay\":[1028],\"source\":[1537],\"sourceValue\":[1,\"source-value\"],\"limit\":[1026],\"sliderConfig\":[520,\"slider-config\"],\"productCardComponent\":[1,\"product-card-component\"],\"productsData\":[32],\"isReady\":[32],\"sourceValueIsValid\":[32],\"hasCustomComponent\":[32],\"apiUrl\":[32],\"parsedSourceValue\":[32]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectDonationAmount\":[32],\"selectAmount\":[32],\"isCustomDonation\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"reportValidity\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-filters.cjs\",[[0,\"salla-filters\",{\"filters\":[1040],\"isSidebarOpen\":[32],\"filtersData\":[32],\"apply\":[32],\"reset\":[32],\"getFilters\":[64],\"applyFilters\":[64],\"resetFilters\":[64]}]]],[\"salla-notifications.cjs\",[[0,\"salla-notifications\",{\"loadMoreText\":[1,\"load-more-text\"],\"itemPerPage\":[2,\"item-per-page\"],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"no_notifications_trans\":[32],\"load_more_text_trans\":[32]}]]],[\"salla-order-summary.cjs\",[[0,\"salla-order-summary\",{\"orderId\":[514,\"order-id\"],\"codeCopied\":[32],\"noItemFound\":[32],\"order_items\":[32]}]]],[\"salla-reviews.cjs\",[[0,\"salla-reviews\",{\"displayAllLink\":[516,\"display-all-link\"],\"source\":[513],\"sourceValue\":[520,\"source-value\"],\"limit\":[514],\"reviews\":[32],\"isRTL\":[32],\"showReviews\":[32],\"testimonialText\":[32],\"displayAllLinkText\":[32]}]]],[\"salla-orders.cjs\",[[0,\"salla-orders\",{\"params\":[16],\"loadMoreText\":[1,\"load-more-text\"],\"orderNumberText\":[32],\"totalOrderText\":[32],\"orderDateText\":[32],\"orderStatusText\":[32],\"noOrderText\":[32],\"load_more_text_trans\":[32],\"languageCode\":[32],\"orders\":[32],\"pagination\":[32],\"hasInfiniteScroll\":[32],\"total\":[32],\"nextPage\":[32],\"showPlaceholder\":[32]}]]],[\"salla-advertisement.cjs\",[[0,\"salla-advertisement\",{\"position\":[32],\"advertisements\":[32],\"advertIcon\":[32],\"currentSlug\":[32]}]]],[\"salla-app-install-alert.cjs\",[[0,\"salla-app-install-alert\",{\"data\":[32],\"ctaLink\":[32],\"open\":[32],\"closing\":[32]}]]],[\"salla-apps-icons.cjs\",[[0,\"salla-apps-icons\",{\"hideTitle\":[4,\"hide-title\"],\"appsTitle\":[1,\"apps-title\"],\"vertical\":[4],\"apps\":[32]}]]],[\"salla-contacts.cjs\",[[0,\"salla-contacts\",{\"contactsTitle\":[1025,\"contacts-title\"],\"hideTitle\":[4,\"hide-title\"],\"isHeader\":[4,\"is-header\"],\"horizontal\":[4],\"iconsOnly\":[4,\"icons-only\"],\"contacts\":[32],\"iconsList\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32],\"mispayActive\":[32],\"installment_sheria_text\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-metadata.cjs\",[[0,\"salla-metadata\",{\"entity\":[1],\"entityId\":[2,\"entity-id\"],\"specs\":[32],\"download\":[32]}]]],[\"salla-payments.cjs\",[[0,\"salla-payments\",{\"withSbc\":[4,\"with-sbc\"],\"sbcId\":[1,\"sbc-id\"],\"withMadeInKsa\":[4,\"with-made-in-ksa\"],\"payments\":[32],\"placeholderImage\":[32]}]]],[\"salla-products-list.cjs\",[[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"autoload\":[1028],\"loadMoreText\":[1,\"load-more-text\"],\"productCardComponent\":[1,\"product-card-component\"],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"endOfText\":[32],\"failedLoadMore\":[32],\"currentPage\":[32],\"currentCategoryIdFilter\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}]]],[\"salla-social.cjs\",[[0,\"salla-social\",{\"links\":[32],\"iconsList\":[32]}]]],[\"salla-filters-widget.cjs\",[[4,\"salla-filters-widget\",{\"withLoadMore\":[1028,\"with-load-more\"],\"filtersData\":[16],\"option\":[16],\"isOpen\":[32],\"isShowMore\":[32],\"showMoreLabel\":[32],\"showLessLabel\":[32],\"page\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]],[\"salla-notification-item.cjs\",[[0,\"salla-notification-item\",{\"notification\":[16]}]]],[\"salla-add-product-button_47.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"widgetTitle\":[1,\"widget-title\"],\"widgetSubtitle\":[1,\"widget-subtitle\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[0,\"salla-menu\",{\"source\":[1],\"sourceValue\":[1,\"source-value\"],\"topnav\":[4],\"useReactLink\":[4,\"use-react-link\"],\"limit\":[2],\"menus\":[32],\"hasCustomComponent\":[32],\"setMenuContent\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"inline\":[516],\"withoutReload\":[4,\"without-reload\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"isModalOpen\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"hasError\":[32],\"errorMessage\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"offer_type\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"template\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"storePrice\":[32],\"theDeveloper\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32],\"isRtl\":[32]}],[0,\"salla-comments\",{\"itemId\":[2,\"item-id\"],\"loadMoreText\":[1,\"load-more-text\"],\"hideForm\":[4,\"hide-form\"],\"blockTitle\":[1,\"block-title\"],\"hideTitle\":[4,\"hide-title\"],\"type\":[1],\"showFormAvatar\":[4,\"show-form-avatar\"],\"comments\":[32],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"noComments\":[32],\"comment_title\":[32],\"comment_name\":[32],\"placeholder_text\":[32]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-profile\",{\"customFields\":[1,\"custom-fields\"],\"userData\":[32],\"userDefinedFields\":[32],\"disableAction\":[32],\"first_name_trans\":[32],\"last_name_trans\":[32],\"birthday_trans\":[32],\"birthday_placeholder_trans\":[32],\"gender_trans\":[32],\"gender_placeholder_trans\":[32],\"male_trans\":[32],\"female_trans\":[32],\"email_trans\":[32],\"mobile_trans\":[32],\"save_btn_trans\":[32],\"drag_and_drop_trans\":[32],\"browse_trans\":[32],\"email_required_trans\":[32],\"invalid_email_trans\":[32],\"setCustomFields\":[64]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"maxWords\":[2,\"max-words\"],\"showAction\":[4,\"show-action\"],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64],\"refresh\":[64]}],[0,\"salla-breadcrumb\",{\"breadcrumbs\":[32]}],[4,\"salla-cart-summary\",{\"showCartLabel\":[4,\"show-cart-label\"],\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"cartLabel\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"loadMoreText\":[1,\"load-more-text\"],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[0,\"salla-maintenance-alert\",{\"title\":[32],\"message\":[32],\"buttonTitle\":[32]}],[4,\"salla-quantity-input\",{\"cartItemId\":[8,\"cart-item-id\"],\"quantity\":[32],\"fireChangeEvent\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[4,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"is_loggedIn\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"hasError\":[32],\"errorMessage\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1537],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-comment-item\",{\"comment\":[16],\"has_bought_trans\":[32],\"rated_trans\":[32],\"waiting_approval_trans\":[32],\"has_order_trans\":[32]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[4,\"salla-product-card\",{\"product\":[1],\"horizontal\":[4],\"shadowOnHover\":[4,\"shadow-on-hover\"],\"hideAddBtn\":[4,\"hide-add-btn\"],\"fullImage\":[4,\"full-image\"],\"minimal\":[4],\"isSpecial\":[4,\"is-special\"],\"showQuantity\":[4,\"show-quantity\"],\"productData\":[32],\"fitImageHeight\":[32],\"remained\":[32],\"outOfStock\":[32],\"donationAmount\":[32],\"startingPrice\":[32],\"addToCart\":[32],\"placeholder\":[32]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quickBuy\":[1540,\"quick-buy\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"supportStickyBar\":[516,\"support-sticky-bar\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32],\"showQuickBuy\":[32]}],[0,\"salla-count-down\",{\"date\":[1],\"boxed\":[4],\"size\":[1],\"color\":[1],\"labeled\":[4],\"endText\":[1,\"end-text\"],\"digits\":[1],\"endOfDay\":[4,\"end-of-day\"],\"daysLabel\":[32],\"hoursLabel\":[32],\"minutesLabel\":[32],\"secondsLabel\":[32],\"endLabel\":[32],\"invalidDate\":[32],\"offerEnded\":[32],\"countInterval\":[32],\"days\":[32],\"hours\":[32],\"minutes\":[32],\"seconds\":[32],\"endCountDown\":[64]}],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[0,\"salla-quick-buy\",{\"type\":[1025],\"productId\":[1025,\"product-id\"],\"cartId\":[1025,\"cart-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"applePayOnly\":[1028,\"apple-pay-only\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"gridThumbs\":[516,\"grid-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"direction\":[1537],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"windowWidth\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"autofocus\":[516],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"type\":[513],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}]]],[\"salla-price-range.cjs\",[[0,\"salla-price-range\",{\"minPrice\":[1032,\"min-price\"],\"maxPrice\":[1032,\"max-price\"],\"option\":[16],\"filtersData\":[520,\"filters-data\"],\"min\":[32],\"max\":[32],\"priceOptions\":[32],\"moreThanLabel\":[32],\"lessThanLabel\":[32],\"toLabel\":[32],\"fromLabel\":[32],\"typing\":[32],\"isMin\":[32],\"isRTL\":[32],\"reset\":[64]}]]]]"), options);
|
|
26
|
+
return index.bootstrapLazy(JSON.parse("[[\"salla-offer.cjs\",[[0,\"salla-offer\",{\"productCardComponent\":[1,\"product-card-component\"],\"offersList\":[32],\"userCurrency\":[32],\"isMultipleBank\":[32],\"title\":[32],\"currentPage\":[32],\"hasCustomComponent\":[32],\"isBankOffer\":[32],\"canRender\":[32],\"showOffer\":[32],\"offer_with_price_text\":[32],\"with_discount_text\":[32],\"product_discount_text\":[32],\"special_offer_text\":[32],\"multipleBankOfferTitleText\":[32],\"multipleBankOfferTitleDescription\":[32],\"buy_quantity_text\":[32]}]]],[\"salla-products-slider.cjs\",[[0,\"salla-products-slider\",{\"blockTitle\":[1,\"block-title\"],\"subTitle\":[1,\"sub-title\"],\"sliderId\":[1,\"slider-id\"],\"displayAllUrl\":[1,\"display-all-url\"],\"autoplay\":[1028],\"source\":[1537],\"sourceValue\":[1,\"source-value\"],\"limit\":[1026],\"sliderConfig\":[520,\"slider-config\"],\"productCardComponent\":[1,\"product-card-component\"],\"productsData\":[32],\"isReady\":[32],\"sourceValueIsValid\":[32],\"hasCustomComponent\":[32],\"apiUrl\":[32],\"parsedSourceValue\":[32]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectDonationAmount\":[32],\"selectAmount\":[32],\"isCustomDonation\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"reportValidity\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-filters.cjs\",[[0,\"salla-filters\",{\"filters\":[1040],\"isSidebarOpen\":[32],\"filtersData\":[32],\"apply\":[32],\"reset\":[32],\"getFilters\":[64],\"applyFilters\":[64],\"resetFilters\":[64]}]]],[\"salla-notifications.cjs\",[[0,\"salla-notifications\",{\"loadMoreText\":[1,\"load-more-text\"],\"itemPerPage\":[2,\"item-per-page\"],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"no_notifications_trans\":[32],\"load_more_text_trans\":[32]}]]],[\"salla-order-summary.cjs\",[[0,\"salla-order-summary\",{\"orderId\":[514,\"order-id\"],\"codeCopied\":[32],\"noItemFound\":[32],\"order_items\":[32]}]]],[\"salla-reviews.cjs\",[[0,\"salla-reviews\",{\"displayAllLink\":[516,\"display-all-link\"],\"source\":[513],\"sourceValue\":[513,\"source-value\"],\"limit\":[514],\"type\":[1],\"sort\":[1],\"hideCustomerInfo\":[4,\"hide-customer-info\"],\"reviews\":[32],\"isRTL\":[32],\"showReviews\":[32],\"testimonialText\":[32],\"displayAllLinkText\":[32]}]]],[\"salla-orders.cjs\",[[0,\"salla-orders\",{\"params\":[16],\"loadMoreText\":[1,\"load-more-text\"],\"orderNumberText\":[32],\"totalOrderText\":[32],\"orderDateText\":[32],\"orderStatusText\":[32],\"noOrderText\":[32],\"load_more_text_trans\":[32],\"languageCode\":[32],\"orders\":[32],\"pagination\":[32],\"hasInfiniteScroll\":[32],\"total\":[32],\"nextPage\":[32],\"showPlaceholder\":[32]}]]],[\"salla-advertisement.cjs\",[[0,\"salla-advertisement\",{\"position\":[32],\"advertisements\":[32],\"advertIcon\":[32],\"currentSlug\":[32]}]]],[\"salla-app-install-alert.cjs\",[[0,\"salla-app-install-alert\",{\"data\":[32],\"ctaLink\":[32],\"open\":[32],\"closing\":[32]}]]],[\"salla-apps-icons.cjs\",[[0,\"salla-apps-icons\",{\"hideTitle\":[4,\"hide-title\"],\"appsTitle\":[1,\"apps-title\"],\"vertical\":[4],\"apps\":[32]}]]],[\"salla-contacts.cjs\",[[0,\"salla-contacts\",{\"contactsTitle\":[1025,\"contacts-title\"],\"hideTitle\":[4,\"hide-title\"],\"isHeader\":[4,\"is-header\"],\"horizontal\":[4],\"iconsOnly\":[4,\"icons-only\"],\"contacts\":[32],\"iconsList\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32],\"mispayActive\":[32],\"installment_sheria_text\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-metadata.cjs\",[[0,\"salla-metadata\",{\"entity\":[1],\"entityId\":[2,\"entity-id\"],\"specs\":[32],\"download\":[32]}]]],[\"salla-payments.cjs\",[[0,\"salla-payments\",{\"withSbc\":[4,\"with-sbc\"],\"sbcId\":[1,\"sbc-id\"],\"withMadeInKsa\":[4,\"with-made-in-ksa\"],\"payments\":[32],\"placeholderImage\":[32]}]]],[\"salla-products-list.cjs\",[[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"autoload\":[1028],\"loadMoreText\":[1,\"load-more-text\"],\"productCardComponent\":[1,\"product-card-component\"],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"endOfText\":[32],\"failedLoadMore\":[32],\"currentPage\":[32],\"currentCategoryIdFilter\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}]]],[\"salla-social.cjs\",[[0,\"salla-social\",{\"links\":[32],\"iconsList\":[32]}]]],[\"salla-filters-widget.cjs\",[[4,\"salla-filters-widget\",{\"withLoadMore\":[1028,\"with-load-more\"],\"filtersData\":[16],\"option\":[16],\"isOpen\":[32],\"isShowMore\":[32],\"showMoreLabel\":[32],\"showLessLabel\":[32],\"page\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]],[\"salla-notification-item.cjs\",[[0,\"salla-notification-item\",{\"notification\":[16]}]]],[\"salla-add-product-button_47.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"widgetTitle\":[1,\"widget-title\"],\"widgetSubtitle\":[1,\"widget-subtitle\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[0,\"salla-menu\",{\"source\":[1],\"sourceValue\":[1,\"source-value\"],\"topnav\":[4],\"useReactLink\":[4,\"use-react-link\"],\"limit\":[2],\"menus\":[32],\"hasCustomComponent\":[32],\"setMenuContent\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"inline\":[516],\"withoutReload\":[4,\"without-reload\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"isModalOpen\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"hasError\":[32],\"errorMessage\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"offer_type\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"template\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"storePrice\":[32],\"theDeveloper\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32],\"isRtl\":[32]}],[0,\"salla-comments\",{\"itemId\":[2,\"item-id\"],\"loadMoreText\":[1,\"load-more-text\"],\"hideForm\":[4,\"hide-form\"],\"blockTitle\":[1,\"block-title\"],\"hideTitle\":[4,\"hide-title\"],\"type\":[1],\"showFormAvatar\":[4,\"show-form-avatar\"],\"comments\":[32],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"noComments\":[32],\"comment_title\":[32],\"comment_name\":[32],\"placeholder_text\":[32]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-profile\",{\"customFields\":[1,\"custom-fields\"],\"userData\":[32],\"userDefinedFields\":[32],\"disableAction\":[32],\"first_name_trans\":[32],\"last_name_trans\":[32],\"birthday_trans\":[32],\"birthday_placeholder_trans\":[32],\"gender_trans\":[32],\"gender_placeholder_trans\":[32],\"male_trans\":[32],\"female_trans\":[32],\"email_trans\":[32],\"mobile_trans\":[32],\"save_btn_trans\":[32],\"drag_and_drop_trans\":[32],\"browse_trans\":[32],\"email_required_trans\":[32],\"invalid_email_trans\":[32],\"setCustomFields\":[64]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"maxWords\":[2,\"max-words\"],\"showAction\":[4,\"show-action\"],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64],\"refresh\":[64]}],[0,\"salla-breadcrumb\",{\"breadcrumbs\":[32]}],[4,\"salla-cart-summary\",{\"showCartLabel\":[4,\"show-cart-label\"],\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"cartLabel\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"loadMoreText\":[1,\"load-more-text\"],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[0,\"salla-maintenance-alert\",{\"title\":[32],\"message\":[32],\"buttonTitle\":[32]}],[4,\"salla-quantity-input\",{\"cartItemId\":[8,\"cart-item-id\"],\"quantity\":[32],\"fireChangeEvent\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[4,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"is_loggedIn\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"hasError\":[32],\"errorMessage\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1537],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[0,\"salla-comment-item\",{\"comment\":[16],\"has_bought_trans\":[32],\"rated_trans\":[32],\"waiting_approval_trans\":[32],\"has_order_trans\":[32]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[4,\"salla-product-card\",{\"product\":[1],\"horizontal\":[4],\"shadowOnHover\":[4,\"shadow-on-hover\"],\"hideAddBtn\":[4,\"hide-add-btn\"],\"fullImage\":[4,\"full-image\"],\"minimal\":[4],\"isSpecial\":[4,\"is-special\"],\"showQuantity\":[4,\"show-quantity\"],\"productData\":[32],\"fitImageHeight\":[32],\"remained\":[32],\"outOfStock\":[32],\"donationAmount\":[32],\"startingPrice\":[32],\"addToCart\":[32],\"placeholder\":[32]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quickBuy\":[1540,\"quick-buy\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"supportStickyBar\":[516,\"support-sticky-bar\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32],\"showQuickBuy\":[32]}],[0,\"salla-count-down\",{\"date\":[1],\"boxed\":[4],\"size\":[1],\"color\":[1],\"labeled\":[4],\"endText\":[1,\"end-text\"],\"digits\":[1],\"endOfDay\":[4,\"end-of-day\"],\"daysLabel\":[32],\"hoursLabel\":[32],\"minutesLabel\":[32],\"secondsLabel\":[32],\"endLabel\":[32],\"invalidDate\":[32],\"offerEnded\":[32],\"countInterval\":[32],\"days\":[32],\"hours\":[32],\"minutes\":[32],\"seconds\":[32],\"endCountDown\":[64]}],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[0,\"salla-quick-buy\",{\"type\":[1025],\"productId\":[1025,\"product-id\"],\"cartId\":[1025,\"cart-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"applePayOnly\":[1028,\"apple-pay-only\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"gridThumbs\":[516,\"grid-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"direction\":[1537],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"windowWidth\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"autofocus\":[516],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"type\":[513],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}]]],[\"salla-price-range.cjs\",[[0,\"salla-price-range\",{\"minPrice\":[1032,\"min-price\"],\"maxPrice\":[1032,\"max-price\"],\"option\":[16],\"filtersData\":[520,\"filters-data\"],\"min\":[32],\"max\":[32],\"priceOptions\":[32],\"moreThanLabel\":[32],\"lessThanLabel\":[32],\"toLabel\":[32],\"fromLabel\":[32],\"typing\":[32],\"isMin\":[32],\"isRTL\":[32],\"reset\":[64]}]]]]"), options);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
exports.setNonce = index.setNonce;
|
|
@@ -291,7 +291,7 @@ class Helper {
|
|
|
291
291
|
return {
|
|
292
292
|
"@type": "Review",
|
|
293
293
|
"author": reviewData.name,
|
|
294
|
-
"datePublished":
|
|
294
|
+
"datePublished": reviewData.date * 1000,
|
|
295
295
|
"description": reviewData.content,
|
|
296
296
|
"reviewRating": {
|
|
297
297
|
"@type": "Rating",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Helper.js","sourceRoot":"","sources":["../../src/Helpers/Helper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,uBAAuB;AACvB,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AAEjC,MAAM,MAAM;EAGV,oBAAoB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IACxD,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpE,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpE,IAAI,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,OAAO,IAAI,CAAC;EACd,CAAC;EAED,aAAa,CAAC,QAAQ,EAA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/api/product\";\nimport { Review } from \"../../src/components/salla-reviews/interfaces\";\nimport { Product as SallaProduct } from \"@salla.sa/twilight/types/common\";\nimport { ListItem, ItemList, Product as SchemaProduct, WithContext } from 'schema-dts';\nimport anime from 'animejs';\n\n//TODO::reduce it to 10\nsalla.event.setMaxListeners(100);\n\nclass Helper {\n private debounce_: any;\n\n toggleElementClassIf(element, classes1, classes2, callback) {\n classes1 = Array.isArray(classes1) ? classes1 : classes1.split(' ');\n classes2 = Array.isArray(classes2) ? classes2 : classes2.split(' ');\n let isClasses1 = callback(element);\n element?.classList.remove(...(isClasses1 ? classes2 : classes1));\n element?.classList.add(...(isClasses1 ? classes1 : classes2));\n return this;\n }\n\n toggleClassIf(selector, classes1, classes2, callback) {\n document.querySelectorAll(selector).forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));\n return this;\n }\n\n isValidEmail(email) {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n filterEmojies(text) {\n var characterFilter = /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|\\ud83c[\\ude32-\\ude3a]|\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])/g;\n return text.replace(characterFilter, \"\");\n }\n\n debounce(fn, ...data) {\n if (!this.debounce_) {\n this.debounce_ = salla.helpers.debounce((callback, ...innerData) => callback(...innerData), 500);\n }\n //@ts-ignore\n return this.debounce_(fn, ...data);\n }\n\n getProductsSource(source) {\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'customer.wishlist': 'wishlist',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n 'product.index.sales': 'sales',\n 'components.most_sales_products': 'sales',//temporary, delete it after two days from now\n }[source || salla.config.get('page.slug')] || source || 'latest';\n }\n\n getPageTitleForSource(source) {\n\n source = {\n 'brands': 'common.titles.brands',\n // 'categories':'',\n 'latest': 'blocks.home.latest_products',\n 'offers': 'common.titles.discounts',\n // 'search':'',\n // 'landing-page':'',\n // 'tags':'',\n 'sales': 'common.titles.most_sales',\n }[source];\n\n return source ? salla.lang.get(source) : '';\n }\n\n getProductsSourceValue(source, sourceValue) {\n const parsedSource = this.getProductsSource(source);\n\n // Validate if the source value is a valid JSON string\n let parsedSourceValue: any = null;\n if (sourceValue) {\n try {\n parsedSourceValue = JSON.parse(sourceValue);\n } catch (error) {\n console.error('Invalid JSON string in sourceValue:', error);\n }\n }\n\n // Handle different source types\n if (!['search', 'json', 'offers', 'latest', 'sales', 'related'].includes(parsedSource)) {\n\n if (Array.isArray(parsedSourceValue) && parsedSourceValue.length) {\n return parsedSourceValue;\n }\n\n\n if (Array.isArray(parsedSourceValue) && !parsedSourceValue.length) {\n return '';\n }\n\n if (typeof parsedSourceValue === 'number') {\n return [parsedSourceValue];\n }\n\n if (!sourceValue && ['categories', 'tags', 'brands'].includes(source)) {\n return [salla.config.get('page.id')];\n }\n }\n\n // Return sourceValue if it exists and is a valid JSON object/array\n if (parsedSourceValue || sourceValue) {\n return parsedSourceValue || sourceValue;\n }\n\n if (parsedSource === 'search') {\n return new URLSearchParams(window.location.search).get('q') || '';\n }\n\n // Return page id as default value\n return salla.config.get('page.id');\n }\n\n extractFiltersFromUrl(searchParams) {\n let filters = {};\n searchParams.forEach((value, key) => {\n // Handle filters[xxx] format\n const matchesNested = key.match(/^filters\\[(.*?)\\](\\[(.*?)\\])?$/u);\n\n if (matchesNested) {\n const filterName = matchesNested[1];\n const nestedKey = matchesNested[3];\n\n if (nestedKey) {\n // Handle nested object\n filters[filterName] = filters[filterName] || {};\n filters[filterName][nestedKey] = value;\n } else {\n // Handle regular key\n filters[filterName] = value;\n }\n } else {\n // Handle simple key-value pairs\n const matchesSimple = key.match(/^(.*?)$/u);\n\n if (matchesSimple) {\n filters[matchesSimple[1]] = value;\n }\n }\n });\n return filters;\n }\n\n /**\n * We needed this function to help us avoid requesting the products list before salla is ready,\n * was causing a strange issues in live for the bad connections ex: not loading the dom, requesting api without storeIdentefire\n */\n onSallaReadyPromise(callback): Promise<any> {\n return new Promise((resolve) => salla.onReady(() => callback(resolve)));\n }\n\n /**\n * \n * let's make sure to send the request only when salla is ready\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n */\n fetchProducts(source, source_value, limit): Promise<ProductResponse.lists> {\n return this.onSallaReadyPromise((resolve) => resolve(salla.product.api.fetch({ source: source, source_value: source_value, limit: limit })));\n }\n\n getProductSchemaMarkupScript(product: any): HTMLScriptElement {\n const scriptElement = document.createElement('script');\n scriptElement.type = 'application/ld+json';\n // TODO: This json object MIGHT need mode data or properties.\n const jsonData = {\n \"@context\": \"http://schema.org\",\n \"@type\": \"Product\",\n \"name\": product?.name,\n \"image\": product?.image?.url || product?.thumbnail,\n \"description\": product?.description,\n \"brand\": {\n \"@type\": \"Brand\",\n \"logo\": product?.brand?.logo\n },\n \"offers\": {\n \"@type\": \"Offer\",\n \"price\": product?.price\n }\n };\n scriptElement.text = JSON.stringify(jsonData);\n return scriptElement\n }\n\n createProductSchema(product: SallaProduct | ProductDetail, position: number): ListItem {\n let ProductSchema: SchemaProduct = {\n \"productID\": `${product.id}`,\n \"@type\": 'Product',\n \"name\": product.name,\n \"url\": product.url,\n \"image\": product.image.url || (product.image as string),\n \"description\": product.description || product.subtitle || product.name,\n \"offers\": {\n \"@type\": \"Offer\",\n \"url\": product.url,\n \"priceCurrency\": product.currency,\n \"price\": product.price,\n \"itemCondition\": \"NewCondition\",\n \"availability\": product.is_available ? \"InStock\" : \"OutOfStock\",\n //if there is no product.discount_ends, will set it to be valid until the end of this week\n \"priceValidUntil\": product.discount_ends || (new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0]),\n \"priceSpecification\": {\n \"@type\": \"PriceSpecification\",\n \"price\": product.regular_price,\n \"priceCurrency\": product.currency,\n \"valueAddedTaxIncluded\": product.is_taxable,\n },\n \"seller\": {\n \"@type\": \"Organization\",\n \"name\": salla.config.get('store.name'),\n },\n }\n };\n //@ts-ignore\n if (product.rating?.stars) {\n ProductSchema.aggregateRating = {\n \"@type\": \"AggregateRating\",\n //@ts-ignore\n \"ratingValue\": product.rating.stars,\n \"reviewCount\": product.rating.count,\n };\n }\n\n\n return {\n \"@type\": \"ListItem\",\n \"position\": position,\n \"item\": ProductSchema,\n\n };\n }\n \n generateProductSchema(productList: Array<SallaProduct | ProductDetail>) {\n const schemaId = 'salla-product-schema-script';\n if (document.getElementById(schemaId)) {\n salla.logger.warn(`already added schema-script with id (${schemaId})!`)\n return;\n }\n\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n script.id = schemaId;\n\n\n const schema: WithContext<ItemList> = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"ItemList\",\n \"name\": salla.config.get('page.title'),\n \"itemListElement\": productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),\n };\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n\n /**\n * Format date in the form of `Monday 13 November 2023`\n */\n formatDateFromString(dateString: string, numberCb: Function, lang: string = 'en'): string {\n const dateObject = new Date(dateString);\n\n const errors = {\n en: \"Invalid Date\",\n ar: \"تاريخ غير صالح\"\n }\n\n if (isNaN(dateObject.getTime())) {\n return errors[lang];\n }\n\n const daysOfWeek = {\n en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت']\n };\n const months = {\n en: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n ar: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']\n };\n\n const dayOfWeek = daysOfWeek[lang][dateObject.getDay()];\n const dayOfMonth = numberCb(dateObject.getDate(), lang === 'en');\n const month = months[lang][dateObject.getMonth()];\n const year = numberCb(dateObject.getFullYear(), lang === 'en');\n\n return `${dayOfWeek} ${dayOfMonth} ${month} ${year}`;\n }\n\n /**\n * Copy text into clipboard.\n * @param event \n */\n copyToClipboard(event) {\n // Get the text content from the clicked div\n var textToCopy = event.target.innerText;\n\n // Use the Clipboard API to copy text to the clipboard\n navigator.clipboard.writeText(textToCopy)\n .then(() => {\n console.log('Text copied to clipboard: ' + textToCopy);\n })\n .catch(err => {\n console.error('Unable to copy text to clipboard', err);\n });\n\n }\n\n animateItems(items: NodeListOf<Element>) {\n if (!items) return;\n anime({\n targets: items,\n opacity: [0, 1],\n duration: 1200,\n translateY: [20, 0],\n delay: function (_el, i) {\n return i * 100;\n },\n easing: 'easeOutExpo',\n complete: function (_anim) {\n items.forEach((item: Element) => {\n item.classList.add('animated');\n })\n }\n\n })\n }\n\n createReviewObject(reviewData: Review) {\n return {\n \"@type\": \"Review\",\n \"author\": reviewData.name,\n \"datePublished\": Date.parse(reviewData.created_at.date).toString(),\n \"description\": reviewData.content,\n \"reviewRating\": {\n \"@type\": \"Rating\",\n \"bestRating\": \"5\",\n \"ratingValue\": \"5\",\n \"worstRating\": \"1\"\n }\n };\n }\n\n generateReviewSchema(reviews: Array<Review>){\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n\n\n const schema = {\n \"@context\": \"http://schema.org/\",\n \"@type\": \"CollectionPage\",\n \"name\": \"Category Name\", // TODO: check for the correct value here\n \"description\": \"Description of the category\", // TODO: here too\n \"review\": reviews.map((review) => this.createReviewObject(review))\n }\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n}\n\nexport default new Helper;\n"]}
|
|
1
|
+
{"version":3,"file":"Helper.js","sourceRoot":"","sources":["../../src/Helpers/Helper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,uBAAuB;AACvB,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AAEjC,MAAM,MAAM;EAGV,oBAAoB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IACxD,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpE,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpE,IAAI,UAAU,GAAG,QAAQ,CAAC,OAAO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AAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;KACnE,CAAA;IAED,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;EACpC,CAAC;CACF;AAED,eAAe,IAAI,MAAM,CAAC","sourcesContent":["import { ProductDetail, ProductResponse } from \"@salla.sa/twilight/types/api/product\";\nimport { Review } from \"../../src/components/salla-reviews/interfaces\";\nimport { Product as SallaProduct } from \"@salla.sa/twilight/types/common\";\nimport { ListItem, ItemList, Product as SchemaProduct, WithContext } from 'schema-dts';\nimport anime from 'animejs';\n\n//TODO::reduce it to 10\nsalla.event.setMaxListeners(100);\n\nclass Helper {\n private debounce_: any;\n\n toggleElementClassIf(element, classes1, classes2, callback) {\n classes1 = Array.isArray(classes1) ? classes1 : classes1.split(' ');\n classes2 = Array.isArray(classes2) ? classes2 : classes2.split(' ');\n let isClasses1 = callback(element);\n element?.classList.remove(...(isClasses1 ? classes2 : classes1));\n element?.classList.add(...(isClasses1 ? classes1 : classes2));\n return this;\n }\n\n toggleClassIf(selector, classes1, classes2, callback) {\n document.querySelectorAll(selector).forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));\n return this;\n }\n\n isValidEmail(email) {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n }\n\n filterEmojies(text) {\n var characterFilter = /(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|\\ud83c[\\ude32-\\ude3a]|\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])/g;\n return text.replace(characterFilter, \"\");\n }\n\n debounce(fn, ...data) {\n if (!this.debounce_) {\n this.debounce_ = salla.helpers.debounce((callback, ...innerData) => callback(...innerData), 500);\n }\n //@ts-ignore\n return this.debounce_(fn, ...data);\n }\n\n getProductsSource(source) {\n return {\n 'brands.single': 'brands',\n 'product.index': 'categories',\n 'product.index.latest': 'latest',\n 'product.index.offers': 'offers',\n 'product.index.search': 'search',\n 'customer.wishlist': 'wishlist',\n 'landing-page': 'landing-page',\n 'product.index.tag': 'tags',\n 'product.index.sales': 'sales',\n 'components.most_sales_products': 'sales',//temporary, delete it after two days from now\n }[source || salla.config.get('page.slug')] || source || 'latest';\n }\n\n getPageTitleForSource(source) {\n\n source = {\n 'brands': 'common.titles.brands',\n // 'categories':'',\n 'latest': 'blocks.home.latest_products',\n 'offers': 'common.titles.discounts',\n // 'search':'',\n // 'landing-page':'',\n // 'tags':'',\n 'sales': 'common.titles.most_sales',\n }[source];\n\n return source ? salla.lang.get(source) : '';\n }\n\n getProductsSourceValue(source, sourceValue) {\n const parsedSource = this.getProductsSource(source);\n\n // Validate if the source value is a valid JSON string\n let parsedSourceValue: any = null;\n if (sourceValue) {\n try {\n parsedSourceValue = JSON.parse(sourceValue);\n } catch (error) {\n console.error('Invalid JSON string in sourceValue:', error);\n }\n }\n\n // Handle different source types\n if (!['search', 'json', 'offers', 'latest', 'sales', 'related'].includes(parsedSource)) {\n\n if (Array.isArray(parsedSourceValue) && parsedSourceValue.length) {\n return parsedSourceValue;\n }\n\n\n if (Array.isArray(parsedSourceValue) && !parsedSourceValue.length) {\n return '';\n }\n\n if (typeof parsedSourceValue === 'number') {\n return [parsedSourceValue];\n }\n\n if (!sourceValue && ['categories', 'tags', 'brands'].includes(source)) {\n return [salla.config.get('page.id')];\n }\n }\n\n // Return sourceValue if it exists and is a valid JSON object/array\n if (parsedSourceValue || sourceValue) {\n return parsedSourceValue || sourceValue;\n }\n\n if (parsedSource === 'search') {\n return new URLSearchParams(window.location.search).get('q') || '';\n }\n\n // Return page id as default value\n return salla.config.get('page.id');\n }\n\n extractFiltersFromUrl(searchParams) {\n let filters = {};\n searchParams.forEach((value, key) => {\n // Handle filters[xxx] format\n const matchesNested = key.match(/^filters\\[(.*?)\\](\\[(.*?)\\])?$/u);\n\n if (matchesNested) {\n const filterName = matchesNested[1];\n const nestedKey = matchesNested[3];\n\n if (nestedKey) {\n // Handle nested object\n filters[filterName] = filters[filterName] || {};\n filters[filterName][nestedKey] = value;\n } else {\n // Handle regular key\n filters[filterName] = value;\n }\n } else {\n // Handle simple key-value pairs\n const matchesSimple = key.match(/^(.*?)$/u);\n\n if (matchesSimple) {\n filters[matchesSimple[1]] = value;\n }\n }\n });\n return filters;\n }\n\n /**\n * We needed this function to help us avoid requesting the products list before salla is ready,\n * was causing a strange issues in live for the bad connections ex: not loading the dom, requesting api without storeIdentefire\n */\n onSallaReadyPromise(callback): Promise<any> {\n return new Promise((resolve) => salla.onReady(() => callback(resolve)));\n }\n\n /**\n * \n * let's make sure to send the request only when salla is ready\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n * we will return the data and the resolve callback, to give the component the green light (by resolving the Promise in onSallaReadyPromise) to render only when we have the data\n */\n fetchProducts(source, source_value, limit): Promise<ProductResponse.lists> {\n return this.onSallaReadyPromise((resolve) => resolve(salla.product.api.fetch({ source: source, source_value: source_value, limit: limit })));\n }\n\n getProductSchemaMarkupScript(product: any): HTMLScriptElement {\n const scriptElement = document.createElement('script');\n scriptElement.type = 'application/ld+json';\n // TODO: This json object MIGHT need mode data or properties.\n const jsonData = {\n \"@context\": \"http://schema.org\",\n \"@type\": \"Product\",\n \"name\": product?.name,\n \"image\": product?.image?.url || product?.thumbnail,\n \"description\": product?.description,\n \"brand\": {\n \"@type\": \"Brand\",\n \"logo\": product?.brand?.logo\n },\n \"offers\": {\n \"@type\": \"Offer\",\n \"price\": product?.price\n }\n };\n scriptElement.text = JSON.stringify(jsonData);\n return scriptElement\n }\n\n createProductSchema(product: SallaProduct | ProductDetail, position: number): ListItem {\n let ProductSchema: SchemaProduct = {\n \"productID\": `${product.id}`,\n \"@type\": 'Product',\n \"name\": product.name,\n \"url\": product.url,\n \"image\": product.image.url || (product.image as string),\n \"description\": product.description || product.subtitle || product.name,\n \"offers\": {\n \"@type\": \"Offer\",\n \"url\": product.url,\n \"priceCurrency\": product.currency,\n \"price\": product.price,\n \"itemCondition\": \"NewCondition\",\n \"availability\": product.is_available ? \"InStock\" : \"OutOfStock\",\n //if there is no product.discount_ends, will set it to be valid until the end of this week\n \"priceValidUntil\": product.discount_ends || (new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0]),\n \"priceSpecification\": {\n \"@type\": \"PriceSpecification\",\n \"price\": product.regular_price,\n \"priceCurrency\": product.currency,\n \"valueAddedTaxIncluded\": product.is_taxable,\n },\n \"seller\": {\n \"@type\": \"Organization\",\n \"name\": salla.config.get('store.name'),\n },\n }\n };\n //@ts-ignore\n if (product.rating?.stars) {\n ProductSchema.aggregateRating = {\n \"@type\": \"AggregateRating\",\n //@ts-ignore\n \"ratingValue\": product.rating.stars,\n \"reviewCount\": product.rating.count,\n };\n }\n\n\n return {\n \"@type\": \"ListItem\",\n \"position\": position,\n \"item\": ProductSchema,\n\n };\n }\n \n generateProductSchema(productList: Array<SallaProduct | ProductDetail>) {\n const schemaId = 'salla-product-schema-script';\n if (document.getElementById(schemaId)) {\n salla.logger.warn(`already added schema-script with id (${schemaId})!`)\n return;\n }\n\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n script.id = schemaId;\n\n\n const schema: WithContext<ItemList> = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"ItemList\",\n \"name\": salla.config.get('page.title'),\n \"itemListElement\": productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),\n };\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n\n /**\n * Format date in the form of `Monday 13 November 2023`\n */\n formatDateFromString(dateString: string, numberCb: Function, lang: string = 'en'): string {\n const dateObject = new Date(dateString);\n\n const errors = {\n en: \"Invalid Date\",\n ar: \"تاريخ غير صالح\"\n }\n\n if (isNaN(dateObject.getTime())) {\n return errors[lang];\n }\n\n const daysOfWeek = {\n en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت']\n };\n const months = {\n en: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n ar: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']\n };\n\n const dayOfWeek = daysOfWeek[lang][dateObject.getDay()];\n const dayOfMonth = numberCb(dateObject.getDate(), lang === 'en');\n const month = months[lang][dateObject.getMonth()];\n const year = numberCb(dateObject.getFullYear(), lang === 'en');\n\n return `${dayOfWeek} ${dayOfMonth} ${month} ${year}`;\n }\n\n /**\n * Copy text into clipboard.\n * @param event \n */\n copyToClipboard(event) {\n // Get the text content from the clicked div\n var textToCopy = event.target.innerText;\n\n // Use the Clipboard API to copy text to the clipboard\n navigator.clipboard.writeText(textToCopy)\n .then(() => {\n console.log('Text copied to clipboard: ' + textToCopy);\n })\n .catch(err => {\n console.error('Unable to copy text to clipboard', err);\n });\n\n }\n\n animateItems(items: NodeListOf<Element>) {\n if (!items) return;\n anime({\n targets: items,\n opacity: [0, 1],\n duration: 1200,\n translateY: [20, 0],\n delay: function (_el, i) {\n return i * 100;\n },\n easing: 'easeOutExpo',\n complete: function (_anim) {\n items.forEach((item: Element) => {\n item.classList.add('animated');\n })\n }\n\n })\n }\n\n createReviewObject(reviewData: Review) {\n return {\n \"@type\": \"Review\",\n \"author\": reviewData.name,\n \"datePublished\": reviewData.date * 1000,\n \"description\": reviewData.content,\n \"reviewRating\": {\n \"@type\": \"Rating\",\n \"bestRating\": \"5\",\n \"ratingValue\": \"5\",\n \"worstRating\": \"1\"\n }\n };\n }\n\n generateReviewSchema(reviews: Array<Review>){\n const script = document.createElement('script');\n script.type = 'application/ld+json';\n\n\n const schema = {\n \"@context\": \"http://schema.org/\",\n \"@type\": \"CollectionPage\",\n \"name\": \"Category Name\", // TODO: check for the correct value here\n \"description\": \"Description of the category\", // TODO: here too\n \"review\": reviews.map((review) => this.createReviewObject(review))\n }\n\n script.textContent = JSON.stringify(schema);\n document.head.appendChild(script);\n }\n}\n\nexport default new Helper;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/components/salla-reviews/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export type Source= \"all\" | \"store\" | \"products\" | \"
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/components/salla-reviews/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export type Source= \"products\" | \"categories\" | \"json\";\n\nexport type ReviewType = \"all\" | \"store\" | \"products\";\n\nexport type SortingOption = \"top_rating\" | \"random\" | \"latest\";\n\nexport interface Review {\n rating?: number;\n content?: string;\n status?: string;\n created_at?: CreatedAt;\n replies?: any[];\n text?: string;\n type?: string;\n avatar?: string;\n name?: string;\n stars?: number;\n is_pending?: boolean;\n has_order?: boolean;\n kind?: string;\n session_id?: string;\n customer_id?: number;\n city?: string;\n date?: number;\n}\n\nexport interface CreatedAt {\n date?: string;\n timezone_type?: number;\n timezone?: string;\n}"]}
|