adp-web-components 0.1.69 → 0.1.71

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 (185) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +1 -1
  2. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  3. package/dist/cjs/form-checkbox.cjs.entry.js +1 -1
  4. package/dist/cjs/form-date-picker.cjs.entry.js +1 -1
  5. package/dist/cjs/form-dialog_8.cjs.entry.js +8 -8
  6. package/dist/cjs/form-input_4.cjs.entry.js +8 -5
  7. package/dist/cjs/form-switch.cjs.entry.js +1 -1
  8. package/dist/cjs/form-time-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/general-inquiry-form.cjs.entry.js +3 -3
  10. package/dist/cjs/{get-local-language-Cen-CaAS.js → get-local-language-CrGMNJyx.js} +1 -1
  11. package/dist/cjs/information-table.cjs.entry.js +1 -1
  12. package/dist/cjs/{loader-icon-DDFoc4iC.js → loader-icon-BTRe-EkU.js} +1 -1
  13. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  14. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +1 -1
  15. package/dist/cjs/part-lookup.cjs.entry.js +1 -1
  16. package/dist/cjs/service-booking-form.cjs.entry.js +3 -3
  17. package/dist/cjs/shift-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/shift-switch.cjs.entry.js +1 -1
  19. package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
  20. package/dist/cjs/shift-tabs_2.cjs.entry.js +2 -2
  21. package/dist/cjs/ssc-lookup-form.cjs.entry.js +3 -3
  22. package/dist/cjs/{state-object-P-Iq2rJH.js → state-object-DC2JjJcf.js} +12 -7
  23. package/dist/cjs/test-drive-form.cjs.entry.js +3 -3
  24. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +8 -8
  25. package/dist/cjs/vehicle-lookup.cjs.entry.js +2 -2
  26. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +10 -7
  27. package/dist/collection/components/components/empty.css +1 -1
  28. package/dist/collection/components/components/flexible-container.css +1 -1
  29. package/dist/collection/components/components/information-table.css +1 -1
  30. package/dist/collection/components/components/loading-spinner.css +1 -1
  31. package/dist/collection/components/components/shift-tab-content.css +1 -1
  32. package/dist/collection/components/components/shift-tabs.css +1 -1
  33. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  34. package/dist/collection/components/form-elements/form-select.js +4 -1
  35. package/dist/collection/components/forms/defaults/mappers.js +3 -3
  36. package/dist/collection/components/forms/vehicle-quotation/element-mapper.js +8 -5
  37. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  38. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  39. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  40. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  41. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  42. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  43. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  44. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  45. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  46. package/dist/collection/global/lib/populate-items.js +8 -3
  47. package/dist/components/dead-stock-lookup.js +1 -1
  48. package/dist/components/distributor-lookup.js +1 -1
  49. package/dist/components/flexible-container.js +1 -1
  50. package/dist/components/form-checkbox.js +1 -1
  51. package/dist/components/form-date-picker.js +1 -1
  52. package/dist/components/form-dialog.js +1 -1
  53. package/dist/components/form-input.js +1 -1
  54. package/dist/components/form-phone-number.js +1 -1
  55. package/dist/components/form-picker-input.js +1 -1
  56. package/dist/components/form-select.js +1 -1
  57. package/dist/components/form-shadow-input.js +1 -1
  58. package/dist/components/form-structure-error.js +1 -1
  59. package/dist/components/form-structure.js +1 -1
  60. package/dist/components/form-submit.js +1 -1
  61. package/dist/components/form-switch.js +1 -1
  62. package/dist/components/form-text-area.js +1 -1
  63. package/dist/components/form-time-picker.js +1 -1
  64. package/dist/components/form-vin-input.js +1 -1
  65. package/dist/components/general-inquiry-form.js +1 -1
  66. package/dist/components/information-table.js +1 -1
  67. package/dist/components/loading-spinner.js +1 -1
  68. package/dist/components/manufacturer-lookup.js +1 -1
  69. package/dist/components/manufacturer-part-lookup.js +1 -1
  70. package/dist/components/{p-5vCnW15q.js → p-0xcR950E.js} +1 -1
  71. package/dist/components/{p-s1egbQvB.js → p-2CMkowBx.js} +1 -1
  72. package/dist/components/{p-DZp-jErv.js → p-8XSbLgc1.js} +1 -1
  73. package/dist/components/{p-DUVWBnA9.js → p-B5f2dpEy.js} +1 -1
  74. package/dist/components/{p-BxThjPHO.js → p-B9DO0698.js} +1 -1
  75. package/dist/components/{p-BR4OFzVP.js → p-BBYPaQBK.js} +1 -1
  76. package/dist/components/p-BGzp0k11.js +5 -0
  77. package/dist/components/{p-qrgJk9wz.js → p-BLFDdJWV.js} +1 -1
  78. package/dist/components/{p-UCSAYvqq.js → p-BlGKvTMT.js} +1 -1
  79. package/dist/components/{p-BS9Sy4l-.js → p-BmyNDE_E.js} +1 -1
  80. package/dist/components/{p-Dj8Ee7hQ.js → p-Bw_VvuFc.js} +1 -1
  81. package/dist/components/{p-l_zY6q-j.js → p-BxuggWJc.js} +1 -1
  82. package/dist/components/p-CEOpVFS4.js +5 -0
  83. package/dist/components/{p-DBGnUep_.js → p-CRhdQvF0.js} +1 -1
  84. package/dist/components/{p-MF_Mhmek.js → p-CVR4TrpD.js} +1 -1
  85. package/dist/components/{p-PmX2Y4Vl.js → p-CWVjZ_Vg.js} +1 -1
  86. package/dist/components/{p-CrJpwlcT.js → p-CZzCbI9_.js} +1 -1
  87. package/dist/components/{p-D4jWMiB1.js → p-CnU-FAvr.js} +1 -1
  88. package/dist/components/{p-CL7WvF4L.js → p-Ctn6qJSb.js} +1 -1
  89. package/dist/components/{p-C_yzUJkF.js → p-D5TUOBeG.js} +1 -1
  90. package/dist/components/p-DJaWpqrV.js +5 -0
  91. package/dist/components/{p-CtOJ_zjn.js → p-DL1ZwCZy.js} +1 -1
  92. package/dist/components/{p-CYk4_3GI.js → p-DRqirHEl.js} +1 -1
  93. package/dist/components/{p-BNxNkaWr.js → p-DTSxLKHX.js} +1 -1
  94. package/dist/components/{p-DUqTj2gi.js → p-DWWN4ooP.js} +1 -1
  95. package/dist/components/{p-CZAQDwlb.js → p-DWuvZsGI.js} +1 -1
  96. package/dist/components/{p-CpDHXuPB.js → p-Db4o0Qpx.js} +1 -1
  97. package/dist/components/{p-CaTpKLTA.js → p-DbcLXe18.js} +1 -1
  98. package/dist/components/{p-CSP0hpyv.js → p-DiqiT5wD.js} +1 -1
  99. package/dist/components/{p-BJVKwMQT.js → p-DyNlA71C.js} +1 -1
  100. package/dist/components/{p-CSaunwNy.js → p-TR2srg3G.js} +1 -1
  101. package/dist/components/{p-DM8BoqLf.js → p-Uit3uqMQ.js} +1 -1
  102. package/dist/components/{p-D_eB5U40.js → p-c05QCGD9.js} +1 -1
  103. package/dist/components/{p-BFIEwYxz.js → p-h28ATSQb.js} +1 -1
  104. package/dist/components/part-lookup.js +1 -1
  105. package/dist/components/service-booking-form.js +1 -1
  106. package/dist/components/shift-accordion.js +1 -1
  107. package/dist/components/shift-checkbox.js +1 -1
  108. package/dist/components/shift-slider.js +1 -1
  109. package/dist/components/shift-switch.js +1 -1
  110. package/dist/components/shift-tab-content.js +1 -1
  111. package/dist/components/shift-tabs.js +1 -1
  112. package/dist/components/ssc-lookup-form.js +1 -1
  113. package/dist/components/test-drive-form.js +1 -1
  114. package/dist/components/vehicle-accessories.js +1 -1
  115. package/dist/components/vehicle-claimable-items.js +1 -1
  116. package/dist/components/vehicle-item-claim-form.js +1 -1
  117. package/dist/components/vehicle-lookup.js +1 -1
  118. package/dist/components/vehicle-paint-thickness.js +1 -1
  119. package/dist/components/vehicle-quotation-form.js +1 -1
  120. package/dist/components/vehicle-sale-information.js +1 -1
  121. package/dist/components/vehicle-service-history.js +1 -1
  122. package/dist/components/vehicle-specification.js +1 -1
  123. package/dist/components/vehicle-warranty-details.js +1 -1
  124. package/dist/esm/dead-stock-lookup_3.entry.js +1 -1
  125. package/dist/esm/flexible-container.entry.js +1 -1
  126. package/dist/esm/form-checkbox.entry.js +1 -1
  127. package/dist/esm/form-date-picker.entry.js +1 -1
  128. package/dist/esm/form-dialog_8.entry.js +8 -8
  129. package/dist/esm/form-input_4.entry.js +8 -5
  130. package/dist/esm/form-switch.entry.js +1 -1
  131. package/dist/esm/form-time-picker.entry.js +1 -1
  132. package/dist/esm/general-inquiry-form.entry.js +3 -3
  133. package/dist/esm/{get-local-language-BA-mxji9.js → get-local-language-CDa5dIz4.js} +1 -1
  134. package/dist/esm/information-table.entry.js +1 -1
  135. package/dist/esm/{loader-icon-CrkrQoZC.js → loader-icon-DEUB-nef.js} +1 -1
  136. package/dist/esm/loading-spinner.entry.js +1 -1
  137. package/dist/esm/manufacturer-part-lookup.entry.js +1 -1
  138. package/dist/esm/part-lookup.entry.js +1 -1
  139. package/dist/esm/service-booking-form.entry.js +3 -3
  140. package/dist/esm/shift-checkbox.entry.js +1 -1
  141. package/dist/esm/shift-switch.entry.js +1 -1
  142. package/dist/esm/shift-tab-content.entry.js +1 -1
  143. package/dist/esm/shift-tabs_2.entry.js +2 -2
  144. package/dist/esm/ssc-lookup-form.entry.js +3 -3
  145. package/dist/esm/{state-object-DAC-YAZL.js → state-object-Ogxin4e1.js} +12 -7
  146. package/dist/esm/test-drive-form.entry.js +3 -3
  147. package/dist/esm/vehicle-accessories_7.entry.js +8 -8
  148. package/dist/esm/vehicle-lookup.entry.js +2 -2
  149. package/dist/esm/vehicle-quotation-form.entry.js +10 -7
  150. package/dist/shift-components/p-0e27b251.entry.js +5 -0
  151. package/dist/shift-components/p-15e10305.entry.js +5 -0
  152. package/dist/shift-components/{p-c94a8a2a.entry.js → p-2c5165b8.entry.js} +1 -1
  153. package/dist/shift-components/{p-1314318c.entry.js → p-2fe3538e.entry.js} +1 -1
  154. package/dist/shift-components/{p-71390e8e.entry.js → p-398ca2dd.entry.js} +1 -1
  155. package/dist/shift-components/{p-0e787552.entry.js → p-4238fe6e.entry.js} +1 -1
  156. package/dist/shift-components/p-4461d611.entry.js +5 -0
  157. package/dist/shift-components/{p-57383665.entry.js → p-623d5c3d.entry.js} +1 -1
  158. package/dist/shift-components/{p-f9d25f53.entry.js → p-6433c2ae.entry.js} +1 -1
  159. package/dist/shift-components/{p-ed1e7ad1.entry.js → p-66ef506a.entry.js} +1 -1
  160. package/dist/shift-components/{p-69ff8945.entry.js → p-76fe6d18.entry.js} +1 -1
  161. package/dist/shift-components/p-C5yZUyec.js +5 -0
  162. package/dist/shift-components/{p-DJUFyE7i.js → p-CpPMv1bM.js} +1 -1
  163. package/dist/shift-components/{p-3ba867f7.entry.js → p-a4abc248.entry.js} +1 -1
  164. package/dist/shift-components/{p-8a108e47.entry.js → p-ad9a34aa.entry.js} +1 -1
  165. package/dist/shift-components/{p-1e7a67f8.entry.js → p-b2721d2b.entry.js} +1 -1
  166. package/dist/shift-components/{p-7972fca8.entry.js → p-b90e8298.entry.js} +1 -1
  167. package/dist/shift-components/{p-13ba1767.entry.js → p-ba2b46c2.entry.js} +1 -1
  168. package/dist/shift-components/{p-bf8073aa.entry.js → p-c0758cce.entry.js} +1 -1
  169. package/dist/shift-components/{p-2c02f614.entry.js → p-c2f8916b.entry.js} +1 -1
  170. package/dist/shift-components/{p-f2a4ac7c.entry.js → p-c342b9d1.entry.js} +1 -1
  171. package/dist/shift-components/{p-2a9fdd57.entry.js → p-d637c69b.entry.js} +1 -1
  172. package/dist/shift-components/{p-dfa74829.entry.js → p-da9862ea.entry.js} +1 -1
  173. package/dist/shift-components/{p-d4fd929c.entry.js → p-e962f341.entry.js} +1 -1
  174. package/dist/shift-components/{p-2b170c48.entry.js → p-f4914abc.entry.js} +1 -1
  175. package/dist/shift-components/{p-BDOonna-.js → p-rMLckxTx.js} +1 -1
  176. package/dist/shift-components/shift-components.esm.js +1 -1
  177. package/dist/types/global/lib/populate-items.d.ts +3 -3
  178. package/package.json +1 -1
  179. package/dist/components/p-BgJinsB1.js +0 -5
  180. package/dist/components/p-C2_nbD-_.js +0 -5
  181. package/dist/components/p-FQ2AsScl.js +0 -5
  182. package/dist/shift-components/p-83b7765e.entry.js +0 -5
  183. package/dist/shift-components/p-DZEsUMU0.js +0 -5
  184. package/dist/shift-components/p-b1c84fb2.entry.js +0 -5
  185. package/dist/shift-components/p-f23ef5c3.entry.js +0 -5
@@ -5,7 +5,7 @@
5
5
  import { h } from './index-Bf4Ol6Qt.js';
6
6
  import './types-CWP4hZcw.js';
7
7
  import { d as dateFnsExports } from './index-BILW0yP6.js';
8
- import { L as LoaderIcon, g as getPhoneValidator } from './loader-icon-CrkrQoZC.js';
8
+ import { L as LoaderIcon, g as getPhoneValidator } from './loader-icon-DEUB-nef.js';
9
9
  import { c as cn } from './cn-BK16Cn81.js';
10
10
  import { C as CalendarDaysIcon } from './calendar-days-icon-Dz291Fau.js';
11
11
  import { d as decodeTimeOffset } from './decode-time-offset-Cfi43WoV.js';
@@ -59,12 +59,17 @@ const VehicleImageViewer = ({ form }) => {
59
59
  h("img", { alt: "vehicle image", part: "vehicle-image", src: imageSrcBase64, style: { 'border-radius': '6px', 'transition': 'opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);', 'opacity': isLoading ? '0' : '1' } }))));
60
60
  };
61
61
 
62
+ const getObjectValue = (obj, path) => {
63
+ if (typeof path === 'string')
64
+ return getNestedValue(obj, path);
65
+ return path.map(itemPath => getNestedValue(obj, itemPath)).find(value => value != null);
66
+ };
62
67
  const populateItems = (data, setup, hasMeta) => {
63
68
  const options = [];
64
- const baseOptions = getNestedValue(data, setup.items);
69
+ const baseOptions = getObjectValue(data, setup.items);
65
70
  baseOptions.forEach(item => {
66
- const value = getNestedValue(item, setup['item-value']);
67
- const label = getNestedValue(item, setup['item-label']);
71
+ const value = getObjectValue(item, setup['item-value']);
72
+ const label = getObjectValue(item, setup['item-label']);
68
73
  const newItemObject = { value: (setup === null || setup === void 0 ? void 0 : setup.useNamedValue) ? label : value, label };
69
74
  newItemObject.meta = Object.assign({}, item);
70
75
  options.push(newItemObject);
@@ -99,13 +104,13 @@ const getFormMappers = (stateObject, extraMappers = {}) => (Object.assign({ subm
99
104
  const res = await response.json();
100
105
  options = res.data;
101
106
  options = options.map((vehicle, idx) => {
102
- var _a, _b, _c;
107
+ var _a, _b, _c, _d, _e;
103
108
  if (!props.defaultValue && paramValue && (((_a = vehicle === null || vehicle === void 0 ? void 0 : vehicle.GradeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === paramValue || ((_b = `${vehicle.id}`) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === paramValue))
104
109
  defaultIndex = idx;
105
110
  return {
106
111
  label: vehicle.attributes.GradeName,
107
- value: (props === null || props === void 0 ? void 0 : props.useNamedValue) ? `${(_c = vehicle === null || vehicle === void 0 ? void 0 : vehicle.attributes) === null || _c === void 0 ? void 0 : _c.GradeName}` : `${vehicle.id}`,
108
- meta: Object.assign(Object.assign({}, vehicle), { image: vehicle.attributes.Cover.data.attributes.url }),
112
+ value: (props === null || props === void 0 ? void 0 : props.useNamedValue) ? `${(vehicle === null || vehicle === void 0 ? void 0 : vehicle.GradeName) || ((_c = vehicle === null || vehicle === void 0 ? void 0 : vehicle.attributes) === null || _c === void 0 ? void 0 : _c.GradeName)}` : `${vehicle.id}`,
113
+ meta: Object.assign(Object.assign({}, vehicle), { image: ((_d = vehicle === null || vehicle === void 0 ? void 0 : vehicle.Cover) === null || _d === void 0 ? void 0 : _d.url) || ((_e = vehicle.attributes.Cover.data.attributes) === null || _e === void 0 ? void 0 : _e.url) }),
109
114
  };
110
115
  });
111
116
  }
@@ -3,13 +3,13 @@
3
3
  * Copyright (c)
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, a as getElement } from './index-Bf4Ol6Qt.js';
6
- import { f as functionHooks, L as LoaderIcon } from './loader-icon-CrkrQoZC.js';
6
+ import { f as functionHooks, L as LoaderIcon } from './loader-icon-DEUB-nef.js';
7
7
  import { c as cn } from './cn-BK16Cn81.js';
8
8
  import { g as getFormValidations } from './validation-iKTmTjB0.js';
9
9
  import { s as sharedFormLocalesSchema } from './types-CWP4hZcw.js';
10
10
  import { g as getLanguageFromUrl } from './get-language-from-url-WEiw5juk.js';
11
- import { a as getDefaultStateObject, g as getFormMappers } from './state-object-DAC-YAZL.js';
12
- import './get-local-language-BA-mxji9.js';
11
+ import { a as getDefaultStateObject, g as getFormMappers } from './state-object-Ogxin4e1.js';
12
+ import './get-local-language-CDa5dIz4.js';
13
13
  import './index-BILW0yP6.js';
14
14
  import './validate-vin-CUREVASG.js';
15
15
  import './calendar-days-icon-Dz291Fau.js';