@salla.sa/twilight-components 1.0.5 → 1.0.7

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.
Files changed (91) hide show
  1. package/dist/cjs/Helper-8c75b6ac.js +20 -0
  2. package/dist/cjs/index-23da2c6b.js +1601 -0
  3. package/dist/cjs/index.cjs.js +12 -0
  4. package/dist/cjs/loader.cjs.js +21 -0
  5. package/dist/cjs/multi-warehouse_3.cjs.entry.js +155 -0
  6. package/dist/cjs/order-rating.cjs.entry.js +227 -0
  7. package/dist/cjs/salla-button.cjs.entry.js +56 -0
  8. package/dist/cjs/salla-localization.cjs.entry.js +49 -0
  9. package/dist/cjs/salla-login-476fb312.js +14 -0
  10. package/dist/{twilight-components/search-modal-c1babeb6.js → cjs/salla-search-b9403062.js} +13 -11
  11. package/dist/cjs/salla-search.cjs.entry.js +10 -0
  12. package/dist/cjs/twilight-components.cjs.js +19 -0
  13. package/dist/collection/Helpers/Helper.js +16 -0
  14. package/dist/collection/collection-manifest.json +18 -0
  15. package/dist/collection/components/generate-summary.js +35 -0
  16. package/dist/collection/components/multi-warehouse/multi-warehouse.js +239 -0
  17. package/dist/collection/components/order-rating/order-rating.css +3 -0
  18. package/dist/collection/components/order-rating/order-rating.js +288 -0
  19. package/dist/collection/components/salla-button/salla-button.css +3 -0
  20. package/dist/collection/components/salla-button/salla-button.js +167 -0
  21. package/dist/collection/components/salla-localization/salla-localization.js +106 -0
  22. package/dist/collection/components/salla-login/salla-login.js +31 -0
  23. package/dist/collection/components/salla-modal/salla-modal.js +281 -0
  24. package/dist/collection/components/salla-search/salla-search.js +154 -0
  25. package/dist/collection/index.js +2 -0
  26. package/dist/{types/components/salla-modal/test/salla-modal.e2e.d.ts → collection/interfaces/colors.js} +0 -0
  27. package/dist/collection/interfaces/index.js +2 -0
  28. package/dist/{types/components/salla-modal/test/salla-modal.spec.d.ts → collection/interfaces/ratio.js} +0 -0
  29. package/dist/collection/plugins/tailwind-theme/generator.js +53 -0
  30. package/dist/collection/plugins/tailwind-theme/index.js +26 -0
  31. package/dist/esm/Helper-23b2de40.js +18 -0
  32. package/dist/esm/index-643344dc.js +1573 -0
  33. package/dist/esm/index.js +3 -0
  34. package/dist/esm/loader.js +17 -0
  35. package/dist/esm/multi-warehouse_3.entry.js +149 -0
  36. package/dist/esm/order-rating.entry.js +223 -0
  37. package/dist/esm/polyfills/core-js.js +11 -0
  38. package/dist/esm/polyfills/css-shim.js +1 -0
  39. package/dist/esm/polyfills/dom.js +79 -0
  40. package/dist/esm/polyfills/es5-html-element.js +1 -0
  41. package/dist/esm/polyfills/index.js +34 -0
  42. package/dist/esm/polyfills/system.js +6 -0
  43. package/dist/esm/salla-button.entry.js +52 -0
  44. package/dist/esm/salla-localization.entry.js +45 -0
  45. package/dist/{twilight-components/salla-login-0e725af9.js → esm/salla-login-0e85b2d8.js} +1 -1
  46. package/dist/{twilight-components/search-modal-ee69bd04.js → esm/salla-search-5d4a6f1a.js} +9 -9
  47. package/dist/esm/salla-search.entry.js +2 -0
  48. package/dist/esm/twilight-components.js +17 -0
  49. package/dist/index.cjs.js +1 -0
  50. package/dist/index.js +1 -0
  51. package/dist/twilight-components/index.esm.js +1 -3
  52. package/dist/twilight-components/p-36c87e2e.js +1 -0
  53. package/dist/twilight-components/p-4b137380.js +1 -0
  54. package/dist/twilight-components/p-4cc11ee2.entry.js +1 -0
  55. package/dist/twilight-components/p-520446eb.js +1 -0
  56. package/dist/twilight-components/p-60f0446f.entry.js +1 -0
  57. package/dist/twilight-components/p-b490f9e0.entry.js +1 -0
  58. package/dist/twilight-components/p-b72e6cfa.entry.js +1 -0
  59. package/dist/twilight-components/p-baeca520.entry.js +1 -0
  60. package/dist/twilight-components/p-d1ef2268.js +1 -0
  61. package/dist/twilight-components/twilight-components.esm.js +1 -125
  62. package/dist/types/Helpers/Helper.d.ts +8 -0
  63. package/dist/types/components/multi-warehouse/multi-warehouse.d.ts +23 -0
  64. package/dist/types/components/order-rating/order-rating.d.ts +16 -0
  65. package/dist/types/components/salla-button/salla-button.d.ts +15 -0
  66. package/dist/types/components/salla-localization/salla-localization.d.ts +10 -0
  67. package/dist/types/components/salla-modal/salla-modal.d.ts +12 -1
  68. package/dist/types/components/{search-modal/search-modal.d.ts → salla-search/salla-search.d.ts} +1 -1
  69. package/dist/types/components.d.ts +95 -11
  70. package/dist/types/index.d.ts +1 -1
  71. package/package.json +10 -6
  72. package/dist/twilight-components/app-globals-0f993ce5.js +0 -3
  73. package/dist/twilight-components/css-shim-a64b8820.js +0 -4
  74. package/dist/twilight-components/dom-d08ba8aa.js +0 -73
  75. package/dist/twilight-components/index-0aa9ca9b.js +0 -3010
  76. package/dist/twilight-components/index-d2312a61.js +0 -3010
  77. package/dist/twilight-components/index-d6ed984a.js +0 -3010
  78. package/dist/twilight-components/salla-login-2a48c6c7.js +0 -29
  79. package/dist/twilight-components/salla-login-2bfbce21.js +0 -16
  80. package/dist/twilight-components/salla-login-45a3f61c.js +0 -16
  81. package/dist/twilight-components/salla-login-5fe80dd7.js +0 -29
  82. package/dist/twilight-components/salla-login-69a00ca2.js +0 -12
  83. package/dist/twilight-components/salla-login-7bf31d85.js +0 -29
  84. package/dist/twilight-components/salla-login-cb872dc2.js +0 -16
  85. package/dist/twilight-components/salla-login.entry.js +0 -2
  86. package/dist/twilight-components/salla-modal.entry.js +0 -24
  87. package/dist/twilight-components/salla-search-modal.entry.js +0 -2
  88. package/dist/twilight-components/search-modal-5dc35a08.js +0 -94
  89. package/dist/twilight-components/shadow-css-bc14d9fd.js +0 -389
  90. package/dist/types/utils/utils.d.ts +0 -6
  91. package/dist/types/utils/utils.spec.d.ts +0 -1
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, h, e as Host, g as getElement } from './index-d2312a61.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-643344dc.js';
2
2
 
3
- const SearchModal = class {
3
+ const SallaSearch = class {
4
4
  constructor(hostRef) {
5
5
  registerInstance(this, hostRef);
6
6
  this.fetchStatus = '';
@@ -72,18 +72,18 @@ const SearchModal = class {
72
72
  .replace("{price}", (_a = item.price) === null || _a === void 0 ? void 0 : _a.after)
73
73
  .replace("{url}", item.url)
74
74
  .replace("{thumb}", item.thumb);
75
- return (h("div", { class: "s-search-modal-product", innerHTML: product }));
75
+ return (h("div", { class: "s-search-product", innerHTML: product }));
76
76
  }
77
77
  else {
78
- return (h("div", { class: "s-search-modal-product" }, h("a", { target: "_blank", href: item.url, class: "s-search-modal-product-image-container" }, h("img", { class: "s-search-modal-product-image", src: item.thumb })), h("div", { class: "s-search-modal-product-details" }, h("div", { class: "s-search-modal-product-title" }, item.title), h("div", { class: "s-search-modal-product-price" }, (_b = item.price) === null || _b === void 0 ? void 0 : _b.after))));
78
+ return (h("div", { class: "s-search-product" }, h("a", { target: "_blank", href: item.url, class: "s-search-product-image-container" }, h("img", { class: "s-search-product-image", src: item.thumb })), h("div", { class: "s-search-product-details" }, h("div", { class: "s-search-product-title" }, item.title), h("div", { class: "s-search-product-price" }, (_b = item.price) === null || _b === void 0 ? void 0 : _b.after))));
79
79
  }
80
80
  }
81
81
  render() {
82
- return (h(Host, { class: "s-search-modal" }, h("button", { type: "button", onClick: this.openSearch, class: "s-search-modal-search-button-icon" }, this.hasSearchIconSlot ? (h("slot", { name: "search-icon" })) : (h("i", { class: "sicon-search font-bold" }))), this.showModal && (h("div", { class: "s-search-modal-container", style: { backgroundColor: 'rgba(0,0,0,0.5)' } }, h("div", { class: "s-search-modal-wrapper", onClick: this.closeSearch }, h("div", { class: "s-search-modal-inner", onClick: e => {
82
+ return (h(Host, { class: "s-search" }, h("button", { type: "button", onClick: this.openSearch, class: "s-search-search-button-icon" }, this.hasSearchIconSlot ? (h("slot", { name: "search-icon" })) : (h("i", { class: "sicon-search font-bold" }))), this.showModal && (h("div", { class: "s-search-container", style: { backgroundColor: 'rgba(0,0,0,0.5)' } }, h("div", { class: "s-search-wrapper", onClick: this.closeSearch }, h("div", { class: "s-search-inner", onClick: e => {
83
83
  e.stopPropagation();
84
- } }, h("div", { class: "s-search-modal-search-box-container" }, h("div", { class: !this.showResult
85
- ? 's-search-modal-search-box-inner'
86
- : 's-search-modal-search-box-inner-open' }, h("input", { class: "s-search-modal-input", type: "text", placeholder: this.searchPlaceholder, value: this.searchTerm, onInput: event => this.handleChange(event) }), this.fetchStatus != 'loading' ? (h("button", { class: "s-search-modal-search-icon" }, h("i", { class: "sicon-search" }))) : (h("span", { class: "s-search-modal-spinner" }, h("span", { class: "s-search-modal-spinner-loader" }))))), h("div", { class: "s-search-modal-search-results" }, this.fetchStatus === 'error' && (h("p", { class: "s-search-modal-no-results error p-4 text-sm text-gray-text" }, this.noResultsText)), this.results &&
84
+ } }, h("div", { class: "s-search-search-box-container" }, h("div", { class: !this.showResult
85
+ ? 's-search-search-box-inner'
86
+ : 's-search-search-box-inner-open' }, h("input", { class: "s-search-input", type: "text", placeholder: this.searchPlaceholder, value: this.searchTerm, onInput: event => this.handleChange(event) }), this.fetchStatus != 'loading' ? (h("button", { class: "s-search-search-icon" }, h("i", { class: "sicon-search" }))) : (h("span", { class: "s-search-spinner" }, h("span", { class: "s-search-spinner-loader" }))))), h("div", { class: "s-search-search-results" }, this.fetchStatus === 'error' && (h("p", { class: "s-search-no-results error p-4 text-sm text-gray-text" }, this.noResultsText)), this.results &&
87
87
  this.results.map(item => {
88
88
  return this.getProduct(item);
89
89
  }))))))));
@@ -91,4 +91,4 @@ const SearchModal = class {
91
91
  get hostElement() { return getElement(this); }
92
92
  };
93
93
 
94
- export { SearchModal as S };
94
+ export { SallaSearch as S };
@@ -0,0 +1,2 @@
1
+ export { S as salla_search } from './salla-search-5d4a6f1a.js';
2
+ import './index-643344dc.js';
@@ -0,0 +1,17 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-643344dc.js';
2
+
3
+ /*
4
+ Stencil Client Patch Browser v2.8.1 | MIT Licensed | https://stenciljs.com
5
+ */
6
+ const patchBrowser = () => {
7
+ const importMeta = import.meta.url;
8
+ const opts = {};
9
+ if (importMeta !== '') {
10
+ opts.resourcesUrl = new URL('.', importMeta).href;
11
+ }
12
+ return promiseResolve(opts);
13
+ };
14
+
15
+ patchBrowser().then(options => {
16
+ return bootstrapLazy([["salla-localization",[[4,"salla-localization",{"show":[64],"hide":[64]}]]],["order-rating",[[0,"order-rating",{"order":[8]}]]],["salla-search",[[4,"salla-search",{"searchPlaceholder":[1,"search-placeholder"],"noResultsText":[1,"no-results-text"],"searchTerm":[32],"results":[32],"fetchStatus":[32],"showResult":[32],"showModal":[32]}]]],["salla-button",[[4,"salla-button",{"kind":[513],"loading":[516],"load":[64],"stop":[64],"disable":[64],"enable":[64]}]]],["multi-warehouse_3",[[4,"multi-warehouse",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}],[0,"salla-login"],[4,"salla-modal",{"error":[4],"success":[4],"isClosable":[1028,"is-closable"],"modalWidth":[1,"modal-width"],"visible":[516],"subTitle":[1,"sub-title"],"icon":[1],"show":[64],"hide":[64]}]]]], options);
17
+ });
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -1,3 +1 @@
1
- export { S as SallaLogin } from './salla-login-0e725af9.js';
2
- export { S as SearchModal } from './search-modal-5dc35a08.js';
3
- import './index-d6ed984a.js';
1
+ export{S as SallaLogin}from"./p-36c87e2e.js";export{S as SallaSearch}from"./p-4b137380.js";import"./p-d1ef2268.js";
@@ -0,0 +1 @@
1
+ import{r as e,h as s}from"./p-d1ef2268.js";const t=class{constructor(s){e(this,s)}render(){return s("salla-modal",{id:"salla-login",title:"سجل دخول إلى الموقع"},s("div",{id:"showLoginMethods"},s("p",{class:"text-sm text-gray-text mb-5"},"اختر الوسيلة المناسبة"),s("div",{id:"openEmailLogin",class:"mb-2.5 box-content relative rounded-md border border-border-color bg-white py-5 pe-4 ps-5 flex items-center space-s-3 hover:border-gray-200"},s("div",{class:"flex-shrink-0"},s("div",{class:"bg-primary w-12 h-12 text-lg text-white rounded-icon"},s("i",{class:"sicon-mail"}))),s("div",{class:"flex-1 min-w-0"},s("a",{href:"#",class:"focus:outline-none flex justify-between items-center"},s("div",{class:"flex-1"},s("span",{class:"absolute inset-0","aria-hidden":"true"}),s("p",{class:"text-sm text-gray-text"},"سجل دخول"),s("h6",{class:"font-boldf"},"البريد الإلكتروني")),s("i",{class:"sicon-keyboard_arrow_left text-primary text-xl"})))),s("div",{class:"box-content relative rounded-md border border-border-color bg-white py-5 pe-4 ps-5 flex items-center space-s-3 hover:border-gray-200"},s("div",{class:"flex-shrink-0"},s("div",{class:"bg-primary w-12 h-12 text-lg text-white rounded-icon"},s("i",{class:"sicon-phone"}))),s("div",{class:"flex-1 min-w-0"},s("a",{href:"#",class:"focus:outline-none flex justify-between items-center"},s("div",{class:"flex-1"},s("span",{class:"absolute inset-0","aria-hidden":"true"}),s("p",{class:"text-sm text-gray-text"},"سجل دخول"),s("h6",{class:"font-boldf"},"الهاتف")),s("i",{class:"sicon-keyboard_arrow_left text-primary text-xl"}))))))}};export{t as S}
@@ -0,0 +1 @@
1
+ import{r as s,h as t,H as i,g as e}from"./p-d1ef2268.js";const r=class{constructor(t){s(this,t),this.fetchStatus="",this.showModal=!1,this.searchPlaceholder="Search here ...",this.noResultsText="There are no results at the moment",this.handleChange=s=>{this.searchTerm=s.target.value,this.fetchStatus="loading",this.showResult=!1,this.results=[],this.searchTerm.length>2&&window.salla.search.api.search(this.searchTerm).then((s=>s)).then((s=>{console.log("response",s),this.fetchStatus="idle",this.results=s.results,this.showResult=!0,this.results.length<1&&(this.fetchStatus="error")})).catch((s=>{this.showResult=!0,this.fetchStatus="error",console.log(s)}))},this.openSearch=()=>{this.searchTerm="",this.fetchStatus="",this.results=[],this.showModal=!0,window.scrollTo(0,0),document.getElementsByTagName("html")[0].style.position="fixed",document.getElementsByTagName("html")[0].style.overflowY="scroll"},this.closeSearch=()=>{this.searchTerm="",this.fetchStatus="",this.results=[],document.getElementsByTagName("html")[0].style.position="static",document.getElementsByTagName("html")[0].style.overflowY="auto",this.showModal=!1}}componentWillLoad(){this.hasSearchIconSlot=!!this.hostElement.querySelector('[slot="search-icon"]'),this.hasProductTemplateSlot=!!this.hostElement.querySelector('[slot="product-template"]'),this.hasProductTemplateSlot&&(this.productTemplateHtml=this.hostElement.querySelector('[slot="product-template"]').innerHTML)}getProduct(s){var i,e;if(this.hasProductTemplateSlot){let e=this.productTemplateHtml.replace("{title}",s.title).replace("{price}",null===(i=s.price)||void 0===i?void 0:i.after).replace("{url}",s.url).replace("{thumb}",s.thumb);return t("div",{class:"s-search-product",innerHTML:e})}return t("div",{class:"s-search-product"},t("a",{target:"_blank",href:s.url,class:"s-search-product-image-container"},t("img",{class:"s-search-product-image",src:s.thumb})),t("div",{class:"s-search-product-details"},t("div",{class:"s-search-product-title"},s.title),t("div",{class:"s-search-product-price"},null===(e=s.price)||void 0===e?void 0:e.after)))}render(){return t(i,{class:"s-search"},t("button",{type:"button",onClick:this.openSearch,class:"s-search-search-button-icon"},this.hasSearchIconSlot?t("slot",{name:"search-icon"}):t("i",{class:"sicon-search font-bold"})),this.showModal&&t("div",{class:"s-search-container",style:{backgroundColor:"rgba(0,0,0,0.5)"}},t("div",{class:"s-search-wrapper",onClick:this.closeSearch},t("div",{class:"s-search-inner",onClick:s=>{s.stopPropagation()}},t("div",{class:"s-search-search-box-container"},t("div",{class:this.showResult?"s-search-search-box-inner-open":"s-search-search-box-inner"},t("input",{class:"s-search-input",type:"text",placeholder:this.searchPlaceholder,value:this.searchTerm,onInput:s=>this.handleChange(s)}),"loading"!=this.fetchStatus?t("button",{class:"s-search-search-icon"},t("i",{class:"sicon-search"})):t("span",{class:"s-search-spinner"},t("span",{class:"s-search-spinner-loader"})))),t("div",{class:"s-search-search-results"},"error"===this.fetchStatus&&t("p",{class:"s-search-no-results error p-4 text-sm text-gray-text"},this.noResultsText),this.results&&this.results.map((s=>this.getProduct(s))))))))}get hostElement(){return e(this)}};export{r as S}
@@ -0,0 +1 @@
1
+ import{r as l,h as a,g as s}from"./p-d1ef2268.js";import{H as i}from"./p-520446eb.js";const e=class{constructor(a){l(this,a),i.setHost(this.host),salla.event.on("localization::show",(()=>this.show()))}async show(){return this.modal.show()}async hide(){return this.modal.hide()}submit(){let l;this.btn.load().then((()=>{let a=i.val("[name=currency]:checked");if(a!==salla.config.currency.code)return l=window.location.href,salla.currency.api.change(a)})).then((()=>{let a=i.val("[name=lang]:checked");a!==salla.config.language.code&&(l=salla.config.languages.filter((l=>l.code===a))[0].url)})).then((()=>this.btn.stop())).then((()=>this.hide())).then((()=>l&&(window.location.href=l)))}render(){return a("salla-modal",{id:"salla-localization",class:"hidden",ref:l=>this.modal=l},a("slot",{name:"header"},a("div",{slot:"header"})),a("div",{class:"s-localization-inner"},salla.config.languages?a("div",{class:"s-localization-section"},a("label",{class:"s-localization-title"},salla.lang.get("common.titles.language")),a("fieldset",{class:"s-localization-fieldset"},a("legend",{class:"sr-only"},salla.lang.get("blocks.header.change_language")),a("div",{class:"s-localization-section-inner"},salla.config.languages.map((l=>a("div",{class:"flex items-center"},a("input",{id:"lang-"+l.code.toLowerCase(),class:"s-localization-input",name:"lang",checked:salla.config.language.code==l.code,type:"radio",value:l.code}),a("label",{htmlFor:"lang-"+l.code.toLowerCase(),class:"s-localization-label"},a("span",null,l.name),a("div",{class:"s-localization-flag flag iti__flag iti__"+l.country_code})))))))):"",salla.config.currencies?a("div",{class:"s-localization-section"},a("label",{class:"s-localization-title"},salla.lang.get("common.titles.currency")),a("fieldset",{class:"s-localization-fieldset"},a("legend",{class:"sr-only"},salla.lang.get("blocks.header.change_currency")),a("div",{class:"s-localization-section-inner"},salla.config.currencies.map((l=>a("div",{class:"s-localization-item"},a("input",{class:"s-localization-input",checked:salla.config.currency.code==l.code,id:"currency-"+l.code,name:"currency",type:"radio",value:l.code}),a("label",{class:"s-localization-label",htmlFor:"currency-"+l.code},a("span",null,l.name),a("small",{class:"s-localization-currency"},l.code)))))))):""),a("p",{slot:"footer"},a("slot",{name:"footer"},a("salla-button",{ref:l=>this.btn=l,onClick:()=>this.submit(),class:"w-full"},salla.lang.get("common.elements.ok")))))}get host(){return s(this)}};export{e as salla_localization}
@@ -0,0 +1 @@
1
+ class t extends salla.AppHelpers{setHost(t){this.host=t}getElement(t){return this.host.querySelector(t)}getAttribute(t,e){var s;return null===(s=this.getElement(t))||void 0===s?void 0:s.getAttribute(e)}val(t){return this.getAttribute(t,"value")}}const e=new t;export{e as H}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as s}from"./p-d1ef2268.js";import{H as a}from"./p-520446eb.js";const i=class{constructor(e){t(this,e),this.stars=[1,2,3,4,5],this.order={shipping:{id:5622},order_id:"179794",products:[{title:"ميكروفون عالى الجودة",image:"https://salla-dev.s3.eu-central-1.amazonaws.com/Mvyk/pMdEEyMVpZFj4L1Hrdm2g48AuiSx0TrKULBiOnPo.jpg",price:"‏10,978.00 ر.س",qty:"‏2",totalBefore:"‏1120 ر.س",discount:"-5%",total:"‏1064 ر.س",id:"2314513454",getOptimusRouteKey:"7351233357"},{title:"وحدة تحكم لمشغل العاب",image:"https://salla-dev.s3.eu-central-1.amazonaws.com/Mvyk/NOa4kHvOkd1hBWHk3JIgAo1602oVACfuWGFz3vXv.jpg",price:"‏10,978.00 ر.س",qty:"‏2",totalBefore:"‏1120 ر.س",discount:"-5%",total:"‏1064 ر.س",id:"9842833",getOptimusRouteKey:"735152357"},{title:"ساعة ذكية بنظام اندرويد",image:"https://salla-dev.s3.eu-central-1.amazonaws.com/Mvyk/T4kTqYNuPAZmPMLw1bx92RnjVMZyFszVXOUZQsFJ.jpg",price:"‏10,978.00 ر.س",qty:"‏2",totalBefore:"‏1120 ر.س",discount:"-5%",total:"‏1064 ر.س",id:"679822376",getOptimusRouteKey:"73233357"}],ratingMessage:{1:"غير راضي <span class='emoji mx-1'>😒</span>",2:"لم يعجبني <span class='emoji mx-1'>😌</span>",3:"معقول <span class='emoji mx-1'>🙄</span>",4:"أعجبني <span class='emoji mx-1'>👍</span>",5:"أعجبني جداً <span class='emoji mx-1'>🤩</span>"},settings:{isProductsRating:!0,isStoreRating:!0,isShippingRating:!0}}}render(){return e(s,null,this.order.settings.isProductsRating&&this.renderProductsRating(),this.order.settings.isStoreRating&&this.renderStoreRating(),this.order.settings.isShippingRating&&this.renderShippingRating())}renderProductsRating(){return e("section",{class:"rating-section products-section","data-type":"product"},e("div",{class:"bg-white mb-5 p-5 rounded-md overflow-hidden mb-10"},this.order.products.map(((t,s)=>{var a;return e("div",{class:"rating-outer-form","data-stars-error":`يرجى تقييم (${t.title}) بواسطة النجمات`},e("div",{class:"product-item mb-4"},e("div",{class:"mb-5"},e("div",{class:"flex space-s-5 mb-8"},e("img",{src:t.image,alt:t.title,class:"w-18 h-14 object-cover rounded-md"}),e("div",{class:"flex-1"},e("h3",{class:"section-title leading-5 mb-1.5 md:text-base"}," ",t.title),e("div",{class:"rw-product-entry__rate"},e("div",{class:"rating-wrap flex items-center space-s-4"},e("form",{class:"rate-element rate-element--has-label"},this.getStarsRating()),e("p",{class:"rate-label fix-align font-xsm my-0"})),e("input",{type:"hidden",name:"order_id",value:null===(a=this.order)||void 0===a?void 0:a.order_id}),e("input",{type:"hidden",name:`products[${s}][product_id]`,value:t.getOptimusRouteKey}),e("input",{type:"hidden",name:"type",value:"products"}),e("textarea",{"data-product-id":t.id,name:`products[${s}][comment]`,id:`productReview_${t.id}`,class:"comment form-input h-20 product-review",placeholder:`اضف رأيك عن المنتج (${t.title})`}),e("small",{class:"text-red-400 validation-message"})))))))}))))}renderStoreRating(){return e("section",{class:"rating-section bg-white my-10 p-5 rounded-md mb-5","data-type":"store"},e("div",{class:"rating-outer-form","data-stars-error":"يرجى تقييم المتجر بواسطة النجمات"},e("input",{type:"hidden",name:"order_id",value:this.order.order_id}),e("input",{type:"hidden",name:"type",value:"store"}),e("h2",{class:"section-title text-lg font-bold mb-5"},"كيف كانت تجربتك مع المتجر هذه المرة"),e("div",{class:"mb-2"},e("textarea",{id:"storeReview",name:"comment",class:"form-input comment h-20",placeholder:"اضف رأيك عن المتجر.."})),e("div",{class:"rating-wrap flex items-center space-s-4"},e("form",{class:"rate-element rate-element--has-label"},this.getStarsRating()),e("p",{class:"rate-label fix-align font-sm center mb-0"})),e("small",{class:"text-red-400 validation-message"})))}renderShippingRating(){return e("section",{class:"rating-section bg-white my-10 p-5 rounded-md mb-5","data-type":"shipping"},e("div",{class:"rating-outer-form","data-stars-error":"يرجى تقييم شركة الشحن بواسطة النجمات"},e("input",{type:"hidden",name:"order_id",value:this.order.order_id}),e("input",{type:"hidden",name:"shipping_company_id",value:this.order.shipping.id}),e("input",{type:"hidden",name:"type",value:"shipping"}),e("h2",{class:"section-title text-lg font-bold mb-5"},"خبرنا عن تجربتك مع شركة الشحن"),e("div",{class:"mb-2"},e("textarea",{id:"shippingReview",name:"comment",class:"form-input comment h-20 mb-2",placeholder:"اضف رأيك عن شركة الشحن"})),e("div",{class:"rating-wrap flex items-center space-s-4"},e("form",{class:"rate-element ratFeedbackPresentere-element--has-label"},this.getStarsRating()),e("p",{class:"rate-label fix-align font-sm center mb-0"})),e("small",{class:"text-red-400 validation-message"})))}getStarsRating(){return e("div",{class:"mb-1"},e("input",{type:"hidden",class:"rating_hidden_input",name:"rating",value:""}),this.stars.map((t=>e("button",{type:"submit",class:"btn btn--transparent px-1 text-lg text-gray-400 btn--star","data-star":t,"data-text":this.order.ratingMessage[`${t}`]},e("i",{class:"sicon-star2"})))))}initiateRating(){this.highlightSelectedStars(),this.starsRating(),a.app.toggle("#submitRating","btn","hidden",(()=>a.app.element("#shippingReview,#storeReview,.product-review"))),this.ratingChain=Promise.resolve(),a.app.onClick("#submitRating",(()=>this.sendRating().then((()=>window.location.reload()))))}sendRating(){return this.ratingValidation(),a.app.all(".rating-section",(t=>{let e=t.dataset.type,s=[];t.querySelectorAll(".rating-outer-form").forEach((t=>{let a={};t.querySelectorAll("[name]").forEach((function(t){let e=salla.helpers.inputData(t.name,t.value,a);a[e.name]=e.value})),s=[],s.push(a),this.sendFeedback(e,s)}))})),this.ratingChain}sendFeedback(t,e){e&&0!=e.length&&(salla.config.canLeave=!1,this.ratingChain=salla.feedback.api[t](e[0]).then((function(){salla.config.canLeave=!0})).catch((()=>salla.config.canLeave=!0)))}ratingValidation(){let t="";if(document.querySelectorAll(".rating-section").forEach((e=>{e.querySelectorAll(".rating-outer-form").forEach((e=>{let s=e.querySelector(".rating_hidden_input"),a=e.querySelector(".comment"),i=e.querySelector(".section-title"),r=e.querySelector(".validation-message");if(s.value&&a.value&&a.value.length>3)return a.classList.remove("has-error"),null==i||i.classList.remove("has-error","text-red-400"),void(r.innerHTML="");a.value&&a.value.length>3?a.classList.remove("has-error"):a.classList.add("has-error"),null==i||i.classList.add("has-error","text-red-400"),t=s.value?salla.lang.get("common.errors.not_less_than_chars",{chars:4})+" "+a.getAttribute("placeholder"):e.dataset.starsError||salla.lang.get("pages.rating.rate_store_stars"),r.innerHTML=t}))})),t){let e=document.querySelectorAll(".has-error");throw e.length&&window.scrollTo({top:e[0].offsetTop-80}),new Error(t)}}highlightSelectedStars(){let t=["hovered","text-theme-yellow"];a.app.all(".rate-element",(e=>{let s=e.querySelectorAll(".btn--star");e.addEventListener("mouseout",(()=>e.querySelectorAll(".btn--star").forEach((e=>e.classList.remove(...t))))),s.forEach(((e,a)=>{e.addEventListener("mouseover",(()=>{if(e.classList.add(...t),a<=1)"BUTTON"===e.previousElementSibling.tagName&&e.previousElementSibling.classList.add(...t);else for(let e=0;e<a;e++)s[e].classList.add(...t)})),e.addEventListener("mouseout",(()=>{e.classList.contains(...t)&&e.classList.remove(...t)}))}))}))}starsRating(){let t=["selected","text-theme-yellow"];salla.document.event.onSubmit(".rate-element",(function(e){e.preventDefault();var s=e.target.querySelectorAll(".btn--star.hovered"),a=s[s.length-1];if(a){var i=parseInt(a.dataset.star,10);e.target.nextElementSibling.innerHTML=a.dataset.text,e.target.querySelector(".rating_hidden_input").value=i,e.target.querySelectorAll(".btn--star").forEach((function(e,s){s<i?e.classList.add(...t):e.classList.remove(...t)}));var r=e.target.querySelector('.star[aria-pressed="true"]');r&&r.removeAttribute("aria-pressed"),a.setAttribute("aria-pressed",!0)}}))}};i.style=":host{display:block}";export{i as order_rating}
@@ -0,0 +1 @@
1
+ import{r as s,h as t,g as e,c as i,H as a}from"./p-d1ef2268.js";export{S as salla_login}from"./p-36c87e2e.js";import{H as l}from"./p-520446eb.js";let o=require("store/src/store-engine"),r=require("store/storages/sessionStorage"),n=o.createStore(r);const h=class{constructor(t){s(this,t),this.open=!1,this.isOpenedBefore=n.get("multi-warehouse-opened-before"),this.displayAs="default",this.browseProductsFrom="all",this.branches=[{id:1,name:"فرع الرياض",open:!0,available:!0,limited:!1,tag:"متوفر"},{id:2,name:"فرع جدة",open:!1,available:!1,limited:!1,tag:"غير متوفر"},{id:3,name:"فرع مكة",open:!0,available:!0,limited:!1,tag:"متوفر"},{id:4,name:"فرع المدينة",open:!0,available:!0,limited:!1,tag:"متوفر"},{id:5,name:"فرع جازان",open:!0,available:!0,limited:!0,tag:"الكمية محدودة"}],this.current=1,this.currentBranch=s=>this.branches.filter((s=>s.id==this.current))[0][s],this.statusColor=(s=null)=>s?s.limited?"text-red-400":s.available?"text-green-500":"text-gray-400":this.currentBranch("limited")?"text-red-400":this.currentBranch("available")?"text-green-500":"text-gray-400",this.isChoiceable=()=>"all"!==this.browseProductsFrom&&"single"==this.position||"header"==this.position,this.formTitle=()=>this.isChoiceable()?"توفر المنتج في الفروع الآخرى":"التسوق من فرع آخر",salla.event.on("branches::show",(()=>this.show()))}async show(){return this.modal.show()}async hide(){return this.modal.hide()}handelChange(s){this.selected=s.target.value}handleSubmit(){n.set("multi-warehouse-opened-before",!0),this.show(),setTimeout((()=>{this.current=this.selected}),300)}render(){return t("salla-modal",{"is-closable":this.isOpenedBefore||"popup"!=this.displayAs?"true":"false",ref:s=>this.modal=s,"modal-width":"w-116",id:"multi-warehouse-modal",class:"hidden"},t("slot",{name:"header"},t("div",{slot:"header"})),t("div",null,t("div",{class:"text-right"},t("div",{class:"flex items-center mb-8"},t("div",{class:"flex-shrink-0 sm:mb-0 me-4"},t("div",{class:"h-16 w-16 border border-gray-200 bg-white text-primary rounded-full flex justify-center items-center"},t("span",{class:"sicon-store-alt"}))),t("div",null,t("p",{class:"mt-1 text-xs text-gray-400"},"أنت الآن تتصفح المتجر من"),t("h4",{class:"text-base"},"فرع الرياض"))),t("fieldset",{class:"mt-4"},t("h4",{class:"text-sm text-gray-600 mb-6"},this.formTitle()),t("legend",{class:"sr-only"},this.formTitle()),this.branches.length<=5?t("div",{class:"space-y-5"},this.branches.map((s=>t("div",{class:"flex items-center"},t("input",{id:this.position+"_branch_"+s.id,disabled:!s.open&&this.isChoiceable(),name:"lang",type:"radio",value:s.id,onChange:s=>this.handelChange(s),class:{"me-3 focus:ring-primary h-4 w-4 text-primary border-gray-300":!0,"opacity-50":!s.open,hidden:!this.isChoiceable()},checked:this.current==s.id}),t("label",{htmlFor:this.position+"_branch_"+s.id,class:{"flex items-center justify-between text-sm font-medium text-gray-700 flex-grow":!0,"cursor-pointer":this.isChoiceable()}},t("span",{class:{"opacity-50":!s.open}},s.name),this.isChoiceable()?t("small",{class:"text-red-400"},s.open?"":"مُغلق"):t("span",{class:this.statusColor(s)},s.tag)))))):t("select",{class:"w-full h-10 transition-colors duration-300 focus:ring-transparent focus:border-primary sm:text-sm border-gray-200 rounded-md appearance-none visibility_condition px-4",onInput:s=>this.handelChange(s)},this.branches.map((s=>t("option",{value:s.id,disabled:!s.open,selected:this.selected==s.id},s.name," ",s.open?"":"- مُغلق"))))))),this.isChoiceable()?t("p",{slot:"footer"},t("slot",{name:"footer"},t("button",{type:"button",class:"mt-8 w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary text-base font-medium text-white transition-colors hover:bg-primary-d focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary sm:col-start-2 sm:text-sm",onClick:()=>this.handleSubmit()},salla.lang.get("common.elements.ok")))):"")}componentDidRender(){}get host(){return e(this)}},d=class{constructor(t){s(this,t),this.ready=i(this,"ready",7),this.close=i(this,"close",7),this.error=!1,this.success=!1,this.isClosable=!0,this.modalWidth="w-96",this.visible=!1,this.subTitle="",this.icon="sicon-cancel",salla.event.on("modal::open",(s=>s.dataset.target==this.host.id&&this.show())),salla.event.on("modal::close",(s=>s.dataset.target==this.host.id&&this.hide()))}handleVisible(s){if(!s)return this.toggleModal(!1),void this.close.emit();this.host.classList.remove("hidden"),setTimeout((()=>this.toggleModal(!0))),this.ready.emit()}async show(){return this.host.setAttribute("visible",""),this.host}async hide(){return this.host.removeAttribute("visible"),this.host}toggleModal(s){l.toggleElement(this.host.querySelector(".s-modal-overlay"),"ease-out duration-300 opacity-100","opacity-0",(()=>s)).toggleElement(this.host.querySelector(".s-modal-body"),"ease-out duration-300 opacity-100 translate-y-0 sm:scale-100","opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",(()=>s)).toggleElement(document.body,"modal-is-open","modal-is-closed",(()=>s)),s||setTimeout((()=>this.host.classList.add("hidden")),350)}closeModal(){this.isClosable&&this.host.removeAttribute("visible")}render(){return this.host.id=this.host.id||"salla-modal",t(a,{class:"s-modal-container hidden","aria-modal":"true",role:"dialog"},t("div",{class:"s-modal-wrapper"},t("div",{class:"s-modal-overlay",onClick:()=>this.closeModal()}),t("span",{class:"s-modal-spacer"},"​"),t("div",{class:"s-modal-body "+this.modalWidth},t("slot",{name:"header"},t("div",{class:"s-modal-header"},this.isClosable?t("button",{class:"s-modal-close cursor-pointer",onClick:()=>this.closeModal(),type:"button"},t("span",{class:"sicon-cancel"})):"",this.error||this.success?t("div",{class:{"s-modal-icon":!0,"s-modal-bg-error":this.error,"s-modal-bg-success":this.success}},t("i",{class:{[this.icon]:!0,"s-modal-text-error":this.error,"s-modal-text-success":this.success}})):"",t("div",{class:"s-modal-title",innerHTML:this.host.title}),t("p",{class:"s-modal-sub-title",innerHTML:this.subTitle}))),t("slot",null),t("slot",{name:"footer"}))))}get host(){return e(this)}static get watchers(){return{visible:["handleVisible"]}}};export{h as multi_warehouse,d as salla_modal}
@@ -0,0 +1 @@
1
+ import{r as t,h as s,g as i}from"./p-d1ef2268.js";import{H as n}from"./p-520446eb.js";const a=class{constructor(s){t(this,s),this.kind="primary",this.loading=!1,this.hostAttributes={};for(let t=0;t<this.host.attributes.length;t++)this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value;this.hostAttributes.type=this.hostAttributes.type||"button",this.hostAttributes.class=(this.hostAttributes.class||"")+" s-button-btn btn--has-loading btn-"+this.kind,delete this.hostAttributes.kind,delete this.hostAttributes.id}async load(){return this.host.setAttribute("loading",""),this.host}async stop(){return this.host.removeAttribute("loading"),this.host}async disable(){this.btn.setAttribute("disabled","")}async enable(){this.btn.removeAttribute("disabled")}handleVisible(t,s){this.btn.classList.remove("btn-"+s),this.btn.classList.add("btn-"+t)}handleLoading(t){n.toggleElement(this.btn,"btn--is-loading","btn--no-loading",(()=>t))}render(){return s("button",Object.assign({ref:t=>this.btn=t},this.hostAttributes),s("slot",null),this.loading?s("span",{class:"loader loader--small s-button-loader"}):"")}get host(){return i(this)}static get watchers(){return{kind:["handleVisible"],loading:["handleLoading"]}}};a.style=":host{display:block}";export{a as salla_button}
@@ -0,0 +1 @@
1
+ export{S as salla_search}from"./p-4b137380.js";import"./p-d1ef2268.js";
@@ -0,0 +1 @@
1
+ let e,t,l=!1,n=!1,o=!1,s=!1;const i="undefined"!=typeof window?window:{},r=i.document||{head:{}},c={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),a=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u="http://www.w3.org/1999/xlink",$=new WeakMap,d=e=>"sc-"+e.o,y={},h=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...l)=>{let n=null,o=null,s=null,i=!1,r=!1,c=[];const f=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?f(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!h(n))&&(n+=""),i&&r?c[c.length-1].i+=n:c.push(i?m(null,n):n),r=i)};if(f(l),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=m(e,null);return a.u=t,c.length>0&&(a.$=c),a.h=o,a.p=s,a},m=(e,t)=>({t:0,m:e,i:t,k:null,$:null,u:null,h:null,p:null}),b={},w=(e,t,l,n,o,s)=>{if(l!==n){let r=te(e,t),f=t.toLowerCase();if("class"===t){const t=e.classList,o=g(l),s=g(n);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if("ref"===t)n&&n(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=h(n);if((r||i&&null!==n)&&!o)try{if(e.tagName.includes("-"))e[t]=n;else{let o=null==n?"":n;"list"===t?r=!1:null!=l&&e[t]==o||(e[t]=o)}}catch(e){}let c=!1;f!==(f=f.replace(/^xlink\:?/,""))&&(t=f,c=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(c?e.removeAttributeNS(u,t):e.removeAttribute(t)):(!r||4&s||o)&&!i&&(n=!0===n?"":n,c?e.setAttributeNS(u,t,n):e.setAttribute(t,n))}else t="-"===t[2]?t.slice(3):te(i,f)?f.slice(2):f[2]+t.slice(3),l&&c.rel(e,t,l,!1),n&&c.ael(e,t,n,!1)}},k=/\s/,g=e=>e?e.split(k):[],S=(e,t,l,n)=>{const o=11===t.k.nodeType&&t.k.host?t.k.host:t.k,s=e&&e.u||y,i=t.u||y;for(n in s)n in i||w(o,n,s[n],void 0,l,t.t);for(n in i)w(o,n,s[n],i[n],l,t.t)},j=(n,s,i)=>{let c,f,a,u=s.$[i],$=0;if(l||(o=!0,"slot"===u.m&&(u.t|=u.$?2:1)),null!==u.i)c=u.k=r.createTextNode(u.i);else if(1&u.t)c=u.k=r.createTextNode("");else if(c=u.k=r.createElement(2&u.t?"slot-fb":u.m),S(null,u,!1),u.$)for($=0;$<u.$.length;++$)f=j(n,u,$),f&&c.appendChild(f);return c["s-hn"]=t,3&u.t&&(c["s-sr"]=!0,c["s-cr"]=e,c["s-sn"]=u.p||"",a=n&&n.$&&n.$[i],a&&a.m===u.m&&n.k&&v(n.k,!1)),c},v=(e,l)=>{c.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const s=n[e];s["s-hn"]!==t&&s["s-ol"]&&(x(s).insertBefore(s,R(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),l&&v(s,l)}c.t&=-2},M=(e,t,l,n,o,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(;o<=s;++o)n[o]&&(i=j(null,l,o),i&&(n[o].k=i,r.insertBefore(i,R(t))))},O=(e,t,l,o,s)=>{for(;t<=l;++t)(o=e[t])&&(s=o.k,A(o),n=!0,s["s-ol"]?s["s-ol"].remove():v(s,!0),s.remove())},C=(e,t)=>e.m===t.m&&("slot"===e.m?e.p===t.p:e.h===t.h),R=e=>e&&e["s-ol"]||e,x=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,P=(e,t)=>{const l=t.k=e.k,n=e.$,o=t.$,s=t.i;let i;null===s?("slot"===t.m||S(e,t,!1),null!==n&&null!==o?((e,t,l,n)=>{let o,s,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],$=t[a],d=n.length-1,y=n[0],h=n[d];for(;i<=a&&r<=d;)if(null==u)u=t[++i];else if(null==$)$=t[--a];else if(null==y)y=n[++r];else if(null==h)h=n[--d];else if(C(u,y))P(u,y),u=t[++i],y=n[++r];else if(C($,h))P($,h),$=t[--a],h=n[--d];else if(C(u,h))"slot"!==u.m&&"slot"!==h.m||v(u.k.parentNode,!1),P(u,h),e.insertBefore(u.k,$.k.nextSibling),u=t[++i],h=n[--d];else if(C($,y))"slot"!==u.m&&"slot"!==h.m||v($.k.parentNode,!1),P($,y),e.insertBefore($.k,u.k),$=t[--a],y=n[++r];else{for(c=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].h&&t[f].h===y.h){c=f;break}c>=0?(s=t[c],s.m!==y.m?o=j(t&&t[r],l,c):(P(s,y),t[c]=void 0,o=s.k),y=n[++r]):(o=j(t&&t[r],l,r),y=n[++r]),o&&x(u.k).insertBefore(o,R(u.k))}i>a?M(e,null==n[d+1]?null:n[d+1].k,l,n,r,d):r>d&&O(t,i,a)})(l,n,t,o):null!==o?(null!==e.i&&(l.textContent=""),M(l,null,t,o,0,o.length-1)):null!==n&&O(n,0,n.length-1)):(i=l["s-cr"])?i.parentNode.textContent=s:e.i!==s&&(l.data=s)},T=e=>{let t,l,n,o,s,i,r=e.childNodes;for(l=0,n=r.length;l<n;l++)if(t=r[l],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<n;o++)if(i=r[o].nodeType,r[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===i&&s===r[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===i||3===i&&""!==r[o].textContent.trim()){t.hidden=!0;break}T(t)}},E=[],L=e=>{let t,l,o,s,i,r,c=0,f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(o=l.parentNode.childNodes,s=t["s-sn"],r=o.length-1;r>=0;r--)l=o[r],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(W(l,s)?(i=E.find((e=>e.g===l)),n=!0,l["s-sn"]=l["s-sn"]||s,i?i.S=t:E.push({S:t,g:l}),l["s-sr"]&&E.map((e=>{W(e.g,l["s-sn"])&&(i=E.find((e=>e.g===l)),i&&!e.S&&(e.S=i.S))}))):E.some((e=>e.g===l))||E.push({g:l}));1===t.nodeType&&L(t)}},W=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,A=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(A)},F=e=>Y(e).j,H=(e,t,l)=>{const n=F(e);return{emit:e=>N(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},N=(e,t,l)=>{const n=c.ce(t,l);return e.dispatchEvent(n),n},U=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},q=(e,t)=>{if(e.t|=16,!(4&e.t))return U(e,e.M),$e((()=>D(e,t)));e.t|=512},D=(e,t)=>{const l=e.O;let n;return t&&(n=G(l,"componentWillLoad")),I(n,(()=>V(e,l,t)))},V=async(e,t,l)=>{const n=e.j,o=n["s-rc"];l&&(e=>{const t=e.C;((e,t)=>{let l=d(t),n=se.get(l);if(e=11===e.nodeType?e:r,n)if("string"==typeof n){let t,o=$.get(e=e.head||e);o||$.set(e,o=new Set),o.has(l)||(t=r.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link")),o&&o.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n])})(e.j.getRootNode(),t)})(e);_(e,t),o&&(o.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>z(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},_=(s,i)=>{try{i=i.render(),s.t&=-17,s.t|=2,((s,i)=>{const f=s.j,a=s.C,u=s.R||m(null,null),$=(e=>e&&e.m===b)(i)?i:p(null,null,i);if(t=f.tagName,a.P&&($.u=$.u||{},a.P.map((([e,t])=>$.u[t]=f[e]))),$.m=null,$.t|=4,s.R=$,$.k=u.k=f,e=f["s-cr"],l=0!=(1&a.t),n=!1,P(u,$),c.t|=1,o){let e,t,l,n,o,s;L($.k);let i=0;for(;i<E.length;i++)e=E[i],t=e.g,t["s-ol"]||(l=r.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<E.length;i++)if(e=E[i],t=e.g,e.S){for(n=e.S.parentNode,o=e.S.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(s=l["s-nr"],s&&s["s-sn"]===t["s-sn"]&&n===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&n!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}n&&T($.k),c.t&=-2,E.length=0})(s,i)}catch(e){le(e,s.j)}return null},z=e=>{const t=e.j,l=e.M;G(e.O,"componentDidRender"),64&e.t||(e.t|=64,J(t),e.T(t),l||B()),e.L(t),e.v&&(e.v(),e.v=void 0),512&e.t&&ue((()=>q(e,!1))),e.t&=-517},B=()=>{J(r.documentElement),ue((()=>N(i,"appload",{detail:{namespace:"twilight-components"}})))},G=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){le(e)}},I=(e,t)=>e&&e.then?e.then(t):t(),J=e=>e.classList.add("hydrated"),K=(e,t,l)=>{if(t.W){e.watchers&&(t.A=e.watchers);const n=Object.entries(t.W),o=e.prototype;if(n.map((([e,[n]])=>{31&n||2&l&&32&n?Object.defineProperty(o,e,{get(){return((e,t)=>Y(this).F.get(t))(0,e)},set(l){((e,t,l,n)=>{const o=Y(e),s=o.j,i=o.F.get(t),r=o.t,c=o.O;if(l=((e,t)=>null==e||h(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.W[t][0]),!(8&r&&void 0!==i||l===i)&&(o.F.set(t,l),c)){if(n.A&&128&r){const e=n.A[t];e&&e.map((e=>{try{c[e](l,i,t)}catch(e){le(e,s)}}))}2==(18&r)&&q(o,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&n&&Object.defineProperty(o,e,{value(...t){const l=Y(this);return l.H.then((()=>l.O[e](...t)))}})})),1&l){const l=new Map;o.attributeChangedCallback=function(e,t,n){c.jmp((()=>{const t=l.get(e);this.hasOwnProperty(t)&&(n=this[t],delete this[t]),this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const o=n[1]||e;return l.set(o,e),512&n[0]&&t.P.push([e,o]),o}))}}return e},Q=(e,t={})=>{const l=[],n=t.exclude||[],o=i.customElements,s=r.head,f=s.querySelector("meta[charset]"),u=r.createElement("style"),$=[];let y,h=!0;Object.assign(c,t),c.l=new URL(t.resourcesUrl||"./",r.baseURI).href,e.map((e=>e[1].map((t=>{const s={t:t[0],o:t[1],W:t[2],N:t[3]};s.W=t[2],s.P=[],s.A={};const i=s.o,f=class extends HTMLElement{constructor(e){super(e),ee(e=this,s)}connectedCallback(){y&&(clearTimeout(y),y=null),h?$.push(this):c.jmp((()=>(e=>{if(0==(1&c.t)){const t=Y(e),l=t.C,n=()=>{};if(!(1&t.t)){t.t|=1,12&l.t&&(e=>{const t=e["s-cr"]=r.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let l=e;for(;l=l.parentNode||l.host;)if(l["s-p"]){U(t,t.M=l);break}}l.W&&Object.entries(l.W).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=oe(l)).then){const e=()=>{};o=await o,e()}o.isProxied||(l.A=o.watchers,K(o,l,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){le(e)}t.t&=-9,t.t|=128,e()}if(o.style){let e=o.style;const t=d(l);if(!se.has(t)){const n=()=>{};((e,t,l)=>{let n=se.get(e);a&&l?(n=n||new CSSStyleSheet,n.replace(t)):n=t,se.set(e,n)})(t,e,!!(1&l.t)),n()}}}const s=t.M,i=()=>q(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,l)}n()}})(this)))}disconnectedCallback(){c.jmp((()=>{}))}componentOnReady(){return Y(this).U}};s.q=e[0],n.includes(i)||o.get(i)||(l.push(i),o.define(i,K(f,s,1)))})))),u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles",""),s.insertBefore(u,f?f.nextSibling:s.firstChild),h=!1,$.length?$.map((e=>e.connectedCallback())):c.jmp((()=>y=setTimeout(B,30)))},X=new WeakMap,Y=e=>X.get(e),Z=(e,t)=>X.set(t.O=e,t),ee=(e,t)=>{const l={t:0,j:e,C:t,F:new Map};return l.H=new Promise((e=>l.L=e)),l.U=new Promise((e=>l.T=e)),e["s-p"]=[],e["s-rc"]=[],X.set(e,l)},te=(e,t)=>t in e,le=(e,t)=>(0,console.error)(e,t),ne=new Map,oe=e=>{const t=e.o.replace(/-/g,"_"),l=e.q,n=ne.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(ne.set(l,e),e[t])),le)},se=new Map,ie=[],re=[],ce=(e,t)=>l=>{e.push(l),s||(s=!0,t&&4&c.t?ue(ae):c.raf(ae))},fe=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){le(e)}e.length=0},ae=()=>{fe(ie),fe(re),(s=ie.length>0)&&c.raf(ae)},ue=e=>f().then(e),$e=ce(re,!0);export{b as H,Q as b,H as c,F as g,p as h,f as p,Z as r}
@@ -1,125 +1 @@
1
- import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-d6ed984a.js';
2
- import { g as globalScripts } from './app-globals-0f993ce5.js';
3
-
4
- /*
5
- Stencil Client Patch Browser v2.8.1 | MIT Licensed | https://stenciljs.com
6
- */
7
- const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
8
- const patchBrowser = () => {
9
- // NOTE!! This fn cannot use async/await!
10
- if (BUILD.isDev && !BUILD.isTesting) {
11
- consoleDevInfo('Running in development mode.');
12
- }
13
- if (BUILD.cssVarShim) {
14
- // shim css vars
15
- plt.$cssShim$ = win.__cssshim;
16
- }
17
- if (BUILD.cloneNodeFix) {
18
- // opted-in to polyfill cloneNode() for slot polyfilled components
19
- patchCloneNodeFix(H.prototype);
20
- }
21
- if (BUILD.profile && !performance.mark) {
22
- // not all browsers support performance.mark/measure (Safari 10)
23
- performance.mark = performance.measure = () => {
24
- /*noop*/
25
- };
26
- performance.getEntriesByName = () => [];
27
- }
28
- // @ts-ignore
29
- const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
30
- ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
31
- s.getAttribute('data-stencil-namespace') === NAMESPACE)
32
- : null;
33
- const importMeta = import.meta.url;
34
- const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
35
- if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
36
- // Safari < v11 support: This IF is true if it's Safari below v11.
37
- // This fn cannot use async/await since Safari didn't support it until v11,
38
- // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
39
- // so both the ESM file and nomodule file would get downloaded. Only Safari
40
- // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
41
- // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
42
- // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
43
- return {
44
- then() {
45
- /* promise noop */
46
- },
47
- };
48
- }
49
- if (!BUILD.safari10 && importMeta !== '') {
50
- opts.resourcesUrl = new URL('.', importMeta).href;
51
- }
52
- else if (BUILD.dynamicImportShim || BUILD.safari10) {
53
- opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
54
- if (BUILD.dynamicImportShim) {
55
- patchDynamicImport(opts.resourcesUrl, scriptElm);
56
- }
57
- if (BUILD.dynamicImportShim && !win.customElements) {
58
- // module support, but no custom elements support (Old Edge)
59
- // @ts-ignore
60
- return import(/* webpackChunkName: "polyfills-dom" */ './dom-d08ba8aa.js').then(() => opts);
61
- }
62
- }
63
- return promiseResolve(opts);
64
- };
65
- const patchDynamicImport = (base, orgScriptElm) => {
66
- const importFunctionName = getDynamicImportFunction(NAMESPACE);
67
- try {
68
- // test if this browser supports dynamic imports
69
- // There is a caching issue in V8, that breaks using import() in Function
70
- // By generating a random string, we can workaround it
71
- // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
72
- win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
73
- }
74
- catch (e) {
75
- // this shim is specifically for browsers that do support "esm" imports
76
- // however, they do NOT support "dynamic" imports
77
- // basically this code is for old Edge, v18 and below
78
- const moduleMap = new Map();
79
- win[importFunctionName] = (src) => {
80
- const url = new URL(src, base).href;
81
- let mod = moduleMap.get(url);
82
- if (!mod) {
83
- const script = doc.createElement('script');
84
- script.type = 'module';
85
- script.crossOrigin = orgScriptElm.crossOrigin;
86
- script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
87
- type: 'application/javascript',
88
- }));
89
- mod = new Promise((resolve) => {
90
- script.onload = () => {
91
- resolve(win[importFunctionName].m);
92
- script.remove();
93
- };
94
- });
95
- moduleMap.set(url, mod);
96
- doc.head.appendChild(script);
97
- }
98
- return mod;
99
- };
100
- }
101
- };
102
- const patchCloneNodeFix = (HTMLElementPrototype) => {
103
- const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
104
- HTMLElementPrototype.cloneNode = function (deep) {
105
- if (this.nodeName === 'TEMPLATE') {
106
- return nativeCloneNodeFn.call(this, deep);
107
- }
108
- const clonedNode = nativeCloneNodeFn.call(this, false);
109
- const srcChildNodes = this.childNodes;
110
- if (deep) {
111
- for (let i = 0; i < srcChildNodes.length; i++) {
112
- // Node.ATTRIBUTE_NODE === 2, and checking because IE11
113
- if (srcChildNodes[i].nodeType !== 2) {
114
- clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
115
- }
116
- }
117
- }
118
- return clonedNode;
119
- };
120
- };
121
-
122
- patchBrowser().then(options => {
123
- globalScripts();
124
- return bootstrapLazy([["salla-login",[[0,"salla-login"]]],["salla-search-modal",[[4,"salla-search-modal",{"searchPlaceholder":[1,"search-placeholder"],"noResultsText":[1,"no-results-text"],"searchTerm":[32],"results":[32],"fetchStatus":[32],"showResult":[32],"showModal":[32]}]]],["salla-modal",[[4,"salla-modal",{"error":[4],"success":[4],"title":[1],"subTitle":[1,"sub-title"],"icon":[1]}]]]], options);
125
- });
1
+ import{p as e,b as s}from"./p-d1ef2268.js";(()=>{const s=import.meta.url,o={};return""!==s&&(o.resourcesUrl=new URL(".",s).href),e(o)})().then((e=>s([["p-4cc11ee2",[[4,"salla-localization",{show:[64],hide:[64]}]]],["p-60f0446f",[[0,"order-rating",{order:[8]}]]],["p-baeca520",[[4,"salla-search",{searchPlaceholder:[1,"search-placeholder"],noResultsText:[1,"no-results-text"],searchTerm:[32],results:[32],fetchStatus:[32],showResult:[32],showModal:[32]}]]],["p-b72e6cfa",[[4,"salla-button",{kind:[513],loading:[516],load:[64],stop:[64],disable:[64],enable:[64]}]]],["p-b490f9e0",[[4,"multi-warehouse",{position:[1],displayAs:[1,"display-as"],browseProductsFrom:[1,"browse-products-from"],branches:[16],current:[1026],open:[32],selected:[32],isOpenedBefore:[32],show:[64],hide:[64]}],[0,"salla-login"],[4,"salla-modal",{error:[4],success:[4],isClosable:[1028,"is-closable"],modalWidth:[1,"modal-width"],visible:[516],subTitle:[1,"sub-title"],icon:[1],show:[64],hide:[64]}]]]],e)));
@@ -0,0 +1,8 @@
1
+ declare class Helper extends salla.AppHelpers {
2
+ setHost(host: any): void;
3
+ getElement(selector: any): any;
4
+ getAttribute(selector: any, attribute: any): any;
5
+ val(selector: any): any;
6
+ }
7
+ declare const _default: Helper;
8
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export declare class MultiWarehouse {
2
+ open: boolean;
3
+ selected: number;
4
+ isOpenedBefore: string;
5
+ position: string;
6
+ displayAs: string;
7
+ browseProductsFrom: string;
8
+ branches: any[];
9
+ current: number;
10
+ private modal;
11
+ host: HTMLElement;
12
+ constructor();
13
+ show(): Promise<HTMLElement>;
14
+ hide(): Promise<HTMLElement>;
15
+ private currentBranch;
16
+ private statusColor;
17
+ private isChoiceable;
18
+ private formTitle;
19
+ private handelChange;
20
+ private handleSubmit;
21
+ render(): any;
22
+ componentDidRender(): void;
23
+ }
@@ -0,0 +1,16 @@
1
+ export declare class OrderRating {
2
+ stars: Number[];
3
+ order: any;
4
+ ratingChain: Promise<void>;
5
+ render(): any;
6
+ renderProductsRating(): any;
7
+ renderStoreRating(): any;
8
+ renderShippingRating(): any;
9
+ getStarsRating(): any;
10
+ initiateRating(): void;
11
+ sendRating(): Promise<void>;
12
+ sendFeedback(type: any, formsData: any): void;
13
+ ratingValidation(): void;
14
+ highlightSelectedStars(): void;
15
+ starsRating(): void;
16
+ }
@@ -0,0 +1,15 @@
1
+ export declare class SallaButton {
2
+ constructor();
3
+ host: HTMLElement;
4
+ kind: string;
5
+ loading: boolean;
6
+ load(): Promise<HTMLElement>;
7
+ stop(): Promise<HTMLElement>;
8
+ disable(): Promise<void>;
9
+ enable(): Promise<void>;
10
+ private hostAttributes;
11
+ private btn;
12
+ handleVisible(newKind: string, oldKind: string): void;
13
+ handleLoading(newVal: boolean): void;
14
+ render(): any;
15
+ }
@@ -0,0 +1,10 @@
1
+ export declare class SallaLocalization {
2
+ constructor();
3
+ private modal;
4
+ private btn;
5
+ host: HTMLElement;
6
+ show(): Promise<HTMLElement>;
7
+ hide(): Promise<HTMLElement>;
8
+ private submit;
9
+ render(): any;
10
+ }
@@ -1,9 +1,20 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
1
2
  export declare class SallaModal {
3
+ constructor();
2
4
  error: boolean;
3
5
  success: boolean;
4
- title: string;
6
+ isClosable: boolean;
7
+ modalWidth: string;
8
+ visible: boolean;
5
9
  subTitle: string;
6
10
  icon: string;
7
11
  host: HTMLElement;
12
+ ready: EventEmitter;
13
+ close: EventEmitter;
14
+ handleVisible(newValue: boolean): void;
15
+ show(): Promise<HTMLElement>;
16
+ hide(): Promise<HTMLElement>;
17
+ private toggleModal;
18
+ private closeModal;
8
19
  render(): any;
9
20
  }
@@ -1,5 +1,5 @@
1
1
  import { HTMLStencilElement } from '../../stencil-public-runtime';
2
- export declare class SearchModal {
2
+ export declare class SallaSearch {
3
3
  searchTerm: string;
4
4
  results: string[];
5
5
  fetchStatus: string;
@@ -6,16 +6,44 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
+ interface MultiWarehouse {
10
+ "branches": any[];
11
+ "browseProductsFrom": string;
12
+ "current": number;
13
+ "displayAs": string;
14
+ "hide": () => Promise<HTMLElement>;
15
+ "position": string;
16
+ "show": () => Promise<HTMLElement>;
17
+ }
18
+ interface OrderRating {
19
+ "order": any;
20
+ }
21
+ interface SallaButton {
22
+ "disable": () => Promise<void>;
23
+ "enable": () => Promise<void>;
24
+ "kind": string;
25
+ "load": () => Promise<HTMLElement>;
26
+ "loading": boolean;
27
+ "stop": () => Promise<HTMLElement>;
28
+ }
29
+ interface SallaLocalization {
30
+ "hide": () => Promise<HTMLElement>;
31
+ "show": () => Promise<HTMLElement>;
32
+ }
9
33
  interface SallaLogin {
10
34
  }
11
35
  interface SallaModal {
12
36
  "error": boolean;
37
+ "hide": () => Promise<HTMLElement>;
13
38
  "icon": string;
39
+ "isClosable": boolean;
40
+ "modalWidth": string;
41
+ "show": () => Promise<HTMLElement>;
14
42
  "subTitle": string;
15
43
  "success": boolean;
16
- "title": string;
44
+ "visible": boolean;
17
45
  }
18
- interface SallaSearchModal {
46
+ interface SallaSearch {
19
47
  /**
20
48
  * The text to overwrite no results text.
21
49
  */
@@ -27,6 +55,30 @@ export namespace Components {
27
55
  }
28
56
  }
29
57
  declare global {
58
+ interface HTMLMultiWarehouseElement extends Components.MultiWarehouse, HTMLStencilElement {
59
+ }
60
+ var HTMLMultiWarehouseElement: {
61
+ prototype: HTMLMultiWarehouseElement;
62
+ new (): HTMLMultiWarehouseElement;
63
+ };
64
+ interface HTMLOrderRatingElement extends Components.OrderRating, HTMLStencilElement {
65
+ }
66
+ var HTMLOrderRatingElement: {
67
+ prototype: HTMLOrderRatingElement;
68
+ new (): HTMLOrderRatingElement;
69
+ };
70
+ interface HTMLSallaButtonElement extends Components.SallaButton, HTMLStencilElement {
71
+ }
72
+ var HTMLSallaButtonElement: {
73
+ prototype: HTMLSallaButtonElement;
74
+ new (): HTMLSallaButtonElement;
75
+ };
76
+ interface HTMLSallaLocalizationElement extends Components.SallaLocalization, HTMLStencilElement {
77
+ }
78
+ var HTMLSallaLocalizationElement: {
79
+ prototype: HTMLSallaLocalizationElement;
80
+ new (): HTMLSallaLocalizationElement;
81
+ };
30
82
  interface HTMLSallaLoginElement extends Components.SallaLogin, HTMLStencilElement {
31
83
  }
32
84
  var HTMLSallaLoginElement: {
@@ -39,29 +91,53 @@ declare global {
39
91
  prototype: HTMLSallaModalElement;
40
92
  new (): HTMLSallaModalElement;
41
93
  };
42
- interface HTMLSallaSearchModalElement extends Components.SallaSearchModal, HTMLStencilElement {
94
+ interface HTMLSallaSearchElement extends Components.SallaSearch, HTMLStencilElement {
43
95
  }
44
- var HTMLSallaSearchModalElement: {
45
- prototype: HTMLSallaSearchModalElement;
46
- new (): HTMLSallaSearchModalElement;
96
+ var HTMLSallaSearchElement: {
97
+ prototype: HTMLSallaSearchElement;
98
+ new (): HTMLSallaSearchElement;
47
99
  };
48
100
  interface HTMLElementTagNameMap {
101
+ "multi-warehouse": HTMLMultiWarehouseElement;
102
+ "order-rating": HTMLOrderRatingElement;
103
+ "salla-button": HTMLSallaButtonElement;
104
+ "salla-localization": HTMLSallaLocalizationElement;
49
105
  "salla-login": HTMLSallaLoginElement;
50
106
  "salla-modal": HTMLSallaModalElement;
51
- "salla-search-modal": HTMLSallaSearchModalElement;
107
+ "salla-search": HTMLSallaSearchElement;
52
108
  }
53
109
  }
54
110
  declare namespace LocalJSX {
111
+ interface MultiWarehouse {
112
+ "branches"?: any[];
113
+ "browseProductsFrom"?: string;
114
+ "current"?: number;
115
+ "displayAs"?: string;
116
+ "position"?: string;
117
+ }
118
+ interface OrderRating {
119
+ "order"?: any;
120
+ }
121
+ interface SallaButton {
122
+ "kind"?: string;
123
+ "loading"?: boolean;
124
+ }
125
+ interface SallaLocalization {
126
+ }
55
127
  interface SallaLogin {
56
128
  }
57
129
  interface SallaModal {
58
130
  "error"?: boolean;
59
131
  "icon"?: string;
132
+ "isClosable"?: boolean;
133
+ "modalWidth"?: string;
134
+ "onClose"?: (event: CustomEvent<any>) => void;
135
+ "onReady"?: (event: CustomEvent<any>) => void;
60
136
  "subTitle"?: string;
61
137
  "success"?: boolean;
62
- "title"?: string;
138
+ "visible"?: boolean;
63
139
  }
64
- interface SallaSearchModal {
140
+ interface SallaSearch {
65
141
  /**
66
142
  * The text to overwrite no results text.
67
143
  */
@@ -72,18 +148,26 @@ declare namespace LocalJSX {
72
148
  "searchPlaceholder"?: string;
73
149
  }
74
150
  interface IntrinsicElements {
151
+ "multi-warehouse": MultiWarehouse;
152
+ "order-rating": OrderRating;
153
+ "salla-button": SallaButton;
154
+ "salla-localization": SallaLocalization;
75
155
  "salla-login": SallaLogin;
76
156
  "salla-modal": SallaModal;
77
- "salla-search-modal": SallaSearchModal;
157
+ "salla-search": SallaSearch;
78
158
  }
79
159
  }
80
160
  export { LocalJSX as JSX };
81
161
  declare module "@stencil/core" {
82
162
  export namespace JSX {
83
163
  interface IntrinsicElements {
164
+ "multi-warehouse": LocalJSX.MultiWarehouse & JSXBase.HTMLAttributes<HTMLMultiWarehouseElement>;
165
+ "order-rating": LocalJSX.OrderRating & JSXBase.HTMLAttributes<HTMLOrderRatingElement>;
166
+ "salla-button": LocalJSX.SallaButton & JSXBase.HTMLAttributes<HTMLSallaButtonElement>;
167
+ "salla-localization": LocalJSX.SallaLocalization & JSXBase.HTMLAttributes<HTMLSallaLocalizationElement>;
84
168
  "salla-login": LocalJSX.SallaLogin & JSXBase.HTMLAttributes<HTMLSallaLoginElement>;
85
169
  "salla-modal": LocalJSX.SallaModal & JSXBase.HTMLAttributes<HTMLSallaModalElement>;
86
- "salla-search-modal": LocalJSX.SallaSearchModal & JSXBase.HTMLAttributes<HTMLSallaSearchModalElement>;
170
+ "salla-search": LocalJSX.SallaSearch & JSXBase.HTMLAttributes<HTMLSallaSearchElement>;
87
171
  }
88
172
  }
89
173
  }
@@ -5,4 +5,4 @@ declare global {
5
5
  let salla: any;
6
6
  }
7
7
  export * from './components/salla-login/salla-login';
8
- export * from './components/search-modal/search-modal';
8
+ export * from './components/salla-search/salla-search';