@salla.sa/twilight-components 1.0.6 → 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 (65) hide show
  1. package/dist/cjs/{index-e9451c82.js → index-23da2c6b.js} +159 -4
  2. package/dist/cjs/index.cjs.js +3 -3
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/multi-warehouse_3.cjs.entry.js +155 -0
  5. package/dist/cjs/order-rating.cjs.entry.js +227 -0
  6. package/dist/cjs/salla-button.cjs.entry.js +56 -0
  7. package/dist/cjs/salla-localization.cjs.entry.js +49 -0
  8. package/dist/cjs/{salla-login-3ec94029.js → salla-login-476fb312.js} +1 -1
  9. package/dist/cjs/{salla-search-2b1d67e4.js → salla-search-b9403062.js} +7 -7
  10. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  11. package/dist/cjs/twilight-components.cjs.js +2 -2
  12. package/dist/collection/collection-manifest.json +7 -4
  13. package/dist/collection/components/multi-warehouse/multi-warehouse.js +239 -0
  14. package/dist/collection/components/order-rating/order-rating.css +3 -0
  15. package/dist/collection/components/order-rating/order-rating.js +288 -0
  16. package/dist/collection/components/salla-button/salla-button.css +3 -0
  17. package/dist/collection/components/salla-button/salla-button.js +167 -0
  18. package/dist/collection/components/salla-localization/salla-localization.js +106 -0
  19. package/dist/collection/components/{login → salla-login}/salla-login.js +0 -0
  20. package/dist/collection/components/{modal → salla-modal}/salla-modal.js +115 -18
  21. package/dist/collection/components/{search → salla-search}/salla-search.js +21 -21
  22. package/dist/collection/index.js +2 -2
  23. package/dist/collection/plugins/tailwind-theme/generator.js +1 -1
  24. package/dist/esm/{index-8919a244.js → index-643344dc.js} +159 -4
  25. package/dist/esm/index.js +3 -3
  26. package/dist/esm/loader.js +2 -2
  27. package/dist/esm/multi-warehouse_3.entry.js +149 -0
  28. package/dist/esm/order-rating.entry.js +223 -0
  29. package/dist/esm/salla-button.entry.js +52 -0
  30. package/dist/esm/salla-localization.entry.js +45 -0
  31. package/dist/esm/{salla-login-4aa5bb90.js → salla-login-0e85b2d8.js} +1 -1
  32. package/dist/esm/{salla-search-bd2f71b3.js → salla-search-5d4a6f1a.js} +7 -7
  33. package/dist/esm/salla-search.entry.js +2 -2
  34. package/dist/esm/twilight-components.js +2 -2
  35. package/dist/twilight-components/index.esm.js +1 -1
  36. package/dist/twilight-components/{p-41dc89e6.js → p-36c87e2e.js} +1 -1
  37. package/dist/twilight-components/p-4b137380.js +1 -0
  38. package/dist/twilight-components/p-4cc11ee2.entry.js +1 -0
  39. package/dist/twilight-components/p-60f0446f.entry.js +1 -0
  40. package/dist/twilight-components/p-b490f9e0.entry.js +1 -0
  41. package/dist/twilight-components/p-b72e6cfa.entry.js +1 -0
  42. package/dist/twilight-components/p-baeca520.entry.js +1 -0
  43. package/dist/twilight-components/p-d1ef2268.js +1 -0
  44. package/dist/twilight-components/twilight-components.esm.js +1 -1
  45. package/dist/types/components/multi-warehouse/multi-warehouse.d.ts +23 -0
  46. package/dist/types/components/order-rating/order-rating.d.ts +16 -0
  47. package/dist/types/components/salla-button/salla-button.d.ts +15 -0
  48. package/dist/types/components/salla-localization/salla-localization.d.ts +10 -0
  49. package/dist/types/components/{login → salla-login}/salla-login.d.ts +0 -0
  50. package/dist/types/components/{modal → salla-modal}/salla-modal.d.ts +6 -2
  51. package/dist/types/components/{search → salla-search}/salla-search.d.ts +0 -0
  52. package/dist/types/components.d.ts +78 -11
  53. package/dist/types/index.d.ts +2 -2
  54. package/package.json +10 -6
  55. package/dist/cjs/salla-currency-language.cjs.entry.js +0 -46
  56. package/dist/cjs/salla-login_2.cjs.entry.js +0 -57
  57. package/dist/collection/components/currency-language/salla-currency-language.js +0 -97
  58. package/dist/esm/salla-currency-language.entry.js +0 -42
  59. package/dist/esm/salla-login_2.entry.js +0 -52
  60. package/dist/twilight-components/p-1abaafe4.entry.js +0 -1
  61. package/dist/twilight-components/p-58b1afae.js +0 -1
  62. package/dist/twilight-components/p-840f0daa.entry.js +0 -1
  63. package/dist/twilight-components/p-9f9af3e0.js +0 -1
  64. package/dist/twilight-components/p-b134c95d.entry.js +0 -1
  65. package/dist/types/components/currency-language/salla-currency-language.d.ts +0 -10
@@ -1,7 +1,10 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  export declare class SallaModal {
3
+ constructor();
3
4
  error: boolean;
4
5
  success: boolean;
6
+ isClosable: boolean;
7
+ modalWidth: string;
5
8
  visible: boolean;
6
9
  subTitle: string;
7
10
  icon: string;
@@ -9,8 +12,9 @@ export declare class SallaModal {
9
12
  ready: EventEmitter;
10
13
  close: EventEmitter;
11
14
  handleVisible(newValue: boolean): void;
12
- private show;
13
- private hide;
15
+ show(): Promise<HTMLElement>;
16
+ hide(): Promise<HTMLElement>;
14
17
  private toggleModal;
18
+ private closeModal;
15
19
  render(): any;
16
20
  }
@@ -6,15 +6,39 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
- interface SallaCurrencyLanguage {
10
- "hide": () => Promise<void>;
11
- "show": () => Promise<void>;
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>;
12
32
  }
13
33
  interface SallaLogin {
14
34
  }
15
35
  interface SallaModal {
16
36
  "error": boolean;
37
+ "hide": () => Promise<HTMLElement>;
17
38
  "icon": string;
39
+ "isClosable": boolean;
40
+ "modalWidth": string;
41
+ "show": () => Promise<HTMLElement>;
18
42
  "subTitle": string;
19
43
  "success": boolean;
20
44
  "visible": boolean;
@@ -31,11 +55,29 @@ export namespace Components {
31
55
  }
32
56
  }
33
57
  declare global {
34
- interface HTMLSallaCurrencyLanguageElement extends Components.SallaCurrencyLanguage, HTMLStencilElement {
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 {
35
77
  }
36
- var HTMLSallaCurrencyLanguageElement: {
37
- prototype: HTMLSallaCurrencyLanguageElement;
38
- new (): HTMLSallaCurrencyLanguageElement;
78
+ var HTMLSallaLocalizationElement: {
79
+ prototype: HTMLSallaLocalizationElement;
80
+ new (): HTMLSallaLocalizationElement;
39
81
  };
40
82
  interface HTMLSallaLoginElement extends Components.SallaLogin, HTMLStencilElement {
41
83
  }
@@ -56,20 +98,39 @@ declare global {
56
98
  new (): HTMLSallaSearchElement;
57
99
  };
58
100
  interface HTMLElementTagNameMap {
59
- "salla-currency-language": HTMLSallaCurrencyLanguageElement;
101
+ "multi-warehouse": HTMLMultiWarehouseElement;
102
+ "order-rating": HTMLOrderRatingElement;
103
+ "salla-button": HTMLSallaButtonElement;
104
+ "salla-localization": HTMLSallaLocalizationElement;
60
105
  "salla-login": HTMLSallaLoginElement;
61
106
  "salla-modal": HTMLSallaModalElement;
62
107
  "salla-search": HTMLSallaSearchElement;
63
108
  }
64
109
  }
65
110
  declare namespace LocalJSX {
66
- interface SallaCurrencyLanguage {
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 {
67
126
  }
68
127
  interface SallaLogin {
69
128
  }
70
129
  interface SallaModal {
71
130
  "error"?: boolean;
72
131
  "icon"?: string;
132
+ "isClosable"?: boolean;
133
+ "modalWidth"?: string;
73
134
  "onClose"?: (event: CustomEvent<any>) => void;
74
135
  "onReady"?: (event: CustomEvent<any>) => void;
75
136
  "subTitle"?: string;
@@ -87,7 +148,10 @@ declare namespace LocalJSX {
87
148
  "searchPlaceholder"?: string;
88
149
  }
89
150
  interface IntrinsicElements {
90
- "salla-currency-language": SallaCurrencyLanguage;
151
+ "multi-warehouse": MultiWarehouse;
152
+ "order-rating": OrderRating;
153
+ "salla-button": SallaButton;
154
+ "salla-localization": SallaLocalization;
91
155
  "salla-login": SallaLogin;
92
156
  "salla-modal": SallaModal;
93
157
  "salla-search": SallaSearch;
@@ -97,7 +161,10 @@ export { LocalJSX as JSX };
97
161
  declare module "@stencil/core" {
98
162
  export namespace JSX {
99
163
  interface IntrinsicElements {
100
- "salla-currency-language": LocalJSX.SallaCurrencyLanguage & JSXBase.HTMLAttributes<HTMLSallaCurrencyLanguageElement>;
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>;
101
168
  "salla-login": LocalJSX.SallaLogin & JSXBase.HTMLAttributes<HTMLSallaLoginElement>;
102
169
  "salla-modal": LocalJSX.SallaModal & JSXBase.HTMLAttributes<HTMLSallaModalElement>;
103
170
  "salla-search": LocalJSX.SallaSearch & JSXBase.HTMLAttributes<HTMLSallaSearchElement>;
@@ -4,5 +4,5 @@ declare global {
4
4
  }
5
5
  let salla: any;
6
6
  }
7
- export * from './components/login/salla-login';
8
- export * from './components/search/salla-search';
7
+ export * from './components/salla-login/salla-login';
8
+ export * from './components/salla-search/salla-search';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "twilight",
@@ -40,11 +40,10 @@
40
40
  "ci:build": "stencil build --ci",
41
41
  "ci:test": "stencil test --spec",
42
42
  "prerender": "stencil build --prerender",
43
- "prepublishOnly": "node ./publish.js"
43
+ "prepublishOnly": "node ./publish.js",
44
+ "tailwind": "node src/plugins/tailwind-theme/generator.js"
44
45
  },
45
46
  "devDependencies": {
46
- "lodash": "^4.17.21",
47
- "tailwindcss": "^2.2.19",
48
47
  "@compodoc/compodoc": "^1.1.14",
49
48
  "@stencil/core": "2.8.1",
50
49
  "@stencil/eslint-plugin": "^0.3.1",
@@ -60,9 +59,14 @@
60
59
  "eslint-plugin-react": "^7.26.0",
61
60
  "jest": "26.6.1",
62
61
  "jest-cli": "26.6.1",
62
+ "lodash": "^4.17.21",
63
63
  "prettier": "^2.4.1",
64
+ "promisify-child-process": "^3.1.4",
64
65
  "puppeteer": "^5.4.1",
65
- "typescript": "^4.4.3",
66
- "promisify-child-process": "^3.1.4"
66
+ "tailwindcss": "^2.2.19",
67
+ "typescript": "^4.4.3"
68
+ },
69
+ "dependencies": {
70
+ "store": "^2.0.12"
67
71
  }
68
72
  }
@@ -1,46 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-e9451c82.js');
6
- const Helper = require('./Helper-8c75b6ac.js');
7
-
8
- const SallaCurrencyLanguage = class {
9
- constructor(hostRef) {
10
- index.registerInstance(this, hostRef);
11
- Helper.Helper.setHost(this.host);
12
- }
13
- async show() {
14
- this.modal.setAttribute('visible', '');
15
- }
16
- async hide() {
17
- this.modal.removeAttribute('visible');
18
- }
19
- submit() {
20
- this.hide()
21
- .then(() => {
22
- let code = Helper.Helper.val('[name=currency]:checked');
23
- if (code !== salla.config.currency.code) {
24
- return salla.currency.api.change(code);
25
- }
26
- }).then(() => {
27
- let language = Helper.Helper.val('[name=lang]:checked');
28
- if (language !== salla.config.language.code) {
29
- window.location.href = salla.config.languages.filter(lang => lang.code === language)[0].url;
30
- }
31
- });
32
- }
33
- render() {
34
- return (index.h("salla-modal", { id: "lang-currency-modal", class: "hidden" }, index.h("slot", { name: "header" }, index.h("div", { slot: "header" })), index.h("div", { class: "s-currency-language-inner" }, salla.config.languages
35
- ? index.h("div", { class: "s-currency-language-section" }, index.h("label", { class: "s-currency-language-title" }, salla.lang.get('common.titles.language')), index.h("fieldset", { class: "s-currency-language-fieldset" }, index.h("legend", { class: "sr-only" }, salla.lang.get('blocks.header.change_language')), index.h("div", { class: "s-currency-language-section-inner" }, salla.config.languages.map(lang => index.h("div", { class: "flex items-center" }, index.h("input", { id: 'lang-' + lang.code.toLowerCase(), class: "s-currency-language-input", name: "lang", checked: salla.config.language.code == lang.code, type: "radio", value: lang.code }), index.h("label", { htmlFor: 'lang-' + lang.code.toLowerCase(), class: "s-currency-language-label" }, index.h("span", null, lang.name), index.h("div", { class: 's-currency-language-flag flag iti__flag iti__' + lang.country_code })))))))
36
- : '', salla.config.currencies
37
- ? index.h("div", { class: "s-currency-language-section" }, index.h("label", { class: "s-currency-language-title" }, salla.lang.get('common.titles.currency')), index.h("fieldset", { class: "s-currency-language-fieldset" }, index.h("legend", { class: "sr-only" }, salla.lang.get('blocks.header.change_currency')), index.h("div", { class: "s-currency-language-section-inner" }, salla.config.currencies.map(currency => index.h("div", { class: "s-currency-language-item" }, index.h("input", { class: "s-currency-language-input", checked: salla.config.currency.code == currency.code, id: 'currency-' + currency.code, name: "currency", type: "radio", value: currency.code }), index.h("label", { class: "s-currency-language-label", htmlFor: 'currency-' + currency.code }, index.h("span", null, currency.name), index.h("small", { class: "s-currency-language-currency" }, currency.code)))))))
38
- : ''), index.h("p", { slot: "footer" }, index.h("slot", { name: "footer" }, index.h("button", { type: "button", class: "s-currency-language-submit", onClick: () => this.submit() }, salla.lang.get('common.elements.ok'))))));
39
- }
40
- componentDidRender() {
41
- this.modal = document.querySelector('#lang-currency-modal');
42
- }
43
- get host() { return index.getElement(this); }
44
- };
45
-
46
- exports.salla_currency_language = SallaCurrencyLanguage;
@@ -1,57 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const sallaLogin = require('./salla-login-3ec94029.js');
6
- const index = require('./index-e9451c82.js');
7
- const Helper = require('./Helper-8c75b6ac.js');
8
-
9
- const SallaModal = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.ready = index.createEvent(this, "ready", 7);
13
- this.close = index.createEvent(this, "close", 7);
14
- this.error = false;
15
- this.success = false;
16
- this.visible = false;
17
- this.subTitle = '';
18
- this.icon = 'sicon-cancel';
19
- }
20
- handleVisible(newValue) {
21
- return newValue === true
22
- ? this.show()
23
- : this.hide();
24
- }
25
- show() {
26
- this.host.classList.remove('hidden');
27
- setTimeout(() => this.toggleModal(true)); //small amont of time to running toggle After adding hidden
28
- this.ready.emit();
29
- }
30
- hide() {
31
- this.toggleModal(false);
32
- this.close.emit();
33
- }
34
- toggleModal(isOpen) {
35
- Helper.Helper.toggleElement(this.host.querySelector('.s-modal-overlay'), 'ease-out duration-300 opacity-100', 'opacity-0', () => isOpen)
36
- .toggleElement(this.host.querySelector('.s-modal-body'), 'ease-out duration-300 opacity-100 translate-y-0 sm:scale-100', //add these classes
37
- 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95', //remove these classes
38
- () => isOpen)
39
- .toggleElement(document.body, 'modal-is-open', 'modal-is-closed', () => isOpen);
40
- if (!isOpen) {
41
- setTimeout(() => this.host.classList.add('hidden'), 350);
42
- }
43
- }
44
- render() {
45
- this.host.id = this.host.id || 'salla-modal';
46
- return (index.h(index.Host, { class: 's-modal-container hidden', "aria-modal": "true", role: "dialog" }, index.h("div", { class: "s-modal-wrapper" }, index.h("div", { class: "s-modal-overlay", onClick: () => this.host.removeAttribute('visible') }), index.h("span", { class: "s-modal-spacer" }, "\u200B"), index.h("div", { class: "s-modal-body" }, index.h("slot", { name: "header" }, index.h("div", { class: "s-modal-header" }, index.h("button", { class: "s-modal-close cursor-pointer", onClick: () => this.host.removeAttribute('visible'), type: "button" }, index.h("span", { class: "sicon-cancel" })), index.h("div", { class: "s-modal-title" }, this.host.title), index.h("p", { class: "s-modal-sub-title" }, this.subTitle), this.error || this.success
47
- ? index.h("div", { class: { 's-modal-icon': true, 'bg-red-100': this.error, 'bg-green-100': this.success } }, index.h("i", { class: { [this.icon]: true, 'text-red-600': this.error, 'text-green-600': this.success } }))
48
- : '')), index.h("slot", null), index.h("slot", { name: "footer" })))));
49
- }
50
- get host() { return index.getElement(this); }
51
- static get watchers() { return {
52
- "visible": ["handleVisible"]
53
- }; }
54
- };
55
-
56
- exports.salla_login = sallaLogin.SallaLogin;
57
- exports.salla_modal = SallaModal;
@@ -1,97 +0,0 @@
1
- import { Component, Element, h, Method } from '@stencil/core';
2
- import Helper from "../../Helpers/Helper";
3
- export class SallaCurrencyLanguage {
4
- constructor() {
5
- Helper.setHost(this.host);
6
- }
7
- async show() {
8
- this.modal.setAttribute('visible', '');
9
- }
10
- async hide() {
11
- this.modal.removeAttribute('visible');
12
- }
13
- submit() {
14
- this.hide()
15
- .then(() => {
16
- let code = Helper.val('[name=currency]:checked');
17
- if (code !== salla.config.currency.code) {
18
- return salla.currency.api.change(code);
19
- }
20
- }).then(() => {
21
- let language = Helper.val('[name=lang]:checked');
22
- if (language !== salla.config.language.code) {
23
- window.location.href = salla.config.languages.filter(lang => lang.code === language)[0].url;
24
- }
25
- });
26
- }
27
- render() {
28
- return (h("salla-modal", { id: "lang-currency-modal", class: "hidden" },
29
- h("slot", { name: "header" },
30
- h("div", { slot: "header" })),
31
- h("div", { class: "s-currency-language-inner" },
32
- salla.config.languages
33
- ? h("div", { class: "s-currency-language-section" },
34
- h("label", { class: "s-currency-language-title" }, salla.lang.get('common.titles.language')),
35
- h("fieldset", { class: "s-currency-language-fieldset" },
36
- h("legend", { class: "sr-only" }, salla.lang.get('blocks.header.change_language')),
37
- h("div", { class: "s-currency-language-section-inner" }, salla.config.languages.map(lang => h("div", { class: "flex items-center" },
38
- h("input", { id: 'lang-' + lang.code.toLowerCase(), class: "s-currency-language-input", name: "lang", checked: salla.config.language.code == lang.code, type: "radio", value: lang.code }),
39
- h("label", { htmlFor: 'lang-' + lang.code.toLowerCase(), class: "s-currency-language-label" },
40
- h("span", null, lang.name),
41
- h("div", { class: 's-currency-language-flag flag iti__flag iti__' + lang.country_code })))))))
42
- : '',
43
- salla.config.currencies
44
- ? h("div", { class: "s-currency-language-section" },
45
- h("label", { class: "s-currency-language-title" }, salla.lang.get('common.titles.currency')),
46
- h("fieldset", { class: "s-currency-language-fieldset" },
47
- h("legend", { class: "sr-only" }, salla.lang.get('blocks.header.change_currency')),
48
- h("div", { class: "s-currency-language-section-inner" }, salla.config.currencies.map(currency => h("div", { class: "s-currency-language-item" },
49
- h("input", { class: "s-currency-language-input", checked: salla.config.currency.code == currency.code, id: 'currency-' + currency.code, name: "currency", type: "radio", value: currency.code }),
50
- h("label", { class: "s-currency-language-label", htmlFor: 'currency-' + currency.code },
51
- h("span", null, currency.name),
52
- h("small", { class: "s-currency-language-currency" }, currency.code)))))))
53
- : ''),
54
- h("p", { slot: "footer" },
55
- h("slot", { name: "footer" },
56
- h("button", { type: "button", class: "s-currency-language-submit", onClick: () => this.submit() }, salla.lang.get('common.elements.ok'))))));
57
- }
58
- componentDidRender() {
59
- this.modal = document.querySelector('#lang-currency-modal');
60
- }
61
- static get is() { return "salla-currency-language"; }
62
- static get methods() { return {
63
- "show": {
64
- "complexType": {
65
- "signature": "() => Promise<void>",
66
- "parameters": [],
67
- "references": {
68
- "Promise": {
69
- "location": "global"
70
- }
71
- },
72
- "return": "Promise<void>"
73
- },
74
- "docs": {
75
- "text": "",
76
- "tags": []
77
- }
78
- },
79
- "hide": {
80
- "complexType": {
81
- "signature": "() => Promise<void>",
82
- "parameters": [],
83
- "references": {
84
- "Promise": {
85
- "location": "global"
86
- }
87
- },
88
- "return": "Promise<void>"
89
- },
90
- "docs": {
91
- "text": "",
92
- "tags": []
93
- }
94
- }
95
- }; }
96
- static get elementRef() { return "host"; }
97
- }
@@ -1,42 +0,0 @@
1
- import { r as registerInstance, h, g as getElement } from './index-8919a244.js';
2
- import { H as Helper } from './Helper-23b2de40.js';
3
-
4
- const SallaCurrencyLanguage = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- Helper.setHost(this.host);
8
- }
9
- async show() {
10
- this.modal.setAttribute('visible', '');
11
- }
12
- async hide() {
13
- this.modal.removeAttribute('visible');
14
- }
15
- submit() {
16
- this.hide()
17
- .then(() => {
18
- let code = Helper.val('[name=currency]:checked');
19
- if (code !== salla.config.currency.code) {
20
- return salla.currency.api.change(code);
21
- }
22
- }).then(() => {
23
- let language = Helper.val('[name=lang]:checked');
24
- if (language !== salla.config.language.code) {
25
- window.location.href = salla.config.languages.filter(lang => lang.code === language)[0].url;
26
- }
27
- });
28
- }
29
- render() {
30
- return (h("salla-modal", { id: "lang-currency-modal", class: "hidden" }, h("slot", { name: "header" }, h("div", { slot: "header" })), h("div", { class: "s-currency-language-inner" }, salla.config.languages
31
- ? h("div", { class: "s-currency-language-section" }, h("label", { class: "s-currency-language-title" }, salla.lang.get('common.titles.language')), h("fieldset", { class: "s-currency-language-fieldset" }, h("legend", { class: "sr-only" }, salla.lang.get('blocks.header.change_language')), h("div", { class: "s-currency-language-section-inner" }, salla.config.languages.map(lang => h("div", { class: "flex items-center" }, h("input", { id: 'lang-' + lang.code.toLowerCase(), class: "s-currency-language-input", name: "lang", checked: salla.config.language.code == lang.code, type: "radio", value: lang.code }), h("label", { htmlFor: 'lang-' + lang.code.toLowerCase(), class: "s-currency-language-label" }, h("span", null, lang.name), h("div", { class: 's-currency-language-flag flag iti__flag iti__' + lang.country_code })))))))
32
- : '', salla.config.currencies
33
- ? h("div", { class: "s-currency-language-section" }, h("label", { class: "s-currency-language-title" }, salla.lang.get('common.titles.currency')), h("fieldset", { class: "s-currency-language-fieldset" }, h("legend", { class: "sr-only" }, salla.lang.get('blocks.header.change_currency')), h("div", { class: "s-currency-language-section-inner" }, salla.config.currencies.map(currency => h("div", { class: "s-currency-language-item" }, h("input", { class: "s-currency-language-input", checked: salla.config.currency.code == currency.code, id: 'currency-' + currency.code, name: "currency", type: "radio", value: currency.code }), h("label", { class: "s-currency-language-label", htmlFor: 'currency-' + currency.code }, h("span", null, currency.name), h("small", { class: "s-currency-language-currency" }, currency.code)))))))
34
- : ''), h("p", { slot: "footer" }, h("slot", { name: "footer" }, h("button", { type: "button", class: "s-currency-language-submit", onClick: () => this.submit() }, salla.lang.get('common.elements.ok'))))));
35
- }
36
- componentDidRender() {
37
- this.modal = document.querySelector('#lang-currency-modal');
38
- }
39
- get host() { return getElement(this); }
40
- };
41
-
42
- export { SallaCurrencyLanguage as salla_currency_language };
@@ -1,52 +0,0 @@
1
- export { S as salla_login } from './salla-login-4aa5bb90.js';
2
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-8919a244.js';
3
- import { H as Helper } from './Helper-23b2de40.js';
4
-
5
- const SallaModal = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ready = createEvent(this, "ready", 7);
9
- this.close = createEvent(this, "close", 7);
10
- this.error = false;
11
- this.success = false;
12
- this.visible = false;
13
- this.subTitle = '';
14
- this.icon = 'sicon-cancel';
15
- }
16
- handleVisible(newValue) {
17
- return newValue === true
18
- ? this.show()
19
- : this.hide();
20
- }
21
- show() {
22
- this.host.classList.remove('hidden');
23
- setTimeout(() => this.toggleModal(true)); //small amont of time to running toggle After adding hidden
24
- this.ready.emit();
25
- }
26
- hide() {
27
- this.toggleModal(false);
28
- this.close.emit();
29
- }
30
- toggleModal(isOpen) {
31
- Helper.toggleElement(this.host.querySelector('.s-modal-overlay'), 'ease-out duration-300 opacity-100', 'opacity-0', () => isOpen)
32
- .toggleElement(this.host.querySelector('.s-modal-body'), 'ease-out duration-300 opacity-100 translate-y-0 sm:scale-100', //add these classes
33
- 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95', //remove these classes
34
- () => isOpen)
35
- .toggleElement(document.body, 'modal-is-open', 'modal-is-closed', () => isOpen);
36
- if (!isOpen) {
37
- setTimeout(() => this.host.classList.add('hidden'), 350);
38
- }
39
- }
40
- render() {
41
- this.host.id = this.host.id || 'salla-modal';
42
- return (h(Host, { class: 's-modal-container hidden', "aria-modal": "true", role: "dialog" }, h("div", { class: "s-modal-wrapper" }, h("div", { class: "s-modal-overlay", onClick: () => this.host.removeAttribute('visible') }), h("span", { class: "s-modal-spacer" }, "\u200B"), h("div", { class: "s-modal-body" }, h("slot", { name: "header" }, h("div", { class: "s-modal-header" }, h("button", { class: "s-modal-close cursor-pointer", onClick: () => this.host.removeAttribute('visible'), type: "button" }, h("span", { class: "sicon-cancel" })), h("div", { class: "s-modal-title" }, this.host.title), h("p", { class: "s-modal-sub-title" }, this.subTitle), this.error || this.success
43
- ? h("div", { class: { 's-modal-icon': true, 'bg-red-100': this.error, 'bg-green-100': this.success } }, h("i", { class: { [this.icon]: true, 'text-red-600': this.error, 'text-green-600': this.success } }))
44
- : '')), h("slot", null), h("slot", { name: "footer" })))));
45
- }
46
- get host() { return getElement(this); }
47
- static get watchers() { return {
48
- "visible": ["handleVisible"]
49
- }; }
50
- };
51
-
52
- export { SallaModal as salla_modal };
@@ -1 +0,0 @@
1
- import{r as a,h as l,g as e}from"./p-9f9af3e0.js";import{H as s}from"./p-520446eb.js";const n=class{constructor(l){a(this,l),s.setHost(this.host)}async show(){this.modal.setAttribute("visible","")}async hide(){this.modal.removeAttribute("visible")}submit(){this.hide().then((()=>{let a=s.val("[name=currency]:checked");if(a!==salla.config.currency.code)return salla.currency.api.change(a)})).then((()=>{let a=s.val("[name=lang]:checked");a!==salla.config.language.code&&(window.location.href=salla.config.languages.filter((l=>l.code===a))[0].url)}))}render(){return l("salla-modal",{id:"lang-currency-modal",class:"hidden"},l("slot",{name:"header"},l("div",{slot:"header"})),l("div",{class:"s-currency-language-inner"},salla.config.languages?l("div",{class:"s-currency-language-section"},l("label",{class:"s-currency-language-title"},salla.lang.get("common.titles.language")),l("fieldset",{class:"s-currency-language-fieldset"},l("legend",{class:"sr-only"},salla.lang.get("blocks.header.change_language")),l("div",{class:"s-currency-language-section-inner"},salla.config.languages.map((a=>l("div",{class:"flex items-center"},l("input",{id:"lang-"+a.code.toLowerCase(),class:"s-currency-language-input",name:"lang",checked:salla.config.language.code==a.code,type:"radio",value:a.code}),l("label",{htmlFor:"lang-"+a.code.toLowerCase(),class:"s-currency-language-label"},l("span",null,a.name),l("div",{class:"s-currency-language-flag flag iti__flag iti__"+a.country_code})))))))):"",salla.config.currencies?l("div",{class:"s-currency-language-section"},l("label",{class:"s-currency-language-title"},salla.lang.get("common.titles.currency")),l("fieldset",{class:"s-currency-language-fieldset"},l("legend",{class:"sr-only"},salla.lang.get("blocks.header.change_currency")),l("div",{class:"s-currency-language-section-inner"},salla.config.currencies.map((a=>l("div",{class:"s-currency-language-item"},l("input",{class:"s-currency-language-input",checked:salla.config.currency.code==a.code,id:"currency-"+a.code,name:"currency",type:"radio",value:a.code}),l("label",{class:"s-currency-language-label",htmlFor:"currency-"+a.code},l("span",null,a.name),l("small",{class:"s-currency-language-currency"},a.code)))))))):""),l("p",{slot:"footer"},l("slot",{name:"footer"},l("button",{type:"button",class:"s-currency-language-submit",onClick:()=>this.submit()},salla.lang.get("common.elements.ok")))))}componentDidRender(){this.modal=document.querySelector("#lang-currency-modal")}get host(){return e(this)}};export{n as salla_currency_language}
@@ -1 +0,0 @@
1
- import{r as s,h as t,H as a,g as i}from"./p-9f9af3e0.js";const e=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 a,i;if(this.hasProductTemplateSlot){let i=this.productTemplateHtml.replace("{title}",s.title).replace("{price}",null===(a=s.price)||void 0===a?void 0:a.after).replace("{url}",s.url).replace("{thumb}",s.thumb);return t("div",{class:"s-search-modal-product",innerHTML:i})}return t("div",{class:"s-search-modal-product"},t("a",{target:"_blank",href:s.url,class:"s-search-modal-product-image-container"},t("img",{class:"s-search-modal-product-image",src:s.thumb})),t("div",{class:"s-search-modal-product-details"},t("div",{class:"s-search-modal-product-title"},s.title),t("div",{class:"s-search-modal-product-price"},null===(i=s.price)||void 0===i?void 0:i.after)))}render(){return t(a,{class:"s-search-modal"},t("button",{type:"button",onClick:this.openSearch,class:"s-search-modal-search-button-icon"},this.hasSearchIconSlot?t("slot",{name:"search-icon"}):t("i",{class:"sicon-search font-bold"})),this.showModal&&t("div",{class:"s-search-modal-container",style:{backgroundColor:"rgba(0,0,0,0.5)"}},t("div",{class:"s-search-modal-wrapper",onClick:this.closeSearch},t("div",{class:"s-search-modal-inner",onClick:s=>{s.stopPropagation()}},t("div",{class:"s-search-modal-search-box-container"},t("div",{class:this.showResult?"s-search-modal-search-box-inner-open":"s-search-modal-search-box-inner"},t("input",{class:"s-search-modal-input",type:"text",placeholder:this.searchPlaceholder,value:this.searchTerm,onInput:s=>this.handleChange(s)}),"loading"!=this.fetchStatus?t("button",{class:"s-search-modal-search-icon"},t("i",{class:"sicon-search"})):t("span",{class:"s-search-modal-spinner"},t("span",{class:"s-search-modal-spinner-loader"})))),t("div",{class:"s-search-modal-search-results"},"error"===this.fetchStatus&&t("p",{class:"s-search-modal-no-results error p-4 text-sm text-gray-text"},this.noResultsText),this.results&&this.results.map((s=>this.getProduct(s))))))))}get hostElement(){return i(this)}};export{e as S}
@@ -1 +0,0 @@
1
- export{S as salla_login}from"./p-41dc89e6.js";import{r as s,c as t,h as a,H as i,g as e}from"./p-9f9af3e0.js";import{H as l}from"./p-520446eb.js";const o=class{constructor(a){s(this,a),this.ready=t(this,"ready",7),this.close=t(this,"close",7),this.error=!1,this.success=!1,this.visible=!1,this.subTitle="",this.icon="sicon-cancel"}handleVisible(s){return!0===s?this.show():this.hide()}show(){this.host.classList.remove("hidden"),setTimeout((()=>this.toggleModal(!0))),this.ready.emit()}hide(){this.toggleModal(!1),this.close.emit()}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)}render(){return this.host.id=this.host.id||"salla-modal",a(i,{class:"s-modal-container hidden","aria-modal":"true",role:"dialog"},a("div",{class:"s-modal-wrapper"},a("div",{class:"s-modal-overlay",onClick:()=>this.host.removeAttribute("visible")}),a("span",{class:"s-modal-spacer"},"​"),a("div",{class:"s-modal-body"},a("slot",{name:"header"},a("div",{class:"s-modal-header"},a("button",{class:"s-modal-close cursor-pointer",onClick:()=>this.host.removeAttribute("visible"),type:"button"},a("span",{class:"sicon-cancel"})),a("div",{class:"s-modal-title"},this.host.title),a("p",{class:"s-modal-sub-title"},this.subTitle),this.error||this.success?a("div",{class:{"s-modal-icon":!0,"bg-red-100":this.error,"bg-green-100":this.success}},a("i",{class:{[this.icon]:!0,"text-red-600":this.error,"text-green-600":this.success}})):"")),a("slot",null),a("slot",{name:"footer"}))))}get host(){return e(this)}static get watchers(){return{visible:["handleVisible"]}}};export{o as salla_modal}
@@ -1 +0,0 @@
1
- let t,e,l=!1,n=!1,o=!1,s=!1;const i="undefined"!=typeof window?window:{},r=i.document||{head:{}},c={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,l,n)=>t.addEventListener(e,l,n),rel:(t,e,l,n)=>t.removeEventListener(e,l,n),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),u={},f=t=>"object"==(t=typeof t)||"function"===t,$=(t,e,...l)=>{let n=null,o=null,s=!1,i=!1,r=[];const c=e=>{for(let l=0;l<e.length;l++)n=e[l],Array.isArray(n)?c(n):null!=n&&"boolean"!=typeof n&&((s="function"!=typeof t&&!f(n))&&(n+=""),s&&i?r[r.length-1].o+=n:r.push(s?d(null,n):n),i=s)};if(c(l),e){e.name&&(o=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const a=d(t,null);return a.i=e,r.length>0&&(a.u=r),a.$=o,a},d=(t,e)=>({t:0,m:t,o:e,h:null,u:null,i:null,$:null}),m={},b=(t,e,l,n,o,s)=>{if(l!==n){let r=X(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=p(l),s=p(n);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in l)n&&null!=n[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in n)l&&n[e]===l[e]||(e.includes("-")?t.style.setProperty(e,n[e]):t.style[e]=n[e])}else if(r||"o"!==e[0]||"n"!==e[1]){const i=f(n);if((r||i&&null!==n)&&!o)try{if(t.tagName.includes("-"))t[e]=n;else{let o=null==n?"":n;"list"===e?r=!1:null!=l&&t[e]==o||(t[e]=o)}}catch(t){}null==n||!1===n?!1===n&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||o)&&!i&&t.setAttribute(e,n=!0===n?"":n)}else e="-"===e[2]?e.slice(3):X(i,a)?a.slice(2):a[2]+e.slice(3),l&&c.rel(t,e,l,!1),n&&c.ael(t,e,n,!1)}},h=/\s/,p=t=>t?t.split(h):[],y=(t,e,l,n)=>{const o=11===e.h.nodeType&&e.h.host?e.h.host:e.h,s=t&&t.i||u,i=e.i||u;for(n in s)n in i||b(o,n,s[n],void 0,l,e.t);for(n in i)b(o,n,s[n],i[n],l,e.t)},w=(n,s,i)=>{let c,a,u,f=s.u[i],$=0;if(l||(o=!0,"slot"===f.m&&(f.t|=f.u?2:1)),null!==f.o)c=f.h=r.createTextNode(f.o);else if(1&f.t)c=f.h=r.createTextNode("");else if(c=f.h=r.createElement(2&f.t?"slot-fb":f.m),y(null,f,!1),f.u)for($=0;$<f.u.length;++$)a=w(n,f,$),a&&c.appendChild(a);return c["s-hn"]=e,3&f.t&&(c["s-sr"]=!0,c["s-cr"]=t,c["s-sn"]=f.$||"",u=n&&n.u&&n.u[i],u&&u.m===f.m&&n.h&&g(n.h,!1)),c},g=(t,l)=>{c.t|=1;const n=t.childNodes;for(let t=n.length-1;t>=0;t--){const s=n[t];s["s-hn"]!==e&&s["s-ol"]&&(M(s).insertBefore(s,O(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),l&&g(s,l)}c.t&=-2},j=(t,e,l,n,o,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(;o<=s;++o)n[o]&&(i=w(null,l,o),i&&(n[o].h=i,r.insertBefore(i,O(e))))},v=(t,e,l,o,s)=>{for(;e<=l;++e)(o=t[e])&&(n=!0,(s=o.h)["s-ol"]?s["s-ol"].remove():g(s,!0),s.remove())},k=(t,e)=>t.m===e.m&&("slot"!==t.m||t.$===e.$),O=t=>t&&t["s-ol"]||t,M=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,R=(t,e)=>{const l=e.h=t.h,n=t.u,o=e.u,s=e.o;let i;null===s?("slot"===e.m||y(t,e,!1),null!==n&&null!==o?((t,e,l,n)=>{let o,s=0,i=0,r=e.length-1,c=e[0],a=e[r],u=n.length-1,f=n[0],$=n[u];for(;s<=r&&i<=u;)null==c?c=e[++s]:null==a?a=e[--r]:null==f?f=n[++i]:null==$?$=n[--u]:k(c,f)?(R(c,f),c=e[++s],f=n[++i]):k(a,$)?(R(a,$),a=e[--r],$=n[--u]):k(c,$)?("slot"!==c.m&&"slot"!==$.m||g(c.h.parentNode,!1),R(c,$),t.insertBefore(c.h,a.h.nextSibling),c=e[++s],$=n[--u]):k(a,f)?("slot"!==c.m&&"slot"!==$.m||g(a.h.parentNode,!1),R(a,f),t.insertBefore(a.h,c.h),a=e[--r],f=n[++i]):(o=w(e&&e[i],l,i),f=n[++i],o&&M(c.h).insertBefore(o,O(c.h)));s>r?j(t,null==n[u+1]?null:n[u+1].h,l,n,i,u):i>u&&v(e,s,r)})(l,n,e,o):null!==o?(null!==t.o&&(l.textContent=""),j(l,null,e,o,0,o.length-1)):null!==n&&v(n,0,n.length-1)):(i=l["s-cr"])?i.parentNode.textContent=s:t.o!==s&&(l.data=s)},P=t=>{let e,l,n,o,s,i,r=t.childNodes;for(l=0,n=r.length;l<n;l++)if(e=r[l],1===e.nodeType){if(e["s-sr"])for(s=e["s-sn"],e.hidden=!1,o=0;o<n;o++)if(i=r[o].nodeType,r[o]["s-hn"]!==e["s-hn"]||""!==s){if(1===i&&s===r[o].getAttribute("slot")){e.hidden=!0;break}}else if(1===i||3===i&&""!==r[o].textContent.trim()){e.hidden=!0;break}P(e)}},T=[],x=t=>{let e,l,o,s,i,r,c=0,a=t.childNodes,u=a.length;for(;c<u;c++){if(e=a[c],e["s-sr"]&&(l=e["s-cr"])&&l.parentNode)for(o=l.parentNode.childNodes,s=e["s-sn"],r=o.length-1;r>=0;r--)l=o[r],l["s-cn"]||l["s-nr"]||l["s-hn"]===e["s-hn"]||(C(l,s)?(i=T.find((t=>t.p===l)),n=!0,l["s-sn"]=l["s-sn"]||s,i?i.g=e:T.push({g:e,p:l}),l["s-sr"]&&T.map((t=>{C(t.p,l["s-sn"])&&(i=T.find((t=>t.p===l)),i&&!t.g&&(t.g=i.g))}))):T.some((t=>t.p===l))||T.push({p:l}));1===e.nodeType&&x(e)}},C=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,E=t=>K(t).j,L=(t,e,l)=>{const n=E(t);return{emit:t=>A(n,e,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:t})}},A=(t,e,l)=>{const n=c.ce(e,l);return t.dispatchEvent(n),n},H=(t,e)=>{e&&!t.v&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.v=e)))},N=(t,e)=>{if(t.t|=16,!(4&t.t))return H(t,t.k),rt((()=>U(t,e)));t.t|=512},U=(t,e)=>{const l=t.O;let n;return e&&(n=V(l,"componentWillLoad")),_(n,(()=>W(t,l)))},W=async(t,e)=>{const l=t.j,n=l["s-rc"];q(t,e),n&&(n.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>D(t);0===e.length?n():(Promise.all(e).then(n),t.t|=4,e.length=0)}},q=(s,i)=>{try{i=i.render(),s.t&=-17,s.t|=2,((s,i)=>{const a=s.j,u=s.M,f=s.R||d(null,null),b=(t=>t&&t.m===m)(i)?i:$(null,null,i);if(e=a.tagName,u.P&&(b.i=b.i||{},u.P.map((([t,e])=>b.i[e]=a[t]))),b.m=null,b.t|=4,s.R=b,b.h=f.h=a,t=a["s-cr"],l=0!=(1&u.t),n=!1,R(f,b),c.t|=1,o){let t,e,l,n,o,s;x(b.h);let i=0;for(;i<T.length;i++)t=T[i],e=t.p,e["s-ol"]||(l=r.createTextNode(""),l["s-nr"]=e,e.parentNode.insertBefore(e["s-ol"]=l,e));for(i=0;i<T.length;i++)if(t=T[i],e=t.p,t.g){for(n=t.g.parentNode,o=t.g.nextSibling,l=e["s-ol"];l=l.previousSibling;)if(s=l["s-nr"],s&&s["s-sn"]===e["s-sn"]&&n===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&n!==e.parentNode||e.nextSibling!==o)&&e!==o&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),n.insertBefore(e,o))}else 1===e.nodeType&&(e.hidden=!0)}n&&P(b.h),c.t&=-2,T.length=0})(s,i)}catch(t){Y(t,s.j)}return null},D=t=>{const e=t.j,l=t.k;V(t.O,"componentDidRender"),64&t.t||(t.t|=64,z(e),t.T(e),l||F()),t.C(e),t.v&&(t.v(),t.v=void 0),512&t.t&&it((()=>N(t,!1))),t.t&=-517},F=()=>{z(r.documentElement),it((()=>A(i,"appload",{detail:{namespace:"twilight-components"}})))},V=(t,e,l)=>{if(t&&t[e])try{return t[e](l)}catch(t){Y(t)}},_=(t,e)=>t&&t.then?t.then(e):e(),z=t=>t.classList.add("hydrated"),B=(t,e,l)=>{if(e.L){t.watchers&&(e.A=t.watchers);const n=Object.entries(e.L),o=t.prototype;if(n.map((([t,[n]])=>{31&n||2&l&&32&n?Object.defineProperty(o,t,{get(){return((t,e)=>K(this).H.get(e))(0,t)},set(l){((t,e,l,n)=>{const o=K(t),s=o.j,i=o.H.get(e),r=o.t,c=o.O;if(l=((t,e)=>null==t||f(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t)(l,n.L[e][0]),!(8&r&&void 0!==i||l===i)&&(o.H.set(e,l),c)){if(n.A&&128&r){const t=n.A[e];t&&t.map((t=>{try{c[t](l,i,e)}catch(t){Y(t,s)}}))}2==(18&r)&&N(o,!1)}})(this,t,l,e)},configurable:!0,enumerable:!0}):1&l&&64&n&&Object.defineProperty(o,t,{value(...e){const l=K(this);return l.N.then((()=>l.O[t](...e)))}})})),1&l){const l=new Map;o.attributeChangedCallback=function(t,e,n){c.jmp((()=>{const e=l.get(t);this.hasOwnProperty(e)&&(n=this[e],delete this[e]),this[e]=(null!==n||"boolean"!=typeof this[e])&&n}))},t.observedAttributes=n.filter((([t,e])=>15&e[0])).map((([t,n])=>{const o=n[1]||t;return l.set(o,t),512&n[0]&&e.P.push([t,o]),o}))}}return t},G=t=>{const e=t["s-cr"]=r.createComment("");e["s-cn"]=!0,t.insertBefore(e,t.firstChild)},I=(t,e={})=>{const l=[],n=e.exclude||[],o=i.customElements,s=r.head,a=s.querySelector("meta[charset]"),u=r.createElement("style"),f=[];let $,d=!0;Object.assign(c,e),c.l=new URL(e.resourcesUrl||"./",r.baseURI).href,t.map((t=>t[1].map((e=>{const s={t:e[0],U:e[1],L:e[2],W:e[3]};s.L=e[2],s.P=[],s.A={};const i=s.U,r=class extends HTMLElement{constructor(t){super(t),S(t=this,s)}connectedCallback(){$&&(clearTimeout($),$=null),d?f.push(this):c.jmp((()=>(t=>{if(0==(1&c.t)){const e=K(t),l=e.M,n=()=>{};if(!(1&e.t)){e.t|=1,12&l.t&&G(t);{let l=t;for(;l=l.parentNode||l.host;)if(l["s-p"]){H(e,e.k=l);break}}l.L&&Object.entries(l.L).map((([e,[l]])=>{if(31&l&&t.hasOwnProperty(e)){const l=t[e];delete t[e],t[e]=l}})),(async(t,e,l,n,o)=>{if(0==(32&e.t)){if(e.t|=32,(o=tt(l)).then){const t=()=>{};o=await o,t()}o.isProxied||(l.A=o.watchers,B(o,l,2),o.isProxied=!0);const t=()=>{};e.t|=8;try{new o(e)}catch(t){Y(t)}e.t&=-9,e.t|=128,t()}const s=e.k,i=()=>N(e,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,e,l)}n()}})(this)))}disconnectedCallback(){c.jmp((()=>{}))}componentOnReady(){return K(this).q}};s.D=t[0],n.includes(i)||o.get(i)||(l.push(i),o.define(i,B(r,s,1)))})))),u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles",""),s.insertBefore(u,a?a.nextSibling:s.firstChild),d=!1,f.length?f.map((t=>t.connectedCallback())):c.jmp((()=>$=setTimeout(F,30)))},J=new WeakMap,K=t=>J.get(t),Q=(t,e)=>J.set(e.O=t,e),S=(t,e)=>{const l={t:0,j:t,M:e,H:new Map};return l.N=new Promise((t=>l.C=t)),l.q=new Promise((t=>l.T=t)),t["s-p"]=[],t["s-rc"]=[],J.set(t,l)},X=(t,e)=>e in t,Y=(t,e)=>(0,console.error)(t,e),Z=new Map,tt=t=>{const e=t.U.replace(/-/g,"_"),l=t.D,n=Z.get(l);return n?n[e]:import(`./${l}.entry.js`).then((t=>(Z.set(l,t),t[e])),Y)},et=[],lt=[],nt=(t,e)=>l=>{t.push(l),s||(s=!0,e&&4&c.t?it(st):c.raf(st))},ot=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){Y(t)}t.length=0},st=()=>{ot(et),ot(lt),(s=et.length>0)&&c.raf(st)},it=t=>a().then(t),rt=nt(lt,!0);export{m as H,I as b,L as c,E as g,$ as h,a as p,Q as r}
@@ -1 +0,0 @@
1
- export{S as salla_search}from"./p-58b1afae.js";import"./p-9f9af3e0.js";
@@ -1,10 +0,0 @@
1
- export declare class SallaCurrencyLanguage {
2
- constructor();
3
- private modal;
4
- host: HTMLElement;
5
- show(): Promise<void>;
6
- hide(): Promise<void>;
7
- private submit;
8
- render(): any;
9
- componentDidRender(): void;
10
- }