adp-web-components 0.0.12 → 0.0.13
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 +22 -10
- package/dist/cjs/distributor-lookup.cjs.entry.js +25 -15
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +2 -15
- package/dist/cjs/paint-thickness.cjs.entry.js +3 -16
- package/dist/cjs/service-history.cjs.entry.js +1 -14
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/vehicle-accessories.cjs.entry.js +3 -16
- package/dist/cjs/vehicle-specification.cjs.entry.js +1 -14
- package/dist/cjs/warranty-details.cjs.entry.js +5 -29
- 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.js +1 -14
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.js +3 -16
- package/dist/collection/components/vehicle-specification/vehicle-specification.js +1 -14
- package/dist/collection/components/warranty-details/warranty-details.js +7 -34
- 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/manufacturer-lookup.js +1 -1
- 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 +22 -10
- package/dist/esm/distributor-lookup.entry.js +25 -15
- package/dist/esm/loader.js +1 -1
- package/dist/esm/manufacturer-lookup.entry.js +2 -15
- package/dist/esm/paint-thickness.entry.js +3 -16
- package/dist/esm/service-history.entry.js +1 -14
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/vehicle-accessories.entry.js +3 -16
- package/dist/esm/vehicle-specification.entry.js +1 -14
- package/dist/esm/warranty-details.entry.js +5 -29
- package/dist/shift-components/p-6b21ce2d.entry.js +5 -0
- package/dist/shift-components/{p-c274f4ba.entry.js → p-7d85e912.entry.js} +1 -1
- package/dist/shift-components/p-7f258017.entry.js +5 -0
- package/dist/shift-components/{p-f21722ce.entry.js → p-9653e992.entry.js} +1 -1
- package/dist/shift-components/{p-75ea0e53.entry.js → p-d1b9cd93.entry.js} +1 -1
- package/dist/shift-components/p-d6f40c8d.entry.js +5 -0
- package/dist/shift-components/p-e05acce1.entry.js +5 -0
- package/dist/shift-components/{p-91eff216.entry.js → p-faa8070a.entry.js} +1 -1
- 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/warranty-details/warranty-details.d.ts +1 -2
- package/package.json +1 -1
- 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-ec9302fb.entry.js +0 -5
- package/dist/shift-components/p-f95c7501.entry.js +0 -5
|
@@ -33,7 +33,6 @@ export class DistributorLookup {
|
|
|
33
33
|
this.externalPartNumber = partNumber;
|
|
34
34
|
try {
|
|
35
35
|
if (!partNumber || partNumber.trim().length === 0) {
|
|
36
|
-
//this.componentHeight = '0px';
|
|
37
36
|
this.state = 'idle';
|
|
38
37
|
return;
|
|
39
38
|
}
|
|
@@ -66,19 +65,7 @@ export class DistributorLookup {
|
|
|
66
65
|
async fetchData(partNumber = this.externalPartNumber, headers = {}) {
|
|
67
66
|
await this.setData(partNumber, headers);
|
|
68
67
|
}
|
|
69
|
-
//calculateHeight(componentState: string) {
|
|
70
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
71
|
-
// this.componentHeight = '100px';
|
|
72
|
-
// } else if (componentState !== 'idle') {
|
|
73
|
-
// setTimeout(() => {
|
|
74
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
75
|
-
// }, 50);
|
|
76
|
-
// } else {
|
|
77
|
-
// this.componentHeight = '0px';
|
|
78
|
-
// }
|
|
79
|
-
//}
|
|
80
68
|
async loadingListener() {
|
|
81
|
-
//this.calculateHeight(newState);
|
|
82
69
|
if (this.loadingStateChange)
|
|
83
70
|
this.loadingStateChange(this.state.includes('loading'));
|
|
84
71
|
}
|
|
@@ -87,7 +74,30 @@ export class DistributorLookup {
|
|
|
87
74
|
}
|
|
88
75
|
render() {
|
|
89
76
|
var _a;
|
|
90
|
-
|
|
77
|
+
const infoRow1 = this.partInformation
|
|
78
|
+
? [
|
|
79
|
+
{ label: 'Description', value: this.partInformation.stockParts[0].partDescription },
|
|
80
|
+
{ label: 'Product Group', value: this.partInformation.stockParts[0].group },
|
|
81
|
+
{ label: 'Price', value: this.partInformation.stockParts[0].price },
|
|
82
|
+
]
|
|
83
|
+
: [];
|
|
84
|
+
const infoRow2 = this.partInformation
|
|
85
|
+
? [
|
|
86
|
+
{ label: 'Superseded To', value: this.partInformation.stockParts[0].supersededTo },
|
|
87
|
+
{ label: 'Superseded From', value: this.partInformation.stockParts[0].supersededFrom },
|
|
88
|
+
]
|
|
89
|
+
: [];
|
|
90
|
+
const displayDistributer = this.partInformation
|
|
91
|
+
? !this.partInformation.stockParts.some(({ quantityLookUpResult }) => quantityLookUpResult === 'LookupIsSkipped' || quantityLookUpResult === 'QuantityNotWithinLookupThreshold')
|
|
92
|
+
: false;
|
|
93
|
+
return (h(Host, { key: '3c5a08da9bb6d8c0bbdf11a6c0ead0b8b3ece4fd' }, h("div", { key: 'dcbc04f9ece2c0a837bb89819606be82b0e625d5', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'b70cd016c852fcb6cece1f6be2f037d7af80f0be' }, h(Loading, { key: 'e404e25b376251fd9cb1b6bf8e520db09b0e6cc5', isLoading: this.state.includes('loading') }), h("div", { key: '33620d5b42941efe1d4f962d4df4d98aac8bdc15', 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: 'f8fcc173188f6cbdfcf6da841ad6556b1a105d8d', class: "py-[16px]" }, h("div", { key: '7c2837559f70060bc3f133a0818299bd590bfb79', 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: 'ad5eb569a94d00437c949317a6085e0df88911e1' }, h("div", { key: '159eb5d8c3e27a47352711b72f7364320a036adf', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '239a82c459a749aaef876be1f29651e4938e28ef', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Info"), h("div", { key: 'fc013a900a27b19650727cea7bb724c71e2efd20', class: "py-[10px] flex flex-col gap-[15px]" }, h("div", { key: '8621fa1329cb3373ac95cc155541322172a853a4', class: "flex gap-[50px]" }, infoRow1.map(({ label, value }) => (h("div", { key: label, class: "flex flex-col flex-1" }, h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), h("div", { class: "py-[10px] px-0" }, value))))), h("div", { key: 'b0df20fbafbb582eb26dd24021f636190ddad458', class: "flex gap-[50px]" }, infoRow2.map(({ label, value }) => (h("div", { key: label, class: "flex flex-col flex-1" }, h("strong", { class: "py-[10px] px-0 border-b border-b-[grey]" }, label), h("div", { class: "py-[10px] px-0" }, value)))), h("div", { key: '4d8824a39a0390e354863354c7d9edb8bdf3b28f', class: "flex-1" })))), displayDistributer && (h("div", { key: 'ad80b9e8a12cae61a5f734d13d51c07133667b2a', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '706d7fa5a761d47f93cfd6d6135f5b9eeff0c63a', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Distributor Stock"), h("div", { key: 'e660afe492e8722e22d1c2e96fbab51899549800', class: "flex flex-col gap-[15px]" }, h("table", { key: 'ff93c641d7c31b163957aa28086b3f4f49477b88', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'bfc5d1fe90425b6bfa964adf94b5291f29f5a05b', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: 'c162b0953b301b7cea3be6023ffe1cd51d145f54' }, ['Location', 'Availability'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: 'd4650b04d2292edbf185bedb4d34f065e04e0589' }, (_a = this.partInformation) === null || _a === void 0 ? void 0 : _a.stockParts.map(stock => (h("tr", { class: "transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100", key: stock.locationID }, h("td", { class: cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, stock.locationName), h("td", { class: cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, h("div", { class: cn('text-[red]', {
|
|
94
|
+
'text-[green]': stock.quantityLookUpResult === 'Available',
|
|
95
|
+
'text-[orange]': stock.quantityLookUpResult === 'PartiallyAvailable',
|
|
96
|
+
}) }, h("strong", null, stock.quantityLookUpResult === 'Available'
|
|
97
|
+
? 'Available'
|
|
98
|
+
: stock.quantityLookUpResult === 'PartiallyAvailable'
|
|
99
|
+
? 'Partially Available'
|
|
100
|
+
: 'Not Available'))))))))))))))))));
|
|
91
101
|
}
|
|
92
102
|
static get is() { return "distributor-lookup"; }
|
|
93
103
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\[12px\]{margin-top:12px}.flex{display:flex}.h-\[40px\]{height:40px}.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}.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}.gap-\[15px\]{gap:15px}.gap-\[50px\]{gap:50px}.overflow-hidden{overflow:hidden}.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-b-\[grey\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\[\#e1e3e5\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\[16px\]{padding-left:16px;padding-right:16px}.px-\[30px\]{padding-left:30px;padding-right:30px}.py-\[10px\]{padding-bottom:10px;padding-top:10px}.py-\[16px\]{padding-bottom:16px;padding-top:16px}.py-\[8px\]{padding-bottom:8px;padding-top:8px}.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))}.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}
|
|
@@ -34,7 +34,6 @@ export class ManufacturerLookup {
|
|
|
34
34
|
this.externalPartNumber = partNumber;
|
|
35
35
|
try {
|
|
36
36
|
if (!partNumber || partNumber.trim().length === 0) {
|
|
37
|
-
//this.componentHeight = '0px';
|
|
38
37
|
this.state = 'idle';
|
|
39
38
|
return;
|
|
40
39
|
}
|
|
@@ -67,19 +66,7 @@ export class ManufacturerLookup {
|
|
|
67
66
|
async fetchData(partNumber = this.externalPartNumber, headers = {}) {
|
|
68
67
|
await this.setData(partNumber, headers);
|
|
69
68
|
}
|
|
70
|
-
//calculateHeight(componentState: string) {
|
|
71
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
72
|
-
// this.componentHeight = '100px';
|
|
73
|
-
// } else if (componentState !== 'idle') {
|
|
74
|
-
// setTimeout(() => {
|
|
75
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
76
|
-
// }, 50);
|
|
77
|
-
// } else {
|
|
78
|
-
// this.componentHeight = '0px';
|
|
79
|
-
// }
|
|
80
|
-
//}
|
|
81
69
|
async loadingListener() {
|
|
82
|
-
//this.calculateHeight(newState);
|
|
83
70
|
if (this.loadingStateChange)
|
|
84
71
|
this.loadingStateChange(this.state.includes('loading'));
|
|
85
72
|
}
|
|
@@ -87,7 +74,7 @@ export class ManufacturerLookup {
|
|
|
87
74
|
mockData = newMockData;
|
|
88
75
|
}
|
|
89
76
|
render() {
|
|
90
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: '9cec65cb5b6300b130e8af6faf83e5e5218fcc1e' }, h("div", { key: '8d7661403efd16aeed5b4e481dbe01889e781b9d', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '2c0f35bc4bb0eb202b03d68f394a8b61aa45765f' }, h(Loading, { key: '5b501d52c3d36b5a0faa7447d8ee2884e5eedd9d', isLoading: this.state.includes('loading') }), h("div", { key: '0e9f54293dcf20797371b4788e45864d62517ed4', 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: '1d295e9c0540942d84806c0a3e262b82f3a25ad5', class: "py-[16px]" }, h("div", { key: '59b91062e6270eb984945abb2f876e49bb2c827f', 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: '029fd4596e57bcaf22fe99af0b2df0d99918a9de' }, h("div", { key: '4238846980d8a390ad522e916f0d5ee0f9b566bb', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'ac90d7513b742b8a1300e9a2f337fd1a22fbf8d5', 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: 'cd8b5a2f0e1c0c2db8d7c6750727e4a8e03b601e', class: "px-[30px] py-[10px] flex flex-col gap-[15px]" }, h("div", { key: '0cdfe3fd454e8a7ca19dd962cf9e1c3d2a156b2c', class: "flex gap-[50px]" }, h("div", { key: '03710ca72597273ef45dd40a12bc8c87c92c2ee6', class: "flex flex-col flex-1" }, h("strong", { key: '9121a29035dc3cb0624b814417eb2ae01fdd28ad', class: "py-[10px] border-b border-b-[grey]" }, "Description"), h("div", { key: '6278922b721b4b63b7d99ff1fd0490dee8a9dfc2', class: "py-[10px]" }, this.partInformation.tmcPart.partDescription)), h("div", { key: 'f3e651ba7f50de00873739f2b4bbb91d1835f792', class: "flex flex-col flex-1" }, h("strong", { key: '7351da14f1ac55180f18cbfafbc47ce44e7104cf', class: "py-[10px] border-b border-b-[grey]" }, "Product Group"), h("div", { key: '8869a8228b33fdc154f4a06d437ea7b6cddd73ed', class: "py-[10px]" }, this.partInformation.tmcPart.group)), h("div", { key: '19060b17fd4f1bd3ec7798915f35fac0f65694cc', class: "flex-1" })))))))))));
|
|
91
78
|
}
|
|
92
79
|
static get is() { return "manufacturer-lookup"; }
|
|
93
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -35,7 +35,6 @@ export class ServiceHistory {
|
|
|
35
35
|
this.externalVin = vin;
|
|
36
36
|
try {
|
|
37
37
|
if (!vin || vin.trim().length === 0) {
|
|
38
|
-
//this.componentHeight = '0px';
|
|
39
38
|
this.state = 'idle';
|
|
40
39
|
return;
|
|
41
40
|
}
|
|
@@ -68,19 +67,7 @@ export class ServiceHistory {
|
|
|
68
67
|
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
69
68
|
await this.setData(requestedVin, headers);
|
|
70
69
|
}
|
|
71
|
-
//calculateHeight(componentState: string) {
|
|
72
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
73
|
-
// this.componentHeight = '100px';
|
|
74
|
-
// } else if (componentState !== 'idle') {
|
|
75
|
-
// setTimeout(() => {
|
|
76
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
77
|
-
// }, 50);
|
|
78
|
-
// } else {
|
|
79
|
-
// this.componentHeight = '0px';
|
|
80
|
-
// }
|
|
81
|
-
//}
|
|
82
70
|
async loadingListener() {
|
|
83
|
-
//this.calculateHeight(newState);
|
|
84
71
|
if (this.loadingStateChange)
|
|
85
72
|
this.loadingStateChange(this.state.includes('loading'));
|
|
86
73
|
}
|
|
@@ -89,7 +76,7 @@ export class ServiceHistory {
|
|
|
89
76
|
}
|
|
90
77
|
render() {
|
|
91
78
|
var _a, _b, _c, _d;
|
|
92
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: '41626d52c1a46c5aa17d924c740ff128c717db72' }, h("div", { key: '148b48b3511bbb0edcb06c95f432cec3794bb8be', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '83af30eb9e1bb760b7d0524b5868b98390ae67c0' }, h(Loading, { key: '6f4a0f5c66407fc24ba9ffc624d3d2e37abca2f6', isLoading: this.state.includes('loading') }), h("div", { key: 'f16ed2ccb8a9e3bcd8f71eaf05fb3c4a28eb0a16', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'ffba94045d0641ffad445c78173ef139e133ae8d', 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: '710d22f3233b428cafab34984cc562e46fa92d8b', class: "py-[16px]" }, h("div", { key: 'b036ab0231e60c66a24757b23ec5acceeca359f9', 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: '64fd2439a7edc45b552a7e7ea2a6583b9376b57b', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'dec74cb4310d310094fa9958b0c3991f476d9bb8', 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: 'bc17bcd99593f7a86c00c6fbed2a9cc3c516eae7', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.serviceHistory.length) && h("div", { key: '8d5a0902e8a13909867f0f138bbd629ad97b8b3e', 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: '9121de3dbcdd6ceb6e88380d15ba3a0885626af3', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '492edb0969f9774ff1fa78af9fdb4bab3f240e23', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '91bb78d8f37c12c20f331ec55f76d362572bfcee' }, ['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: '6019cc8f4ad18c13b3b082fe87da6a2bfab65773' }, (_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
80
|
var _a;
|
|
94
81
|
return (h("td", { key: service.invoiceNumber + serviceType, class: cn('px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
95
82
|
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
@@ -47,7 +47,6 @@ export class VehicleAccessories {
|
|
|
47
47
|
this.externalVin = vin;
|
|
48
48
|
try {
|
|
49
49
|
if (!vin || vin.trim().length === 0) {
|
|
50
|
-
//this.componentHeight = '0px';
|
|
51
50
|
this.state = 'idle';
|
|
52
51
|
return;
|
|
53
52
|
}
|
|
@@ -80,19 +79,7 @@ export class VehicleAccessories {
|
|
|
80
79
|
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
81
80
|
await this.setData(requestedVin, headers);
|
|
82
81
|
}
|
|
83
|
-
//calculateHeight(componentState: string) {
|
|
84
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
85
|
-
// this.componentHeight = '100px';
|
|
86
|
-
// } else if (componentState !== 'idle') {
|
|
87
|
-
// setTimeout(() => {
|
|
88
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
89
|
-
// }, 50);
|
|
90
|
-
// } else {
|
|
91
|
-
// this.componentHeight = '0px';
|
|
92
|
-
// }
|
|
93
|
-
//}
|
|
94
82
|
async loadingListener() {
|
|
95
|
-
//this.calculateHeight(newState);
|
|
96
83
|
if (this.loadingStateChange)
|
|
97
84
|
this.loadingStateChange(this.state.includes('loading'));
|
|
98
85
|
}
|
|
@@ -102,7 +89,7 @@ export class VehicleAccessories {
|
|
|
102
89
|
render() {
|
|
103
90
|
var _a, _b;
|
|
104
91
|
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: '
|
|
92
|
+
return (h(Host, { key: '7e5394e3dad05815f3a514a342f7afbe11a8d4c1' }, h("div", { key: '1d3fea9972e6827680908bc1becb9be17a4305db', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '853e8ff5ad5adf557db5805fc6cc841d7ee224d0' }, h(Loading, { key: '46cdabae84cf49eb88b277bf55b45f233cf28021', isLoading: this.state.includes('loading') }), h("div", { key: '948f2861dcf3e7a8b94f84400a75f681f405122a', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '2b53f6a05b1beab10a9436435969bfc0bc383cae', 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: '90d5c9e6f1efd3cef3994d2d7ccd6d278d424a76', class: "py-[16px]" }, h("div", { key: '4cd2e9823137e6a7b861fea69f13a6a0343929b2', 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: '9481a97632f581c0b3ebdf0df9086730d10dfdc1', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '649fa9917501f66fa2380e3557c5e86ad26d7f89', 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: '262a67208efe49dbb113c7925cf6b6ae835b3f0c', class: "h-0 overflow-auto flex-1" }, !accessories.length && h("div", { key: 'ec443d025b8ca3e50f397ffb1c66e5b280e42f70', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!accessories.length && (h("table", { key: '48d6e63959a8732972b89ca514b72d5677eb4447', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'b9cdc265accdb543d14bacc09756e2a7ac44e6e8', class: "top-0 font-bold z-40 sticky bg-white" }, h("tr", { key: '2951863ff3d03fa9eab980acd348d2ae352cc1b4' }, ['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: '7106dfb61229963e59d800f630a0e351be1d680f' }, accessories.map((accessory, idx) => {
|
|
106
93
|
var _a;
|
|
107
94
|
return (h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: accessory.partNumber }, ['partNumber', 'description'].map(key => {
|
|
108
95
|
var _a;
|
|
@@ -112,9 +99,9 @@ export class VehicleAccessories {
|
|
|
112
99
|
}), h("td", { class: cn('px-[10px] py-[10px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
113
100
|
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
114
101
|
}) }, h("button", { onClick: ({ target }) => this.openImage(target, accessory.image), class: "shrink-0 relative ring-0 outline-none w-fit mx-auto [&_img]:hover:shadow-lg [&_div]:hover:!opacity-100 cursor-pointer" }, h("div", { class: "absolute flex-col justify-center gap-[4px] size-full flex items-center pointer-events-none hover:opacity-100 rounded-lg opacity-0 bg-black/40 transition-all duration-300" }, h("img", { src: Eye }), h("span", { class: "text-white" }, "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: '
|
|
102
|
+
})), h("div", { key: 'a16654412c64f0811caf281bc9a10b4325143f74', 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
103
|
'pointer-events-auto opacity-100 delay-200': this.expandedImage,
|
|
117
|
-
}) }, h("button", { key: '
|
|
104
|
+
}) }, h("button", { key: '2a1f6a6de320d464b549be5c8d0955743eab0c1a', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, h("div", { key: '9806406418b9a2588b18a9659a183b494d2dc029', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), h("div", { key: 'e52ccc81db9fad6cde21438bae24ac06ed06d886', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), h("img", { key: '9db20d318e852a02ad255e5dc463d5ffd3135eb5', alt: "", id: "expanded-image", class: "fixed opacity-0 z-50 transition-all rounded-lg" })))))))))));
|
|
118
105
|
}
|
|
119
106
|
static get is() { return "vehicle-accessories"; }
|
|
120
107
|
static get encapsulation() { return "shadow"; }
|
|
@@ -30,7 +30,6 @@ export class VehicleSpecification {
|
|
|
30
30
|
this.externalVin = vin;
|
|
31
31
|
try {
|
|
32
32
|
if (!vin || vin.trim().length === 0) {
|
|
33
|
-
//this.componentHeight = '0px';
|
|
34
33
|
this.state = 'idle';
|
|
35
34
|
return;
|
|
36
35
|
}
|
|
@@ -63,19 +62,7 @@ export class VehicleSpecification {
|
|
|
63
62
|
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
64
63
|
await this.setData(requestedVin, headers);
|
|
65
64
|
}
|
|
66
|
-
//calculateHeight(componentState: string) {
|
|
67
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
68
|
-
// this.componentHeight = '100px';
|
|
69
|
-
// } else if (componentState !== 'idle') {
|
|
70
|
-
// setTimeout(() => {
|
|
71
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
72
|
-
// }, 50);
|
|
73
|
-
// } else {
|
|
74
|
-
// this.componentHeight = '0px';
|
|
75
|
-
// }
|
|
76
|
-
//}
|
|
77
65
|
async loadingListener() {
|
|
78
|
-
//this.calculateHeight(newState);
|
|
79
66
|
if (this.loadingStateChange)
|
|
80
67
|
this.loadingStateChange(this.state.includes('loading'));
|
|
81
68
|
}
|
|
@@ -84,7 +71,7 @@ export class VehicleSpecification {
|
|
|
84
71
|
}
|
|
85
72
|
render() {
|
|
86
73
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
87
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'b9a0f984a08acc14315b7b7b30742ad9f5bdb49e' }, h("div", { key: 'af83954e986a078b9e33bfd4fc8797fb79fb028b', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '448f30f13b9c20fb30ff369e55bf564bd0d8fe20' }, h(Loading, { key: '53523ee006eef27b765fd1b6375f39bf7f1e02c6', isLoading: this.state.includes('loading') }), h("div", { key: '78dd7934c80487fb68c67747512c5c96809280ac', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'da5b237a42b1ff4b0c20fe40ad5c46224c265986', 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: 'dc9cae0fec62f66c747de76185d2e1688162224e', class: "py-4" }, h("div", { key: '8f3b7129711bff7688170ac8228417b0bf3b4c5c', 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: '9215e325e2b80534142c4833b717b569949721ec', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '87630966a701dc6989221ac7a133ca7e0856fcf1', 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: '06489c6c3ad553a5502cdf72cc43724d2b5c74bc', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && h("div", { key: 'e6e2d53c4233cacc6571b1b9d2eaa6553bae7831', 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: '30bf7dfaf6c8c5d9829e8a30d9644326c5a2c6d2', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'b64236329f77e1e236ad286bbe5068e55f5e40c9', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: 'b79c310db87dc4b40a56a0efbe82ffd54da09a21' }, ['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: 'b8afb49709c1362e95dd4446978b54c2fc570fcb' }, h("tr", { key: 'b566724d705cd430f7fba1e1addab9a1189ebb5d' }, h("td", { key: '0577fa2f9221fdd8df0a557b92e77f3bad0885ac', 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: 'f751d6784c076ce25442d7a916bc468ecd007777', 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: '01e40cad1d8dc4cdfc933dcfade4b8e605219d3e', 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: 'f34677ab8bf2311f6ac2fd7426805cfe50ccafd7' }), ((_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
75
|
var _a;
|
|
89
76
|
const [place, field] = infoPath.split('.');
|
|
90
77
|
const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
|
|
@@ -42,6 +42,7 @@ export class WarrantyDetails {
|
|
|
42
42
|
this.vehicleInformation = undefined;
|
|
43
43
|
this.checkingUnauthorizedSSC = false;
|
|
44
44
|
this.recaptchaRes = null;
|
|
45
|
+
this.headers = {};
|
|
45
46
|
}
|
|
46
47
|
handleSettingData(response) {
|
|
47
48
|
var _a, _b, _c;
|
|
@@ -74,7 +75,6 @@ export class WarrantyDetails {
|
|
|
74
75
|
if (this.isDev) {
|
|
75
76
|
this.checkingUnauthorizedSSC = true;
|
|
76
77
|
this.showRecaptcha = false;
|
|
77
|
-
//this.calculateHeight(this.state);
|
|
78
78
|
await new Promise(r => setTimeout(r, 3000));
|
|
79
79
|
this.checkingUnauthorizedSSC = false;
|
|
80
80
|
const hasPendingSSC = Math.random() < 0.5 ? false : true;
|
|
@@ -82,17 +82,14 @@ export class WarrantyDetails {
|
|
|
82
82
|
hasSSC: hasPendingSSC,
|
|
83
83
|
message: hasPendingSSC ? 'This Vehicle has a Pending SSC' : 'No Pending SSC',
|
|
84
84
|
};
|
|
85
|
-
//this.calculateHeight(this.state);
|
|
86
85
|
}
|
|
87
86
|
else {
|
|
88
87
|
this.checkingUnauthorizedSSC = true;
|
|
89
88
|
this.showRecaptcha = false;
|
|
90
|
-
|
|
89
|
+
///
|
|
91
90
|
const response = await fetch(`${this.unauthorizedSscLookupBaseUrl}${vin}/${(_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.sscLogId}?${this.unauthorizedSscLookupQueryString}`, {
|
|
92
91
|
signal: this.abortController.signal,
|
|
93
|
-
headers: {
|
|
94
|
-
'Ssc-Recaptcha-Token': recaptchaResponse,
|
|
95
|
-
},
|
|
92
|
+
headers: Object.assign(Object.assign({}, this.headers), { 'Ssc-Recaptcha-Token': recaptchaResponse }),
|
|
96
93
|
});
|
|
97
94
|
const vinResponse = await response.json();
|
|
98
95
|
if (vinResponse && this.networkTimeoutRef === scopedTimeoutRef) {
|
|
@@ -102,7 +99,6 @@ export class WarrantyDetails {
|
|
|
102
99
|
hasSSC: hasPendingSSC,
|
|
103
100
|
message: hasPendingSSC ? 'This Vehicle has a Pending SSC' : 'No Pending SSC',
|
|
104
101
|
};
|
|
105
|
-
//this.calculateHeight(this.state);
|
|
106
102
|
}
|
|
107
103
|
else
|
|
108
104
|
throw new Error('Wrong response format');
|
|
@@ -117,6 +113,7 @@ export class WarrantyDetails {
|
|
|
117
113
|
}
|
|
118
114
|
async setData(newData, headers = {}) {
|
|
119
115
|
this.recaptchaRes = null;
|
|
116
|
+
this.headers = headers;
|
|
120
117
|
clearTimeout(this.networkTimeoutRef);
|
|
121
118
|
clearInterval(this.recaptchaIntervalRef);
|
|
122
119
|
if (this.abortController)
|
|
@@ -128,7 +125,6 @@ export class WarrantyDetails {
|
|
|
128
125
|
this.externalVin = vin;
|
|
129
126
|
try {
|
|
130
127
|
if (!vin || vin.trim().length === 0) {
|
|
131
|
-
//this.componentHeight = '0px';
|
|
132
128
|
this.state = 'idle';
|
|
133
129
|
return;
|
|
134
130
|
}
|
|
@@ -172,34 +168,16 @@ export class WarrantyDetails {
|
|
|
172
168
|
document.head.appendChild(script);
|
|
173
169
|
}
|
|
174
170
|
}
|
|
175
|
-
//calculateHeight(componentState: string) {
|
|
176
|
-
// if (componentState.includes('loading') && this.componentHeight === '0px') {
|
|
177
|
-
// this.componentHeight = '100px';
|
|
178
|
-
// } else if (componentState !== 'idle') {
|
|
179
|
-
// setTimeout(() => {
|
|
180
|
-
// this.componentHeight = `${this.wrapperRef.clientHeight}px`;
|
|
181
|
-
// }, 50);
|
|
182
|
-
// } else {
|
|
183
|
-
// this.componentHeight = '0px';
|
|
184
|
-
// }
|
|
185
|
-
//}
|
|
186
171
|
async setMockData(newMockData) {
|
|
187
172
|
mockData = newMockData;
|
|
188
173
|
}
|
|
189
|
-
onShowSscChange() {
|
|
190
|
-
//this.calculateHeight(this.state);
|
|
191
|
-
}
|
|
192
|
-
onShowWarrantyChange() {
|
|
193
|
-
//this.calculateHeight(this.state);
|
|
194
|
-
}
|
|
195
174
|
async loadingListener() {
|
|
196
|
-
//this.calculateHeight(newState);
|
|
197
175
|
if (this.loadingStateChange)
|
|
198
176
|
this.loadingStateChange(this.state.includes('loading'));
|
|
199
177
|
}
|
|
200
178
|
render() {
|
|
201
179
|
var _a, _b, _c, _d, _e;
|
|
202
|
-
return (h(Host, { key: '
|
|
180
|
+
return (h(Host, { key: '3c8f75a5285bcae20b14896f48219478873dc56f' }, h("div", { key: 'b87f7c2301163f6a8a59ea30005bf5fdce3084b3', class: "min-h-[100px] warranty" }, h("div", { key: '2e9eca00ba1b2b5a362966ce7bec90118a255be4' }, h(Loading, { key: 'e0dcf745ea9409ffd55f54a2b304bf448f00981d', isLoading: this.state.includes('loading') }), h("div", { key: 'ae2feac973e3ddfc3e8b38f1887f1f3ff2da0393', 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: 'd27ea304918aad5f6fc6acce7ea4b4da89be5d7b', 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: '1f797e76bb68d350ff3b071a11d94cd72f031569', class: "py-4" }, h(StatusCard, { key: '4f674cc1259a7628bb565f737575108ef1882569', desc: this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (h(CardsContainer, { key: '7c47e8a2c5dd921af1df7f8d2453a3897709dde3', 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: '250484f60f45bc8470c074056cbd567017fb1fcd', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, h("slot", { key: '4e728a717fdc8b34a6c861a40ff0cf7ec9dacf95' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (h("div", { key: 'aa3134245674835812a638b4d8ccf6da1baafc13', class: cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.recaptchaRes.message)), this.checkingUnauthorizedSSC && (h("div", { key: '33c4511869c04b4780285f35e19efee5362b6240', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, h("div", { key: '69c77e7eff03943790b00030068ec3b25c86fb25' }, h("strong", { key: 'a6b3cf9c81dc0cf5dcad68189827428511eb289f' }, "Checking TMC")), h("img", { key: '812b2eb0ca00baa596ccf6e6e5e4943dccc89159', 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: 'be4c7f932929fc7aff56eb3fb6c45e5d2bd3ff1d', ssc: this.vehicleInformation.ssc })))))));
|
|
203
181
|
}
|
|
204
182
|
static get is() { return "warranty-details"; }
|
|
205
183
|
static get encapsulation() { return "shadow"; }
|
|
@@ -604,7 +582,8 @@ export class WarrantyDetails {
|
|
|
604
582
|
"unInvoicedByBrokerName": {},
|
|
605
583
|
"vehicleInformation": {},
|
|
606
584
|
"checkingUnauthorizedSSC": {},
|
|
607
|
-
"recaptchaRes": {}
|
|
585
|
+
"recaptchaRes": {},
|
|
586
|
+
"headers": {}
|
|
608
587
|
};
|
|
609
588
|
}
|
|
610
589
|
static get methods() {
|
|
@@ -704,12 +683,6 @@ export class WarrantyDetails {
|
|
|
704
683
|
static get elementRef() { return "el"; }
|
|
705
684
|
static get watchers() {
|
|
706
685
|
return [{
|
|
707
|
-
"propName": "showSsc",
|
|
708
|
-
"methodName": "onShowSscChange"
|
|
709
|
-
}, {
|
|
710
|
-
"propName": "showWarranty",
|
|
711
|
-
"methodName": "onShowWarrantyChange"
|
|
712
|
-
}, {
|
|
713
686
|
"propName": "state",
|
|
714
687
|
"methodName": "loadingListener"
|
|
715
688
|
}];
|