adp-web-components 0.0.28 → 0.0.30

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.
Files changed (140) hide show
  1. package/dist/cjs/{Loading-df2a9144.js → Loading-6f4f0127.js} +1 -1
  2. package/dist/cjs/dead-stock-lookup.cjs.entry.js +5 -5
  3. package/dist/cjs/distributor-lookup.cjs.entry.js +5 -5
  4. package/dist/cjs/dynamic-claim_6.cjs.entry.js +129 -94
  5. package/dist/cjs/dynamic-redeem.cjs.entry.js +21 -9
  6. package/dist/cjs/form-input.cjs.entry.js +1 -1
  7. package/dist/cjs/general-inquiry-form.cjs.entry.js +1 -1
  8. package/dist/cjs/get-local-language-42973450.js +153 -0
  9. package/dist/cjs/{index-d2dc29e0.js → index-846c93d2.js} +0 -7
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/manufacturer-lookup.cjs.entry.js +5 -5
  12. package/dist/cjs/{partInformation-07651204.js → partInformation-2b4e0593.js} +1 -1
  13. package/dist/cjs/shift-components.cjs.js +2 -2
  14. package/dist/cjs/vehicle-lookup.cjs.entry.js +6 -5
  15. package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
  16. package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
  17. package/dist/collection/components/part-lookup/manufacturer-lookup.js +2 -2
  18. package/dist/collection/components/vehicle-lookup/components/CardsContainer.js +3 -2
  19. package/dist/collection/components/vehicle-lookup/components/SSCTable.js +3 -2
  20. package/dist/collection/components/vehicle-lookup/components/StatusCard.js +2 -2
  21. package/dist/collection/components/vehicle-lookup/dynamic-claim.css +1 -1
  22. package/dist/collection/components/vehicle-lookup/dynamic-claim.js +53 -13
  23. package/dist/collection/components/vehicle-lookup/dynamic-redeem.css +1 -1
  24. package/dist/collection/components/vehicle-lookup/dynamic-redeem.js +49 -10
  25. package/dist/collection/components/vehicle-lookup/paint-thickness.js +47 -8
  26. package/dist/collection/components/vehicle-lookup/service-history.js +42 -3
  27. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +48 -9
  28. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +44 -19
  29. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +42 -3
  30. package/dist/collection/components/vehicle-lookup/warranty-details.js +13 -13
  31. package/dist/collection/global/api/partInformation.js +1 -1
  32. package/dist/collection/global/api/vehicleInformation.js +2 -2
  33. package/dist/collection/global/lib/get-local-language.js +19 -0
  34. package/dist/collection/global/types/locales/error-schema.js +9 -0
  35. package/dist/collection/global/types/locales/index.js +22 -0
  36. package/dist/collection/global/types/locales/vehicle-lookup/accessories-schema.js +13 -0
  37. package/dist/collection/global/types/locales/vehicle-lookup/dynamic-claim-schema.js +21 -0
  38. package/dist/collection/global/types/locales/vehicle-lookup/dynamic-redeem-schema.js +28 -0
  39. package/dist/collection/global/types/locales/vehicle-lookup/index.js +21 -0
  40. package/dist/collection/global/types/locales/vehicle-lookup/paint-thickness-schema.js +14 -0
  41. package/dist/collection/global/types/locales/vehicle-lookup/service-history-schema.js +15 -0
  42. package/dist/collection/global/types/locales/vehicle-lookup/specification-schema.js +14 -0
  43. package/dist/collection/global/types/locales/vehicle-lookup/warranty-schema.js +23 -0
  44. package/dist/components/dead-stock-lookup.js +1 -1
  45. package/dist/components/distributor-lookup.js +1 -1
  46. package/dist/components/dynamic-claim.js +1 -1
  47. package/dist/components/dynamic-redeem.js +1 -1
  48. package/dist/components/manufacturer-lookup.js +1 -1
  49. package/dist/components/p-0ae60f32.js +5 -0
  50. package/dist/components/{p-c2815a66.js → p-1d80419b.js} +1 -1
  51. package/dist/components/p-1ea3089a.js +5 -0
  52. package/dist/components/p-2e747eb3.js +5 -0
  53. package/dist/components/p-4f99745c.js +5 -0
  54. package/dist/components/{p-c4fad245.js → p-609c2470.js} +1 -1
  55. package/dist/components/p-6c064413.js +5 -0
  56. package/dist/components/p-7360f9b1.js +5 -0
  57. package/dist/components/p-79ea7639.js +5 -0
  58. package/dist/components/p-a21e2e2e.js +5 -0
  59. package/dist/components/p-d466b65f.js +5 -0
  60. package/dist/components/p-eb89583a.js +5 -0
  61. package/dist/components/p-f691e103.js +5 -0
  62. package/dist/components/paint-thickness.js +1 -1
  63. package/dist/components/service-history.js +1 -1
  64. package/dist/components/vehicle-accessories.js +1 -1
  65. package/dist/components/vehicle-lookup.js +1 -1
  66. package/dist/components/vehicle-specification.js +1 -1
  67. package/dist/components/warranty-details.js +1 -1
  68. package/dist/esm/{Loading-3a10eb05.js → Loading-f4d666ee.js} +1 -1
  69. package/dist/esm/dead-stock-lookup.entry.js +5 -5
  70. package/dist/esm/distributor-lookup.entry.js +5 -5
  71. package/dist/esm/dynamic-claim_6.entry.js +127 -92
  72. package/dist/esm/dynamic-redeem.entry.js +21 -9
  73. package/dist/esm/form-input.entry.js +1 -1
  74. package/dist/esm/general-inquiry-form.entry.js +1 -1
  75. package/dist/esm/get-local-language-85ed0b3b.js +150 -0
  76. package/dist/esm/{index-c3d67367.js → index-33ae6859.js} +1 -7
  77. package/dist/esm/loader.js +3 -3
  78. package/dist/esm/manufacturer-lookup.entry.js +5 -5
  79. package/dist/esm/{partInformation-096a8f55.js → partInformation-f40b1fe6.js} +1 -1
  80. package/dist/esm/shift-components.js +3 -3
  81. package/dist/esm/vehicle-lookup.entry.js +6 -5
  82. package/dist/locales/ar.json +101 -1
  83. package/dist/locales/en.json +101 -1
  84. package/dist/locales/ku.json +101 -1
  85. package/dist/shift-components/p-062cd94b.entry.js +5 -0
  86. package/dist/shift-components/p-0e0b69a1.entry.js +5 -0
  87. package/dist/shift-components/p-0f0e54c1.js +6 -0
  88. package/dist/shift-components/p-1de8531d.entry.js +5 -0
  89. package/dist/shift-components/p-2e747eb3.js +5 -0
  90. package/dist/shift-components/{p-02ec4905.entry.js → p-496a721b.entry.js} +1 -1
  91. package/dist/shift-components/{p-0394e29f.entry.js → p-832fd942.entry.js} +1 -1
  92. package/dist/shift-components/p-9120c049.entry.js +5 -0
  93. package/dist/shift-components/{p-89d232e9.js → p-99d314b5.js} +1 -1
  94. package/dist/shift-components/p-c4efbdc3.js +5 -0
  95. package/dist/shift-components/p-d49f73db.entry.js +5 -0
  96. package/dist/shift-components/p-e36c54d0.entry.js +5 -0
  97. package/dist/shift-components/shift-components.esm.js +1 -1
  98. package/dist/types/components/vehicle-lookup/components/CardsContainer.d.ts +3 -1
  99. package/dist/types/components/vehicle-lookup/components/SSCTable.d.ts +3 -1
  100. package/dist/types/components/vehicle-lookup/components/StatusCard.d.ts +3 -1
  101. package/dist/types/components/vehicle-lookup/dynamic-claim.d.ts +10 -5
  102. package/dist/types/components/vehicle-lookup/dynamic-redeem.d.ts +10 -5
  103. package/dist/types/components/vehicle-lookup/paint-thickness.d.ts +6 -1
  104. package/dist/types/components/vehicle-lookup/service-history.d.ts +6 -1
  105. package/dist/types/components/vehicle-lookup/vehicle-accessories.d.ts +6 -1
  106. package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +5 -3
  107. package/dist/types/components/vehicle-lookup/vehicle-specification.d.ts +6 -1
  108. package/dist/types/components/vehicle-lookup/warranty-details.d.ts +4 -4
  109. package/dist/types/components.d.ts +16 -2
  110. package/dist/types/global/lib/get-local-language.d.ts +2 -0
  111. package/dist/types/global/types/locales/error-schema.d.ts +7 -0
  112. package/dist/types/global/types/locales/index.d.ts +220 -0
  113. package/dist/types/global/types/locales/vehicle-lookup/accessories-schema.d.ts +15 -0
  114. package/dist/types/global/types/locales/vehicle-lookup/dynamic-claim-schema.d.ts +31 -0
  115. package/dist/types/global/types/locales/vehicle-lookup/dynamic-redeem-schema.d.ts +45 -0
  116. package/dist/types/global/types/locales/vehicle-lookup/index.d.ts +189 -0
  117. package/dist/types/global/types/locales/vehicle-lookup/paint-thickness-schema.d.ts +17 -0
  118. package/dist/types/global/types/locales/vehicle-lookup/service-history-schema.d.ts +19 -0
  119. package/dist/types/global/types/locales/vehicle-lookup/specification-schema.d.ts +17 -0
  120. package/dist/types/global/types/locales/vehicle-lookup/warranty-schema.d.ts +35 -0
  121. package/package.json +1 -1
  122. package/dist/collection/global/types/locale-schema.js +0 -30
  123. package/dist/components/p-0be9e62f.js +0 -5
  124. package/dist/components/p-0e4c747d.js +0 -5
  125. package/dist/components/p-4f08bcb8.js +0 -5
  126. package/dist/components/p-5f03cbe9.js +0 -5
  127. package/dist/components/p-719499ff.js +0 -5
  128. package/dist/components/p-7aec104e.js +0 -5
  129. package/dist/components/p-a3d447f9.js +0 -5
  130. package/dist/components/p-d07331eb.js +0 -5
  131. package/dist/components/p-ec05b4cd.js +0 -5
  132. package/dist/shift-components/p-1265a8ec.entry.js +0 -5
  133. package/dist/shift-components/p-1f46b4d0.entry.js +0 -5
  134. package/dist/shift-components/p-4f08bcb8.js +0 -5
  135. package/dist/shift-components/p-7a17c535.entry.js +0 -5
  136. package/dist/shift-components/p-9d6b2cfb.entry.js +0 -5
  137. package/dist/shift-components/p-bf83fa95.entry.js +0 -5
  138. package/dist/shift-components/p-d0683e92.entry.js +0 -5
  139. package/dist/shift-components/p-dbaab71c.js +0 -6
  140. package/dist/types/global/types/locale-schema.d.ts +0 -21
@@ -11,11 +11,12 @@ export class VehicleLookup {
11
11
  this.baseUrl = '';
12
12
  this.isDev = false;
13
13
  this.queryString = '';
14
- this.loadingStateChanged = undefined;
14
+ this.language = 'en';
15
+ this.blazorErrorStateListener = '';
15
16
  this.blazorOnLoadingStateChange = '';
16
- this.wrapperErrorState = '';
17
17
  this.errorStateListener = undefined;
18
- this.blazorErrorStateListener = '';
18
+ this.loadingStateChanged = undefined;
19
+ this.wrapperErrorState = '';
19
20
  this.blazorRef = undefined;
20
21
  }
21
22
  async componentDidLoad() {
@@ -94,7 +95,7 @@ export class VehicleLookup {
94
95
  });
95
96
  }
96
97
  render() {
97
- return (h(Host, { key: 'c0ae0086435cd2bfc4a4838223c29796960bbbf6' }, h("div", { key: 'c989c8199a556448887c2018cae79eed02813f46', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-specification' }) }, h("vehicle-specification", { key: 'dc99a0489d6a8c0306cb7aaef7749997553e023b', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'c8a8a7eec552f9fd0234dab9d85df14e43102041', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-accessories' }) }, h("vehicle-accessories", { key: '624acb4beb19b22e82d79250594e350a21e7f8bf', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: '834807eace640d41d904f7511003ede16b2bfc95', class: cn('w-full', { hidden: this.activeElement !== 'warranty-details' }) }, h("warranty-details", { key: 'a74777497db827ce84dcea65823f467af80fa5fa', "show-ssc": "true", "show-warranty": "true", isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }, h("slot", { key: 'c4f0f9387d20481c503d6fe9c38532ede6f71a95' }))), h("div", { key: '33b0b26eb268027789d8d8cecc00247f073a333a', class: cn('w-full', { hidden: this.activeElement !== 'service-history' }) }, h("service-history", { key: '2d4315c0e2091666e4514ce3b24c8f9f3120850c', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: '21620c7e04ade2da21a8d4aee3c28eb1f8d1e8fa', class: cn('w-full', { hidden: this.activeElement !== 'paint-thickness' }) }, h("paint-thickness", { key: '93e0597fbf83490189fa448fd9765b6fa76cf214', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'd5b2313cb8faac74fc9304c1e4c311b766c57259', class: cn('w-full', { hidden: this.activeElement !== 'dynamic-claim' }) }, h("dynamic-claim", { key: '10e9015d5288618f10fd92e5a72774ac0d8a7f59', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }))));
98
+ return (h(Host, { key: '1b02080c791eaabac9cdefc01d99222cc2d74754' }, h("div", { key: '0063278f8b621592ac4242f347f3f17757fdde46', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-specification' }) }, h("vehicle-specification", { key: 'dd2416d8d2765ceeaca2c568d2e8137c8b4f0533', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'db672d3a1dcc4fbb9f859aee47a997163c55cc56', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-accessories' }) }, h("vehicle-accessories", { key: '32a98a8bf3facadbf9a4b4b90f163ffe7ee737de', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'a889c95b168a6dba09f416d1c9b2926abf150098', class: cn('w-full', { hidden: this.activeElement !== 'warranty-details' }) }, h("warranty-details", { key: '7f55dbf1cedd8e867dafb514b1c02a829fd98b9d', language: this.language, isDev: this.isDev, "show-ssc": "true", "show-warranty": "true", "base-url": this.baseUrl, "query-string": this.queryString }, h("slot", { key: 'eb734db1e996237f410070ada9583c6ec2cfafc0' }))), h("div", { key: 'fd4431e0b5f13283ab391e32400ae40f4f0c265c', class: cn('w-full', { hidden: this.activeElement !== 'service-history' }) }, h("service-history", { key: '65879ee4ba28485f9f17816874636f4f157f3567', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'c5129bb7d63c138c770fcce25889860382c1208e', class: cn('w-full', { hidden: this.activeElement !== 'paint-thickness' }) }, h("paint-thickness", { key: 'd75617d35eda2727687c53f2f562f687dbec7acc', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'c9deade0eff8f18b32a4327691f4dc2f01f82848', class: cn('w-full', { hidden: this.activeElement !== 'dynamic-claim' }) }, h("dynamic-claim", { key: '638665a4596224088cffd4d28b43aa86f15dfddc', language: this.language, isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }))));
98
99
  }
99
100
  static get is() { return "vehicle-lookup"; }
100
101
  static get originalStyleUrls() {
@@ -187,20 +188,47 @@ export class VehicleLookup {
187
188
  "reflect": false,
188
189
  "defaultValue": "''"
189
190
  },
190
- "loadingStateChanged": {
191
- "type": "unknown",
191
+ "language": {
192
+ "type": "string",
192
193
  "mutable": false,
193
194
  "complexType": {
194
- "original": "(isLoading: boolean) => void",
195
- "resolved": "(isLoading: boolean) => void",
195
+ "original": "LanguageKeys",
196
+ "resolved": "\"ar\" | \"en\" | \"ku\"",
197
+ "references": {
198
+ "LanguageKeys": {
199
+ "location": "import",
200
+ "path": "~types/locales",
201
+ "id": "src/global/types/locales/index.ts::LanguageKeys"
202
+ }
203
+ }
204
+ },
205
+ "required": false,
206
+ "optional": false,
207
+ "docs": {
208
+ "tags": [],
209
+ "text": ""
210
+ },
211
+ "attribute": "language",
212
+ "reflect": false,
213
+ "defaultValue": "'en'"
214
+ },
215
+ "blazorErrorStateListener": {
216
+ "type": "string",
217
+ "mutable": false,
218
+ "complexType": {
219
+ "original": "string",
220
+ "resolved": "string",
196
221
  "references": {}
197
222
  },
198
223
  "required": false,
199
- "optional": true,
224
+ "optional": false,
200
225
  "docs": {
201
226
  "tags": [],
202
227
  "text": ""
203
- }
228
+ },
229
+ "attribute": "blazor-error-state-listener",
230
+ "reflect": false,
231
+ "defaultValue": "''"
204
232
  },
205
233
  "blazorOnLoadingStateChange": {
206
234
  "type": "string",
@@ -235,23 +263,20 @@ export class VehicleLookup {
235
263
  "text": ""
236
264
  }
237
265
  },
238
- "blazorErrorStateListener": {
239
- "type": "string",
266
+ "loadingStateChanged": {
267
+ "type": "unknown",
240
268
  "mutable": false,
241
269
  "complexType": {
242
- "original": "string",
243
- "resolved": "string",
270
+ "original": "(isLoading: boolean) => void",
271
+ "resolved": "(isLoading: boolean) => void",
244
272
  "references": {}
245
273
  },
246
274
  "required": false,
247
- "optional": false,
275
+ "optional": true,
248
276
  "docs": {
249
277
  "tags": [],
250
278
  "text": ""
251
- },
252
- "attribute": "blazor-error-state-listener",
253
- "reflect": false,
254
- "defaultValue": "''"
279
+ }
255
280
  }
256
281
  };
257
282
  }
@@ -3,22 +3,32 @@
3
3
  * Copyright (c)
4
4
  */
5
5
  import { Host, h } from "@stencil/core";
6
- import Loading from "../components/Loading";
6
+ import { localeSchema } from "../../global/types/locales/index";
7
7
  import cn from "../../global/lib/cn";
8
+ import { getLocaleLanguage } from "../../global/lib/get-local-language";
8
9
  import { getVehicleInformation } from "../../global/api/vehicleInformation";
10
+ import Loading from "../components/Loading";
9
11
  let mockData = {};
10
12
  export class VehicleSpecification {
11
13
  constructor() {
12
14
  this.baseUrl = '';
13
15
  this.isDev = false;
14
16
  this.queryString = '';
17
+ this.language = 'en';
15
18
  this.loadingStateChange = undefined;
16
19
  this.loadedResponse = undefined;
20
+ this.locale = localeSchema.getDefault();
17
21
  this.state = 'idle';
18
22
  this.externalVin = null;
19
23
  this.errorMessage = null;
20
24
  this.vehicleInformation = undefined;
21
25
  }
26
+ async componentWillLoad() {
27
+ await this.changeLanguage(this.language);
28
+ }
29
+ async changeLanguage(newLanguage) {
30
+ this.locale = await getLocaleLanguage(newLanguage);
31
+ }
22
32
  async setData(newData, headers = {}) {
23
33
  clearTimeout(this.networkTimeoutRef);
24
34
  if (this.abortController)
@@ -45,7 +55,7 @@ export class VehicleSpecification {
45
55
  const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
46
56
  if (this.networkTimeoutRef === scopedTimeoutRef) {
47
57
  if (!vehicleResponse)
48
- throw new Error('Wrong response format');
58
+ throw new Error('wrongResponseFormat');
49
59
  this.vehicleInformation = vehicleResponse;
50
60
  }
51
61
  this.errorMessage = null;
@@ -71,7 +81,8 @@ export class VehicleSpecification {
71
81
  }
72
82
  render() {
73
83
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
74
- return (h(Host, { key: 'e96ba82b8f58b3812bfb539e6e20020635d17c13' }, h("div", { key: '65896e18a4b328b657dc7ae37506f3f090be58ef', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '85b32b58705d8ede8161f4bf429e4eea2eeab113' }, h(Loading, { key: '102144466024234e3b3d67f40a2ed613d8decb8f', isLoading: this.state.includes('loading') }), h("div", { key: 'ea3201bce6b9471c1c1b3cf2336bb4d3d820345a', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '063a8e9ae6202a207ee9e03bb8e21c8d269f105f', class: cn('text-center pt-[4px] text-[20px]', { 'text-red-600': !!this.errorMessage }) }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '5b6e0c8f594a4609ebe476e39c607ddd16221c2a', class: "py-4" }, h("div", { key: 'cd11ab7ea9c2b17b870bce21b793b06707b729ea', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '9afcbe4ffc5e11f39c2ff6f284d2f0b6b9f24df4', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '324be66504bbe49d03d3e777d5fa5b14c8129975', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Specifications"), h("div", { key: '0875021cb9dcf017b98d516e5898c05b5803a1ba', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && h("div", { key: '9132eb142b5f67fbb5310936bfba4517174eafcf', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!((_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.vehicleSpecification) && (h("table", { key: 'ed324bef37bc05379b5bf9f7c2e86b9a45ec732e', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '1fc091f01a228617523d213dcdf295368f875279', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '308569c58472d2680c5e7b9ed444d0e7360948f5' }, ['Model', 'Variant', 'Katashiki', 'Model Year', 'SFX'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: '9d44d2b25f0cd37603d10d4632c1adf78cbaabeb' }, h("tr", { key: 'ce399b783d636d8f7e4cb5dac62ef08ca0e2383c' }, h("td", { key: '2f3fdaac2635377722caea73a05d097686606cb7', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_e = (_d = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.vehicleVariantInfo) === null || _e === void 0 ? void 0 : _e.modelCode) || '...', " ", h("br", { key: 'f7b14609c4be0a16414311c9c42f594f37bf9a5d', class: "my-2" }), ((_g = (_f = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _f === void 0 ? void 0 : _f.vehicleSpecification) === null || _g === void 0 ? void 0 : _g.modelDesc) || '...'), h("td", { key: 'a20ed93430b4d33734e068b4495623ea0cbc1872', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_j = (_h = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _h === void 0 ? void 0 : _h.identifiers) === null || _j === void 0 ? void 0 : _j.variant) || '...', " ", h("br", { key: '8b77dac46b0161eca0b5d1806f643d72d787b821' }), ((_l = (_k = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _k === void 0 ? void 0 : _k.vehicleSpecification) === null || _l === void 0 ? void 0 : _l.variantDesc) || '...'), ['identifiers.katashiki', 'vehicleVariantInfo.modelYear', 'vehicleVariantInfo.sfx'].map(infoPath => {
84
+ const texts = this.locale.vehicleLookup.specification;
85
+ return (h(Host, { key: '610f4bab084478eb7f60133ed6498fc6b53a6844' }, h("div", { key: '5d25c90dd19ae1fdf84d6484881b3fceeada61c4', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'bd3643977e70e46e86b7516a9407679209a7d4fa' }, h(Loading, { key: '9064190a3698c0534e36e8bc018bbaec3b08709a', isLoading: this.state.includes('loading') }), h("div", { key: '56426c064d0a0b1273f62e78b64cca65020c72c8', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: 'ec8f12b6d2372053c097a057ba71d072d75e4fdc', class: cn('text-center pt-[4px] text-[20px]', { 'text-red-600': !!this.errorMessage }) }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '285ac738ecc896feeda7caf81f8a41c9a99cea19', class: "py-4" }, h("div", { key: 'a29855571fcc97bc19f3196427fdf67d9cadb501', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.locale.errors[this.errorMessage] || this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '021f7bb6c6a1c9b44ebc112c48e4789aca7d387c', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '43e4399b5064de1023a8e3d27fdd2632f75b3338', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.vehicleSpecification), h("div", { key: 'f0fa3e15cb9336be3a4061821438d82d9e73587c', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && h("div", { key: '12d0257e9d94573a09fecda9c4fcc3e093c08f16', class: "h-[80px] flex items-center justify-center text-[18px]" }, texts.noData), !!((_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.vehicleSpecification) && (h("table", { key: 'ecc72141ecfb0b1ca2eeb4825eb6c90119089395', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '01eeb96a4dc8c721d720f34b535cc1b917c53b3a', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '956677dd3a6a94a4fec8d9d784567aa3fdd62a16' }, ['model', 'variant', 'katashiki', 'modelYear', 'sfx'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, texts[title]))))), h("tbody", { key: 'e62c17cb6047d082191913821426e6e1e928d9fc' }, h("tr", { key: '71a09174b51e10d070723c00b8db14499707bdc3' }, h("td", { key: '6fd71363e86b19311907a42348cee324e4137e43', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_e = (_d = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.vehicleVariantInfo) === null || _e === void 0 ? void 0 : _e.modelCode) || '...', " ", h("br", { key: '759a2b9072f60aa917a001b39b91e38fc91e4b5a', class: "my-2" }), ((_g = (_f = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _f === void 0 ? void 0 : _f.vehicleSpecification) === null || _g === void 0 ? void 0 : _g.modelDesc) || '...'), h("td", { key: '3c634e53ec8955bcf1af66667a6fe004d6e46f01', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_j = (_h = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _h === void 0 ? void 0 : _h.identifiers) === null || _j === void 0 ? void 0 : _j.variant) || '...', " ", h("br", { key: 'b81065d744067f06f60e6b34e31f219c6c58d373' }), ((_l = (_k = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _k === void 0 ? void 0 : _k.vehicleSpecification) === null || _l === void 0 ? void 0 : _l.variantDesc) || '...'), ['identifiers.katashiki', 'vehicleVariantInfo.modelYear', 'vehicleVariantInfo.sfx'].map(infoPath => {
75
86
  var _a;
76
87
  const [place, field] = infoPath.split('.');
77
88
  const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
@@ -146,6 +157,30 @@ export class VehicleSpecification {
146
157
  "reflect": false,
147
158
  "defaultValue": "''"
148
159
  },
160
+ "language": {
161
+ "type": "string",
162
+ "mutable": false,
163
+ "complexType": {
164
+ "original": "LanguageKeys",
165
+ "resolved": "\"ar\" | \"en\" | \"ku\"",
166
+ "references": {
167
+ "LanguageKeys": {
168
+ "location": "import",
169
+ "path": "~types/locales",
170
+ "id": "src/global/types/locales/index.ts::LanguageKeys"
171
+ }
172
+ }
173
+ },
174
+ "required": false,
175
+ "optional": false,
176
+ "docs": {
177
+ "tags": [],
178
+ "text": ""
179
+ },
180
+ "attribute": "language",
181
+ "reflect": false,
182
+ "defaultValue": "'en'"
183
+ },
149
184
  "loadingStateChange": {
150
185
  "type": "unknown",
151
186
  "mutable": false,
@@ -186,6 +221,7 @@ export class VehicleSpecification {
186
221
  }
187
222
  static get states() {
188
223
  return {
224
+ "locale": {},
189
225
  "state": {},
190
226
  "externalVin": {},
191
227
  "errorMessage": {},
@@ -289,6 +325,9 @@ export class VehicleSpecification {
289
325
  static get elementRef() { return "el"; }
290
326
  static get watchers() {
291
327
  return [{
328
+ "propName": "language",
329
+ "methodName": "changeLanguage"
330
+ }, {
292
331
  "propName": "state",
293
332
  "methodName": "loadingListener"
294
333
  }];
@@ -3,14 +3,15 @@
3
3
  * Copyright (c)
4
4
  */
5
5
  import { Host, h } from "@stencil/core";
6
+ import Loader from "~assets/loader.svg";
6
7
  import Loading from "./components/Loading";
8
+ import SSCTable from "./components/SSCTable";
7
9
  import StatusCard from "./components/StatusCard";
8
- import Loader from "~assets/loader.svg";
9
10
  import CardsContainer from "./components/CardsContainer";
10
- import SSCTable from "./components/SSCTable";
11
11
  import cn from "../../global/lib/cn";
12
+ import { getLocaleLanguage } from "../../global/lib/get-local-language";
13
+ import { localeSchema } from "../../global/types/locales/index";
12
14
  import { getVehicleInformation } from "../../global/api/vehicleInformation";
13
- import { getLocaleLanguage, localeSchema } from "../../global/types/locale-schema";
14
15
  let mockData = {};
15
16
  export class WarrantyDetails {
16
17
  constructor() {
@@ -38,8 +39,8 @@ export class WarrantyDetails {
38
39
  this.loadedResponse = undefined;
39
40
  this.state = 'idle';
40
41
  this.externalVin = null;
41
- this.errorMessage = null;
42
42
  this.showRecaptcha = false;
43
+ this.errorMessage = null;
43
44
  this.unInvoicedByBrokerName = null;
44
45
  this.vehicleInformation = undefined;
45
46
  this.checkingUnauthorizedSSC = false;
@@ -89,7 +90,7 @@ export class WarrantyDetails {
89
90
  const hasPendingSSC = Math.random() < 0.5 ? false : true;
90
91
  this.recaptchaRes = {
91
92
  hasSSC: hasPendingSSC,
92
- message: hasPendingSSC ? 'This Vehicle has a Pending SSC' : 'No Pending SSC',
93
+ message: hasPendingSSC ? 'pendingSSC' : 'noPendingSSC',
93
94
  };
94
95
  }
95
96
  else {
@@ -106,11 +107,11 @@ export class WarrantyDetails {
106
107
  const hasPendingSSC = vinResponse.sscLookupStatus === 1;
107
108
  this.recaptchaRes = {
108
109
  hasSSC: hasPendingSSC,
109
- message: hasPendingSSC ? 'This Vehicle has a Pending SSC' : 'No Pending SSC',
110
+ message: hasPendingSSC ? 'pendingSSC' : 'noPendingSSC',
110
111
  };
111
112
  }
112
113
  else
113
- throw new Error('Wrong response format');
114
+ throw new Error('wrongResponseFormat');
114
115
  }
115
116
  }
116
117
  }, 500);
@@ -149,7 +150,7 @@ export class WarrantyDetails {
149
150
  const vehicleResponse = isVinRequest ? await getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }, headers) : newData;
150
151
  if (this.networkTimeoutRef === scopedTimeoutRef) {
151
152
  if (!vehicleResponse)
152
- throw new Error('Wrong response format');
153
+ throw new Error('wrongResponseFormat');
153
154
  this.handleSettingData(vehicleResponse);
154
155
  this.handleInitializingRecaptcha(vin, scopedTimeoutRef);
155
156
  }
@@ -186,8 +187,7 @@ export class WarrantyDetails {
186
187
  }
187
188
  render() {
188
189
  var _a, _b, _c, _d, _e;
189
- console.log(this.locale);
190
- return (h(Host, { key: '107fdd1914182bc92f08bef60b7d953f48edaa64' }, h("div", { key: 'a58b0fd297b467b8bf9faac26d9649adbdd5c6f6', class: "min-h-[100px] warranty" }, h("div", { key: '4861d917e549d3f78938bcaf9571dae9b9250fff' }, h(Loading, { key: '990a985d814ad3a7bd8a91c2d60921eb119658cd', isLoading: this.state.includes('loading') }), h("div", { key: 'd0a1dd92a087381bd66b9ac12124c1b308e32d03', class: "transition duration-700", style: { transform: this.state.includes('loading') || this.state === 'idle' ? 'scale(0)' : 'scale(1)', opacity: this.state.includes('loading') ? '0' : '1' } }, (this.showSsc || this.showWarranty) && (h("div", { key: 'bfe59e8e9288320ffd640062ff03dcfff246b769', style: { color: !!this.errorMessage ? 'red' : 'black' }, class: "warranty-vin" }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin)), ['error', 'error-loading'].includes(this.state) && (h("div", { key: 'bd13d1459c2728c4c23feb874188706162bf2fc4', class: "py-4" }, h(StatusCard, { key: '2a771e9cdc0e50b2c63cef87e2385a04076385de', desc: this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (h(CardsContainer, { key: '8fa4f9fd5ec9c5f13fc888ed07bb818aae86b153', isAuthorized: (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.isAuthorized, unInvoicedByBrokerName: this.unInvoicedByBrokerName, warranty: (_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.warranty })), h("div", { key: '2887905725bb330be348b01acd63a8b55e639ebf', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, h("slot", { key: 'e4b03e64b1352eb9945ff98a0f3ef602cc83b613' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (h("div", { key: '282103798c40a2865808ade5f6b6700921796dba', class: cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.recaptchaRes.message)), this.checkingUnauthorizedSSC && (h("div", { key: '6a90ca1739b59538b1d9a9cdf70fa176d8085d94', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, h("div", { key: '295bc8963dcbb628983d9e4ae40b7c6e9e830f36' }, h("strong", { key: '400e68401cce287fd1ba55279dc9d43896393863' }, "Checking TMC")), h("img", { key: '10c057c2dd74570ba7e691226df8b0cbc0ac68af', class: "spin", src: Loader }))), this.showSsc && ['data', 'data-loading'].includes(this.state) && ((_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.ssc) !== null && !!((_e = this.vehicleInformation) === null || _e === void 0 ? void 0 : _e.ssc.length) && (h(SSCTable, { key: '677f72b4d1e357536c71989803b5104191972935', ssc: this.vehicleInformation.ssc })))))));
190
+ return (h(Host, { key: '5976b28e5ddc465d0ae79b7882d40b4f7105ffdf' }, h("div", { key: '1c5623799b6fbfb7a343a78c6b96b027f4416d10', dir: this.locale.direction, class: "min-h-[100px] warranty" }, h("div", { key: '5dde3a2e0886f5ececd0e8d556abef41d167942d' }, h(Loading, { key: '7f8b0a8ed8b2f07fbbc2e7d5a5162ae7aca02a14', isLoading: this.state.includes('loading') }), h("div", { key: '240a44eefa85d905e3bf1900772524e4a660feca', class: "transition duration-700", style: { transform: this.state.includes('loading') || this.state === 'idle' ? 'scale(0)' : 'scale(1)', opacity: this.state.includes('loading') ? '0' : '1' } }, (this.showSsc || this.showWarranty) && (h("div", { key: '3d7488bbd306a360094636adc2732cf00aa4b877', style: { color: !!this.errorMessage ? 'red' : 'black' }, class: "warranty-vin" }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin)), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '8f186a25db18cd00449ce68cf7261870b7996dc7', class: "py-4" }, h(StatusCard, { key: '5de5ac8872b809ef344440b6bc9fad956c744620', desc: this.locale.errors[this.errorMessage] || this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (h(CardsContainer, { key: 'df36bf0f0e4906b662d11a3db6cf7cd40dabbae9', locale: this.locale, isAuthorized: (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.isAuthorized, unInvoicedByBrokerName: this.unInvoicedByBrokerName, warranty: (_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.warranty })), h("div", { key: '00d93ce17bfc3868709d67a74fa80983e5e9d312', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, h("slot", { key: 'b3cb909a47adb872390d3afca1c6eefd167d1b01' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (h("div", { key: '067dacd8f980da721272ffc03a15d6b5740580d9', class: cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.locale.vehicleLookup.warranty[this.recaptchaRes.message])), this.checkingUnauthorizedSSC && (h("div", { key: '36564f7464cea7804439f58397b84d5554e19dd1', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, h("div", { key: '92d1d9d3141f719a67e47e7187e65af814b93aa9' }, h("strong", { key: 'd93a6f157cd67de2fe8c93cf50c84aa6ba143a87' }, this.locale.vehicleLookup.warranty.checkingTMC)), h("img", { key: 'bb95bb4cc9f3d9dd5d1cf0a3f68f4af86a56b6d2', class: "spin", src: Loader }))), this.showSsc && ['data', 'data-loading'].includes(this.state) && ((_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.ssc) !== null && !!((_e = this.vehicleInformation) === null || _e === void 0 ? void 0 : _e.ssc.length) && (h(SSCTable, { key: '02190f90bcf06693545848545013353e99baad12', locale: this.locale, ssc: this.vehicleInformation.ssc })))))));
191
191
  }
192
192
  static get is() { return "warranty-details"; }
193
193
  static get encapsulation() { return "shadow"; }
@@ -302,8 +302,8 @@ export class WarrantyDetails {
302
302
  "references": {
303
303
  "LanguageKeys": {
304
304
  "location": "import",
305
- "path": "~types/locale-schema",
306
- "id": "src/global/types/locale-schema.ts::LanguageKeys"
305
+ "path": "~types/locales",
306
+ "id": "src/global/types/locales/index.ts::LanguageKeys"
307
307
  }
308
308
  }
309
309
  },
@@ -611,8 +611,8 @@ export class WarrantyDetails {
611
611
  return {
612
612
  "state": {},
613
613
  "externalVin": {},
614
- "errorMessage": {},
615
614
  "showRecaptcha": {},
615
+ "errorMessage": {},
616
616
  "unInvoicedByBrokerName": {},
617
617
  "vehicleInformation": {},
618
618
  "checkingUnauthorizedSSC": {},
@@ -8,7 +8,7 @@ export const getPartInformation = async (component, generalProps, headers = {})
8
8
  const handleResult = (newPartInformation) => {
9
9
  if (networkTimeoutRef === scopedTimeoutRef) {
10
10
  if (!newPartInformation && partNumber)
11
- throw new Error(notAvailableMessage || 'Wrong response format');
11
+ throw new Error(notAvailableMessage || 'wrongResponseFormat');
12
12
  if (loadedResponse)
13
13
  loadedResponse(newPartInformation);
14
14
  if (middlewareCallback)
@@ -13,7 +13,7 @@ const vehicleRequestHeaders = {
13
13
  cityIntegrationId: 'City-Integration-Id',
14
14
  brandIntegrationId: 'Brand-Integration-Id',
15
15
  companyIntegrationId: 'Company-Integration-Id',
16
- companyBranchIntegrationId: 'Company-Branch-Integration-Id'
16
+ companyBranchIntegrationId: 'Company-Branch-Integration-Id',
17
17
  };
18
18
  export const getVehicleInformation = async (component, generalProps, headers = {}) => {
19
19
  const { notAvailableMessage, mockData, vin, scopedTimeoutRef, middlewareCallback } = generalProps;
@@ -21,7 +21,7 @@ export const getVehicleInformation = async (component, generalProps, headers = {
21
21
  const handleResult = (newVehicleInformation) => {
22
22
  if (networkTimeoutRef === scopedTimeoutRef) {
23
23
  if (!newVehicleInformation && vin)
24
- throw new Error(notAvailableMessage || 'Wrong response format');
24
+ throw new Error(notAvailableMessage || 'wrongResponseFormat');
25
25
  if (loadedResponse)
26
26
  loadedResponse(newVehicleInformation);
27
27
  if (middlewareCallback)
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { Build } from "@stencil/core";
6
+ import { languageMapper } from "../types/locales/index";
7
+ const cachedLocales = {};
8
+ export const getLocaleLanguage = async (fileKey) => {
9
+ const languageFile = languageMapper[fileKey] || languageMapper.en;
10
+ if (cachedLocales[languageFile])
11
+ return await cachedLocales[languageFile];
12
+ let localeResponse;
13
+ if (Build.isDev)
14
+ localeResponse = fetch('../../locales/' + languageFile).then(res => res.json());
15
+ else
16
+ localeResponse = fetch('https://cdn.jsdelivr.net/npm/adp-web-components@latest/dist/locales/' + languageFile).then(res => res.json());
17
+ cachedLocales[languageFile] = localeResponse;
18
+ return await localeResponse;
19
+ };
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const errorsSchema = object({
7
+ noServiceAvailable: string().required(),
8
+ wrongResponseFormat: string().required(),
9
+ });
@@ -0,0 +1,22 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ import { errorsSchema } from "./error-schema";
7
+ import { vehicleLookupSchema } from "./vehicle-lookup";
8
+ export const ARABIC_JSON_FILE = 'ar.json';
9
+ export const ENGLISH_JSON_FILE = 'en.json';
10
+ export const KURDISH_JSON_FILE = 'ku.json';
11
+ export const languageMapper = {
12
+ ar: ARABIC_JSON_FILE,
13
+ en: ENGLISH_JSON_FILE,
14
+ ku: KURDISH_JSON_FILE,
15
+ };
16
+ export const localeSchema = object({
17
+ errors: errorsSchema,
18
+ lang: string().required(),
19
+ language: string().required(),
20
+ direction: string().required(),
21
+ vehicleLookup: vehicleLookupSchema,
22
+ });
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const accessoriesSchema = object({
7
+ vehicleAccessories: string().required(),
8
+ noData: string().required(),
9
+ partNumber: string().required(),
10
+ description: string().required(),
11
+ image: string().required(),
12
+ expand: string().required(),
13
+ });
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const dynamicClaimSchema = object({
7
+ serviceType: string().required(),
8
+ activationDate: string().required(),
9
+ expireDate: string().required(),
10
+ claimAt: string().required(),
11
+ redeemingDealer: string().required(),
12
+ invoiceNumber: string().required(),
13
+ wip: string().required(),
14
+ menuCode: string().required(),
15
+ claim: string().required(),
16
+ processed: string().required(),
17
+ expired: string().required(),
18
+ cancelled: string().required(),
19
+ pending: string().required(),
20
+ warning: string().required(),
21
+ });
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const dynamicRedeemSchema = object({
7
+ serviceType: string().required(),
8
+ name: string().required(),
9
+ activationDate: string().required(),
10
+ expireDate: string().required(),
11
+ menuCode: string().required(),
12
+ scanTheInvoice: string().required(),
13
+ processing: string().required(),
14
+ warning: string().required(),
15
+ skipServicesWarning: string().required(),
16
+ confirmSkipServices: string().required(),
17
+ notInvoiced: string().required(),
18
+ confirmNotInvoiced: string().required(),
19
+ claimAt: string().required(),
20
+ redeemingDealer: string().required(),
21
+ invoiceNumber: string().required(),
22
+ wip: string().required(),
23
+ claim: string().required(),
24
+ processed: string().required(),
25
+ expired: string().required(),
26
+ cancelled: string().required(),
27
+ pending: string().required(),
28
+ });
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object } from "yup";
6
+ import { warrantySchema } from "./warranty-schema";
7
+ import { accessoriesSchema } from "./accessories-schema";
8
+ import { dynamicClaimSchema } from "./dynamic-claim-schema";
9
+ import { specificationSchema } from "./specification-schema";
10
+ import { dynamicRedeemSchema } from "./dynamic-redeem-schema";
11
+ import { ServiceHistorySchema } from "./service-history-schema";
12
+ import { paintThicknessSchema } from "./paint-thickness-schema";
13
+ export const vehicleLookupSchema = object({
14
+ warranty: warrantySchema,
15
+ accessories: accessoriesSchema,
16
+ dynamicClaim: dynamicClaimSchema,
17
+ dynamicRedeem: dynamicRedeemSchema,
18
+ specification: specificationSchema,
19
+ serviceHistory: ServiceHistorySchema,
20
+ paintThickness: paintThicknessSchema,
21
+ });
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const paintThicknessSchema = object({
7
+ paintThickness: string().required(),
8
+ noData: string().required(),
9
+ part: string().required(),
10
+ left: string().required(),
11
+ right: string().required(),
12
+ noImageGroups: string().required(),
13
+ expand: string().required(),
14
+ });
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const ServiceHistorySchema = object({
7
+ serviceHistory: string().required(),
8
+ noData: string().required(),
9
+ branch: string().required(),
10
+ dealer: string().required(),
11
+ invoiceNumber: string().required(),
12
+ date: string().required(),
13
+ serviceType: string().required(),
14
+ odometer: string().required(),
15
+ });
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const specificationSchema = object({
7
+ vehicleSpecification: string().required(),
8
+ noData: string().required(),
9
+ model: string().required(),
10
+ variant: string().required(),
11
+ katashiki: string().required(),
12
+ modelYear: string().required(),
13
+ sfx: string().required(),
14
+ });
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { object, string } from "yup";
6
+ export const warrantySchema = object({
7
+ authorized: string().required(),
8
+ unauthorized: string().required(),
9
+ activeWarranty: string().required(),
10
+ notActiveWarranty: string().required(),
11
+ notInvoiced: string().required(),
12
+ from: string().required(),
13
+ to: string().required(),
14
+ pendingSSC: string().required(),
15
+ noPendingSSC: string().required(),
16
+ checkingTMC: string().required(),
17
+ sscCampings: string().required(),
18
+ sscTableCode: string().required(),
19
+ sscTableDescription: string().required(),
20
+ sscTableRepairStatus: string().required(),
21
+ sscTableOPCode: string().required(),
22
+ sscTablePartNumber: string().required(),
23
+ });