adp-web-components 0.0.34 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +394 -0
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +12 -12
- package/dist/cjs/dynamic-redeem.cjs.entry.js +4 -4
- package/dist/cjs/form-input.cjs.entry.js +2 -2
- package/dist/cjs/general-inquiry-form.cjs.entry.js +2 -2
- package/dist/cjs/{get-local-language-b48b2f48.js → get-local-language-b38fe7ca.js} +51 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/part-lookup.cjs.entry.js +119 -0
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/vehicle-lookup.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/form-input/form-input.css +1 -1
- package/dist/collection/components/form-input/form-input.js +1 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.css +1 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.js +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +4 -3
- package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.js +17 -13
- package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +18 -18
- package/dist/collection/components/part-lookup/part-lookup.css +1 -0
- package/dist/collection/components/part-lookup/part-lookup.js +403 -0
- package/dist/collection/components/vehicle-lookup/dynamic-claim.js +3 -3
- package/dist/collection/components/vehicle-lookup/dynamic-redeem.js +4 -4
- package/dist/collection/components/vehicle-lookup/paint-thickness.js +4 -4
- package/dist/collection/components/vehicle-lookup/service-history.js +2 -2
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +4 -4
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +2 -2
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +2 -2
- package/dist/collection/components/vehicle-lookup/warranty-details.js +2 -2
- package/dist/collection/global/types/locales/index.js +4 -0
- package/dist/collection/global/types/locales/part-lookup/dead-stock-schema.js +10 -0
- package/dist/collection/global/types/locales/part-lookup/distributor-schema.js +21 -0
- package/dist/collection/global/types/locales/part-lookup/index.js +13 -0
- package/dist/collection/global/types/locales/part-lookup/manufacturer-schema.js +22 -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/manufacturer-lookup.js +1 -1
- package/dist/components/{p-2882d59a.js → p-1a7f780a.js} +1 -1
- package/dist/components/{p-093b1fb7.js → p-1ec25f3c.js} +1 -1
- package/dist/components/p-2de97517.js +5 -0
- package/dist/components/p-3b5ef7f5.js +5 -0
- package/dist/components/p-5cf87534.js +5 -0
- package/dist/components/{p-e5d74a15.js → p-6d9cb126.js} +1 -1
- package/dist/components/p-7cc65883.js +5 -0
- package/dist/components/{p-0cfd2522.js → p-889526d8.js} +1 -1
- package/dist/components/{p-1ca0dc4b.js → p-a865dff3.js} +1 -1
- package/dist/components/{p-f001d15b.js → p-e37ce417.js} +1 -1
- package/dist/components/{p-f6b68cb6.js → p-ee84cf70.js} +1 -1
- package/dist/components/p-f3de80cd.js +5 -0
- package/dist/components/{p-5adec8c4.js → p-f7b3a33c.js} +1 -1
- package/dist/components/paint-thickness.js +1 -1
- package/dist/components/part-lookup.d.ts +11 -0
- package/dist/components/part-lookup.js +5 -0
- 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/dead-stock-lookup_3.entry.js +388 -0
- package/dist/esm/dynamic-claim_6.entry.js +12 -12
- package/dist/esm/dynamic-redeem.entry.js +4 -4
- package/dist/esm/form-input.entry.js +2 -2
- package/dist/esm/general-inquiry-form.entry.js +2 -2
- package/dist/esm/{get-local-language-fff1db0a.js → get-local-language-5f8f9df5.js} +51 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/part-lookup.entry.js +115 -0
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/vehicle-lookup.entry.js +1 -1
- package/dist/locales/ar.json +40 -0
- package/dist/locales/en.json +40 -0
- package/dist/locales/ku.json +40 -0
- package/dist/locales/ru.json +137 -0
- package/dist/shift-components/p-36f29bde.js +5 -0
- package/dist/shift-components/p-43f14c26.entry.js +5 -0
- package/dist/shift-components/{p-3a4e5325.entry.js → p-50a1ccc9.entry.js} +1 -1
- package/dist/shift-components/{p-691f64cf.entry.js → p-5bb328fd.entry.js} +1 -1
- package/dist/shift-components/{p-832fd942.entry.js → p-6553e467.entry.js} +1 -1
- package/dist/shift-components/p-8b97a91f.entry.js +5 -0
- package/dist/shift-components/{p-9120c049.entry.js → p-dc33c5ac.entry.js} +1 -1
- package/dist/shift-components/{p-496a721b.entry.js → p-ddffc71b.entry.js} +1 -1
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/part-lookup/part-lookup.d.ts +43 -0
- package/dist/types/components.d.ts +43 -5
- package/dist/types/global/types/locales/index.d.ts +84 -2
- package/dist/types/global/types/locales/part-lookup/dead-stock-schema.d.ts +9 -0
- package/dist/types/global/types/locales/part-lookup/distributor-schema.d.ts +31 -0
- package/dist/types/global/types/locales/part-lookup/index.d.ts +79 -0
- package/dist/types/global/types/locales/part-lookup/manufacturer-schema.d.ts +33 -0
- package/dist/types/global/types/locales/vehicle-lookup/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/dead-stock-lookup.cjs.entry.js +0 -126
- package/dist/cjs/distributor-lookup.cjs.entry.js +0 -134
- package/dist/cjs/general-a1e72036.js +0 -13
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +0 -133
- package/dist/cjs/partInformation-16ea1f8e.js +0 -34
- package/dist/components/p-1344d377.js +0 -5
- package/dist/components/p-50896586.js +0 -5
- package/dist/components/p-62a22efb.js +0 -5
- package/dist/esm/dead-stock-lookup.entry.js +0 -122
- package/dist/esm/distributor-lookup.entry.js +0 -130
- package/dist/esm/general-b630a7db.js +0 -11
- package/dist/esm/manufacturer-lookup.entry.js +0 -129
- package/dist/esm/partInformation-ba1470e1.js +0 -32
- package/dist/shift-components/p-0b5958a0.entry.js +0 -5
- package/dist/shift-components/p-1344d377.js +0 -5
- package/dist/shift-components/p-cbd2ce5c.entry.js +0 -5
- package/dist/shift-components/p-e0ea03e8.js +0 -5
- package/dist/shift-components/p-eb229fab.entry.js +0 -5
- package/dist/shift-components/p-f99c8b2f.js +0 -5
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const manufacturerSchema: import("yup").ObjectSchema<{
|
|
2
|
+
origin: string;
|
|
3
|
+
warrantyPrice: string;
|
|
4
|
+
specialPrice: string;
|
|
5
|
+
wholesalesPrice: string;
|
|
6
|
+
pnc: string;
|
|
7
|
+
pncName: string;
|
|
8
|
+
binCode: string;
|
|
9
|
+
dimension1: string;
|
|
10
|
+
dimension2: string;
|
|
11
|
+
dimension3: string;
|
|
12
|
+
netWeight: string;
|
|
13
|
+
grossWeight: string;
|
|
14
|
+
cubicMeasure: string;
|
|
15
|
+
hsCode: string;
|
|
16
|
+
uzHsCode: string;
|
|
17
|
+
}, import("yup").AnyObject, {
|
|
18
|
+
origin: undefined;
|
|
19
|
+
warrantyPrice: undefined;
|
|
20
|
+
specialPrice: undefined;
|
|
21
|
+
wholesalesPrice: undefined;
|
|
22
|
+
pnc: undefined;
|
|
23
|
+
pncName: undefined;
|
|
24
|
+
binCode: undefined;
|
|
25
|
+
dimension1: undefined;
|
|
26
|
+
dimension2: undefined;
|
|
27
|
+
dimension3: undefined;
|
|
28
|
+
netWeight: undefined;
|
|
29
|
+
grossWeight: undefined;
|
|
30
|
+
cubicMeasure: undefined;
|
|
31
|
+
hsCode: undefined;
|
|
32
|
+
uzHsCode: undefined;
|
|
33
|
+
}, "">;
|
|
@@ -65,11 +65,11 @@ export declare const vehicleLookupSchema: import("yup").ObjectSchema<{
|
|
|
65
65
|
sfx?: string;
|
|
66
66
|
};
|
|
67
67
|
serviceHistory: {
|
|
68
|
+
branch?: string;
|
|
68
69
|
noData?: string;
|
|
69
70
|
serviceType?: string;
|
|
70
71
|
invoiceNumber?: string;
|
|
71
72
|
serviceHistory?: string;
|
|
72
|
-
branch?: string;
|
|
73
73
|
dealer?: string;
|
|
74
74
|
date?: string;
|
|
75
75
|
odometer?: string;
|
package/package.json
CHANGED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-846c93d2.js');
|
|
10
|
-
const getLocalLanguage = require('./get-local-language-b48b2f48.js');
|
|
11
|
-
const cn = require('./cn-f559f9e5.js');
|
|
12
|
-
const Loading = require('./Loading-6f4f0127.js');
|
|
13
|
-
const partInformation = require('./partInformation-16ea1f8e.js');
|
|
14
|
-
require('./index.esm-c628daeb.js');
|
|
15
|
-
|
|
16
|
-
const deadStockLookupCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mb-\\[10px\\]{margin-bottom:10px}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.size-\\[22px\\]{height:22px;width:22px}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.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))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[20px\\]{padding-left:20px;padding-right:20px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}";
|
|
17
|
-
const DeadStockLookupStyle0 = deadStockLookupCss;
|
|
18
|
-
|
|
19
|
-
let mockData = {};
|
|
20
|
-
const closedAccordionHeight = '46px';
|
|
21
|
-
const DeadStockLookup = class {
|
|
22
|
-
constructor(hostRef) {
|
|
23
|
-
index.registerInstance(this, hostRef);
|
|
24
|
-
this.baseUrl = '';
|
|
25
|
-
this.isDev = false;
|
|
26
|
-
this.queryString = '';
|
|
27
|
-
this.language = 'en';
|
|
28
|
-
this.loadingStateChange = undefined;
|
|
29
|
-
this.loadedResponse = undefined;
|
|
30
|
-
this.state = 'idle';
|
|
31
|
-
this.errorMessage = null;
|
|
32
|
-
this.partInformation = undefined;
|
|
33
|
-
this.externalPartNumber = null;
|
|
34
|
-
this.locale = getLocalLanguage.localeSchema.getDefault();
|
|
35
|
-
}
|
|
36
|
-
async componentWillLoad() {
|
|
37
|
-
await this.changeLanguage(this.language);
|
|
38
|
-
}
|
|
39
|
-
async changeLanguage(newLanguage) {
|
|
40
|
-
this.locale = await getLocalLanguage.getLocaleLanguage(newLanguage);
|
|
41
|
-
}
|
|
42
|
-
handleSettingData(response) {
|
|
43
|
-
this.partInformation = response;
|
|
44
|
-
}
|
|
45
|
-
async setData(newData, headers = {}) {
|
|
46
|
-
clearTimeout(this.networkTimeoutRef);
|
|
47
|
-
if (this.abortController)
|
|
48
|
-
this.abortController.abort();
|
|
49
|
-
this.abortController = new AbortController();
|
|
50
|
-
let scopedTimeoutRef;
|
|
51
|
-
const isPartNumberRequest = typeof newData === 'string';
|
|
52
|
-
const partNumber = isPartNumberRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.partNumber;
|
|
53
|
-
this.externalPartNumber = partNumber;
|
|
54
|
-
try {
|
|
55
|
-
if (!partNumber || partNumber.trim().length === 0) {
|
|
56
|
-
this.state = 'idle';
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
if (this.state === 'data' || this.state === 'error') {
|
|
60
|
-
this.state = (this.state + '-loading');
|
|
61
|
-
}
|
|
62
|
-
else
|
|
63
|
-
this.state = 'loading';
|
|
64
|
-
await new Promise(r => {
|
|
65
|
-
scopedTimeoutRef = setTimeout(r, 700);
|
|
66
|
-
this.networkTimeoutRef = scopedTimeoutRef;
|
|
67
|
-
});
|
|
68
|
-
const partResponse = isPartNumberRequest ? await partInformation.getPartInformation(this, { scopedTimeoutRef, partNumber, mockData }, headers) : newData;
|
|
69
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
70
|
-
if (!partResponse)
|
|
71
|
-
throw new Error('wrongResponseFormat');
|
|
72
|
-
this.handleSettingData(partResponse);
|
|
73
|
-
}
|
|
74
|
-
this.errorMessage = null;
|
|
75
|
-
this.state = 'data';
|
|
76
|
-
}
|
|
77
|
-
catch (error) {
|
|
78
|
-
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
79
|
-
return;
|
|
80
|
-
console.error(error);
|
|
81
|
-
this.state = 'error';
|
|
82
|
-
this.partInformation = null;
|
|
83
|
-
this.errorMessage = error.message;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
async fetchData(partNumber = this.externalPartNumber, headers = {}) {
|
|
87
|
-
await this.setData(partNumber, headers);
|
|
88
|
-
}
|
|
89
|
-
async loadingListener() {
|
|
90
|
-
if (this.loadingStateChange)
|
|
91
|
-
this.loadingStateChange(this.state.includes('loading'));
|
|
92
|
-
}
|
|
93
|
-
async setMockData(newMockData) {
|
|
94
|
-
mockData = newMockData;
|
|
95
|
-
}
|
|
96
|
-
toggleAccordion(event) {
|
|
97
|
-
const container = event.target.parentElement;
|
|
98
|
-
const icon = container.getElementsByClassName('icon')[0];
|
|
99
|
-
const isExpanded = container.getAttribute('aria-expanded') === 'true';
|
|
100
|
-
if (isExpanded) {
|
|
101
|
-
container.style.height = closedAccordionHeight;
|
|
102
|
-
icon.style.transform = 'rotate(0deg)';
|
|
103
|
-
container.setAttribute('aria-expanded', 'false');
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
const content = container.getElementsByClassName('content')[0];
|
|
107
|
-
const totalHeight = +closedAccordionHeight.replace('px', '') + content.getClientRects()[0].height;
|
|
108
|
-
container.style.height = `${totalHeight}px`;
|
|
109
|
-
icon.style.transform = 'rotate(180deg)';
|
|
110
|
-
container.setAttribute('aria-expanded', 'true');
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
render() {
|
|
114
|
-
var _a, _b;
|
|
115
|
-
return (index.h(index.Host, { key: '6e4ae6ad08a5ddc15fe5146953d1d2a07038835d' }, index.h("div", { key: '85c386f5c877f71d064be8f308e4408c01155eb1', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '71930858160fcaacfe90d18bea2c48bb413c9e9c' }, index.h(Loading.Loading, { key: '4d1f90ee35055e7046b0df380a631b8ca65aa62f', isLoading: this.state.includes('loading') }), index.h("div", { key: 'b5c3e8ec0f8560363f8268e1975c7ca039b6edbb', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: '3e928834d4562f5cbe05e451768b668fc9067e61', class: "py-[16px]" }, index.h("div", { key: '6dd21bc59f9636a706f4094364eeab7141a88c52', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.locale.errors.wildCard))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '415d90744dd72e7d7f4e65ca2e83e16131f33c62' }, index.h("div", { key: 'a659d9b44da828b63f8896c45dcffff3e9e0931f', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: '1e55efab0617d36b8f3b816bc391a828fcd3089c', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Dead stock"), (_b = (_a = this.partInformation) === null || _a === void 0 ? void 0 : _a.deadStock) === null || _b === void 0 ? void 0 :
|
|
116
|
-
_b.map(deadStock => (index.h("div", { key: deadStock.companyIntegrationID, class: "py-[10px] px-[20px]" }, index.h("div", { "aria-expanded": "false", style: { height: closedAccordionHeight }, class: "border shadow transition-all duration-500 overflow-hidden rounded-md mb-[10px] border-[#d6d8dc]" }, index.h("button", { onClick: this.toggleAccordion, style: { height: closedAccordionHeight }, class: "w-full flex px-[10px] justify-between items-center text-slate-800" }, index.h("strong", null, deadStock.companyName), index.h("span", { class: "icon text-slate-800 transition-transform duration-500" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", class: "size-[22px]" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z" })))), index.h("div", { class: "content" }, index.h("table", { class: "w-full overflow-auto relative border-collapse" }, index.h("thead", null, index.h("tr", null, index.h("th", { class: "py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]" }, "Branch"), index.h("th", { class: "py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]" }, "Available Qty"))), index.h("tbody", null, deadStock === null || deadStock === void 0 ? void 0 : deadStock.branchDeadStock.map(branchDeadStock => (index.h("tr", { class: "transition-colors border-b border-[#d6d8dc] last:border-none duration-100 hover:bg-slate-100", key: branchDeadStock.companyBranchIntegrationID }, index.h("td", { class: cn.cn('py-[20px] px-[10px] text-left whitespace-nowrap') }, branchDeadStock.companyBranchName), index.h("td", { class: cn.cn('py-[20px] px-[10px] text-left whitespace-nowrap') }, index.h("strong", null, branchDeadStock.quantity))))))))))))))))))));
|
|
117
|
-
}
|
|
118
|
-
get el() { return index.getElement(this); }
|
|
119
|
-
static get watchers() { return {
|
|
120
|
-
"language": ["changeLanguage"],
|
|
121
|
-
"state": ["loadingListener"]
|
|
122
|
-
}; }
|
|
123
|
-
};
|
|
124
|
-
DeadStockLookup.style = DeadStockLookupStyle0;
|
|
125
|
-
|
|
126
|
-
exports.dead_stock_lookup = DeadStockLookup;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-846c93d2.js');
|
|
10
|
-
const cn = require('./cn-f559f9e5.js');
|
|
11
|
-
const general = require('./general-a1e72036.js');
|
|
12
|
-
const getLocalLanguage = require('./get-local-language-b48b2f48.js');
|
|
13
|
-
const partInformation = require('./partInformation-16ea1f8e.js');
|
|
14
|
-
const Loading = require('./Loading-6f4f0127.js');
|
|
15
|
-
require('./index.esm-c628daeb.js');
|
|
16
|
-
|
|
17
|
-
const distributorLookupCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.grid{display:grid}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.capitalize{text-transform:capitalize}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-\\[green\\]{--tw-text-opacity:1;color:rgb(0 128 0/var(--tw-text-opacity,1))}.text-\\[orange\\]{--tw-text-opacity:1;color:rgb(255 165 0/var(--tw-text-opacity,1))}.text-\\[red\\]{--tw-text-opacity:1;color:rgb(255 0 0/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}";
|
|
18
|
-
const DistributorLookupStyle0 = distributorLookupCss;
|
|
19
|
-
|
|
20
|
-
let mockData = {};
|
|
21
|
-
const DistributorLookup = class {
|
|
22
|
-
constructor(hostRef) {
|
|
23
|
-
index.registerInstance(this, hostRef);
|
|
24
|
-
this.baseUrl = '';
|
|
25
|
-
this.isDev = false;
|
|
26
|
-
this.queryString = '';
|
|
27
|
-
this.hiddenFields = '';
|
|
28
|
-
this.language = 'en';
|
|
29
|
-
this.localizationName = '';
|
|
30
|
-
this.loadingStateChange = undefined;
|
|
31
|
-
this.loadedResponse = undefined;
|
|
32
|
-
this.state = 'idle';
|
|
33
|
-
this.errorMessage = null;
|
|
34
|
-
this.partInformation = undefined;
|
|
35
|
-
this.externalPartNumber = null;
|
|
36
|
-
this.locale = getLocalLanguage.localeSchema.getDefault();
|
|
37
|
-
}
|
|
38
|
-
async componentWillLoad() {
|
|
39
|
-
await this.changeLanguage(this.language);
|
|
40
|
-
}
|
|
41
|
-
async changeLanguage(newLanguage) {
|
|
42
|
-
this.locale = await getLocalLanguage.getLocaleLanguage(newLanguage);
|
|
43
|
-
}
|
|
44
|
-
handleSettingData(response) {
|
|
45
|
-
this.partInformation = response;
|
|
46
|
-
}
|
|
47
|
-
async setData(newData, headers = {}) {
|
|
48
|
-
clearTimeout(this.networkTimeoutRef);
|
|
49
|
-
if (this.abortController)
|
|
50
|
-
this.abortController.abort();
|
|
51
|
-
this.abortController = new AbortController();
|
|
52
|
-
let scopedTimeoutRef;
|
|
53
|
-
const isPartNumberRequest = typeof newData === 'string';
|
|
54
|
-
const partNumber = isPartNumberRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.partNumber;
|
|
55
|
-
this.externalPartNumber = partNumber;
|
|
56
|
-
try {
|
|
57
|
-
if (!partNumber || partNumber.trim().length === 0) {
|
|
58
|
-
this.state = 'idle';
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (this.state === 'data' || this.state === 'error') {
|
|
62
|
-
this.state = (this.state + '-loading');
|
|
63
|
-
}
|
|
64
|
-
else
|
|
65
|
-
this.state = 'loading';
|
|
66
|
-
await new Promise(r => {
|
|
67
|
-
scopedTimeoutRef = setTimeout(r, 700);
|
|
68
|
-
this.networkTimeoutRef = scopedTimeoutRef;
|
|
69
|
-
});
|
|
70
|
-
const partResponse = isPartNumberRequest ? await partInformation.getPartInformation(this, { scopedTimeoutRef, partNumber, mockData }, headers) : newData;
|
|
71
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
72
|
-
if (!partResponse)
|
|
73
|
-
throw new Error('wrongResponseFormat');
|
|
74
|
-
this.handleSettingData(partResponse);
|
|
75
|
-
}
|
|
76
|
-
this.errorMessage = null;
|
|
77
|
-
this.state = 'data';
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
|
|
81
|
-
return;
|
|
82
|
-
console.error(error);
|
|
83
|
-
this.state = 'error';
|
|
84
|
-
this.partInformation = null;
|
|
85
|
-
this.errorMessage = error.message;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
async fetchData(partNumber = this.externalPartNumber, headers = {}) {
|
|
89
|
-
await this.setData(partNumber, 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, _c;
|
|
100
|
-
const localName = this.partInformation ? this.localizationName || 'russian' : 'russian';
|
|
101
|
-
const hiddenFields = this.partInformation ? this.hiddenFields.split(',').map(field => field.trim()) || [] : [];
|
|
102
|
-
const partsInformation = this.partInformation
|
|
103
|
-
? [
|
|
104
|
-
{ label: 'Description', key: 'partDescription', value: this.partInformation.stockParts[0].partDescription },
|
|
105
|
-
{ label: 'Product Group', key: 'group', value: this.partInformation.stockParts[0].group },
|
|
106
|
-
{ label: `${general.capitalize(localName)} Description`, key: 'localDescription', value: this.partInformation.stockParts[0].localDescription },
|
|
107
|
-
{ label: 'Dealer Purchase price', key: 'fob', value: (_a = this.partInformation.stockParts[0].fob) === null || _a === void 0 ? void 0 : _a.toFixed(2) },
|
|
108
|
-
{ label: 'Recommended Retail price', key: 'price', value: (_b = this.partInformation.stockParts[0].price) === null || _b === void 0 ? void 0 : _b.toFixed(2) },
|
|
109
|
-
{ label: 'Superseded From', key: 'supersededFrom', value: this.partInformation.stockParts[0].supersededFrom },
|
|
110
|
-
{ label: 'Superseded To', key: 'supersededTo', value: this.partInformation.stockParts[0].supersededTo },
|
|
111
|
-
]
|
|
112
|
-
: [];
|
|
113
|
-
const displayedFields = partsInformation.filter(part => !hiddenFields.includes(part.key));
|
|
114
|
-
const displayDistributer = this.partInformation
|
|
115
|
-
? !this.partInformation.stockParts.some(({ quantityLookUpResult }) => quantityLookUpResult === 'LookupIsSkipped' || quantityLookUpResult === 'QuantityNotWithinLookupThreshold')
|
|
116
|
-
: false;
|
|
117
|
-
return (index.h(index.Host, { key: 'e98cdb5d363200db122ed0100f591462c5f37af2' }, index.h("div", { key: 'f4b850d2247759ed7a060064924e0c48356c1527', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '2fbd7dabccc4949c8d8efd6891addde68a429293' }, index.h(Loading.Loading, { key: 'b1e47d98eef64a800ec9bd3a5b069d289bfeeea2', isLoading: this.state.includes('loading') }), index.h("div", { key: '9679d81255f3e0198f8755904e537de4e6afe552', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: '4c1d5123ee5b4236885ba1bf1561de631c0efd3a', class: "py-[16px]" }, index.h("div", { key: '17d40851fb8a76d4737a9d224768c9afa592ecda', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.locale.errors.wildCard))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '027820e491b435e9cf8ef47357eeb77d147cd161' }, index.h("div", { key: '741d06d76a2d15ccd2b55e727c628123d16bc185', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: '03843816d41d722e92d1cbd902f387096e232185', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Info"), index.h("div", { key: 'f61b2d94e6acfd42f3e033d1d7534aa97f920d64', class: "py-[10px] px-[30px] flex flex-col gap-[15px]" }, index.h("div", { key: '14a2be07f2a55f438960edc2517c629fd76664d6', class: "grid grid-cols-3 gap-[50px]" }, displayedFields.map(({ label, value, key }) => (index.h("div", { key: key, class: "flex flex-col flex-1" }, index.h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), index.h("div", { class: "py-[10px] px-0" }, value))))))), displayDistributer && (index.h("div", { key: 'aadd189054ec8a4ed1136a53b5ce0fb61554370c', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: 'f8c768548a0d9cac69a36bf20b0d28e6da5d0646', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Distributor Stock"), index.h("div", { key: '207802621ce60285f6fa5548c52bdbbde40197fc', class: "flex flex-col gap-[15px]" }, index.h("table", { key: '8e39bc72148d479caf6d8b9c45381f0d77263d98', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: 'ea6575025fbe61ccbc854ac42c8ea8cadb3d0fcb', class: "top-0 font-bold sticky bg-white" }, index.h("tr", { key: '48a7230029048265e6be05832095aa6bb2614324' }, ['Location', 'Availability'].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: '4c5eea82b7b51363f184e8473ab18ad4a4258494' }, (_c = this.partInformation) === null || _c === void 0 ? void 0 : _c.stockParts.map(stock => (index.h("tr", { class: "transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100", key: stock.locationID }, index.h("td", { class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, stock.locationName), index.h("td", { class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, index.h("div", { class: cn.cn('text-[red]', {
|
|
118
|
-
'text-[green]': stock.quantityLookUpResult === 'Available',
|
|
119
|
-
'text-[orange]': stock.quantityLookUpResult === 'PartiallyAvailable',
|
|
120
|
-
}) }, index.h("strong", null, stock.quantityLookUpResult === 'Available'
|
|
121
|
-
? 'Available'
|
|
122
|
-
: stock.quantityLookUpResult === 'PartiallyAvailable'
|
|
123
|
-
? 'Partially Available'
|
|
124
|
-
: 'Not Available'))))))))))))))))));
|
|
125
|
-
}
|
|
126
|
-
get el() { return index.getElement(this); }
|
|
127
|
-
static get watchers() { return {
|
|
128
|
-
"language": ["changeLanguage"],
|
|
129
|
-
"state": ["loadingListener"]
|
|
130
|
-
}; }
|
|
131
|
-
};
|
|
132
|
-
DistributorLookup.style = DistributorLookupStyle0;
|
|
133
|
-
|
|
134
|
-
exports.distributor_lookup = DistributorLookup;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-846c93d2.js');
|
|
10
|
-
const cn = require('./cn-f559f9e5.js');
|
|
11
|
-
const general = require('./general-a1e72036.js');
|
|
12
|
-
const getLocalLanguage = require('./get-local-language-b48b2f48.js');
|
|
13
|
-
const Loading = require('./Loading-6f4f0127.js');
|
|
14
|
-
const partInformation = require('./partInformation-16ea1f8e.js');
|
|
15
|
-
require('./index.esm-c628daeb.js');
|
|
16
|
-
|
|
17
|
-
const manufacturerLookupCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.grid{display:grid}.h-\\[40px\\]{height:40px}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-hidden{overflow:hidden}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.capitalize{text-transform:capitalize}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}.duration-100{transition-duration:.1s}";
|
|
18
|
-
const ManufacturerLookupStyle0 = manufacturerLookupCss;
|
|
19
|
-
|
|
20
|
-
let mockData = {};
|
|
21
|
-
const ManufacturerLookup = class {
|
|
22
|
-
constructor(hostRef) {
|
|
23
|
-
index.registerInstance(this, hostRef);
|
|
24
|
-
this.baseUrl = '';
|
|
25
|
-
this.isDev = false;
|
|
26
|
-
this.queryString = '';
|
|
27
|
-
this.hiddenFields = '';
|
|
28
|
-
this.language = 'en';
|
|
29
|
-
this.localizationName = '';
|
|
30
|
-
this.headerTitle = 'Manufacturer';
|
|
31
|
-
this.loadingStateChange = undefined;
|
|
32
|
-
this.loadedResponse = undefined;
|
|
33
|
-
this.state = 'idle';
|
|
34
|
-
this.errorMessage = null;
|
|
35
|
-
this.partInformation = undefined;
|
|
36
|
-
this.externalPartNumber = null;
|
|
37
|
-
this.locale = getLocalLanguage.localeSchema.getDefault();
|
|
38
|
-
}
|
|
39
|
-
async componentWillLoad() {
|
|
40
|
-
await this.changeLanguage(this.language);
|
|
41
|
-
}
|
|
42
|
-
async changeLanguage(newLanguage) {
|
|
43
|
-
this.locale = await getLocalLanguage.getLocaleLanguage(newLanguage);
|
|
44
|
-
}
|
|
45
|
-
handleSettingData(response) {
|
|
46
|
-
this.partInformation = 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 isPartNumberRequest = typeof newData === 'string';
|
|
55
|
-
const partNumber = isPartNumberRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.partNumber;
|
|
56
|
-
this.externalPartNumber = partNumber;
|
|
57
|
-
try {
|
|
58
|
-
if (!partNumber || partNumber.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 partResponse = isPartNumberRequest ? await partInformation.getPartInformation(this, { scopedTimeoutRef, partNumber, mockData }, headers) : newData;
|
|
72
|
-
if (this.networkTimeoutRef === scopedTimeoutRef) {
|
|
73
|
-
if (!partResponse)
|
|
74
|
-
throw new Error('wrongResponseFormat');
|
|
75
|
-
this.handleSettingData(partResponse);
|
|
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
|
-
console.error(error);
|
|
84
|
-
this.state = 'error';
|
|
85
|
-
this.partInformation = null;
|
|
86
|
-
this.errorMessage = error.message;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
async fetchData(partNumber = this.externalPartNumber, headers = {}) {
|
|
90
|
-
await this.setData(partNumber, headers);
|
|
91
|
-
}
|
|
92
|
-
async loadingListener() {
|
|
93
|
-
if (this.loadingStateChange)
|
|
94
|
-
this.loadingStateChange(this.state.includes('loading'));
|
|
95
|
-
}
|
|
96
|
-
async setMockData(newMockData) {
|
|
97
|
-
mockData = newMockData;
|
|
98
|
-
}
|
|
99
|
-
render() {
|
|
100
|
-
var _a, _b, _c;
|
|
101
|
-
const localName = this.partInformation ? this.localizationName || 'russian' : 'russian';
|
|
102
|
-
const hiddenFields = this.partInformation ? this.hiddenFields.split(',').map(field => field.trim()) || [] : [];
|
|
103
|
-
const manufacturerData = this.partInformation
|
|
104
|
-
? [
|
|
105
|
-
{ label: 'Origin', key: 'origin', value: this.partInformation.tmcPart.origin },
|
|
106
|
-
{ label: 'Warranty Price', key: 'warrantyPrice', value: (_a = this.partInformation.tmcPart.warrantyPrice) === null || _a === void 0 ? void 0 : _a.toFixed(2) },
|
|
107
|
-
{ label: 'Special Price', key: 'specialPrice', value: (_b = this.partInformation.tmcPart.specialPrice) === null || _b === void 0 ? void 0 : _b.toFixed(2) },
|
|
108
|
-
{ label: 'Wholesales Price', key: 'salesPrice', value: (_c = this.partInformation.tmcPart.salesPrice) === null || _c === void 0 ? void 0 : _c.toFixed(2) },
|
|
109
|
-
{ label: 'PNC', key: 'pnc', value: this.partInformation.tmcPart.pnc },
|
|
110
|
-
{ label: `PNC ${general.capitalize(localName)} Name`, key: 'pncLocalName', value: this.partInformation.tmcPart.pncLocalName },
|
|
111
|
-
{ label: 'Bin Code', key: 'binCode', value: this.partInformation.tmcPart.binCode },
|
|
112
|
-
{ label: 'Dimension 1', key: 'dimension1', value: this.partInformation.tmcPart.dimension1 },
|
|
113
|
-
{ label: 'Dimension 2', key: 'dimension2', value: this.partInformation.tmcPart.dimension2 },
|
|
114
|
-
{ label: 'Dimension 3', key: 'dimension3', value: this.partInformation.tmcPart.dimension3 },
|
|
115
|
-
{ label: 'Net Weight', key: 'netWeight', value: this.partInformation.tmcPart.netWeight },
|
|
116
|
-
{ label: 'Gross Weight', key: 'grossWeight', value: this.partInformation.tmcPart.grossWeight },
|
|
117
|
-
{ label: 'Cubic Measure', key: 'cubicMeasure', value: this.partInformation.tmcPart.cubicMeasure },
|
|
118
|
-
{ label: 'HS Code', key: 'hsCode', value: this.partInformation.tmcPart.hsCode },
|
|
119
|
-
{ label: 'UZ HS Code', key: 'uzHsCode', value: this.partInformation.tmcPart.uzHsCode },
|
|
120
|
-
]
|
|
121
|
-
: [];
|
|
122
|
-
const displayedManufacturerData = manufacturerData.filter(part => !hiddenFields.includes(part.key));
|
|
123
|
-
return (index.h(index.Host, { key: '240952c91ef587f359edb5a4d1a56bf460c73802' }, index.h("div", { key: '8e59a7dfcc2f4b04d113c0a865d35e679a68d9ea', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '4996dad1f8281e707cb7bfbc4dbb63b12504e48e' }, index.h(Loading.Loading, { key: 'b22faa9d2e6b31a8225a03725ffe101200c0dd0a', isLoading: this.state.includes('loading') }), index.h("div", { key: '499e795f1721619a42a316d0400ff02a218f6958', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: 'ac7386925ffff92a1c8e3936ff0c817046c1968d', class: "py-[16px]" }, index.h("div", { key: '90510c25179ef9d852b6e5f3ccc641c0bf7ebd30', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.locale.errors.wildCard))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '02d9d4409ec8bb3cab30d91bf42789c59a11bb99' }, index.h("div", { key: '52e64a6ae5be9a057f823aa7390392d9bae84d5b', class: "flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: 'f9f2ec608d422b7ad8c69b5bcb3ce733aaf42e83', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, this.headerTitle), index.h("div", { key: '71fab2926dffdf7272544f82522fcec45cf2139a', class: "px-[30px] py-[10px] flex flex-col gap-[15px]" }, index.h("div", { key: 'ad48f4d4df7207f04b03cb8c7c10445246852230', class: "grid grid-cols-3 gap-[50px]" }, displayedManufacturerData.map(({ label, value, key }) => (index.h("div", { key: key, class: "flex flex-col flex-1" }, index.h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), index.h("div", { class: "py-[10px] px-0" }, value))))))))))))));
|
|
124
|
-
}
|
|
125
|
-
get el() { return index.getElement(this); }
|
|
126
|
-
static get watchers() { return {
|
|
127
|
-
"language": ["changeLanguage"],
|
|
128
|
-
"state": ["loadingListener"]
|
|
129
|
-
}; }
|
|
130
|
-
};
|
|
131
|
-
ManufacturerLookup.style = ManufacturerLookupStyle0;
|
|
132
|
-
|
|
133
|
-
exports.manufacturer_lookup = ManufacturerLookup;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
const getPartInformation = async (component, generalProps, headers = {}) => {
|
|
8
|
-
const { notAvailableMessage, mockData, partNumber, scopedTimeoutRef, middlewareCallback } = generalProps;
|
|
9
|
-
const { isDev, baseUrl, queryString, abortController, networkTimeoutRef, loadedResponse } = component;
|
|
10
|
-
const handleResult = (newPartInformation) => {
|
|
11
|
-
if (networkTimeoutRef === scopedTimeoutRef) {
|
|
12
|
-
if (!newPartInformation && partNumber)
|
|
13
|
-
throw new Error(notAvailableMessage || 'wrongResponseFormat');
|
|
14
|
-
if (loadedResponse)
|
|
15
|
-
loadedResponse(newPartInformation);
|
|
16
|
-
if (middlewareCallback)
|
|
17
|
-
middlewareCallback(newPartInformation);
|
|
18
|
-
return newPartInformation;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
if (isDev) {
|
|
22
|
-
const newData = mockData[partNumber];
|
|
23
|
-
return handleResult(newData);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
if (!baseUrl)
|
|
27
|
-
throw new Error('noBaseUrl');
|
|
28
|
-
const response = await fetch(`${baseUrl}${partNumber}?${queryString}`, { signal: abortController.signal, headers: headers });
|
|
29
|
-
const newData = (await response.json());
|
|
30
|
-
return handleResult(newData);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.getPartInformation = getPartInformation;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
import{c as e,a as n}from"./p-e446fb9d.js";const r=e({wildCard:n().required(),noBaseUrl:n().required(),noServiceAvailable:n().required(),wrongResponseFormat:n().required()}),a=e({authorized:n().required(),unauthorized:n().required(),activeWarranty:n().required(),notActiveWarranty:n().required(),notInvoiced:n().required(),from:n().required(),to:n().required(),pendingSSC:n().required(),noPendingSSC:n().required(),checkingTMC:n().required(),sscCampings:n().required(),sscTableCode:n().required(),sscTableDescription:n().required(),sscTableRepairStatus:n().required(),sscTableOPCode:n().required(),sscTablePartNumber:n().required()}),t=e({vehicleAccessories:n().required(),noData:n().required(),partNumber:n().required(),description:n().required(),image:n().required(),expand:n().required()}),i=e({serviceType:n().required(),activationDate:n().required(),expireDate:n().required(),claimAt:n().required(),redeemingDealer:n().required(),invoiceNumber:n().required(),wip:n().required(),menuCode:n().required(),claim:n().required(),processed:n().required(),expired:n().required(),cancelled:n().required(),pending:n().required(),warning:n().required()}),o=e({vehicleSpecification:n().required(),noData:n().required(),model:n().required(),variant:n().required(),katashiki:n().required(),modelYear:n().required(),sfx:n().required()}),c=e({serviceType:n().required(),name:n().required(),activationDate:n().required(),expireDate:n().required(),menuCode:n().required(),scanTheInvoice:n().required(),processing:n().required(),warning:n().required(),skipServicesWarning:n().required(),confirmSkipServices:n().required(),notInvoiced:n().required(),confirmNotInvoiced:n().required()}),s=e({serviceHistory:n().required(),noData:n().required(),branch:n().required(),dealer:n().required(),invoiceNumber:n().required(),date:n().required(),serviceType:n().required(),odometer:n().required()}),l=e({paintThickness:n().required(),noData:n().required(),part:n().required(),left:n().required(),right:n().required(),noImageGroups:n().required(),expand:n().required()}),u=e({warranty:a,accessories:t,dynamicClaim:i,dynamicRedeem:c,specification:o,serviceHistory:s,paintThickness:l}),p={ar:"ar.json",en:"en.json",ku:"ku.json"},d=e({errors:r,lang:n().required(),language:n().required(),direction:n().required(),vehicleLookup:u});var v=Object.defineProperty;((e,n)=>{for(var r in n)v(e,r,{get:n[r],enumerable:!0})})({},{err:()=>f,map:()=>g,ok:()=>m,unwrap:()=>h,unwrapErr:()=>y});var m=e=>({isOk:!0,isErr:!1,value:e}),f=e=>({isOk:!1,isErr:!0,value:e});function g(e,n){if(e.isOk){const r=n(e.value);return r instanceof Promise?r.then((e=>m(e))):m(r)}if(e.isErr)return f(e.value);throw"should never get here"}var h=e=>{if(e.isOk)return e.value;throw e.value},y=e=>{if(e.isErr)return e.value;throw e.value},b=(e,n,...r)=>{let a=null,t=null,i=null,o=!1,c=!1;const s=[],l=n=>{for(let t=0;t<n.length;t++)a=n[t],Array.isArray(a)?l(a):null!=a&&"boolean"!=typeof a&&((o="function"!=typeof e&&!("object"==(r=typeof(r=a))||"function"===r))&&(a=String(a)),o&&c?s[s.length-1].t+=a:s.push(o?$(null,a):a),c=o);var r};if(l(r),n){n.key&&(t=n.key),n.name&&(i=n.name);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}if("function"==typeof e)return e(null===n?{}:n,s,k);const u=$(e,null);return u.i=n,s.length>0&&(u.o=s),u.l=t,u.u=i,u},$=(e,n)=>({p:0,v:e,t:n,m:null,o:null,i:null,l:null,u:null}),k={forEach:(e,n)=>e.map(w).forEach(n),map:(e,n)=>e.map(w).map(n).map(T)},w=e=>({vattrs:e.i,vchildren:e.o,vkey:e.l,vname:e.u,vtag:e.v,vtext:e.t}),T=e=>{if("function"==typeof e.vtag){const n={...e.vattrs};return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),b(e.vtag,n,...e.vchildren||[])}const n=$(e.vtag,e.vtext);return n.i=e.vattrs,n.o=e.vchildren,n.l=e.vkey,n.u=e.vname,n};const S={},C=async e=>{const n=p[e]||p.en;if(S[n])return await S[n];let r;return r=fetch(`https://cdn.jsdelivr.net/npm/adp-web-components@0.0.34/dist/locales/${n}`).then((e=>e.json())),S[n]=r,await r};export{C as g,b as h,d as l}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by ShiftSoftware
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*/
|
|
5
|
-
import{h as s}from"./p-50896586.js";import{l as e}from"./p-a21e2e2e.js";import{c as i}from"./p-98d9e7ab.js";function t({isLoading:t}){return s("div",{class:i("size-full transition-all z-50 duration-100 flex items-center justify-center pointer-events-none absolute ",{"opacity-0":!t})},s("img",{class:"animate-spin-2s size-[40px]",src:e}))}export{t as L}
|