@salla.sa/twilight-components 2.14.299 → 2.14.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Helper-C9UmWIYn.js → Helper-B5NunIdR.js} +1 -0
- package/dist/cjs/{filepond-DsdfFzci.js → filepond-BScg3EjA.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-D7EBBVBw.js → filepond-plugin-file-poster-C0equ1tk.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Dh6MxbpO.js → filepond-plugin-file-validate-size-DbSDO39t.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-D40rBF9e.js → filepond-plugin-file-validate-type-oNrCSQ4M.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BXE5dQVb.js → filepond-plugin-image-edit-CEs1Wvna.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DbGi6rNR.js → filepond-plugin-image-exif-orientation-CR0z9rwJ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CDgGkap0.js → filepond-plugin-image-preview-QCP0yf11.js} +1 -1
- package/dist/cjs/{index-Cd0WMShL.js → index-bUFB5h9D.js} +1 -1
- package/dist/cjs/{index-Bo6u9vKr.js → index-tXQykYB9.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +25 -24
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +2 -2
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/Helpers/Helper.js +1 -0
- package/dist/collection/components/salla-products-list/salla-products-list.js +3 -3
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +14 -13
- package/dist/components/Helper.js +1 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-products-list2.js +1 -1
- package/dist/components/salla-user-menu.js +14 -13
- package/dist/esm/{Helper-B51hb0bi.js → Helper-Bt5Zv9cl.js} +1 -0
- package/dist/esm/{filepond-CS1gpTBr.js → filepond-DZgILbOT.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-hYRi6NyQ.js → filepond-plugin-file-poster-DMXXHQ1L.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Bq1DeGGt.js → filepond-plugin-file-validate-size-uKHV0jNp.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-cKS428EA.js → filepond-plugin-file-validate-type-D8hhJ9EB.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-Czrr7OFb.js → filepond-plugin-image-edit-0X2RSyN6.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-D5NuOSvg.js → filepond-plugin-image-exif-orientation-0v28bqEm.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CPQU6Nfl.js → filepond-plugin-image-preview-rwaj1mis.js} +1 -1
- package/dist/esm/{index-CRHDw9qX.js → index-DA5HnTzR.js} +1 -1
- package/dist/esm/{index-BcEZj_a_.js → index-Vf9-v4wr.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +25 -24
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +2 -2
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +2 -2
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/twilight/{p-BSB44NuH.js → p--XHnNbTg.js} +1 -1
- package/dist/twilight/{p-720e6cd2.entry.js → p-060b76fc.entry.js} +1 -1
- package/dist/twilight/{p-c4a0b3b7.entry.js → p-10627275.entry.js} +1 -1
- package/dist/twilight/{p-618c18ef.entry.js → p-11258ae1.entry.js} +1 -1
- package/dist/twilight/{p-7c68bcc8.entry.js → p-11734c15.entry.js} +2 -2
- package/dist/twilight/{p-a78482f2.entry.js → p-11e3381f.entry.js} +1 -1
- package/dist/twilight/{p-6c5a9d29.entry.js → p-151c103f.entry.js} +1 -1
- package/dist/twilight/{p-35dd8271.entry.js → p-20c4c8af.entry.js} +1 -1
- package/dist/twilight/{p-61171611.entry.js → p-3d92ba5c.entry.js} +1 -1
- package/dist/twilight/{p-802f41e9.entry.js → p-446bd291.entry.js} +1 -1
- package/dist/twilight/{p-7a7008a1.entry.js → p-4ba71acf.entry.js} +1 -1
- package/dist/twilight/{p-be4026a8.entry.js → p-4d3071a5.entry.js} +1 -1
- package/dist/twilight/{p-ac60f7a8.entry.js → p-53ad8f04.entry.js} +1 -1
- package/dist/twilight/{p-1df02ecb.entry.js → p-5426fed3.entry.js} +1 -1
- package/dist/twilight/{p-fbf8ed58.entry.js → p-65103ff7.entry.js} +1 -1
- package/dist/twilight/{p-22478bc6.entry.js → p-6d112428.entry.js} +1 -1
- package/dist/twilight/{p-9e1fde84.entry.js → p-70750924.entry.js} +1 -1
- package/dist/twilight/{p-48fcb842.entry.js → p-7a980667.entry.js} +1 -1
- package/dist/twilight/{p-cc426b8e.entry.js → p-81f65a33.entry.js} +1 -1
- package/dist/twilight/{p-75d4b225.entry.js → p-83a0e642.entry.js} +1 -1
- package/dist/twilight/{p-eb2d4571.entry.js → p-8f3f3530.entry.js} +1 -1
- package/dist/twilight/{p-7f11dbdb.entry.js → p-91b68094.entry.js} +1 -1
- package/dist/twilight/{p-7faf3b7b.entry.js → p-9795c6d0.entry.js} +1 -1
- package/dist/twilight/{p-3a156d84.entry.js → p-97e6602f.entry.js} +1 -1
- package/dist/twilight/{p-D94zCCrv.js → p-B7BW4Mdj.js} +1 -1
- package/dist/twilight/{p-Bzhd8VNC.js → p-BmD3prgX.js} +1 -1
- package/dist/twilight/{p-DosNklS4.js → p-CPQv1htQ.js} +2 -2
- package/dist/twilight/p-DQd7LCNI.js +9 -0
- package/dist/twilight/{p-DSERK81u.js → p-DUIBkQ0L.js} +1 -1
- package/dist/twilight/p-Dljb4XCt.js +4 -0
- package/dist/twilight/p-EFshmXnQ.js +9 -0
- package/dist/twilight/{p-BcEZj_a_.js → p-Vf9-v4wr.js} +1 -1
- package/dist/twilight/{p-d2e0a44b.entry.js → p-a9adb89e.entry.js} +1 -1
- package/dist/twilight/{p-a845dc62.entry.js → p-afeeefb3.entry.js} +1 -1
- package/dist/twilight/{p-7ba50aa5.entry.js → p-b7ca90d8.entry.js} +1 -1
- package/dist/twilight/{p-f8621694.entry.js → p-bb3a0dbc.entry.js} +1 -1
- package/dist/twilight/p-c77da76a.entry.js +4 -0
- package/dist/twilight/{p-ba943da7.entry.js → p-d062aafc.entry.js} +1 -1
- package/dist/twilight/{p-8752f63e.entry.js → p-ddd3cb10.entry.js} +1 -1
- package/dist/twilight/{p-5013bc5d.entry.js → p-dfb1f2bb.entry.js} +1 -1
- package/dist/twilight/{p-0d7f2c4f.entry.js → p-f155cb58.entry.js} +1 -1
- package/dist/twilight/{p-47d610c9.entry.js → p-f54b0939.entry.js} +1 -1
- package/dist/twilight/{p-9bbb9da8.entry.js → p-fadae641.entry.js} +1 -1
- package/dist/twilight/{p-DdybBqQi.js → p-ozyDVWVs.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +2 -2
- package/dist/types/components.d.ts +2 -2
- package/package.json +5 -5
- package/dist/twilight/p-X-ZUrwUQ.js +0 -4
- package/dist/twilight/p-b1b7f8d6.entry.js +0 -4
- package/dist/twilight/p-eaOyQUpB.js +0 -9
- package/dist/twilight/p-rKgX27tV.js +0 -9
|
@@ -1965,7 +1965,7 @@ export namespace Components {
|
|
|
1965
1965
|
* The source of the products list
|
|
1966
1966
|
* @type {string}
|
|
1967
1967
|
*/
|
|
1968
|
-
"source": 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'search' | 'tags' | 'selected' | 'offers' | 'landing-page' | 'sales' | 'wishlist' | 'top-rated';
|
|
1968
|
+
"source": 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'search' | 'tags' | 'selected' | 'offers' | 'landing-page' | 'sales' | 'wishlist' | 'top-rated' | 'reorder';
|
|
1969
1969
|
/**
|
|
1970
1970
|
* The source value, cloud be different values as following: - array of ids when `source` in ['categories', 'brands', 'tags', 'selected'] - keyword when `source` = 'search' - products payload when `source` = 'json' - product_id when `source` = 'related'
|
|
1971
1971
|
* @type {string}
|
|
@@ -5751,7 +5751,7 @@ declare namespace LocalJSX {
|
|
|
5751
5751
|
* The source of the products list
|
|
5752
5752
|
* @type {string}
|
|
5753
5753
|
*/
|
|
5754
|
-
"source"?: 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'search' | 'tags' | 'selected' | 'offers' | 'landing-page' | 'sales' | 'wishlist' | 'top-rated';
|
|
5754
|
+
"source"?: 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'search' | 'tags' | 'selected' | 'offers' | 'landing-page' | 'sales' | 'wishlist' | 'top-rated' | 'reorder';
|
|
5755
5755
|
/**
|
|
5756
5756
|
* The source value, cloud be different values as following: - array of ids when `source` in ['categories', 'brands', 'tags', 'selected'] - keyword when `source` = 'search' - products payload when `source` = 'json' - product_id when `source` = 'related'
|
|
5757
5757
|
* @type {string}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight-components",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.300",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"author": "Salla Team <support@salla.dev> (https://salla.dev)",
|
|
6
6
|
"bugs": {
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"typescript": "^5.4.5"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@salla.sa/applepay": "2.14.
|
|
84
|
-
"@salla.sa/twilight": "2.14.
|
|
85
|
-
"@salla.sa/twilight-tailwind-theme": "2.14.
|
|
83
|
+
"@salla.sa/applepay": "2.14.300",
|
|
84
|
+
"@salla.sa/twilight": "2.14.300",
|
|
85
|
+
"@salla.sa/twilight-tailwind-theme": "2.14.300",
|
|
86
86
|
"@types/node": "^20.4.8",
|
|
87
87
|
"animejs": "^3.2.2",
|
|
88
88
|
"filepond": "^4.30.6",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"vanilla-lazyload": "^17.8.5",
|
|
101
101
|
"vanilla-picker": "^2.12.2"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "efcdb4998beb96ff1c5eb28905f100eb6dd0b939"
|
|
104
104
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{a as e}from"./p-CgtvEd63.js";salla.event.setMaxListeners(100);var t=new class{setIncludes(e){return this.includes=e,this}toggleElementClassIf(e,t,a,r){t=Array.isArray(t)?t:t.split(" "),a=Array.isArray(a)?a:a.split(" ");let n=r(e);return e?.classList.remove(...n?a:t),e?.classList.add(...n?t:a),this}toggleClassIf(e,t,a,r){return document.querySelectorAll(e).forEach((e=>this.toggleElementClassIf(e,t,a,r))),this}isValidEmail(e){return/^(([^<>()[\]\\.,;:\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,}))$/.test(String(e).toLowerCase())}filterEmojies(e){return e.replace(/(?:[\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,"")}debounce(e,...t){return this.debounce_||(this.debounce_=salla.helpers.debounce(((e,...t)=>e(...t)),500)),this.debounce_(e,...t)}getProductsSource(e){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","customer.wishlist":"wishlist","landing-page":"landing-page","product.index.tag":"tags","product.index.sales":"sales","components.most_sales_products":"sales"}[e||salla.config.get("page.slug")]||e||"latest"}getPageTitleForSource(e){return(e={brands:"common.titles.brands",latest:"blocks.home.latest_products",offers:"common.titles.discounts",sales:"common.titles.most_sales"}[e])?salla.lang.get(e):""}getProductsSourceValue(e,t){const a=this.getProductsSource(e);let r=null;if(t)try{r="string"==typeof t?JSON.parse(t):t}catch(e){console.error("Failed to parse JSON string in sourceValue:",e)}if(!["search","json","offers","latest","sales","related"].includes(a)){if(Array.isArray(r)&&r.length)return r;if(Array.isArray(r)&&!r.length)return"";if("number"==typeof r)return[r];if(!t&&["categories","tags","brands"].includes(e))return[salla.config.get("page.id")]}return r||t?r||t:"search"===a?new URLSearchParams(window.location.search).get("q")||"":salla.config.get("page.id")}extractFiltersFromUrl(e){let t={};return e.forEach(((e,a)=>{const r=a.match(/^filters\[(.*?)\](\[(.*?)\])?$/u);if(r){const a=r[1],n=r[3];n?(t[a]=t[a]||{},t[a][n]=e):t[a]=e}else{const r=a.match(/^(.*?)$/u);r&&(t[r[1]]=e)}})),t}async injectExtraFieldsToResponse(e){if(!e||!this.includes)return e;const t=e.data.map((e=>e.id));try{const{data:a}=await this.fetchImagesAndOptions(t);if(this.injectOptionsAndImages(e.data,a),!this.includes.includes("metadata"))return e;const r=await salla.api.metadata.fetchValues("product",t);return e.data.forEach((e=>{e.metadata=r.data.find((t=>parseInt(t.entity_id)===parseInt(e.id)))})),e}catch(e){throw console.error("Error in injectExtraFieldsToResponse:",e),e}}fetchImagesAndOptions(e){return this.productsIncludes().length?salla.api.product.fetchOptions(e,{with:this.productsIncludes()}):Promise.resolve({data:[]})}injectOptionsAndImages(e,t){return t.length?e.map((e=>(this.includes.filter((e=>"metadata"!==e)).forEach((a=>{const r=t.find((t=>parseInt(t.id)===parseInt(e.id)));e[a]=r?r[a]:null})),e))):null}productsIncludes(){return this.includes?.filter((e=>"metadata"!=e))}parseJson(e){if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(e){salla.logger.error("Failed to parse includes as JSON:",e)}return null}getProductSchemaMarkupScript(e){const t=document.createElement("script");return t.type="application/ld+json",t.text=JSON.stringify({"@context":"http://schema.org","@type":"Product",name:e?.name,image:e?.image?.url||e?.thumbnail,description:e?.description,brand:{"@type":"Brand",logo:e?.brand?.logo},offers:{"@type":"Offer",price:e?.price}}),t}createProductSchema(e,t){let a={productID:`${e.id}`,"@type":"Product",name:e.name,url:e.url,image:e.image.url||e.image,description:e.description||e.subtitle||e.name,...e.sku&&e.sku.length>0&&{sku:e.sku},offers:{"@type":"Offer",url:e.url,priceCurrency:e.currency,price:e.price,itemCondition:"NewCondition",availability:e.is_available?"InStock":"OutOfStock",priceValidUntil:e.discount_ends||new Date((new Date).setDate((new Date).getDate()+7)).toISOString().split("T")[0],priceSpecification:{"@type":"PriceSpecification",price:e.regular_price,priceCurrency:e.currency,valueAddedTaxIncluded:e.is_taxable},seller:{"@type":"Organization",name:salla.config.get("store.name")},shippingDetails:{"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:"0",currency:e.currency||"SAR"},deliveryTime:{"@type":"ShippingDeliveryTime",businessDays:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]},cutoffTime:"14:00"}},hasMerchantReturnPolicy:{"@type":"MerchantReturnPolicy",returnPolicyCategory:"https://schema.org/MerchantReturnFiniteReturnWindow",merchantReturnDays:30,returnMethod:"https://schema.org/ReturnByMail",returnFees:"https://schema.org/FreeReturn"}}};return e.rating?.stars&&(a.aggregateRating={"@type":"AggregateRating",ratingValue:e.rating.stars,reviewCount:e.rating.count}),{"@type":"ListItem",position:t,item:a}}generateProductSchema(e){const t="salla-product-schema-script";if(document.getElementById(t))return void salla.logger.warn(`already added schema-script with id (${t})!`);const a=document.createElement("script");a.type="application/ld+json",a.id=t;const r={"@context":"https://schema.org","@type":"ItemList",name:salla.config.get("page.title"),itemListElement:e.map(((e,t)=>this.createProductSchema(e,t+1)))};a.textContent=JSON.stringify(r),document.head.appendChild(a)}formatDateFromString(e,t,a="en"){const r={en:"Invalid Date",ar:"تاريخ غير صالح"};if(!e||"string"!=typeof e||""===e.trim())return r[a];let n;if(/^\d+$/.test(e)){const t=parseInt(e);n=new Date(t>1e12?t:1e3*t)}else n=new Date(e);return isNaN(n.getTime())?r[a]:`${{en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]}[a][n.getDay()]} ${t(n.getDate(),"en"===a)} ${{en:["January","February","March","April","May","June","July","August","September","October","November","December"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]}[a][n.getMonth()]} ${t(n.getFullYear(),"en"===a)}`}copyToClipboard(e){var t=e.target.innerText;navigator.clipboard.writeText(t).then((()=>{console.log("Text copied to clipboard: "+t)})).catch((e=>{console.error("Unable to copy text to clipboard",e)}))}animateItems(t){t&&e({targets:t,opacity:[0,1],duration:1200,translateY:[20,0],delay:function(e,t){return 100*t},easing:"easeOutExpo",complete:function(){t.forEach((e=>{e.classList.add("animated")}))}})}createReviewObject(e){return{"@type":"Review",author:{"@type":"Person",name:e.name},reviewBody:e.content,reviewRating:{"@type":"Rating",bestRating:"5",ratingValue:e.stars,worstRating:"1"}}}generateReviewSchema(e){const t=document.createElement("script");t.type="application/ld+json";const a={"@context":"http://schema.org/","@type":"Store",name:salla.config.get("store.name"),url:salla.config.get("store.url"),address:"الرياض",review:e.map((e=>this.createReviewObject(e))),aggregateRating:{"@type":"AggregateRating",ratingValue:e.reduce(((e,t)=>e+t.stars),0)/e.length,reviewCount:e.length}};t.textContent=JSON.stringify(a),document.head.appendChild(t)}};export{t as H}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,c as t,h as a,H as i}from"./p-BcEZj_a_.js";const s=class{constructor(a){e(this,a),this.prizeItemSelected=t(this,"prizeItemSelected")}onPrizeItemClick(){this.prizeItemSelected.emit(this.item)}render(){return a(i,{key:"1a3463c51bf3e3e250f62b65d3a81815ec465923"},a("div",{key:"03bf4d3e35b10d17a325ca4ef280cb384f3a76f4",onClick:this.onPrizeItemClick.bind(this)},a("img",{key:"a4d319b2daec5cdfec1c85910edea10bc1d1ab6c",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),a("div",{key:"52059fafc318c1f5a6b0289669083476650f8761",class:"s-loyalty-prize-item-title"},this.item.name),a("div",{key:"a3e14e2d1bd86dc3e7dbd2e6c5115e119af965e5",class:"s-loyalty-prize-item-subtitle"},this.item.description),a("div",{key:"55df95c028748c0387dc75dc4ad35c7285c907af",class:"s-loyalty-prize-item-points"},this.item.cost_points," Points")))}};s.style="salla-loyalty-prize-item:hover{box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";export{s as salla_loyalty_prize_item}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{d as e}from"./p-BcEZj_a_.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var E=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,E.get?E:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}var n,E,i={exports:{}},r=n?i.exports:(n=1,i.exports=(E=function(e){var t=e.addFilter,n=e.utils,E=n.Type,i=n.isString,r=n.replaceInString,T=n.guesstimateMimeType,_=n.getExtensionFromFilename,u=n.getFilenameFromURL,o=function(e,t){return e.some((function(e){return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n}))},a=function(e,t,n){if(0===t.length)return!0;var E=function(e){var t="";if(i(e)){var n=u(e),E=_(n);E&&(t=T(E))}else t=e.type;return t}(e);return n?new Promise((function(i,r){n(e,E).then((function(e){o(t,e)?i():r()})).catch(r)})):o(t,E)};return t("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{accept:"acceptedFileTypes"})})),t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;return!n("GET_ALLOW_FILE_TYPE_VALIDATION")||a(e,n("GET_ACCEPTED_FILE_TYPES"))})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,E){if(n("GET_ALLOW_FILE_TYPE_VALIDATION")){var i=n("GET_ACCEPTED_FILE_TYPES"),T=n("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),_=a(e,i,T),u=function(){var e,t=i.map((e=n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"),function(t){return null!==e[t]&&(e[t]||t)})).filter((function(e){return!1!==e})),T=t.filter((function(e,n){return t.indexOf(e)===n}));E({status:{main:n("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:r(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:T.join(", "),allButLastType:T.slice(0,-1).join(", "),lastType:T[t.length-1]})}})};if("boolean"==typeof _)return _?t(e):u();_.then((function(){t(e)})).catch(u)}else t(e)}))})),{options:{allowFileTypeValidation:[!0,E.BOOLEAN],acceptedFileTypes:[[],E.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",E.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",E.STRING],fileValidateTypeLabelExpectedTypesMap:[{},E.OBJECT],fileValidateTypeDetectType:[null,E.FUNCTION]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:E})),E)),T=t({__proto__:null,default:e(r)},[r]);
|
|
5
|
-
/*!
|
|
6
|
-
* FilePondPluginFileValidateType 1.2.8
|
|
7
|
-
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
8
|
-
* Please visit https://pqina.nl/filepond/ for details.
|
|
9
|
-
*/export{T as f}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{d as A}from"./p-BcEZj_a_.js";function n(A,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in A)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(A,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(A)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var A=65496,n=65505,e=1165519206,r=18761,i=274,t=65280,o=function(A,n){return A.getUint16(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},a=function(A,n){return A.getUint32(n,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},u="undefined"!=typeof window&&void 0!==window.document,f=void 0,d=u?new Image:{};d.onload=function(){return f=d.naturalWidth>d.naturalHeight},d.src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=";var c=function(u){var d=u.utils,c=d.Type,v=d.isFile;return(0,u.addFilter)("DID_LOAD_ITEM",(function(u,d){var c=d.query;return new Promise((function(d){var w=u.file;if(!(v(w)&&function(A){return/^image\/jpeg/.test(A.type)}(w)&&c("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&f))return d(u);(function(u){return new Promise((function(f){var d=new FileReader;d.onload=function(u){var d=new DataView(u.target.result);if(o(d,0)===A){for(var c=d.byteLength,v=2;v<c;){var w=o(d,v);if(v+=2,w===n){if(a(d,v+=2)!==e)break;var g=o(d,v+=6)===r;v+=a(d,v+4,g);var l=o(d,v,g);v+=2;for(var p=0;p<l;p++)if(o(d,v+12*p,g)===i)return void f(o(d,v+12*p+8,g))}else{if((w&t)!==t)break;v+=o(d,v)}}f(-1)}else f(-1)},d.readAsArrayBuffer(u.slice(0,65536))}))})(w).then((function(A){u.setMetadata("exif",{orientation:A}),d(u)}))}))})),{options:{allowImageExifOrientation:[!0,c.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:c})),c}()),r.exports),t=n({__proto__:null,default:A(i)},[i]);
|
|
5
|
-
/*!
|
|
6
|
-
* FilePondPluginImageExifOrientation 1.0.11
|
|
7
|
-
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
8
|
-
* Please visit https://pqina.nl/filepond/ for details.
|
|
9
|
-
*/export{t as f}
|