adp-web-components 0.0.36 → 0.0.38
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/{app-globals-6d543be0.js → app-globals-4aa8f46f.js} +13 -0
- package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +1 -1
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +1 -1
- package/dist/cjs/dynamic-redeem.cjs.entry.js +1 -1
- package/dist/cjs/form-input.cjs.entry.js +1 -1
- package/dist/cjs/general-inquiry-form.cjs.entry.js +1 -1
- package/dist/cjs/{get-local-language-b38fe7ca.js → get-local-language-f00a474e.js} +4 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/part-lookup.cjs.entry.js +25 -20
- package/dist/cjs/shift-components.cjs.js +2 -2
- package/dist/cjs/vehicle-lookup.cjs.entry.js +64 -43
- package/dist/collection/components/form-input/form-input.css +1 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.css +1 -1
- package/dist/collection/components/part-lookup/part-lookup.js +48 -81
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +91 -71
- package/dist/collection/global/lib/middleware.js +13 -0
- package/dist/collection/global/types/locales/error-schema.js +3 -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-6d9cb126.js → p-090b8654.js} +1 -1
- package/dist/components/p-0c62815e.js +5 -0
- package/dist/components/{p-f3de80cd.js → p-0c9d5b37.js} +1 -1
- package/dist/components/{p-889526d8.js → p-14226c5e.js} +1 -1
- package/dist/components/{p-ee84cf70.js → p-1f28a457.js} +1 -1
- package/dist/components/{p-a865dff3.js → p-2bd0fee5.js} +1 -1
- package/dist/components/{p-1a7f780a.js → p-33d15f6d.js} +1 -1
- package/dist/components/{p-e37ce417.js → p-46262302.js} +1 -1
- package/dist/components/{p-1ec25f3c.js → p-6864b1ac.js} +1 -1
- package/dist/components/{p-5cf87534.js → p-b75f830a.js} +1 -1
- package/dist/components/{p-2de97517.js → p-c39f97a1.js} +1 -1
- package/dist/components/{p-f7b3a33c.js → p-ea183aab.js} +1 -1
- package/dist/components/{p-7cc65883.js → p-ed4f329d.js} +1 -1
- package/dist/components/paint-thickness.js +1 -1
- package/dist/components/part-lookup.js +1 -1
- package/dist/components/service-history.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/{app-globals-e6576027.js → app-globals-68faa233.js} +13 -0
- package/dist/esm/dead-stock-lookup_3.entry.js +1 -1
- package/dist/esm/dynamic-claim_6.entry.js +1 -1
- package/dist/esm/dynamic-redeem.entry.js +1 -1
- package/dist/esm/form-input.entry.js +1 -1
- package/dist/esm/general-inquiry-form.entry.js +1 -1
- package/dist/esm/{get-local-language-5f8f9df5.js → get-local-language-e7d50e27.js} +4 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/part-lookup.entry.js +25 -20
- package/dist/esm/shift-components.js +2 -2
- package/dist/esm/vehicle-lookup.entry.js +64 -43
- package/dist/locales/ar.json +3 -0
- package/dist/locales/en.json +3 -0
- package/dist/locales/ku.json +5 -2
- package/dist/locales/ru.json +3 -0
- package/dist/shift-components/{p-8b97a91f.entry.js → p-14a050bc.entry.js} +1 -1
- package/dist/shift-components/{p-42d320e2.js → p-446d908d.js} +1 -1
- package/dist/shift-components/{p-50a1ccc9.entry.js → p-4a8040d3.entry.js} +1 -1
- package/dist/shift-components/{p-6553e467.entry.js → p-4f7a3fd9.entry.js} +1 -1
- package/dist/shift-components/p-5a0e7724.entry.js +5 -0
- package/dist/shift-components/p-7222df1f.entry.js +5 -0
- package/dist/shift-components/p-8f42bfca.js +5 -0
- package/dist/shift-components/{p-ddffc71b.entry.js → p-cde3b164.entry.js} +1 -1
- package/dist/shift-components/{p-5bb328fd.entry.js → p-f1acc1fb.entry.js} +1 -1
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/part-lookup/part-lookup.d.ts +6 -7
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +23 -14
- package/dist/types/components.d.ts +10 -12
- package/dist/types/global/types/locales/error-schema.d.ts +6 -0
- package/dist/types/global/types/locales/index.d.ts +6 -0
- package/package.json +1 -1
- package/dist/components/p-3b5ef7f5.js +0 -5
- package/dist/shift-components/p-36f29bde.js +0 -5
- package/dist/shift-components/p-43f14c26.entry.js +0 -5
- package/dist/shift-components/p-dc33c5ac.entry.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.-z-10{z-index:-10}.mb-\[4px\]{margin-bottom:4px}.inline-flex{display:inline-flex}.w-full{width:100%}.flex-1{flex:1 1 0%}.-translate-y-full{--tw-translate-y:-100%;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}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.\!border-red-500{--tw-border-opacity:1!important;border-color:rgb(239 68 68/var(--tw-border-opacity,1))!important}.px-\[12px\]{padding-left:12px;padding-right:12px}.py-\[6px\]{padding-bottom:6px;padding-top:6px}.pb-\[20px\]{padding-bottom:20px}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.focus\:border-slate-600:focus{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.disabled\:opacity-75:disabled{opacity:.75}
|
|
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}.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)}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.-z-10{z-index:-10}.mb-\[4px\]{margin-bottom:4px}.inline-flex{display:inline-flex}.w-full{width:100%}.flex-1{flex:1 1 0%}.-translate-y-full{--tw-translate-y:-100%;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}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.\!border-red-500{--tw-border-opacity:1!important;border-color:rgb(239 68 68/var(--tw-border-opacity,1))!important}.px-\[12px\]{padding-left:12px;padding-right:12px}.py-\[6px\]{padding-bottom:6px;padding-top:6px}.pb-\[20px\]{padding-bottom:20px}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.focus\:border-slate-600:focus{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.disabled\:opacity-75:disabled{opacity:.75}
|
|
@@ -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}.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)}
|
|
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}.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)}
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
|
+
import { localeSchema } from "../../global/types/locales/index";
|
|
6
7
|
import cn from "../../global/lib/cn";
|
|
7
|
-
|
|
8
|
-
const DISTRIBUTOR_TAG = 'distributor-lookup';
|
|
9
|
-
const MANUFACTURER_TAG = 'manufacturer-lookup';
|
|
8
|
+
import { getLocaleLanguage } from "../../global/lib/get-local-language";
|
|
10
9
|
const componentTags = {
|
|
11
|
-
deadStock:
|
|
12
|
-
distributor:
|
|
13
|
-
manufacturer:
|
|
10
|
+
deadStock: 'dead-stock-lookup',
|
|
11
|
+
distributor: 'distributor-lookup',
|
|
12
|
+
manufacturer: 'manufacturer-lookup',
|
|
14
13
|
};
|
|
15
14
|
export class PartLookup {
|
|
16
15
|
constructor() {
|
|
@@ -21,17 +20,23 @@ export class PartLookup {
|
|
|
21
20
|
this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange, newState);
|
|
22
21
|
};
|
|
23
22
|
this.baseUrl = '';
|
|
24
|
-
this.isDev = false;
|
|
25
23
|
this.queryString = '';
|
|
26
24
|
this.language = 'en';
|
|
27
25
|
this.blazorErrorStateListener = '';
|
|
26
|
+
this.childrenProps = undefined;
|
|
28
27
|
this.blazorOnLoadingStateChange = '';
|
|
29
|
-
this.childeProps = '';
|
|
30
28
|
this.activeElement = '';
|
|
31
29
|
this.errorStateListener = undefined;
|
|
32
30
|
this.loadingStateChanged = undefined;
|
|
33
31
|
this.wrapperErrorState = '';
|
|
34
32
|
this.blazorRef = undefined;
|
|
33
|
+
this.locale = localeSchema.getDefault();
|
|
34
|
+
}
|
|
35
|
+
async componentWillLoad() {
|
|
36
|
+
await this.changeLanguage(this.language);
|
|
37
|
+
}
|
|
38
|
+
async changeLanguage(newLanguage) {
|
|
39
|
+
this.locale = await getLocaleLanguage(newLanguage);
|
|
35
40
|
}
|
|
36
41
|
async componentDidLoad() {
|
|
37
42
|
const deadStockLookup = this.el.getElementsByTagName('dead-stock-lookup')[0];
|
|
@@ -59,19 +64,16 @@ export class PartLookup {
|
|
|
59
64
|
async setBlazorRef(newBlazorRef) {
|
|
60
65
|
this.blazorRef = newBlazorRef;
|
|
61
66
|
}
|
|
62
|
-
async fetchPartNumber(partNumber, quantity, headers = {}) {
|
|
67
|
+
async fetchPartNumber(partNumber, quantity = '', headers = {}) {
|
|
63
68
|
const activeElement = this.componentsList[this.activeElement] || null;
|
|
64
69
|
this.wrapperErrorState = '';
|
|
65
70
|
if (!activeElement)
|
|
66
71
|
return;
|
|
67
72
|
if (partNumber == '')
|
|
68
|
-
return (this.wrapperErrorState =
|
|
73
|
+
return (this.wrapperErrorState = this.locale.errors.partNumberRequired);
|
|
69
74
|
const searchingText = quantity.trim() || quantity.trim() === '0' ? `${partNumber.trim()}/${quantity.trim()}` : partNumber.trim();
|
|
70
75
|
activeElement.fetchData(searchingText, headers);
|
|
71
76
|
}
|
|
72
|
-
async getPageContext() {
|
|
73
|
-
return { componentsList: this.componentsList };
|
|
74
|
-
}
|
|
75
77
|
handleLoadData(newResponse, activeElement) {
|
|
76
78
|
Object.values(this.componentsList).forEach(element => {
|
|
77
79
|
if (element !== null && element !== activeElement && newResponse)
|
|
@@ -85,20 +87,22 @@ export class PartLookup {
|
|
|
85
87
|
[componentTags.manufacturer]: {},
|
|
86
88
|
};
|
|
87
89
|
try {
|
|
88
|
-
if (this.
|
|
90
|
+
if (this.childrenProps) {
|
|
89
91
|
let parsedProps = {};
|
|
90
|
-
if (typeof this.
|
|
91
|
-
parsedProps = JSON.parse(this.
|
|
92
|
-
else if (typeof this.
|
|
93
|
-
parsedProps = this.
|
|
92
|
+
if (typeof this.childrenProps === 'string')
|
|
93
|
+
parsedProps = JSON.parse(this.childrenProps);
|
|
94
|
+
else if (typeof this.childrenProps === 'object')
|
|
95
|
+
parsedProps = this.childrenProps;
|
|
94
96
|
Object.keys(props).forEach(key => {
|
|
95
97
|
if (typeof parsedProps[key] === 'object')
|
|
96
98
|
props[key] = parsedProps[key];
|
|
97
99
|
});
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
|
|
102
|
+
catch (error) {
|
|
103
|
+
console.error(error);
|
|
104
|
+
}
|
|
105
|
+
return (h(Host, { key: 'c85fc29e9e0712bf71d32b0af917b227ea9ced17' }, h("div", { key: 'e7be386e8789e18b9aa2a8903f7b678259ce54ad', class: cn('w-full', { hidden: this.activeElement !== componentTags.deadStock }) }, h("dead-stock-lookup", Object.assign({ key: '965e2b9f021396a0ea961546ef47fec7e3d711aa', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.deadStock]))), h("div", { key: '377661f1555723f772dc59f8a04baa9e39436add', class: cn('w-full', { hidden: this.activeElement !== componentTags.distributor }) }, h("distributor-lookup", Object.assign({ key: '87f8b7980eeb75e699975559c6e905a1239fd467', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.distributor]))), h("div", { key: '0bed3648b7a7555f0168d3bc1eadf4e138cde715', class: cn('w-full', { hidden: this.activeElement !== componentTags.manufacturer }) }, h("manufacturer-lookup", Object.assign({ key: '94a5014d911c2e5b54783fb869f2f80af6125320', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.manufacturer]))), h("slot", { key: '19d3b29afd60ee108f3de149ed2018f31a8a5642' })));
|
|
102
106
|
}
|
|
103
107
|
static get is() { return "part-lookup"; }
|
|
104
108
|
static get originalStyleUrls() {
|
|
@@ -131,24 +135,6 @@ export class PartLookup {
|
|
|
131
135
|
"reflect": false,
|
|
132
136
|
"defaultValue": "''"
|
|
133
137
|
},
|
|
134
|
-
"isDev": {
|
|
135
|
-
"type": "boolean",
|
|
136
|
-
"mutable": false,
|
|
137
|
-
"complexType": {
|
|
138
|
-
"original": "boolean",
|
|
139
|
-
"resolved": "boolean",
|
|
140
|
-
"references": {}
|
|
141
|
-
},
|
|
142
|
-
"required": false,
|
|
143
|
-
"optional": false,
|
|
144
|
-
"docs": {
|
|
145
|
-
"tags": [],
|
|
146
|
-
"text": ""
|
|
147
|
-
},
|
|
148
|
-
"attribute": "is-dev",
|
|
149
|
-
"reflect": false,
|
|
150
|
-
"defaultValue": "false"
|
|
151
|
-
},
|
|
152
138
|
"queryString": {
|
|
153
139
|
"type": "string",
|
|
154
140
|
"mutable": false,
|
|
@@ -209,44 +195,43 @@ export class PartLookup {
|
|
|
209
195
|
"reflect": false,
|
|
210
196
|
"defaultValue": "''"
|
|
211
197
|
},
|
|
212
|
-
"
|
|
198
|
+
"childrenProps": {
|
|
213
199
|
"type": "string",
|
|
214
200
|
"mutable": false,
|
|
215
201
|
"complexType": {
|
|
216
|
-
"original": "string",
|
|
217
|
-
"resolved": "string",
|
|
218
|
-
"references": {
|
|
202
|
+
"original": "string | Object",
|
|
203
|
+
"resolved": "Object | string",
|
|
204
|
+
"references": {
|
|
205
|
+
"Object": {
|
|
206
|
+
"location": "global",
|
|
207
|
+
"id": "global::Object"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
219
210
|
},
|
|
220
211
|
"required": false,
|
|
221
|
-
"optional":
|
|
212
|
+
"optional": true,
|
|
222
213
|
"docs": {
|
|
223
214
|
"tags": [],
|
|
224
215
|
"text": ""
|
|
225
216
|
},
|
|
226
|
-
"attribute": "
|
|
227
|
-
"reflect": false
|
|
228
|
-
"defaultValue": "''"
|
|
217
|
+
"attribute": "children-props",
|
|
218
|
+
"reflect": false
|
|
229
219
|
},
|
|
230
|
-
"
|
|
220
|
+
"blazorOnLoadingStateChange": {
|
|
231
221
|
"type": "string",
|
|
232
222
|
"mutable": false,
|
|
233
223
|
"complexType": {
|
|
234
|
-
"original": "string
|
|
235
|
-
"resolved": "
|
|
236
|
-
"references": {
|
|
237
|
-
"Object": {
|
|
238
|
-
"location": "global",
|
|
239
|
-
"id": "global::Object"
|
|
240
|
-
}
|
|
241
|
-
}
|
|
224
|
+
"original": "string",
|
|
225
|
+
"resolved": "string",
|
|
226
|
+
"references": {}
|
|
242
227
|
},
|
|
243
228
|
"required": false,
|
|
244
|
-
"optional":
|
|
229
|
+
"optional": false,
|
|
245
230
|
"docs": {
|
|
246
231
|
"tags": [],
|
|
247
232
|
"text": ""
|
|
248
233
|
},
|
|
249
|
-
"attribute": "
|
|
234
|
+
"attribute": "blazor-on-loading-state-change",
|
|
250
235
|
"reflect": false,
|
|
251
236
|
"defaultValue": "''"
|
|
252
237
|
},
|
|
@@ -309,7 +294,8 @@ export class PartLookup {
|
|
|
309
294
|
static get states() {
|
|
310
295
|
return {
|
|
311
296
|
"wrapperErrorState": {},
|
|
312
|
-
"blazorRef": {}
|
|
297
|
+
"blazorRef": {},
|
|
298
|
+
"locale": {}
|
|
313
299
|
};
|
|
314
300
|
}
|
|
315
301
|
static get methods() {
|
|
@@ -342,7 +328,7 @@ export class PartLookup {
|
|
|
342
328
|
},
|
|
343
329
|
"fetchPartNumber": {
|
|
344
330
|
"complexType": {
|
|
345
|
-
"signature": "(partNumber: string, quantity
|
|
331
|
+
"signature": "(partNumber: string, quantity?: string, headers?: any) => Promise<string>",
|
|
346
332
|
"parameters": [{
|
|
347
333
|
"name": "partNumber",
|
|
348
334
|
"type": "string",
|
|
@@ -368,34 +354,15 @@ export class PartLookup {
|
|
|
368
354
|
"text": "",
|
|
369
355
|
"tags": []
|
|
370
356
|
}
|
|
371
|
-
},
|
|
372
|
-
"getPageContext": {
|
|
373
|
-
"complexType": {
|
|
374
|
-
"signature": "() => Promise<{ componentsList: ComponentMap; }>",
|
|
375
|
-
"parameters": [],
|
|
376
|
-
"references": {
|
|
377
|
-
"Promise": {
|
|
378
|
-
"location": "global",
|
|
379
|
-
"id": "global::Promise"
|
|
380
|
-
},
|
|
381
|
-
"ComponentMap": {
|
|
382
|
-
"location": "local",
|
|
383
|
-
"path": "/home/vsts/work/1/s/src/components/part-lookup/part-lookup.tsx",
|
|
384
|
-
"id": "src/components/part-lookup/part-lookup.tsx::ComponentMap"
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
"return": "Promise<{ componentsList: ComponentMap; }>"
|
|
388
|
-
},
|
|
389
|
-
"docs": {
|
|
390
|
-
"text": "",
|
|
391
|
-
"tags": []
|
|
392
|
-
}
|
|
393
357
|
}
|
|
394
358
|
};
|
|
395
359
|
}
|
|
396
360
|
static get elementRef() { return "el"; }
|
|
397
361
|
static get watchers() {
|
|
398
362
|
return [{
|
|
363
|
+
"propName": "language",
|
|
364
|
+
"methodName": "changeLanguage"
|
|
365
|
+
}, {
|
|
399
366
|
"propName": "wrapperErrorState",
|
|
400
367
|
"methodName": "errorListener"
|
|
401
368
|
}];
|
|
@@ -5,40 +5,64 @@
|
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
6
|
import cn from "../../global/lib/cn";
|
|
7
7
|
import validateVin from "../../global/lib/validate-vin";
|
|
8
|
+
import { getLocaleLanguage } from "../../global/lib/get-local-language";
|
|
9
|
+
import { localeSchema } from "../../global/types/locales/index";
|
|
10
|
+
const componentTags = {
|
|
11
|
+
dynamicClaim: 'dynamic-claim',
|
|
12
|
+
paintThickness: 'paint-thickness',
|
|
13
|
+
serviceHistory: 'service-history',
|
|
14
|
+
warrantyDetails: 'warranty-details',
|
|
15
|
+
vehicleAccessories: 'vehicle-accessories',
|
|
16
|
+
vehicleSpecification: 'vehicle-specification',
|
|
17
|
+
};
|
|
8
18
|
export class VehicleLookup {
|
|
9
19
|
constructor() {
|
|
20
|
+
this.loadingStateChangingMiddleware = (newState) => {
|
|
21
|
+
if (this.loadingStateChanged)
|
|
22
|
+
this.loadingStateChanged(newState);
|
|
23
|
+
if (this.blazorRef && this.blazorOnLoadingStateChange)
|
|
24
|
+
this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange, newState);
|
|
25
|
+
};
|
|
10
26
|
this.activeElement = '';
|
|
11
27
|
this.baseUrl = '';
|
|
12
28
|
this.isDev = false;
|
|
13
29
|
this.queryString = '';
|
|
14
30
|
this.language = 'en';
|
|
15
31
|
this.blazorErrorStateListener = '';
|
|
32
|
+
this.childrenProps = undefined;
|
|
16
33
|
this.blazorOnLoadingStateChange = '';
|
|
17
34
|
this.errorStateListener = undefined;
|
|
18
35
|
this.loadingStateChanged = undefined;
|
|
19
36
|
this.wrapperErrorState = '';
|
|
20
37
|
this.blazorRef = undefined;
|
|
38
|
+
this.locale = localeSchema.getDefault();
|
|
39
|
+
}
|
|
40
|
+
async componentWillLoad() {
|
|
41
|
+
await this.changeLanguage(this.language);
|
|
42
|
+
}
|
|
43
|
+
async changeLanguage(newLanguage) {
|
|
44
|
+
this.locale = await getLocaleLanguage(newLanguage);
|
|
21
45
|
}
|
|
22
46
|
async componentDidLoad() {
|
|
23
|
-
const
|
|
24
|
-
const vehicleAccessories = this.el.getElementsByTagName('vehicle-accessories')[0];
|
|
25
|
-
const vehicleDetails = this.el.getElementsByTagName('warranty-details')[0];
|
|
47
|
+
const vehicleClaim = this.el.getElementsByTagName('dynamic-claim')[0];
|
|
26
48
|
const vehicleHistory = this.el.getElementsByTagName('service-history')[0];
|
|
27
49
|
const vehicleThickness = this.el.getElementsByTagName('paint-thickness')[0];
|
|
28
|
-
const
|
|
50
|
+
const vehicleDetails = this.el.getElementsByTagName('warranty-details')[0];
|
|
51
|
+
const vehicleAccessories = this.el.getElementsByTagName('vehicle-accessories')[0];
|
|
52
|
+
const vehicleSpecification = this.el.getElementsByTagName('vehicle-specification')[0];
|
|
29
53
|
this.componentsList = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
[componentTags.dynamicClaim]: vehicleClaim,
|
|
55
|
+
[componentTags.serviceHistory]: vehicleHistory,
|
|
56
|
+
[componentTags.warrantyDetails]: vehicleDetails,
|
|
57
|
+
[componentTags.paintThickness]: vehicleThickness,
|
|
58
|
+
[componentTags.vehicleAccessories]: vehicleAccessories,
|
|
59
|
+
[componentTags.vehicleSpecification]: vehicleSpecification,
|
|
36
60
|
};
|
|
37
61
|
Object.values(this.componentsList).forEach(element => {
|
|
38
62
|
if (!element)
|
|
39
63
|
return;
|
|
40
64
|
if (this.loadingStateChanged)
|
|
41
|
-
element.loadingStateChange = this.
|
|
65
|
+
element.loadingStateChange = this.loadingStateChangingMiddleware;
|
|
42
66
|
element.loadedResponse = newResponse => this.handleLoadData(newResponse, element);
|
|
43
67
|
});
|
|
44
68
|
}
|
|
@@ -48,31 +72,8 @@ export class VehicleLookup {
|
|
|
48
72
|
if (this.blazorRef && this.blazorErrorStateListener)
|
|
49
73
|
this.blazorRef.invokeMethodAsync(this.blazorErrorStateListener, newState);
|
|
50
74
|
}
|
|
51
|
-
async handleLoadingListenerPropChange(newProp) {
|
|
52
|
-
Object.values(this.componentsList).forEach(element => {
|
|
53
|
-
if (!element)
|
|
54
|
-
return;
|
|
55
|
-
element.loadingStateChange = newProp;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
async handleBlazorLoadingRefChange(loadingInvokeRef) {
|
|
59
|
-
if (this.blazorRef) {
|
|
60
|
-
Object.values(this.componentsList).forEach(element => {
|
|
61
|
-
if (!element)
|
|
62
|
-
return;
|
|
63
|
-
element.loadingStateChange = newState => this.blazorRef.invokeMethodAsync(loadingInvokeRef, newState);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
75
|
async setBlazorRef(newBlazorRef) {
|
|
68
76
|
this.blazorRef = newBlazorRef;
|
|
69
|
-
if (this.blazorOnLoadingStateChange) {
|
|
70
|
-
Object.values(this.componentsList).forEach(element => {
|
|
71
|
-
if (!element)
|
|
72
|
-
return;
|
|
73
|
-
element.loadingStateChange = newState => this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange, newState);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
77
|
}
|
|
77
78
|
async fetchVin(vin, headers = {}) {
|
|
78
79
|
const activeElement = this.componentsList[this.activeElement] || null;
|
|
@@ -80,14 +81,11 @@ export class VehicleLookup {
|
|
|
80
81
|
if (!activeElement)
|
|
81
82
|
return;
|
|
82
83
|
if (vin == '')
|
|
83
|
-
return (this.wrapperErrorState =
|
|
84
|
+
return (this.wrapperErrorState = this.locale.errors.vinNumberRequired);
|
|
84
85
|
if (!validateVin(vin))
|
|
85
|
-
return (this.wrapperErrorState =
|
|
86
|
+
return (this.wrapperErrorState = this.locale.errors.invalidVin);
|
|
86
87
|
activeElement.fetchData(vin, headers);
|
|
87
88
|
}
|
|
88
|
-
async getPageContext() {
|
|
89
|
-
return { componentsList: this.componentsList };
|
|
90
|
-
}
|
|
91
89
|
handleLoadData(newResponse, activeElement) {
|
|
92
90
|
Object.values(this.componentsList).forEach(element => {
|
|
93
91
|
if (element !== null && element !== activeElement && newResponse)
|
|
@@ -95,7 +93,31 @@ export class VehicleLookup {
|
|
|
95
93
|
});
|
|
96
94
|
}
|
|
97
95
|
render() {
|
|
98
|
-
|
|
96
|
+
const props = {
|
|
97
|
+
[componentTags.dynamicClaim]: {},
|
|
98
|
+
[componentTags.paintThickness]: {},
|
|
99
|
+
[componentTags.serviceHistory]: {},
|
|
100
|
+
[componentTags.warrantyDetails]: {},
|
|
101
|
+
[componentTags.vehicleAccessories]: {},
|
|
102
|
+
[componentTags.vehicleSpecification]: {},
|
|
103
|
+
};
|
|
104
|
+
try {
|
|
105
|
+
if (this.childrenProps) {
|
|
106
|
+
let parsedProps = {};
|
|
107
|
+
if (typeof this.childrenProps === 'string')
|
|
108
|
+
parsedProps = JSON.parse(this.childrenProps);
|
|
109
|
+
else if (typeof this.childrenProps === 'object')
|
|
110
|
+
parsedProps = this.childrenProps;
|
|
111
|
+
Object.keys(props).forEach(key => {
|
|
112
|
+
if (typeof parsedProps[key] === 'object')
|
|
113
|
+
props[key] = parsedProps[key];
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
console.error(error);
|
|
119
|
+
}
|
|
120
|
+
return (h(Host, { key: 'e0cea21b94a33961d15f151c1374a23f5bbab93d' }, h("div", { key: 'e29e3a762397d0205168d48500b978d1928feabf', class: cn('w-full', { hidden: this.activeElement !== componentTags.vehicleSpecification }) }, h("vehicle-specification", Object.assign({ key: 'c414baea398a053e2c10b6ab1045cded332a46a0', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.vehicleSpecification]))), h("div", { key: '0cd0a760dbb94faf010c04d2810530867797d3c2', class: cn('w-full', { hidden: this.activeElement !== componentTags.vehicleAccessories }) }, h("vehicle-accessories", Object.assign({ key: '9bd7310b8e41ab9c72edf6b725cdfe50593745bb', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.vehicleAccessories]))), h("div", { key: '0183152198fc26e636e3eff531325cf97e975e57', class: cn('w-full', { hidden: this.activeElement !== componentTags.warrantyDetails }) }, h("warranty-details", Object.assign({ key: '8aec1010ed9517eb831966f7451e8fc53a170484', "show-ssc": "true", "show-warranty": "true", "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.warrantyDetails]), h("slot", { key: 'ef8cb15609d72dc83268ed9b921bb8e6acc8d11f' }))), h("div", { key: 'a85f4d9f9783bbaaa16f8950cba3e089ed6c0f22', class: cn('w-full', { hidden: this.activeElement !== componentTags.serviceHistory }) }, h("service-history", Object.assign({ key: '45c3796dc0090d8083805625992aefdcb3eb43c6', language: this.language, "base-url": this.baseUrl, "query-string": this.queryString }, props[componentTags.serviceHistory]))), h("div", { key: '596dd21adf06a95cc6b0b446a0d00602f1cee94c', class: cn('w-full', { hidden: this.activeElement !== componentTags.paintThickness }) }, h("paint-thickness", Object.assign({ key: 'ab420953017922ddccbf7b764a34681ee1e14d62', "base-url": this.baseUrl, language: this.language, "query-string": this.queryString }, props[componentTags.paintThickness]))), h("div", { key: 'fc9f5fb31a9940ceb91086b76adc5abbc975c412', class: cn('w-full', { hidden: this.activeElement !== componentTags.dynamicClaim }) }, h("dynamic-claim", Object.assign({ key: '88d3c4d2f41cb2a64969f7b02be7564b3b4d951c' }, props[componentTags.dynamicClaim], { language: this.language, "base-url": this.baseUrl, "query-string": this.queryString })))));
|
|
99
121
|
}
|
|
100
122
|
static get is() { return "vehicle-lookup"; }
|
|
101
123
|
static get originalStyleUrls() {
|
|
@@ -230,6 +252,28 @@ export class VehicleLookup {
|
|
|
230
252
|
"reflect": false,
|
|
231
253
|
"defaultValue": "''"
|
|
232
254
|
},
|
|
255
|
+
"childrenProps": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"mutable": false,
|
|
258
|
+
"complexType": {
|
|
259
|
+
"original": "string | Object",
|
|
260
|
+
"resolved": "Object | string",
|
|
261
|
+
"references": {
|
|
262
|
+
"Object": {
|
|
263
|
+
"location": "global",
|
|
264
|
+
"id": "global::Object"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": true,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": ""
|
|
273
|
+
},
|
|
274
|
+
"attribute": "children-props",
|
|
275
|
+
"reflect": false
|
|
276
|
+
},
|
|
233
277
|
"blazorOnLoadingStateChange": {
|
|
234
278
|
"type": "string",
|
|
235
279
|
"mutable": false,
|
|
@@ -283,7 +327,8 @@ export class VehicleLookup {
|
|
|
283
327
|
static get states() {
|
|
284
328
|
return {
|
|
285
329
|
"wrapperErrorState": {},
|
|
286
|
-
"blazorRef": {}
|
|
330
|
+
"blazorRef": {},
|
|
331
|
+
"locale": {}
|
|
287
332
|
};
|
|
288
333
|
}
|
|
289
334
|
static get methods() {
|
|
@@ -316,7 +361,7 @@ export class VehicleLookup {
|
|
|
316
361
|
},
|
|
317
362
|
"fetchVin": {
|
|
318
363
|
"complexType": {
|
|
319
|
-
"signature": "(vin: string, headers?: any) => Promise
|
|
364
|
+
"signature": "(vin: string, headers?: any) => Promise<string>",
|
|
320
365
|
"parameters": [{
|
|
321
366
|
"name": "vin",
|
|
322
367
|
"type": "string",
|
|
@@ -332,29 +377,7 @@ export class VehicleLookup {
|
|
|
332
377
|
"id": "global::Promise"
|
|
333
378
|
}
|
|
334
379
|
},
|
|
335
|
-
"return": "Promise
|
|
336
|
-
},
|
|
337
|
-
"docs": {
|
|
338
|
-
"text": "",
|
|
339
|
-
"tags": []
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
"getPageContext": {
|
|
343
|
-
"complexType": {
|
|
344
|
-
"signature": "() => Promise<{ componentsList: ComponentMap; }>",
|
|
345
|
-
"parameters": [],
|
|
346
|
-
"references": {
|
|
347
|
-
"Promise": {
|
|
348
|
-
"location": "global",
|
|
349
|
-
"id": "global::Promise"
|
|
350
|
-
},
|
|
351
|
-
"ComponentMap": {
|
|
352
|
-
"location": "local",
|
|
353
|
-
"path": "/home/vsts/work/1/s/src/components/vehicle-lookup/vehicle-lookup.tsx",
|
|
354
|
-
"id": "src/components/vehicle-lookup/vehicle-lookup.tsx::ComponentMap"
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
"return": "Promise<{ componentsList: ComponentMap; }>"
|
|
380
|
+
"return": "Promise<string>"
|
|
358
381
|
},
|
|
359
382
|
"docs": {
|
|
360
383
|
"text": "",
|
|
@@ -366,14 +389,11 @@ export class VehicleLookup {
|
|
|
366
389
|
static get elementRef() { return "el"; }
|
|
367
390
|
static get watchers() {
|
|
368
391
|
return [{
|
|
392
|
+
"propName": "language",
|
|
393
|
+
"methodName": "changeLanguage"
|
|
394
|
+
}, {
|
|
369
395
|
"propName": "wrapperErrorState",
|
|
370
396
|
"methodName": "errorListener"
|
|
371
|
-
}, {
|
|
372
|
-
"propName": "onLoadingStateChanged",
|
|
373
|
-
"methodName": "handleLoadingListenerPropChange"
|
|
374
|
-
}, {
|
|
375
|
-
"propName": "blazorOnLoadingStateChange",
|
|
376
|
-
"methodName": "handleBlazorLoadingRefChange"
|
|
377
397
|
}];
|
|
378
398
|
}
|
|
379
399
|
}
|
|
@@ -21,6 +21,19 @@
|
|
|
21
21
|
console.error(`Error invoking function "${functionName}" on element "${selector}":`, error);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
window['blazorInvokeSet'] = async function (selector, field, value) {
|
|
25
|
+
const element = document.querySelector(selector);
|
|
26
|
+
if (!element) {
|
|
27
|
+
console.error(`Element with selector "${selector}" not found.`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
return (element[field] = value);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error(`Setting field ${field} failed to set value: ${value}:`, error);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
24
37
|
console.log('Global blazorInvoke initialized.');
|
|
25
38
|
}
|
|
26
39
|
})();
|
|
@@ -6,6 +6,9 @@ import { object, string } from "yup";
|
|
|
6
6
|
export const errorsSchema = object({
|
|
7
7
|
wildCard: string().required(),
|
|
8
8
|
noBaseUrl: string().required(),
|
|
9
|
+
invalidVin: string().required(),
|
|
10
|
+
vinNumberRequired: string().required(),
|
|
11
|
+
partNumberRequired: string().required(),
|
|
9
12
|
noServiceAvailable: string().required(),
|
|
10
13
|
wrongResponseFormat: string().required(),
|
|
11
14
|
});
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{D as o,d as s}from"./p-
|
|
5
|
+
import{D as o,d as s}from"./p-c39f97a1.js";const a=o,p=s;export{a as DeadStockLookup,p as defineCustomElement}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{D as o,d as s}from"./p-
|
|
5
|
+
import{D as o,d as s}from"./p-ed4f329d.js";const d=o,p=s;export{d as DistributorLookup,p as defineCustomElement}
|