@salla.sa/twilight-components 1.0.19 → 1.0.21

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 (92) hide show
  1. package/dist/{esm → twilight-components}/Helper-d07ebbc7.js +0 -0
  2. package/dist/twilight-components/app-globals-0f993ce5.js +3 -0
  3. package/dist/twilight-components/css-shim-a64b8820.js +4 -0
  4. package/dist/twilight-components/dom-d08ba8aa.js +73 -0
  5. package/dist/twilight-components/index-9c087700.js +3010 -0
  6. package/dist/twilight-components/index.esm.js +4 -1
  7. package/dist/{esm → twilight-components}/salla-branches.entry.js +1 -1
  8. package/dist/twilight-components/salla-button.entry.js +75 -0
  9. package/dist/{esm → twilight-components}/salla-localization.entry.js +1 -1
  10. package/dist/{esm/salla-login-38586400.js → twilight-components/salla-login-57b18c2c.js} +1 -1
  11. package/dist/twilight-components/salla-login.entry.js +3 -0
  12. package/dist/twilight-components/salla-modal.entry.js +113 -0
  13. package/dist/twilight-components/salla-offer.entry.js +75 -0
  14. package/dist/{esm → twilight-components}/salla-product-availability.entry.js +1 -1
  15. package/dist/twilight-components/salla-rating.entry.js +228 -0
  16. package/dist/{esm/salla-search-ca856aab.js → twilight-components/salla-search-30fec1e8.js} +1 -1
  17. package/dist/twilight-components/salla-search.entry.js +3 -0
  18. package/dist/{esm/salla-button_5.entry.js → twilight-components/salla-tel-input.entry.js} +33 -294
  19. package/dist/twilight-components/salla-verify.entry.js +114 -0
  20. package/dist/twilight-components/shadow-css-bc14d9fd.js +389 -0
  21. package/dist/twilight-components/twilight-components.css +3 -1
  22. package/dist/twilight-components/twilight-components.esm.js +125 -1
  23. package/dist/types/components/salla-offer/offer-schema.d.ts +47 -0
  24. package/dist/types/components/salla-offer/salla-offer.d.ts +13 -48
  25. package/dist/types/components/salla-rating/order-feedback-response.d.ts +62 -0
  26. package/dist/types/components/salla-rating/salla-rating.d.ts +25 -23
  27. package/dist/types/components.d.ts +2 -10
  28. package/package.json +1 -1
  29. package/dist/cjs/Helper-fcea994c.js +0 -23
  30. package/dist/cjs/index-4b8b3ffe.js +0 -1696
  31. package/dist/cjs/index.cjs.js +0 -13
  32. package/dist/cjs/loader.cjs.js +0 -21
  33. package/dist/cjs/salla-branches.cjs.entry.js +0 -92
  34. package/dist/cjs/salla-button_5.cjs.entry.js +0 -1686
  35. package/dist/cjs/salla-localization.cjs.entry.js +0 -82
  36. package/dist/cjs/salla-login-008cc893.js +0 -125
  37. package/dist/cjs/salla-offer.cjs.entry.js +0 -50
  38. package/dist/cjs/salla-product-availability.cjs.entry.js +0 -75
  39. package/dist/cjs/salla-rating.cjs.entry.js +0 -300
  40. package/dist/cjs/salla-search-c7aad59a.js +0 -81
  41. package/dist/cjs/salla-search.cjs.entry.js +0 -11
  42. package/dist/cjs/twilight-components.cjs.js +0 -19
  43. package/dist/collection/Helpers/Helper.js +0 -19
  44. package/dist/collection/collection-manifest.json +0 -22
  45. package/dist/collection/components/generate-summary.js +0 -35
  46. package/dist/collection/components/salla-branches/salla-branches.css +0 -12
  47. package/dist/collection/components/salla-branches/salla-branches.js +0 -233
  48. package/dist/collection/components/salla-button/salla-button.css +0 -3
  49. package/dist/collection/components/salla-button/salla-button.js +0 -246
  50. package/dist/collection/components/salla-localization/salla-localization.js +0 -208
  51. package/dist/collection/components/salla-login/salla-login.css +0 -3
  52. package/dist/collection/components/salla-login/salla-login.js +0 -378
  53. package/dist/collection/components/salla-modal/salla-modal.js +0 -459
  54. package/dist/collection/components/salla-offer/salla-offer.js +0 -81
  55. package/dist/collection/components/salla-product-availability/salla-product-availability.js +0 -331
  56. package/dist/collection/components/salla-rating/salla-rating.css +0 -7
  57. package/dist/collection/components/salla-rating/salla-rating.js +0 -483
  58. package/dist/collection/components/salla-search/salla-search.js +0 -132
  59. package/dist/collection/components/salla-tel-input/salla-tel-input.js +0 -14
  60. package/dist/collection/components/salla-verify/salla-verify.js +0 -273
  61. package/dist/collection/index.js +0 -2
  62. package/dist/collection/interfaces/colors.js +0 -1
  63. package/dist/collection/interfaces/index.js +0 -2
  64. package/dist/collection/interfaces/ratio.js +0 -1
  65. package/dist/collection/plugins/tailwind-theme/generator.js +0 -62
  66. package/dist/collection/plugins/tailwind-theme/index.js +0 -26
  67. package/dist/esm/index-092659c7.js +0 -1668
  68. package/dist/esm/index.js +0 -4
  69. package/dist/esm/loader.js +0 -17
  70. package/dist/esm/polyfills/core-js.js +0 -11
  71. package/dist/esm/polyfills/css-shim.js +0 -1
  72. package/dist/esm/polyfills/dom.js +0 -79
  73. package/dist/esm/polyfills/es5-html-element.js +0 -1
  74. package/dist/esm/polyfills/index.js +0 -34
  75. package/dist/esm/polyfills/system.js +0 -6
  76. package/dist/esm/salla-offer.entry.js +0 -46
  77. package/dist/esm/salla-rating.entry.js +0 -296
  78. package/dist/esm/salla-search.entry.js +0 -3
  79. package/dist/esm/twilight-components.js +0 -17
  80. package/dist/index.cjs.js +0 -1
  81. package/dist/index.js +0 -1
  82. package/dist/twilight-components/p-03d0ec44.entry.js +0 -1
  83. package/dist/twilight-components/p-13a55257.entry.js +0 -1
  84. package/dist/twilight-components/p-160062c6.js +0 -1
  85. package/dist/twilight-components/p-47f17d3b.js +0 -1
  86. package/dist/twilight-components/p-5307c7b5.entry.js +0 -1
  87. package/dist/twilight-components/p-6a1f43c6.entry.js +0 -1
  88. package/dist/twilight-components/p-7088e517.entry.js +0 -1
  89. package/dist/twilight-components/p-924e3c88.js +0 -1
  90. package/dist/twilight-components/p-e8965b01.js +0 -1
  91. package/dist/twilight-components/p-ecb1b6cc.entry.js +0 -1
  92. package/dist/twilight-components/p-f11b401a.entry.js +0 -1
@@ -1,331 +0,0 @@
1
- import { Component, Host, h, Prop, Watch, Element, Method } from '@stencil/core';
2
- import Helper from "../../Helpers/Helper";
3
- export class SallaProductAvailability {
4
- constructor() {
5
- this.isUser = Helper.isUser();
6
- this.buttonText = salla.lang.get('pages.products.notify_availability');
7
- this.countryCode = salla.config.country_code || 'SA';
8
- this.subscribeText = salla.lang.get('common.elements.submit');
9
- this.cancelText = salla.lang.get('common.elements.cancel');
10
- this.subTitle = salla.lang.get('pages.products.notify_availability_subtitle');
11
- this.mobileLabel = salla.lang.get('common.elements.mobile');
12
- this.emailLabel = salla.lang.get('common.elements.email');
13
- this.mobilePlaceholder = salla.lang.get('common.elements.mobile_placeholder');
14
- this.emailPlaceholder = salla.lang.get('common.elements.email_placeholder');
15
- this.productId = salla.config.page.id;
16
- this.subscribedMessage = salla.lang.get('pages.products.notify_availability_success');
17
- this.isSubscribed = false;
18
- if (this.isUser) {
19
- return;
20
- }
21
- this.channelsWatcher(this.channels);
22
- this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
23
- this.host.removeAttribute('title');
24
- }
25
- channelsWatcher(newValue) {
26
- this.channels_ = newValue.split(',');
27
- }
28
- async submit() {
29
- if (this.isUser) {
30
- return salla.api.product.availabilitySubscribe(this.productId)
31
- .then(() => this.isSubscribed = true);
32
- }
33
- let data = { id: this.productId, country_code: this.countryCode };
34
- if (this.mobile.value !== '') {
35
- data['mobile'] = this.mobile.value;
36
- }
37
- if (this.email.value !== '') {
38
- data['email'] = this.email.value;
39
- }
40
- return this.btn.load()
41
- .then(() => this.btn.disable())
42
- .then(() => salla.api.product.availabilitySubscribe(data))
43
- .then(() => this.isSubscribed = true) //no need to wait until finishing alert animation
44
- .then(() => this.btn.stop())
45
- .then(() => this.modal.hide())
46
- .catch(() => this.btn.stop() && this.btn.enable());
47
- }
48
- render() {
49
- return (h(Host, null,
50
- this.isSubscribed
51
- ? h("div", { class: "s-product-availability-subscribed" }, this.subscribedMessage)
52
- : h("slot", null,
53
- h("salla-button", { wide: true, onClick: () => this.isUser ? this.submit() : this.modal.show() }, this.buttonText)),
54
- this.isUser || this.isSubscribed ? '' : this.renderModal()));
55
- }
56
- renderModal() {
57
- return (h("salla-modal", { ref: modal => this.modal = modal, title: this.title_, subTitle: this.subTitle, icon: "sicon-bell-ring", width: "md" },
58
- h("div", { class: "s-product-availability-body" },
59
- this.channels_.includes('email') ? [
60
- h("label", { class: "s-product-availability-label" }, this.emailLabel),
61
- h("input", { class: "s-product-availability-input", placeholder: this.emailPlaceholder, ref: el => this.email = el, type: "email" })
62
- ] : '',
63
- this.channels_.includes('sms') ? [
64
- h("label", { class: "s-product-availability-label" }, this.mobileLabel),
65
- h("input", { class: "s-product-availability-input", placeholder: this.mobilePlaceholder, ref: el => this.mobile = el, type: "text" }),
66
- h("input", { type: "hidden", value: this.countryCode }),
67
- ] : ''),
68
- h("div", { slot: "footer", class: "s-product-availability-footer" },
69
- h("salla-button", { wide: true, ref: btn => this.btn = btn, onClick: () => this.submit() }, this.subscribeText),
70
- h("salla-button", { wide: true, "btn-style": "outline" }, this.cancelText))));
71
- }
72
- static get is() { return "salla-product-availability"; }
73
- static get properties() { return {
74
- "channels": {
75
- "type": "string",
76
- "mutable": false,
77
- "complexType": {
78
- "original": "string",
79
- "resolved": "string",
80
- "references": {}
81
- },
82
- "required": false,
83
- "optional": false,
84
- "docs": {
85
- "tags": [],
86
- "text": ""
87
- },
88
- "attribute": "channels",
89
- "reflect": false
90
- },
91
- "buttonText": {
92
- "type": "string",
93
- "mutable": false,
94
- "complexType": {
95
- "original": "string",
96
- "resolved": "string",
97
- "references": {}
98
- },
99
- "required": false,
100
- "optional": false,
101
- "docs": {
102
- "tags": [],
103
- "text": ""
104
- },
105
- "attribute": "button-text",
106
- "reflect": false,
107
- "defaultValue": "salla.lang.get('pages.products.notify_availability')"
108
- },
109
- "countryCode": {
110
- "type": "string",
111
- "mutable": false,
112
- "complexType": {
113
- "original": "string",
114
- "resolved": "string",
115
- "references": {}
116
- },
117
- "required": false,
118
- "optional": false,
119
- "docs": {
120
- "tags": [],
121
- "text": ""
122
- },
123
- "attribute": "country-code",
124
- "reflect": false,
125
- "defaultValue": "salla.config.country_code || 'SA'"
126
- },
127
- "subscribeText": {
128
- "type": "string",
129
- "mutable": false,
130
- "complexType": {
131
- "original": "string",
132
- "resolved": "string",
133
- "references": {}
134
- },
135
- "required": false,
136
- "optional": false,
137
- "docs": {
138
- "tags": [],
139
- "text": ""
140
- },
141
- "attribute": "subscribe-text",
142
- "reflect": false,
143
- "defaultValue": "salla.lang.get('common.elements.submit')"
144
- },
145
- "cancelText": {
146
- "type": "string",
147
- "mutable": false,
148
- "complexType": {
149
- "original": "string",
150
- "resolved": "string",
151
- "references": {}
152
- },
153
- "required": false,
154
- "optional": false,
155
- "docs": {
156
- "tags": [],
157
- "text": ""
158
- },
159
- "attribute": "cancel-text",
160
- "reflect": false,
161
- "defaultValue": "salla.lang.get('common.elements.cancel')"
162
- },
163
- "subTitle": {
164
- "type": "string",
165
- "mutable": false,
166
- "complexType": {
167
- "original": "string",
168
- "resolved": "string",
169
- "references": {}
170
- },
171
- "required": false,
172
- "optional": false,
173
- "docs": {
174
- "tags": [],
175
- "text": ""
176
- },
177
- "attribute": "sub-title",
178
- "reflect": false,
179
- "defaultValue": "salla.lang.get('pages.products.notify_availability_subtitle')"
180
- },
181
- "mobileLabel": {
182
- "type": "string",
183
- "mutable": false,
184
- "complexType": {
185
- "original": "string",
186
- "resolved": "string",
187
- "references": {}
188
- },
189
- "required": false,
190
- "optional": false,
191
- "docs": {
192
- "tags": [],
193
- "text": ""
194
- },
195
- "attribute": "mobile-label",
196
- "reflect": false,
197
- "defaultValue": "salla.lang.get('common.elements.mobile')"
198
- },
199
- "emailLabel": {
200
- "type": "string",
201
- "mutable": false,
202
- "complexType": {
203
- "original": "string",
204
- "resolved": "string",
205
- "references": {}
206
- },
207
- "required": false,
208
- "optional": false,
209
- "docs": {
210
- "tags": [],
211
- "text": ""
212
- },
213
- "attribute": "email-label",
214
- "reflect": false,
215
- "defaultValue": "salla.lang.get('common.elements.email')"
216
- },
217
- "mobilePlaceholder": {
218
- "type": "string",
219
- "mutable": false,
220
- "complexType": {
221
- "original": "string",
222
- "resolved": "string",
223
- "references": {}
224
- },
225
- "required": false,
226
- "optional": false,
227
- "docs": {
228
- "tags": [],
229
- "text": ""
230
- },
231
- "attribute": "mobile-placeholder",
232
- "reflect": false,
233
- "defaultValue": "salla.lang.get('common.elements.mobile_placeholder')"
234
- },
235
- "emailPlaceholder": {
236
- "type": "string",
237
- "mutable": false,
238
- "complexType": {
239
- "original": "string",
240
- "resolved": "string",
241
- "references": {}
242
- },
243
- "required": false,
244
- "optional": false,
245
- "docs": {
246
- "tags": [],
247
- "text": ""
248
- },
249
- "attribute": "email-placeholder",
250
- "reflect": false,
251
- "defaultValue": "salla.lang.get('common.elements.email_placeholder')"
252
- },
253
- "productId": {
254
- "type": "number",
255
- "mutable": false,
256
- "complexType": {
257
- "original": "number",
258
- "resolved": "number",
259
- "references": {}
260
- },
261
- "required": false,
262
- "optional": false,
263
- "docs": {
264
- "tags": [],
265
- "text": ""
266
- },
267
- "attribute": "product-id",
268
- "reflect": false,
269
- "defaultValue": "salla.config.page.id"
270
- },
271
- "subscribedMessage": {
272
- "type": "string",
273
- "mutable": false,
274
- "complexType": {
275
- "original": "string",
276
- "resolved": "string",
277
- "references": {}
278
- },
279
- "required": false,
280
- "optional": false,
281
- "docs": {
282
- "tags": [],
283
- "text": ""
284
- },
285
- "attribute": "subscribed-message",
286
- "reflect": false,
287
- "defaultValue": "salla.lang.get('pages.products.notify_availability_success')"
288
- },
289
- "isSubscribed": {
290
- "type": "boolean",
291
- "mutable": true,
292
- "complexType": {
293
- "original": "boolean",
294
- "resolved": "boolean",
295
- "references": {}
296
- },
297
- "required": false,
298
- "optional": false,
299
- "docs": {
300
- "tags": [],
301
- "text": ""
302
- },
303
- "attribute": "is-subscribed",
304
- "reflect": false,
305
- "defaultValue": "false"
306
- }
307
- }; }
308
- static get methods() { return {
309
- "submit": {
310
- "complexType": {
311
- "signature": "() => Promise<any>",
312
- "parameters": [],
313
- "references": {
314
- "Promise": {
315
- "location": "global"
316
- }
317
- },
318
- "return": "Promise<any>"
319
- },
320
- "docs": {
321
- "text": "",
322
- "tags": []
323
- }
324
- }
325
- }; }
326
- static get elementRef() { return "host"; }
327
- static get watchers() { return [{
328
- "propName": "channels",
329
- "methodName": "channelsWatcher"
330
- }]; }
331
- }
@@ -1,7 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
- .unicode{
6
- unicode-bidi: plaintext;
7
- }