adp-web-components 0.0.63 → 0.0.65

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 (317) hide show
  1. package/package.json +1 -1
  2. package/dist/cjs/app-globals-4aa8f46f.js +0 -46
  3. package/dist/cjs/cn-f559f9e5.js +0 -2588
  4. package/dist/cjs/contact-us-form.cjs.entry.js +0 -209
  5. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +0 -445
  6. package/dist/cjs/dynamic-claim_6.cjs.entry.js +0 -1154
  7. package/dist/cjs/dynamic-redeem.cjs.entry.js +0 -156
  8. package/dist/cjs/form-dialog_8.cjs.entry.js +0 -503
  9. package/dist/cjs/get-local-language-18a7ccf5.js +0 -2380
  10. package/dist/cjs/index-603d8f32.js +0 -1610
  11. package/dist/cjs/index.cjs.js +0 -6
  12. package/dist/cjs/loader-baf2418b.js +0 -9
  13. package/dist/cjs/loader.cjs.js +0 -19
  14. package/dist/cjs/loading-spinner.cjs.entry.js +0 -27
  15. package/dist/cjs/part-lookup.cjs.entry.js +0 -129
  16. package/dist/cjs/service-booking-form.cjs.entry.js +0 -209
  17. package/dist/cjs/shift-components.cjs.js +0 -29
  18. package/dist/cjs/urls-9077b31c.js +0 -4874
  19. package/dist/cjs/vehicle-lookup.cjs.entry.js +0 -202
  20. package/dist/collection/collection-manifest.json +0 -35
  21. package/dist/collection/components/components/loading-spinner.css +0 -1
  22. package/dist/collection/components/components/loading-spinner.js +0 -47
  23. package/dist/collection/components/form-elements/form-dialog.css +0 -1
  24. package/dist/collection/components/form-elements/form-dialog.js +0 -137
  25. package/dist/collection/components/form-elements/form-input.css +0 -1
  26. package/dist/collection/components/form-elements/form-input.js +0 -323
  27. package/dist/collection/components/form-elements/form-select.css +0 -1
  28. package/dist/collection/components/form-elements/form-select.js +0 -400
  29. package/dist/collection/components/form-elements/form-shadow-input.css +0 -1
  30. package/dist/collection/components/form-elements/form-shadow-input.js +0 -100
  31. package/dist/collection/components/form-elements/form-structure-error.css +0 -1
  32. package/dist/collection/components/form-elements/form-structure-error.js +0 -72
  33. package/dist/collection/components/form-elements/form-structure.css +0 -1
  34. package/dist/collection/components/form-elements/form-structure.js +0 -269
  35. package/dist/collection/components/form-elements/form-submit.css +0 -1
  36. package/dist/collection/components/form-elements/form-submit.js +0 -140
  37. package/dist/collection/components/form-elements/form-text-area.css +0 -1
  38. package/dist/collection/components/form-elements/form-text-area.js +0 -264
  39. package/dist/collection/components/forms/contact-us/element-mapper.js +0 -87
  40. package/dist/collection/components/forms/contact-us/form.css +0 -1
  41. package/dist/collection/components/forms/contact-us/validations.js +0 -19
  42. package/dist/collection/components/forms/contact-us-form.js +0 -280
  43. package/dist/collection/components/forms/service-booking/element-mapper.js +0 -87
  44. package/dist/collection/components/forms/service-booking/form.css +0 -1
  45. package/dist/collection/components/forms/service-booking/validations.js +0 -19
  46. package/dist/collection/components/forms/service-booking-form.js +0 -280
  47. package/dist/collection/components/part-lookup/dead-stock-lookup.css +0 -1
  48. package/dist/collection/components/part-lookup/dead-stock-lookup.js +0 -405
  49. package/dist/collection/components/part-lookup/distributor-lookup.css +0 -1
  50. package/dist/collection/components/part-lookup/distributor-lookup.js +0 -470
  51. package/dist/collection/components/part-lookup/manufacturer-lookup.css +0 -1
  52. package/dist/collection/components/part-lookup/manufacturer-lookup.js +0 -468
  53. package/dist/collection/components/part-lookup/part-lookup.css +0 -1
  54. package/dist/collection/components/part-lookup/part-lookup.js +0 -376
  55. package/dist/collection/components/vehicle-lookup/assets/cancelled.svg +0 -8
  56. package/dist/collection/components/vehicle-lookup/assets/check.svg +0 -4
  57. package/dist/collection/components/vehicle-lookup/assets/expired.svg +0 -9
  58. package/dist/collection/components/vehicle-lookup/assets/loader.svg +0 -11
  59. package/dist/collection/components/vehicle-lookup/assets/pending.svg +0 -9
  60. package/dist/collection/components/vehicle-lookup/assets/processed.svg +0 -9
  61. package/dist/collection/components/vehicle-lookup/assets/x-mark.svg +0 -4
  62. package/dist/collection/components/vehicle-lookup/components/CardsContainer.js +0 -10
  63. package/dist/collection/components/vehicle-lookup/components/Loading.js +0 -10
  64. package/dist/collection/components/vehicle-lookup/components/SSCTable.js +0 -16
  65. package/dist/collection/components/vehicle-lookup/components/StatusCard.js +0 -11
  66. package/dist/collection/components/vehicle-lookup/dynamic-claim.css +0 -1
  67. package/dist/collection/components/vehicle-lookup/dynamic-claim.js +0 -625
  68. package/dist/collection/components/vehicle-lookup/dynamic-redeem.css +0 -1
  69. package/dist/collection/components/vehicle-lookup/dynamic-redeem.js +0 -373
  70. package/dist/collection/components/vehicle-lookup/paint-thickness.css +0 -1
  71. package/dist/collection/components/vehicle-lookup/paint-thickness.js +0 -410
  72. package/dist/collection/components/vehicle-lookup/service-history.css +0 -1
  73. package/dist/collection/components/vehicle-lookup/service-history.js +0 -393
  74. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +0 -1
  75. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +0 -414
  76. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +0 -1
  77. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +0 -405
  78. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +0 -1
  79. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +0 -389
  80. package/dist/collection/components/vehicle-lookup/warranty-details.css +0 -1
  81. package/dist/collection/components/vehicle-lookup/warranty-details.js +0 -780
  82. package/dist/collection/global/api/partInformation.js +0 -32
  83. package/dist/collection/global/api/urls.js +0 -6
  84. package/dist/collection/global/api/vehicleInformation.js +0 -48
  85. package/dist/collection/global/assets/eye.svg +0 -5
  86. package/dist/collection/global/assets/loader.svg +0 -11
  87. package/dist/collection/global/assets/white-loader.svg +0 -11
  88. package/dist/collection/global/lib/cn.js +0 -9
  89. package/dist/collection/global/lib/form-hook.js +0 -162
  90. package/dist/collection/global/lib/general.js +0 -9
  91. package/dist/collection/global/lib/get-local-language.js +0 -20
  92. package/dist/collection/global/lib/image-expansion.js +0 -69
  93. package/dist/collection/global/lib/middleware.js +0 -39
  94. package/dist/collection/global/lib/recaptcha.js +0 -25
  95. package/dist/collection/global/lib/utils.js +0 -7
  96. package/dist/collection/global/lib/validate-form-structure.js +0 -47
  97. package/dist/collection/global/lib/validate-vin.js +0 -62
  98. package/dist/collection/global/types/components.js +0 -1
  99. package/dist/collection/global/types/forms.js +0 -1
  100. package/dist/collection/global/types/general.js +0 -1
  101. package/dist/collection/global/types/locales/error-schema.js +0 -17
  102. package/dist/collection/global/types/locales/forms/contact-us-schema.js +0 -24
  103. package/dist/collection/global/types/locales/forms/index.js +0 -11
  104. package/dist/collection/global/types/locales/general.js +0 -11
  105. package/dist/collection/global/types/locales/index.js +0 -33
  106. package/dist/collection/global/types/locales/inquiryTypes.js +0 -15
  107. package/dist/collection/global/types/locales/part-lookup/dead-stock-schema.js +0 -10
  108. package/dist/collection/global/types/locales/part-lookup/distributor-schema.js +0 -21
  109. package/dist/collection/global/types/locales/part-lookup/index.js +0 -13
  110. package/dist/collection/global/types/locales/part-lookup/manufacturer-schema.js +0 -22
  111. package/dist/collection/global/types/locales/vehicle-lookup/accessories-schema.js +0 -13
  112. package/dist/collection/global/types/locales/vehicle-lookup/dynamic-claim-schema.js +0 -21
  113. package/dist/collection/global/types/locales/vehicle-lookup/dynamic-redeem-schema.js +0 -19
  114. package/dist/collection/global/types/locales/vehicle-lookup/index.js +0 -21
  115. package/dist/collection/global/types/locales/vehicle-lookup/paint-thickness-schema.js +0 -14
  116. package/dist/collection/global/types/locales/vehicle-lookup/service-history-schema.js +0 -15
  117. package/dist/collection/global/types/locales/vehicle-lookup/specification-schema.js +0 -14
  118. package/dist/collection/global/types/locales/vehicle-lookup/warranty-schema.js +0 -23
  119. package/dist/collection/global/types/part-information.js +0 -1
  120. package/dist/collection/global/types/vehicle-information.js +0 -5
  121. package/dist/collection/index.js +0 -1
  122. package/dist/collection/templates/part-lookup/mock-data.js +0 -199
  123. package/dist/collection/templates/vehicle-lookup/mock-data.js +0 -4146
  124. package/dist/collection/templates/vehicle-lookup/vehicle-lookup.js +0 -285
  125. package/dist/collection/templates/vehicle-lookup/warranty-mock-data.js +0 -3000
  126. package/dist/components/contact-us-form.d.ts +0 -11
  127. package/dist/components/contact-us-form.js +0 -5
  128. package/dist/components/dead-stock-lookup.d.ts +0 -11
  129. package/dist/components/dead-stock-lookup.js +0 -5
  130. package/dist/components/distributor-lookup.d.ts +0 -11
  131. package/dist/components/distributor-lookup.js +0 -5
  132. package/dist/components/dynamic-claim.d.ts +0 -11
  133. package/dist/components/dynamic-claim.js +0 -5
  134. package/dist/components/dynamic-redeem.d.ts +0 -11
  135. package/dist/components/dynamic-redeem.js +0 -5
  136. package/dist/components/form-dialog.d.ts +0 -11
  137. package/dist/components/form-dialog.js +0 -5
  138. package/dist/components/form-input.d.ts +0 -11
  139. package/dist/components/form-input.js +0 -5
  140. package/dist/components/form-select.d.ts +0 -11
  141. package/dist/components/form-select.js +0 -5
  142. package/dist/components/form-shadow-input.d.ts +0 -11
  143. package/dist/components/form-shadow-input.js +0 -5
  144. package/dist/components/form-structure-error.d.ts +0 -11
  145. package/dist/components/form-structure-error.js +0 -5
  146. package/dist/components/form-structure.d.ts +0 -11
  147. package/dist/components/form-structure.js +0 -5
  148. package/dist/components/form-submit.d.ts +0 -11
  149. package/dist/components/form-submit.js +0 -5
  150. package/dist/components/form-text-area.d.ts +0 -11
  151. package/dist/components/form-text-area.js +0 -5
  152. package/dist/components/index.d.ts +0 -33
  153. package/dist/components/index.js +0 -5
  154. package/dist/components/loading-spinner.d.ts +0 -11
  155. package/dist/components/loading-spinner.js +0 -5
  156. package/dist/components/manufacturer-lookup.d.ts +0 -11
  157. package/dist/components/manufacturer-lookup.js +0 -5
  158. package/dist/components/p-0470fc51.js +0 -5
  159. package/dist/components/p-0cdfba30.js +0 -5
  160. package/dist/components/p-389eed80.js +0 -5
  161. package/dist/components/p-478117f0.js +0 -5
  162. package/dist/components/p-59e10e25.js +0 -5
  163. package/dist/components/p-69d1c33e.js +0 -5
  164. package/dist/components/p-6ec80da4.js +0 -5
  165. package/dist/components/p-6f732895.js +0 -5
  166. package/dist/components/p-75476014.js +0 -5
  167. package/dist/components/p-8b1d90d7.js +0 -5
  168. package/dist/components/p-8fa24168.js +0 -5
  169. package/dist/components/p-91129e05.js +0 -5
  170. package/dist/components/p-932ff922.js +0 -5
  171. package/dist/components/p-98d9e7ab.js +0 -5
  172. package/dist/components/p-a21e2e2e.js +0 -5
  173. package/dist/components/p-a793dc44.js +0 -5
  174. package/dist/components/p-aa673a70.js +0 -5
  175. package/dist/components/p-bf73c370.js +0 -5
  176. package/dist/components/p-c603ac5e.js +0 -5
  177. package/dist/components/p-cbaa5de0.js +0 -5
  178. package/dist/components/p-d0546e1e.js +0 -5
  179. package/dist/components/p-d43ef8c9.js +0 -5
  180. package/dist/components/p-d5ff7544.js +0 -5
  181. package/dist/components/p-d65dfa98.js +0 -5
  182. package/dist/components/p-d74f3ad8.js +0 -5
  183. package/dist/components/p-eec2a223.js +0 -5
  184. package/dist/components/p-fab97ac7.js +0 -5
  185. package/dist/components/paint-thickness.d.ts +0 -11
  186. package/dist/components/paint-thickness.js +0 -5
  187. package/dist/components/part-lookup.d.ts +0 -11
  188. package/dist/components/part-lookup.js +0 -5
  189. package/dist/components/service-booking-form.d.ts +0 -11
  190. package/dist/components/service-booking-form.js +0 -5
  191. package/dist/components/service-history.d.ts +0 -11
  192. package/dist/components/service-history.js +0 -5
  193. package/dist/components/vehicle-accessories.d.ts +0 -11
  194. package/dist/components/vehicle-accessories.js +0 -5
  195. package/dist/components/vehicle-lookup.d.ts +0 -11
  196. package/dist/components/vehicle-lookup.js +0 -5
  197. package/dist/components/vehicle-specification.d.ts +0 -11
  198. package/dist/components/vehicle-specification.js +0 -5
  199. package/dist/components/warranty-details.d.ts +0 -11
  200. package/dist/components/warranty-details.js +0 -5
  201. package/dist/esm/app-globals-68faa233.js +0 -44
  202. package/dist/esm/cn-cc419b94.js +0 -2586
  203. package/dist/esm/contact-us-form.entry.js +0 -205
  204. package/dist/esm/dead-stock-lookup_3.entry.js +0 -439
  205. package/dist/esm/dynamic-claim_6.entry.js +0 -1145
  206. package/dist/esm/dynamic-redeem.entry.js +0 -152
  207. package/dist/esm/form-dialog_8.entry.js +0 -492
  208. package/dist/esm/get-local-language-40614e53.js +0 -2375
  209. package/dist/esm/index-cac905b0.js +0 -1581
  210. package/dist/esm/index.js +0 -4
  211. package/dist/esm/loader-027b88af.js +0 -7
  212. package/dist/esm/loader.js +0 -15
  213. package/dist/esm/loading-spinner.entry.js +0 -23
  214. package/dist/esm/part-lookup.entry.js +0 -125
  215. package/dist/esm/service-booking-form.entry.js +0 -205
  216. package/dist/esm/shift-components.js +0 -24
  217. package/dist/esm/urls-e22234f9.js +0 -4870
  218. package/dist/esm/vehicle-lookup.entry.js +0 -198
  219. package/dist/index.cjs.js +0 -1
  220. package/dist/index.js +0 -1
  221. package/dist/locales/ar.json +0 -184
  222. package/dist/locales/en.json +0 -184
  223. package/dist/locales/ku.json +0 -184
  224. package/dist/locales/ru.json +0 -184
  225. package/dist/shift-components/index.esm.js +0 -4
  226. package/dist/shift-components/p-116b1698.entry.js +0 -5
  227. package/dist/shift-components/p-227d01ce.entry.js +0 -5
  228. package/dist/shift-components/p-2cf52456.entry.js +0 -5
  229. package/dist/shift-components/p-33561513.entry.js +0 -5
  230. package/dist/shift-components/p-446d908d.js +0 -5
  231. package/dist/shift-components/p-5bbbff4a.entry.js +0 -5
  232. package/dist/shift-components/p-65102e7a.js +0 -6
  233. package/dist/shift-components/p-777ff030.entry.js +0 -5
  234. package/dist/shift-components/p-932ff922.js +0 -5
  235. package/dist/shift-components/p-98d9e7ab.js +0 -5
  236. package/dist/shift-components/p-a21e2e2e.js +0 -5
  237. package/dist/shift-components/p-b131a56e.entry.js +0 -5
  238. package/dist/shift-components/p-c7d01b2c.entry.js +0 -5
  239. package/dist/shift-components/p-eab3606c.js +0 -5
  240. package/dist/shift-components/p-fda56efb.entry.js +0 -5
  241. package/dist/shift-components/shift-components.esm.js +0 -5
  242. package/dist/types/components/components/loading-spinner.d.ts +0 -4
  243. package/dist/types/components/form-elements/form-dialog.d.ts +0 -13
  244. package/dist/types/components/form-elements/form-input.d.ts +0 -28
  245. package/dist/types/components/form-elements/form-select.d.ts +0 -39
  246. package/dist/types/components/form-elements/form-shadow-input.d.ts +0 -9
  247. package/dist/types/components/form-elements/form-structure-error.d.ts +0 -8
  248. package/dist/types/components/form-elements/form-structure.d.ts +0 -23
  249. package/dist/types/components/form-elements/form-submit.d.ts +0 -12
  250. package/dist/types/components/form-elements/form-text-area.d.ts +0 -24
  251. package/dist/types/components/forms/contact-us/element-mapper.d.ts +0 -3
  252. package/dist/types/components/forms/contact-us/validations.d.ts +0 -26
  253. package/dist/types/components/forms/contact-us-form.d.ts +0 -32
  254. package/dist/types/components/forms/service-booking/element-mapper.d.ts +0 -3
  255. package/dist/types/components/forms/service-booking/validations.d.ts +0 -26
  256. package/dist/types/components/forms/service-booking-form.d.ts +0 -32
  257. package/dist/types/components/part-lookup/dead-stock-lookup.d.ts +0 -31
  258. package/dist/types/components/part-lookup/distributor-lookup.d.ts +0 -32
  259. package/dist/types/components/part-lookup/manufacturer-lookup.d.ts +0 -33
  260. package/dist/types/components/part-lookup/part-lookup.d.ts +0 -43
  261. package/dist/types/components/vehicle-lookup/components/CardsContainer.d.ts +0 -10
  262. package/dist/types/components/vehicle-lookup/components/Loading.d.ts +0 -5
  263. package/dist/types/components/vehicle-lookup/components/SSCTable.d.ts +0 -8
  264. package/dist/types/components/vehicle-lookup/components/StatusCard.d.ts +0 -12
  265. package/dist/types/components/vehicle-lookup/dynamic-claim.d.ts +0 -55
  266. package/dist/types/components/vehicle-lookup/dynamic-redeem.d.ts +0 -39
  267. package/dist/types/components/vehicle-lookup/paint-thickness.d.ts +0 -35
  268. package/dist/types/components/vehicle-lookup/service-history.d.ts +0 -30
  269. package/dist/types/components/vehicle-lookup/vehicle-accessories.d.ts +0 -35
  270. package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +0 -53
  271. package/dist/types/components/vehicle-lookup/vehicle-specification.d.ts +0 -29
  272. package/dist/types/components/vehicle-lookup/warranty-details.d.ts +0 -57
  273. package/dist/types/components.d.ts +0 -760
  274. package/dist/types/global/api/partInformation.d.ts +0 -19
  275. package/dist/types/global/api/urls.d.ts +0 -2
  276. package/dist/types/global/api/vehicleInformation.d.ts +0 -33
  277. package/dist/types/global/lib/cn.d.ts +0 -2
  278. package/dist/types/global/lib/form-hook.d.ts +0 -47
  279. package/dist/types/global/lib/general.d.ts +0 -1
  280. package/dist/types/global/lib/get-local-language.d.ts +0 -2
  281. package/dist/types/global/lib/image-expansion.d.ts +0 -9
  282. package/dist/types/global/lib/middleware.d.ts +0 -0
  283. package/dist/types/global/lib/recaptcha.d.ts +0 -16
  284. package/dist/types/global/lib/utils.d.ts +0 -1
  285. package/dist/types/global/lib/validate-form-structure.d.ts +0 -3
  286. package/dist/types/global/lib/validate-vin.d.ts +0 -1
  287. package/dist/types/global/types/components.d.ts +0 -7
  288. package/dist/types/global/types/forms.d.ts +0 -63
  289. package/dist/types/global/types/general.d.ts +0 -23
  290. package/dist/types/global/types/locales/error-schema.d.ts +0 -23
  291. package/dist/types/global/types/locales/forms/contact-us-schema.d.ts +0 -37
  292. package/dist/types/global/types/locales/forms/index.d.ts +0 -45
  293. package/dist/types/global/types/locales/general.d.ts +0 -11
  294. package/dist/types/global/types/locales/index.d.ts +0 -380
  295. package/dist/types/global/types/locales/inquiryTypes.d.ts +0 -19
  296. package/dist/types/global/types/locales/part-lookup/dead-stock-schema.d.ts +0 -9
  297. package/dist/types/global/types/locales/part-lookup/distributor-schema.d.ts +0 -31
  298. package/dist/types/global/types/locales/part-lookup/index.d.ts +0 -79
  299. package/dist/types/global/types/locales/part-lookup/manufacturer-schema.d.ts +0 -33
  300. package/dist/types/global/types/locales/vehicle-lookup/accessories-schema.d.ts +0 -15
  301. package/dist/types/global/types/locales/vehicle-lookup/dynamic-claim-schema.d.ts +0 -31
  302. package/dist/types/global/types/locales/vehicle-lookup/dynamic-redeem-schema.d.ts +0 -27
  303. package/dist/types/global/types/locales/vehicle-lookup/index.d.ts +0 -171
  304. package/dist/types/global/types/locales/vehicle-lookup/paint-thickness-schema.d.ts +0 -17
  305. package/dist/types/global/types/locales/vehicle-lookup/service-history-schema.d.ts +0 -19
  306. package/dist/types/global/types/locales/vehicle-lookup/specification-schema.d.ts +0 -17
  307. package/dist/types/global/types/locales/vehicle-lookup/warranty-schema.d.ts +0 -35
  308. package/dist/types/global/types/part-information.d.ts +0 -53
  309. package/dist/types/global/types/vehicle-information.d.ts +0 -167
  310. package/dist/types/index.d.ts +0 -10
  311. package/dist/types/stencil-public-runtime.d.ts +0 -1680
  312. package/loader/cdn.js +0 -5
  313. package/loader/index.cjs.js +0 -5
  314. package/loader/index.d.ts +0 -24
  315. package/loader/index.es2017.js +0 -5
  316. package/loader/index.js +0 -6
  317. package/loader/package.json +0 -11
@@ -1,468 +0,0 @@
1
- /*!
2
- * Built by ShiftSoftware
3
- * Copyright (c)
4
- */
5
- import { Host, h } from "@stencil/core";
6
- import cn from "../../global/lib/cn";
7
- import { getLocaleLanguage } from "../../global/lib/get-local-language";
8
- import { localeSchema } from "../../global/types/locales/index";
9
- import { getPartInformation } from "../../global/api/partInformation";
10
- let mockData = {};
11
- export class ManufacturerLookup {
12
- constructor() {
13
- this.baseUrl = '';
14
- this.isDev = false;
15
- this.queryString = '';
16
- this.hiddenFields = '';
17
- this.language = 'en';
18
- this.localizationName = '';
19
- this.headerTitle = 'Manufacturer';
20
- this.errorCallback = undefined;
21
- this.loadingStateChange = undefined;
22
- this.loadedResponse = undefined;
23
- this.state = 'idle';
24
- this.errorMessage = null;
25
- this.partInformation = undefined;
26
- this.externalPartNumber = null;
27
- this.locale = localeSchema.getDefault();
28
- }
29
- async componentWillLoad() {
30
- await this.changeLanguage(this.language);
31
- }
32
- async changeLanguage(newLanguage) {
33
- this.locale = await getLocaleLanguage(newLanguage);
34
- }
35
- handleSettingData(response) {
36
- this.partInformation = response;
37
- }
38
- async setData(newData, headers = {}) {
39
- clearTimeout(this.networkTimeoutRef);
40
- if (this.abortController)
41
- this.abortController.abort();
42
- this.abortController = new AbortController();
43
- let scopedTimeoutRef;
44
- const isPartNumberRequest = typeof newData === 'string';
45
- const partNumber = isPartNumberRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.partNumber;
46
- this.externalPartNumber = partNumber;
47
- try {
48
- if (!partNumber || partNumber.trim().length === 0) {
49
- this.state = 'idle';
50
- return;
51
- }
52
- if (this.state === 'data' || this.state === 'error') {
53
- this.state = (this.state + '-loading');
54
- }
55
- else
56
- this.state = 'loading';
57
- await new Promise(r => {
58
- scopedTimeoutRef = setTimeout(r, 700);
59
- this.networkTimeoutRef = scopedTimeoutRef;
60
- });
61
- const partResponse = isPartNumberRequest ? await getPartInformation(this, { scopedTimeoutRef, partNumber, mockData }, headers) : newData;
62
- if (this.networkTimeoutRef === scopedTimeoutRef) {
63
- if (!partResponse)
64
- throw new Error('wrongResponseFormat');
65
- this.handleSettingData(partResponse);
66
- }
67
- this.errorMessage = null;
68
- this.state = 'data';
69
- }
70
- catch (error) {
71
- if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
72
- return;
73
- if (this.errorCallback)
74
- this.errorCallback(error.message);
75
- console.error(error);
76
- this.setErrorMessage(error.message);
77
- }
78
- }
79
- async setErrorMessage(message) {
80
- this.state = 'error';
81
- this.partInformation = null;
82
- this.errorMessage = message;
83
- }
84
- async fetchData(partNumber = this.externalPartNumber, headers = {}) {
85
- await this.setData(partNumber, headers);
86
- }
87
- async loadingListener() {
88
- if (this.loadingStateChange)
89
- this.loadingStateChange(this.state.includes('loading'));
90
- }
91
- async setMockData(newMockData) {
92
- mockData = newMockData;
93
- }
94
- render() {
95
- const texts = this.locale.partLookup.manufacturer;
96
- const localName = this.partInformation ? this.localizationName || 'russian' : 'russian';
97
- const hiddenFields = this.partInformation ? this.hiddenFields.split(',').map(field => field.trim()) || [] : [];
98
- const manufacturerData = this.partInformation
99
- ? [
100
- { label: texts.origin, key: 'origin', value: this.partInformation.origin },
101
- {
102
- label: texts.warrantyPrice,
103
- key: 'warrantyPrice',
104
- value: null,
105
- values: this.partInformation.prices.map(price => {
106
- var _a;
107
- return { header: price === null || price === void 0 ? void 0 : price.countryName, body: (_a = price === null || price === void 0 ? void 0 : price.warrantyPrice) === null || _a === void 0 ? void 0 : _a.formattedValue };
108
- }),
109
- },
110
- { label: texts.specialPrice, key: 'specialPrice', value: null },
111
- { label: texts.wholesalesPrice, key: 'salesPrice', value: null },
112
- { label: texts.pnc, key: 'pnc', value: this.partInformation.pnc },
113
- { label: texts.pncName.replace('$', localName), key: 'pncLocalName', value: this.partInformation.pncLocalName },
114
- { label: texts.binCode, key: 'binCode', value: this.partInformation.binCode },
115
- { label: texts.dimension1, key: 'dimension1', value: this.partInformation.dimension1 },
116
- { label: texts.dimension2, key: 'dimension2', value: this.partInformation.dimension2 },
117
- { label: texts.dimension3, key: 'dimension3', value: this.partInformation.dimension3 },
118
- { label: texts.netWeight, key: 'netWeight', value: this.partInformation.netWeight },
119
- { label: texts.grossWeight, key: 'grossWeight', value: this.partInformation.grossWeight },
120
- { label: texts.cubicMeasure, key: 'cubicMeasure', value: this.partInformation.cubicMeasure },
121
- { label: texts.hsCode, key: 'hsCode', value: this.partInformation.hsCode },
122
- { label: texts.uzHsCode, key: 'uzHsCode', value: this.partInformation.uzHsCode },
123
- ]
124
- : [];
125
- const displayedManufacturerData = manufacturerData.filter(part => !hiddenFields.includes(part.key));
126
- return (h(Host, null, h("div", { dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", null, h("loading-spinner", { isLoading: this.state.includes('loading') }), h("div", { class: cn('transition-all !duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (h("div", { class: "py-[16px] min-h-[100px] flex items-center" }, h("div", { 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) && (h("div", null, h("div", { class: "flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, this.headerTitle), h("div", { class: "px-[30px] py-[10px] flex flex-col gap-[15px]" }, h("div", { class: "grid grid-cols-3 gap-[50px]" }, displayedManufacturerData.map(({ label, value, values, key }) => (h("div", { key: key, class: "flex flex-col flex-1" }, h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), values ? (h("div", null, values
127
- .filter(x => x.body)
128
- .map(x => (h("span", { key: x.header + x.body, class: "inline-flex items-center bg-red-50 text-red-800 text-sm font-medium px-3 py-1 me-1 mt-2 rounded-lg border border-red-300" }, x.header && h("span", { class: "font-semibold" }, x.header, ":"), h("span", { class: "ml-1" }, x.body)))))) : (h("div", { class: "py-[10px] px-0" }, value)))))))))))))));
129
- }
130
- static get is() { return "manufacturer-lookup"; }
131
- static get encapsulation() { return "shadow"; }
132
- static get originalStyleUrls() {
133
- return {
134
- "$": ["manufacturer-lookup.css"]
135
- };
136
- }
137
- static get styleUrls() {
138
- return {
139
- "$": ["manufacturer-lookup.css"]
140
- };
141
- }
142
- static get properties() {
143
- return {
144
- "baseUrl": {
145
- "type": "string",
146
- "mutable": false,
147
- "complexType": {
148
- "original": "string",
149
- "resolved": "string",
150
- "references": {}
151
- },
152
- "required": false,
153
- "optional": false,
154
- "docs": {
155
- "tags": [],
156
- "text": ""
157
- },
158
- "attribute": "base-url",
159
- "reflect": false,
160
- "defaultValue": "''"
161
- },
162
- "isDev": {
163
- "type": "boolean",
164
- "mutable": false,
165
- "complexType": {
166
- "original": "boolean",
167
- "resolved": "boolean",
168
- "references": {}
169
- },
170
- "required": false,
171
- "optional": false,
172
- "docs": {
173
- "tags": [],
174
- "text": ""
175
- },
176
- "attribute": "is-dev",
177
- "reflect": false,
178
- "defaultValue": "false"
179
- },
180
- "queryString": {
181
- "type": "string",
182
- "mutable": false,
183
- "complexType": {
184
- "original": "string",
185
- "resolved": "string",
186
- "references": {}
187
- },
188
- "required": false,
189
- "optional": false,
190
- "docs": {
191
- "tags": [],
192
- "text": ""
193
- },
194
- "attribute": "query-string",
195
- "reflect": false,
196
- "defaultValue": "''"
197
- },
198
- "hiddenFields": {
199
- "type": "string",
200
- "mutable": false,
201
- "complexType": {
202
- "original": "string",
203
- "resolved": "string",
204
- "references": {}
205
- },
206
- "required": false,
207
- "optional": false,
208
- "docs": {
209
- "tags": [],
210
- "text": ""
211
- },
212
- "attribute": "hidden-fields",
213
- "reflect": false,
214
- "defaultValue": "''"
215
- },
216
- "language": {
217
- "type": "string",
218
- "mutable": false,
219
- "complexType": {
220
- "original": "LanguageKeys",
221
- "resolved": "\"ar\" | \"en\" | \"ku\" | \"ru\"",
222
- "references": {
223
- "LanguageKeys": {
224
- "location": "import",
225
- "path": "~types/locales",
226
- "id": "src/global/types/locales/index.ts::LanguageKeys"
227
- }
228
- }
229
- },
230
- "required": false,
231
- "optional": false,
232
- "docs": {
233
- "tags": [],
234
- "text": ""
235
- },
236
- "attribute": "language",
237
- "reflect": false,
238
- "defaultValue": "'en'"
239
- },
240
- "localizationName": {
241
- "type": "string",
242
- "mutable": false,
243
- "complexType": {
244
- "original": "string",
245
- "resolved": "string",
246
- "references": {}
247
- },
248
- "required": false,
249
- "optional": true,
250
- "docs": {
251
- "tags": [],
252
- "text": ""
253
- },
254
- "attribute": "localization-name",
255
- "reflect": false,
256
- "defaultValue": "''"
257
- },
258
- "headerTitle": {
259
- "type": "string",
260
- "mutable": false,
261
- "complexType": {
262
- "original": "string",
263
- "resolved": "string",
264
- "references": {}
265
- },
266
- "required": false,
267
- "optional": false,
268
- "docs": {
269
- "tags": [],
270
- "text": ""
271
- },
272
- "attribute": "header-title",
273
- "reflect": false,
274
- "defaultValue": "'Manufacturer'"
275
- },
276
- "errorCallback": {
277
- "type": "unknown",
278
- "mutable": false,
279
- "complexType": {
280
- "original": "(errorMessage: string) => void",
281
- "resolved": "(errorMessage: string) => void",
282
- "references": {}
283
- },
284
- "required": false,
285
- "optional": false,
286
- "docs": {
287
- "tags": [],
288
- "text": ""
289
- }
290
- },
291
- "loadingStateChange": {
292
- "type": "unknown",
293
- "mutable": false,
294
- "complexType": {
295
- "original": "(isLoading: boolean) => void",
296
- "resolved": "(isLoading: boolean) => void",
297
- "references": {}
298
- },
299
- "required": false,
300
- "optional": true,
301
- "docs": {
302
- "tags": [],
303
- "text": ""
304
- }
305
- },
306
- "loadedResponse": {
307
- "type": "unknown",
308
- "mutable": false,
309
- "complexType": {
310
- "original": "(response: PartInformation) => void",
311
- "resolved": "(response: PartInformation) => void",
312
- "references": {
313
- "PartInformation": {
314
- "location": "import",
315
- "path": "~types/part-information",
316
- "id": "src/global/types/part-information.ts::PartInformation"
317
- }
318
- }
319
- },
320
- "required": false,
321
- "optional": true,
322
- "docs": {
323
- "tags": [],
324
- "text": ""
325
- }
326
- }
327
- };
328
- }
329
- static get states() {
330
- return {
331
- "state": {},
332
- "errorMessage": {},
333
- "partInformation": {},
334
- "externalPartNumber": {},
335
- "locale": {}
336
- };
337
- }
338
- static get methods() {
339
- return {
340
- "setData": {
341
- "complexType": {
342
- "signature": "(newData: PartInformation | string, headers?: any) => Promise<void>",
343
- "parameters": [{
344
- "name": "newData",
345
- "type": "string | PartInformation",
346
- "docs": ""
347
- }, {
348
- "name": "headers",
349
- "type": "any",
350
- "docs": ""
351
- }],
352
- "references": {
353
- "Promise": {
354
- "location": "global",
355
- "id": "global::Promise"
356
- },
357
- "PartInformation": {
358
- "location": "import",
359
- "path": "~types/part-information",
360
- "id": "src/global/types/part-information.ts::PartInformation"
361
- },
362
- "ReturnType": {
363
- "location": "global",
364
- "id": "global::ReturnType"
365
- }
366
- },
367
- "return": "Promise<void>"
368
- },
369
- "docs": {
370
- "text": "",
371
- "tags": []
372
- }
373
- },
374
- "setErrorMessage": {
375
- "complexType": {
376
- "signature": "(message: ErrorKeys) => Promise<void>",
377
- "parameters": [{
378
- "name": "message",
379
- "type": "OptionalKeys<{ wildCard: string; noBaseUrl: string; invalidVin: string; noPartsFound: string; vinNumberRequired: string; wrongFormStructure: string; partNumberRequired: string; noServiceAvailable: string; wrongResponseFormat: string; requestFailedPleaseTryAgainLater: string; }>",
380
- "docs": ""
381
- }],
382
- "references": {
383
- "Promise": {
384
- "location": "global",
385
- "id": "global::Promise"
386
- },
387
- "ErrorKeys": {
388
- "location": "import",
389
- "path": "~types/locales",
390
- "id": "src/global/types/locales/index.ts::ErrorKeys"
391
- }
392
- },
393
- "return": "Promise<void>"
394
- },
395
- "docs": {
396
- "text": "",
397
- "tags": []
398
- }
399
- },
400
- "fetchData": {
401
- "complexType": {
402
- "signature": "(partNumber?: string, headers?: any) => Promise<void>",
403
- "parameters": [{
404
- "name": "partNumber",
405
- "type": "string",
406
- "docs": ""
407
- }, {
408
- "name": "headers",
409
- "type": "any",
410
- "docs": ""
411
- }],
412
- "references": {
413
- "Promise": {
414
- "location": "global",
415
- "id": "global::Promise"
416
- }
417
- },
418
- "return": "Promise<void>"
419
- },
420
- "docs": {
421
- "text": "",
422
- "tags": []
423
- }
424
- },
425
- "setMockData": {
426
- "complexType": {
427
- "signature": "(newMockData: MockJson<PartInformation>) => Promise<void>",
428
- "parameters": [{
429
- "name": "newMockData",
430
- "type": "{ [key: string]: PartInformation; }",
431
- "docs": ""
432
- }],
433
- "references": {
434
- "Promise": {
435
- "location": "global",
436
- "id": "global::Promise"
437
- },
438
- "MockJson": {
439
- "location": "import",
440
- "path": "~types/components",
441
- "id": "src/global/types/components.ts::MockJson"
442
- },
443
- "PartInformation": {
444
- "location": "import",
445
- "path": "~types/part-information",
446
- "id": "src/global/types/part-information.ts::PartInformation"
447
- }
448
- },
449
- "return": "Promise<void>"
450
- },
451
- "docs": {
452
- "text": "",
453
- "tags": []
454
- }
455
- }
456
- };
457
- }
458
- static get elementRef() { return "el"; }
459
- static get watchers() {
460
- return [{
461
- "propName": "language",
462
- "methodName": "changeLanguage"
463
- }, {
464
- "propName": "state",
465
- "methodName": "loadingListener"
466
- }];
467
- }
468
- }
@@ -1 +0,0 @@
1
- *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{display:block}*{font-family:Arial}.static{position:static}.hidden{display:none}.w-full{width:100%}