adp-web-components 0.1.70 → 0.1.72
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.
- package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +8 -8
- package/dist/cjs/flexible-container.cjs.entry.js +1 -1
- package/dist/cjs/form-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/form-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/{form-dialog_8.cjs.entry.js → form-dialog_9.cjs.entry.js} +68 -29
- package/dist/cjs/form-input_4.cjs.entry.js +8 -10
- package/dist/cjs/form-stepper-control.cjs.entry.js +37 -0
- package/dist/cjs/form-switch.cjs.entry.js +2 -2
- package/dist/cjs/form-time-picker.cjs.entry.js +6 -6
- package/dist/cjs/general-inquiry-form.cjs.entry.js +7 -7
- package/dist/cjs/{get-language-from-url-DSzX4HQt.js → get-language-from-url-BDxORAGO.js} +32 -2
- package/dist/cjs/{get-local-language-BI2pd_Yt.js → get-local-language-BHgGjV5c.js} +1 -1
- package/dist/cjs/information-table.cjs.entry.js +1 -1
- package/dist/cjs/{loader-icon-BnoqKYZM.js → loader-icon-C4vy1OWp.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +4 -4
- package/dist/cjs/part-lookup.cjs.entry.js +2 -2
- package/dist/cjs/service-booking-form.cjs.entry.js +7 -7
- package/dist/cjs/shift-accordion.cjs.entry.js +1 -1
- package/dist/cjs/shift-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/shift-switch.cjs.entry.js +1 -1
- package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
- package/dist/cjs/shift-tabs_2.cjs.entry.js +10 -10
- package/dist/cjs/ssc-lookup-form.cjs.entry.js +7 -7
- package/dist/cjs/{state-object-Des0c4Zu.js → state-object-Cgz5J2Ur.js} +23 -18
- package/dist/cjs/test-drive-form.cjs.entry.js +7 -7
- package/dist/cjs/vehicle-accessories_7.cjs.entry.js +30 -23
- package/dist/cjs/vehicle-lookup.cjs.entry.js +10 -9
- package/dist/cjs/vehicle-quotation-form.cjs.entry.js +14 -11
- package/dist/cjs/white-loader-55klC_ZH.js +21 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/components/empty.css +1 -1
- package/dist/collection/components/components/flexible-container.css +1 -1
- package/dist/collection/components/components/information-table.css +1 -1
- package/dist/collection/components/components/loading-spinner.css +1 -1
- package/dist/collection/components/components/shift-accordion.css +1 -1
- package/dist/collection/components/components/shift-tab-content.css +1 -1
- package/dist/collection/components/components/shift-tabs.css +1 -1
- package/dist/collection/components/form-elements/form-inputs.css +1 -1
- package/dist/collection/components/form-elements/form-step-control.js +207 -0
- package/dist/collection/components/form-elements/form-stepper-submit.js +210 -0
- package/dist/collection/components/form-elements/form-structure-error.js +1 -1
- package/dist/collection/components/form-elements/form-structure.js +13 -4
- package/dist/collection/components/form-elements/form-submit.js +2 -2
- package/dist/collection/components/form-elements/form-switch.js +1 -1
- package/dist/collection/components/form-elements/form-text-area.js +2 -2
- package/dist/collection/components/form-elements/form-time-picker-legacy.js +5 -5
- package/dist/collection/components/form-elements/form-vin-input.js +2 -2
- package/dist/collection/components/forms/defaults/mappers.js +14 -14
- package/dist/collection/components/forms/defaults/style.css +1 -1
- package/dist/collection/components/forms/general-inquiry.js +21 -3
- package/dist/collection/components/forms/service-booking.js +21 -3
- package/dist/collection/components/forms/ssc-lookup.js +21 -3
- package/dist/collection/components/forms/test-drive.js +21 -3
- package/dist/collection/components/forms/vehicle-quotation/element-mapper.js +8 -5
- package/dist/collection/components/forms/vehicle-quotation/themes.css +1 -1
- package/dist/collection/components/forms/vehicle-quotation.js +3 -3
- package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
- package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
- package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +1 -1
- package/dist/collection/components/part-lookup/part-lookup.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +23 -2
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +25 -4
- package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +8 -8
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +28 -7
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.js +21 -0
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +23 -2
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +22 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +22 -1
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +25 -4
- package/dist/collection/components/vin-extractor/vin-extractor.css +1 -1
- package/dist/collection/components/vin-extractor/vin-extractor.js +1 -1
- package/dist/collection/features/form-hook/form-hook.js +32 -2
- package/dist/collection/features/form-hook/render-structure.js +8 -5
- package/dist/collection/features/vehicle-lookup-component/vehicle-lookup-api-integration.js +1 -1
- package/dist/collection/global/lib/populate-items.js +8 -3
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/flexible-container.js +1 -1
- package/dist/components/form-checkbox.js +1 -1
- package/dist/components/form-date-picker.js +1 -1
- package/dist/components/form-dialog.js +1 -1
- package/dist/components/form-input.js +1 -1
- package/dist/components/form-phone-number.js +1 -1
- package/dist/components/form-picker-input.js +1 -1
- package/dist/components/form-select.js +1 -1
- package/dist/components/form-shadow-input.js +1 -1
- package/dist/components/form-stepper-control.d.ts +11 -0
- package/dist/components/form-stepper-control.js +5 -0
- package/dist/components/form-stepper-submit.d.ts +11 -0
- package/dist/components/form-stepper-submit.js +5 -0
- package/dist/components/form-structure-error.js +1 -1
- package/dist/components/form-structure.js +1 -1
- package/dist/components/form-submit.js +1 -1
- package/dist/components/form-switch.js +1 -1
- package/dist/components/form-text-area.js +1 -1
- package/dist/components/form-time-picker.js +1 -1
- package/dist/components/form-vin-input.js +1 -1
- package/dist/components/general-inquiry-form.js +1 -1
- package/dist/components/information-table.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/manufacturer-part-lookup.js +1 -1
- package/dist/components/{p-C6SbgMRz.js → p--jlw5opz.js} +1 -1
- package/dist/components/{p-DKsrvL2S.js → p-41x6KvGr.js} +1 -1
- package/dist/components/p-6cUFg2fc.js +5 -0
- package/dist/components/{p-DIj3glmo.js → p-7KNE1-Ri.js} +1 -1
- package/dist/components/{p-DRP9fYyR.js → p-8XSbLgc1.js} +1 -1
- package/dist/components/p-ArbH-E30.js +5 -0
- package/dist/components/p-B72Jlkwt.js +5 -0
- package/dist/components/p-BGq7d7YN.js +5 -0
- package/dist/components/p-BOVPfFLJ.js +5 -0
- package/dist/components/{p-CVBPVkGL.js → p-BWbMTRSS.js} +1 -1
- package/dist/components/{p-CPbpqNiK.js → p-Bb9raR6p.js} +1 -1
- package/dist/components/{p-BzcQ1_DB.js → p-BcI0oj-h.js} +1 -1
- package/dist/components/{p-CRL9p7FO.js → p-BcmcPyEi.js} +1 -1
- package/dist/components/p-BoER4BnX.js +5 -0
- package/dist/components/{p-DjOmO83I.js → p-BvLuD0Kf.js} +1 -1
- package/dist/components/{p-Csf7k_Q_.js → p-BvnhLOCg.js} +1 -1
- package/dist/components/{p-BDRL_JEw.js → p-C-bOO9_K.js} +1 -1
- package/dist/components/{p-C6AV2hb0.js → p-CF8TtBlc.js} +1 -1
- package/dist/components/p-CGDBCNyc.js +5 -0
- package/dist/components/{p-COS-bXsj.js → p-CRhdQvF0.js} +1 -1
- package/dist/components/p-CjJcK_hB.js +5 -0
- package/dist/components/{p-BTuZ-dir.js → p-CrouRVEx.js} +1 -1
- package/dist/components/p-CthTWUyd.js +5 -0
- package/dist/components/p-CxmOqH7E.js +5 -0
- package/dist/components/p-DJReNlr5.js +5 -0
- package/dist/components/{p-MJwr71KB.js → p-DJaWpqrV.js} +1 -1
- package/dist/components/p-DOvlk8Mh.js +5 -0
- package/dist/components/p-DRkoUgc-.js +5 -0
- package/dist/components/{p-DJIhYvU2.js → p-DRypfOfG.js} +1 -1
- package/dist/components/{p-D-glpTvr.js → p-DThFNBwH.js} +1 -1
- package/dist/components/{p-D085qLZP.js → p-DWUC1sOH.js} +1 -1
- package/dist/components/p-DdT53TtQ.js +5 -0
- package/dist/components/p-Dolx9bDW.js +5 -0
- package/dist/components/{p-DRSVQwLV.js → p-Donjg6jl.js} +1 -1
- package/dist/components/p-IDZdaLqR.js +5 -0
- package/dist/components/p-RsS4xQTn.js +5 -0
- package/dist/components/p-S8knoRzN.js +5 -0
- package/dist/components/p-bjIWj3pr.js +5 -0
- package/dist/components/{p-2CC2X_L5.js → p-vub3oOr-.js} +1 -1
- package/dist/components/part-lookup.js +1 -1
- package/dist/components/service-booking-form.js +1 -1
- package/dist/components/shift-accordion.js +1 -1
- package/dist/components/shift-checkbox.js +1 -1
- package/dist/components/shift-slider.js +1 -1
- package/dist/components/shift-switch.js +1 -1
- package/dist/components/shift-tab-content.js +1 -1
- package/dist/components/shift-tabs.js +1 -1
- package/dist/components/ssc-lookup-form.js +1 -1
- package/dist/components/test-drive-form.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-claimable-items.js +1 -1
- package/dist/components/vehicle-item-claim-form.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-paint-thickness.js +1 -1
- package/dist/components/vehicle-quotation-form.js +1 -1
- package/dist/components/vehicle-sale-information.js +1 -1
- package/dist/components/vehicle-service-history.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/vehicle-warranty-details.js +1 -1
- package/dist/components/vin-extractor.js +1 -1
- package/dist/esm/dead-stock-lookup_3.entry.js +8 -8
- package/dist/esm/flexible-container.entry.js +1 -1
- package/dist/esm/form-checkbox.entry.js +1 -1
- package/dist/esm/form-date-picker.entry.js +1 -1
- package/dist/esm/{form-dialog_8.entry.js → form-dialog_9.entry.js} +66 -28
- package/dist/esm/form-input_4.entry.js +7 -9
- package/dist/esm/form-stepper-control.entry.js +35 -0
- package/dist/esm/form-switch.entry.js +2 -2
- package/dist/esm/form-time-picker.entry.js +6 -6
- package/dist/esm/general-inquiry-form.entry.js +7 -7
- package/dist/esm/{get-language-from-url-WEiw5juk.js → get-language-from-url-CZmiCAsd.js} +32 -2
- package/dist/esm/{get-local-language-RWdIrGBY.js → get-local-language-BF0xL8aw.js} +1 -1
- package/dist/esm/information-table.entry.js +1 -1
- package/dist/esm/{loader-icon-B0jJ_gr4.js → loader-icon-DibQkdwl.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/manufacturer-part-lookup.entry.js +4 -4
- package/dist/esm/part-lookup.entry.js +2 -2
- package/dist/esm/service-booking-form.entry.js +7 -7
- package/dist/esm/shift-accordion.entry.js +1 -1
- package/dist/esm/shift-checkbox.entry.js +1 -1
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/shift-switch.entry.js +1 -1
- package/dist/esm/shift-tab-content.entry.js +1 -1
- package/dist/esm/shift-tabs_2.entry.js +10 -10
- package/dist/esm/ssc-lookup-form.entry.js +7 -7
- package/dist/esm/{state-object-CeC7oHKX.js → state-object-5qgRIr3a.js} +23 -18
- package/dist/esm/test-drive-form.entry.js +7 -7
- package/dist/esm/vehicle-accessories_7.entry.js +30 -23
- package/dist/esm/vehicle-lookup.entry.js +10 -9
- package/dist/esm/vehicle-quotation-form.entry.js +14 -11
- package/dist/esm/white-loader-BpnYQ3A6.js +18 -0
- package/dist/shift-components/p-0de56f81.entry.js +5 -0
- package/dist/shift-components/{p-0ea039a0.entry.js → p-2fe3538e.entry.js} +1 -1
- package/dist/shift-components/p-35f3ee2d.entry.js +5 -0
- package/dist/shift-components/{p-26416420.entry.js → p-41d29e7e.entry.js} +1 -1
- package/dist/shift-components/p-42fd030e.entry.js +5 -0
- package/dist/shift-components/p-5398e145.entry.js +5 -0
- package/dist/shift-components/p-56ca3239.entry.js +5 -0
- package/dist/shift-components/p-597791f0.entry.js +5 -0
- package/dist/shift-components/p-5e1fc9f1.entry.js +5 -0
- package/dist/shift-components/p-78478bd7.entry.js +5 -0
- package/dist/shift-components/{p-c18fe44e.entry.js → p-8d733785.entry.js} +1 -1
- package/dist/shift-components/p-96aec9cb.entry.js +5 -0
- package/dist/shift-components/p-96fcaa2f.entry.js +5 -0
- package/dist/shift-components/{p-Dg7_3Y8v.js → p-CLiT06E6.js} +1 -1
- package/dist/shift-components/p-CyHfimfF.js +5 -0
- package/dist/shift-components/p-DcKddZmi.js +5 -0
- package/dist/shift-components/p-DzDhhYba.js +5 -0
- package/dist/shift-components/{p-B6Wq0r1I.js → p-RWnI27dq.js} +1 -1
- package/dist/shift-components/{p-7d154f1b.entry.js → p-a0439790.entry.js} +1 -1
- package/dist/shift-components/{p-b0097625.entry.js → p-a4abc248.entry.js} +1 -1
- package/dist/shift-components/p-a516df62.entry.js +5 -0
- package/dist/shift-components/p-a91a7901.entry.js +5 -0
- package/dist/shift-components/p-aba8e38a.entry.js +5 -0
- package/dist/shift-components/{p-89de0489.entry.js → p-b1b6c27b.entry.js} +1 -1
- package/dist/shift-components/p-ba1c87fe.entry.js +5 -0
- package/dist/shift-components/{p-1146347b.entry.js → p-cf55db99.entry.js} +1 -1
- package/dist/shift-components/{p-d550e462.entry.js → p-cf92576f.entry.js} +1 -1
- package/dist/shift-components/p-dfcdbab3.entry.js +5 -0
- package/dist/shift-components/{p-8049016c.entry.js → p-f4914abc.entry.js} +1 -1
- package/dist/shift-components/p-f7abcdc8.entry.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/form-elements/form-step-control.d.ts +15 -0
- package/dist/types/components/form-elements/form-stepper-submit.d.ts +15 -0
- package/dist/types/components/form-elements/form-structure.d.ts +1 -0
- package/dist/types/components/forms/defaults/mappers.d.ts +3 -0
- package/dist/types/components/forms/general-inquiry.d.ts +1 -0
- package/dist/types/components/forms/service-booking.d.ts +1 -0
- package/dist/types/components/forms/ssc-lookup.d.ts +1 -0
- package/dist/types/components/forms/test-drive.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-accessories.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-claimable-items.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-paint-thickness.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-sale-information.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-service-history.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-specification.d.ts +1 -0
- package/dist/types/components/vehicle-lookup/vehicle-warranty-details.d.ts +1 -0
- package/dist/types/components.d.ts +154 -0
- package/dist/types/features/form-hook/form-hook.d.ts +3 -1
- package/dist/types/features/form-hook/interface.d.ts +11 -0
- package/dist/types/features/form-hook/render-structure.d.ts +1 -1
- package/dist/types/features/vehicle-lookup-component/interface.d.ts +1 -0
- package/dist/types/global/lib/populate-items.d.ts +3 -3
- package/package.json +1 -1
- package/dist/cjs/form-input-prefix-RFgXEC1Q.js +0 -18
- package/dist/components/p-0ySd0MgI.js +0 -5
- package/dist/components/p-4mOI6YY-.js +0 -5
- package/dist/components/p-B-aHdSRz.js +0 -5
- package/dist/components/p-BL_i6ncz.js +0 -5
- package/dist/components/p-BjeQkQYD.js +0 -5
- package/dist/components/p-C6dSOlqU.js +0 -5
- package/dist/components/p-CDQ_6rNn.js +0 -5
- package/dist/components/p-CDTvzwTY.js +0 -5
- package/dist/components/p-CKl6Vc8A.js +0 -5
- package/dist/components/p-C_xCz80J.js +0 -5
- package/dist/components/p-CtACubeO.js +0 -5
- package/dist/components/p-D2xyt223.js +0 -5
- package/dist/components/p-DOMr8Zue.js +0 -5
- package/dist/components/p-DZH6HxLr.js +0 -5
- package/dist/components/p-KZb6fCL8.js +0 -5
- package/dist/components/p-MGR9n8Z2.js +0 -5
- package/dist/components/p-iySPfhw3.js +0 -5
- package/dist/esm/form-input-prefix-C48SfAOK.js +0 -16
- package/dist/shift-components/p-18d80073.entry.js +0 -5
- package/dist/shift-components/p-24f5d3f2.entry.js +0 -5
- package/dist/shift-components/p-30c382b1.entry.js +0 -5
- package/dist/shift-components/p-3886ad8e.entry.js +0 -5
- package/dist/shift-components/p-39c7dae2.entry.js +0 -5
- package/dist/shift-components/p-4d802ef2.entry.js +0 -5
- package/dist/shift-components/p-5882e816.entry.js +0 -5
- package/dist/shift-components/p-76cc872d.entry.js +0 -5
- package/dist/shift-components/p-7c49d3b9.entry.js +0 -5
- package/dist/shift-components/p-87ed3b41.entry.js +0 -5
- package/dist/shift-components/p-9faedf34.entry.js +0 -5
- package/dist/shift-components/p-B4qfTeQp.js +0 -5
- package/dist/shift-components/p-DXZTo2xz.js +0 -5
- package/dist/shift-components/p-b12d9acf.entry.js +0 -5
- package/dist/shift-components/p-c0b48724.entry.js +0 -5
- package/dist/shift-components/p-ce5e2d1d.entry.js +0 -5
- package/dist/shift-components/p-f349af49.entry.js +0 -5
- package/dist/shift-components/p-no7IC1jn.js +0 -5
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by ShiftSoftware
|
|
3
|
+
* Copyright (c)
|
|
4
|
+
*/
|
|
5
|
+
import { h } from "@stencil/core";
|
|
6
|
+
import cn from "../../global/lib/cn";
|
|
7
|
+
const buttonSubscriberKey = 'stepper-control-button';
|
|
8
|
+
export class FormStepperControl {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.submitTextKey = 'submit';
|
|
11
|
+
this.localization = {};
|
|
12
|
+
}
|
|
13
|
+
async componentWillLoad() {
|
|
14
|
+
this.form.subscribe(buttonSubscriberKey, this);
|
|
15
|
+
}
|
|
16
|
+
async disconnectedCallback() {
|
|
17
|
+
this.form.unsubscribe(buttonSubscriberKey);
|
|
18
|
+
}
|
|
19
|
+
reset() { }
|
|
20
|
+
render() {
|
|
21
|
+
const [_, language] = this.form.getFormLocale();
|
|
22
|
+
let step = this.form.getStepLabels(language, this.step);
|
|
23
|
+
const text = (step === null || step === void 0 ? void 0 : step.back) || '';
|
|
24
|
+
return (h("button", { key: '945331c5dba3291aa53e137e956aa10499835253', type: "button", formnovalidate: true, disabled: this.isLoading, part: cn('stepper-control', buttonSubscriberKey), onClick: () => (this.form.formStructure.currentStep -= 1), class: cn('stepper-control', {
|
|
25
|
+
loading: this.isLoading,
|
|
26
|
+
}) }, "ss", text));
|
|
27
|
+
}
|
|
28
|
+
static get is() { return "form-stepper-control"; }
|
|
29
|
+
static get originalStyleUrls() {
|
|
30
|
+
return {
|
|
31
|
+
"$": ["form-inputs.css"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static get styleUrls() {
|
|
35
|
+
return {
|
|
36
|
+
"$": ["form-inputs.css"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get properties() {
|
|
40
|
+
return {
|
|
41
|
+
"step": {
|
|
42
|
+
"type": "number",
|
|
43
|
+
"attribute": "step",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "number",
|
|
47
|
+
"resolved": "number",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": true,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
},
|
|
56
|
+
"getter": false,
|
|
57
|
+
"setter": false,
|
|
58
|
+
"reflect": false
|
|
59
|
+
},
|
|
60
|
+
"language": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"attribute": "language",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "string",
|
|
66
|
+
"resolved": "string",
|
|
67
|
+
"references": {}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": true,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": ""
|
|
74
|
+
},
|
|
75
|
+
"getter": false,
|
|
76
|
+
"setter": false,
|
|
77
|
+
"reflect": false
|
|
78
|
+
},
|
|
79
|
+
"wrapperId": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"attribute": "wrapper-id",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "string",
|
|
85
|
+
"resolved": "string",
|
|
86
|
+
"references": {}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": ""
|
|
93
|
+
},
|
|
94
|
+
"getter": false,
|
|
95
|
+
"setter": false,
|
|
96
|
+
"reflect": false
|
|
97
|
+
},
|
|
98
|
+
"isLoading": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"attribute": "is-loading",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "boolean",
|
|
104
|
+
"resolved": "boolean",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"reflect": false
|
|
116
|
+
},
|
|
117
|
+
"form": {
|
|
118
|
+
"type": "unknown",
|
|
119
|
+
"attribute": "form",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "FormHook<any>",
|
|
123
|
+
"resolved": "FormHook<any>",
|
|
124
|
+
"references": {
|
|
125
|
+
"FormHook": {
|
|
126
|
+
"location": "import",
|
|
127
|
+
"path": "~features/form-hook",
|
|
128
|
+
"id": "src/features/form-hook/index.ts::FormHook"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": ""
|
|
137
|
+
},
|
|
138
|
+
"getter": false,
|
|
139
|
+
"setter": false
|
|
140
|
+
},
|
|
141
|
+
"wrapperClass": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"attribute": "wrapper-class",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string",
|
|
147
|
+
"resolved": "string",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"getter": false,
|
|
157
|
+
"setter": false,
|
|
158
|
+
"reflect": false
|
|
159
|
+
},
|
|
160
|
+
"submitTextKey": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"attribute": "submit-text-key",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "string",
|
|
166
|
+
"resolved": "string",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": true,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": ""
|
|
174
|
+
},
|
|
175
|
+
"getter": false,
|
|
176
|
+
"setter": false,
|
|
177
|
+
"reflect": false,
|
|
178
|
+
"defaultValue": "'submit'"
|
|
179
|
+
},
|
|
180
|
+
"localization": {
|
|
181
|
+
"type": "unknown",
|
|
182
|
+
"attribute": "localization",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "FormInputLocalization",
|
|
186
|
+
"resolved": "{ [lang: string]: { label?: string; placeholder?: string; require?: string; format?: string; minMessage: string; maxMessage: string; betweenMessage: string; }; }",
|
|
187
|
+
"references": {
|
|
188
|
+
"FormInputLocalization": {
|
|
189
|
+
"location": "import",
|
|
190
|
+
"path": "~features/form-hook",
|
|
191
|
+
"id": "src/features/form-hook/index.ts::FormInputLocalization"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": true,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": ""
|
|
200
|
+
},
|
|
201
|
+
"getter": false,
|
|
202
|
+
"setter": false,
|
|
203
|
+
"defaultValue": "{}"
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by ShiftSoftware
|
|
3
|
+
* Copyright (c)
|
|
4
|
+
*/
|
|
5
|
+
import { h } from "@stencil/core";
|
|
6
|
+
import cn from "../../global/lib/cn";
|
|
7
|
+
import { getNestedValue } from "../../global/lib/get-nested-value";
|
|
8
|
+
import Loader from "~assets/white-loader.svg";
|
|
9
|
+
const buttonSubscriberKey = 'stepper-submit-button';
|
|
10
|
+
export class FormStepperSubmit {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.submitTextKey = 'submit';
|
|
13
|
+
this.localization = {};
|
|
14
|
+
}
|
|
15
|
+
async componentWillLoad() {
|
|
16
|
+
this.form.subscribe(buttonSubscriberKey, this);
|
|
17
|
+
}
|
|
18
|
+
async disconnectedCallback() {
|
|
19
|
+
this.form.unsubscribe(buttonSubscriberKey);
|
|
20
|
+
}
|
|
21
|
+
reset() { }
|
|
22
|
+
render() {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const [locale, language] = this.form.getFormLocale();
|
|
25
|
+
let step = this.form.getStepLabels(language, this.step);
|
|
26
|
+
const submitText = ((_b = (_a = this.localization) === null || _a === void 0 ? void 0 : _a[language]) === null || _b === void 0 ? void 0 : _b.label) || (step === null || step === void 0 ? void 0 : step.submitButton) || getNestedValue(locale, this.submitTextKey) || getNestedValue(locale, 'sharedFormLocales.submit') || 'Submit';
|
|
27
|
+
return (h("button", { key: '7030346cfd7ebc4b8f0a811a72895c97087f290c', type: "submit", formnovalidate: true, disabled: this.isLoading, part: cn('submit-button', buttonSubscriberKey), class: cn('form-submit', {
|
|
28
|
+
loading: this.isLoading,
|
|
29
|
+
}) }, h("div", { key: 'ebe8c1671a59625beadd37259ad04dedfb7be8c4', part: "form-submit-text", class: "opacity-0 form-submit-text-style" }, submitText), h("div", { key: 'eb37df60958957843622811f41d8991c7d9265e0', part: "form-submit-text", class: "form-submit-text-style form-submit-text-position" }, submitText), h("div", { key: '292f66eed05235e713033c8e749cee5f14b0b66f', part: "form-submit-loading-container", class: "form-submit-loading-container" }, h("img", { key: '8adaec51570be4bd168f1352fe8429ee56dba179', part: "form-submit-loading-icon", class: "form-submit-loading-icon", src: Loader }))));
|
|
30
|
+
}
|
|
31
|
+
static get is() { return "form-stepper-submit"; }
|
|
32
|
+
static get originalStyleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["form-inputs.css"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get styleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["form-inputs.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get properties() {
|
|
43
|
+
return {
|
|
44
|
+
"step": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"attribute": "step",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "number",
|
|
50
|
+
"resolved": "number",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": true,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"getter": false,
|
|
60
|
+
"setter": false,
|
|
61
|
+
"reflect": false
|
|
62
|
+
},
|
|
63
|
+
"language": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"attribute": "language",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "string",
|
|
69
|
+
"resolved": "string",
|
|
70
|
+
"references": {}
|
|
71
|
+
},
|
|
72
|
+
"required": false,
|
|
73
|
+
"optional": true,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": ""
|
|
77
|
+
},
|
|
78
|
+
"getter": false,
|
|
79
|
+
"setter": false,
|
|
80
|
+
"reflect": false
|
|
81
|
+
},
|
|
82
|
+
"wrapperId": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"attribute": "wrapper-id",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "string",
|
|
88
|
+
"resolved": "string",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": ""
|
|
96
|
+
},
|
|
97
|
+
"getter": false,
|
|
98
|
+
"setter": false,
|
|
99
|
+
"reflect": false
|
|
100
|
+
},
|
|
101
|
+
"isLoading": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"attribute": "is-loading",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "boolean",
|
|
107
|
+
"resolved": "boolean",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": ""
|
|
115
|
+
},
|
|
116
|
+
"getter": false,
|
|
117
|
+
"setter": false,
|
|
118
|
+
"reflect": false
|
|
119
|
+
},
|
|
120
|
+
"form": {
|
|
121
|
+
"type": "unknown",
|
|
122
|
+
"attribute": "form",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "FormHook<any>",
|
|
126
|
+
"resolved": "FormHook<any>",
|
|
127
|
+
"references": {
|
|
128
|
+
"FormHook": {
|
|
129
|
+
"location": "import",
|
|
130
|
+
"path": "~features/form-hook",
|
|
131
|
+
"id": "src/features/form-hook/index.ts::FormHook"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": false,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": ""
|
|
140
|
+
},
|
|
141
|
+
"getter": false,
|
|
142
|
+
"setter": false
|
|
143
|
+
},
|
|
144
|
+
"wrapperClass": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"attribute": "wrapper-class",
|
|
147
|
+
"mutable": false,
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "string",
|
|
150
|
+
"resolved": "string",
|
|
151
|
+
"references": {}
|
|
152
|
+
},
|
|
153
|
+
"required": false,
|
|
154
|
+
"optional": false,
|
|
155
|
+
"docs": {
|
|
156
|
+
"tags": [],
|
|
157
|
+
"text": ""
|
|
158
|
+
},
|
|
159
|
+
"getter": false,
|
|
160
|
+
"setter": false,
|
|
161
|
+
"reflect": false
|
|
162
|
+
},
|
|
163
|
+
"submitTextKey": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"attribute": "submit-text-key",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "string",
|
|
169
|
+
"resolved": "string",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": true,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": ""
|
|
177
|
+
},
|
|
178
|
+
"getter": false,
|
|
179
|
+
"setter": false,
|
|
180
|
+
"reflect": false,
|
|
181
|
+
"defaultValue": "'submit'"
|
|
182
|
+
},
|
|
183
|
+
"localization": {
|
|
184
|
+
"type": "unknown",
|
|
185
|
+
"attribute": "localization",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "FormInputLocalization",
|
|
189
|
+
"resolved": "{ [lang: string]: { label?: string; placeholder?: string; require?: string; format?: string; minMessage: string; maxMessage: string; betweenMessage: string; }; }",
|
|
190
|
+
"references": {
|
|
191
|
+
"FormInputLocalization": {
|
|
192
|
+
"location": "import",
|
|
193
|
+
"path": "~features/form-hook",
|
|
194
|
+
"id": "src/features/form-hook/index.ts::FormInputLocalization"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": true,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": ""
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"defaultValue": "{}"
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -16,7 +16,7 @@ export class FormStructureError {
|
|
|
16
16
|
this.sharedLocales = await getSharedLocal(newLanguage);
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'b9cecd3f726d5fb7b8b54701e29fa7c7ce6ee8bf' }, h("div", { key: '525a6754e3fc8966c0d341431a1795264ad92082', dir: this.sharedLocales.direction, part: "form-structure-error-container", class: "form-structure-error-container" }, h("div", { key: '18696a1d8c041b0524481d42300105f90764cb67', part: "form-structure-error-content", class: "form-structure-error-content" }, this.sharedLocales.errors.wrongFormStructure))));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "form-structure-error"; }
|
|
22
22
|
static get originalStyleUrls() {
|
|
@@ -6,12 +6,14 @@ import { Host, h } from "@stencil/core";
|
|
|
6
6
|
import generalSchema from "../../locales/general/type";
|
|
7
7
|
import { getLocaleLanguage, getSharedLocal, sharedLocalesSchema } from "../../features/multi-lingual/index";
|
|
8
8
|
import { renderStructure } from "../../features/form-hook/index";
|
|
9
|
+
import cn from "../../global/lib/cn";
|
|
9
10
|
export class FormStructure {
|
|
10
11
|
constructor() {
|
|
11
12
|
// #region Localization
|
|
12
13
|
this.formLocale = {};
|
|
13
14
|
this.language = 'en';
|
|
14
15
|
this.locale = Object.assign({ sharedLocales: sharedLocalesSchema.getDefault() }, generalSchema.getDefault());
|
|
16
|
+
this.currentStep = 1;
|
|
15
17
|
}
|
|
16
18
|
async componentWillLoad() {
|
|
17
19
|
this.form.formStructure = this;
|
|
@@ -29,7 +31,7 @@ export class FormStructure {
|
|
|
29
31
|
}, 300);
|
|
30
32
|
}
|
|
31
33
|
render() {
|
|
32
|
-
var _a;
|
|
34
|
+
var _a, _b, _c, _d;
|
|
33
35
|
const [locale] = this.form.getFormLocale();
|
|
34
36
|
const generalProps = {
|
|
35
37
|
form: this.form,
|
|
@@ -41,7 +43,13 @@ export class FormStructure {
|
|
|
41
43
|
if (!this.structure)
|
|
42
44
|
return h("form-structure-error", { language: this.language });
|
|
43
45
|
const { formController, resetFormErrorMessage } = this.form;
|
|
44
|
-
return (h(Host, null, h("form", Object.assign({ id: this.formId, class: "relative", dir: this.locale.sharedLocales.direction }, formController), h("form-dialog", { dialogClosed: resetFormErrorMessage, isError: !!this.errorMessage, closeText: (_a = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _a === void 0 ? void 0 : _a.close, form: this.form, message: this.errorMessage }, h("div", { class: "form-success-container" }, h("svg", { fill: "none", "stroke-width": "2", viewBox: "0 0 24 24", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", xmlns: "http://www.w3.org/2000/svg", class: "size-[70px] stroke-green-700" }, h("path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }), h("path", { d: "m9 12 2 2 4-4" })), this.successMessage)), h("div",
|
|
46
|
+
return (h(Host, null, h("form", Object.assign({ id: this.formId, class: "relative", dir: this.locale.sharedLocales.direction }, formController), h("form-dialog", { dialogClosed: resetFormErrorMessage, isError: !!this.errorMessage, closeText: (_a = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _a === void 0 ? void 0 : _a.close, form: this.form, message: this.errorMessage }, h("div", { class: "form-success-container" }, h("svg", { fill: "none", "stroke-width": "2", viewBox: "0 0 24 24", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", xmlns: "http://www.w3.org/2000/svg", class: "size-[70px] stroke-green-700" }, h("path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }), h("path", { d: "m9 12 2 2 4-4" })), this.successMessage)), h("div", { class: "relative overflow-hidden grid grid-cols-1 grid-rows-1" }, !((_b = this === null || this === void 0 ? void 0 : this.structure) === null || _b === void 0 ? void 0 : _b.steps) && renderStructure(this.structure, this.formElementMapper, generalProps, this.fields, this.currentStep), !!((_c = this === null || this === void 0 ? void 0 : this.structure) === null || _c === void 0 ? void 0 : _c.steps) &&
|
|
47
|
+
((_d = this === null || this === void 0 ? void 0 : this.structure) === null || _d === void 0 ? void 0 : _d.steps.map((_, i) => (h("div", { class: cn('col-start-1 row-start-1 transition-all !duration-700', {
|
|
48
|
+
'pointer-events-none! *:pointer-events-none!': this.currentStep !== i + 1,
|
|
49
|
+
'translate-x-full rtl:-translate-x-full opacity-0': this.currentStep < i + 1,
|
|
50
|
+
'translate-x-0 opacity-100': this.currentStep === i + 1,
|
|
51
|
+
'-translate-x-full rtl:translate-x-full opacity-0': this.currentStep > i + 1,
|
|
52
|
+
}) }, renderStructure(this.structure, this.formElementMapper, generalProps, this.fields, i + 1)))))), h("button", { formnovalidate: true, type: "submit", class: "hidden" }))));
|
|
45
53
|
}
|
|
46
54
|
static get is() { return "form-structure"; }
|
|
47
55
|
static get originalStyleUrls() {
|
|
@@ -226,7 +234,7 @@ export class FormStructure {
|
|
|
226
234
|
"mutable": false,
|
|
227
235
|
"complexType": {
|
|
228
236
|
"original": "FormElementStructure<any>",
|
|
229
|
-
"resolved": "{ data?: Record<string, any>; requiredContext?: Record<string, boolean>; } & { id?: string; class?: string; staticValue?: any; isHidden?: boolean; isDisabled?: boolean; children?: any[]; } & { tag: string; name?: any; } | { data?: Record<string, any>; requiredContext?: Record<string, boolean>; } & { id?: string; class?: string; staticValue?: any; isHidden?: boolean; isDisabled?: boolean; children?: any[]; } & { tag?: string; name: any; }",
|
|
237
|
+
"resolved": "{ steps?: Record<LanguageKeys, Step>[]; data?: Record<string, any>; requiredContext?: Record<string, boolean>; } & { id?: string; step?: number; type?: string; class?: string; staticValue?: any; isHidden?: boolean; isDisabled?: boolean; children?: any[]; } & { tag: string; name?: any; } | { steps?: Record<LanguageKeys, Step>[]; data?: Record<string, any>; requiredContext?: Record<string, boolean>; } & { id?: string; step?: number; type?: string; class?: string; staticValue?: any; isHidden?: boolean; isDisabled?: boolean; children?: any[]; } & { tag?: string; name: any; }",
|
|
230
238
|
"references": {
|
|
231
239
|
"FormElementStructure": {
|
|
232
240
|
"location": "import",
|
|
@@ -273,7 +281,8 @@ export class FormStructure {
|
|
|
273
281
|
static get states() {
|
|
274
282
|
return {
|
|
275
283
|
"locale": {},
|
|
276
|
-
"formContent": {}
|
|
284
|
+
"formContent": {},
|
|
285
|
+
"currentStep": {}
|
|
277
286
|
};
|
|
278
287
|
}
|
|
279
288
|
static get watchers() {
|
|
@@ -23,9 +23,9 @@ export class FormSubmit {
|
|
|
23
23
|
var _a, _b;
|
|
24
24
|
const [locale, language] = this.form.getFormLocale();
|
|
25
25
|
const submitText = ((_b = (_a = this.localization) === null || _a === void 0 ? void 0 : _a[language]) === null || _b === void 0 ? void 0 : _b.label) || getNestedValue(locale, this.submitTextKey) || getNestedValue(locale, 'sharedFormLocales.submit') || 'Submit';
|
|
26
|
-
return (h("button", { key: '
|
|
26
|
+
return (h("button", { key: '6c0babdded1ae5057221f60a55ea36d34472e8be', type: "submit", formnovalidate: true, part: buttonSubscriberKey, disabled: this.isLoading, class: cn('form-submit', {
|
|
27
27
|
loading: this.isLoading,
|
|
28
|
-
}) }, h("div", { key: '
|
|
28
|
+
}) }, h("div", { key: '18be88443c65059f1660ff66b0921c81d4b00061', part: "form-submit-text", class: "opacity-0 form-submit-text-style" }, submitText), h("div", { key: '5ee6a9d9a31f5bd152c75653b63165dd352bc41c', part: "form-submit-text", class: "form-submit-text-style form-submit-text-position" }, submitText), h("div", { key: 'ecaee019da090c5a8dbc55069527b8f4ae30a090', part: "form-submit-loading-container", class: "form-submit-loading-container" }, h("img", { key: 'a626e6ecb56d5e6648a56ec0435f7dd76f5a853a', part: "form-submit-loading-icon", class: "form-submit-loading-icon", src: Loader }))));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "form-submit"; }
|
|
31
31
|
static get originalStyleUrls() {
|
|
@@ -28,7 +28,7 @@ export class FormSwitch {
|
|
|
28
28
|
render() {
|
|
29
29
|
const { disabled, meta, errorMessage, isError } = this.form.getInputState(this.name);
|
|
30
30
|
const { label, errorTextMessage } = getInputLocalization(this, meta, errorMessage);
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '6532223fcdbc020d0cb50597c9d278b54331ba2a' }, h("div", { key: '64f6d0756f758f3772a0ba9d744bc6119e079deb', part: `${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, disabled) }, h("div", { key: 'd5836f1707fa495c1f2a25e1b036d09bedcc11bb', part: `${this.name}-container form-input-container`, class: "form-input-container" }, h("shift-switch", { key: 'f18e548987b94f4ef4c5dcac128fa0fe68223640', name: this.name, label: label, class: "form-switch" })), h(FormErrorMessage, { key: '498a4178eedd90abc09ad4dabfeecd75bc0ae8ad', name: this.name, isError: isError, errorMessage: errorTextMessage }))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "form-switch"; }
|
|
34
34
|
static get originalStyleUrls() {
|
|
@@ -40,9 +40,9 @@ export class FormTextArea {
|
|
|
40
40
|
const { disabled, isRequired, meta, isError, errorMessage } = this.form.getInputState(this.name);
|
|
41
41
|
const { label, placeholder, errorTextMessage } = getInputLocalization(this, meta, errorMessage);
|
|
42
42
|
const isDisabled = disabled || this.isLoading || !!this.staticValue || this.isDisabled;
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '25d338c4d007e177f32a9aca4e5b79277d8fc1bf' }, h("label", { key: '99e72449e79bfa13f639f50395feb330758cd041', part: `form-textarea ${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, h(FormInputLabel, { key: '95faa4295bfd7da486e1bf7917a8e5d2f04c13f4', name: this.name, isRequired: isRequired, label: label }), h("div", { key: '385013d6cda348752110e400370a5af65ec876af', part: `${this.name}-container form-input-container`, class: "form-input-container" }, h("textarea", { key: '36c92728aa1ab230a52fca245dd5d43489290e0d', name: this.name, disabled: isDisabled, placeholder: placeholder, part: `${this.name}-textarea form-input-textarea`, class: cn('form-input-style form-input-textarea-style', partKeyPrefix + this.name, {
|
|
44
44
|
'form-input-error-style': isError,
|
|
45
|
-
}) }, this.defaultValue)), h("div", { key: '
|
|
45
|
+
}) }, this.defaultValue)), h("div", { key: '71d74743769f550d1173ab981f6ecb1d50e84704', class: "-mt-1" }, h(FormErrorMessage, { key: '6bfc59c04b1c03fd4584eae544096c835517bc05', name: this.name, isError: isError, errorMessage: errorTextMessage })))));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "form-text-area"; }
|
|
48
48
|
static get originalStyleUrls() {
|
|
@@ -133,22 +133,22 @@ export class FormTimePicker {
|
|
|
133
133
|
const step = this.minuteStep || 1;
|
|
134
134
|
const hours = Array.from({ length: 24 }, (_, i) => i);
|
|
135
135
|
const minutes = Array.from({ length: Math.ceil(60 / step) }, (_, i) => i * step);
|
|
136
|
-
return (h(Host, { key: '
|
|
136
|
+
return (h(Host, { key: '6bb395aa80c55ed42349ae54a2c8fe80720097e8' }, h("label", { key: '46237f459fcf1d257063bf81967cb56a261780c4', part: this.name, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, h(FormInputLabel, { key: 'cd4c702c543e4434f9a702704a6d3aca9ffb80e7', isRequired: isRequired, label: label }), h("form-shadow-input", { key: '49b8b2be00be7ded1c24ff78c72fdc027891291d', name: this.name, form: this.form, value: this.selectedValue }), h("div", { key: 'ee765bca38085f4b480351f500a320ab7831fe16', part: `${this.name}-container form-input-container`, class: cn('form-input-container', { open: this.isOpen }) }, h("input", { key: '05f8706cafd330f2b2c85d7214499f87d75d9d5c', type: "text", readOnly: true, disabled: isDisabled, value: this.selectedValue, onClick: this.toggleDropdown, part: `${this.name}-input form-input`, placeholder: placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder), class: cn('form-input-style form-input-select', {
|
|
137
137
|
'form-input-error-style': isError,
|
|
138
|
-
}) }), h("span", { key: '
|
|
138
|
+
}) }), h("span", { key: '1cd7d111f3960d3afe5c794dd98b2381c6e115d4', part: `${this.name}-icon form-time-picker-icon`, class: "form-input-icon form-input-icon-end" }, h("svg", { key: 'd2cca338ce36c8a6b4315d10775ed9d55a868b2b', "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "size-full" }, h("circle", { key: '08c27a1894c484a88798cb3df72bdb1fbdb2fd34', cx: "12", cy: "12", r: "10" }), h("polyline", { key: 'b9fa78fb5952509356073347c3939882a246992a', points: "12 6 12 12 16 14" }))), h("div", { key: '4fe84cefc23de47de14f9bdd2b153af70b6d6c0c', part: `${this.name}-dropdown form-time-picker-dropdown`, class: cn('form-picker-dropdown', {
|
|
139
139
|
upwards: this.openUpwards,
|
|
140
140
|
downwards: !this.openUpwards,
|
|
141
|
-
}) }, h("div", { key: '
|
|
141
|
+
}) }, h("div", { key: 'c4e77dd75e396bd9243784f154544b2e08969c9e', class: "form-time-picker-columns" }, h("div", { key: 'aa0c2cf38a0a558e04ce52a4b09230ec786e1ac8', class: "form-time-picker-column form-time-picker-hours" }, h("div", { key: 'e56babd3bd98531828a1fecd3afddf28c0c0fe33', class: "form-time-picker-column-header" }, "HH"), hours.map(hour => {
|
|
142
142
|
const hourDisabled = this.isHourDisabled(hour);
|
|
143
143
|
return (h("button", { type: "button", disabled: hourDisabled, onClick: () => this.selectHour(hour), part: cn('form-time-picker-option', { 'form-time-picker-option-selected': hour === selectedHour }), class: cn('form-time-picker-option', {
|
|
144
144
|
selected: hour === selectedHour,
|
|
145
145
|
}) }, String(hour).padStart(2, '0')));
|
|
146
|
-
})), h("div", { key: '
|
|
146
|
+
})), h("div", { key: '228759852fb08dcda55e0eca20b8c4a470258ceb', class: "form-time-picker-column form-time-picker-minutes" }, h("div", { key: '70505b645d08d64327da02c4339e206f4873970b', class: "form-time-picker-column-header" }, "MM"), minutes.map(minute => {
|
|
147
147
|
const minuteDisabled = selectedHour >= 0 ? this.isMinuteDisabled(selectedHour, minute) : false;
|
|
148
148
|
return (h("button", { type: "button", disabled: minuteDisabled, onClick: () => this.selectMinute(minute), part: cn('form-time-picker-option', { 'form-time-picker-option-selected': minute === selectedMinute }), class: cn('form-time-picker-option', {
|
|
149
149
|
selected: minute === selectedMinute,
|
|
150
150
|
}) }, String(minute).padStart(2, '0')));
|
|
151
|
-
}))))), h(FormErrorMessage, { key: '
|
|
151
|
+
}))))), h(FormErrorMessage, { key: 'fa968f4a57a55591fe330f535eba20ea566089ea', name: this.name, isError: isError, errorMessage: locale[errorMessage] || errorMessage }))));
|
|
152
152
|
}
|
|
153
153
|
static get is() { return "form-time-picker"; }
|
|
154
154
|
static get originalStyleUrls() {
|
|
@@ -52,9 +52,9 @@ export class FormVinInput {
|
|
|
52
52
|
const { label, placeholder, errorTextMessage } = getInputLocalization(this, meta, errorMessage);
|
|
53
53
|
const isDisabled = disabled || this.isLoading || !!this.staticValue || this.isDisabled;
|
|
54
54
|
const extractorTitle = ((_b = (_a = this.localization) === null || _a === void 0 ? void 0 : _a[language]) === null || _b === void 0 ? void 0 : _b.scan) || ((_j = (_g = (_f = (_e = (_d = (_c = this.form) === null || _c === void 0 ? void 0 : _c.context) === null || _d === void 0 ? void 0 : _d.structure) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.localization) === null || _g === void 0 ? void 0 : _g[(_h = this.form.context) === null || _h === void 0 ? void 0 : _h.language]) === null || _j === void 0 ? void 0 : _j['vin-scan']) || 'Scan Your VIN';
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: 'bd1fd8e6c87e3e9abb1e2dc17990ecbb65beb662' }, h("label", { key: 'ee832844db1d09c8aa4edf37e489465e1ec44a0d', part: this.name, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, h(FormInputLabel, { key: 'd32032c849295466d5e0717563bd605856b41757', isRequired: isRequired, label: label }), h("div", { key: '8ee4a1644f42224dbebd531a87936ea7b1c4231d', part: `${this.name}-container form-input-container`, class: "form-input-container" }, h(FormInputPrefix, { key: 'da01cd2329b03e0641a652dcb88cf688abc5e80c', name: this.name, direction: (_k = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _k === void 0 ? void 0 : _k.direction, prefix: this.inputPrefix }), h("input", Object.assign({ key: '060b7676b9d947f2e104b6cf7f1ac020a85acc43' }, this.inputProps, { name: this.name, disabled: isDisabled, defaultValue: this.defaultValue, part: `${this.name}-input form-input`, placeholder: placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder), style: Object.assign({}, (this.prefixWidth ? { [((_l = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _l === void 0 ? void 0 : _l.direction) === 'rtl' ? 'paddingRight' : 'paddingLeft']: `${this.prefixWidth}px` } : {})), class: cn('form-input-style !uppercase', part, {
|
|
56
56
|
'form-input-error-style': isError,
|
|
57
|
-
}) })), !!this.scannerIcon && (this.useOcr || this.readSticker) && (h("button", { key: '
|
|
57
|
+
}) })), !!this.scannerIcon && (this.useOcr || this.readSticker) && (h("button", { key: '2231cb8c49d60a42e800d517545c6eebd4c22a3c', type: "button", disabled: isDisabled, part: cn('vin-validator', part + '-vin'), onClick: () => { var _a; return (_a = this === null || this === void 0 ? void 0 : this.el.getElementsByTagName('vin-extractor')[0]) === null || _a === void 0 ? void 0 : _a.open(); }, class: "absolute transition-all duration-500 disabled:!pointer-events-none disabled:!opacity-0 flex justify-center items-center end-3.5 !text-[#576675] enabled:hover:!text-black/85 aspect-square h-[70%] top-1/2 -translate-y-1/2" }, this.scannerIcon === 'qr-code' && h(QrCodeScanIcon, { key: '81abcee962204c97374507f7182b9695beccae43', class: "size-[90%] text-inherit" }), this.scannerIcon === 'camera' && h(CameraIcon, { key: '0c174dddeb5ca73526a838dd81c385a5e9a95ac5', class: "size-[90%] text-inherit" })))), h(FormErrorMessage, { key: 'e41bbe4f4c81e0ba3798ad6a4ab9ba1ddc19b7fd', name: this.name, isError: isError, errorMessage: errorTextMessage })), (this.useOcr || this.readSticker) && (h("div", { key: '9b2e4997dca4fd82c6f821616f3c78a355f1f873', class: "absolute" }, h("vin-extractor", { key: 'fe2371fd6184a21c9602736fa99301e442d8a580', verbose: true, manualCapture: true, useOcr: this.useOcr, title: extractorTitle, skipValidation: false, readSticker: this.readSticker, ocrEndpoint: this.ocrEndpoint, onExtract: newVin => {
|
|
58
58
|
var _a, _b;
|
|
59
59
|
this.inputRef.value = newVin;
|
|
60
60
|
(_a = this.form) === null || _a === void 0 ? void 0 : _a.validateInput(this === null || this === void 0 ? void 0 : this.name);
|