adp-web-components 0.0.37 → 0.0.40
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/dead-stock-lookup_3.cjs.entry.js +31 -13
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +73 -37
- package/dist/cjs/dynamic-redeem.cjs.entry.js +2 -2
- package/dist/cjs/{get-local-language-2acb5afc.js → get-local-language-507f6989.js} +5 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/part-lookup.cjs.entry.js +30 -21
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/vehicle-lookup.cjs.entry.js +78 -51
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +57 -4
- package/dist/collection/components/part-lookup/distributor-lookup.js +51 -4
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +51 -4
- package/dist/collection/components/part-lookup/part-lookup.js +51 -80
- package/dist/collection/components/vehicle-lookup/dynamic-claim.css +1 -1
- package/dist/collection/components/vehicle-lookup/dynamic-claim.js +59 -6
- package/dist/collection/components/vehicle-lookup/dynamic-redeem.css +1 -1
- package/dist/collection/components/vehicle-lookup/paint-thickness.css +1 -1
- package/dist/collection/components/vehicle-lookup/paint-thickness.js +59 -6
- package/dist/collection/components/vehicle-lookup/service-history.css +1 -1
- package/dist/collection/components/vehicle-lookup/service-history.js +57 -4
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +59 -6
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +104 -78
- package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +57 -4
- package/dist/collection/components/vehicle-lookup/warranty-details.css +1 -1
- package/dist/collection/components/vehicle-lookup/warranty-details.js +57 -5
- package/dist/collection/global/types/locales/error-schema.js +4 -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/manufacturer-lookup.js +1 -1
- package/dist/components/p-160dece9.js +5 -0
- package/dist/components/p-2340ecf4.js +5 -0
- package/dist/components/p-2e125a1d.js +5 -0
- package/dist/components/p-79893631.js +5 -0
- package/dist/components/{p-c20e4190.js → p-85a6b136.js} +1 -1
- package/dist/components/p-85d97144.js +5 -0
- package/dist/components/p-922ff52c.js +5 -0
- package/dist/components/{p-cb6dc5c3.js → p-b3de5ff6.js} +1 -1
- package/dist/components/p-ca930569.js +5 -0
- package/dist/components/p-e4d1afba.js +5 -0
- package/dist/components/p-f37f379d.js +5 -0
- package/dist/components/p-f3dd066f.js +5 -0
- package/dist/components/paint-thickness.js +1 -1
- package/dist/components/part-lookup.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/dead-stock-lookup_3.entry.js +31 -13
- package/dist/esm/dynamic-claim_6.entry.js +73 -37
- package/dist/esm/dynamic-redeem.entry.js +2 -2
- package/dist/esm/{get-local-language-883f9a8a.js → get-local-language-fdcb49f6.js} +5 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/part-lookup.entry.js +30 -21
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/vehicle-lookup.entry.js +78 -51
- package/dist/locales/ar.json +5 -1
- package/dist/locales/en.json +5 -1
- package/dist/locales/ku.json +6 -2
- package/dist/locales/ru.json +109 -105
- package/dist/shift-components/{p-5f0b9f41.entry.js → p-363c7e29.entry.js} +1 -1
- package/dist/shift-components/p-42575b3f.entry.js +5 -0
- package/dist/shift-components/p-52102bc7.entry.js +5 -0
- package/dist/shift-components/p-a066b3b3.entry.js +5 -0
- package/dist/shift-components/p-cd766b0f.entry.js +5 -0
- package/dist/shift-components/p-e9ccc7a9.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/part-lookup/dead-stock-lookup.d.ts +2 -0
- package/dist/types/components/part-lookup/distributor-lookup.d.ts +2 -0
- package/dist/types/components/part-lookup/manufacturer-lookup.d.ts +2 -0
- package/dist/types/components/part-lookup/part-lookup.d.ts +7 -7
- package/dist/types/components/vehicle-lookup/dynamic-claim.d.ts +2 -0
- package/dist/types/components/vehicle-lookup/paint-thickness.d.ts +2 -0
- package/dist/types/components/vehicle-lookup/service-history.d.ts +2 -0
- package/dist/types/components/vehicle-lookup/vehicle-accessories.d.ts +2 -0
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +25 -15
- package/dist/types/components/vehicle-lookup/vehicle-specification.d.ts +2 -0
- package/dist/types/components/vehicle-lookup/warranty-details.d.ts +2 -0
- package/dist/types/components.d.ts +36 -11
- package/dist/types/global/types/locales/error-schema.d.ts +8 -0
- package/dist/types/global/types/locales/index.d.ts +8 -0
- package/package.json +1 -1
- package/dist/components/p-09dd6de2.js +0 -5
- package/dist/components/p-21dfafba.js +0 -5
- package/dist/components/p-2f02d063.js +0 -5
- package/dist/components/p-58a3bbc5.js +0 -5
- package/dist/components/p-5e80276a.js +0 -5
- package/dist/components/p-acbea376.js +0 -5
- package/dist/components/p-bfddfd50.js +0 -5
- package/dist/components/p-c41b74ea.js +0 -5
- package/dist/components/p-c7747b68.js +0 -5
- package/dist/components/p-f312b879.js +0 -5
- package/dist/shift-components/p-45cc348b.entry.js +0 -5
- package/dist/shift-components/p-5e46843c.entry.js +0 -5
- package/dist/shift-components/p-954859b9.entry.js +0 -5
- package/dist/shift-components/p-c44fe649.js +0 -5
- package/dist/shift-components/p-dc33c5ac.entry.js +0 -5
|
@@ -26,6 +26,7 @@ export class VehicleAccessories {
|
|
|
26
26
|
this.isDev = false;
|
|
27
27
|
this.queryString = '';
|
|
28
28
|
this.language = 'en';
|
|
29
|
+
this.errorCallback = undefined;
|
|
29
30
|
this.loadingStateChange = undefined;
|
|
30
31
|
this.loadedResponse = undefined;
|
|
31
32
|
this.locale = localeSchema.getDefault();
|
|
@@ -81,12 +82,17 @@ export class VehicleAccessories {
|
|
|
81
82
|
catch (error) {
|
|
82
83
|
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
83
84
|
return;
|
|
85
|
+
if (this.errorCallback)
|
|
86
|
+
this.errorCallback(error.message);
|
|
84
87
|
console.error(error);
|
|
85
|
-
this.
|
|
86
|
-
this.vehicleInformation = null;
|
|
87
|
-
this.errorMessage = error.message;
|
|
88
|
+
this.setErrorMessage(error.message);
|
|
88
89
|
}
|
|
89
90
|
}
|
|
91
|
+
async setErrorMessage(message) {
|
|
92
|
+
this.state = 'error';
|
|
93
|
+
this.vehicleInformation = null;
|
|
94
|
+
this.errorMessage = message;
|
|
95
|
+
}
|
|
90
96
|
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
91
97
|
await this.setData(requestedVin, headers);
|
|
92
98
|
}
|
|
@@ -101,7 +107,7 @@ export class VehicleAccessories {
|
|
|
101
107
|
var _a, _b;
|
|
102
108
|
const texts = this.locale.vehicleLookup.accessories;
|
|
103
109
|
const accessories = (this === null || this === void 0 ? void 0 : this.vehicleInformation) ? (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.accessories : [];
|
|
104
|
-
return (h(Host, { key: '
|
|
110
|
+
return (h(Host, { key: '233a53fe15f137c207f2a34647db6c995ed43edb' }, h("div", { key: 'b61562a007846e8e49beb150c1d52ebec882d76e', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '74d8760528c838ba2f0bcf78f25ba165822d8c9d' }, h(Loading, { key: '23e2e9f046673d9a64902e39035f640b9ff2e31d', isLoading: this.state.includes('loading') }), h("div", { key: '1b25bfc7a1c117b301dd3c365fa353bf4d0d31b7', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'd40a2a645f75ce46dbe7cdce57f6e023ebda3912', 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: '5d74f635c82aa3725ebfc257351d68524978b272', class: "py-[16px] min-h-[100px] flex items-center" }, h("div", { key: 'fb0c609677be6a060519b7cec9acc1e7a0ec1c15', class: "px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.locale.errors.wildCard))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: 'de03c8406d4f28b2d8625ebba664635365d08aab', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '639c08fa36f02f55175d819e91db6e0d42f2dedd', 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: '7054a7a753f1758de4e75f4fd1f0b8bb2d3f6613', class: "h-0 overflow-auto flex-1" }, !accessories.length && h("div", { key: 'ad33e0903b2067dfd961d91be8624fdfb1564e1d', class: "h-[80px] flex items-center justify-center text-[18px]" }, texts.noData), !!accessories.length && (h("table", { key: '2e3c4f553276d954cf4cdecbe6655eb2cc23943b', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '02a45fbbf7fcfc86db8edd1c5620166c2c0818d0', class: "top-0 font-bold z-40 sticky bg-white" }, h("tr", { key: '105470076c89e31d41ac500112007f1331946d98' }, ['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: 'b42156638292719d8a25936fbe82a1d43a48230b' }, accessories.map((accessory, idx) => {
|
|
105
111
|
var _a;
|
|
106
112
|
return (h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: accessory.partNumber }, ['partNumber', 'description'].map(key => {
|
|
107
113
|
var _a;
|
|
@@ -111,9 +117,9 @@ export class VehicleAccessories {
|
|
|
111
117
|
}), h("td", { class: cn('px-[10px] py-[10px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
112
118
|
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
113
119
|
}) }, 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 })))));
|
|
114
|
-
})), h("div", { key: '
|
|
120
|
+
})), h("div", { key: '380a9c797d5e6814cbda91c3b007958af5c241fa', 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', {
|
|
115
121
|
'pointer-events-auto opacity-100 delay-200': this.expandedImage,
|
|
116
|
-
}) }, h("button", { key: '
|
|
122
|
+
}) }, h("button", { key: 'ffd98bd0e98a57f734c935cd1fd8e60a64408fbd', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, h("div", { key: 'b673d0051393f0bfec40b71a614995029e32cf4d', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), h("div", { key: 'd75186e71eb2d6c6aab182f411fe43e058e63bd8', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), h("img", { key: 'cca60bc92ba4a26cb06e980c9c8b68444a88ad07', alt: "", id: "expanded-image", class: "fixed opacity-0 z-50 transition-all rounded-lg" })))))))))));
|
|
117
123
|
}
|
|
118
124
|
static get is() { return "vehicle-accessories"; }
|
|
119
125
|
static get encapsulation() { return "shadow"; }
|
|
@@ -207,6 +213,27 @@ export class VehicleAccessories {
|
|
|
207
213
|
"reflect": false,
|
|
208
214
|
"defaultValue": "'en'"
|
|
209
215
|
},
|
|
216
|
+
"errorCallback": {
|
|
217
|
+
"type": "unknown",
|
|
218
|
+
"mutable": false,
|
|
219
|
+
"complexType": {
|
|
220
|
+
"original": "(errorMessage: ErrorKeys) => void",
|
|
221
|
+
"resolved": "(errorMessage: ErrorKeys) => void",
|
|
222
|
+
"references": {
|
|
223
|
+
"ErrorKeys": {
|
|
224
|
+
"location": "import",
|
|
225
|
+
"path": "~types/locales",
|
|
226
|
+
"id": "src/global/types/locales/index.ts::ErrorKeys"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": ""
|
|
235
|
+
}
|
|
236
|
+
},
|
|
210
237
|
"loadingStateChange": {
|
|
211
238
|
"type": "unknown",
|
|
212
239
|
"mutable": false,
|
|
@@ -291,6 +318,32 @@ export class VehicleAccessories {
|
|
|
291
318
|
"tags": []
|
|
292
319
|
}
|
|
293
320
|
},
|
|
321
|
+
"setErrorMessage": {
|
|
322
|
+
"complexType": {
|
|
323
|
+
"signature": "(message: ErrorKeys) => Promise<void>",
|
|
324
|
+
"parameters": [{
|
|
325
|
+
"name": "message",
|
|
326
|
+
"type": "OptionalKeys<{ wildCard: string; noBaseUrl: string; invalidVin: string; vinNumberRequired: string; partNumberRequired: string; noServiceAvailable: string; wrongResponseFormat: string; requestFailedPleaseTryAgainLater: string; }>",
|
|
327
|
+
"docs": ""
|
|
328
|
+
}],
|
|
329
|
+
"references": {
|
|
330
|
+
"Promise": {
|
|
331
|
+
"location": "global",
|
|
332
|
+
"id": "global::Promise"
|
|
333
|
+
},
|
|
334
|
+
"ErrorKeys": {
|
|
335
|
+
"location": "import",
|
|
336
|
+
"path": "~types/locales",
|
|
337
|
+
"id": "src/global/types/locales/index.ts::ErrorKeys"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"return": "Promise<void>"
|
|
341
|
+
},
|
|
342
|
+
"docs": {
|
|
343
|
+
"text": "",
|
|
344
|
+
"tags": []
|
|
345
|
+
}
|
|
346
|
+
},
|
|
294
347
|
"fetchData": {
|
|
295
348
|
"complexType": {
|
|
296
349
|
"signature": "(requestedVin?: string, headers?: any) => Promise<void>",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{display:block}.static{position:static}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\[12px\]{margin-top:12px}.flex{display:flex}.table{display:table}.h-0{height:0}.h-\[40px\]{height:40px}.h-\[80px\]{height:80px}.max-h-\[70dvh\]{max-height:70dvh}.min-h-\[100px\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\[4px\]{border-radius:4px}.rounded-\[8px\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\[\#d6d8dc\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\[\#e1e3e5\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[16px\]{padding-left:16px;padding-right:16px}.py
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{display:block}.static{position:static}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\[12px\]{margin-top:12px}.flex{display:flex}.table{display:table}.h-0{height:0}.h-\[40px\]{height:40px}.h-\[80px\]{height:80px}.max-h-\[70dvh\]{max-height:70dvh}.min-h-\[100px\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\[4px\]{border-radius:4px}.rounded-\[8px\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\[\#d6d8dc\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\[\#e1e3e5\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[16px\]{padding-left:16px;padding-right:16px}.py-\[16px\]{padding-bottom:16px;padding-top:16px}.py-\[20px\]{padding-bottom:20px;padding-top:20px}.py-\[8px\]{padding-bottom:8px;padding-top:8px}.pt-\[4px\]{padding-top:4px}.text-center{text-align:center}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.font-bold{font-weight:700}.text-\[\#383c43\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}
|
|
@@ -5,74 +5,87 @@
|
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
6
|
import cn from "../../global/lib/cn";
|
|
7
7
|
import validateVin from "../../global/lib/validate-vin";
|
|
8
|
+
import { getLocaleLanguage } from "../../global/lib/get-local-language";
|
|
9
|
+
import { localeSchema } from "../../global/types/locales/index";
|
|
10
|
+
const componentTags = {
|
|
11
|
+
dynamicClaim: 'dynamic-claim',
|
|
12
|
+
paintThickness: 'paint-thickness',
|
|
13
|
+
serviceHistory: 'service-history',
|
|
14
|
+
warrantyDetails: 'warranty-details',
|
|
15
|
+
vehicleAccessories: 'vehicle-accessories',
|
|
16
|
+
vehicleSpecification: 'vehicle-specification',
|
|
17
|
+
};
|
|
8
18
|
export class VehicleLookup {
|
|
9
19
|
constructor() {
|
|
20
|
+
this.syncErrorAcrossComponents = (newErrorMessage) => {
|
|
21
|
+
Object.values(this.componentsList).forEach(element => {
|
|
22
|
+
if (element)
|
|
23
|
+
element.setErrorMessage(newErrorMessage);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
this.loadingStateChangingMiddleware = (newState) => {
|
|
27
|
+
if (this.loadingStateChanged)
|
|
28
|
+
this.loadingStateChanged(newState);
|
|
29
|
+
if (this.blazorRef && this.blazorOnLoadingStateChange)
|
|
30
|
+
this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange, newState);
|
|
31
|
+
};
|
|
10
32
|
this.activeElement = '';
|
|
11
33
|
this.baseUrl = '';
|
|
12
34
|
this.isDev = false;
|
|
13
35
|
this.queryString = '';
|
|
14
36
|
this.language = 'en';
|
|
15
37
|
this.blazorErrorStateListener = '';
|
|
38
|
+
this.childrenProps = undefined;
|
|
16
39
|
this.blazorOnLoadingStateChange = '';
|
|
17
40
|
this.errorStateListener = undefined;
|
|
18
41
|
this.loadingStateChanged = undefined;
|
|
19
42
|
this.wrapperErrorState = '';
|
|
20
43
|
this.blazorRef = undefined;
|
|
44
|
+
this.locale = localeSchema.getDefault();
|
|
45
|
+
}
|
|
46
|
+
async componentWillLoad() {
|
|
47
|
+
await this.changeLanguage(this.language);
|
|
48
|
+
}
|
|
49
|
+
async changeLanguage(newLanguage) {
|
|
50
|
+
this.locale = await getLocaleLanguage(newLanguage);
|
|
21
51
|
}
|
|
22
52
|
async componentDidLoad() {
|
|
23
|
-
const
|
|
24
|
-
const vehicleAccessories = this.el.getElementsByTagName('vehicle-accessories')[0];
|
|
25
|
-
const vehicleDetails = this.el.getElementsByTagName('warranty-details')[0];
|
|
53
|
+
const vehicleClaim = this.el.getElementsByTagName('dynamic-claim')[0];
|
|
26
54
|
const vehicleHistory = this.el.getElementsByTagName('service-history')[0];
|
|
27
55
|
const vehicleThickness = this.el.getElementsByTagName('paint-thickness')[0];
|
|
28
|
-
const
|
|
56
|
+
const vehicleDetails = this.el.getElementsByTagName('warranty-details')[0];
|
|
57
|
+
const vehicleAccessories = this.el.getElementsByTagName('vehicle-accessories')[0];
|
|
58
|
+
const vehicleSpecification = this.el.getElementsByTagName('vehicle-specification')[0];
|
|
29
59
|
this.componentsList = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
60
|
+
[componentTags.dynamicClaim]: vehicleClaim,
|
|
61
|
+
[componentTags.serviceHistory]: vehicleHistory,
|
|
62
|
+
[componentTags.warrantyDetails]: vehicleDetails,
|
|
63
|
+
[componentTags.paintThickness]: vehicleThickness,
|
|
64
|
+
[componentTags.vehicleAccessories]: vehicleAccessories,
|
|
65
|
+
[componentTags.vehicleSpecification]: vehicleSpecification,
|
|
36
66
|
};
|
|
37
67
|
Object.values(this.componentsList).forEach(element => {
|
|
38
68
|
if (!element)
|
|
39
69
|
return;
|
|
40
|
-
|
|
41
|
-
|
|
70
|
+
element.errorCallback = this.syncErrorAcrossComponents;
|
|
71
|
+
element.loadingStateChange = this.loadingStateChangingMiddleware;
|
|
42
72
|
element.loadedResponse = newResponse => this.handleLoadData(newResponse, element);
|
|
43
73
|
});
|
|
44
74
|
}
|
|
75
|
+
handleLoadData(newResponse, activeElement) {
|
|
76
|
+
Object.values(this.componentsList).forEach(element => {
|
|
77
|
+
if (element !== null && element !== activeElement && newResponse)
|
|
78
|
+
element.setData(newResponse);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
45
81
|
async errorListener(newState) {
|
|
46
82
|
if (this.errorStateListener)
|
|
47
83
|
this.errorStateListener(newState);
|
|
48
84
|
if (this.blazorRef && this.blazorErrorStateListener)
|
|
49
85
|
this.blazorRef.invokeMethodAsync(this.blazorErrorStateListener, newState);
|
|
50
86
|
}
|
|
51
|
-
async handleLoadingListenerPropChange(newProp) {
|
|
52
|
-
Object.values(this.componentsList).forEach(element => {
|
|
53
|
-
if (!element)
|
|
54
|
-
return;
|
|
55
|
-
element.loadingStateChange = newProp;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
async handleBlazorLoadingRefChange(loadingInvokeRef) {
|
|
59
|
-
if (this.blazorRef) {
|
|
60
|
-
Object.values(this.componentsList).forEach(element => {
|
|
61
|
-
if (!element)
|
|
62
|
-
return;
|
|
63
|
-
element.loadingStateChange = newState => this.blazorRef.invokeMethodAsync(loadingInvokeRef, newState);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
87
|
async setBlazorRef(newBlazorRef) {
|
|
68
88
|
this.blazorRef = newBlazorRef;
|
|
69
|
-
if (this.blazorOnLoadingStateChange) {
|
|
70
|
-
Object.values(this.componentsList).forEach(element => {
|
|
71
|
-
if (!element)
|
|
72
|
-
return;
|
|
73
|
-
element.loadingStateChange = newState => this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange, newState);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
89
|
}
|
|
77
90
|
async fetchVin(vin, headers = {}) {
|
|
78
91
|
const activeElement = this.componentsList[this.activeElement] || null;
|
|
@@ -80,22 +93,37 @@ export class VehicleLookup {
|
|
|
80
93
|
if (!activeElement)
|
|
81
94
|
return;
|
|
82
95
|
if (vin == '')
|
|
83
|
-
return (this.wrapperErrorState =
|
|
96
|
+
return (this.wrapperErrorState = this.locale.errors.vinNumberRequired);
|
|
84
97
|
if (!validateVin(vin))
|
|
85
|
-
return (this.wrapperErrorState =
|
|
98
|
+
return (this.wrapperErrorState = this.locale.errors.invalidVin);
|
|
86
99
|
activeElement.fetchData(vin, headers);
|
|
87
100
|
}
|
|
88
|
-
async getPageContext() {
|
|
89
|
-
return { componentsList: this.componentsList };
|
|
90
|
-
}
|
|
91
|
-
handleLoadData(newResponse, activeElement) {
|
|
92
|
-
Object.values(this.componentsList).forEach(element => {
|
|
93
|
-
if (element !== null && element !== activeElement && newResponse)
|
|
94
|
-
element.setData(newResponse);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
101
|
render() {
|
|
98
|
-
|
|
102
|
+
const props = {
|
|
103
|
+
[componentTags.dynamicClaim]: {},
|
|
104
|
+
[componentTags.paintThickness]: {},
|
|
105
|
+
[componentTags.serviceHistory]: {},
|
|
106
|
+
[componentTags.warrantyDetails]: {},
|
|
107
|
+
[componentTags.vehicleAccessories]: {},
|
|
108
|
+
[componentTags.vehicleSpecification]: {},
|
|
109
|
+
};
|
|
110
|
+
try {
|
|
111
|
+
if (this.childrenProps) {
|
|
112
|
+
let parsedProps = {};
|
|
113
|
+
if (typeof this.childrenProps === 'string')
|
|
114
|
+
parsedProps = JSON.parse(this.childrenProps);
|
|
115
|
+
else if (typeof this.childrenProps === 'object')
|
|
116
|
+
parsedProps = this.childrenProps;
|
|
117
|
+
Object.keys(props).forEach(key => {
|
|
118
|
+
if (typeof parsedProps[key] === 'object')
|
|
119
|
+
props[key] = parsedProps[key];
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
console.error(error);
|
|
125
|
+
}
|
|
126
|
+
return (h(Host, { key: 'e284354c118959a488cc2b0a3c417ef6fdb341b7' }, h("div", { key: '98c852608682c7fd125ff2a5b8be6bc4b2ea084d', class: cn('w-full', { hidden: this.activeElement !== componentTags.vehicleSpecification }) }, h("vehicle-specification", Object.assign({ key: '22afb7982bf095f7faa82796f39d810b55df1623', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.vehicleSpecification]))), h("div", { key: '4d3bc76212cd6315f15e3913bf2be337c314ff9f', class: cn('w-full', { hidden: this.activeElement !== componentTags.vehicleAccessories }) }, h("vehicle-accessories", Object.assign({ key: 'b28c3b612526eab03717873414ab483f768d6df6', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.vehicleAccessories]))), h("div", { key: 'ba95ea2b9d2ec4d9c3fb03f011dfd11ae7c83730', class: cn('w-full', { hidden: this.activeElement !== componentTags.warrantyDetails }) }, h("warranty-details", Object.assign({ key: 'f65cee7a8161bd8380ae0c85cbc1d94681554961', "show-ssc": "true", "show-warranty": "true", "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.warrantyDetails]), h("slot", { key: 'da97447c8d7d5913dbbcb1d1003038104b432267' }))), h("div", { key: 'cb9bd440c355bc43b04210f704c042f4cf8bcbe9', class: cn('w-full', { hidden: this.activeElement !== componentTags.serviceHistory }) }, h("service-history", Object.assign({ key: 'f785b0cbbf272662a752a061b8c97fd72ab901c3', language: this.language, "base-url": this.baseUrl, "query-string": this.queryString }, props[componentTags.serviceHistory]))), h("div", { key: '9e658efd82245b13a452fa857f6736913e466977', class: cn('w-full', { hidden: this.activeElement !== componentTags.paintThickness }) }, h("paint-thickness", Object.assign({ key: '2dbcdae4d28a46c63093cbdbe6f663beed967e33', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.paintThickness]))), h("div", { key: '8c20706cfc6862c2955ada0b50f06fd2a335656b', class: cn('w-full', { hidden: this.activeElement !== componentTags.dynamicClaim }) }, h("dynamic-claim", Object.assign({ key: 'e840b4039bb6fa753a735d674ed091c4d830d5a9' }, props[componentTags.dynamicClaim], { language: this.language, "base-url": this.baseUrl, "query-string": this.queryString })))));
|
|
99
127
|
}
|
|
100
128
|
static get is() { return "vehicle-lookup"; }
|
|
101
129
|
static get originalStyleUrls() {
|
|
@@ -230,6 +258,28 @@ export class VehicleLookup {
|
|
|
230
258
|
"reflect": false,
|
|
231
259
|
"defaultValue": "''"
|
|
232
260
|
},
|
|
261
|
+
"childrenProps": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "string | Object",
|
|
266
|
+
"resolved": "Object | string",
|
|
267
|
+
"references": {
|
|
268
|
+
"Object": {
|
|
269
|
+
"location": "global",
|
|
270
|
+
"id": "global::Object"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": true,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [],
|
|
278
|
+
"text": ""
|
|
279
|
+
},
|
|
280
|
+
"attribute": "children-props",
|
|
281
|
+
"reflect": false
|
|
282
|
+
},
|
|
233
283
|
"blazorOnLoadingStateChange": {
|
|
234
284
|
"type": "string",
|
|
235
285
|
"mutable": false,
|
|
@@ -283,7 +333,8 @@ export class VehicleLookup {
|
|
|
283
333
|
static get states() {
|
|
284
334
|
return {
|
|
285
335
|
"wrapperErrorState": {},
|
|
286
|
-
"blazorRef": {}
|
|
336
|
+
"blazorRef": {},
|
|
337
|
+
"locale": {}
|
|
287
338
|
};
|
|
288
339
|
}
|
|
289
340
|
static get methods() {
|
|
@@ -316,7 +367,7 @@ export class VehicleLookup {
|
|
|
316
367
|
},
|
|
317
368
|
"fetchVin": {
|
|
318
369
|
"complexType": {
|
|
319
|
-
"signature": "(vin: string, headers?: any) => Promise
|
|
370
|
+
"signature": "(vin: string, headers?: any) => Promise<string>",
|
|
320
371
|
"parameters": [{
|
|
321
372
|
"name": "vin",
|
|
322
373
|
"type": "string",
|
|
@@ -332,29 +383,7 @@ export class VehicleLookup {
|
|
|
332
383
|
"id": "global::Promise"
|
|
333
384
|
}
|
|
334
385
|
},
|
|
335
|
-
"return": "Promise
|
|
336
|
-
},
|
|
337
|
-
"docs": {
|
|
338
|
-
"text": "",
|
|
339
|
-
"tags": []
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
"getPageContext": {
|
|
343
|
-
"complexType": {
|
|
344
|
-
"signature": "() => Promise<{ componentsList: ComponentMap; }>",
|
|
345
|
-
"parameters": [],
|
|
346
|
-
"references": {
|
|
347
|
-
"Promise": {
|
|
348
|
-
"location": "global",
|
|
349
|
-
"id": "global::Promise"
|
|
350
|
-
},
|
|
351
|
-
"ComponentMap": {
|
|
352
|
-
"location": "local",
|
|
353
|
-
"path": "/home/vsts/work/1/s/src/components/vehicle-lookup/vehicle-lookup.tsx",
|
|
354
|
-
"id": "src/components/vehicle-lookup/vehicle-lookup.tsx::ComponentMap"
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
"return": "Promise<{ componentsList: ComponentMap; }>"
|
|
386
|
+
"return": "Promise<string>"
|
|
358
387
|
},
|
|
359
388
|
"docs": {
|
|
360
389
|
"text": "",
|
|
@@ -366,14 +395,11 @@ export class VehicleLookup {
|
|
|
366
395
|
static get elementRef() { return "el"; }
|
|
367
396
|
static get watchers() {
|
|
368
397
|
return [{
|
|
398
|
+
"propName": "language",
|
|
399
|
+
"methodName": "changeLanguage"
|
|
400
|
+
}, {
|
|
369
401
|
"propName": "wrapperErrorState",
|
|
370
402
|
"methodName": "errorListener"
|
|
371
|
-
}, {
|
|
372
|
-
"propName": "onLoadingStateChanged",
|
|
373
|
-
"methodName": "handleLoadingListenerPropChange"
|
|
374
|
-
}, {
|
|
375
|
-
"propName": "blazorOnLoadingStateChange",
|
|
376
|
-
"methodName": "handleBlazorLoadingRefChange"
|
|
377
403
|
}];
|
|
378
404
|
}
|
|
379
405
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\[12px\]{margin-top:12px}.flex{display:flex}.table{display:table}.h-0{height:0}.h-\[40px\]{height:40px}.h-\[80px\]{height:80px}.max-h-\[70dvh\]{max-height:70dvh}.min-h-\[100px\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\[4px\]{border-radius:4px}.rounded-\[8px\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\[\#d6d8dc\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\[\#e1e3e5\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[16px\]{padding-left:16px;padding-right:16px}.py
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\[12px\]{margin-top:12px}.flex{display:flex}.table{display:table}.h-0{height:0}.h-\[40px\]{height:40px}.h-\[80px\]{height:80px}.max-h-\[70dvh\]{max-height:70dvh}.min-h-\[100px\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\[4px\]{border-radius:4px}.rounded-\[8px\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\[\#d6d8dc\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\[\#e1e3e5\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\[10px\]{padding-left:10px;padding-right:10px}.px-\[16px\]{padding-left:16px;padding-right:16px}.py-\[16px\]{padding-bottom:16px;padding-top:16px}.py-\[20px\]{padding-bottom:20px;padding-top:20px}.py-\[8px\]{padding-bottom:8px;padding-top:8px}.pt-\[4px\]{padding-top:4px}.text-center{text-align:center}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.font-bold{font-weight:700}.text-\[\#383c43\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\[40px\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}.duration-100{transition-duration:.1s}
|
|
@@ -15,6 +15,7 @@ export class VehicleSpecification {
|
|
|
15
15
|
this.isDev = false;
|
|
16
16
|
this.queryString = '';
|
|
17
17
|
this.language = 'en';
|
|
18
|
+
this.errorCallback = undefined;
|
|
18
19
|
this.loadingStateChange = undefined;
|
|
19
20
|
this.loadedResponse = undefined;
|
|
20
21
|
this.locale = localeSchema.getDefault();
|
|
@@ -64,12 +65,17 @@ export class VehicleSpecification {
|
|
|
64
65
|
catch (error) {
|
|
65
66
|
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
66
67
|
return;
|
|
68
|
+
if (this.errorCallback)
|
|
69
|
+
this.errorCallback(error.message);
|
|
67
70
|
console.error(error);
|
|
68
|
-
this.
|
|
69
|
-
this.vehicleInformation = null;
|
|
70
|
-
this.errorMessage = error.message;
|
|
71
|
+
this.setErrorMessage(error.message);
|
|
71
72
|
}
|
|
72
73
|
}
|
|
74
|
+
async setErrorMessage(message) {
|
|
75
|
+
this.state = 'error';
|
|
76
|
+
this.vehicleInformation = null;
|
|
77
|
+
this.errorMessage = message;
|
|
78
|
+
}
|
|
73
79
|
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
74
80
|
await this.setData(requestedVin, headers);
|
|
75
81
|
}
|
|
@@ -83,7 +89,7 @@ export class VehicleSpecification {
|
|
|
83
89
|
render() {
|
|
84
90
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
85
91
|
const texts = this.locale.vehicleLookup.specification;
|
|
86
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '10d7da29405e9f6f059789bfe4cabb9de999fd7d' }, h("div", { key: 'b4aaaa70893040e56373280e8b1826f2111dc795', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '5447aceb47b1ff56de869f2bdc2ceea41fad8d00' }, h(Loading, { key: 'e5afa11e2072dce52cb0c744c2715bc222373b18', isLoading: this.state.includes('loading') }), h("div", { key: '8ef1c896ac4234bb3aeec3df8241b5d461bb3267', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '5ee0f72bbf2f6c0d79ca4e8aa38067a244c680cd', 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: '8ff294c1b333731612c0baec23409c0c9d7f6db1', class: "py-[16px] min-h-[100px] flex items-center" }, h("div", { key: '4d61facf67dda7aeda382623017c2e0c380ad90f', class: "px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.locale.errors.wildCard))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: 'ccba81927f973552d7cf4d4727d4f460c7a08deb', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '1202f36fafd59fb69f99e36d714ca1a4cd8e9593', 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: 'd61786575ebde339955d5e2dfe8888d76a759785', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && h("div", { key: '99ad46e48a387c4aa3a51d0e80bd1838ae276036', 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: 'bdf3c84ac4f92ac37025066133fdbe29bac511cf', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '638a5a952ff2ae5321416ab7ab506bc5d716580a', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: 'd6566deba126815e6e3dc919ae23a5c0d4c59e91' }, ['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: 'f0fb82022c9e714bd6de988de9b91e82d8dc3af0' }, h("tr", { key: '1fb11f4f0bf979225fd299fe76c41f8b2f4312b8' }, h("td", { key: '6eee318f27ba96ce39cfb32249a7b9a2286414fe', 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: '884eabac1cce2f941e1cf46127be3a4052678ed8', 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: 'a1fcf0dc949a213d95a4db18402fdbe3fb5118ed', 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: '93f5e7d8d067f4c1acfc1adf87d8c43b94d83a59' }), ((_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 => {
|
|
87
93
|
var _a;
|
|
88
94
|
const [place, field] = infoPath.split('.');
|
|
89
95
|
const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
|
|
@@ -182,6 +188,27 @@ export class VehicleSpecification {
|
|
|
182
188
|
"reflect": false,
|
|
183
189
|
"defaultValue": "'en'"
|
|
184
190
|
},
|
|
191
|
+
"errorCallback": {
|
|
192
|
+
"type": "unknown",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "(errorMessage: ErrorKeys) => void",
|
|
196
|
+
"resolved": "(errorMessage: ErrorKeys) => void",
|
|
197
|
+
"references": {
|
|
198
|
+
"ErrorKeys": {
|
|
199
|
+
"location": "import",
|
|
200
|
+
"path": "~types/locales",
|
|
201
|
+
"id": "src/global/types/locales/index.ts::ErrorKeys"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": ""
|
|
210
|
+
}
|
|
211
|
+
},
|
|
185
212
|
"loadingStateChange": {
|
|
186
213
|
"type": "unknown",
|
|
187
214
|
"mutable": false,
|
|
@@ -265,6 +292,32 @@ export class VehicleSpecification {
|
|
|
265
292
|
"tags": []
|
|
266
293
|
}
|
|
267
294
|
},
|
|
295
|
+
"setErrorMessage": {
|
|
296
|
+
"complexType": {
|
|
297
|
+
"signature": "(message: ErrorKeys) => Promise<void>",
|
|
298
|
+
"parameters": [{
|
|
299
|
+
"name": "message",
|
|
300
|
+
"type": "OptionalKeys<{ wildCard: string; noBaseUrl: string; invalidVin: string; vinNumberRequired: string; partNumberRequired: string; noServiceAvailable: string; wrongResponseFormat: string; requestFailedPleaseTryAgainLater: string; }>",
|
|
301
|
+
"docs": ""
|
|
302
|
+
}],
|
|
303
|
+
"references": {
|
|
304
|
+
"Promise": {
|
|
305
|
+
"location": "global",
|
|
306
|
+
"id": "global::Promise"
|
|
307
|
+
},
|
|
308
|
+
"ErrorKeys": {
|
|
309
|
+
"location": "import",
|
|
310
|
+
"path": "~types/locales",
|
|
311
|
+
"id": "src/global/types/locales/index.ts::ErrorKeys"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"return": "Promise<void>"
|
|
315
|
+
},
|
|
316
|
+
"docs": {
|
|
317
|
+
"text": "",
|
|
318
|
+
"tags": []
|
|
319
|
+
}
|
|
320
|
+
},
|
|
268
321
|
"fetchData": {
|
|
269
322
|
"complexType": {
|
|
270
323
|
"signature": "(requestedVin?: string, headers?: any) => Promise<void>",
|