adp-web-components 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Loading-14fca13b.js → Loading-6f4f0127.js} +1 -1
- package/dist/cjs/dead-stock-lookup.cjs.entry.js +5 -5
- package/dist/cjs/distributor-lookup.cjs.entry.js +5 -5
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +139 -71
- package/dist/cjs/dynamic-redeem.cjs.entry.js +21 -9
- package/dist/cjs/form-input.cjs.entry.js +1 -1
- package/dist/cjs/general-inquiry-form.cjs.entry.js +5 -2131
- package/dist/cjs/get-local-language-42973450.js +153 -0
- package/dist/cjs/{index-97b8da6d.js → index-846c93d2.js} +6 -1
- package/dist/cjs/index.esm-c628daeb.js +2135 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +5 -5
- package/dist/cjs/{partInformation-07651204.js → partInformation-2b4e0593.js} +1 -1
- package/dist/cjs/shift-components.cjs.js +2 -2
- package/dist/cjs/vehicle-lookup.cjs.entry.js +6 -5
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
- package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +2 -2
- package/dist/collection/components/vehicle-lookup/components/CardsContainer.js +3 -2
- package/dist/collection/components/vehicle-lookup/components/SSCTable.js +3 -2
- package/dist/collection/components/vehicle-lookup/components/StatusCard.js +2 -2
- package/dist/collection/components/vehicle-lookup/dynamic-claim.css +1 -1
- package/dist/collection/components/vehicle-lookup/dynamic-claim.js +53 -13
- package/dist/collection/components/vehicle-lookup/dynamic-redeem.css +1 -1
- package/dist/collection/components/vehicle-lookup/dynamic-redeem.js +49 -10
- package/dist/collection/components/vehicle-lookup/paint-thickness.js +47 -8
- package/dist/collection/components/vehicle-lookup/service-history.js +42 -3
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +48 -9
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +44 -19
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +42 -3
- package/dist/collection/components/vehicle-lookup/warranty-details.js +76 -38
- package/dist/collection/global/api/partInformation.js +1 -1
- package/dist/collection/global/api/vehicleInformation.js +2 -2
- package/dist/collection/global/lib/get-local-language.js +19 -0
- package/dist/collection/global/types/locales/error-schema.js +9 -0
- package/dist/collection/global/types/locales/index.js +22 -0
- package/dist/collection/global/types/locales/vehicle-lookup/accessories-schema.js +13 -0
- package/dist/collection/global/types/locales/vehicle-lookup/dynamic-claim-schema.js +21 -0
- package/dist/collection/global/types/locales/vehicle-lookup/dynamic-redeem-schema.js +28 -0
- package/dist/collection/global/types/locales/vehicle-lookup/index.js +21 -0
- package/dist/collection/global/types/locales/vehicle-lookup/paint-thickness-schema.js +14 -0
- package/dist/collection/global/types/locales/vehicle-lookup/service-history-schema.js +15 -0
- package/dist/collection/global/types/locales/vehicle-lookup/specification-schema.js +14 -0
- package/dist/collection/global/types/locales/vehicle-lookup/warranty-schema.js +23 -0
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/dynamic-claim.js +1 -1
- package/dist/components/dynamic-redeem.js +1 -1
- package/dist/components/form-input.js +1 -1
- package/dist/components/general-inquiry-form.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/p-0ae60f32.js +5 -0
- package/dist/components/p-1a626dfd.js +5 -0
- package/dist/components/{p-4bf4435e.js → p-1d80419b.js} +1 -1
- package/dist/components/p-1ea3089a.js +5 -0
- package/dist/components/p-2e747eb3.js +5 -0
- package/dist/components/p-4f99745c.js +5 -0
- package/dist/components/{p-c4fad245.js → p-609c2470.js} +1 -1
- package/dist/components/p-6c064413.js +5 -0
- package/dist/components/p-7360f9b1.js +5 -0
- package/dist/components/p-79ea7639.js +5 -0
- package/dist/components/p-a21e2e2e.js +5 -0
- package/dist/components/{p-be0a5ab5.js → p-b2051f01.js} +1 -1
- package/dist/components/p-e446fb9d.js +5 -0
- package/dist/components/p-eb89583a.js +5 -0
- package/dist/components/{p-b90fd51c.js → p-f001d15b.js} +1 -1
- package/dist/components/p-f691e103.js +5 -0
- package/dist/components/paint-thickness.js +1 -1
- package/dist/components/service-history.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/{Loading-2b8a745c.js → Loading-f4d666ee.js} +1 -1
- package/dist/esm/dead-stock-lookup.entry.js +5 -5
- package/dist/esm/distributor-lookup.entry.js +5 -5
- package/dist/esm/dynamic-claim_6.entry.js +139 -71
- package/dist/esm/dynamic-redeem.entry.js +21 -9
- package/dist/esm/form-input.entry.js +1 -1
- package/dist/esm/general-inquiry-form.entry.js +2 -2128
- package/dist/esm/get-local-language-85ed0b3b.js +150 -0
- package/dist/esm/{index-ff1dab22.js → index-33ae6859.js} +6 -1
- package/dist/esm/index.esm-46e0cdad.js +2132 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/manufacturer-lookup.entry.js +5 -5
- package/dist/esm/{partInformation-096a8f55.js → partInformation-f40b1fe6.js} +1 -1
- package/dist/esm/shift-components.js +3 -3
- package/dist/esm/vehicle-lookup.entry.js +6 -5
- package/dist/locales/ar.json +105 -0
- package/dist/locales/en.json +105 -0
- package/dist/locales/ku.json +105 -0
- package/dist/shift-components/p-062cd94b.entry.js +5 -0
- package/dist/shift-components/p-0e0b69a1.entry.js +5 -0
- package/dist/shift-components/{p-f37b60d5.js → p-0f0e54c1.js} +2 -2
- package/dist/shift-components/p-10aae582.entry.js +5 -0
- package/dist/shift-components/p-1de8531d.entry.js +5 -0
- package/dist/shift-components/p-2e747eb3.js +5 -0
- package/dist/shift-components/{p-fad254c9.entry.js → p-496a721b.entry.js} +1 -1
- package/dist/shift-components/p-832fd942.entry.js +5 -0
- package/dist/shift-components/p-9120c049.entry.js +5 -0
- package/dist/shift-components/{p-e35e44a4.js → p-99d314b5.js} +1 -1
- package/dist/shift-components/p-c4efbdc3.js +5 -0
- package/dist/shift-components/p-d49f73db.entry.js +5 -0
- package/dist/shift-components/p-e446fb9d.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/vehicle-lookup/components/CardsContainer.d.ts +3 -1
- package/dist/types/components/vehicle-lookup/components/SSCTable.d.ts +3 -1
- package/dist/types/components/vehicle-lookup/components/StatusCard.d.ts +3 -1
- package/dist/types/components/vehicle-lookup/dynamic-claim.d.ts +10 -5
- package/dist/types/components/vehicle-lookup/dynamic-redeem.d.ts +10 -5
- package/dist/types/components/vehicle-lookup/paint-thickness.d.ts +6 -1
- package/dist/types/components/vehicle-lookup/service-history.d.ts +6 -1
- package/dist/types/components/vehicle-lookup/vehicle-accessories.d.ts +6 -1
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +5 -3
- package/dist/types/components/vehicle-lookup/vehicle-specification.d.ts +6 -1
- package/dist/types/components/vehicle-lookup/warranty-details.d.ts +10 -5
- package/dist/types/components.d.ts +18 -0
- package/dist/types/global/lib/get-local-language.d.ts +2 -0
- package/dist/types/global/types/locales/error-schema.d.ts +7 -0
- package/dist/types/global/types/locales/index.d.ts +220 -0
- package/dist/types/global/types/locales/vehicle-lookup/accessories-schema.d.ts +15 -0
- package/dist/types/global/types/locales/vehicle-lookup/dynamic-claim-schema.d.ts +31 -0
- package/dist/types/global/types/locales/vehicle-lookup/dynamic-redeem-schema.d.ts +45 -0
- package/dist/types/global/types/locales/vehicle-lookup/index.d.ts +189 -0
- package/dist/types/global/types/locales/vehicle-lookup/paint-thickness-schema.d.ts +17 -0
- package/dist/types/global/types/locales/vehicle-lookup/service-history-schema.d.ts +19 -0
- package/dist/types/global/types/locales/vehicle-lookup/specification-schema.d.ts +17 -0
- package/dist/types/global/types/locales/vehicle-lookup/warranty-schema.d.ts +35 -0
- package/package.json +9 -4
- package/dist/components/p-2741b156.js +0 -5
- package/dist/components/p-2ea90585.js +0 -5
- package/dist/components/p-4f08bcb8.js +0 -5
- package/dist/components/p-514c4736.js +0 -5
- package/dist/components/p-6ffb4e5d.js +0 -5
- package/dist/components/p-9245caae.js +0 -5
- package/dist/components/p-c62be897.js +0 -5
- package/dist/components/p-d4718f3b.js +0 -5
- package/dist/components/p-d999f3c4.js +0 -5
- package/dist/shift-components/p-1719e164.entry.js +0 -5
- package/dist/shift-components/p-26b9d31a.entry.js +0 -5
- package/dist/shift-components/p-33e4c335.entry.js +0 -5
- package/dist/shift-components/p-4f08bcb8.js +0 -5
- package/dist/shift-components/p-9f58a33b.entry.js +0 -5
- package/dist/shift-components/p-d03dade1.entry.js +0 -5
- package/dist/shift-components/p-d1ffe0eb.entry.js +0 -5
- package/dist/shift-components/p-f6764fb5.entry.js +0 -5
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
|
+
import { localeSchema } from "../../global/types/locales/index";
|
|
6
7
|
import { getVehicleInformation } from "../../global/api/vehicleInformation";
|
|
7
8
|
import cn from "../../global/lib/cn";
|
|
8
|
-
import
|
|
9
|
-
import Eye from "~assets/eye.svg";
|
|
9
|
+
import { getLocaleLanguage } from "../../global/lib/get-local-language";
|
|
10
10
|
import { closeImageViewer, openImageViewer } from "../../global/lib/image-expansion";
|
|
11
|
+
import Eye from "~assets/eye.svg";
|
|
12
|
+
import Loading from "../components/Loading";
|
|
11
13
|
let mockData = {};
|
|
12
14
|
export class VehicleAccessories {
|
|
13
15
|
constructor() {
|
|
@@ -23,14 +25,22 @@ export class VehicleAccessories {
|
|
|
23
25
|
this.baseUrl = '';
|
|
24
26
|
this.isDev = false;
|
|
25
27
|
this.queryString = '';
|
|
28
|
+
this.language = 'en';
|
|
26
29
|
this.loadingStateChange = undefined;
|
|
27
30
|
this.loadedResponse = undefined;
|
|
31
|
+
this.locale = localeSchema.getDefault();
|
|
28
32
|
this.state = 'idle';
|
|
29
33
|
this.externalVin = null;
|
|
30
|
-
this.errorMessage = null;
|
|
31
34
|
this.expandedImage = null;
|
|
35
|
+
this.errorMessage = null;
|
|
32
36
|
this.vehicleInformation = undefined;
|
|
33
37
|
}
|
|
38
|
+
async componentWillLoad() {
|
|
39
|
+
await this.changeLanguage(this.language);
|
|
40
|
+
}
|
|
41
|
+
async changeLanguage(newLanguage) {
|
|
42
|
+
this.locale = await getLocaleLanguage(newLanguage);
|
|
43
|
+
}
|
|
34
44
|
handleSettingData(response) {
|
|
35
45
|
if (!response.accessories || !Array.isArray(response.accessories))
|
|
36
46
|
response.accessories = [];
|
|
@@ -62,7 +72,7 @@ export class VehicleAccessories {
|
|
|
62
72
|
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
63
73
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
64
74
|
if (!vehicleResponse)
|
|
65
|
-
throw new Error('
|
|
75
|
+
throw new Error('wrongResponseFormat');
|
|
66
76
|
this.handleSettingData(vehicleResponse);
|
|
67
77
|
}
|
|
68
78
|
this.errorMessage = null;
|
|
@@ -88,8 +98,9 @@ export class VehicleAccessories {
|
|
|
88
98
|
}
|
|
89
99
|
render() {
|
|
90
100
|
var _a, _b;
|
|
101
|
+
const texts = this.locale.vehicleLookup.accessories;
|
|
91
102
|
const accessories = (this === null || this === void 0 ? void 0 : this.vehicleInformation) ? (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.accessories : [];
|
|
92
|
-
return (h(Host, { key: '
|
|
103
|
+
return (h(Host, { key: '5b676008ffd07cf3c30f6a1dbef540aeddec5650' }, h("div", { key: '936db932754ee0c5774bb9bbadcab9acdf0bd8f1', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '46029b531877e9641e0797a08449c446d6acb41d' }, h(Loading, { key: 'c831c9e7b6ae7e3c7748ec20a531fc653570d7a1', isLoading: this.state.includes('loading') }), h("div", { key: 'eb7b7864b47ab00025c7634995a2f3d868f379df', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'fdb1c1e9673a300a974e1ade26079063e5a6780e', class: cn('text-center pt-[4px] text-[20px]', { 'text-red-600': !!this.errorMessage }) }, (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vin), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '5b777e9dabe4b1caac03d4ff4c77bc52eacafd0a', class: "py-[16px]" }, h("div", { key: 'e92c8f26bba943508ec0536f404bbf9b46b5ffef', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '7e3e5c940b3b52538c58cec0f6e9befcc8b20d85', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'fd6b52beb280f25ef122ca1616b3dc85ba868aac', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.vehicleAccessories), h("div", { key: 'df4343fae41a6118c73aadf8b2451c1ed55f0b24', class: "h-0 overflow-auto flex-1" }, !accessories.length && h("div", { key: 'c634537217daeb171ba9120b75baeec052727606', class: "h-[80px] flex items-center justify-center text-[18px]" }, texts.noData), !!accessories.length && (h("table", { key: '800b8700d5d7d96cccc3c0774b7c0c6d48411e51', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '338f1360f25eeb71b0c766bc6995dc2d794694b0', class: "top-0 font-bold z-40 sticky bg-white" }, h("tr", { key: '4d7be4a922493d6e93b9a72a6de63932bb94f642' }, ['partNumber', 'description', 'image'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, texts[title]))))), h("tbody", { key: 'eb798dcea38261093bc5fdfe5b015b79f3e6d6e9' }, accessories.map((accessory, idx) => {
|
|
93
104
|
var _a;
|
|
94
105
|
return (h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: accessory.partNumber }, ['partNumber', 'description'].map(key => {
|
|
95
106
|
var _a;
|
|
@@ -98,10 +109,10 @@ export class VehicleAccessories {
|
|
|
98
109
|
}) }, accessory[key] || '...'));
|
|
99
110
|
}), h("td", { class: cn('px-[10px] py-[10px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
100
111
|
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
101
|
-
}) }, h("button", { onClick: ({ target }) => this.openImage(target, accessory.image), class: "shrink-0 relative ring-0 outline-none w-fit mx-auto [&_img]:hover:shadow-lg [&_div]:hover:!opacity-100 cursor-pointer" }, h("div", { class: "absolute flex-col justify-center gap-[4px] size-full flex items-center pointer-events-none hover:opacity-100 rounded-lg opacity-0 bg-black/40 transition-all duration-300" }, h("img", { src: Eye }), h("span", { class: "text-white" },
|
|
102
|
-
})), h("div", { key: '
|
|
112
|
+
}) }, h("button", { onClick: ({ target }) => this.openImage(target, accessory.image), class: "shrink-0 relative ring-0 outline-none w-fit mx-auto [&_img]:hover:shadow-lg [&_div]:hover:!opacity-100 cursor-pointer" }, h("div", { class: "absolute flex-col justify-center gap-[4px] size-full flex items-center pointer-events-none hover:opacity-100 rounded-lg opacity-0 bg-black/40 transition-all duration-300" }, h("img", { src: Eye }), h("span", { class: "text-white" }, texts.expand)), h("img", { class: "w-auto h-auto max-w-[133px] max-h-[133px] cursor-pointer shadow-sm rounded-lg transition-all duration-300", src: accessory.image })))));
|
|
113
|
+
})), h("div", { key: 'bb875932b3315b24afd3589948936dd3b471bc56', onClick: () => this.closeImage(), style: { backdropFilter: this.expandedImage ? 'blur(3px)' : 'blur(0px)' }, class: cn('pointer-events-none w-[100dvw] h-[100dvh] fixed top-0 z-50 left-0 opacity-0 bg-black/40 transition-all duration-400', {
|
|
103
114
|
'pointer-events-auto opacity-100 delay-200': this.expandedImage,
|
|
104
|
-
}) }, h("button", { key: '
|
|
115
|
+
}) }, h("button", { key: '9b6a9934ecd43a4988978772d3f9ec032fc2366d', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, h("div", { key: 'fc59bcd946d47fab25522506e1362ab92580efa8', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), h("div", { key: 'baf4b47120f23081e6f150ee3aacb8410e964c51', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), h("img", { key: '8dfbdb6402ba212b864fb7e6324db06b28e6b8b2', alt: "", id: "expanded-image", class: "fixed opacity-0 z-50 transition-all rounded-lg" })))))))))));
|
|
105
116
|
}
|
|
106
117
|
static get is() { return "vehicle-accessories"; }
|
|
107
118
|
static get encapsulation() { return "shadow"; }
|
|
@@ -171,6 +182,30 @@ export class VehicleAccessories {
|
|
|
171
182
|
"reflect": false,
|
|
172
183
|
"defaultValue": "''"
|
|
173
184
|
},
|
|
185
|
+
"language": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"mutable": false,
|
|
188
|
+
"complexType": {
|
|
189
|
+
"original": "LanguageKeys",
|
|
190
|
+
"resolved": "\"ar\" | \"en\" | \"ku\"",
|
|
191
|
+
"references": {
|
|
192
|
+
"LanguageKeys": {
|
|
193
|
+
"location": "import",
|
|
194
|
+
"path": "~types/locales",
|
|
195
|
+
"id": "src/global/types/locales/index.ts::LanguageKeys"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"required": false,
|
|
200
|
+
"optional": false,
|
|
201
|
+
"docs": {
|
|
202
|
+
"tags": [],
|
|
203
|
+
"text": ""
|
|
204
|
+
},
|
|
205
|
+
"attribute": "language",
|
|
206
|
+
"reflect": false,
|
|
207
|
+
"defaultValue": "'en'"
|
|
208
|
+
},
|
|
174
209
|
"loadingStateChange": {
|
|
175
210
|
"type": "unknown",
|
|
176
211
|
"mutable": false,
|
|
@@ -211,10 +246,11 @@ export class VehicleAccessories {
|
|
|
211
246
|
}
|
|
212
247
|
static get states() {
|
|
213
248
|
return {
|
|
249
|
+
"locale": {},
|
|
214
250
|
"state": {},
|
|
215
251
|
"externalVin": {},
|
|
216
|
-
"errorMessage": {},
|
|
217
252
|
"expandedImage": {},
|
|
253
|
+
"errorMessage": {},
|
|
218
254
|
"vehicleInformation": {}
|
|
219
255
|
};
|
|
220
256
|
}
|
|
@@ -315,6 +351,9 @@ export class VehicleAccessories {
|
|
|
315
351
|
static get elementRef() { return "el"; }
|
|
316
352
|
static get watchers() {
|
|
317
353
|
return [{
|
|
354
|
+
"propName": "language",
|
|
355
|
+
"methodName": "changeLanguage"
|
|
356
|
+
}, {
|
|
318
357
|
"propName": "state",
|
|
319
358
|
"methodName": "loadingListener"
|
|
320
359
|
}];
|
|
@@ -11,11 +11,12 @@ export class VehicleLookup {
|
|
|
11
11
|
this.baseUrl = '';
|
|
12
12
|
this.isDev = false;
|
|
13
13
|
this.queryString = '';
|
|
14
|
-
this.
|
|
14
|
+
this.language = 'en';
|
|
15
|
+
this.blazorErrorStateListener = '';
|
|
15
16
|
this.blazorOnLoadingStateChange = '';
|
|
16
|
-
this.wrapperErrorState = '';
|
|
17
17
|
this.errorStateListener = undefined;
|
|
18
|
-
this.
|
|
18
|
+
this.loadingStateChanged = undefined;
|
|
19
|
+
this.wrapperErrorState = '';
|
|
19
20
|
this.blazorRef = undefined;
|
|
20
21
|
}
|
|
21
22
|
async componentDidLoad() {
|
|
@@ -94,7 +95,7 @@ export class VehicleLookup {
|
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
render() {
|
|
97
|
-
return (h(Host, { key: '
|
|
98
|
+
return (h(Host, { key: '1b02080c791eaabac9cdefc01d99222cc2d74754' }, h("div", { key: '0063278f8b621592ac4242f347f3f17757fdde46', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-specification' }) }, h("vehicle-specification", { key: 'dd2416d8d2765ceeaca2c568d2e8137c8b4f0533', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'db672d3a1dcc4fbb9f859aee47a997163c55cc56', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-accessories' }) }, h("vehicle-accessories", { key: '32a98a8bf3facadbf9a4b4b90f163ffe7ee737de', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'a889c95b168a6dba09f416d1c9b2926abf150098', class: cn('w-full', { hidden: this.activeElement !== 'warranty-details' }) }, h("warranty-details", { key: '7f55dbf1cedd8e867dafb514b1c02a829fd98b9d', language: this.language, isDev: this.isDev, "show-ssc": "true", "show-warranty": "true", "base-url": this.baseUrl, "query-string": this.queryString }, h("slot", { key: 'eb734db1e996237f410070ada9583c6ec2cfafc0' }))), h("div", { key: 'fd4431e0b5f13283ab391e32400ae40f4f0c265c', class: cn('w-full', { hidden: this.activeElement !== 'service-history' }) }, h("service-history", { key: '65879ee4ba28485f9f17816874636f4f157f3567', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'c5129bb7d63c138c770fcce25889860382c1208e', class: cn('w-full', { hidden: this.activeElement !== 'paint-thickness' }) }, h("paint-thickness", { key: 'd75617d35eda2727687c53f2f562f687dbec7acc', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'c9deade0eff8f18b32a4327691f4dc2f01f82848', class: cn('w-full', { hidden: this.activeElement !== 'dynamic-claim' }) }, h("dynamic-claim", { key: '638665a4596224088cffd4d28b43aa86f15dfddc', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }))));
|
|
98
99
|
}
|
|
99
100
|
static get is() { return "vehicle-lookup"; }
|
|
100
101
|
static get originalStyleUrls() {
|
|
@@ -187,20 +188,47 @@ export class VehicleLookup {
|
|
|
187
188
|
"reflect": false,
|
|
188
189
|
"defaultValue": "''"
|
|
189
190
|
},
|
|
190
|
-
"
|
|
191
|
-
"type": "
|
|
191
|
+
"language": {
|
|
192
|
+
"type": "string",
|
|
192
193
|
"mutable": false,
|
|
193
194
|
"complexType": {
|
|
194
|
-
"original": "
|
|
195
|
-
"resolved": "
|
|
195
|
+
"original": "LanguageKeys",
|
|
196
|
+
"resolved": "\"ar\" | \"en\" | \"ku\"",
|
|
197
|
+
"references": {
|
|
198
|
+
"LanguageKeys": {
|
|
199
|
+
"location": "import",
|
|
200
|
+
"path": "~types/locales",
|
|
201
|
+
"id": "src/global/types/locales/index.ts::LanguageKeys"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": ""
|
|
210
|
+
},
|
|
211
|
+
"attribute": "language",
|
|
212
|
+
"reflect": false,
|
|
213
|
+
"defaultValue": "'en'"
|
|
214
|
+
},
|
|
215
|
+
"blazorErrorStateListener": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"mutable": false,
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "string",
|
|
220
|
+
"resolved": "string",
|
|
196
221
|
"references": {}
|
|
197
222
|
},
|
|
198
223
|
"required": false,
|
|
199
|
-
"optional":
|
|
224
|
+
"optional": false,
|
|
200
225
|
"docs": {
|
|
201
226
|
"tags": [],
|
|
202
227
|
"text": ""
|
|
203
|
-
}
|
|
228
|
+
},
|
|
229
|
+
"attribute": "blazor-error-state-listener",
|
|
230
|
+
"reflect": false,
|
|
231
|
+
"defaultValue": "''"
|
|
204
232
|
},
|
|
205
233
|
"blazorOnLoadingStateChange": {
|
|
206
234
|
"type": "string",
|
|
@@ -235,23 +263,20 @@ export class VehicleLookup {
|
|
|
235
263
|
"text": ""
|
|
236
264
|
}
|
|
237
265
|
},
|
|
238
|
-
"
|
|
239
|
-
"type": "
|
|
266
|
+
"loadingStateChanged": {
|
|
267
|
+
"type": "unknown",
|
|
240
268
|
"mutable": false,
|
|
241
269
|
"complexType": {
|
|
242
|
-
"original": "
|
|
243
|
-
"resolved": "
|
|
270
|
+
"original": "(isLoading: boolean) => void",
|
|
271
|
+
"resolved": "(isLoading: boolean) => void",
|
|
244
272
|
"references": {}
|
|
245
273
|
},
|
|
246
274
|
"required": false,
|
|
247
|
-
"optional":
|
|
275
|
+
"optional": true,
|
|
248
276
|
"docs": {
|
|
249
277
|
"tags": [],
|
|
250
278
|
"text": ""
|
|
251
|
-
}
|
|
252
|
-
"attribute": "blazor-error-state-listener",
|
|
253
|
-
"reflect": false,
|
|
254
|
-
"defaultValue": "''"
|
|
279
|
+
}
|
|
255
280
|
}
|
|
256
281
|
};
|
|
257
282
|
}
|
|
@@ -3,22 +3,32 @@
|
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
|
-
import
|
|
6
|
+
import { localeSchema } from "../../global/types/locales/index";
|
|
7
7
|
import cn from "../../global/lib/cn";
|
|
8
|
+
import { getLocaleLanguage } from "../../global/lib/get-local-language";
|
|
8
9
|
import { getVehicleInformation } from "../../global/api/vehicleInformation";
|
|
10
|
+
import Loading from "../components/Loading";
|
|
9
11
|
let mockData = {};
|
|
10
12
|
export class VehicleSpecification {
|
|
11
13
|
constructor() {
|
|
12
14
|
this.baseUrl = '';
|
|
13
15
|
this.isDev = false;
|
|
14
16
|
this.queryString = '';
|
|
17
|
+
this.language = 'en';
|
|
15
18
|
this.loadingStateChange = undefined;
|
|
16
19
|
this.loadedResponse = undefined;
|
|
20
|
+
this.locale = localeSchema.getDefault();
|
|
17
21
|
this.state = 'idle';
|
|
18
22
|
this.externalVin = null;
|
|
19
23
|
this.errorMessage = null;
|
|
20
24
|
this.vehicleInformation = undefined;
|
|
21
25
|
}
|
|
26
|
+
async componentWillLoad() {
|
|
27
|
+
await this.changeLanguage(this.language);
|
|
28
|
+
}
|
|
29
|
+
async changeLanguage(newLanguage) {
|
|
30
|
+
this.locale = await getLocaleLanguage(newLanguage);
|
|
31
|
+
}
|
|
22
32
|
async setData(newData, headers = {}) {
|
|
23
33
|
clearTimeout(this.networkTimeoutRef);
|
|
24
34
|
if (this.abortController)
|
|
@@ -45,7 +55,7 @@ export class VehicleSpecification {
|
|
|
45
55
|
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
46
56
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
47
57
|
if (!vehicleResponse)
|
|
48
|
-
throw new Error('
|
|
58
|
+
throw new Error('wrongResponseFormat');
|
|
49
59
|
this.vehicleInformation = vehicleResponse;
|
|
50
60
|
}
|
|
51
61
|
this.errorMessage = null;
|
|
@@ -71,7 +81,8 @@ export class VehicleSpecification {
|
|
|
71
81
|
}
|
|
72
82
|
render() {
|
|
73
83
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
74
|
-
|
|
84
|
+
const texts = this.locale.vehicleLookup.specification;
|
|
85
|
+
return (h(Host, { key: '610f4bab084478eb7f60133ed6498fc6b53a6844' }, h("div", { key: '5d25c90dd19ae1fdf84d6484881b3fceeada61c4', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'bd3643977e70e46e86b7516a9407679209a7d4fa' }, h(Loading, { key: '9064190a3698c0534e36e8bc018bbaec3b08709a', isLoading: this.state.includes('loading') }), h("div", { key: '56426c064d0a0b1273f62e78b64cca65020c72c8', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'ec8f12b6d2372053c097a057ba71d072d75e4fdc', class: cn('text-center pt-[4px] text-[20px]', { 'text-red-600': !!this.errorMessage }) }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '285ac738ecc896feeda7caf81f8a41c9a99cea19', class: "py-4" }, h("div", { key: 'a29855571fcc97bc19f3196427fdf67d9cadb501', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '021f7bb6c6a1c9b44ebc112c48e4789aca7d387c', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '43e4399b5064de1023a8e3d27fdd2632f75b3338', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.vehicleSpecification), h("div", { key: 'f0fa3e15cb9336be3a4061821438d82d9e73587c', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && h("div", { key: '12d0257e9d94573a09fecda9c4fcc3e093c08f16', class: "h-[80px] flex items-center justify-center text-[18px]" }, texts.noData), !!((_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.vehicleSpecification) && (h("table", { key: 'ecc72141ecfb0b1ca2eeb4825eb6c90119089395', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '01eeb96a4dc8c721d720f34b535cc1b917c53b3a', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '956677dd3a6a94a4fec8d9d784567aa3fdd62a16' }, ['model', 'variant', 'katashiki', 'modelYear', 'sfx'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, texts[title]))))), h("tbody", { key: 'e62c17cb6047d082191913821426e6e1e928d9fc' }, h("tr", { key: '71a09174b51e10d070723c00b8db14499707bdc3' }, h("td", { key: '6fd71363e86b19311907a42348cee324e4137e43', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_e = (_d = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.vehicleVariantInfo) === null || _e === void 0 ? void 0 : _e.modelCode) || '...', " ", h("br", { key: '759a2b9072f60aa917a001b39b91e38fc91e4b5a', class: "my-2" }), ((_g = (_f = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _f === void 0 ? void 0 : _f.vehicleSpecification) === null || _g === void 0 ? void 0 : _g.modelDesc) || '...'), h("td", { key: '3c634e53ec8955bcf1af66667a6fe004d6e46f01', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_j = (_h = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _h === void 0 ? void 0 : _h.identifiers) === null || _j === void 0 ? void 0 : _j.variant) || '...', " ", h("br", { key: 'b81065d744067f06f60e6b34e31f219c6c58d373' }), ((_l = (_k = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _k === void 0 ? void 0 : _k.vehicleSpecification) === null || _l === void 0 ? void 0 : _l.variantDesc) || '...'), ['identifiers.katashiki', 'vehicleVariantInfo.modelYear', 'vehicleVariantInfo.sfx'].map(infoPath => {
|
|
75
86
|
var _a;
|
|
76
87
|
const [place, field] = infoPath.split('.');
|
|
77
88
|
const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
|
|
@@ -146,6 +157,30 @@ export class VehicleSpecification {
|
|
|
146
157
|
"reflect": false,
|
|
147
158
|
"defaultValue": "''"
|
|
148
159
|
},
|
|
160
|
+
"language": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "LanguageKeys",
|
|
165
|
+
"resolved": "\"ar\" | \"en\" | \"ku\"",
|
|
166
|
+
"references": {
|
|
167
|
+
"LanguageKeys": {
|
|
168
|
+
"location": "import",
|
|
169
|
+
"path": "~types/locales",
|
|
170
|
+
"id": "src/global/types/locales/index.ts::LanguageKeys"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": false,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": ""
|
|
179
|
+
},
|
|
180
|
+
"attribute": "language",
|
|
181
|
+
"reflect": false,
|
|
182
|
+
"defaultValue": "'en'"
|
|
183
|
+
},
|
|
149
184
|
"loadingStateChange": {
|
|
150
185
|
"type": "unknown",
|
|
151
186
|
"mutable": false,
|
|
@@ -186,6 +221,7 @@ export class VehicleSpecification {
|
|
|
186
221
|
}
|
|
187
222
|
static get states() {
|
|
188
223
|
return {
|
|
224
|
+
"locale": {},
|
|
189
225
|
"state": {},
|
|
190
226
|
"externalVin": {},
|
|
191
227
|
"errorMessage": {},
|
|
@@ -289,6 +325,9 @@ export class VehicleSpecification {
|
|
|
289
325
|
static get elementRef() { return "el"; }
|
|
290
326
|
static get watchers() {
|
|
291
327
|
return [{
|
|
328
|
+
"propName": "language",
|
|
329
|
+
"methodName": "changeLanguage"
|
|
330
|
+
}, {
|
|
292
331
|
"propName": "state",
|
|
293
332
|
"methodName": "loadingListener"
|
|
294
333
|
}];
|
|
@@ -3,24 +3,27 @@
|
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
|
+
import Loader from "~assets/loader.svg";
|
|
6
7
|
import Loading from "./components/Loading";
|
|
8
|
+
import SSCTable from "./components/SSCTable";
|
|
7
9
|
import StatusCard from "./components/StatusCard";
|
|
8
|
-
import Loader from "~assets/loader.svg";
|
|
9
10
|
import CardsContainer from "./components/CardsContainer";
|
|
10
|
-
import SSCTable from "./components/SSCTable";
|
|
11
11
|
import cn from "../../global/lib/cn";
|
|
12
|
+
import { getLocaleLanguage } from "../../global/lib/get-local-language";
|
|
13
|
+
import { localeSchema } from "../../global/types/locales/index";
|
|
12
14
|
import { getVehicleInformation } from "../../global/api/vehicleInformation";
|
|
13
15
|
let mockData = {};
|
|
14
16
|
export class WarrantyDetails {
|
|
15
17
|
constructor() {
|
|
16
18
|
this.baseUrl = '';
|
|
17
|
-
this.unauthorizedSscLookupBaseUrl = '';
|
|
18
19
|
this.isDev = false;
|
|
19
20
|
this.showSsc = false;
|
|
20
21
|
this.queryString = '';
|
|
21
|
-
this.unauthorizedSscLookupQueryString = '';
|
|
22
22
|
this.recaptchaKey = '';
|
|
23
|
+
this.language = 'en';
|
|
23
24
|
this.showWarranty = false;
|
|
25
|
+
this.unauthorizedSscLookupBaseUrl = '';
|
|
26
|
+
this.unauthorizedSscLookupQueryString = '';
|
|
24
27
|
this.cityId = null;
|
|
25
28
|
this.cityIntegrationId = null;
|
|
26
29
|
this.companyId = null;
|
|
@@ -36,13 +39,20 @@ export class WarrantyDetails {
|
|
|
36
39
|
this.loadedResponse = undefined;
|
|
37
40
|
this.state = 'idle';
|
|
38
41
|
this.externalVin = null;
|
|
39
|
-
this.errorMessage = null;
|
|
40
42
|
this.showRecaptcha = false;
|
|
43
|
+
this.errorMessage = null;
|
|
41
44
|
this.unInvoicedByBrokerName = null;
|
|
42
45
|
this.vehicleInformation = undefined;
|
|
43
46
|
this.checkingUnauthorizedSSC = false;
|
|
44
47
|
this.recaptchaRes = null;
|
|
45
48
|
this.headers = {};
|
|
49
|
+
this.locale = localeSchema.getDefault();
|
|
50
|
+
}
|
|
51
|
+
async componentWillLoad() {
|
|
52
|
+
await this.changeLanguage(this.language);
|
|
53
|
+
}
|
|
54
|
+
async changeLanguage(newLanguage) {
|
|
55
|
+
this.locale = await getLocaleLanguage(newLanguage);
|
|
46
56
|
}
|
|
47
57
|
handleSettingData(response) {
|
|
48
58
|
var _a, _b, _c;
|
|
@@ -80,7 +90,7 @@ export class WarrantyDetails {
|
|
|
80
90
|
const hasPendingSSC = Math.random() < 0.5 ? false : true;
|
|
81
91
|
this.recaptchaRes = {
|
|
82
92
|
hasSSC: hasPendingSSC,
|
|
83
|
-
message: hasPendingSSC ? '
|
|
93
|
+
message: hasPendingSSC ? 'pendingSSC' : 'noPendingSSC',
|
|
84
94
|
};
|
|
85
95
|
}
|
|
86
96
|
else {
|
|
@@ -97,11 +107,11 @@ export class WarrantyDetails {
|
|
|
97
107
|
const hasPendingSSC = vinResponse.sscLookupStatus === 1;
|
|
98
108
|
this.recaptchaRes = {
|
|
99
109
|
hasSSC: hasPendingSSC,
|
|
100
|
-
message: hasPendingSSC ? '
|
|
110
|
+
message: hasPendingSSC ? 'pendingSSC' : 'noPendingSSC',
|
|
101
111
|
};
|
|
102
112
|
}
|
|
103
113
|
else
|
|
104
|
-
throw new Error('
|
|
114
|
+
throw new Error('wrongResponseFormat');
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
117
|
}, 500);
|
|
@@ -140,7 +150,7 @@ export class WarrantyDetails {
|
|
|
140
150
|
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
141
151
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
142
152
|
if (!vehicleResponse)
|
|
143
|
-
throw new Error('
|
|
153
|
+
throw new Error('wrongResponseFormat');
|
|
144
154
|
this.handleSettingData(vehicleResponse);
|
|
145
155
|
this.handleInitializingRecaptcha(vin, scopedTimeoutRef);
|
|
146
156
|
}
|
|
@@ -177,7 +187,7 @@ export class WarrantyDetails {
|
|
|
177
187
|
}
|
|
178
188
|
render() {
|
|
179
189
|
var _a, _b, _c, _d, _e;
|
|
180
|
-
return (h(Host, { key: '
|
|
190
|
+
return (h(Host, { key: '5976b28e5ddc465d0ae79b7882d40b4f7105ffdf' }, h("div", { key: '1c5623799b6fbfb7a343a78c6b96b027f4416d10', dir: this.locale.direction, class: "min-h-[100px] warranty" }, h("div", { key: '5dde3a2e0886f5ececd0e8d556abef41d167942d' }, h(Loading, { key: '7f8b0a8ed8b2f07fbbc2e7d5a5162ae7aca02a14', isLoading: this.state.includes('loading') }), h("div", { key: '240a44eefa85d905e3bf1900772524e4a660feca', class: "transition duration-700", style: { transform: this.state.includes('loading') || this.state === 'idle' ? 'scale(0)' : 'scale(1)', opacity: this.state.includes('loading') ? '0' : '1' } }, (this.showSsc || this.showWarranty) && (h("div", { key: '3d7488bbd306a360094636adc2732cf00aa4b877', style: { color: !!this.errorMessage ? 'red' : 'black' }, class: "warranty-vin" }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin)), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '8f186a25db18cd00449ce68cf7261870b7996dc7', class: "py-4" }, h(StatusCard, { key: '5de5ac8872b809ef344440b6bc9fad956c744620', desc: this.locale.errors[this.errorMessage] || this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (h(CardsContainer, { key: 'df36bf0f0e4906b662d11a3db6cf7cd40dabbae9', locale: this.locale, isAuthorized: (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.isAuthorized, unInvoicedByBrokerName: this.unInvoicedByBrokerName, warranty: (_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.warranty })), h("div", { key: '00d93ce17bfc3868709d67a74fa80983e5e9d312', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, h("slot", { key: 'b3cb909a47adb872390d3afca1c6eefd167d1b01' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (h("div", { key: '067dacd8f980da721272ffc03a15d6b5740580d9', class: cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.locale.vehicleLookup.warranty[this.recaptchaRes.message])), this.checkingUnauthorizedSSC && (h("div", { key: '36564f7464cea7804439f58397b84d5554e19dd1', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, h("div", { key: '92d1d9d3141f719a67e47e7187e65af814b93aa9' }, h("strong", { key: 'd93a6f157cd67de2fe8c93cf50c84aa6ba143a87' }, this.locale.vehicleLookup.warranty.checkingTMC)), h("img", { key: 'bb95bb4cc9f3d9dd5d1cf0a3f68f4af86a56b6d2', class: "spin", src: Loader }))), this.showSsc && ['data', 'data-loading'].includes(this.state) && ((_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.ssc) !== null && !!((_e = this.vehicleInformation) === null || _e === void 0 ? void 0 : _e.ssc.length) && (h(SSCTable, { key: '02190f90bcf06693545848545013353e99baad12', locale: this.locale, ssc: this.vehicleInformation.ssc })))))));
|
|
181
191
|
}
|
|
182
192
|
static get is() { return "warranty-details"; }
|
|
183
193
|
static get encapsulation() { return "shadow"; }
|
|
@@ -211,24 +221,6 @@ export class WarrantyDetails {
|
|
|
211
221
|
"reflect": false,
|
|
212
222
|
"defaultValue": "''"
|
|
213
223
|
},
|
|
214
|
-
"unauthorizedSscLookupBaseUrl": {
|
|
215
|
-
"type": "string",
|
|
216
|
-
"mutable": false,
|
|
217
|
-
"complexType": {
|
|
218
|
-
"original": "string",
|
|
219
|
-
"resolved": "string",
|
|
220
|
-
"references": {}
|
|
221
|
-
},
|
|
222
|
-
"required": false,
|
|
223
|
-
"optional": false,
|
|
224
|
-
"docs": {
|
|
225
|
-
"tags": [],
|
|
226
|
-
"text": ""
|
|
227
|
-
},
|
|
228
|
-
"attribute": "unauthorized-ssc-lookup-base-url",
|
|
229
|
-
"reflect": false,
|
|
230
|
-
"defaultValue": "''"
|
|
231
|
-
},
|
|
232
224
|
"isDev": {
|
|
233
225
|
"type": "boolean",
|
|
234
226
|
"mutable": false,
|
|
@@ -283,7 +275,7 @@ export class WarrantyDetails {
|
|
|
283
275
|
"reflect": false,
|
|
284
276
|
"defaultValue": "''"
|
|
285
277
|
},
|
|
286
|
-
"
|
|
278
|
+
"recaptchaKey": {
|
|
287
279
|
"type": "string",
|
|
288
280
|
"mutable": false,
|
|
289
281
|
"complexType": {
|
|
@@ -297,17 +289,23 @@ export class WarrantyDetails {
|
|
|
297
289
|
"tags": [],
|
|
298
290
|
"text": ""
|
|
299
291
|
},
|
|
300
|
-
"attribute": "
|
|
292
|
+
"attribute": "recaptcha-key",
|
|
301
293
|
"reflect": false,
|
|
302
294
|
"defaultValue": "''"
|
|
303
295
|
},
|
|
304
|
-
"
|
|
296
|
+
"language": {
|
|
305
297
|
"type": "string",
|
|
306
298
|
"mutable": false,
|
|
307
299
|
"complexType": {
|
|
308
|
-
"original": "
|
|
309
|
-
"resolved": "
|
|
310
|
-
"references": {
|
|
300
|
+
"original": "LanguageKeys",
|
|
301
|
+
"resolved": "\"ar\" | \"en\" | \"ku\"",
|
|
302
|
+
"references": {
|
|
303
|
+
"LanguageKeys": {
|
|
304
|
+
"location": "import",
|
|
305
|
+
"path": "~types/locales",
|
|
306
|
+
"id": "src/global/types/locales/index.ts::LanguageKeys"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
311
309
|
},
|
|
312
310
|
"required": false,
|
|
313
311
|
"optional": false,
|
|
@@ -315,9 +313,9 @@ export class WarrantyDetails {
|
|
|
315
313
|
"tags": [],
|
|
316
314
|
"text": ""
|
|
317
315
|
},
|
|
318
|
-
"attribute": "
|
|
316
|
+
"attribute": "language",
|
|
319
317
|
"reflect": false,
|
|
320
|
-
"defaultValue": "''"
|
|
318
|
+
"defaultValue": "'en'"
|
|
321
319
|
},
|
|
322
320
|
"showWarranty": {
|
|
323
321
|
"type": "boolean",
|
|
@@ -337,6 +335,42 @@ export class WarrantyDetails {
|
|
|
337
335
|
"reflect": false,
|
|
338
336
|
"defaultValue": "false"
|
|
339
337
|
},
|
|
338
|
+
"unauthorizedSscLookupBaseUrl": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"mutable": false,
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "string",
|
|
343
|
+
"resolved": "string",
|
|
344
|
+
"references": {}
|
|
345
|
+
},
|
|
346
|
+
"required": false,
|
|
347
|
+
"optional": false,
|
|
348
|
+
"docs": {
|
|
349
|
+
"tags": [],
|
|
350
|
+
"text": ""
|
|
351
|
+
},
|
|
352
|
+
"attribute": "unauthorized-ssc-lookup-base-url",
|
|
353
|
+
"reflect": false,
|
|
354
|
+
"defaultValue": "''"
|
|
355
|
+
},
|
|
356
|
+
"unauthorizedSscLookupQueryString": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"mutable": false,
|
|
359
|
+
"complexType": {
|
|
360
|
+
"original": "string",
|
|
361
|
+
"resolved": "string",
|
|
362
|
+
"references": {}
|
|
363
|
+
},
|
|
364
|
+
"required": false,
|
|
365
|
+
"optional": false,
|
|
366
|
+
"docs": {
|
|
367
|
+
"tags": [],
|
|
368
|
+
"text": ""
|
|
369
|
+
},
|
|
370
|
+
"attribute": "unauthorized-ssc-lookup-query-string",
|
|
371
|
+
"reflect": false,
|
|
372
|
+
"defaultValue": "''"
|
|
373
|
+
},
|
|
340
374
|
"cityId": {
|
|
341
375
|
"type": "string",
|
|
342
376
|
"mutable": false,
|
|
@@ -577,13 +611,14 @@ export class WarrantyDetails {
|
|
|
577
611
|
return {
|
|
578
612
|
"state": {},
|
|
579
613
|
"externalVin": {},
|
|
580
|
-
"errorMessage": {},
|
|
581
614
|
"showRecaptcha": {},
|
|
615
|
+
"errorMessage": {},
|
|
582
616
|
"unInvoicedByBrokerName": {},
|
|
583
617
|
"vehicleInformation": {},
|
|
584
618
|
"checkingUnauthorizedSSC": {},
|
|
585
619
|
"recaptchaRes": {},
|
|
586
|
-
"headers": {}
|
|
620
|
+
"headers": {},
|
|
621
|
+
"locale": {}
|
|
587
622
|
};
|
|
588
623
|
}
|
|
589
624
|
static get methods() {
|
|
@@ -683,6 +718,9 @@ export class WarrantyDetails {
|
|
|
683
718
|
static get elementRef() { return "el"; }
|
|
684
719
|
static get watchers() {
|
|
685
720
|
return [{
|
|
721
|
+
"propName": "language",
|
|
722
|
+
"methodName": "changeLanguage"
|
|
723
|
+
}, {
|
|
686
724
|
"propName": "state",
|
|
687
725
|
"methodName": "loadingListener"
|
|
688
726
|
}];
|
|
@@ -8,7 +8,7 @@ export const getPartInformation = async (component, generalProps, headers = {})
|
|
|
8
8
|
const handleResult = (newPartInformation) => {
|
|
9
9
|
if (networkTimeoutRef === scopedTimeoutRef) {
|
|
10
10
|
if (!newPartInformation && partNumber)
|
|
11
|
-
throw new Error(notAvailableMessage || '
|
|
11
|
+
throw new Error(notAvailableMessage || 'wrongResponseFormat');
|
|
12
12
|
if (loadedResponse)
|
|
13
13
|
loadedResponse(newPartInformation);
|
|
14
14
|
if (middlewareCallback)
|