adp-web-components 0.0.37 → 0.0.40

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 (101) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +31 -13
  2. package/dist/cjs/dynamic-claim_6.cjs.entry.js +73 -37
  3. package/dist/cjs/dynamic-redeem.cjs.entry.js +2 -2
  4. package/dist/cjs/{get-local-language-2acb5afc.js → get-local-language-507f6989.js} +5 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/part-lookup.cjs.entry.js +30 -21
  7. package/dist/cjs/shift-components.cjs.js +1 -1
  8. package/dist/cjs/vehicle-lookup.cjs.entry.js +78 -51
  9. package/dist/collection/components/part-lookup/dead-stock-lookup.js +57 -4
  10. package/dist/collection/components/part-lookup/distributor-lookup.js +51 -4
  11. package/dist/collection/components/part-lookup/manufacturer-lookup.js +51 -4
  12. package/dist/collection/components/part-lookup/part-lookup.js +51 -80
  13. package/dist/collection/components/vehicle-lookup/dynamic-claim.css +1 -1
  14. package/dist/collection/components/vehicle-lookup/dynamic-claim.js +59 -6
  15. package/dist/collection/components/vehicle-lookup/dynamic-redeem.css +1 -1
  16. package/dist/collection/components/vehicle-lookup/paint-thickness.css +1 -1
  17. package/dist/collection/components/vehicle-lookup/paint-thickness.js +59 -6
  18. package/dist/collection/components/vehicle-lookup/service-history.css +1 -1
  19. package/dist/collection/components/vehicle-lookup/service-history.js +57 -4
  20. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  21. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +59 -6
  22. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  23. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +104 -78
  24. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  25. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +57 -4
  26. package/dist/collection/components/vehicle-lookup/warranty-details.css +1 -1
  27. package/dist/collection/components/vehicle-lookup/warranty-details.js +57 -5
  28. package/dist/collection/global/types/locales/error-schema.js +4 -0
  29. package/dist/components/dead-stock-lookup.js +1 -1
  30. package/dist/components/distributor-lookup.js +1 -1
  31. package/dist/components/dynamic-claim.js +1 -1
  32. package/dist/components/dynamic-redeem.js +1 -1
  33. package/dist/components/manufacturer-lookup.js +1 -1
  34. package/dist/components/p-160dece9.js +5 -0
  35. package/dist/components/p-2340ecf4.js +5 -0
  36. package/dist/components/p-2e125a1d.js +5 -0
  37. package/dist/components/p-79893631.js +5 -0
  38. package/dist/components/{p-c20e4190.js → p-85a6b136.js} +1 -1
  39. package/dist/components/p-85d97144.js +5 -0
  40. package/dist/components/p-922ff52c.js +5 -0
  41. package/dist/components/{p-cb6dc5c3.js → p-b3de5ff6.js} +1 -1
  42. package/dist/components/p-ca930569.js +5 -0
  43. package/dist/components/p-e4d1afba.js +5 -0
  44. package/dist/components/p-f37f379d.js +5 -0
  45. package/dist/components/p-f3dd066f.js +5 -0
  46. package/dist/components/paint-thickness.js +1 -1
  47. package/dist/components/part-lookup.js +1 -1
  48. package/dist/components/service-history.js +1 -1
  49. package/dist/components/vehicle-accessories.js +1 -1
  50. package/dist/components/vehicle-lookup.js +1 -1
  51. package/dist/components/vehicle-specification.js +1 -1
  52. package/dist/components/warranty-details.js +1 -1
  53. package/dist/esm/dead-stock-lookup_3.entry.js +31 -13
  54. package/dist/esm/dynamic-claim_6.entry.js +73 -37
  55. package/dist/esm/dynamic-redeem.entry.js +2 -2
  56. package/dist/esm/{get-local-language-883f9a8a.js → get-local-language-fdcb49f6.js} +5 -1
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/part-lookup.entry.js +30 -21
  59. package/dist/esm/shift-components.js +1 -1
  60. package/dist/esm/vehicle-lookup.entry.js +78 -51
  61. package/dist/locales/ar.json +5 -1
  62. package/dist/locales/en.json +5 -1
  63. package/dist/locales/ku.json +6 -2
  64. package/dist/locales/ru.json +109 -105
  65. package/dist/shift-components/{p-5f0b9f41.entry.js → p-363c7e29.entry.js} +1 -1
  66. package/dist/shift-components/p-42575b3f.entry.js +5 -0
  67. package/dist/shift-components/p-52102bc7.entry.js +5 -0
  68. package/dist/shift-components/p-a066b3b3.entry.js +5 -0
  69. package/dist/shift-components/p-cd766b0f.entry.js +5 -0
  70. package/dist/shift-components/p-e9ccc7a9.js +5 -0
  71. package/dist/shift-components/shift-components.esm.js +1 -1
  72. package/dist/types/components/part-lookup/dead-stock-lookup.d.ts +2 -0
  73. package/dist/types/components/part-lookup/distributor-lookup.d.ts +2 -0
  74. package/dist/types/components/part-lookup/manufacturer-lookup.d.ts +2 -0
  75. package/dist/types/components/part-lookup/part-lookup.d.ts +7 -7
  76. package/dist/types/components/vehicle-lookup/dynamic-claim.d.ts +2 -0
  77. package/dist/types/components/vehicle-lookup/paint-thickness.d.ts +2 -0
  78. package/dist/types/components/vehicle-lookup/service-history.d.ts +2 -0
  79. package/dist/types/components/vehicle-lookup/vehicle-accessories.d.ts +2 -0
  80. package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +25 -15
  81. package/dist/types/components/vehicle-lookup/vehicle-specification.d.ts +2 -0
  82. package/dist/types/components/vehicle-lookup/warranty-details.d.ts +2 -0
  83. package/dist/types/components.d.ts +36 -11
  84. package/dist/types/global/types/locales/error-schema.d.ts +8 -0
  85. package/dist/types/global/types/locales/index.d.ts +8 -0
  86. package/package.json +1 -1
  87. package/dist/components/p-09dd6de2.js +0 -5
  88. package/dist/components/p-21dfafba.js +0 -5
  89. package/dist/components/p-2f02d063.js +0 -5
  90. package/dist/components/p-58a3bbc5.js +0 -5
  91. package/dist/components/p-5e80276a.js +0 -5
  92. package/dist/components/p-acbea376.js +0 -5
  93. package/dist/components/p-bfddfd50.js +0 -5
  94. package/dist/components/p-c41b74ea.js +0 -5
  95. package/dist/components/p-c7747b68.js +0 -5
  96. package/dist/components/p-f312b879.js +0 -5
  97. package/dist/shift-components/p-45cc348b.entry.js +0 -5
  98. package/dist/shift-components/p-5e46843c.entry.js +0 -5
  99. package/dist/shift-components/p-954859b9.entry.js +0 -5
  100. package/dist/shift-components/p-c44fe649.js +0 -5
  101. package/dist/shift-components/p-dc33c5ac.entry.js +0 -5
@@ -3,7 +3,7 @@
3
3
  * Copyright (c)
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, g as getElement } from './index-33ae6859.js';
6
- import { l as localeSchema, g as getLocaleLanguage } from './get-local-language-883f9a8a.js';
6
+ import { l as localeSchema, g as getLocaleLanguage } from './get-local-language-fdcb49f6.js';
7
7
  import { c as cn } from './cn-cc419b94.js';
8
8
  import { L as Loading } from './Loading-f4d666ee.js';
9
9
  import './index.esm-46e0cdad.js';
@@ -47,6 +47,7 @@ const DeadStockLookup = class {
47
47
  this.isDev = false;
48
48
  this.queryString = '';
49
49
  this.language = 'en';
50
+ this.errorCallback = undefined;
50
51
  this.loadingStateChange = undefined;
51
52
  this.loadedResponse = undefined;
52
53
  this.state = 'idle';
@@ -99,12 +100,17 @@ const DeadStockLookup = class {
99
100
  catch (error) {
100
101
  if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
101
102
  return;
103
+ if (this.errorCallback)
104
+ this.errorCallback(error.message);
102
105
  console.error(error);
103
- this.state = 'error';
104
- this.partInformation = null;
105
- this.errorMessage = error.message;
106
+ this.setErrorMessage(error.message);
106
107
  }
107
108
  }
109
+ async setErrorMessage(message) {
110
+ this.state = 'error';
111
+ this.partInformation = null;
112
+ this.errorMessage = message;
113
+ }
108
114
  async fetchData(partNumber = this.externalPartNumber, headers = {}) {
109
115
  await this.setData(partNumber, headers);
110
116
  }
@@ -135,7 +141,7 @@ const DeadStockLookup = class {
135
141
  render() {
136
142
  var _a, _b;
137
143
  const texts = this.locale.partLookup.deadStock;
138
- return (h(Host, { key: '9c9f1c28a87f4652d7c612b4e1d001e8d27b23b8' }, h("div", { key: 'f41c7f6f903a2948dcfc1066784eedde1d5eb31b', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '486376da8a09a8478468b534b703f1aa6877d087' }, h(Loading, { key: 'b3131d50da29fbb9e87002abb7b7b20180706ae8', isLoading: this.state.includes('loading') }), h("div", { key: '01999f494cfcba631efd4d7e27a53bc6e2faba21', 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: '1b77813e6f800e211145c6a9d6609eeaf1274565', class: "py-[16px]" }, h("div", { key: 'e5a33de3d2c81a6a811775dac25416a1b39e381c', 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: '99a9dcbf6b724886ac984b44cfd4025d117c2288' }, h("div", { key: 'cd6fae6e527f3066c8e8554b138ad49eb46204b3', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '96a940e531e602c43f4cb5f3fcf57dfe68ace43d', 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 :
144
+ return (h(Host, { key: '8e90f1998fe2184d555e7213065147e2e2403dd1' }, h("div", { key: '774bea05f92f91784c3a96d3f34c332428d3dfb3', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '9a391c96e4f96281d992282871c7538a3d31e42f' }, h(Loading, { key: 'b62445ae1983828a74a62a9ee15cd07a159a9bb1', isLoading: this.state.includes('loading') }), h("div", { key: '939df7c5ee00c70bf0cd2ce6e83cb19eb83c7b5e', 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: 'aeeeb9df8f126abcb5bd654a200f6170843ca25f', class: "py-[16px] min-h-[100px] flex items-center" }, h("div", { key: '746fc041eae5db843e6e0d167ee84571f7b22432', 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: '3e5a6e9ed98698da6ea563e632ba5088f736ea94' }, h("div", { key: 'a292f6441da3999bdb28293bc81b216ad83b6311', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '6a21112d4bd30a512e93668ed1d58c520eeb3f9d', 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 :
139
145
  _b.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))))))))))))))))))));
140
146
  }
141
147
  get el() { return getElement(this); }
@@ -159,6 +165,7 @@ const DistributorLookup = class {
159
165
  this.hiddenFields = '';
160
166
  this.language = 'en';
161
167
  this.localizationName = '';
168
+ this.errorCallback = undefined;
162
169
  this.loadingStateChange = undefined;
163
170
  this.loadedResponse = undefined;
164
171
  this.state = 'idle';
@@ -211,12 +218,17 @@ const DistributorLookup = class {
211
218
  catch (error) {
212
219
  if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
213
220
  return;
221
+ if (this.errorCallback)
222
+ this.errorCallback(error.message);
214
223
  console.error(error);
215
- this.state = 'error';
216
- this.partInformation = null;
217
- this.errorMessage = error.message;
224
+ this.setErrorMessage(error.message);
218
225
  }
219
226
  }
227
+ async setErrorMessage(message) {
228
+ this.state = 'error';
229
+ this.partInformation = null;
230
+ this.errorMessage = message;
231
+ }
220
232
  async fetchData(partNumber = this.externalPartNumber, headers = {}) {
221
233
  await this.setData(partNumber, headers);
222
234
  }
@@ -251,7 +263,7 @@ const DistributorLookup = class {
251
263
  const displayDistributer = this.partInformation
252
264
  ? !this.partInformation.stockParts.some(({ quantityLookUpResult }) => quantityLookUpResult === 'LookupIsSkipped' || quantityLookUpResult === 'QuantityNotWithinLookupThreshold')
253
265
  : false;
254
- return (h(Host, { key: '09133a7bb5a42db9f5e5b3723ae33a843a8e342e' }, h("div", { key: 'e2e688b08f90d1cab2295f2d4393d1e9419f317b', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'e2112b16199ae11bfc349b483c9a7b73c2bcdfa1' }, h(Loading, { key: 'aed1f85f2a0ab6951c865d7d479fedd993517567', isLoading: this.state.includes('loading') }), h("div", { key: 'ba22bfde36558f78878213899a118658baaca3c3', 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: '9ae5d42f1279a410cff1b159134e74129e7d0dee', class: "py-[16px]" }, h("div", { key: '5214e951db368a3579d30e5abb99a7b1cf6a512f', 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: 'a9fda5bbfe8d09e2ee6cd1b41e182b8ec72e926e' }, h("div", { key: '3f272381d298c72674cebf3b01a34237b9b65523', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'da6eef3c067c374842285a516e9facf03c78be62', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.info), h("div", { key: '3a1735beae2f1fb4bd81c14662ffdab0123aac24', class: "py-[10px] px-[30px] flex flex-col gap-[15px]" }, h("div", { key: 'f7559eac1c28c672bbb94f2c60810cf528dd8bd1', class: "grid grid-cols-3 gap-[50px]" }, displayedFields.map(({ label, value, key }) => (h("div", { key: key, class: "flex flex-col flex-1" }, h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), h("div", { class: "py-[10px] px-0" }, value))))))), displayDistributer && (h("div", { key: 'a8e3d1c4f8bf9faa9ff645618f73d5b4022febdd', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '53b59149db9d139d03b8c5e81b83e65b75be2375', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.distributorStock), h("div", { key: '8d067763c50ed0954dfd7df5cb6f281a389fc464', class: "flex flex-col gap-[15px]" }, h("table", { key: 'dca2a62ffe87b34125be2127f29119d691fee208', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'b6a473e22373b8050fc3fc2bdda889feca0b1413', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '8c10ea65fdc411e3345ae367c6ff6176d94c41db' }, [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", { key: 'd93d3b2f8c9240d2a5da9a3aee594ffedd8aed38' }, (_c = this.partInformation) === null || _c === void 0 ? void 0 : _c.stockParts.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]', {
266
+ return (h(Host, { key: 'dfc3c07bae01155268a071ae0f19fb4530dc6d20' }, h("div", { key: 'dc644b6897f5a6b0f097f7b9be229fbee9a3e572', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '0746775729b4a25b8ede7d6bb41c0dbc728a097f' }, h(Loading, { key: '6883aedd91e745b701aecce993e5be98783096b9', isLoading: this.state.includes('loading') }), h("div", { key: '32f514d0acb4642378430384b3d18b3871e1cb9a', 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: '8b261761a5bc1ec3a0b202b48eaabc843be0bcef', class: "py-[16px] min-h-[100px] flex items-center" }, h("div", { key: '9424a160f60d16092caf024f65b383b8bbbb60d9', 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: '2eb2d5a1cb1374650acdac024fda304bb48bf288' }, h("div", { key: 'd8fdd4f615bc201636e3a85d40c71eb651a41f4d', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '2463ab849a17485a676c095cbb85b7f7b5c4cf79', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.info), h("div", { key: '611cecf0f6cc7ec5e96f51421f39b7987e0901a5', class: "py-[10px] px-[30px] flex flex-col gap-[15px]" }, h("div", { key: '47f00102b72741e633e5238f9dc8ae8c37d6c784', class: "grid grid-cols-3 gap-[50px]" }, displayedFields.map(({ label, value, key }) => (h("div", { key: key, class: "flex flex-col flex-1" }, h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), h("div", { class: "py-[10px] px-0" }, value))))))), displayDistributer && (h("div", { key: '4a098c48395263c9ea051d172aa1a1191da22f28', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '86bf538ef1e51bacc2584bbc8d10a51a6e9fc3c7', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, texts.distributorStock), h("div", { key: '30edc53951986417fb89fb1683cf47d42b621a44', class: "flex flex-col gap-[15px]" }, h("table", { key: '8c1e4806387b36e696245451378f7dbf90cdba1f', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '501de449dc19791bc1b4b8d1ba7757b34dd5e0c7', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '5e16d48cf313467d8bbabba7fe8fe32ce3fda2ce' }, [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", { key: 'afe0f26778d5ab571a0aedaee78ed5ee26eac4bd' }, (_c = this.partInformation) === null || _c === void 0 ? void 0 : _c.stockParts.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]', {
255
267
  'text-[green]': stock.quantityLookUpResult === 'Available',
256
268
  'text-[orange]': stock.quantityLookUpResult === 'PartiallyAvailable',
257
269
  }) }, h("strong", null, stock.quantityLookUpResult === 'Available'
@@ -282,6 +294,7 @@ const ManufacturerLookup = class {
282
294
  this.language = 'en';
283
295
  this.localizationName = '';
284
296
  this.headerTitle = 'Manufacturer';
297
+ this.errorCallback = undefined;
285
298
  this.loadingStateChange = undefined;
286
299
  this.loadedResponse = undefined;
287
300
  this.state = 'idle';
@@ -334,12 +347,17 @@ const ManufacturerLookup = class {
334
347
  catch (error) {
335
348
  if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
336
349
  return;
350
+ if (this.errorCallback)
351
+ this.errorCallback(error.message);
337
352
  console.error(error);
338
- this.state = 'error';
339
- this.partInformation = null;
340
- this.errorMessage = error.message;
353
+ this.setErrorMessage(error.message);
341
354
  }
342
355
  }
356
+ async setErrorMessage(message) {
357
+ this.state = 'error';
358
+ this.partInformation = null;
359
+ this.errorMessage = message;
360
+ }
343
361
  async fetchData(partNumber = this.externalPartNumber, headers = {}) {
344
362
  await this.setData(partNumber, headers);
345
363
  }
@@ -375,7 +393,7 @@ const ManufacturerLookup = class {
375
393
  ]
376
394
  : [];
377
395
  const displayedManufacturerData = manufacturerData.filter(part => !hiddenFields.includes(part.key));
378
- return (h(Host, { key: '5c69b7b8b7733d418494240dae97f6012502486c' }, h("div", { key: '8b4149c370dad858347fc9f213d55f56486bd542', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'eeed9658490a9a6612c02a06212e5e47ec92024d' }, h(Loading, { key: '1be320615f026ad166785553b8350bb023e3fc69', isLoading: this.state.includes('loading') }), h("div", { key: '30675b4ea68fc52a436a6b440a8a46188e8c43b1', 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: '42317591e1ddf90a9a66bfb764986ea3c9a3f203', class: "py-[16px]" }, h("div", { key: 'b7318900ef3e39feb04617b455c827efa6dd8819', 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: 'fe116aa9e6cb2b8f0e927e6da55d68f067af594d' }, h("div", { key: 'ff4ee3b9d935ed761897b86418b54962eb16078e', class: "flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '2cf379164e1c82898c0e48565a59f0afa8577f5b', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, this.headerTitle), h("div", { key: '3df9b6ca96d45fd01c44a6b227f0c01d1b23016e', class: "px-[30px] py-[10px] flex flex-col gap-[15px]" }, h("div", { key: '167ea852d54d1e1a60d568dba20330775c5be95e', class: "grid grid-cols-3 gap-[50px]" }, displayedManufacturerData.map(({ label, value, key }) => (h("div", { key: key, class: "flex flex-col flex-1" }, h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), h("div", { class: "py-[10px] px-0" }, value))))))))))))));
396
+ return (h(Host, { key: 'e7a268a4871e4c93e6cfeab933f25709705f7cba' }, h("div", { key: '7439a3fd0d521268c42925d0ecfd19bae55153d2', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'ae5f9644c3dc0ee8c2da994ce2225968d6858663' }, h(Loading, { key: '89cccb47ca737afe725660fe0864af7d055d655e', isLoading: this.state.includes('loading') }), h("div", { key: '7f0f5096f6d1679c74b396660d2855ea53bb9d53', 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: '8e231bbe51763a87a9cf04cf9e2c1de223cfbf0b', class: "py-[16px] min-h-[100px] flex items-center" }, h("div", { key: '57cf99f515a6efcbac913452c4e342f5a5c9432a', 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: 'de201e56f0bf0b8b14bfac50099c85a6dc9f19e1' }, h("div", { key: '7af41614f6e78d7583f6b00aec6f93b91e3118e5', class: "flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '5e64e23bce7be7ab329a4808143730c08a297522', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, this.headerTitle), h("div", { key: '2aa1fb1cad61eb48ab89258f7d1d3a34d50925a6', class: "px-[30px] py-[10px] flex flex-col gap-[15px]" }, h("div", { key: 'd888b93b3230c58106bbd1c132600f3cba3c090b', class: "grid grid-cols-3 gap-[50px]" }, displayedManufacturerData.map(({ label, value, key }) => (h("div", { key: key, class: "flex flex-col flex-1" }, h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), h("div", { class: "py-[10px] px-0" }, value))))))))))))));
379
397
  }
380
398
  get el() { return getElement(this); }
381
399
  static get watchers() { return {