adp-web-components 0.0.13 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{loader-baf2418b.js → Loading-20e4ef35.js} +9 -0
- package/dist/cjs/app-globals-26499410.js +33 -0
- package/dist/cjs/dead-stock-lookup.cjs.entry.js +3 -4
- package/dist/cjs/distributor-lookup.cjs.entry.js +3 -4
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +1046 -0
- package/dist/cjs/dynamic-redeem.cjs.entry.js +5 -5
- package/dist/cjs/form-input.cjs.entry.js +2 -2
- package/dist/cjs/general-inquiry-form.cjs.entry.js +2 -2
- package/dist/cjs/{index-d4b5214c.js → index-97b8da6d.js} +289 -8
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +3 -4
- package/dist/cjs/shift-components.cjs.js +3 -3
- package/dist/cjs/vehicle-lookup.cjs.entry.js +168 -0
- package/dist/collection/collection-manifest.json +8 -6
- package/dist/collection/components/dynamic-claim/dynamic-claim.css +1 -1
- package/dist/collection/components/dynamic-claim/dynamic-claim.js +2 -2
- package/dist/collection/components/dynamic-redeem/dynamic-redeem.css +1 -1
- package/dist/collection/components/dynamic-redeem/dynamic-redeem.js +3 -3
- package/dist/collection/components/form-input/form-input.js +1 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.js +1 -1
- package/dist/collection/components/paint-thickness/paint-thickness.css +1 -1
- package/dist/collection/components/paint-thickness/paint-thickness.js +3 -3
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.js +1 -1
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +1 -1
- package/dist/collection/components/service-history/service-history.css +1 -1
- package/dist/collection/components/service-history/service-history.js +1 -1
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.css +1 -1
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.js +3 -3
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -0
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +366 -0
- package/dist/collection/components/vehicle-specification/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-specification/vehicle-specification.js +1 -1
- package/dist/collection/components/warranty-details/warranty-details.css +1 -1
- package/dist/collection/components/warranty-details/warranty-details.js +1 -1
- package/dist/collection/global/lib/middleware.js +26 -0
- package/dist/collection/global/lib/validate-vin.js +62 -0
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/dynamic-claim.js +1 -1
- package/dist/components/dynamic-redeem.js +1 -1
- package/dist/components/form-input.js +1 -1
- package/dist/components/general-inquiry-form.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/p-05871c28.js +5 -0
- package/dist/components/p-23551e81.js +5 -0
- package/dist/components/p-325b6857.js +5 -0
- package/dist/components/{p-50f73226.js → p-3bf0339d.js} +1 -1
- package/dist/components/p-514c4736.js +5 -0
- package/dist/components/{p-2b0cc0c6.js → p-8385e385.js} +1 -1
- package/dist/components/p-be0a5ab5.js +5 -0
- package/dist/components/p-c8eef708.js +5 -0
- package/dist/components/p-da533bd7.js +5 -0
- package/dist/components/p-e46b126e.js +5 -0
- package/dist/components/p-f1ffc23d.js +5 -0
- package/dist/components/paint-thickness.js +1 -1
- package/dist/components/service-history.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-lookup.d.ts +11 -0
- package/dist/components/vehicle-lookup.js +5 -0
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/{loader-027b88af.js → Loading-d050617c.js} +9 -1
- package/dist/esm/app-globals-7790014c.js +31 -0
- package/dist/esm/dead-stock-lookup.entry.js +3 -4
- package/dist/esm/distributor-lookup.entry.js +3 -4
- package/dist/esm/dynamic-claim_6.entry.js +1037 -0
- package/dist/esm/dynamic-redeem.entry.js +5 -5
- package/dist/esm/form-input.entry.js +2 -2
- package/dist/esm/general-inquiry-form.entry.js +2 -2
- package/dist/esm/{index-ef54644b.js → index-ff1dab22.js} +289 -8
- package/dist/esm/loader.js +4 -4
- package/dist/esm/manufacturer-lookup.entry.js +3 -4
- package/dist/esm/shift-components.js +4 -4
- package/dist/esm/vehicle-lookup.entry.js +164 -0
- package/dist/shift-components/{p-894e7518.entry.js → p-15e82b1a.entry.js} +1 -1
- package/dist/shift-components/p-1a727cfd.entry.js +5 -0
- package/dist/shift-components/p-2bb4415e.entry.js +5 -0
- package/dist/shift-components/p-3f3b41b4.entry.js +5 -0
- package/dist/shift-components/{p-8e818568.entry.js → p-4c3f2850.entry.js} +1 -1
- package/dist/shift-components/p-4ca95c3d.entry.js +5 -0
- package/dist/shift-components/p-65939a2f.js +5 -0
- package/dist/shift-components/p-7177b6f0.entry.js +5 -0
- package/dist/shift-components/p-8b198a04.entry.js +5 -0
- package/dist/shift-components/p-a92f02d4.js +5 -0
- package/dist/shift-components/p-f37b60d5.js +6 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +32 -0
- package/dist/types/components.d.ts +46 -2
- package/dist/types/global/lib/middleware.d.ts +0 -0
- package/dist/types/global/lib/validate-vin.d.ts +1 -0
- package/dist/types/global/types/components.d.ts +3 -0
- package/package.json +1 -1
- package/readme.md +2 -91
- package/dist/cjs/Loading-ee1a2ceb.js +0 -16
- package/dist/cjs/app-globals-3813fb46.js +0 -9
- package/dist/cjs/dynamic-claim.cjs.entry.js +0 -306
- package/dist/cjs/image-expansion-a9c9c6f7.js +0 -77
- package/dist/cjs/paint-thickness.cjs.entry.js +0 -118
- package/dist/cjs/service-history.cjs.entry.js +0 -103
- package/dist/cjs/vehicle-accessories.cjs.entry.js +0 -122
- package/dist/cjs/vehicle-specification.cjs.entry.js +0 -98
- package/dist/cjs/vehicleInformation-35c470fc.js +0 -52
- package/dist/cjs/warranty-details.cjs.entry.js +0 -257
- package/dist/components/p-4dc47f5f.js +0 -5
- package/dist/components/p-8375923d.js +0 -5
- package/dist/components/p-a454210b.js +0 -5
- package/dist/esm/Loading-61648252.js +0 -14
- package/dist/esm/app-globals-8befa224.js +0 -7
- package/dist/esm/dynamic-claim.entry.js +0 -302
- package/dist/esm/image-expansion-08c4bf0d.js +0 -73
- package/dist/esm/paint-thickness.entry.js +0 -114
- package/dist/esm/service-history.entry.js +0 -99
- package/dist/esm/vehicle-accessories.entry.js +0 -118
- package/dist/esm/vehicle-specification.entry.js +0 -94
- package/dist/esm/vehicleInformation-f7290628.js +0 -50
- package/dist/esm/warranty-details.entry.js +0 -253
- package/dist/shift-components/p-517b3e04.js +0 -5
- package/dist/shift-components/p-65e6ab8e.js +0 -5
- package/dist/shift-components/p-6b21ce2d.entry.js +0 -5
- package/dist/shift-components/p-7d85e912.entry.js +0 -5
- package/dist/shift-components/p-7f258017.entry.js +0 -5
- package/dist/shift-components/p-9653e992.entry.js +0 -5
- package/dist/shift-components/p-a21e2e2e.js +0 -5
- package/dist/shift-components/p-c4fad245.js +0 -5
- package/dist/shift-components/p-ca1e2e5b.entry.js +0 -5
- package/dist/shift-components/p-d1b9cd93.entry.js +0 -5
- package/dist/shift-components/p-d5ff7544.js +0 -5
- package/dist/shift-components/p-d6f40c8d.entry.js +0 -5
- package/dist/shift-components/p-e05acce1.entry.js +0 -5
- package/dist/shift-components/p-e97316d2.js +0 -6
- package/dist/shift-components/p-faa8070a.entry.js +0 -5
- package/dist/shift-components/p-feb3df85.entry.js +0 -5
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-ef54644b.js';
|
|
6
|
-
import { c as cn } from './cn-cc419b94.js';
|
|
7
|
-
import { g as getVehicleInformation } from './vehicleInformation-f7290628.js';
|
|
8
|
-
|
|
9
|
-
const expiredSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9ImJsYWNrIiBzdHJva2U9ImJsYWNrIiAvPgogICAgICAgIDxwYXRoIGQ9Ik0xNiAxNkw4IDgiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2U9ImJsYWNrIiAvPgogICAgICAgIDxwYXRoIGQ9Ik0xNiA4TDggMTYiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2U9ImJsYWNrIiAvPgogICAgPC9nPgo8L3N2Zz4=';
|
|
10
|
-
|
|
11
|
-
const pendingSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiNhMWExYTEiIHN0cm9rZT0iI2ExYTFhMSIgLz4KICAgICAgICA8cmVjdCB4PSI5LjUiIHk9IjgiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIGZpbGw9IiNhMWExYTEiIC8+CiAgICAgICAgPHJlY3QgeD0iMTIuNSIgeT0iOCIgd2lkdGg9IjIiIGhlaWdodD0iOCIgZmlsbD0iI2ExYTFhMSIgLz4KICAgIDwvZz4KPC9zdmc+';
|
|
12
|
-
|
|
13
|
-
const cancelledSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiNhODAwMDAiIHN0cm9rZT0iI2E4MDAwMCIgLz4KICAgICAgICA8cGF0aCBkPSJNMTggMThMNiA2IiBzdHJva2Utd2lkdGg9IjEuMiIgc3Ryb2tlPSIjYTgwMDAwIiAvPgogICAgPC9nPgo8L3N2Zz4=';
|
|
14
|
-
|
|
15
|
-
const processedSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiMzMDcxYTkiIHN0cm9rZT0iIzMwNzFhOSIgLz4KICAgICAgICA8cGF0aCBkPSJNOC41IDExTDExLjM5MzkgMTMuODkzOUMxMS40NTI1IDEzLjk1MjUgMTEuNTQ3NSAxMy45NTI1IDExLjYwNjEgMTMuODkzOUwxOS41IDYiIHN0cm9rZT0iIzMwNzFhOSIKICAgICAgICAgICAgc3Ryb2tlLXdpZHRoPSIxLjIiIC8+CiAgICA8L2c+Cjwvc3ZnPg==';
|
|
16
|
-
|
|
17
|
-
const dynamicClaimCss = "*,: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}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.block{display:block}.flex{display:flex}.table{display:table}.hidden{display:none}.flex-shrink{flex-shrink:1}.border-collapse{border-collapse:collapse}.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))}.border{border-width:1px}.outline{outline-style:solid}.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;flex:1 1 0!important;flex-shrink:0!important;width:100%!important}*{box-sizing:content-box;font-family:Arial;margin:revert;padding:revert}.dynamic-claim-wrapper{background:#fdfdfd;border:1px solid #dcdcdc;border-radius:5px;box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 hsla(0,0%,100%,.1);overflow:hidden;padding:0;position:relative}.dynamic-claim-header{background:#f6f6f6;border:1px solid #ededed;padding:15px 0;text-align:center}.dynamic-claim-header-vin{display:inline-block;transition:.4s}.idle .dynamic-claim-header-vin,.loading .dynamic-claim-header-vin{opacity:0;transform:scale(150%);visibility:hidden}.dynamic-claim-body{display:flex;overflow-x:scroll;padding:100px 30px;transition:scrollbar-color .5s ease}.idle .dynamic-claim-body,.loading .dynamic-claim-body{pointer-events:none}.dynamic-claim-wrapper ::-webkit-scrollbar{height:10px;width:10px}.dynamic-claim-wrapper ::-webkit-scrollbar-track{background:#f6f6f6;border-radius:5px;border-top:1px solid #dcdcdc;border-top-left-radius:0;border-top-right-radius:0}.idle .dynamic-claim-body::-webkit-scrollbar-thumb,.loading .dynamic-claim-body::-webkit-scrollbar-thumb{background:transparent}.dynamic-claim-wrapper ::-webkit-scrollbar-thumb{background:#c5c5c5;border-radius:10px}.dynamic-claim-wrapper ::-webkit-scrollbar-thumb:hover{background:#a1a1a1}.dynamic-claim-progress-lane,.loading-lane{align-items:center;background-color:#f2f2f2;border:1px solid #ddd;border-radius:10px;display:flex;flex:1;flex-direction:row;height:10px;justify-content:space-around;position:relative}.idle .dynamic-claim-progress-lane,.loading .dynamic-claim-progress-lane{background-color:transparent;border:1px solid transparent}.loading-lane{position:absolute;visibility:hidden;width:calc(100% - 60px)}.loading .loading-lane{visibility:visible}.dynamic-claim-progress-bar{background-image:linear-gradient(180deg,#428bca,#3071a9);border:1px solid #ddd;border-radius:10px;height:10px;left:0;position:absolute;transition:all;transition-duration:.5s;transition-timing-function:ease-in-out;width:0;z-index:0}.idle .dynamic-claim-progress-bar,.loading .dynamic-claim-progress-bar{opacity:0;width:0!important}.dynamic-claim-item{align-items:center;display:flex;flex-direction:column;font-size:14px;gap:5px;min-width:250px}.popup-position-ref{bottom:0;display:flex;height:0;justify-content:center;position:absolute;width:0}.popup-container{position:fixed;z-index:100}.dynamic-claim-item-popup-info{background-color:#f9f9f9;border:1px solid #ddd;border-radius:5px;color:#282828;opacity:0;padding:20px;transition:.4s;visibility:hidden;width:auto}.dynamic-claim-item-popup-info-triangle.show,.dynamic-claim-item-popup-info.show{opacity:1;visibility:visible}.dynamic-claim-item-popup-info table{border-collapse:collapse;width:100%}.dynamic-claim-item-popup-info table td,.dynamic-claim-item-popup-info table th{border-bottom:1px solid #ddd;padding:10px 50px 10px 10px;text-align:left;white-space:nowrap}.dynamic-claim-item-popup-info table td{font-weight:400}.dynamic-claim-item-popup-info .claim-button{justify-content:center;margin:15px auto auto;width:80%}.dynamic-claim-item-popup-info-triangle{display:flex;justify-content:center;opacity:0;position:relative;transform:translateY(-9px);transition:.4s;visibility:hidden;width:100%;z-index:101}.dynamic-claim-item-popup-info-triangle-up{border-bottom:10px solid #ddd}.dynamic-claim-item-popup-info-triangle-up,.dynamic-claim-item-popup-info-triangle-up2{border-left:10px solid transparent;border-right:10px solid transparent;height:0;position:absolute;width:0}.dynamic-claim-item-popup-info-triangle-up2{border-bottom:10px solid #f9f9f9;margin-top:1px}.dynamic-claim-item-header{align-items:center;cursor:pointer;display:flex;flex-direction:column;height:3em;line-height:1em;padding:10px 0;position:relative;transition:.4s}.dynamic-claim-item-header.load-animation{animation:item-header-fade-in .65s ease forwards}@keyframes item-header-fade-in{0%{opacity:0;transform:translateY(-5px) scale(70%)}to{opacity:1;transform:translateY(0) scale(100%)}}.dynamic-claim-item-header span{font-weight:700}.dynamic-claim-item-header img{transition:.4s}.dynamic-claim-item-header:hover>img{transform:rotate(1turn) scale(125%)}.idle .dynamic-claim-item-header,.loading .dynamic-claim-item-header{opacity:0;transform:translateY(-5px) scale(70%)}.dynamic-claim-item-footer{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;height:4.5em;line-height:1.5em;margin:0;overflow:hidden;padding:0 20px;text-align:center;text-overflow:ellipsis;transition:.4s}.dynamic-claim-item-footer.load-animation{animation:item-footer-fade-in .65s ease forwards}@keyframes item-footer-fade-in{0%{opacity:0;transform:translateY(5px) scale(70%);visibility:hidden}to{opacity:1;transform:translateY(0) scale(100%);visibility:visible}}.idle .dynamic-claim-item-footer,.loading .dynamic-claim-item-footer{opacity:0;transform:translateY(5px) scale(70%);visibility:hidden}.dynamic-claim-item-circle{background-color:#a1a1a1;border:5px double #ececec;border-radius:50%;height:18px;transition:.4s;width:18px;z-index:1}.dynamic-claim-item-circle.load-animation{animation:item-circle-fade-in .65s ease forwards}@keyframes item-circle-fade-in{0%{opacity:0;transform:scale(150%);visibility:hidden}to{opacity:1;transform:scale(100%);visibility:visible}}.idle .dynamic-claim-item-circle,.loading .dynamic-claim-item-circle{opacity:0;transform:scale(150%);visibility:hidden}.dynamic-claim-item.processed .dynamic-claim-item-circle{background-color:#3071a9}.dynamic-claim-item.processed .dynamic-claim-item-header{color:#3071a9}.dynamic-claim-item.expired .dynamic-claim-item-circle{background-color:#282828}.dynamic-claim-item.expired .dynamic-claim-item-headaer{color:#282828}.dynamic-claim-item.cancelled .dynamic-claim-item-circle{background-color:#a80000}.dynamic-claim-item.cancelled .dynamic-claim-item-header{color:#a80000}.dynamic-claim-item.pending .dynamic-claim-item-circle{background-color:#00a300}.dynamic-claim-item.pending .dynamic-claim-item-header{color:#00a300}.dynamic-claim-loading-slider{border-radius:4px;height:10px;left:0;overflow-x:hidden;position:relative;position:absolute;top:0;width:100%}.dynamic-claim-loading-slider-line{background:#ddd;height:10px;opacity:0;position:absolute;width:150%}.dynamic-claim-loading-slider-subline{background-image:linear-gradient(180deg,#428bca,#3071a9);height:10px;position:absolute}.dynamic-claim-wrapper.loading .dynamic-claim-inc{animation:dynamic-claim-increase 2.5s ease infinite}.dynamic-claim-wrapper.loading .dynamic-claim-dec{animation:dynamic-claim-decrease 2.5s ease 1s infinite}@keyframes dynamic-claim-increase{0%{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes dynamic-claim-decrease{0%{left:-80%;width:80%}to{left:110%;width:10%}}.dynamic-claim-button{align-items:center;border:none;border-radius:5px;color:#fff;cursor:pointer;display:flex;font-weight:700;gap:3px;outline:none;padding:0 10px 0 0;transition:.3s}.dynamic-claim-button svg{transition:.2s}.claim-button{stroke:#27ae60;fill:#27ae60;background-color:transparent;border:1px solid #27ae60;color:#27ae60}.claim-button circle{fill:#2ecc71}.claim-button:hover{stroke:#fff;fill:#fff;background-color:#2ecc71;color:#fff}.claim-button:hover circle{fill:#fff}.claim-button:active{background-color:#27ae60}.claim-button:active svg{transform:scale(125%)}.cancel-button{stroke:#c0392b;fill:#c0392b;background-color:transparent;border:1px solid #c0392b;color:#c0392b}.cancel-button circle{fill:#c0392b;transition:.1s}.cancel-button:hover{stroke:#fff;fill:#fff;background-color:#e74c3c;color:#fff}.cancel-button:hover circle{fill:#fff}.static{position:static}.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)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.m-\\[3px\\]{margin:3px}.my-4{margin-bottom:1rem;margin-top:1rem}.ml-1{margin-left:.25rem}.border-separate{border-collapse:separate}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:.25rem}.pl-10{padding-left:2.5rem}";
|
|
18
|
-
const DynamicClaimStyle0 = dynamicClaimCss;
|
|
19
|
-
|
|
20
|
-
let mockData = {};
|
|
21
|
-
const icons = {
|
|
22
|
-
expired: expiredSvg,
|
|
23
|
-
pending: pendingSvg,
|
|
24
|
-
processed: processedSvg,
|
|
25
|
-
cancelled: cancelledSvg,
|
|
26
|
-
};
|
|
27
|
-
const DynamicClaim = class {
|
|
28
|
-
constructor(hostRef) {
|
|
29
|
-
registerInstance(this, hostRef);
|
|
30
|
-
this.pendingItemHighlighted = false;
|
|
31
|
-
this.onMouseLeave = () => {
|
|
32
|
-
clearTimeout(this.timeoutRef);
|
|
33
|
-
this.popupClasses = '';
|
|
34
|
-
this.timeoutRef = setTimeout(() => {
|
|
35
|
-
this.activePopupIndex = null;
|
|
36
|
-
}, 400);
|
|
37
|
-
};
|
|
38
|
-
this.onMouseEnter = (dynamicClaimItemHeader, idx) => {
|
|
39
|
-
clearTimeout(this.timeoutRef);
|
|
40
|
-
this.activePopupIndex = idx;
|
|
41
|
-
this.timeoutRef = setTimeout(() => {
|
|
42
|
-
const positionRef = dynamicClaimItemHeader.querySelector('.popup-position-ref');
|
|
43
|
-
this.popupPositionRef = positionRef;
|
|
44
|
-
this.calculatePopupPos(this.el.shadowRoot);
|
|
45
|
-
this.popupClasses = 'show';
|
|
46
|
-
}, 50);
|
|
47
|
-
};
|
|
48
|
-
this.baseUrl = undefined;
|
|
49
|
-
this.isDev = false;
|
|
50
|
-
this.queryString = '';
|
|
51
|
-
this.isIdle = true;
|
|
52
|
-
this.popupClasses = '';
|
|
53
|
-
this.externalVin = null;
|
|
54
|
-
this.activePopupIndex = null;
|
|
55
|
-
this.vehicleInformation = undefined;
|
|
56
|
-
this.errorMessage = null;
|
|
57
|
-
this.isLoading = false;
|
|
58
|
-
this.loadingStateChange = undefined;
|
|
59
|
-
this.loadedResponse = undefined;
|
|
60
|
-
}
|
|
61
|
-
async componentDidLoad() {
|
|
62
|
-
this.dynamicClaimBody = this.el.shadowRoot.querySelector('.dynamic-claim-body');
|
|
63
|
-
this.dynamicRedeem = this.el.shadowRoot.getElementById('dynamic-redeem');
|
|
64
|
-
this.dynamicClaimProgressBar = this.el.shadowRoot.querySelector('.dynamic-claim-progress-bar');
|
|
65
|
-
}
|
|
66
|
-
async setMockData(newMockData) {
|
|
67
|
-
mockData = newMockData;
|
|
68
|
-
}
|
|
69
|
-
async setData(newData, headers = {}) {
|
|
70
|
-
clearTimeout(this.networkTimeoutRef);
|
|
71
|
-
if (this.abortController)
|
|
72
|
-
this.abortController.abort();
|
|
73
|
-
this.abortController = new AbortController();
|
|
74
|
-
let scopedTimeoutRef;
|
|
75
|
-
const isVinRequest = typeof newData === 'string';
|
|
76
|
-
const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
|
|
77
|
-
this.externalVin = vin;
|
|
78
|
-
try {
|
|
79
|
-
if (!vin || vin.trim().length === 0) {
|
|
80
|
-
this.isIdle = true;
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
this.isLoading = true;
|
|
84
|
-
this.isIdle = false;
|
|
85
|
-
await new Promise(r => {
|
|
86
|
-
scopedTimeoutRef = setTimeout(r, 1000);
|
|
87
|
-
this.networkTimeoutRef = scopedTimeoutRef;
|
|
88
|
-
});
|
|
89
|
-
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
90
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
91
|
-
if (!vehicleResponse)
|
|
92
|
-
throw new Error('Wrong response format');
|
|
93
|
-
if (!Array.isArray(vehicleResponse.serviceItems))
|
|
94
|
-
throw new Error('No Service Available');
|
|
95
|
-
this.vehicleInformation = vehicleResponse;
|
|
96
|
-
}
|
|
97
|
-
this.errorMessage = null;
|
|
98
|
-
this.isLoading = false;
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
102
|
-
return;
|
|
103
|
-
this.isLoading = false;
|
|
104
|
-
this.vehicleInformation = null;
|
|
105
|
-
this.errorMessage = error.message;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
109
|
-
await this.setData(requestedVin, headers);
|
|
110
|
-
}
|
|
111
|
-
onLoadingChange(newValue) {
|
|
112
|
-
if (this.loadingStateChange)
|
|
113
|
-
this.loadingStateChange(newValue);
|
|
114
|
-
this.setLoadingUi(newValue);
|
|
115
|
-
}
|
|
116
|
-
async setLoadingUi(isLoading) {
|
|
117
|
-
if (!isLoading) {
|
|
118
|
-
this.dynamicClaimProgressBar.style.width = '0';
|
|
119
|
-
await new Promise(r => setTimeout(r, 200));
|
|
120
|
-
this.updateProgressBar();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
updateProgressBar() {
|
|
124
|
-
var _a;
|
|
125
|
-
const serviceItems = ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceItems) || [];
|
|
126
|
-
if (serviceItems.filter(x => x.status === 'pending').length === 0) {
|
|
127
|
-
if (serviceItems.length === 0)
|
|
128
|
-
this.dynamicClaimProgressBar.style.width = '0%';
|
|
129
|
-
else
|
|
130
|
-
this.dynamicClaimProgressBar.style.width = '100%';
|
|
131
|
-
this.dynamicClaimBody.scrollTo({
|
|
132
|
-
left: this.dynamicClaimBody.scrollWidth,
|
|
133
|
-
behavior: 'smooth',
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
const firstPendingItem = serviceItems.find(x => x.status === 'pending');
|
|
138
|
-
const firstPendingItemIndex = serviceItems.indexOf(firstPendingItem) + 1;
|
|
139
|
-
const firstPendingItemRef = this.dynamicClaimBody.getElementsByClassName('dynamic-claim-item')[firstPendingItemIndex - 1];
|
|
140
|
-
this.dynamicClaimProgressBar.style.width = (firstPendingItemIndex / serviceItems.length - 1 / (serviceItems.length * 2)) * 100 + '%';
|
|
141
|
-
this.dynamicClaimBody.scrollTo({
|
|
142
|
-
left: firstPendingItemRef.offsetLeft - firstPendingItemRef.clientWidth * 3,
|
|
143
|
-
behavior: 'smooth',
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
resetProgressBar() {
|
|
148
|
-
setTimeout(() => {
|
|
149
|
-
this.updateProgressBar();
|
|
150
|
-
}, 100);
|
|
151
|
-
}
|
|
152
|
-
windowScrollListener(newValue) {
|
|
153
|
-
if (newValue) {
|
|
154
|
-
this.scrollListenerRef = () => this.calculatePopupPos(this.el.shadowRoot);
|
|
155
|
-
window.addEventListener('scroll', this.scrollListenerRef);
|
|
156
|
-
this.dynamicClaimBody.addEventListener('scroll', this.scrollListenerRef);
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
window.removeEventListener('scroll', this.scrollListenerRef);
|
|
160
|
-
this.dynamicClaimBody.removeEventListener('scroll', this.scrollListenerRef);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
calculatePopupPos(root) {
|
|
164
|
-
const popupPositionRef = root.querySelector('.popup-position-ref');
|
|
165
|
-
let { x, y } = popupPositionRef.getBoundingClientRect();
|
|
166
|
-
const popupContainer = popupPositionRef.querySelector('.popup-container');
|
|
167
|
-
const { width } = popupContainer.getBoundingClientRect();
|
|
168
|
-
const popupInfo = popupContainer.querySelector('.dynamic-claim-item-popup-info');
|
|
169
|
-
const windowWidth = window.innerWidth; // Get the viewport's width
|
|
170
|
-
popupContainer.style.top = `${y}px`;
|
|
171
|
-
popupContainer.style.left = `${x - width / 2}px`;
|
|
172
|
-
const offsetFromLeft = x - width / 2; // Distance from left side of the viewport
|
|
173
|
-
const offsetFromRight = windowWidth - (x + width / 2); // Distance from right side of the viewport
|
|
174
|
-
let movingNeeded = 0;
|
|
175
|
-
let horizontalMargin = 16;
|
|
176
|
-
if (offsetFromRight < horizontalMargin)
|
|
177
|
-
movingNeeded = offsetFromRight - horizontalMargin;
|
|
178
|
-
else if (offsetFromLeft < horizontalMargin)
|
|
179
|
-
movingNeeded = Math.abs(offsetFromLeft - horizontalMargin);
|
|
180
|
-
popupInfo.style.transform = `translateX(${movingNeeded}px)`;
|
|
181
|
-
}
|
|
182
|
-
removeLoadAnimationClass(event) {
|
|
183
|
-
const component = event.target;
|
|
184
|
-
component.classList.remove('load-animation');
|
|
185
|
-
}
|
|
186
|
-
async completeClaim() {
|
|
187
|
-
var _a;
|
|
188
|
-
const serviceItems = ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceItems) || [];
|
|
189
|
-
const item = this.cachedClaimItem;
|
|
190
|
-
const serviceDataClone = JSON.parse(JSON.stringify(serviceItems));
|
|
191
|
-
const index = serviceItems.indexOf(item);
|
|
192
|
-
const pendingItemsBefore = serviceDataClone.slice(0, index).filter(x => x.status === 'pending');
|
|
193
|
-
serviceDataClone[index].status = 'processed';
|
|
194
|
-
pendingItemsBefore.forEach(function (otherItem) {
|
|
195
|
-
otherItem.status = 'cancelled';
|
|
196
|
-
});
|
|
197
|
-
this.pendingItemHighlighted = false;
|
|
198
|
-
const vehicleDataClone = JSON.parse(JSON.stringify(this.vehicleInformation));
|
|
199
|
-
vehicleDataClone.serviceItems = serviceDataClone;
|
|
200
|
-
this.vehicleInformation = JSON.parse(JSON.stringify(vehicleDataClone));
|
|
201
|
-
}
|
|
202
|
-
claim(item) {
|
|
203
|
-
var _a;
|
|
204
|
-
const serviceItems = ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceItems) || [];
|
|
205
|
-
const vinDataClone = JSON.parse(JSON.stringify(serviceItems));
|
|
206
|
-
const index = serviceItems.indexOf(item);
|
|
207
|
-
//Find other items before this item that have status 'pending'
|
|
208
|
-
let pendingItemsBefore = vinDataClone.slice(0, index).filter(x => x.status === 'pending');
|
|
209
|
-
this.cachedClaimItem = item;
|
|
210
|
-
if (item.maximumMileage === null) {
|
|
211
|
-
pendingItemsBefore = [];
|
|
212
|
-
}
|
|
213
|
-
this.onMouseLeave();
|
|
214
|
-
this.openRedeem(item, pendingItemsBefore);
|
|
215
|
-
}
|
|
216
|
-
async handleRedeemScanner() {
|
|
217
|
-
if (this.isDev) {
|
|
218
|
-
this.dynamicRedeem.handleScanner = async (_) => {
|
|
219
|
-
await new Promise(r => setTimeout(r, 500));
|
|
220
|
-
this.dynamicRedeem.quite();
|
|
221
|
-
this.completeClaim();
|
|
222
|
-
this.dynamicRedeem.handleScanner = null;
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
this.dynamicRedeem.handleScanner = async (code) => {
|
|
227
|
-
try {
|
|
228
|
-
const vehicleInformation = this.vehicleInformation;
|
|
229
|
-
const payload = {
|
|
230
|
-
vin: vehicleInformation.vin,
|
|
231
|
-
brandIntegrationID: vehicleInformation.identifiers.brandIntegrationID,
|
|
232
|
-
invoice: code,
|
|
233
|
-
saleInformation: vehicleInformation.saleInformation,
|
|
234
|
-
serviceItem: this.dynamicRedeem.item,
|
|
235
|
-
cancelledServiceItems: this.dynamicRedeem.canceledItems,
|
|
236
|
-
};
|
|
237
|
-
const response = await fetch('/api/vehicle/swift-claim', {
|
|
238
|
-
method: 'POST',
|
|
239
|
-
headers: {
|
|
240
|
-
'Content-Type': 'application/json',
|
|
241
|
-
},
|
|
242
|
-
body: JSON.stringify(payload),
|
|
243
|
-
});
|
|
244
|
-
const data = await response.json();
|
|
245
|
-
if (!data.Success) {
|
|
246
|
-
alert(data.Message);
|
|
247
|
-
this.dynamicRedeem.quite();
|
|
248
|
-
this.dynamicRedeem.handleScanner = null;
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
this.dynamicRedeem.quite();
|
|
252
|
-
this.completeClaim();
|
|
253
|
-
this.dynamicRedeem.handleScanner = null;
|
|
254
|
-
}
|
|
255
|
-
catch (error) {
|
|
256
|
-
console.error(error);
|
|
257
|
-
alert('Request failed please try again later');
|
|
258
|
-
this.dynamicRedeem.quite();
|
|
259
|
-
this.dynamicRedeem.handleScanner = null;
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
openRedeem(item, oldItems) {
|
|
265
|
-
var _a, _b, _c, _d, _e;
|
|
266
|
-
const vehicleInformation = this.vehicleInformation;
|
|
267
|
-
this.dynamicRedeem.vin = vehicleInformation === null || vehicleInformation === void 0 ? void 0 : vehicleInformation.vin;
|
|
268
|
-
this.dynamicRedeem.item = item;
|
|
269
|
-
this.dynamicRedeem.canceledItems = oldItems;
|
|
270
|
-
if (((_a = vehicleInformation === null || vehicleInformation === void 0 ? void 0 : vehicleInformation.saleInformation) === null || _a === void 0 ? void 0 : _a.broker) !== null && ((_c = (_b = vehicleInformation === null || vehicleInformation === void 0 ? void 0 : vehicleInformation.saleInformation) === null || _b === void 0 ? void 0 : _b.broker) === null || _c === void 0 ? void 0 : _c.invoiceDate) === null)
|
|
271
|
-
this.dynamicRedeem.unInvoicedByBrokerName = (_e = (_d = vehicleInformation === null || vehicleInformation === void 0 ? void 0 : vehicleInformation.saleInformation) === null || _d === void 0 ? void 0 : _d.broker) === null || _e === void 0 ? void 0 : _e.brokerName;
|
|
272
|
-
else
|
|
273
|
-
this.dynamicRedeem.unInvoicedByBrokerName = null;
|
|
274
|
-
this.handleRedeemScanner();
|
|
275
|
-
}
|
|
276
|
-
createPopup(item) {
|
|
277
|
-
return (h("div", { class: "popup-position-ref" }, h("div", { class: "popup-container" }, h("div", { class: cn('dynamic-claim-item-popup-info-triangle', this.popupClasses) }, h("div", { class: "dynamic-claim-item-popup-info-triangle-up" }), h("div", { class: "dynamic-claim-item-popup-info-triangle-up2" })), h("div", { class: cn('dynamic-claim-item-popup-info', this.popupClasses) }, h("table", null, h("tbody", null, h("tr", null, h("th", null, "Service Type:"), h("td", null, item.type.charAt(0).toUpperCase() + item.type.slice(1))), h("tr", null, h("th", null, "Activation Date"), h("td", null, item.activatedAt)), h("tr", null, h("th", null, "Expiry Date"), h("td", null, item.expiresAt)), h("tr", null, h("th", null, "Claimed At"), h("td", null, item.redeemDate)), h("tr", null, h("th", null, "Redeeming Dealer"), h("td", null, item.dealerName)), h("tr", null, h("th", null, "Invoice Number"), h("td", null, item.invoiceNumber)), h("tr", null, h("th", null, "WIP"), h("td", null, item.wip)), h("tr", null, h("th", null, "Menu Code"), h("td", null, item.menuCode)))), item.status === 'pending' && (h("button", { onClick: () => this.claim(item), class: "dynamic-claim-button claim-button" }, h("svg", { width: "30px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { "stroke-width": "0" }), h("g", { "stroke-linecap": "round", "stroke-linejoin": "round" }), h("g", null, h("circle", { cx: "12", cy: "12", r: "8", "fill-opacity": "0.24" }), h("path", { d: "M8.5 11L11.3939 13.8939C11.4525 13.9525 11.5475 13.9525 11.6061 13.8939L19.5 6", "stroke-width": "1.2" }))), h("span", null, "Claim")))))));
|
|
278
|
-
}
|
|
279
|
-
render() {
|
|
280
|
-
var _a, _b;
|
|
281
|
-
const serviceItems = ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceItems) || [];
|
|
282
|
-
return (h(Host, { key: '15b709f7252b85f308c880576dd4f8ff6a7dc666' }, h("dynamic-redeem", { key: '71a57f4626d0f394c2293db5bfccaf477c5c3f1e', id: "dynamic-redeem" }), h("div", { key: '3e247cedd1e720c89a30af72f8c9758f7a5642fb', class: cn('dynamic-claim-wrapper', { loading: this.isLoading, idle: this.isIdle }) }, h("div", { key: 'd6aea716001e09c9ff3180889afc5daca008b130', class: "dynamic-claim-header" }, h("strong", { key: 'f9469ece92c4e189eed94a119d233787d78aa8b1', onAnimationEnd: this.removeLoadAnimationClass, class: "dynamic-claim-header-vin load-animation" }, this.errorMessage && h("span", { key: 'b132706208c827613e967186ba98a1314d9aaf08', style: { color: 'red' } }, this.errorMessage), !this.errorMessage && ((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vin))), h("div", { key: '849960f27d5188e3ab088c5de8d0bebc25723829', class: "dynamic-claim-body" }, h("div", { key: 'bdbd37aa75a00973008634299d1768dcbe95843f', class: "loading-lane" }, h("div", { key: '6a17f141b034edbcd38b86979431c3ff26614d00', class: "dynamic-claim-loading-slider" }, h("div", { key: '34597a589f5dab07e60959ba09d39876901f2ee1', class: "dynamic-claim-loading-slider-line" }), h("div", { key: '4a2483d4997fff60631cd01302d272665e2d2736', class: "dynamic-claim-loading-slider-subline dynamic-claim-inc" }), h("div", { key: 'c05466961bfcfd2580f670c57178492f31729f52', class: "dynamic-claim-loading-slider-subline dynamic-claim-dec" }))), h("div", { key: 'ac968ede27ec14df080f8c17758e071cfa272d2d', class: "dynamic-claim-progress-lane" }, serviceItems.map((item, idx) => {
|
|
283
|
-
let statusClass = '';
|
|
284
|
-
if (item.status === 'pending') {
|
|
285
|
-
if (serviceItems.findIndex(i => i.status === 'pending') === idx)
|
|
286
|
-
statusClass = item.status;
|
|
287
|
-
}
|
|
288
|
-
else
|
|
289
|
-
statusClass = item.status;
|
|
290
|
-
return (h("div", { key: item.name, class: cn('dynamic-claim-item', statusClass), onMouseLeave: this.onMouseLeave }, h("div", { onAnimationEnd: this.removeLoadAnimationClass, class: "dynamic-claim-item-header load-animation", onMouseEnter: event => this.onMouseEnter(event.target, idx) }, h("img", { src: icons[item.status], alt: "status icon" }), h("span", null, item.status.charAt(0).toUpperCase() + item.status.slice(1)), this.activePopupIndex === idx && this.createPopup(item)), h("div", { onAnimationEnd: this.removeLoadAnimationClass, class: "dynamic-claim-item-circle load-animation" }), h("p", { onAnimationEnd: this.removeLoadAnimationClass, class: "dynamic-claim-item-footer load-animation" }, item.name)));
|
|
291
|
-
}), h("div", { key: '720ee8e73001f6c4304f9e0af8212e37fc69e74a', class: "dynamic-claim-progress-bar" }))))));
|
|
292
|
-
}
|
|
293
|
-
get el() { return getElement(this); }
|
|
294
|
-
static get watchers() { return {
|
|
295
|
-
"isLoading": ["onLoadingChange"],
|
|
296
|
-
"vehicleInformation": ["resetProgressBar"],
|
|
297
|
-
"popupClasses": ["windowScrollListener"]
|
|
298
|
-
}; }
|
|
299
|
-
};
|
|
300
|
-
DynamicClaim.style = DynamicClaimStyle0;
|
|
301
|
-
|
|
302
|
-
export { DynamicClaim as dynamic_claim };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
const eyeSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIgogICAgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWV5ZSI+CiAgICA8cGF0aCBkPSJNMi4wNjIgMTIuMzQ4YTEgMSAwIDAgMSAwLS42OTYgMTAuNzUgMTAuNzUgMCAwIDEgMTkuODc2IDAgMSAxIDAgMCAxIDAgLjY5NiAxMC43NSAxMC43NSAwIDAgMS0xOS44NzYgMCIgLz4KICAgIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMiIC8+Cjwvc3ZnPg==';
|
|
6
|
-
|
|
7
|
-
function openImageViewer(context, target, imageSrc) {
|
|
8
|
-
if (context.expandedImage === imageSrc)
|
|
9
|
-
return;
|
|
10
|
-
context.originalImage = target;
|
|
11
|
-
const expandedImageRef = context.el.shadowRoot.getElementById('expanded-image');
|
|
12
|
-
expandedImageRef.src = target.src;
|
|
13
|
-
document.addEventListener('keydown', context.closeImageListener);
|
|
14
|
-
const rect = target.getBoundingClientRect();
|
|
15
|
-
document.body.style.overflow = 'hidden';
|
|
16
|
-
Object.assign(expandedImageRef.style, {
|
|
17
|
-
top: `${rect.top}px`,
|
|
18
|
-
pointerEvents: 'auto',
|
|
19
|
-
left: `${rect.left}px`,
|
|
20
|
-
transitionDuration: '0s',
|
|
21
|
-
width: `${rect.width}px`,
|
|
22
|
-
height: `${rect.height}px`,
|
|
23
|
-
});
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
const naturalWidth = target.naturalWidth;
|
|
26
|
-
const naturalHeight = target.naturalHeight;
|
|
27
|
-
const maxWidth = window.innerWidth - 160;
|
|
28
|
-
const maxHeight = window.innerHeight - 32;
|
|
29
|
-
const aspectRatio = naturalWidth / naturalHeight;
|
|
30
|
-
let width, height;
|
|
31
|
-
if (maxWidth / aspectRatio <= maxHeight) {
|
|
32
|
-
width = maxWidth;
|
|
33
|
-
height = maxWidth / aspectRatio;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
height = maxHeight;
|
|
37
|
-
width = maxHeight * aspectRatio;
|
|
38
|
-
}
|
|
39
|
-
expandedImageRef.style.transitionDuration = '0.3s';
|
|
40
|
-
Object.assign(expandedImageRef.style, {
|
|
41
|
-
opacity: '1',
|
|
42
|
-
width: `${width}px`,
|
|
43
|
-
height: `${height}px`,
|
|
44
|
-
top: `${(window.innerHeight - height) / 2}px`,
|
|
45
|
-
left: `${(window.innerWidth - width) / 2}px`,
|
|
46
|
-
});
|
|
47
|
-
context.expandedImage = imageSrc;
|
|
48
|
-
}, 200);
|
|
49
|
-
}
|
|
50
|
-
function closeImageViewer(context, event) {
|
|
51
|
-
if (event && event.key !== 'Escape')
|
|
52
|
-
return;
|
|
53
|
-
document.removeEventListener('keydown', context.closeImageListener);
|
|
54
|
-
const expandedImageRef = context.el.shadowRoot.getElementById('expanded-image');
|
|
55
|
-
const rect = context.originalImage.getBoundingClientRect();
|
|
56
|
-
Object.assign(expandedImageRef.style, {
|
|
57
|
-
top: `${rect.top}px`,
|
|
58
|
-
pointerEvents: 'none',
|
|
59
|
-
left: `${rect.left}px`,
|
|
60
|
-
width: `${rect.width}px`,
|
|
61
|
-
height: `${rect.height}px`,
|
|
62
|
-
transitionDuration: '0.3s',
|
|
63
|
-
});
|
|
64
|
-
setTimeout(() => {
|
|
65
|
-
expandedImageRef.src = '';
|
|
66
|
-
expandedImageRef.style.opacity = '0';
|
|
67
|
-
expandedImageRef.style.transitionDuration = '0s';
|
|
68
|
-
}, 300);
|
|
69
|
-
document.body.style.overflow = '';
|
|
70
|
-
context.expandedImage = null;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export { closeImageViewer as c, eyeSvg as e, openImageViewer as o };
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-ef54644b.js';
|
|
6
|
-
import { L as Loading } from './Loading-61648252.js';
|
|
7
|
-
import { g as getVehicleInformation } from './vehicleInformation-f7290628.js';
|
|
8
|
-
import { o as openImageViewer, c as closeImageViewer, e as eyeSvg } from './image-expansion-08c4bf0d.js';
|
|
9
|
-
import { c as cn } from './cn-cc419b94.js';
|
|
10
|
-
import './loader-027b88af.js';
|
|
11
|
-
|
|
12
|
-
const paintThicknessCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.top-0{top:0}.z-10{z-index:10}.z-40{z-index:40}.float-right{float:right}.mx-auto{margin-left:auto;margin-right:auto}.mr-\\[16px\\]{margin-right:16px}.mt-\\[12px\\]{margin-top:12px}.mt-\\[16px\\]{margin-top:16px}.flex{display:flex}.table{display:table}.size-12{height:3rem;width:3rem}.size-full{height:100%;width:100%}.h-0{height:0}.h-1{height:.25rem}.h-\\[100dvh\\]{height:100dvh}.h-\\[150px\\]{height:150px}.h-\\[40px\\]{height:40px}.h-\\[50px\\]{height:50px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-12{width:3rem}.w-\\[100dvw\\]{width:100dvw}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.min-w-\\[100px\\]{min-width:100px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-rotate-45{--tw-rotate:-45deg}.-rotate-45,.rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate:45deg}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[16px\\]{gap:16px}.gap-\\[4px\\]{gap:4px}.gap-\\[8px\\]{gap:8px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.\\!border-none{border-style:none!important}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-black\\/40{background-color:rgba(0,0,0,.4)}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-\\[12px\\]{padding:12px}.p-\\[6px\\]{padding:6px}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[24px\\]{padding-left:24px;padding-right:24px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[15px\\]{padding-bottom:15px;padding-top:15px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.pt-\\[4px\\]{padding-top:4px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.font-semibold{font-weight:600}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.delay-200{transition-delay:.2s}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\\:opacity-100:hover{opacity:1}.\\[\\&_div\\]\\:hover\\:\\!opacity-100:hover div{opacity:1!important}.\\[\\&_img\\]\\:hover\\:shadow-lg:hover img{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}";
|
|
13
|
-
const PaintThicknessStyle0 = paintThicknessCss;
|
|
14
|
-
|
|
15
|
-
let mockData = {};
|
|
16
|
-
const PaintThickness = class {
|
|
17
|
-
constructor(hostRef) {
|
|
18
|
-
registerInstance(this, hostRef);
|
|
19
|
-
this.closeImageListener = (event) => {
|
|
20
|
-
this.closeImage(event);
|
|
21
|
-
};
|
|
22
|
-
this.openImage = (target, imageSrc) => {
|
|
23
|
-
openImageViewer(this, target, imageSrc);
|
|
24
|
-
};
|
|
25
|
-
this.closeImage = (event) => {
|
|
26
|
-
closeImageViewer(this, event);
|
|
27
|
-
};
|
|
28
|
-
this.baseUrl = '';
|
|
29
|
-
this.isDev = false;
|
|
30
|
-
this.queryString = '';
|
|
31
|
-
this.loadingStateChange = undefined;
|
|
32
|
-
this.loadedResponse = undefined;
|
|
33
|
-
this.state = 'idle';
|
|
34
|
-
this.externalVin = null;
|
|
35
|
-
this.errorMessage = null;
|
|
36
|
-
this.expandedImage = null;
|
|
37
|
-
this.vehicleInformation = undefined;
|
|
38
|
-
}
|
|
39
|
-
handleSettingData(response) {
|
|
40
|
-
if (!response.paintThickness)
|
|
41
|
-
response.paintThickness = { imageGroups: [], parts: [] };
|
|
42
|
-
if (!response.paintThickness.parts || !Array.isArray(response.paintThickness.parts))
|
|
43
|
-
response.paintThickness.parts = [];
|
|
44
|
-
if (!response.paintThickness.imageGroups || !Array.isArray(response.paintThickness.imageGroups))
|
|
45
|
-
response.paintThickness.imageGroups = [];
|
|
46
|
-
this.vehicleInformation = response;
|
|
47
|
-
}
|
|
48
|
-
async setData(newData, headers = {}) {
|
|
49
|
-
clearTimeout(this.networkTimeoutRef);
|
|
50
|
-
if (this.abortController)
|
|
51
|
-
this.abortController.abort();
|
|
52
|
-
this.abortController = new AbortController();
|
|
53
|
-
let scopedTimeoutRef;
|
|
54
|
-
const isVinRequest = typeof newData === 'string';
|
|
55
|
-
const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
|
|
56
|
-
this.externalVin = vin;
|
|
57
|
-
try {
|
|
58
|
-
if (!vin || vin.trim().length === 0) {
|
|
59
|
-
this.state = 'idle';
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (this.state === 'data' || this.state === 'error') {
|
|
63
|
-
this.state = (this.state + '-loading');
|
|
64
|
-
}
|
|
65
|
-
else
|
|
66
|
-
this.state = 'loading';
|
|
67
|
-
await new Promise(r => {
|
|
68
|
-
scopedTimeoutRef = setTimeout(r, 700);
|
|
69
|
-
this.networkTimeoutRef = scopedTimeoutRef;
|
|
70
|
-
});
|
|
71
|
-
const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
|
|
72
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
73
|
-
if (!vehicleResponse)
|
|
74
|
-
throw new Error('Wrong response format');
|
|
75
|
-
this.handleSettingData(vehicleResponse);
|
|
76
|
-
}
|
|
77
|
-
this.errorMessage = null;
|
|
78
|
-
this.state = 'data';
|
|
79
|
-
}
|
|
80
|
-
catch (error) {
|
|
81
|
-
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
82
|
-
return;
|
|
83
|
-
this.state = 'error';
|
|
84
|
-
this.vehicleInformation = null;
|
|
85
|
-
this.errorMessage = error.message;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
async fetchData(requestedVin = this.externalVin, headers = {}) {
|
|
89
|
-
await this.setData(requestedVin, headers);
|
|
90
|
-
}
|
|
91
|
-
async loadingListener() {
|
|
92
|
-
if (this.loadingStateChange)
|
|
93
|
-
this.loadingStateChange(this.state.includes('loading'));
|
|
94
|
-
}
|
|
95
|
-
async setMockData(newMockData) {
|
|
96
|
-
mockData = newMockData;
|
|
97
|
-
}
|
|
98
|
-
render() {
|
|
99
|
-
var _a, _b;
|
|
100
|
-
const { imageGroups, parts } = (this === null || this === void 0 ? void 0 : this.vehicleInformation) ? (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.paintThickness : { imageGroups: [], parts: [] };
|
|
101
|
-
return (h(Host, { key: 'dd25115d7451c326da5411d30b8cebeac06ea3b4' }, h("div", { key: 'ebec5094a98846ffbe00abcbdc5bb5b987262548', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '67d4926b51399a2f990251d95a58558d07c64865' }, h(Loading, { key: 'd56bac7fe821253d2d9aea3a31e19a55002dc1ce', isLoading: this.state.includes('loading') }), h("div", { key: '27b2f517a1f974182c5704d9682213662f3dd2d3', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'f9bdf1767f4e8d6f24f018a60649f54b75151de2', 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: 'd2b739c8f39501a2335a312b6c9d0a0431104300', class: "py-[16px]" }, h("div", { key: '06e78434d8122f36a26faa5fed05a64d759c18c3', 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: 'f17f4c019ed1357fb40f6f32c125918ab24069ce', class: "flex mt-[12px] w-full max-h-[70dvh] overflow-hidden mx-auto rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'b79eed13d13b7b91aff4aeb4b2280eb349592896', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Paint Thickeness"), h("div", { key: 'aab4ba79f226602f913652e27341df333f5be00d', class: "h-0 overflow-auto flex-1" }, !parts.length && h("div", { key: 'edf880bf05cc8c31000960c1ee9471d166444541', class: "h-[50px] px-[30px] flex items-center justify-center text-[18px]" }, "No parts are available."), !!parts.length && (h("table", { key: 'ddac23c3ba00bb44e58f2b5dfaa11034d4f13594', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'c39718f9cd059c765c51b90ba2f2f4e570b9778b', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: 'ba28cd9cadfc036162a735d7353a089a581a8559' }, ['Part', 'Left', 'Right'].map(title => (h("th", { key: title, class: "px-[15px] min-w-[100px] py-[15px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: '6049aecd19316b1d7e1c79606d7cf304b0b260ec' }, parts.map((part, idx) => (h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: part.part }, ['part', 'left', 'right'].map(key => (h("td", { key: part.part + key, class: cn('px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
102
|
-
'!border-none': idx === parts.length - 1,
|
|
103
|
-
}) }, part[key] || '...')))))))))))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '73bfbe41ad8f91591c23b0dccd7be84b4505ede8' }, !imageGroups.length && h("div", { key: '33c2491e22faf7a5f11b6ec2ee62a1b758123b8e', class: "h-[40px] px-[30px] flex text-red-500 items-center justify-center text-[18px]" }, "No image groups are available."), !!imageGroups.length && (h("div", { key: '02103207298b679bdbe8d336c70d2cb8936087a4', class: "py-[16px] gap-[16px] justify-center flex flex-wrap px-[24px] w-full" }, imageGroups.map(imageGroup => (h("div", { class: "shrink-0 rounded-lg shadow-sm border overflow-hidden flex flex-col", key: imageGroup.name }, h("h1", { class: "text-center border-b bg-slate-200 font-semibold p-[6px]" }, imageGroup.name), h("div", { class: "flex p-[12px] gap-[8px]" }, imageGroup.images.map(image => (h("div", { class: "flex gap-[8px]", key: image }, h("button", { onClick: ({ target }) => this.openImage(target, 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: eyeSvg }), h("span", { class: "text-white" }, "Expand")), h("img", { class: "w-auto h-[150px] cursor-pointer shadow-sm rounded-lg transition-all duration-300", src: image }))))))))), h("div", { key: '7e239537ed9d3b07119fbf15fcb8cb238280c095', onClick: () => this.closeImage(), style: { backdropFilter: this.expandedImage ? 'blur(3px)' : 'blur(0px)' }, class: cn('pointer-events-none w-[100dvw] h-[100dvh] fixed top-0 z-10 left-0 opacity-0 bg-black/40 transition-all duration-400', {
|
|
104
|
-
'pointer-events-auto opacity-100 delay-200': this.expandedImage,
|
|
105
|
-
}) }, h("button", { key: 'a961871288f09b8776ca9530a6e5ae56133cb3bc', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, h("div", { key: '6db275131cf9b431540c2402552449a4ca2d4289', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), h("div", { key: '1b0c9149a6d22c436e89baf35fb146c08d13a40a', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), h("img", { key: '38939c47ad696305c5cc2b3ccb4c72112eea2cce', alt: "", id: "expanded-image", class: "fixed opacity-0 z-40 transition-all rounded-lg" }))))))))));
|
|
106
|
-
}
|
|
107
|
-
get el() { return getElement(this); }
|
|
108
|
-
static get watchers() { return {
|
|
109
|
-
"state": ["loadingListener"]
|
|
110
|
-
}; }
|
|
111
|
-
};
|
|
112
|
-
PaintThickness.style = PaintThicknessStyle0;
|
|
113
|
-
|
|
114
|
-
export { PaintThickness as paint_thickness };
|