adp-web-components 0.0.12 → 0.0.15
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/{loader-baf2418b.js → Loading-20e4ef35.js} +9 -0
- package/dist/cjs/dead-stock-lookup.cjs.entry.js +24 -13
- package/dist/cjs/distributor-lookup.cjs.entry.js +27 -18
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +1046 -0
- package/dist/cjs/dynamic-redeem.cjs.entry.js +5 -5
- package/dist/cjs/form-input.cjs.entry.js +2 -2
- package/dist/cjs/general-inquiry-form.cjs.entry.js +2 -2
- package/dist/cjs/{index-d4b5214c.js → index-97b8da6d.js} +289 -8
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +4 -18
- package/dist/cjs/shift-components.cjs.js +2 -2
- package/dist/cjs/vehicle-lookup.cjs.entry.js +133 -0
- package/dist/collection/collection-manifest.json +6 -5
- package/dist/collection/components/dynamic-claim/dynamic-claim.css +1 -1
- package/dist/collection/components/dynamic-claim/dynamic-claim.js +2 -2
- package/dist/collection/components/dynamic-redeem/dynamic-redeem.css +1 -1
- package/dist/collection/components/dynamic-redeem/dynamic-redeem.js +3 -3
- package/dist/collection/components/form-input/form-input.js +1 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.js +1 -1
- package/dist/collection/components/paint-thickness/paint-thickness.css +1 -1
- package/dist/collection/components/paint-thickness/paint-thickness.js +3 -16
- package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +34 -23
- package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.js +24 -14
- package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +1 -14
- package/dist/collection/components/service-history/service-history.css +1 -1
- package/dist/collection/components/service-history/service-history.js +1 -14
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.css +1 -1
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.js +3 -16
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -0
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +244 -0
- package/dist/collection/components/vehicle-specification/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-specification/vehicle-specification.js +1 -14
- package/dist/collection/components/warranty-details/warranty-details.css +1 -1
- package/dist/collection/components/warranty-details/warranty-details.js +7 -34
- package/dist/collection/global/lib/validate-vin.js +62 -0
- package/dist/collection/templates/vehicle-lookup.js +163 -96
- 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-05871c28.js +5 -0
- package/dist/components/p-23551e81.js +5 -0
- package/dist/components/p-325b6857.js +5 -0
- package/dist/components/{p-50f73226.js → p-3bf0339d.js} +1 -1
- package/dist/components/p-514c4736.js +5 -0
- package/dist/components/{p-2b0cc0c6.js → p-8385e385.js} +1 -1
- package/dist/components/p-be0a5ab5.js +5 -0
- package/dist/components/p-c8eef708.js +5 -0
- package/dist/components/p-da533bd7.js +5 -0
- package/dist/components/p-e46b126e.js +5 -0
- package/dist/components/p-f1ffc23d.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.d.ts +11 -0
- package/dist/components/vehicle-lookup.js +5 -0
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/{loader-027b88af.js → Loading-d050617c.js} +9 -1
- package/dist/esm/dead-stock-lookup.entry.js +24 -13
- package/dist/esm/distributor-lookup.entry.js +27 -18
- package/dist/esm/dynamic-claim_6.entry.js +1037 -0
- package/dist/esm/dynamic-redeem.entry.js +5 -5
- package/dist/esm/form-input.entry.js +2 -2
- package/dist/esm/general-inquiry-form.entry.js +2 -2
- package/dist/esm/{index-ef54644b.js → index-ff1dab22.js} +289 -8
- package/dist/esm/loader.js +3 -3
- package/dist/esm/manufacturer-lookup.entry.js +4 -18
- package/dist/esm/shift-components.js +3 -3
- package/dist/esm/vehicle-lookup.entry.js +129 -0
- package/dist/shift-components/{p-894e7518.entry.js → p-15e82b1a.entry.js} +1 -1
- package/dist/shift-components/p-1a727cfd.entry.js +5 -0
- package/dist/shift-components/p-2bb4415e.entry.js +5 -0
- package/dist/shift-components/p-3f3b41b4.entry.js +5 -0
- package/dist/shift-components/{p-8e818568.entry.js → p-4c3f2850.entry.js} +1 -1
- package/dist/shift-components/p-4ca95c3d.entry.js +5 -0
- package/dist/shift-components/p-65939a2f.js +5 -0
- package/dist/shift-components/p-8b198a04.entry.js +5 -0
- package/dist/shift-components/p-d577db71.entry.js +5 -0
- package/dist/shift-components/p-f37b60d5.js +6 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/part-lookup/dead-stock-lookup.d.ts +2 -3
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +23 -0
- package/dist/types/components/warranty-details/warranty-details.d.ts +1 -2
- package/dist/types/components.d.ts +37 -0
- package/dist/types/global/lib/validate-vin.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +2 -91
- package/dist/cjs/Loading-ee1a2ceb.js +0 -16
- package/dist/cjs/dynamic-claim.cjs.entry.js +0 -306
- package/dist/cjs/image-expansion-a9c9c6f7.js +0 -77
- package/dist/cjs/paint-thickness.cjs.entry.js +0 -131
- package/dist/cjs/service-history.cjs.entry.js +0 -116
- package/dist/cjs/vehicle-accessories.cjs.entry.js +0 -135
- package/dist/cjs/vehicle-specification.cjs.entry.js +0 -111
- package/dist/cjs/vehicleInformation-35c470fc.js +0 -52
- package/dist/cjs/warranty-details.cjs.entry.js +0 -281
- package/dist/components/p-4dc47f5f.js +0 -5
- package/dist/components/p-8375923d.js +0 -5
- package/dist/components/p-a454210b.js +0 -5
- package/dist/esm/Loading-61648252.js +0 -14
- package/dist/esm/dynamic-claim.entry.js +0 -302
- package/dist/esm/image-expansion-08c4bf0d.js +0 -73
- package/dist/esm/paint-thickness.entry.js +0 -127
- package/dist/esm/service-history.entry.js +0 -112
- package/dist/esm/vehicle-accessories.entry.js +0 -131
- package/dist/esm/vehicle-specification.entry.js +0 -107
- package/dist/esm/vehicleInformation-f7290628.js +0 -50
- package/dist/esm/warranty-details.entry.js +0 -277
- package/dist/shift-components/p-2e3e8e97.entry.js +0 -5
- package/dist/shift-components/p-3bfafc40.entry.js +0 -5
- package/dist/shift-components/p-65e6ab8e.js +0 -5
- package/dist/shift-components/p-75ea0e53.entry.js +0 -5
- package/dist/shift-components/p-91eff216.entry.js +0 -5
- package/dist/shift-components/p-a21e2e2e.js +0 -5
- package/dist/shift-components/p-c274f4ba.entry.js +0 -5
- package/dist/shift-components/p-c4fad245.js +0 -5
- package/dist/shift-components/p-ca1e2e5b.entry.js +0 -5
- package/dist/shift-components/p-d5ff7544.js +0 -5
- package/dist/shift-components/p-e97316d2.js +0 -6
- package/dist/shift-components/p-ec9302fb.entry.js +0 -5
- package/dist/shift-components/p-f21722ce.entry.js +0 -5
- package/dist/shift-components/p-f95c7501.entry.js +0 -5
- package/dist/shift-components/p-feb3df85.entry.js +0 -5
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-d4b5214c.js');
|
|
10
|
-
const Loading = require('./Loading-ee1a2ceb.js');
|
|
11
|
-
const cn = require('./cn-f559f9e5.js');
|
|
12
|
-
const vehicleInformation = require('./vehicleInformation-35c470fc.js');
|
|
13
|
-
require('./loader-baf2418b.js');
|
|
14
|
-
|
|
15
|
-
const serviceHistoryCss = "*,: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-scroll-snap-strictness:proximity;--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;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-scroll-snap-strictness:proximity;--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;}/*! 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}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.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}.w-full{width:100%}.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-none{border-style:none!important}.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)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.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}";
|
|
16
|
-
const ServiceHistoryStyle0 = serviceHistoryCss;
|
|
17
|
-
|
|
18
|
-
let mockData = {};
|
|
19
|
-
const ServiceHistory = class {
|
|
20
|
-
constructor(hostRef) {
|
|
21
|
-
index.registerInstance(this, hostRef);
|
|
22
|
-
this.baseUrl = '';
|
|
23
|
-
this.isDev = false;
|
|
24
|
-
this.queryString = '';
|
|
25
|
-
this.loadingStateChange = undefined;
|
|
26
|
-
this.loadedResponse = undefined;
|
|
27
|
-
this.state = 'idle';
|
|
28
|
-
this.externalVin = null;
|
|
29
|
-
this.errorMessage = null;
|
|
30
|
-
this.vehicleInformation = undefined;
|
|
31
|
-
}
|
|
32
|
-
handleSettingData(response) {
|
|
33
|
-
if (response.serviceHistory === null)
|
|
34
|
-
response.serviceHistory = [];
|
|
35
|
-
this.vehicleInformation = response;
|
|
36
|
-
}
|
|
37
|
-
async setData(newData, headers = {}) {
|
|
38
|
-
clearTimeout(this.networkTimeoutRef);
|
|
39
|
-
if (this.abortController)
|
|
40
|
-
this.abortController.abort();
|
|
41
|
-
this.abortController = new AbortController();
|
|
42
|
-
let scopedTimeoutRef;
|
|
43
|
-
const isVinRequest = typeof newData === 'string';
|
|
44
|
-
const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
|
|
45
|
-
this.externalVin = vin;
|
|
46
|
-
try {
|
|
47
|
-
if (!vin || vin.trim().length === 0) {
|
|
48
|
-
//this.componentHeight = '0px';
|
|
49
|
-
this.state = 'idle';
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (this.state === 'data' || this.state === 'error') {
|
|
53
|
-
this.state = (this.state + '-loading');
|
|
54
|
-
}
|
|
55
|
-
else
|
|
56
|
-
this.state = 'loading';
|
|
57
|
-
await new Promise(r => {
|
|
58
|
-
scopedTimeoutRef = setTimeout(r, 700);
|
|
59
|
-
this.networkTimeoutRef = scopedTimeoutRef;
|
|
60
|
-
});
|
|
61
|
-
const vehicleResponse = isVinRequest ? await vehicleInformation.getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
62
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
63
|
-
if (!vehicleResponse)
|
|
64
|
-
throw new Error('Wrong response format');
|
|
65
|
-
this.handleSettingData(vehicleResponse);
|
|
66
|
-
}
|
|
67
|
-
this.errorMessage = null;
|
|
68
|
-
this.state = 'data';
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
72
|
-
return;
|
|
73
|
-
this.state = 'error';
|
|
74
|
-
this.vehicleInformation = null;
|
|
75
|
-
this.errorMessage = error.message;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
79
|
-
await this.setData(requestedVin, headers);
|
|
80
|
-
}
|
|
81
|
-
//calculateHeight(componentState: string) {
|
|
82
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
83
|
-
// this.componentHeight = '100px';
|
|
84
|
-
// } else if (componentState !== 'idle') {
|
|
85
|
-
// setTimeout(() => {
|
|
86
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
87
|
-
// }, 50);
|
|
88
|
-
// } else {
|
|
89
|
-
// this.componentHeight = '0px';
|
|
90
|
-
// }
|
|
91
|
-
//}
|
|
92
|
-
async loadingListener() {
|
|
93
|
-
//this.calculateHeight(newState);
|
|
94
|
-
if (this.loadingStateChange)
|
|
95
|
-
this.loadingStateChange(this.state.includes('loading'));
|
|
96
|
-
}
|
|
97
|
-
async setMockData(newMockData) {
|
|
98
|
-
mockData = newMockData;
|
|
99
|
-
}
|
|
100
|
-
render() {
|
|
101
|
-
var _a, _b, _c, _d;
|
|
102
|
-
return (index.h(index.Host, { key: '8e5ae0eaa05bf7f1365f5a16e31b4f546daa267b' }, index.h("div", { key: 'd097bff639f07f92245df5c7898ceb6375443826', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: 'd03547e52874be8356089f968292c7b330b4edef' }, index.h(Loading.Loading, { key: '6d13faffb586131276ab0dbbfe21afec97b0ec77', isLoading: this.state.includes('loading') }), index.h("div", { key: '68e8bcbf3590e50f8ed54389ebe3fe716e3da901', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, index.h("div", { key: '03cdb8690215c104f4e0253b29bbaf92f3dbb0d6', class: cn.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) && (index.h("div", { key: '32ccb311b5118329bbe9d04a29453e0a6360f88f', class: "py-[16px]" }, index.h("div", { key: '70595222071784b2708a7cc5e1a0ae3392498725', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '02426e89ded841b22db0af5ddc30c8cff1ba2426', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: '3060be4709758da0bc75d9a8cce3a4bff4530c98', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Service History"), index.h("div", { key: '377288b6e742f2fd9f06b2ca0920293437dd3968', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.serviceHistory.length) && index.h("div", { key: '5ed26853f4bf544b18fed55dc21a3c3a222ac5a3', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!((_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.serviceHistory.length) && (index.h("table", { key: 'a7995bb565c22d8594a5219d836396a3df1e53c6', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: '530da33ea34b28a82d23b509db1ba2fb7003b187', class: "top-0 font-bold sticky bg-white" }, index.h("tr", { key: '710aff75e258d6e408111b5e8442042440f7c29b' }, ['Branch', 'Dealer', 'Invoice No.', 'Date', 'Service Type', 'Odometer'].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: '68e5fda2e43df1c20550bada35bb17bc4393aa60' }, (_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.serviceHistory.map((service, idx) => (index.h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: service.invoiceNumber }, ['branchName', 'companyName', 'invoiceNumber', 'serviceDate', 'serviceType', 'mileage'].map(serviceType => {
|
|
103
|
-
var _a;
|
|
104
|
-
return (index.h("td", { key: service.invoiceNumber + serviceType, class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
105
|
-
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
106
|
-
}) }, service[serviceType] || '...'));
|
|
107
|
-
})))))))))))))));
|
|
108
|
-
}
|
|
109
|
-
get el() { return index.getElement(this); }
|
|
110
|
-
static get watchers() { return {
|
|
111
|
-
"state": ["loadingListener"]
|
|
112
|
-
}; }
|
|
113
|
-
};
|
|
114
|
-
ServiceHistory.style = ServiceHistoryStyle0;
|
|
115
|
-
|
|
116
|
-
exports.service_history = ServiceHistory;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-d4b5214c.js');
|
|
10
|
-
const vehicleInformation = require('./vehicleInformation-35c470fc.js');
|
|
11
|
-
const cn = require('./cn-f559f9e5.js');
|
|
12
|
-
const Loading = require('./Loading-ee1a2ceb.js');
|
|
13
|
-
const imageExpansion = require('./image-expansion-a9c9c6f7.js');
|
|
14
|
-
require('./loader-baf2418b.js');
|
|
15
|
-
|
|
16
|
-
const vehicleAccessoriesCss = "*,: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-scroll-snap-strictness:proximity;--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;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-scroll-snap-strictness:proximity;--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;}/*! 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}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.top-0{top:0}.z-40{z-index:40}.z-50{z-index:50}.float-right{float:right}.mx-auto{margin-left:auto;margin-right:auto}.mr-\\[16px\\]{margin-right:16px}.mt-\\[12px\\]{margin-top:12px}.mt-\\[16px\\]{margin-top:16px}.flex{display:flex}.table{display:table}.size-12{height:3rem;width:3rem}.size-full{height:100%;width:100%}.h-0{height:0}.h-1{height:.25rem}.h-\\[100dvh\\]{height:100dvh}.h-\\[40px\\]{height:40px}.h-\\[80px\\]{height:80px}.h-auto{height:auto}.max-h-\\[133px\\]{max-height:133px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-12{width:3rem}.w-\\[100dvw\\]{width:100dvw}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[133px\\]{max-width:133px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-rotate-45{--tw-rotate:-45deg}.-rotate-45,.rotate-45{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))}.rotate-45{--tw-rotate:45deg}.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))}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[4px\\]{gap:4px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.\\!border-none{border-style:none!important}.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-black\\/40{background-color:rgba(0,0,0,.4)}.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-\\[10px\\]{padding-bottom:10px;padding-top:10px}.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))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.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)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.delay-200{transition-delay:.2s}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\\:opacity-100:hover{opacity:1}.\\[\\&_div\\]\\:hover\\:\\!opacity-100:hover div{opacity:1!important}.\\[\\&_img\\]\\:hover\\:shadow-lg:hover img{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.size-\\[40px\\]{height:40px;width:40px}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}";
|
|
17
|
-
const VehicleAccessoriesStyle0 = vehicleAccessoriesCss;
|
|
18
|
-
|
|
19
|
-
let mockData = {};
|
|
20
|
-
const VehicleAccessories = class {
|
|
21
|
-
constructor(hostRef) {
|
|
22
|
-
index.registerInstance(this, hostRef);
|
|
23
|
-
this.closeImageListener = (event) => {
|
|
24
|
-
this.closeImage(event);
|
|
25
|
-
};
|
|
26
|
-
this.openImage = (target, imageSrc) => {
|
|
27
|
-
imageExpansion.openImageViewer(this, target, imageSrc);
|
|
28
|
-
};
|
|
29
|
-
this.closeImage = (event) => {
|
|
30
|
-
imageExpansion.closeImageViewer(this, event);
|
|
31
|
-
};
|
|
32
|
-
this.baseUrl = '';
|
|
33
|
-
this.isDev = false;
|
|
34
|
-
this.queryString = '';
|
|
35
|
-
this.loadingStateChange = undefined;
|
|
36
|
-
this.loadedResponse = undefined;
|
|
37
|
-
this.state = 'idle';
|
|
38
|
-
this.externalVin = null;
|
|
39
|
-
this.errorMessage = null;
|
|
40
|
-
this.expandedImage = null;
|
|
41
|
-
this.vehicleInformation = undefined;
|
|
42
|
-
}
|
|
43
|
-
handleSettingData(response) {
|
|
44
|
-
if (!response.accessories || !Array.isArray(response.accessories))
|
|
45
|
-
response.accessories = [];
|
|
46
|
-
this.vehicleInformation = response;
|
|
47
|
-
}
|
|
48
|
-
async setData(newData, headers = {}) {
|
|
49
|
-
clearTimeout(this.networkTimeoutRef);
|
|
50
|
-
if (this.abortController)
|
|
51
|
-
this.abortController.abort();
|
|
52
|
-
this.abortController = new AbortController();
|
|
53
|
-
let scopedTimeoutRef;
|
|
54
|
-
const isVinRequest = typeof newData === 'string';
|
|
55
|
-
const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
|
|
56
|
-
this.externalVin = vin;
|
|
57
|
-
try {
|
|
58
|
-
if (!vin || vin.trim().length === 0) {
|
|
59
|
-
//this.componentHeight = '0px';
|
|
60
|
-
this.state = 'idle';
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (this.state === 'data' || this.state === 'error') {
|
|
64
|
-
this.state = (this.state + '-loading');
|
|
65
|
-
}
|
|
66
|
-
else
|
|
67
|
-
this.state = 'loading';
|
|
68
|
-
await new Promise(r => {
|
|
69
|
-
scopedTimeoutRef = setTimeout(r, 700);
|
|
70
|
-
this.networkTimeoutRef = scopedTimeoutRef;
|
|
71
|
-
});
|
|
72
|
-
const vehicleResponse = isVinRequest ? await vehicleInformation.getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
73
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
74
|
-
if (!vehicleResponse)
|
|
75
|
-
throw new Error('Wrong response format');
|
|
76
|
-
this.handleSettingData(vehicleResponse);
|
|
77
|
-
}
|
|
78
|
-
this.errorMessage = null;
|
|
79
|
-
this.state = 'data';
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
83
|
-
return;
|
|
84
|
-
this.state = 'error';
|
|
85
|
-
this.vehicleInformation = null;
|
|
86
|
-
this.errorMessage = error.message;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
90
|
-
await this.setData(requestedVin, headers);
|
|
91
|
-
}
|
|
92
|
-
//calculateHeight(componentState: string) {
|
|
93
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
94
|
-
// this.componentHeight = '100px';
|
|
95
|
-
// } else if (componentState !== 'idle') {
|
|
96
|
-
// setTimeout(() => {
|
|
97
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
98
|
-
// }, 50);
|
|
99
|
-
// } else {
|
|
100
|
-
// this.componentHeight = '0px';
|
|
101
|
-
// }
|
|
102
|
-
//}
|
|
103
|
-
async loadingListener() {
|
|
104
|
-
//this.calculateHeight(newState);
|
|
105
|
-
if (this.loadingStateChange)
|
|
106
|
-
this.loadingStateChange(this.state.includes('loading'));
|
|
107
|
-
}
|
|
108
|
-
async setMockData(newMockData) {
|
|
109
|
-
mockData = newMockData;
|
|
110
|
-
}
|
|
111
|
-
render() {
|
|
112
|
-
var _a, _b;
|
|
113
|
-
const accessories = (this === null || this === void 0 ? void 0 : this.vehicleInformation) ? (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.accessories : [];
|
|
114
|
-
return (index.h(index.Host, { key: '36897fc6f19dc85a4219b4040724412b4b025d6b' }, index.h("div", { key: '22c79f8628e7839a909a973edc5f7cdca6893a50', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '9bcb7d20e411b0b5b5c24a3f1d37c69c6b4a92ba' }, index.h(Loading.Loading, { key: 'd7c53d1f0acb6a7b5b2dae9ee8c701ecbc4a9c97', isLoading: this.state.includes('loading') }), index.h("div", { key: '8e73ef542f7341ab328413ca16a7d1a509adeb2d', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, index.h("div", { key: '46f53a1f41ebd08a566de3ec308657f5691acf05', class: cn.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) && (index.h("div", { key: '2f8dbaf438e62d538a53e3be527923ac7ded7296', class: "py-[16px]" }, index.h("div", { key: '10bb480c52c9ecf3c4715effb4f4dcb93db84d69', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '4e2e6b556f6a1698fdcca13b4cf03c426a396713', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: '30e34ba8eab9a055daf8a3611e7084077977d315', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Accessories"), index.h("div", { key: '251abde72d8f9d9f80dbe27294501c8a5e89089d', class: "h-0 overflow-auto flex-1" }, !accessories.length && index.h("div", { key: '96238a49e10c2426b03da1f5b816b6bb8cae0397', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!accessories.length && (index.h("table", { key: '8765e2cdfc3771d4459168908c3b9d65466155b0', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: '99e5c29f2f469f9ac39fc5aec2f80234e804f89d', class: "top-0 font-bold z-40 sticky bg-white" }, index.h("tr", { key: '6addf0eadbc6fcfb2eac08d12febd3f0aab30d6a' }, ['Part Number', 'Description', 'Image'].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: '925ed2efd7e37c33f7dd4bee0c5202e18358965f' }, accessories.map((accessory, idx) => {
|
|
115
|
-
var _a;
|
|
116
|
-
return (index.h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: accessory.partNumber }, ['partNumber', 'description'].map(key => {
|
|
117
|
-
var _a;
|
|
118
|
-
return (index.h("td", { key: accessory.partNumber + key, class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
119
|
-
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
120
|
-
}) }, accessory[key] || '...'));
|
|
121
|
-
}), index.h("td", { class: cn.cn('px-[10px] py-[10px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
122
|
-
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
123
|
-
}) }, index.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" }, index.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" }, index.h("img", { src: imageExpansion.eyeSvg }), index.h("span", { class: "text-white" }, "Expand")), index.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 })))));
|
|
124
|
-
})), index.h("div", { key: '00fbf078180b18c4e125297be26c45a3c320aec8', onClick: () => this.closeImage(), style: { backdropFilter: this.expandedImage ? 'blur(3px)' : 'blur(0px)' }, class: cn.cn('pointer-events-none w-[100dvw] h-[100dvh] fixed top-0 z-50 left-0 opacity-0 bg-black/40 transition-all duration-400', {
|
|
125
|
-
'pointer-events-auto opacity-100 delay-200': this.expandedImage,
|
|
126
|
-
}) }, index.h("button", { key: 'd76565b5c51ff17287584b43ddcf9d961f012b7e', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, index.h("div", { key: '9f7b9634e10a2114ba298bd9a49800270a91b642', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), index.h("div", { key: 'bbb15c3b6a4de5d14da9594bc9cc078fbc155dfb', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), index.h("img", { key: '33cb3cfe256742f41aff3a62876db9965d40f3dc', alt: "", id: "expanded-image", class: "fixed opacity-0 z-50 transition-all rounded-lg" })))))))))));
|
|
127
|
-
}
|
|
128
|
-
get el() { return index.getElement(this); }
|
|
129
|
-
static get watchers() { return {
|
|
130
|
-
"state": ["loadingListener"]
|
|
131
|
-
}; }
|
|
132
|
-
};
|
|
133
|
-
VehicleAccessories.style = VehicleAccessoriesStyle0;
|
|
134
|
-
|
|
135
|
-
exports.vehicle_accessories = VehicleAccessories;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-d4b5214c.js');
|
|
10
|
-
const Loading = require('./Loading-ee1a2ceb.js');
|
|
11
|
-
const cn = require('./cn-f559f9e5.js');
|
|
12
|
-
const vehicleInformation = require('./vehicleInformation-35c470fc.js');
|
|
13
|
-
require('./loader-baf2418b.js');
|
|
14
|
-
|
|
15
|
-
const vehicleSpecificationCss = "*,: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-scroll-snap-strictness:proximity;--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;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-scroll-snap-strictness:proximity;--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;}/*! 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}.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}.w-full{width:100%}.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-4{padding-bottom:1rem;padding-top:1rem}.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}.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}";
|
|
16
|
-
const VehicleSpecificationStyle0 = vehicleSpecificationCss;
|
|
17
|
-
|
|
18
|
-
let mockData = {};
|
|
19
|
-
const VehicleSpecification = class {
|
|
20
|
-
constructor(hostRef) {
|
|
21
|
-
index.registerInstance(this, hostRef);
|
|
22
|
-
this.baseUrl = '';
|
|
23
|
-
this.isDev = false;
|
|
24
|
-
this.queryString = '';
|
|
25
|
-
this.loadingStateChange = undefined;
|
|
26
|
-
this.loadedResponse = undefined;
|
|
27
|
-
this.state = 'idle';
|
|
28
|
-
this.externalVin = null;
|
|
29
|
-
this.errorMessage = null;
|
|
30
|
-
this.vehicleInformation = undefined;
|
|
31
|
-
}
|
|
32
|
-
async setData(newData, headers = {}) {
|
|
33
|
-
clearTimeout(this.networkTimeoutRef);
|
|
34
|
-
if (this.abortController)
|
|
35
|
-
this.abortController.abort();
|
|
36
|
-
this.abortController = new AbortController();
|
|
37
|
-
let scopedTimeoutRef;
|
|
38
|
-
const isVinRequest = typeof newData === 'string';
|
|
39
|
-
const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
|
|
40
|
-
this.externalVin = vin;
|
|
41
|
-
try {
|
|
42
|
-
if (!vin || vin.trim().length === 0) {
|
|
43
|
-
//this.componentHeight = '0px';
|
|
44
|
-
this.state = 'idle';
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (this.state === 'data' || this.state === 'error') {
|
|
48
|
-
this.state = (this.state + '-loading');
|
|
49
|
-
}
|
|
50
|
-
else
|
|
51
|
-
this.state = 'loading';
|
|
52
|
-
await new Promise(r => {
|
|
53
|
-
scopedTimeoutRef = setTimeout(r, 700);
|
|
54
|
-
this.networkTimeoutRef = scopedTimeoutRef;
|
|
55
|
-
});
|
|
56
|
-
const vehicleResponse = isVinRequest ? await vehicleInformation.getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
57
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
58
|
-
if (!vehicleResponse)
|
|
59
|
-
throw new Error('Wrong response format');
|
|
60
|
-
this.vehicleInformation = vehicleResponse;
|
|
61
|
-
}
|
|
62
|
-
this.errorMessage = null;
|
|
63
|
-
this.state = 'data';
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
67
|
-
return;
|
|
68
|
-
this.state = 'error';
|
|
69
|
-
this.vehicleInformation = null;
|
|
70
|
-
this.errorMessage = error.message;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
74
|
-
await this.setData(requestedVin, headers);
|
|
75
|
-
}
|
|
76
|
-
//calculateHeight(componentState: string) {
|
|
77
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
78
|
-
// this.componentHeight = '100px';
|
|
79
|
-
// } else if (componentState !== 'idle') {
|
|
80
|
-
// setTimeout(() => {
|
|
81
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
82
|
-
// }, 50);
|
|
83
|
-
// } else {
|
|
84
|
-
// this.componentHeight = '0px';
|
|
85
|
-
// }
|
|
86
|
-
//}
|
|
87
|
-
async loadingListener() {
|
|
88
|
-
//this.calculateHeight(newState);
|
|
89
|
-
if (this.loadingStateChange)
|
|
90
|
-
this.loadingStateChange(this.state.includes('loading'));
|
|
91
|
-
}
|
|
92
|
-
async setMockData(newMockData) {
|
|
93
|
-
mockData = newMockData;
|
|
94
|
-
}
|
|
95
|
-
render() {
|
|
96
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
97
|
-
return (index.h(index.Host, { key: '1b410b6dca3998600be9586345f3fba4bc5de33f' }, index.h("div", { key: '1db4da0ddafab294ca6ad9d791ed85e39e1f1e1a', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: 'f0005424b93a25b295307f88f058df9f53da49b5' }, index.h(Loading.Loading, { key: '6fe07890fef9b23a4a2f7a23a40d94e562897162', isLoading: this.state.includes('loading') }), index.h("div", { key: '0d6e2e3524b6b6febd09eb303d0762c251dbbda3', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, index.h("div", { key: 'bf9e058077d836affdcb8356400811e3bc07cb1b', class: cn.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) && (index.h("div", { key: 'ca5ad9383018eed9d68c06c941d4838902b38336', class: "py-4" }, index.h("div", { key: 'b4c3daa0fef5fdcde3cb19eedd9983492c749366', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '1c5ab5cae04fbddef1a60b022f3150fb961c4d29', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: 'cd34df7de4fc24d1f94754c61d68d549f7f83e4d', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Specifications"), index.h("div", { key: '44a1539cffed09bb9da338841f25d2e8e8e6b712', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && index.h("div", { key: '3fb52690ca9d08a9d4581380e3cec1a86860b286', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!((_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.vehicleSpecification) && (index.h("table", { key: 'a89c30ce91ed1bfccfa45d0043e4810ae73646bc', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: 'eaa959d3ea6389d34316c3134309411188c95f8b', class: "top-0 font-bold sticky bg-white" }, index.h("tr", { key: '2e5d01ba63b0fd268932fc39e7d7540dd0818bd6' }, ['Model', 'Variant', 'Katashiki', 'Model Year', 'SFX'].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: 'f5b5643eeb841748f7c3d8cc1943d6ba8ef8e1f9' }, index.h("tr", { key: '050dea500f85bbb91bf79c9d450eec490de49716' }, index.h("td", { key: '2b936b542e35c0536353661def7138634ca35a49', 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) || '...', " ", index.h("br", { key: 'b08846e3431982ff329db2603362b0a6ecd57502', 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) || '...'), index.h("td", { key: '892fbe89881132a274333435a3e023279721afff', 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) || '...', " ", index.h("br", { key: 'dde026ae6e6e5b918f6e919511c8e92554134def' }), ((_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 => {
|
|
98
|
-
var _a;
|
|
99
|
-
const [place, field] = infoPath.split('.');
|
|
100
|
-
const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
|
|
101
|
-
return (index.h("td", { key: infoPath, class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, cellValue.trim() ? cellValue : '...'));
|
|
102
|
-
})))))))))))));
|
|
103
|
-
}
|
|
104
|
-
get el() { return index.getElement(this); }
|
|
105
|
-
static get watchers() { return {
|
|
106
|
-
"state": ["loadingListener"]
|
|
107
|
-
}; }
|
|
108
|
-
};
|
|
109
|
-
VehicleSpecification.style = VehicleSpecificationStyle0;
|
|
110
|
-
|
|
111
|
-
exports.vehicle_specification = VehicleSpecification;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
const vehicleRequestHeaders = {
|
|
8
|
-
cityId: 'City-Id',
|
|
9
|
-
userId: 'User-Id',
|
|
10
|
-
companyId: 'Company-Id',
|
|
11
|
-
customerName: 'Customer-Name',
|
|
12
|
-
customerPhone: 'Customer-Phone',
|
|
13
|
-
customerEmail: 'Customer-Email',
|
|
14
|
-
companyBranchId: 'Company-Branch-Id',
|
|
15
|
-
cityIntegrationId: 'City-Integration-Id',
|
|
16
|
-
brandIntegrationId: 'Brand-Integration-Id',
|
|
17
|
-
companyIntegrationId: 'Company-Integration-Id',
|
|
18
|
-
companyBranchIntegrationId: 'Company-Branch-Integration-Id'
|
|
19
|
-
};
|
|
20
|
-
const getVehicleInformation = async (component, generalProps, headers = {}) => {
|
|
21
|
-
const { notAvailableMessage, mockData, vin, scopedTimeoutRef, middlewareCallback } = generalProps;
|
|
22
|
-
const { isDev, baseUrl, queryString, abortController, networkTimeoutRef, loadedResponse } = component;
|
|
23
|
-
const handleResult = (newVehicleInformation) => {
|
|
24
|
-
if (networkTimeoutRef === scopedTimeoutRef) {
|
|
25
|
-
if (!newVehicleInformation && vin)
|
|
26
|
-
throw new Error(notAvailableMessage || 'Wrong response format');
|
|
27
|
-
if (loadedResponse)
|
|
28
|
-
loadedResponse(newVehicleInformation);
|
|
29
|
-
if (middlewareCallback)
|
|
30
|
-
middlewareCallback(newVehicleInformation);
|
|
31
|
-
return newVehicleInformation;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
if (isDev) {
|
|
35
|
-
const newData = mockData[vin];
|
|
36
|
-
return handleResult(newData);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
if (!baseUrl)
|
|
40
|
-
throw new Error('Please provide base-url');
|
|
41
|
-
const componentHeaders = Object.assign({}, headers);
|
|
42
|
-
Object.entries(vehicleRequestHeaders).forEach(([componentHeaderKey, headerField]) => {
|
|
43
|
-
if (component[componentHeaderKey])
|
|
44
|
-
componentHeaders[headerField] = component[componentHeaderKey];
|
|
45
|
-
});
|
|
46
|
-
const response = await fetch(`${baseUrl}${vin}?${queryString}`, { signal: abortController.signal, headers: componentHeaders });
|
|
47
|
-
const newData = (await response.json());
|
|
48
|
-
return handleResult(newData);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
exports.getVehicleInformation = getVehicleInformation;
|