@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.
- package/dist/{esm → twilight-components}/Helper-d07ebbc7.js +0 -0
- package/dist/twilight-components/app-globals-0f993ce5.js +3 -0
- package/dist/twilight-components/css-shim-a64b8820.js +4 -0
- package/dist/twilight-components/dom-d08ba8aa.js +73 -0
- package/dist/twilight-components/index-9c087700.js +3010 -0
- package/dist/twilight-components/index.esm.js +4 -1
- package/dist/{esm → twilight-components}/salla-branches.entry.js +1 -1
- package/dist/twilight-components/salla-button.entry.js +75 -0
- package/dist/{esm → twilight-components}/salla-localization.entry.js +1 -1
- package/dist/{esm/salla-login-38586400.js → twilight-components/salla-login-57b18c2c.js} +1 -1
- package/dist/twilight-components/salla-login.entry.js +3 -0
- package/dist/twilight-components/salla-modal.entry.js +113 -0
- package/dist/twilight-components/salla-offer.entry.js +75 -0
- package/dist/{esm → twilight-components}/salla-product-availability.entry.js +1 -1
- package/dist/twilight-components/salla-rating.entry.js +228 -0
- package/dist/{esm/salla-search-ca856aab.js → twilight-components/salla-search-30fec1e8.js} +1 -1
- package/dist/twilight-components/salla-search.entry.js +3 -0
- package/dist/{esm/salla-button_5.entry.js → twilight-components/salla-tel-input.entry.js} +33 -294
- package/dist/twilight-components/salla-verify.entry.js +114 -0
- package/dist/twilight-components/shadow-css-bc14d9fd.js +389 -0
- package/dist/twilight-components/twilight-components.css +3 -1
- package/dist/twilight-components/twilight-components.esm.js +125 -1
- package/dist/types/components/salla-offer/offer-schema.d.ts +47 -0
- package/dist/types/components/salla-offer/salla-offer.d.ts +13 -48
- package/dist/types/components/salla-rating/order-feedback-response.d.ts +62 -0
- package/dist/types/components/salla-rating/salla-rating.d.ts +25 -23
- package/dist/types/components.d.ts +2 -10
- package/package.json +1 -1
- package/dist/cjs/Helper-fcea994c.js +0 -23
- package/dist/cjs/index-4b8b3ffe.js +0 -1696
- package/dist/cjs/index.cjs.js +0 -13
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/salla-branches.cjs.entry.js +0 -92
- package/dist/cjs/salla-button_5.cjs.entry.js +0 -1686
- package/dist/cjs/salla-localization.cjs.entry.js +0 -82
- package/dist/cjs/salla-login-008cc893.js +0 -125
- package/dist/cjs/salla-offer.cjs.entry.js +0 -50
- package/dist/cjs/salla-product-availability.cjs.entry.js +0 -75
- package/dist/cjs/salla-rating.cjs.entry.js +0 -300
- package/dist/cjs/salla-search-c7aad59a.js +0 -81
- package/dist/cjs/salla-search.cjs.entry.js +0 -11
- package/dist/cjs/twilight-components.cjs.js +0 -19
- package/dist/collection/Helpers/Helper.js +0 -19
- package/dist/collection/collection-manifest.json +0 -22
- package/dist/collection/components/generate-summary.js +0 -35
- package/dist/collection/components/salla-branches/salla-branches.css +0 -12
- package/dist/collection/components/salla-branches/salla-branches.js +0 -233
- package/dist/collection/components/salla-button/salla-button.css +0 -3
- package/dist/collection/components/salla-button/salla-button.js +0 -246
- package/dist/collection/components/salla-localization/salla-localization.js +0 -208
- package/dist/collection/components/salla-login/salla-login.css +0 -3
- package/dist/collection/components/salla-login/salla-login.js +0 -378
- package/dist/collection/components/salla-modal/salla-modal.js +0 -459
- package/dist/collection/components/salla-offer/salla-offer.js +0 -81
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +0 -331
- package/dist/collection/components/salla-rating/salla-rating.css +0 -7
- package/dist/collection/components/salla-rating/salla-rating.js +0 -483
- package/dist/collection/components/salla-search/salla-search.js +0 -132
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +0 -14
- package/dist/collection/components/salla-verify/salla-verify.js +0 -273
- package/dist/collection/index.js +0 -2
- package/dist/collection/interfaces/colors.js +0 -1
- package/dist/collection/interfaces/index.js +0 -2
- package/dist/collection/interfaces/ratio.js +0 -1
- package/dist/collection/plugins/tailwind-theme/generator.js +0 -62
- package/dist/collection/plugins/tailwind-theme/index.js +0 -26
- package/dist/esm/index-092659c7.js +0 -1668
- package/dist/esm/index.js +0 -4
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/salla-offer.entry.js +0 -46
- package/dist/esm/salla-rating.entry.js +0 -296
- package/dist/esm/salla-search.entry.js +0 -3
- package/dist/esm/twilight-components.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/twilight-components/p-03d0ec44.entry.js +0 -1
- package/dist/twilight-components/p-13a55257.entry.js +0 -1
- package/dist/twilight-components/p-160062c6.js +0 -1
- package/dist/twilight-components/p-47f17d3b.js +0 -1
- package/dist/twilight-components/p-5307c7b5.entry.js +0 -1
- package/dist/twilight-components/p-6a1f43c6.entry.js +0 -1
- package/dist/twilight-components/p-7088e517.entry.js +0 -1
- package/dist/twilight-components/p-924e3c88.js +0 -1
- package/dist/twilight-components/p-e8965b01.js +0 -1
- package/dist/twilight-components/p-ecb1b6cc.entry.js +0 -1
- package/dist/twilight-components/p-f11b401a.entry.js +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default interface OrderFeedbackResponse {
|
|
2
|
+
id: number;
|
|
3
|
+
store: {
|
|
4
|
+
feedback: {
|
|
5
|
+
content: string;
|
|
6
|
+
rating: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
shipping: {
|
|
10
|
+
feedback: {
|
|
11
|
+
content: string;
|
|
12
|
+
rating: number;
|
|
13
|
+
};
|
|
14
|
+
company: {
|
|
15
|
+
id: number;
|
|
16
|
+
name: string;
|
|
17
|
+
logo: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
products: ProductFeedback[];
|
|
21
|
+
testimonials_enabled: boolean;
|
|
22
|
+
shipping_enabled: boolean;
|
|
23
|
+
products_enabled: boolean;
|
|
24
|
+
thanks_message: string;
|
|
25
|
+
allowed_ratings: {
|
|
26
|
+
products_enabled: boolean;
|
|
27
|
+
shipping_enabled: boolean;
|
|
28
|
+
testimonials_enabled: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface ProductFeedback {
|
|
32
|
+
feedback: {
|
|
33
|
+
content: string;
|
|
34
|
+
rating: number;
|
|
35
|
+
status: string;
|
|
36
|
+
};
|
|
37
|
+
product: {
|
|
38
|
+
id: number;
|
|
39
|
+
type: string;
|
|
40
|
+
promotion: {
|
|
41
|
+
title?: string;
|
|
42
|
+
sub_title?: string;
|
|
43
|
+
};
|
|
44
|
+
status: string;
|
|
45
|
+
is_available: boolean;
|
|
46
|
+
sku: string;
|
|
47
|
+
name: string;
|
|
48
|
+
price: Price;
|
|
49
|
+
sale_price: Price;
|
|
50
|
+
currency: string;
|
|
51
|
+
url: string;
|
|
52
|
+
thumbnail: string;
|
|
53
|
+
has_special_price: boolean;
|
|
54
|
+
regular_price: Price;
|
|
55
|
+
favorite: any;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
interface Price {
|
|
59
|
+
amount: number;
|
|
60
|
+
currency: string;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -1,49 +1,51 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import OrderFeedbackResponse from "./order-feedback-response";
|
|
1
3
|
export declare class SallaRating {
|
|
2
4
|
constructor();
|
|
3
|
-
order:
|
|
4
|
-
/**
|
|
5
|
-
* Ratted order Id
|
|
6
|
-
*/
|
|
7
|
-
orderId: number;
|
|
5
|
+
order: OrderFeedbackResponse | undefined;
|
|
8
6
|
/**
|
|
9
7
|
* Display this message after sending user feedback
|
|
10
|
-
|
|
8
|
+
*/
|
|
11
9
|
thanksMsg: string;
|
|
12
10
|
/**
|
|
13
11
|
* Set to true to display store rating step
|
|
14
|
-
|
|
12
|
+
*/
|
|
15
13
|
isStoreRating: boolean;
|
|
16
14
|
/**
|
|
17
15
|
* Set to true to display products rating step
|
|
18
|
-
|
|
16
|
+
*/
|
|
19
17
|
isProductsRating: boolean;
|
|
20
18
|
/**
|
|
21
19
|
* Set to true to display shipping rating step
|
|
22
|
-
|
|
20
|
+
*/
|
|
23
21
|
isShippingRating: boolean;
|
|
24
|
-
private ratingChain;
|
|
25
22
|
private stepsCount;
|
|
26
23
|
private nextBtn;
|
|
27
24
|
private modal;
|
|
25
|
+
private currentIndex;
|
|
26
|
+
private currentTab;
|
|
27
|
+
private thanksTab;
|
|
28
|
+
private body;
|
|
29
|
+
private thanksTime;
|
|
30
|
+
private steps;
|
|
31
|
+
private dots;
|
|
28
32
|
host: HTMLElement;
|
|
29
|
-
show(): Promise<
|
|
33
|
+
show(): Promise<NodeJS.Timeout>;
|
|
30
34
|
hide(): Promise<HTMLElement>;
|
|
31
|
-
|
|
32
|
-
componentDidRender(): void;
|
|
33
|
-
initiateRating(): void;
|
|
35
|
+
protected initiateRating(): void;
|
|
34
36
|
private handleWizard;
|
|
35
37
|
private showActiveStep;
|
|
36
|
-
private setModalHeight;
|
|
37
|
-
private handleSubmitRating;
|
|
38
38
|
private starsRating;
|
|
39
39
|
private highlightSelectedStars;
|
|
40
|
-
private sendRating;
|
|
41
40
|
private sendFeedback;
|
|
42
|
-
private
|
|
41
|
+
private submit;
|
|
42
|
+
private validate;
|
|
43
|
+
private showThankYou;
|
|
44
|
+
private renderStoreRating;
|
|
45
|
+
private renderShippingRating;
|
|
46
|
+
private renderProductsRating;
|
|
47
|
+
private renderThanksView;
|
|
48
|
+
private getStarsRating;
|
|
43
49
|
render(): any;
|
|
44
|
-
|
|
45
|
-
renderShippingRating(): any;
|
|
46
|
-
renderProductsRating(): any;
|
|
47
|
-
renderThanksView(): any;
|
|
48
|
-
getStarsRating(size: any): any;
|
|
50
|
+
componentDidRender(): void;
|
|
49
51
|
}
|
|
@@ -66,7 +66,7 @@ export namespace Components {
|
|
|
66
66
|
"width": 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
67
67
|
}
|
|
68
68
|
interface SallaOffer {
|
|
69
|
-
"show": (productId: number) => Promise<
|
|
69
|
+
"show": (productId: number) => Promise<any>;
|
|
70
70
|
}
|
|
71
71
|
interface SallaProductAvailability {
|
|
72
72
|
"buttonText": string;
|
|
@@ -98,11 +98,7 @@ export namespace Components {
|
|
|
98
98
|
* Set to true to display store rating step
|
|
99
99
|
*/
|
|
100
100
|
"isStoreRating": boolean;
|
|
101
|
-
|
|
102
|
-
* Ratted order Id
|
|
103
|
-
*/
|
|
104
|
-
"orderId": number;
|
|
105
|
-
"show": () => Promise<HTMLElement>;
|
|
101
|
+
"show": () => Promise<NodeJS.Timeout>;
|
|
106
102
|
/**
|
|
107
103
|
* Display this message after sending user feedback
|
|
108
104
|
*/
|
|
@@ -291,10 +287,6 @@ declare namespace LocalJSX {
|
|
|
291
287
|
* Set to true to display store rating step
|
|
292
288
|
*/
|
|
293
289
|
"isStoreRating"?: boolean;
|
|
294
|
-
/**
|
|
295
|
-
* Ratted order Id
|
|
296
|
-
*/
|
|
297
|
-
"orderId"?: number;
|
|
298
290
|
/**
|
|
299
291
|
* Display this message after sending user feedback
|
|
300
292
|
*/
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
class Helper extends salla.AppHelpers {
|
|
4
|
-
setHost(host) {
|
|
5
|
-
this.host = host;
|
|
6
|
-
}
|
|
7
|
-
getElement(selector) {
|
|
8
|
-
return this.host.querySelector(selector);
|
|
9
|
-
}
|
|
10
|
-
getAttribute(selector, attribute) {
|
|
11
|
-
var _a;
|
|
12
|
-
return (_a = this.getElement(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(attribute);
|
|
13
|
-
}
|
|
14
|
-
val(selector) {
|
|
15
|
-
return this.getAttribute(selector, 'value');
|
|
16
|
-
}
|
|
17
|
-
isUser() {
|
|
18
|
-
return salla.config.get('user.type') === 'user';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const Helper$1 = new Helper;
|
|
22
|
-
|
|
23
|
-
exports.Helper = Helper$1;
|