adp-web-components 0.0.11 → 0.0.12
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.cjs.entry.js +6 -6
- package/dist/cjs/distributor-lookup.cjs.entry.js +6 -6
- package/dist/cjs/dynamic-claim.cjs.entry.js +7 -7
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +6 -6
- package/dist/cjs/paint-thickness.cjs.entry.js +8 -8
- package/dist/cjs/{partInformation-2a6a018b.js → partInformation-07651204.js} +2 -2
- package/dist/cjs/service-history.cjs.entry.js +6 -6
- package/dist/cjs/vehicle-accessories.cjs.entry.js +8 -8
- package/dist/cjs/vehicle-specification.cjs.entry.js +6 -6
- package/dist/cjs/{vehicleInformation-4c1dcaf2.js → vehicleInformation-35c470fc.js} +5 -5
- package/dist/cjs/warranty-details.cjs.entry.js +6 -6
- package/dist/collection/components/dynamic-claim/dynamic-claim.js +16 -8
- package/dist/collection/components/paint-thickness/paint-thickness.js +17 -9
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +16 -8
- package/dist/collection/components/part-lookup/distributor-lookup.js +16 -8
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +16 -8
- package/dist/collection/components/service-history/service-history.js +15 -7
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.js +17 -9
- package/dist/collection/components/vehicle-specification/vehicle-specification.js +15 -7
- package/dist/collection/components/warranty-details/warranty-details.js +15 -7
- package/dist/collection/global/api/partInformation.js +2 -2
- package/dist/collection/global/api/vehicleInformation.js +5 -5
- 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/manufacturer-lookup.js +1 -1
- package/dist/components/p-4f08bcb8.js +5 -0
- package/dist/components/p-c4fad245.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-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/dead-stock-lookup.entry.js +6 -6
- package/dist/esm/distributor-lookup.entry.js +6 -6
- package/dist/esm/dynamic-claim.entry.js +7 -7
- package/dist/esm/manufacturer-lookup.entry.js +6 -6
- package/dist/esm/paint-thickness.entry.js +8 -8
- package/dist/esm/{partInformation-73ece994.js → partInformation-096a8f55.js} +2 -2
- package/dist/esm/service-history.entry.js +6 -6
- package/dist/esm/vehicle-accessories.entry.js +8 -8
- package/dist/esm/vehicle-specification.entry.js +6 -6
- package/dist/esm/{vehicleInformation-f1081f83.js → vehicleInformation-f7290628.js} +5 -5
- package/dist/esm/warranty-details.entry.js +6 -6
- package/dist/shift-components/p-2e3e8e97.entry.js +5 -0
- package/dist/shift-components/p-3bfafc40.entry.js +5 -0
- package/dist/shift-components/p-4f08bcb8.js +5 -0
- package/dist/shift-components/p-75ea0e53.entry.js +5 -0
- package/dist/shift-components/p-91eff216.entry.js +5 -0
- package/dist/shift-components/p-c274f4ba.entry.js +5 -0
- package/dist/shift-components/p-c4fad245.js +5 -0
- package/dist/shift-components/p-ca1e2e5b.entry.js +5 -0
- package/dist/shift-components/p-ec9302fb.entry.js +5 -0
- package/dist/shift-components/p-f21722ce.entry.js +5 -0
- package/dist/shift-components/p-f95c7501.entry.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/dynamic-claim/dynamic-claim.d.ts +2 -2
- package/dist/types/components/paint-thickness/paint-thickness.d.ts +2 -2
- package/dist/types/components/part-lookup/dead-stock-lookup.d.ts +2 -2
- package/dist/types/components/part-lookup/distributor-lookup.d.ts +2 -2
- package/dist/types/components/part-lookup/manufacturer-lookup.d.ts +2 -2
- package/dist/types/components/service-history/service-history.d.ts +2 -2
- package/dist/types/components/vehicle-accessories/vehicle-accessories.d.ts +2 -2
- package/dist/types/components/vehicle-specification/vehicle-specification.d.ts +2 -2
- package/dist/types/components/warranty-details/warranty-details.d.ts +2 -2
- package/dist/types/components.d.ts +18 -18
- package/dist/types/global/api/partInformation.d.ts +1 -1
- package/dist/types/global/api/vehicleInformation.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-5df9bc5f.js +0 -5
- package/dist/components/p-d265c109.js +0 -5
- package/dist/shift-components/p-15f86441.entry.js +0 -5
- package/dist/shift-components/p-1ae3a61f.entry.js +0 -5
- package/dist/shift-components/p-5df9bc5f.js +0 -5
- package/dist/shift-components/p-8c261972.entry.js +0 -5
- package/dist/shift-components/p-9bd4471c.entry.js +0 -5
- package/dist/shift-components/p-9f790b14.entry.js +0 -5
- package/dist/shift-components/p-c113792c.entry.js +0 -5
- package/dist/shift-components/p-d265c109.js +0 -5
- package/dist/shift-components/p-dc9845ed.entry.js +0 -5
- package/dist/shift-components/p-e32b0798.entry.js +0 -5
- package/dist/shift-components/p-f759c597.entry.js +0 -5
|
@@ -23,7 +23,7 @@ export class ManufacturerLookup {
|
|
|
23
23
|
handleSettingData(response) {
|
|
24
24
|
this.partInformation = response;
|
|
25
25
|
}
|
|
26
|
-
async setData(newData) {
|
|
26
|
+
async setData(newData, headers = {}) {
|
|
27
27
|
clearTimeout(this.networkTimeoutRef);
|
|
28
28
|
if (this.abortController)
|
|
29
29
|
this.abortController.abort();
|
|
@@ -47,7 +47,7 @@ export class ManufacturerLookup {
|
|
|
47
47
|
scopedTimeoutRef = setTimeout(r, 700);
|
|
48
48
|
this.networkTimeoutRef = scopedTimeoutRef;
|
|
49
49
|
});
|
|
50
|
-
const partResponse = isPartNumberRequest ? await getPartInformation(this, { scopedTimeoutRef, partNumber, mockData }) : newData;
|
|
50
|
+
const partResponse = isPartNumberRequest ? await getPartInformation(this, { scopedTimeoutRef, partNumber, mockData }, headers) : newData;
|
|
51
51
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
52
52
|
if (!partResponse)
|
|
53
53
|
throw new Error('Wrong response format');
|
|
@@ -64,8 +64,8 @@ export class ManufacturerLookup {
|
|
|
64
64
|
this.errorMessage = error.message;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
async fetchData(
|
|
68
|
-
await this.setData(
|
|
67
|
+
async fetchData(partNumber = this.externalPartNumber, headers = {}) {
|
|
68
|
+
await this.setData(partNumber, headers);
|
|
69
69
|
}
|
|
70
70
|
//calculateHeight(componentState: string) {
|
|
71
71
|
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
@@ -87,7 +87,7 @@ export class ManufacturerLookup {
|
|
|
87
87
|
mockData = newMockData;
|
|
88
88
|
}
|
|
89
89
|
render() {
|
|
90
|
-
return (h(Host, { key: '
|
|
90
|
+
return (h(Host, { key: 'cfd90dcfbe3be613c1badcf79c09923f79a2eea6' }, h("div", { key: '1c6930673bcf7b50e9937ddc8f42e54c2b473ca2', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'ed2db39446481defe0ac1f162a4c5346dee315fa' }, h(Loading, { key: '5972c7d753a7555bba05c82deea9f887629ab720', isLoading: this.state.includes('loading') }), h("div", { key: 'd5de561df856b0fb26e6ca0145160c96a9790847', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (h("div", { key: '9422a2aa8e63cb09d68eaf57ad4c9981ec2a1085', class: "py-[16px]" }, h("div", { key: '59a4815a98f4a01518f2b4750a6c4c627f9bf0ae', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '3f980055e6a3ae355360997d7a014eaf7afca5d4' }, h("div", { key: 'e0e30bffb51cd26076420f2719dc0a498404efcd', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'ddeb24dd0779a8861c229b0f722debe000cc034c', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, this.headerTitle), h("div", { key: 'c1de3e307ed2d6cf2eb33cc477b4e17c6651c0ab', style: { padding: '10px 30px', display: 'flex', flexDirection: 'column', gap: '15px' } }, h("div", { key: 'a3e83b3ac55b1759819e8065b5eaede1a7001b44', style: { display: 'flex', gap: '50px' } }, h("div", { key: 'a4b1da95397584c6081673df484e7851647aa4fa', style: { display: 'flex', flexDirection: 'column', 'flex': '1' } }, h("strong", { key: 'c61412662fd8c418825d1e7cdbcabb08c2c207ec', style: { padding: '10px 0', borderBottom: '1px solid grey', } }, "Description"), h("div", { key: 'dcd926214097661e86c8dad9a323f7d68ef30b0b', style: { padding: '10px 0px' } }, this.partInformation.tmcPart.partDescription)), h("div", { key: '0f5bdf2566698de09e1eeaacad4c7dcff4146022', style: { display: 'flex', flexDirection: 'column', 'flex': '1' } }, h("strong", { key: 'fb4e8ef5bd79548dc31e79792d32b55b090513f1', style: { padding: '10px 0', borderBottom: '1px solid grey', } }, "Product Group"), h("div", { key: 'b2e31ce6014013cda2abb9c2f4ef823c493da4c2', style: { padding: '10px 0px' } }, this.partInformation.tmcPart.group)), h("div", { key: '75215d7f9a18f7fea6528d11e118fc1dbb50e3b8', style: { display: 'flex', flexDirection: 'column', 'flex': '1' } })))))))))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "manufacturer-lookup"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -225,11 +225,15 @@ export class ManufacturerLookup {
|
|
|
225
225
|
return {
|
|
226
226
|
"setData": {
|
|
227
227
|
"complexType": {
|
|
228
|
-
"signature": "(newData: PartInformation | string) => Promise<void>",
|
|
228
|
+
"signature": "(newData: PartInformation | string, headers?: any) => Promise<void>",
|
|
229
229
|
"parameters": [{
|
|
230
230
|
"name": "newData",
|
|
231
231
|
"type": "string | PartInformation",
|
|
232
232
|
"docs": ""
|
|
233
|
+
}, {
|
|
234
|
+
"name": "headers",
|
|
235
|
+
"type": "any",
|
|
236
|
+
"docs": ""
|
|
233
237
|
}],
|
|
234
238
|
"references": {
|
|
235
239
|
"Promise": {
|
|
@@ -255,11 +259,15 @@ export class ManufacturerLookup {
|
|
|
255
259
|
},
|
|
256
260
|
"fetchData": {
|
|
257
261
|
"complexType": {
|
|
258
|
-
"signature": "(
|
|
262
|
+
"signature": "(partNumber?: string, headers?: any) => Promise<void>",
|
|
259
263
|
"parameters": [{
|
|
260
|
-
"name": "
|
|
264
|
+
"name": "partNumber",
|
|
261
265
|
"type": "string",
|
|
262
266
|
"docs": ""
|
|
267
|
+
}, {
|
|
268
|
+
"name": "headers",
|
|
269
|
+
"type": "any",
|
|
270
|
+
"docs": ""
|
|
263
271
|
}],
|
|
264
272
|
"references": {
|
|
265
273
|
"Promise": {
|
|
@@ -24,7 +24,7 @@ export class ServiceHistory {
|
|
|
24
24
|
response.serviceHistory = [];
|
|
25
25
|
this.vehicleInformation = response;
|
|
26
26
|
}
|
|
27
|
-
async setData(newData) {
|
|
27
|
+
async setData(newData, headers = {}) {
|
|
28
28
|
clearTimeout(this.networkTimeoutRef);
|
|
29
29
|
if (this.abortController)
|
|
30
30
|
this.abortController.abort();
|
|
@@ -48,7 +48,7 @@ export class ServiceHistory {
|
|
|
48
48
|
scopedTimeoutRef = setTimeout(r, 700);
|
|
49
49
|
this.networkTimeoutRef = scopedTimeoutRef;
|
|
50
50
|
});
|
|
51
|
-
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }) : newData;
|
|
51
|
+
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
52
52
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
53
53
|
if (!vehicleResponse)
|
|
54
54
|
throw new Error('Wrong response format');
|
|
@@ -65,8 +65,8 @@ export class ServiceHistory {
|
|
|
65
65
|
this.errorMessage = error.message;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
async fetchData(requestedVin = this.externalVin) {
|
|
69
|
-
await this.setData(requestedVin);
|
|
68
|
+
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
69
|
+
await this.setData(requestedVin, headers);
|
|
70
70
|
}
|
|
71
71
|
//calculateHeight(componentState: string) {
|
|
72
72
|
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
@@ -89,7 +89,7 @@ export class ServiceHistory {
|
|
|
89
89
|
}
|
|
90
90
|
render() {
|
|
91
91
|
var _a, _b, _c, _d;
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '8e5ae0eaa05bf7f1365f5a16e31b4f546daa267b' }, h("div", { key: 'd097bff639f07f92245df5c7898ceb6375443826', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'd03547e52874be8356089f968292c7b330b4edef' }, h(Loading, { key: '6d13faffb586131276ab0dbbfe21afec97b0ec77', isLoading: this.state.includes('loading') }), h("div", { key: '68e8bcbf3590e50f8ed54389ebe3fe716e3da901', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '03cdb8690215c104f4e0253b29bbaf92f3dbb0d6', 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: '32ccb311b5118329bbe9d04a29453e0a6360f88f', class: "py-[16px]" }, 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) && (h("div", { key: '02426e89ded841b22db0af5ddc30c8cff1ba2426', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, 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"), h("div", { key: '377288b6e742f2fd9f06b2ca0920293437dd3968', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.serviceHistory.length) && 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) && (h("table", { key: 'a7995bb565c22d8594a5219d836396a3df1e53c6', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '530da33ea34b28a82d23b509db1ba2fb7003b187', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '710aff75e258d6e408111b5e8442042440f7c29b' }, ['Branch', 'Dealer', 'Invoice No.', 'Date', 'Service Type', 'Odometer'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: '68e5fda2e43df1c20550bada35bb17bc4393aa60' }, (_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.serviceHistory.map((service, idx) => (h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: service.invoiceNumber }, ['branchName', 'companyName', 'invoiceNumber', 'serviceDate', 'serviceType', 'mileage'].map(serviceType => {
|
|
93
93
|
var _a;
|
|
94
94
|
return (h("td", { key: service.invoiceNumber + serviceType, class: cn('px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
95
95
|
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
@@ -214,11 +214,15 @@ export class ServiceHistory {
|
|
|
214
214
|
return {
|
|
215
215
|
"setData": {
|
|
216
216
|
"complexType": {
|
|
217
|
-
"signature": "(newData: VehicleInformation | string) => Promise<void>",
|
|
217
|
+
"signature": "(newData: VehicleInformation | string, headers?: any) => Promise<void>",
|
|
218
218
|
"parameters": [{
|
|
219
219
|
"name": "newData",
|
|
220
220
|
"type": "string | VehicleInformation",
|
|
221
221
|
"docs": ""
|
|
222
|
+
}, {
|
|
223
|
+
"name": "headers",
|
|
224
|
+
"type": "any",
|
|
225
|
+
"docs": ""
|
|
222
226
|
}],
|
|
223
227
|
"references": {
|
|
224
228
|
"Promise": {
|
|
@@ -244,11 +248,15 @@ export class ServiceHistory {
|
|
|
244
248
|
},
|
|
245
249
|
"fetchData": {
|
|
246
250
|
"complexType": {
|
|
247
|
-
"signature": "(requestedVin?: string) => Promise<void>",
|
|
251
|
+
"signature": "(requestedVin?: string, headers?: any) => Promise<void>",
|
|
248
252
|
"parameters": [{
|
|
249
253
|
"name": "requestedVin",
|
|
250
254
|
"type": "string",
|
|
251
255
|
"docs": ""
|
|
256
|
+
}, {
|
|
257
|
+
"name": "headers",
|
|
258
|
+
"type": "any",
|
|
259
|
+
"docs": ""
|
|
252
260
|
}],
|
|
253
261
|
"references": {
|
|
254
262
|
"Promise": {
|
|
@@ -36,7 +36,7 @@ export class VehicleAccessories {
|
|
|
36
36
|
response.accessories = [];
|
|
37
37
|
this.vehicleInformation = response;
|
|
38
38
|
}
|
|
39
|
-
async setData(newData) {
|
|
39
|
+
async setData(newData, headers = {}) {
|
|
40
40
|
clearTimeout(this.networkTimeoutRef);
|
|
41
41
|
if (this.abortController)
|
|
42
42
|
this.abortController.abort();
|
|
@@ -60,7 +60,7 @@ export class VehicleAccessories {
|
|
|
60
60
|
scopedTimeoutRef = setTimeout(r, 700);
|
|
61
61
|
this.networkTimeoutRef = scopedTimeoutRef;
|
|
62
62
|
});
|
|
63
|
-
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }) : newData;
|
|
63
|
+
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
64
64
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
65
65
|
if (!vehicleResponse)
|
|
66
66
|
throw new Error('Wrong response format');
|
|
@@ -77,8 +77,8 @@ export class VehicleAccessories {
|
|
|
77
77
|
this.errorMessage = error.message;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
async fetchData(requestedVin = this.externalVin) {
|
|
81
|
-
await this.setData(requestedVin);
|
|
80
|
+
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
81
|
+
await this.setData(requestedVin, headers);
|
|
82
82
|
}
|
|
83
83
|
//calculateHeight(componentState: string) {
|
|
84
84
|
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
@@ -102,7 +102,7 @@ export class VehicleAccessories {
|
|
|
102
102
|
render() {
|
|
103
103
|
var _a, _b;
|
|
104
104
|
const accessories = (this === null || this === void 0 ? void 0 : this.vehicleInformation) ? (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.accessories : [];
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: '36897fc6f19dc85a4219b4040724412b4b025d6b' }, h("div", { key: '22c79f8628e7839a909a973edc5f7cdca6893a50', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '9bcb7d20e411b0b5b5c24a3f1d37c69c6b4a92ba' }, h(Loading, { key: 'd7c53d1f0acb6a7b5b2dae9ee8c701ecbc4a9c97', isLoading: this.state.includes('loading') }), h("div", { key: '8e73ef542f7341ab328413ca16a7d1a509adeb2d', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '46f53a1f41ebd08a566de3ec308657f5691acf05', 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: '2f8dbaf438e62d538a53e3be527923ac7ded7296', class: "py-[16px]" }, 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) && (h("div", { key: '4e2e6b556f6a1698fdcca13b4cf03c426a396713', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, 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"), h("div", { key: '251abde72d8f9d9f80dbe27294501c8a5e89089d', class: "h-0 overflow-auto flex-1" }, !accessories.length && h("div", { key: '96238a49e10c2426b03da1f5b816b6bb8cae0397', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!accessories.length && (h("table", { key: '8765e2cdfc3771d4459168908c3b9d65466155b0', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '99e5c29f2f469f9ac39fc5aec2f80234e804f89d', class: "top-0 font-bold z-40 sticky bg-white" }, h("tr", { key: '6addf0eadbc6fcfb2eac08d12febd3f0aab30d6a' }, ['Part Number', 'Description', 'Image'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: '925ed2efd7e37c33f7dd4bee0c5202e18358965f' }, accessories.map((accessory, idx) => {
|
|
106
106
|
var _a;
|
|
107
107
|
return (h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: accessory.partNumber }, ['partNumber', 'description'].map(key => {
|
|
108
108
|
var _a;
|
|
@@ -112,9 +112,9 @@ export class VehicleAccessories {
|
|
|
112
112
|
}), h("td", { class: cn('px-[10px] py-[10px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
113
113
|
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
114
114
|
}) }, 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" }, "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 })))));
|
|
115
|
-
})), h("div", { key: '
|
|
115
|
+
})), h("div", { key: '00fbf078180b18c4e125297be26c45a3c320aec8', 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', {
|
|
116
116
|
'pointer-events-auto opacity-100 delay-200': this.expandedImage,
|
|
117
|
-
}) }, h("button", { key: '
|
|
117
|
+
}) }, h("button", { key: 'd76565b5c51ff17287584b43ddcf9d961f012b7e', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, h("div", { key: '9f7b9634e10a2114ba298bd9a49800270a91b642', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), h("div", { key: 'bbb15c3b6a4de5d14da9594bc9cc078fbc155dfb', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), h("img", { key: '33cb3cfe256742f41aff3a62876db9965d40f3dc', alt: "", id: "expanded-image", class: "fixed opacity-0 z-50 transition-all rounded-lg" })))))))))));
|
|
118
118
|
}
|
|
119
119
|
static get is() { return "vehicle-accessories"; }
|
|
120
120
|
static get encapsulation() { return "shadow"; }
|
|
@@ -235,11 +235,15 @@ export class VehicleAccessories {
|
|
|
235
235
|
return {
|
|
236
236
|
"setData": {
|
|
237
237
|
"complexType": {
|
|
238
|
-
"signature": "(newData: VehicleInformation | string) => Promise<void>",
|
|
238
|
+
"signature": "(newData: VehicleInformation | string, headers?: any) => Promise<void>",
|
|
239
239
|
"parameters": [{
|
|
240
240
|
"name": "newData",
|
|
241
241
|
"type": "string | VehicleInformation",
|
|
242
242
|
"docs": ""
|
|
243
|
+
}, {
|
|
244
|
+
"name": "headers",
|
|
245
|
+
"type": "any",
|
|
246
|
+
"docs": ""
|
|
243
247
|
}],
|
|
244
248
|
"references": {
|
|
245
249
|
"Promise": {
|
|
@@ -265,11 +269,15 @@ export class VehicleAccessories {
|
|
|
265
269
|
},
|
|
266
270
|
"fetchData": {
|
|
267
271
|
"complexType": {
|
|
268
|
-
"signature": "(requestedVin?: string) => Promise<void>",
|
|
272
|
+
"signature": "(requestedVin?: string, headers?: any) => Promise<void>",
|
|
269
273
|
"parameters": [{
|
|
270
274
|
"name": "requestedVin",
|
|
271
275
|
"type": "string",
|
|
272
276
|
"docs": ""
|
|
277
|
+
}, {
|
|
278
|
+
"name": "headers",
|
|
279
|
+
"type": "any",
|
|
280
|
+
"docs": ""
|
|
273
281
|
}],
|
|
274
282
|
"references": {
|
|
275
283
|
"Promise": {
|
|
@@ -19,7 +19,7 @@ export class VehicleSpecification {
|
|
|
19
19
|
this.errorMessage = null;
|
|
20
20
|
this.vehicleInformation = undefined;
|
|
21
21
|
}
|
|
22
|
-
async setData(newData) {
|
|
22
|
+
async setData(newData, headers = {}) {
|
|
23
23
|
clearTimeout(this.networkTimeoutRef);
|
|
24
24
|
if (this.abortController)
|
|
25
25
|
this.abortController.abort();
|
|
@@ -43,7 +43,7 @@ export class VehicleSpecification {
|
|
|
43
43
|
scopedTimeoutRef = setTimeout(r, 700);
|
|
44
44
|
this.networkTimeoutRef = scopedTimeoutRef;
|
|
45
45
|
});
|
|
46
|
-
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }) : newData;
|
|
46
|
+
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
47
47
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
48
48
|
if (!vehicleResponse)
|
|
49
49
|
throw new Error('Wrong response format');
|
|
@@ -60,8 +60,8 @@ export class VehicleSpecification {
|
|
|
60
60
|
this.errorMessage = error.message;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
async fetchData(requestedVin = this.externalVin) {
|
|
64
|
-
await this.setData(requestedVin);
|
|
63
|
+
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
64
|
+
await this.setData(requestedVin, headers);
|
|
65
65
|
}
|
|
66
66
|
//calculateHeight(componentState: string) {
|
|
67
67
|
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
@@ -84,7 +84,7 @@ export class VehicleSpecification {
|
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '1b410b6dca3998600be9586345f3fba4bc5de33f' }, h("div", { key: '1db4da0ddafab294ca6ad9d791ed85e39e1f1e1a', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'f0005424b93a25b295307f88f058df9f53da49b5' }, h(Loading, { key: '6fe07890fef9b23a4a2f7a23a40d94e562897162', isLoading: this.state.includes('loading') }), h("div", { key: '0d6e2e3524b6b6febd09eb303d0762c251dbbda3', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'bf9e058077d836affdcb8356400811e3bc07cb1b', 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: 'ca5ad9383018eed9d68c06c941d4838902b38336', class: "py-4" }, 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) && (h("div", { key: '1c5ab5cae04fbddef1a60b022f3150fb961c4d29', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, 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"), h("div", { key: '44a1539cffed09bb9da338841f25d2e8e8e6b712', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && 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) && (h("table", { key: 'a89c30ce91ed1bfccfa45d0043e4810ae73646bc', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'eaa959d3ea6389d34316c3134309411188c95f8b', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '2e5d01ba63b0fd268932fc39e7d7540dd0818bd6' }, ['Model', 'Variant', 'Katashiki', 'Model Year', 'SFX'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: 'f5b5643eeb841748f7c3d8cc1943d6ba8ef8e1f9' }, h("tr", { key: '050dea500f85bbb91bf79c9d450eec490de49716' }, 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) || '...', " ", 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) || '...'), 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) || '...', " ", 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 => {
|
|
88
88
|
var _a;
|
|
89
89
|
const [place, field] = infoPath.split('.');
|
|
90
90
|
const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
|
|
@@ -209,11 +209,15 @@ export class VehicleSpecification {
|
|
|
209
209
|
return {
|
|
210
210
|
"setData": {
|
|
211
211
|
"complexType": {
|
|
212
|
-
"signature": "(newData: VehicleInformation | string) => Promise<void>",
|
|
212
|
+
"signature": "(newData: VehicleInformation | string, headers?: any) => Promise<void>",
|
|
213
213
|
"parameters": [{
|
|
214
214
|
"name": "newData",
|
|
215
215
|
"type": "string | VehicleInformation",
|
|
216
216
|
"docs": ""
|
|
217
|
+
}, {
|
|
218
|
+
"name": "headers",
|
|
219
|
+
"type": "any",
|
|
220
|
+
"docs": ""
|
|
217
221
|
}],
|
|
218
222
|
"references": {
|
|
219
223
|
"Promise": {
|
|
@@ -239,11 +243,15 @@ export class VehicleSpecification {
|
|
|
239
243
|
},
|
|
240
244
|
"fetchData": {
|
|
241
245
|
"complexType": {
|
|
242
|
-
"signature": "(requestedVin?: string) => Promise<void>",
|
|
246
|
+
"signature": "(requestedVin?: string, headers?: any) => Promise<void>",
|
|
243
247
|
"parameters": [{
|
|
244
248
|
"name": "requestedVin",
|
|
245
249
|
"type": "string",
|
|
246
250
|
"docs": ""
|
|
251
|
+
}, {
|
|
252
|
+
"name": "headers",
|
|
253
|
+
"type": "any",
|
|
254
|
+
"docs": ""
|
|
247
255
|
}],
|
|
248
256
|
"references": {
|
|
249
257
|
"Promise": {
|
|
@@ -115,7 +115,7 @@ export class WarrantyDetails {
|
|
|
115
115
|
this.showRecaptcha = false;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
async setData(newData) {
|
|
118
|
+
async setData(newData, headers = {}) {
|
|
119
119
|
this.recaptchaRes = null;
|
|
120
120
|
clearTimeout(this.networkTimeoutRef);
|
|
121
121
|
clearInterval(this.recaptchaIntervalRef);
|
|
@@ -141,7 +141,7 @@ export class WarrantyDetails {
|
|
|
141
141
|
scopedTimeoutRef = setTimeout(r, 600);
|
|
142
142
|
this.networkTimeoutRef = scopedTimeoutRef;
|
|
143
143
|
});
|
|
144
|
-
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }) : newData;
|
|
144
|
+
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
145
145
|
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
146
146
|
if (!vehicleResponse)
|
|
147
147
|
throw new Error('Wrong response format');
|
|
@@ -159,8 +159,8 @@ export class WarrantyDetails {
|
|
|
159
159
|
this.errorMessage = error.message;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
async fetchData(requestedVin = this.externalVin) {
|
|
163
|
-
await this.setData(requestedVin);
|
|
162
|
+
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
163
|
+
await this.setData(requestedVin, headers);
|
|
164
164
|
}
|
|
165
165
|
async componentDidLoad() {
|
|
166
166
|
if (this.recaptchaKey !== '') {
|
|
@@ -199,7 +199,7 @@ export class WarrantyDetails {
|
|
|
199
199
|
}
|
|
200
200
|
render() {
|
|
201
201
|
var _a, _b, _c, _d, _e;
|
|
202
|
-
return (h(Host, { key: '
|
|
202
|
+
return (h(Host, { key: '788b8a8ffbca4b31a40ab95655fabcb41f0d83df' }, h("div", { key: 'ed92ce80c844eb884cd872f58894136c47fb7c4c', class: "min-h-[100px] warranty" }, h("div", { key: '016013ecfba73d87df136580fffe5e2e07aaf958' }, h(Loading, { key: '3b8de918e7a315e843b8bc42942fc14b57216c94', isLoading: this.state.includes('loading') }), h("div", { key: '4c5f2ad067fcfd199ae1c69765509e6bbb1944f4', class: "transition duration-700", style: { transform: this.state.includes('loading') || this.state === 'idle' ? 'scale(0)' : 'scale(1)', opacity: this.state.includes('loading') ? '0' : '1' } }, (this.showSsc || this.showWarranty) && (h("div", { key: '5174d6380ed09d1e003cbd58d544b9838eaf8b16', style: { color: !!this.errorMessage ? 'red' : 'black' }, class: "warranty-vin" }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin)), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '9ca23b51fa38b8ae7900c0283d84a27f485e9e87', class: "py-4" }, h(StatusCard, { key: '304a1c83cb397b42d297abbbda51c925246105ec', desc: this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (h(CardsContainer, { key: '542c2cdfb222054604ef7b9ab3614c69339027ed', isAuthorized: (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.isAuthorized, unInvoicedByBrokerName: this.unInvoicedByBrokerName, warranty: (_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.warranty })), h("div", { key: '56c5529bbf8b264b5bc1568b4b9aa3cf687e6915', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, h("slot", { key: '0211fb8f130efc788e73524c4cd6f79702458aaf' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (h("div", { key: 'cc1e03101e506ffb831e0ad6adacaf86b8c542fe', class: cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.recaptchaRes.message)), this.checkingUnauthorizedSSC && (h("div", { key: '557261d532b671e5813c0259e623647a802851a0', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, h("div", { key: '1e8a78a692a8b9171cdd201d34aca99a253d0781' }, h("strong", { key: '967e34d989ebacb6f4b469fa11c73ae165426fa4' }, "Checking TMC")), h("img", { key: '112de8a206bb8877b6cd71ba437755bfc56720be', class: "spin", src: Loader }))), this.showSsc && ['data', 'data-loading'].includes(this.state) && ((_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.ssc) !== null && !!((_e = this.vehicleInformation) === null || _e === void 0 ? void 0 : _e.ssc.length) && (h(SSCTable, { key: '903b7a27b9093657aa7a2f11a8677ea825fb1d90', ssc: this.vehicleInformation.ssc })))))));
|
|
203
203
|
}
|
|
204
204
|
static get is() { return "warranty-details"; }
|
|
205
205
|
static get encapsulation() { return "shadow"; }
|
|
@@ -611,11 +611,15 @@ export class WarrantyDetails {
|
|
|
611
611
|
return {
|
|
612
612
|
"setData": {
|
|
613
613
|
"complexType": {
|
|
614
|
-
"signature": "(newData: VehicleInformation | string) => Promise<void>",
|
|
614
|
+
"signature": "(newData: VehicleInformation | string, headers?: any) => Promise<void>",
|
|
615
615
|
"parameters": [{
|
|
616
616
|
"name": "newData",
|
|
617
617
|
"type": "string | VehicleInformation",
|
|
618
618
|
"docs": ""
|
|
619
|
+
}, {
|
|
620
|
+
"name": "headers",
|
|
621
|
+
"type": "any",
|
|
622
|
+
"docs": ""
|
|
619
623
|
}],
|
|
620
624
|
"references": {
|
|
621
625
|
"Promise": {
|
|
@@ -641,11 +645,15 @@ export class WarrantyDetails {
|
|
|
641
645
|
},
|
|
642
646
|
"fetchData": {
|
|
643
647
|
"complexType": {
|
|
644
|
-
"signature": "(requestedVin?: string) => Promise<void>",
|
|
648
|
+
"signature": "(requestedVin?: string, headers?: any) => Promise<void>",
|
|
645
649
|
"parameters": [{
|
|
646
650
|
"name": "requestedVin",
|
|
647
651
|
"type": "string",
|
|
648
652
|
"docs": ""
|
|
653
|
+
}, {
|
|
654
|
+
"name": "headers",
|
|
655
|
+
"type": "any",
|
|
656
|
+
"docs": ""
|
|
649
657
|
}],
|
|
650
658
|
"references": {
|
|
651
659
|
"Promise": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
export const getPartInformation = async (component, generalProps) => {
|
|
5
|
+
export const getPartInformation = async (component, generalProps, headers = {}) => {
|
|
6
6
|
const { notAvailableMessage, mockData, partNumber, scopedTimeoutRef, middlewareCallback } = generalProps;
|
|
7
7
|
const { isDev, baseUrl, queryString, abortController, networkTimeoutRef, loadedResponse } = component;
|
|
8
8
|
const handleResult = (newPartInformation) => {
|
|
@@ -23,7 +23,7 @@ export const getPartInformation = async (component, generalProps) => {
|
|
|
23
23
|
else {
|
|
24
24
|
if (!baseUrl)
|
|
25
25
|
throw new Error('Please provide base-url');
|
|
26
|
-
const response = await fetch(`${baseUrl}${partNumber}?${queryString}`, { signal: abortController.signal });
|
|
26
|
+
const response = await fetch(`${baseUrl}${partNumber}?${queryString}`, { signal: abortController.signal, headers: headers });
|
|
27
27
|
const newData = (await response.json());
|
|
28
28
|
return handleResult(newData);
|
|
29
29
|
}
|
|
@@ -13,9 +13,9 @@ const vehicleRequestHeaders = {
|
|
|
13
13
|
cityIntegrationId: 'City-Integration-Id',
|
|
14
14
|
brandIntegrationId: 'Brand-Integration-Id',
|
|
15
15
|
companyIntegrationId: 'Company-Integration-Id',
|
|
16
|
-
companyBranchIntegrationId: 'Company-Branch-Integration-Id'
|
|
16
|
+
companyBranchIntegrationId: 'Company-Branch-Integration-Id'
|
|
17
17
|
};
|
|
18
|
-
export const getVehicleInformation = async (component, generalProps) => {
|
|
18
|
+
export const getVehicleInformation = async (component, generalProps, headers = {}) => {
|
|
19
19
|
const { notAvailableMessage, mockData, vin, scopedTimeoutRef, middlewareCallback } = generalProps;
|
|
20
20
|
const { isDev, baseUrl, queryString, abortController, networkTimeoutRef, loadedResponse } = component;
|
|
21
21
|
const handleResult = (newVehicleInformation) => {
|
|
@@ -36,12 +36,12 @@ export const getVehicleInformation = async (component, generalProps) => {
|
|
|
36
36
|
else {
|
|
37
37
|
if (!baseUrl)
|
|
38
38
|
throw new Error('Please provide base-url');
|
|
39
|
-
const
|
|
39
|
+
const componentHeaders = Object.assign({}, headers);
|
|
40
40
|
Object.entries(vehicleRequestHeaders).forEach(([componentHeaderKey, headerField]) => {
|
|
41
41
|
if (component[componentHeaderKey])
|
|
42
|
-
|
|
42
|
+
componentHeaders[headerField] = component[componentHeaderKey];
|
|
43
43
|
});
|
|
44
|
-
const response = await fetch(`${baseUrl}${vin}?${queryString}`, { signal: abortController.signal, headers:
|
|
44
|
+
const response = await fetch(`${baseUrl}${vin}?${queryString}`, { signal: abortController.signal, headers: componentHeaders });
|
|
45
45
|
const newData = (await response.json());
|
|
46
46
|
return handleResult(newData);
|
|
47
47
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as o,c as i}from"./p-4dc47f5f.js";import{g as r}from"./p-d265c109.js";import{L as a}from"./p-2b0cc0c6.js";import{c as n}from"./p-98d9e7ab.js";let s={};const d=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.isDev=!1,this.baseUrl="",this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0,this.activeIndex=null}handleSettingData(t){this.partInformation=t}toggleAccordion(t){this.activeIndex=this.activeIndex===t?null:t}async setData(t){let e;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,i=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=i;try{if(!i||0===i.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{e=setTimeout(t,700),this.networkTimeoutRef=e}));const a=o?await r(this,{scopedTimeoutRef:e,partNumber:i,mockData:s}):t;if(this.networkTimeoutRef===e){if(!a)throw Error("Wrong response format");this.handleSettingData(a)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber){await this.setData(t)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t,e;return o(i,{key:"7c1fd5523f284234ac9aa44b3f4963e411b48af1"},o("div",{key:"8fe334240d09636c0ee9ca73b89405a7617a415d",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},o("div",{key:"b72e6fd1785d5ec11ba443146aa8ad5fade7d5f2"},o(a,{key:"4160190f5427f8cb4475a7d2601c94ddbbfa1f6b",isLoading:this.state.includes("loading")}),o("div",{key:"f4124cf06ed01d32bc32980db867722f227960ac",class:n("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&o("div",{key:"f867f876e0fd07f4353c117606ca48a8ad27575d",class:"py-[16px]"},o("div",{key:"d8e23636133a75fc4f3099d17c0852b3c9070589",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&o("div",{key:"4599e737df0ed2afaa963e43334f38761c32db0a"},o("div",{key:"81096a35529e599c554a5ac5b0aa174294c6f7cc",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},o("div",{key:"1666930fe03143aa2b70d4b557f79c393db81ec9",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Deadstock"),null===(e=null===(t=this.partInformation)||void 0===t?void 0:t.deadStock)||void 0===e?void 0:e.map(((t,e)=>o("div",{style:{padding:"10px 20px"}},o("div",{class:"accordion-item border-b border-slate-200",style:{boxShadow:"rgb(225 225 225) 0px 0px 4px 1px",borderRadius:"5px",padding:"0 10px",marginBottom:"10px"},key:t.companyIntegrationID},o("button",{class:"accordion-header w-full flex justify-between items-center py-5 text-slate-800",onClick:()=>this.toggleAccordion(e)},o("strong",null,t.companyName),o("span",{class:"icon text-slate-800 transition-transform duration-300 "+(this.activeIndex===e?"rotate-180":"")},o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"w-4 h-4"},o("path",{"fill-rule":"evenodd",d:"M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z","clip-rule":"evenodd"})))),o("div",{class:"accordion-content overflow-hidden transition-all duration-300 ease-in-out "+(this.activeIndex===e?"max-h-screen":"max-h-0")},o("table",{class:"w-full overflow-auto relative border-collapse"},o("thead",null,o("tr",null,o("th",{class:"px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Branch"),o("th",{class:"px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Available Qty"))),o("tbody",null,null==t?void 0:t.branchDeadStock.map((t=>o("tr",{class:"transition-colors duration-100 hover:bg-slate-100",key:t.companyBranchIntegrationID},o("td",{class:n("px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]")},t.companyBranchName),o("td",{class:n("px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]")},o("strong",null,t.quantity))))))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,: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}.flex{display:flex}.hidden{display:none}.max-h-screen{max-height:100vh}.rotate-180{--tw-rotate:180deg}.rotate-180,.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)}:host{all:initial!important;display:block}*{font-family:Arial}.accordion-item{border-bottom:1px solid #e2e8f0}.accordion-header{align-items:center;cursor:pointer;display:flex;justify-content:space-between;width:100%}.accordion-content{max-height:0;overflow:hidden;transition:max-height .3s ease-in-out}.accordion-content.max-h-screen{max-height:1000px}.icon{transition:transform .3s ease-in-out}.icon.rotate-180{transform:rotate(180deg)}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.table{display:table}.h-4{height:1rem}.h-\\[40px\\]{height:40px}.max-h-0{max-height:0}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-4{width:1rem}.w-fit{width:fit-content}.w-full{width:100%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.rotate-180,.scale-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))}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.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))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/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)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.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}'}},[1,"dead-stock-lookup",{isDev:[4,"is-dev"],baseUrl:[1,"base-url"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],activeIndex:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function l(){"undefined"!=typeof customElements&&["dead-stock-lookup"].forEach((t=>{"dead-stock-lookup"===t&&(customElements.get(t)||customElements.define(t,d))}))}l();const c=d,p=l;export{c as DeadStockLookup,p as defineCustomElement}
|
|
5
|
+
import{p as t,H as e,h as o,c as i}from"./p-4dc47f5f.js";import{g as r}from"./p-4f08bcb8.js";import{L as a}from"./p-2b0cc0c6.js";import{c as n}from"./p-98d9e7ab.js";let s={};const d=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.isDev=!1,this.baseUrl="",this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0,this.activeIndex=null}handleSettingData(t){this.partInformation=t}toggleAccordion(t){this.activeIndex=this.activeIndex===t?null:t}async setData(t,e={}){let o;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const i="string"==typeof t,a=i?t:null==t?void 0:t.partNumber;this.externalPartNumber=a;try{if(!a||0===a.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{o=setTimeout(t,700),this.networkTimeoutRef=o}));const n=i?await r(this,{scopedTimeoutRef:o,partNumber:a,mockData:s},e):t;if(this.networkTimeoutRef===o){if(!n)throw Error("Wrong response format");this.handleSettingData(n)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t,e;return o(i,{key:"3a3c612f26d4a50303a00056983a967b2215ed27"},o("div",{key:"fbbef3d5226e849ad7fc864c62b581f4c9dff507",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},o("div",{key:"b5059f256646d672ddd0d1c09a4de3c8b5e66dc0"},o(a,{key:"311ba459650a88d1c87f45963b81748885055cf6",isLoading:this.state.includes("loading")}),o("div",{key:"5a9de2b501e5d6e33da6b9581be2a5c34327a2e5",class:n("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&o("div",{key:"c49cac2c5a97860ce92ef7ca3ca8bd71866d9168",class:"py-[16px]"},o("div",{key:"3f00000ec1798ee3afc0a9c135e56470220a8b40",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&o("div",{key:"9d31d42ac64f1fae58e8e6e802f62fe3bb29bf5c"},o("div",{key:"bac3865cb1e2570e2b20193ff0ffb474fad0a57c",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},o("div",{key:"0d4537c5db76475425e6862837ce49f60c0cbc76",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Deadstock"),null===(e=null===(t=this.partInformation)||void 0===t?void 0:t.deadStock)||void 0===e?void 0:e.map(((t,e)=>o("div",{style:{padding:"10px 20px"}},o("div",{class:"accordion-item border-b border-slate-200",style:{boxShadow:"rgb(225 225 225) 0px 0px 4px 1px",borderRadius:"5px",padding:"0 10px",marginBottom:"10px"},key:t.companyIntegrationID},o("button",{class:"accordion-header w-full flex justify-between items-center py-5 text-slate-800",onClick:()=>this.toggleAccordion(e)},o("strong",null,t.companyName),o("span",{class:"icon text-slate-800 transition-transform duration-300 "+(this.activeIndex===e?"rotate-180":"")},o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"w-4 h-4"},o("path",{"fill-rule":"evenodd",d:"M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z","clip-rule":"evenodd"})))),o("div",{class:"accordion-content overflow-hidden transition-all duration-300 ease-in-out "+(this.activeIndex===e?"max-h-screen":"max-h-0")},o("table",{class:"w-full overflow-auto relative border-collapse"},o("thead",null,o("tr",null,o("th",{class:"px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Branch"),o("th",{class:"px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Available Qty"))),o("tbody",null,null==t?void 0:t.branchDeadStock.map((t=>o("tr",{class:"transition-colors duration-100 hover:bg-slate-100",key:t.companyBranchIntegrationID},o("td",{class:n("px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]")},t.companyBranchName),o("td",{class:n("px-[10px] py-[20px] text-left whitespace-nowrap border-b border-[#d6d8dc]")},o("strong",null,t.quantity))))))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,: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}.flex{display:flex}.hidden{display:none}.max-h-screen{max-height:100vh}.rotate-180{--tw-rotate:180deg}.rotate-180,.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)}:host{all:initial!important;display:block}*{font-family:Arial}.accordion-item{border-bottom:1px solid #e2e8f0}.accordion-header{align-items:center;cursor:pointer;display:flex;justify-content:space-between;width:100%}.accordion-content{max-height:0;overflow:hidden;transition:max-height .3s ease-in-out}.accordion-content.max-h-screen{max-height:1000px}.icon{transition:transform .3s ease-in-out}.icon.rotate-180{transform:rotate(180deg)}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.table{display:table}.h-4{height:1rem}.h-\\[40px\\]{height:40px}.max-h-0{max-height:0}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-4{width:1rem}.w-fit{width:fit-content}.w-full{width:100%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.rotate-180,.scale-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))}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.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))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/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)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.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}'}},[1,"dead-stock-lookup",{isDev:[4,"is-dev"],baseUrl:[1,"base-url"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],activeIndex:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function l(){"undefined"!=typeof customElements&&["dead-stock-lookup"].forEach((t=>{"dead-stock-lookup"===t&&(customElements.get(t)||customElements.define(t,d))}))}l();const c=d,p=l;export{c as DeadStockLookup,p as defineCustomElement}
|