adp-web-components 0.0.38 → 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 (102) 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-f00a474e.js → get-local-language-507f6989.js} +2 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/part-lookup.cjs.entry.js +16 -10
  7. package/dist/cjs/shift-components.cjs.js +1 -1
  8. package/dist/cjs/vehicle-lookup.cjs.entry.js +17 -11
  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 +15 -9
  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 +15 -9
  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 +1 -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-85a6b136.js +5 -0
  39. package/dist/components/p-85d97144.js +5 -0
  40. package/dist/components/p-922ff52c.js +5 -0
  41. package/dist/components/{p-6864b1ac.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-e7d50e27.js → get-local-language-fdcb49f6.js} +2 -1
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/part-lookup.entry.js +16 -10
  59. package/dist/esm/shift-components.js +1 -1
  60. package/dist/esm/vehicle-lookup.entry.js +17 -11
  61. package/dist/locales/ar.json +2 -1
  62. package/dist/locales/en.json +2 -1
  63. package/dist/locales/ku.json +2 -1
  64. package/dist/locales/ru.json +109 -108
  65. package/dist/shift-components/{p-4a8040d3.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 +2 -1
  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 +2 -1
  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 +29 -2
  84. package/dist/types/global/types/locales/error-schema.d.ts +2 -0
  85. package/dist/types/global/types/locales/index.d.ts +2 -0
  86. package/package.json +1 -1
  87. package/dist/components/p-090b8654.js +0 -5
  88. package/dist/components/p-0c62815e.js +0 -5
  89. package/dist/components/p-0c9d5b37.js +0 -5
  90. package/dist/components/p-14226c5e.js +0 -5
  91. package/dist/components/p-1f28a457.js +0 -5
  92. package/dist/components/p-2bd0fee5.js +0 -5
  93. package/dist/components/p-33d15f6d.js +0 -5
  94. package/dist/components/p-b75f830a.js +0 -5
  95. package/dist/components/p-c39f97a1.js +0 -5
  96. package/dist/components/p-ea183aab.js +0 -5
  97. package/dist/components/p-ed4f329d.js +0 -5
  98. package/dist/shift-components/p-14a050bc.entry.js +0 -5
  99. package/dist/shift-components/p-5a0e7724.entry.js +0 -5
  100. package/dist/shift-components/p-7222df1f.entry.js +0 -5
  101. package/dist/shift-components/p-8f42bfca.js +0 -5
  102. package/dist/shift-components/p-f1acc1fb.entry.js +0 -5
@@ -7,7 +7,7 @@
7
7
  Object.defineProperty(exports, '__esModule', { value: true });
8
8
 
9
9
  const index = require('./index-846c93d2.js');
10
- const getLocalLanguage = require('./get-local-language-f00a474e.js');
10
+ const getLocalLanguage = require('./get-local-language-507f6989.js');
11
11
  const cn = require('./cn-f559f9e5.js');
12
12
  const Loading = require('./Loading-6f4f0127.js');
13
13
  require('./index.esm-c628daeb.js');
@@ -51,6 +51,7 @@ const DeadStockLookup = class {
51
51
  this.isDev = false;
52
52
  this.queryString = '';
53
53
  this.language = 'en';
54
+ this.errorCallback = undefined;
54
55
  this.loadingStateChange = undefined;
55
56
  this.loadedResponse = undefined;
56
57
  this.state = 'idle';
@@ -103,12 +104,17 @@ const DeadStockLookup = class {
103
104
  catch (error) {
104
105
  if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
105
106
  return;
107
+ if (this.errorCallback)
108
+ this.errorCallback(error.message);
106
109
  console.error(error);
107
- this.state = 'error';
108
- this.partInformation = null;
109
- this.errorMessage = error.message;
110
+ this.setErrorMessage(error.message);
110
111
  }
111
112
  }
113
+ async setErrorMessage(message) {
114
+ this.state = 'error';
115
+ this.partInformation = null;
116
+ this.errorMessage = message;
117
+ }
112
118
  async fetchData(partNumber = this.externalPartNumber, headers = {}) {
113
119
  await this.setData(partNumber, headers);
114
120
  }
@@ -139,7 +145,7 @@ const DeadStockLookup = class {
139
145
  render() {
140
146
  var _a, _b;
141
147
  const texts = this.locale.partLookup.deadStock;
142
- return (index.h(index.Host, { key: '9c9f1c28a87f4652d7c612b4e1d001e8d27b23b8' }, index.h("div", { key: 'f41c7f6f903a2948dcfc1066784eedde1d5eb31b', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '486376da8a09a8478468b534b703f1aa6877d087' }, index.h(Loading.Loading, { key: 'b3131d50da29fbb9e87002abb7b7b20180706ae8', isLoading: this.state.includes('loading') }), index.h("div", { key: '01999f494cfcba631efd4d7e27a53bc6e2faba21', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: '1b77813e6f800e211145c6a9d6609eeaf1274565', class: "py-[16px]" }, index.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) && (index.h("div", { key: '99a9dcbf6b724886ac984b44cfd4025d117c2288' }, index.h("div", { key: 'cd6fae6e527f3066c8e8554b138ad49eb46204b3', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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 :
148
+ return (index.h(index.Host, { key: '8e90f1998fe2184d555e7213065147e2e2403dd1' }, index.h("div", { key: '774bea05f92f91784c3a96d3f34c332428d3dfb3', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '9a391c96e4f96281d992282871c7538a3d31e42f' }, index.h(Loading.Loading, { key: 'b62445ae1983828a74a62a9ee15cd07a159a9bb1', isLoading: this.state.includes('loading') }), index.h("div", { key: '939df7c5ee00c70bf0cd2ce6e83cb19eb83c7b5e', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: 'aeeeb9df8f126abcb5bd654a200f6170843ca25f', class: "py-[16px] min-h-[100px] flex items-center" }, index.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) && (index.h("div", { key: '3e5a6e9ed98698da6ea563e632ba5088f736ea94' }, index.h("div", { key: 'a292f6441da3999bdb28293bc81b216ad83b6311', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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 :
143
149
  _b.map(deadStock => (index.h("div", { key: deadStock.companyIntegrationID, class: "py-[10px] px-[20px]" }, index.h("div", { "aria-expanded": "false", style: { height: closedAccordionHeight }, class: "border shadow transition-all duration-500 overflow-hidden rounded-md mb-[10px] border-[#d6d8dc]" }, index.h("button", { onClick: this.toggleAccordion, style: { height: closedAccordionHeight }, class: "w-full flex px-[10px] justify-between items-center text-slate-800" }, index.h("strong", null, deadStock.companyName), index.h("span", { class: "icon text-slate-800 transition-transform duration-500" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", class: "size-[22px]" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z" })))), index.h("div", { class: "content" }, index.h("table", { class: "w-full overflow-auto relative border-collapse" }, index.h("thead", null, index.h("tr", null, index.h("th", { class: "py-[20px] px-[10px] text-start whitespace-nowrap border-b border-[#d6d8dc]" }, texts.branch), index.h("th", { class: "py-[20px] px-[10px] text-start whitespace-nowrap border-b border-[#d6d8dc]" }, texts.availableQuantity))), index.h("tbody", null, deadStock === null || deadStock === void 0 ? void 0 : deadStock.branchDeadStock.map(branchDeadStock => (index.h("tr", { class: "transition-colors border-b border-[#d6d8dc] last:border-none duration-100 hover:bg-slate-100", key: branchDeadStock.companyBranchIntegrationID }, index.h("td", { class: cn.cn('py-[20px] px-[10px] text-start whitespace-nowrap') }, branchDeadStock.companyBranchName), index.h("td", { class: cn.cn('py-[20px] px-[10px] text-start whitespace-nowrap') }, index.h("strong", null, branchDeadStock.quantity))))))))))))))))))));
144
150
  }
145
151
  get el() { return index.getElement(this); }
@@ -163,6 +169,7 @@ const DistributorLookup = class {
163
169
  this.hiddenFields = '';
164
170
  this.language = 'en';
165
171
  this.localizationName = '';
172
+ this.errorCallback = undefined;
166
173
  this.loadingStateChange = undefined;
167
174
  this.loadedResponse = undefined;
168
175
  this.state = 'idle';
@@ -215,12 +222,17 @@ const DistributorLookup = class {
215
222
  catch (error) {
216
223
  if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
217
224
  return;
225
+ if (this.errorCallback)
226
+ this.errorCallback(error.message);
218
227
  console.error(error);
219
- this.state = 'error';
220
- this.partInformation = null;
221
- this.errorMessage = error.message;
228
+ this.setErrorMessage(error.message);
222
229
  }
223
230
  }
231
+ async setErrorMessage(message) {
232
+ this.state = 'error';
233
+ this.partInformation = null;
234
+ this.errorMessage = message;
235
+ }
224
236
  async fetchData(partNumber = this.externalPartNumber, headers = {}) {
225
237
  await this.setData(partNumber, headers);
226
238
  }
@@ -255,7 +267,7 @@ const DistributorLookup = class {
255
267
  const displayDistributer = this.partInformation
256
268
  ? !this.partInformation.stockParts.some(({ quantityLookUpResult }) => quantityLookUpResult === 'LookupIsSkipped' || quantityLookUpResult === 'QuantityNotWithinLookupThreshold')
257
269
  : false;
258
- return (index.h(index.Host, { key: '09133a7bb5a42db9f5e5b3723ae33a843a8e342e' }, index.h("div", { key: 'e2e688b08f90d1cab2295f2d4393d1e9419f317b', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: 'e2112b16199ae11bfc349b483c9a7b73c2bcdfa1' }, index.h(Loading.Loading, { key: 'aed1f85f2a0ab6951c865d7d479fedd993517567', isLoading: this.state.includes('loading') }), index.h("div", { key: 'ba22bfde36558f78878213899a118658baaca3c3', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: '9ae5d42f1279a410cff1b159134e74129e7d0dee', class: "py-[16px]" }, index.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) && (index.h("div", { key: 'a9fda5bbfe8d09e2ee6cd1b41e182b8ec72e926e' }, index.h("div", { key: '3f272381d298c72674cebf3b01a34237b9b65523', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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), index.h("div", { key: '3a1735beae2f1fb4bd81c14662ffdab0123aac24', class: "py-[10px] px-[30px] flex flex-col gap-[15px]" }, index.h("div", { key: 'f7559eac1c28c672bbb94f2c60810cf528dd8bd1', class: "grid grid-cols-3 gap-[50px]" }, displayedFields.map(({ label, value, key }) => (index.h("div", { key: key, class: "flex flex-col flex-1" }, index.h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), index.h("div", { class: "py-[10px] px-0" }, value))))))), displayDistributer && (index.h("div", { key: 'a8e3d1c4f8bf9faa9ff645618f73d5b4022febdd', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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), index.h("div", { key: '8d067763c50ed0954dfd7df5cb6f281a389fc464', class: "flex flex-col gap-[15px]" }, index.h("table", { key: 'dca2a62ffe87b34125be2127f29119d691fee208', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: 'b6a473e22373b8050fc3fc2bdda889feca0b1413', class: "top-0 font-bold sticky bg-white" }, index.h("tr", { key: '8c10ea65fdc411e3345ae367c6ff6176d94c41db' }, [texts.location, texts.availability].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: 'd93d3b2f8c9240d2a5da9a3aee594ffedd8aed38' }, (_c = this.partInformation) === null || _c === void 0 ? void 0 : _c.stockParts.map(stock => (index.h("tr", { class: "transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100", key: stock.locationID }, index.h("td", { class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, stock.locationName), index.h("td", { class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, index.h("div", { class: cn.cn('text-[red]', {
270
+ return (index.h(index.Host, { key: 'dfc3c07bae01155268a071ae0f19fb4530dc6d20' }, index.h("div", { key: 'dc644b6897f5a6b0f097f7b9be229fbee9a3e572', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '0746775729b4a25b8ede7d6bb41c0dbc728a097f' }, index.h(Loading.Loading, { key: '6883aedd91e745b701aecce993e5be98783096b9', isLoading: this.state.includes('loading') }), index.h("div", { key: '32f514d0acb4642378430384b3d18b3871e1cb9a', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: '8b261761a5bc1ec3a0b202b48eaabc843be0bcef', class: "py-[16px] min-h-[100px] flex items-center" }, index.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) && (index.h("div", { key: '2eb2d5a1cb1374650acdac024fda304bb48bf288' }, index.h("div", { key: 'd8fdd4f615bc201636e3a85d40c71eb651a41f4d', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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), index.h("div", { key: '611cecf0f6cc7ec5e96f51421f39b7987e0901a5', class: "py-[10px] px-[30px] flex flex-col gap-[15px]" }, index.h("div", { key: '47f00102b72741e633e5238f9dc8ae8c37d6c784', class: "grid grid-cols-3 gap-[50px]" }, displayedFields.map(({ label, value, key }) => (index.h("div", { key: key, class: "flex flex-col flex-1" }, index.h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), index.h("div", { class: "py-[10px] px-0" }, value))))))), displayDistributer && (index.h("div", { key: '4a098c48395263c9ea051d172aa1a1191da22f28', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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), index.h("div", { key: '30edc53951986417fb89fb1683cf47d42b621a44', class: "flex flex-col gap-[15px]" }, index.h("table", { key: '8c1e4806387b36e696245451378f7dbf90cdba1f', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: '501de449dc19791bc1b4b8d1ba7757b34dd5e0c7', class: "top-0 font-bold sticky bg-white" }, index.h("tr", { key: '5e16d48cf313467d8bbabba7fe8fe32ce3fda2ce' }, [texts.location, texts.availability].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: 'afe0f26778d5ab571a0aedaee78ed5ee26eac4bd' }, (_c = this.partInformation) === null || _c === void 0 ? void 0 : _c.stockParts.map(stock => (index.h("tr", { class: "transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100", key: stock.locationID }, index.h("td", { class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, stock.locationName), index.h("td", { class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, index.h("div", { class: cn.cn('text-[red]', {
259
271
  'text-[green]': stock.quantityLookUpResult === 'Available',
260
272
  'text-[orange]': stock.quantityLookUpResult === 'PartiallyAvailable',
261
273
  }) }, index.h("strong", null, stock.quantityLookUpResult === 'Available'
@@ -286,6 +298,7 @@ const ManufacturerLookup = class {
286
298
  this.language = 'en';
287
299
  this.localizationName = '';
288
300
  this.headerTitle = 'Manufacturer';
301
+ this.errorCallback = undefined;
289
302
  this.loadingStateChange = undefined;
290
303
  this.loadedResponse = undefined;
291
304
  this.state = 'idle';
@@ -338,12 +351,17 @@ const ManufacturerLookup = class {
338
351
  catch (error) {
339
352
  if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
340
353
  return;
354
+ if (this.errorCallback)
355
+ this.errorCallback(error.message);
341
356
  console.error(error);
342
- this.state = 'error';
343
- this.partInformation = null;
344
- this.errorMessage = error.message;
357
+ this.setErrorMessage(error.message);
345
358
  }
346
359
  }
360
+ async setErrorMessage(message) {
361
+ this.state = 'error';
362
+ this.partInformation = null;
363
+ this.errorMessage = message;
364
+ }
347
365
  async fetchData(partNumber = this.externalPartNumber, headers = {}) {
348
366
  await this.setData(partNumber, headers);
349
367
  }
@@ -379,7 +397,7 @@ const ManufacturerLookup = class {
379
397
  ]
380
398
  : [];
381
399
  const displayedManufacturerData = manufacturerData.filter(part => !hiddenFields.includes(part.key));
382
- return (index.h(index.Host, { key: '5c69b7b8b7733d418494240dae97f6012502486c' }, index.h("div", { key: '8b4149c370dad858347fc9f213d55f56486bd542', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: 'eeed9658490a9a6612c02a06212e5e47ec92024d' }, index.h(Loading.Loading, { key: '1be320615f026ad166785553b8350bb023e3fc69', isLoading: this.state.includes('loading') }), index.h("div", { key: '30675b4ea68fc52a436a6b440a8a46188e8c43b1', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: '42317591e1ddf90a9a66bfb764986ea3c9a3f203', class: "py-[16px]" }, index.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) && (index.h("div", { key: 'fe116aa9e6cb2b8f0e927e6da55d68f067af594d' }, index.h("div", { key: 'ff4ee3b9d935ed761897b86418b54962eb16078e', class: "flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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), index.h("div", { key: '3df9b6ca96d45fd01c44a6b227f0c01d1b23016e', class: "px-[30px] py-[10px] flex flex-col gap-[15px]" }, index.h("div", { key: '167ea852d54d1e1a60d568dba20330775c5be95e', class: "grid grid-cols-3 gap-[50px]" }, displayedManufacturerData.map(({ label, value, key }) => (index.h("div", { key: key, class: "flex flex-col flex-1" }, index.h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), index.h("div", { class: "py-[10px] px-0" }, value))))))))))))));
400
+ return (index.h(index.Host, { key: 'e7a268a4871e4c93e6cfeab933f25709705f7cba' }, index.h("div", { key: '7439a3fd0d521268c42925d0ecfd19bae55153d2', dir: this.locale.direction, class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: 'ae5f9644c3dc0ee8c2da994ce2225968d6858663' }, index.h(Loading.Loading, { key: '89cccb47ca737afe725660fe0864af7d055d655e', isLoading: this.state.includes('loading') }), index.h("div", { key: '7f0f5096f6d1679c74b396660d2855ea53bb9d53', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, ['error', 'error-loading'].includes(this.state) && (index.h("div", { key: '8e231bbe51763a87a9cf04cf9e2c1de223cfbf0b', class: "py-[16px] min-h-[100px] flex items-center" }, index.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) && (index.h("div", { key: 'de201e56f0bf0b8b14bfac50099c85a6dc9f19e1' }, index.h("div", { key: '7af41614f6e78d7583f6b00aec6f93b91e3118e5', class: "flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.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), index.h("div", { key: '2aa1fb1cad61eb48ab89258f7d1d3a34d50925a6', class: "px-[30px] py-[10px] flex flex-col gap-[15px]" }, index.h("div", { key: 'd888b93b3230c58106bbd1c132600f3cba3c090b', class: "grid grid-cols-3 gap-[50px]" }, displayedManufacturerData.map(({ label, value, key }) => (index.h("div", { key: key, class: "flex flex-col flex-1" }, index.h("strong", { class: "py-[10px] px-0 border-b-[gray] border-b" }, label), index.h("div", { class: "py-[10px] px-0" }, value))))))))))))));
383
401
  }
384
402
  get el() { return index.getElement(this); }
385
403
  static get watchers() { return {