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,439 +0,0 @@
1
- /*!
2
- * Built by ShiftSoftware
3
- * Copyright (c)
4
- */
5
- import { r as registerInstance, h, H as Host, g as getElement } from './index-cac905b0.js';
6
- import { l as localeSchema, g as getLocaleLanguage } from './get-local-language-40614e53.js';
7
- import { c as cn } from './cn-cc419b94.js';
8
-
9
- const getPartInformation = async (component, generalProps, headers = {}) => {
10
- const { notAvailableMessage, mockData, partNumber, scopedTimeoutRef, middlewareCallback } = generalProps;
11
- const { isDev, baseUrl, queryString, abortController, networkTimeoutRef, loadedResponse } = component;
12
- const handleResult = (newPartInformation) => {
13
- if (networkTimeoutRef === scopedTimeoutRef) {
14
- if (!newPartInformation && partNumber)
15
- throw new Error(notAvailableMessage || 'wrongResponseFormat');
16
- if (loadedResponse)
17
- loadedResponse(newPartInformation);
18
- if (middlewareCallback)
19
- middlewareCallback(newPartInformation);
20
- return newPartInformation;
21
- }
22
- };
23
- if (isDev) {
24
- const newData = mockData[partNumber];
25
- return handleResult(newData);
26
- }
27
- else {
28
- if (!baseUrl)
29
- throw new Error('noBaseUrl');
30
- const response = await fetch(`${baseUrl}${partNumber}?${queryString}`, { signal: abortController.signal, headers: headers });
31
- if (response.status === 204)
32
- throw new Error('noPartsFound');
33
- const newData = (await response.json());
34
- return handleResult(newData);
35
- }
36
- };
37
-
38
- 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}.hidden{display:none}.w-full{width:100%}.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}.h-\\[80px\\]{height:80px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.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-center{text-align:center}.text-start{text-align:start}.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-700{transition-duration:.7s!important}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.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%}";
39
- const DeadStockLookupStyle0 = deadStockLookupCss;
40
-
41
- let mockData$2 = {};
42
- const closedAccordionHeight = '46px';
43
- const DeadStockLookup = class {
44
- constructor(hostRef) {
45
- registerInstance(this, hostRef);
46
- this.baseUrl = '';
47
- this.isDev = false;
48
- this.queryString = '';
49
- this.language = 'en';
50
- this.errorCallback = undefined;
51
- this.loadingStateChange = undefined;
52
- this.loadedResponse = undefined;
53
- this.state = 'idle';
54
- this.errorMessage = null;
55
- this.partInformation = undefined;
56
- this.externalPartNumber = null;
57
- this.locale = localeSchema.getDefault();
58
- }
59
- async componentWillLoad() {
60
- await this.changeLanguage(this.language);
61
- }
62
- async changeLanguage(newLanguage) {
63
- this.locale = await getLocaleLanguage(newLanguage);
64
- }
65
- handleSettingData(response) {
66
- this.partInformation = response;
67
- }
68
- async setData(newData, headers = {}) {
69
- clearTimeout(this.networkTimeoutRef);
70
- if (this.abortController)
71
- this.abortController.abort();
72
- this.abortController = new AbortController();
73
- let scopedTimeoutRef;
74
- const isPartNumberRequest = typeof newData === 'string';
75
- const partNumber = isPartNumberRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.partNumber;
76
- this.externalPartNumber = partNumber;
77
- try {
78
- if (!partNumber || partNumber.trim().length === 0) {
79
- this.state = 'idle';
80
- return;
81
- }
82
- if (this.state === 'data' || this.state === 'error') {
83
- this.state = (this.state + '-loading');
84
- }
85
- else
86
- this.state = 'loading';
87
- await new Promise(r => {
88
- scopedTimeoutRef = setTimeout(r, 700);
89
- this.networkTimeoutRef = scopedTimeoutRef;
90
- });
91
- const partResponse = isPartNumberRequest ? await getPartInformation(this, { scopedTimeoutRef, partNumber, mockData: mockData$2 }, headers) : newData;
92
- if (this.networkTimeoutRef === scopedTimeoutRef) {
93
- if (!partResponse)
94
- throw new Error('wrongResponseFormat');
95
- this.handleSettingData(partResponse);
96
- }
97
- this.errorMessage = null;
98
- this.state = 'data';
99
- }
100
- catch (error) {
101
- if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
102
- return;
103
- if (this.errorCallback)
104
- this.errorCallback(error.message);
105
- console.error(error);
106
- this.setErrorMessage(error.message);
107
- }
108
- }
109
- async setErrorMessage(message) {
110
- this.state = 'error';
111
- this.partInformation = null;
112
- this.errorMessage = message;
113
- }
114
- async fetchData(partNumber = this.externalPartNumber, headers = {}) {
115
- await this.setData(partNumber, headers);
116
- }
117
- async loadingListener() {
118
- if (this.loadingStateChange)
119
- this.loadingStateChange(this.state.includes('loading'));
120
- }
121
- async setMockData(newMockData) {
122
- mockData$2 = newMockData;
123
- }
124
- toggleAccordion(event) {
125
- const container = event.target.parentElement;
126
- const icon = container.getElementsByClassName('icon')[0];
127
- const isExpanded = container.getAttribute('aria-expanded') === 'true';
128
- if (isExpanded) {
129
- container.style.height = closedAccordionHeight;
130
- icon.style.transform = 'rotate(0deg)';
131
- container.setAttribute('aria-expanded', 'false');
132
- }
133
- else {
134
- const content = container.getElementsByClassName('content')[0];
135
- const totalHeight = +closedAccordionHeight.replace('px', '') + content.getClientRects()[0].height;
136
- container.style.height = `${totalHeight}px`;
137
- icon.style.transform = 'rotate(180deg)';
138
- container.setAttribute('aria-expanded', 'true');
139
- }
140
- }
141
- render() {
142
- var _a, _b, _c, _d;
143
- const texts = this.locale.partLookup.deadStock;
144
- return (h(Host, { key: '5e8b13df0e9488a502d629040be109c763b6d7b7' }, h("div", { key: '408289169b1eb02445e3d9c976dc6519b10a7f84', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'ede411c5e4f9c3e619ade91e61572ca6dd7f3769' }, h("loading-spinner", { key: '474c37bf4c0301d862b3ea2a8013687edbe8812d', isLoading: this.state.includes('loading') }), h("div", { key: '08a7e2d9e878b8afe75204cbd545451a06aa24ae', 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", { key: 'c47c4f4a8b6095abff802d8911ddfd2f6a4b97a7', class: "py-[16px] min-h-[100px] flex items-center" }, h("div", { key: '82d6810adf12e02cdca6c03137b2eae09ae91649', 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", { key: '1920311b9a4211e4c2adfe129aebb0665cea16c2' }, h("div", { key: '120078a441c18ea54fc04d3e7dd29ba5696f4622', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'fe865f67f92500f36fe9202919da945b3e236e57', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.deadStock), !((_b = (_a = this.partInformation) === null || _a === void 0 ? void 0 : _a.deadStock) === null || _b === void 0 ? void 0 : _b.length) && h("div", { key: '896f528909f45ddbc6cc722748a3181228c5b58c', class: "h-[80px] flex items-center justify-center text-[18px]" }, this.locale.noData), (_d = (_c = this.partInformation) === null || _c === void 0 ? void 0 : _c.deadStock) === null || _d === void 0 ? void 0 :
145
- _d.map(deadStock => (h("div", { key: deadStock.companyIntegrationID, class: "py-[10px] px-[20px]" }, h("div", { "aria-expanded": "false", style: { height: closedAccordionHeight }, class: "border shadow transition-all duration-500 overflow-hidden rounded-md mb-[10px] border-[#d6d8dc]" }, h("button", { onClick: this.toggleAccordion, style: { height: closedAccordionHeight }, class: "w-full flex px-[10px] justify-between items-center text-slate-800" }, h("strong", null, deadStock.companyName), h("span", { class: "icon text-slate-800 transition-transform duration-500" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", class: "size-[22px]" }, 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" })))), h("div", { class: "content" }, h("table", { class: "w-full overflow-auto relative border-collapse" }, h("thead", null, h("tr", null, h("th", { class: "py-[20px] px-[10px] text-start whitespace-nowrap border-b border-[#d6d8dc]" }, texts.branch), h("th", { class: "py-[20px] px-[10px] text-start whitespace-nowrap border-b border-[#d6d8dc]" }, texts.availableQuantity))), h("tbody", null, deadStock === null || deadStock === void 0 ? void 0 : deadStock.branchDeadStock.map(branchDeadStock => (h("tr", { class: "transition-colors border-b border-[#d6d8dc] last:border-none duration-100 hover:bg-slate-100", key: branchDeadStock.companyBranchIntegrationID }, h("td", { class: cn('py-[20px] px-[10px] text-start whitespace-nowrap') }, branchDeadStock.companyBranchName), h("td", { class: cn('py-[20px] px-[10px] text-start whitespace-nowrap') }, h("strong", null, branchDeadStock.quantity))))))))))))))))))));
146
- }
147
- get el() { return getElement(this); }
148
- static get watchers() { return {
149
- "language": ["changeLanguage"],
150
- "state": ["loadingListener"]
151
- }; }
152
- };
153
- DeadStockLookup.style = DeadStockLookupStyle0;
154
-
155
- 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}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.inline-flex{display:inline-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}.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}.rounded-lg{border-radius:.5rem}.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-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/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-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/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-3{padding-left:.75rem;padding-right:.75rem}.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-1{padding-bottom:.25rem;padding-top:.25rem}.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}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.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))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/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-700{transition-duration:.7s!important}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.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%}";
156
- const DistributorLookupStyle0 = distributorLookupCss;
157
-
158
- let mockData$1 = {};
159
- const DistributorLookup = class {
160
- constructor(hostRef) {
161
- registerInstance(this, hostRef);
162
- this.baseUrl = '';
163
- this.isDev = false;
164
- this.queryString = '';
165
- this.hiddenFields = '';
166
- this.language = 'en';
167
- this.localizationName = '';
168
- this.errorCallback = undefined;
169
- this.loadingStateChange = undefined;
170
- this.loadedResponse = undefined;
171
- this.state = 'idle';
172
- this.errorMessage = null;
173
- this.partInformation = undefined;
174
- this.externalPartNumber = null;
175
- this.locale = localeSchema.getDefault();
176
- }
177
- async componentWillLoad() {
178
- await this.changeLanguage(this.language);
179
- }
180
- async changeLanguage(newLanguage) {
181
- this.locale = await getLocaleLanguage(newLanguage);
182
- }
183
- handleSettingData(response) {
184
- this.partInformation = response;
185
- }
186
- async setData(newData, headers = {}) {
187
- clearTimeout(this.networkTimeoutRef);
188
- if (this.abortController)
189
- this.abortController.abort();
190
- this.abortController = new AbortController();
191
- let scopedTimeoutRef;
192
- const isPartNumberRequest = typeof newData === 'string';
193
- const partNumber = isPartNumberRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.partNumber;
194
- this.externalPartNumber = partNumber;
195
- try {
196
- if (!partNumber || partNumber.trim().length === 0) {
197
- this.state = 'idle';
198
- return;
199
- }
200
- if (this.state === 'data' || this.state === 'error') {
201
- this.state = (this.state + '-loading');
202
- }
203
- else
204
- this.state = 'loading';
205
- await new Promise(r => {
206
- scopedTimeoutRef = setTimeout(r, 700);
207
- this.networkTimeoutRef = scopedTimeoutRef;
208
- });
209
- const partResponse = isPartNumberRequest ? await getPartInformation(this, { scopedTimeoutRef, partNumber, mockData: mockData$1 }, headers) : newData;
210
- if (this.networkTimeoutRef === scopedTimeoutRef) {
211
- if (!partResponse)
212
- throw new Error('wrongResponseFormat');
213
- this.handleSettingData(partResponse);
214
- }
215
- this.errorMessage = null;
216
- this.state = 'data';
217
- }
218
- catch (error) {
219
- if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
220
- return;
221
- if (this.errorCallback)
222
- this.errorCallback(error.message);
223
- console.error(error);
224
- this.setErrorMessage(error.message);
225
- }
226
- }
227
- async setErrorMessage(message) {
228
- this.state = 'error';
229
- this.partInformation = null;
230
- this.errorMessage = message;
231
- }
232
- async fetchData(partNumber = this.externalPartNumber, headers = {}) {
233
- await this.setData(partNumber, headers);
234
- }
235
- async loadingListener() {
236
- if (this.loadingStateChange)
237
- this.loadingStateChange(this.state.includes('loading'));
238
- }
239
- async setMockData(newMockData) {
240
- mockData$1 = newMockData;
241
- }
242
- render() {
243
- var _a, _b, _c, _d, _e, _f;
244
- const texts = this.locale.partLookup.distributor;
245
- const localName = this.partInformation ? this.localizationName || 'russian' : 'russian';
246
- const hiddenFields = this.partInformation ? ((_a = this.hiddenFields.split(',')) === null || _a === void 0 ? void 0 : _a.map(field => field.trim())) || [] : [];
247
- const partsInformation = this.partInformation
248
- ? [
249
- { label: texts.description, key: 'partDescription', value: this.partInformation.partDescription },
250
- { label: texts.productGroup, key: 'group', value: this.partInformation.group },
251
- {
252
- label: texts.localDescription.replace('$', localName),
253
- key: 'localDescription',
254
- value: this.partInformation.localDescription,
255
- },
256
- {
257
- label: texts.dealerPurchasePrice,
258
- key: 'purchasePrice',
259
- value: null,
260
- values: (_b = this.partInformation.prices) === null || _b === void 0 ? void 0 : _b.map(price => {
261
- var _a;
262
- return { header: price === null || price === void 0 ? void 0 : price.countryName, body: (_a = price === null || price === void 0 ? void 0 : price.purchasePrice) === null || _a === void 0 ? void 0 : _a.formattedValue };
263
- }),
264
- },
265
- {
266
- label: texts.recommendedRetailPrice,
267
- key: 'retailPrice',
268
- value: null,
269
- values: (_c = this.partInformation.prices) === null || _c === void 0 ? void 0 : _c.map(price => {
270
- var _a;
271
- return { header: price === null || price === void 0 ? void 0 : price.countryName, body: (_a = price === null || price === void 0 ? void 0 : price.retailPrice) === null || _a === void 0 ? void 0 : _a.formattedValue };
272
- }),
273
- },
274
- {
275
- label: texts.supersessions,
276
- key: 'supersededTo',
277
- value: null,
278
- values: (_d = this.partInformation.supersededTo) === null || _d === void 0 ? void 0 : _d.map(part => {
279
- return { header: null, body: part };
280
- }),
281
- },
282
- ]
283
- : [];
284
- const displayedFields = partsInformation.filter(part => !hiddenFields.includes(part.key));
285
- const displayDistributer = this.partInformation
286
- ? !this.partInformation.stockParts.some(({ quantityLookUpResult }) => quantityLookUpResult === 'LookupIsSkipped' || quantityLookUpResult === 'QuantityNotWithinLookupThreshold')
287
- : false;
288
- 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] max-h-[70dvh] 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]" }, texts.info), h("div", { class: "py-[10px] px-[30px] flex flex-col gap-[15px]" }, h("div", { class: "grid grid-cols-3 gap-[50px]" }, displayedFields.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
289
- .filter(x => x.body)
290
- .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)))))))), displayDistributer && (h("div", { class: "flex mt-[12px] max-h-[70dvh] 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]" }, texts.distributorStock), h("div", { class: "flex flex-col gap-[15px]" }, h("table", { class: "w-full overflow-auto relative border-collapse" }, h("thead", { class: "top-0 font-bold sticky bg-white" }, h("tr", null, [texts.location, texts.availability].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", null, (_f = (_e = this.partInformation) === null || _e === void 0 ? void 0 : _e.stockParts) === null || _f === void 0 ? void 0 : _f.map(stock => (h("tr", { class: "transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100", key: stock.locationID }, h("td", { class: cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, stock.locationName), h("td", { class: cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, h("div", { class: cn('text-[red]', {
291
- 'text-[green]': stock.quantityLookUpResult === 'Available',
292
- 'text-[orange]': stock.quantityLookUpResult === 'PartiallyAvailable',
293
- }) }, h("strong", null, stock.quantityLookUpResult === 'Available'
294
- ? texts.available
295
- : stock.quantityLookUpResult === 'PartiallyAvailable'
296
- ? texts.partiallyAvailable
297
- : texts.notAvailable))))))))))))))))));
298
- }
299
- get el() { return getElement(this); }
300
- static get watchers() { return {
301
- "language": ["changeLanguage"],
302
- "state": ["loadingListener"]
303
- }; }
304
- };
305
- DistributorLookup.style = DistributorLookupStyle0;
306
-
307
- 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}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.me-1{margin-inline-end:.25rem}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-\\[40px\\]{height:40px}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.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}.rounded-lg{border-radius:.5rem}.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-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/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-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-3{padding-left:.75rem;padding-right:.75rem}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-1{padding-bottom:.25rem;padding-top:.25rem}.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}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/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-700{transition-duration:.7s!important}.duration-300{transition-duration:.3s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}";
308
- const ManufacturerLookupStyle0 = manufacturerLookupCss;
309
-
310
- let mockData = {};
311
- const ManufacturerLookup = class {
312
- constructor(hostRef) {
313
- registerInstance(this, hostRef);
314
- this.baseUrl = '';
315
- this.isDev = false;
316
- this.queryString = '';
317
- this.hiddenFields = '';
318
- this.language = 'en';
319
- this.localizationName = '';
320
- this.headerTitle = 'Manufacturer';
321
- this.errorCallback = undefined;
322
- this.loadingStateChange = undefined;
323
- this.loadedResponse = undefined;
324
- this.state = 'idle';
325
- this.errorMessage = null;
326
- this.partInformation = undefined;
327
- this.externalPartNumber = null;
328
- this.locale = localeSchema.getDefault();
329
- }
330
- async componentWillLoad() {
331
- await this.changeLanguage(this.language);
332
- }
333
- async changeLanguage(newLanguage) {
334
- this.locale = await getLocaleLanguage(newLanguage);
335
- }
336
- handleSettingData(response) {
337
- this.partInformation = response;
338
- }
339
- async setData(newData, headers = {}) {
340
- clearTimeout(this.networkTimeoutRef);
341
- if (this.abortController)
342
- this.abortController.abort();
343
- this.abortController = new AbortController();
344
- let scopedTimeoutRef;
345
- const isPartNumberRequest = typeof newData === 'string';
346
- const partNumber = isPartNumberRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.partNumber;
347
- this.externalPartNumber = partNumber;
348
- try {
349
- if (!partNumber || partNumber.trim().length === 0) {
350
- this.state = 'idle';
351
- return;
352
- }
353
- if (this.state === 'data' || this.state === 'error') {
354
- this.state = (this.state + '-loading');
355
- }
356
- else
357
- this.state = 'loading';
358
- await new Promise(r => {
359
- scopedTimeoutRef = setTimeout(r, 700);
360
- this.networkTimeoutRef = scopedTimeoutRef;
361
- });
362
- const partResponse = isPartNumberRequest ? await getPartInformation(this, { scopedTimeoutRef, partNumber, mockData }, headers) : newData;
363
- if (this.networkTimeoutRef === scopedTimeoutRef) {
364
- if (!partResponse)
365
- throw new Error('wrongResponseFormat');
366
- this.handleSettingData(partResponse);
367
- }
368
- this.errorMessage = null;
369
- this.state = 'data';
370
- }
371
- catch (error) {
372
- if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
373
- return;
374
- if (this.errorCallback)
375
- this.errorCallback(error.message);
376
- console.error(error);
377
- this.setErrorMessage(error.message);
378
- }
379
- }
380
- async setErrorMessage(message) {
381
- this.state = 'error';
382
- this.partInformation = null;
383
- this.errorMessage = message;
384
- }
385
- async fetchData(partNumber = this.externalPartNumber, headers = {}) {
386
- await this.setData(partNumber, headers);
387
- }
388
- async loadingListener() {
389
- if (this.loadingStateChange)
390
- this.loadingStateChange(this.state.includes('loading'));
391
- }
392
- async setMockData(newMockData) {
393
- mockData = newMockData;
394
- }
395
- render() {
396
- const texts = this.locale.partLookup.manufacturer;
397
- const localName = this.partInformation ? this.localizationName || 'russian' : 'russian';
398
- const hiddenFields = this.partInformation ? this.hiddenFields.split(',').map(field => field.trim()) || [] : [];
399
- const manufacturerData = this.partInformation
400
- ? [
401
- { label: texts.origin, key: 'origin', value: this.partInformation.origin },
402
- {
403
- label: texts.warrantyPrice,
404
- key: 'warrantyPrice',
405
- value: null,
406
- values: this.partInformation.prices.map(price => {
407
- var _a;
408
- 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 };
409
- }),
410
- },
411
- { label: texts.specialPrice, key: 'specialPrice', value: null },
412
- { label: texts.wholesalesPrice, key: 'salesPrice', value: null },
413
- { label: texts.pnc, key: 'pnc', value: this.partInformation.pnc },
414
- { label: texts.pncName.replace('$', localName), key: 'pncLocalName', value: this.partInformation.pncLocalName },
415
- { label: texts.binCode, key: 'binCode', value: this.partInformation.binCode },
416
- { label: texts.dimension1, key: 'dimension1', value: this.partInformation.dimension1 },
417
- { label: texts.dimension2, key: 'dimension2', value: this.partInformation.dimension2 },
418
- { label: texts.dimension3, key: 'dimension3', value: this.partInformation.dimension3 },
419
- { label: texts.netWeight, key: 'netWeight', value: this.partInformation.netWeight },
420
- { label: texts.grossWeight, key: 'grossWeight', value: this.partInformation.grossWeight },
421
- { label: texts.cubicMeasure, key: 'cubicMeasure', value: this.partInformation.cubicMeasure },
422
- { label: texts.hsCode, key: 'hsCode', value: this.partInformation.hsCode },
423
- { label: texts.uzHsCode, key: 'uzHsCode', value: this.partInformation.uzHsCode },
424
- ]
425
- : [];
426
- const displayedManufacturerData = manufacturerData.filter(part => !hiddenFields.includes(part.key));
427
- 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
428
- .filter(x => x.body)
429
- .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)))))))))))))));
430
- }
431
- get el() { return getElement(this); }
432
- static get watchers() { return {
433
- "language": ["changeLanguage"],
434
- "state": ["loadingListener"]
435
- }; }
436
- };
437
- ManufacturerLookup.style = ManufacturerLookupStyle0;
438
-
439
- export { DeadStockLookup as dead_stock_lookup, DistributorLookup as distributor_lookup, ManufacturerLookup as manufacturer_lookup };