adp-web-components 0.1.57 → 0.1.59
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 +7 -7
- package/dist/cjs/decode-time-offset-DqzP0mck.js +37 -0
- 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 +221 -0
- package/dist/cjs/form-dialog_8.cjs.entry.js +809 -0
- package/dist/cjs/{form-input-prefix-BEKoXMuK.js → form-input-label-meHUwu3m.js} +0 -9
- package/dist/cjs/form-input-prefix-RFgXEC1Q.js +18 -0
- package/dist/cjs/form-input_4.cjs.entry.js +31 -14
- package/dist/cjs/form-switch.cjs.entry.js +2 -2
- package/dist/cjs/form-time-picker.cjs.entry.js +165 -0
- package/dist/cjs/general-inquiry-form.cjs.entry.js +11 -9
- package/dist/cjs/{get-local-language-CLEoE4A4.js → get-local-language-CMptyFxH.js} +1 -1
- package/dist/cjs/index-D5c513Xn.js +22147 -0
- package/dist/cjs/information-table.cjs.entry.js +1 -1
- package/dist/cjs/{loader-icon-8WtBJ-H1.js → loader-icon-qrSyqpQO.js} +49 -26
- 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 +3 -3
- package/dist/cjs/part-lookup.cjs.entry.js +3 -3
- package/dist/cjs/service-booking-form.cjs.entry.js +21 -194
- package/dist/cjs/shift-components.cjs.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 +11 -9
- package/dist/cjs/state-object-B_0-oj8G.js +243 -0
- package/dist/cjs/test-drive-form.cjs.entry.js +11 -9
- package/dist/cjs/{type-DlWZZ9uC.js → type-B8LchmnL.js} +1 -1
- package/dist/cjs/{type-VgtSVhXd.js → type-BqNpIYcE.js} +1 -1
- package/dist/cjs/{type-CG7yWUpY.js → type-BrzZ5GMr.js} +1 -1
- package/dist/cjs/vehicle-accessories_7.cjs.entry.js +24 -24
- package/dist/cjs/vehicle-lookup.cjs.entry.js +3 -3
- package/dist/cjs/vehicle-quotation-form.cjs.entry.js +14 -11
- package/dist/collection/collection-manifest.json +3 -0
- 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-tab-content.css +1 -1
- package/dist/collection/components/components/shift-tabs.css +1 -1
- package/dist/collection/components/form-elements/VehicleImageViewer.js +50 -0
- package/dist/collection/components/form-elements/form-date-picker-legacy.js +498 -0
- package/dist/collection/components/form-elements/form-dialog.js +3 -3
- package/dist/collection/components/form-elements/form-input.js +95 -5
- package/dist/collection/components/form-elements/form-inputs.css +1 -1
- package/dist/collection/components/form-elements/form-phone-number.js +2 -2
- package/dist/collection/components/form-elements/form-picker-input.js +478 -0
- package/dist/collection/components/form-elements/form-shadow-input.js +24 -1
- package/dist/collection/components/form-elements/form-structure-error.js +1 -1
- 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 +397 -0
- package/dist/collection/components/form-elements/form-vin-input.js +5 -4
- package/dist/collection/components/forms/defaults/mappers.js +72 -0
- package/dist/collection/components/forms/defaults/style.css +1 -1
- package/dist/collection/components/forms/defaults/validation.js +29 -1
- package/dist/collection/components/forms/general-inquiry.js +6 -6
- package/dist/collection/components/forms/service-booking.js +21 -21
- package/dist/collection/components/forms/ssc-lookup.js +6 -6
- package/dist/collection/components/forms/test-drive.js +6 -6
- package/dist/collection/components/forms/vehicle-quotation/VehicleImageViewer.js +1 -1
- package/dist/collection/components/forms/vehicle-quotation.js +11 -9
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
- package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
- package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +2 -2
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +4 -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-paint-thickness.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.js +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +2 -2
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +4 -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/functions.js +37 -13
- package/dist/collection/global/assets/calendar-days-icon.js +6 -0
- package/dist/collection/global/assets/clock-8-icon.js +6 -0
- package/dist/collection/global/lib/decode-time-offset.js +32 -0
- 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.d.ts +11 -0
- package/dist/components/form-date-picker.js +5 -0
- 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.d.ts +11 -0
- package/dist/components/form-picker-input.js +5 -0
- package/dist/components/form-select.js +1 -1
- package/dist/components/form-shadow-input.js +1 -1
- 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.d.ts +11 -0
- package/dist/components/form-time-picker.js +5 -0
- 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-Bi75CV6R.js → p-3WjYFbnU.js} +1 -1
- package/dist/components/p-64G0Y_tC.js +5 -0
- package/dist/components/p-7y7dFWS-.js +5 -0
- package/dist/components/p-BEClgvwe.js +5 -0
- package/dist/components/p-BILW0yP6.js +5 -0
- package/dist/components/p-BTqv9A1K.js +5 -0
- package/dist/components/p-B_QEyJOO.js +5 -0
- package/dist/components/{p-F0WWPE_O.js → p-Bd2-gh8M.js} +1 -1
- package/dist/components/p-BffBGA_K.js +5 -0
- package/dist/components/p-Bon4whdT.js +5 -0
- package/dist/components/{p-CCGW3XAg.js → p-BsFKuBtC.js} +1 -1
- package/dist/components/p-C-4CT4ZF.js +5 -0
- package/dist/components/p-C6WhIy7O.js +5 -0
- package/dist/components/{p-CixlAlH4.js → p-CBXAxKky.js} +1 -1
- package/dist/components/p-CEM5EBP0.js +5 -0
- package/dist/components/p-CHdx52dw.js +5 -0
- package/dist/components/p-CwQEFAEF.js +5 -0
- package/dist/components/p-Cxfsh87m.js +5 -0
- package/dist/components/p-D-tlRZMk.js +5 -0
- package/dist/components/p-D930Q75B.js +5 -0
- package/dist/components/p-DA0taq65.js +5 -0
- package/dist/components/p-DJKERvsE.js +5 -0
- package/dist/components/p-DNn44A0I.js +5 -0
- package/dist/components/{p-DEDxfC7_.js → p-Df56BNKV.js} +1 -1
- package/dist/components/p-DjDUhW2q.js +5 -0
- package/dist/components/{p-Cv4B-c-D.js → p-DkA_i--O.js} +1 -1
- package/dist/components/{p-C9NbnDFD.js → p-DqNmAqS_.js} +1 -1
- package/dist/components/p-DuNp8sSh.js +5 -0
- package/dist/components/p-NEl9bwNq.js +5 -0
- package/dist/components/p-RInF2GNQ.js +5 -0
- package/dist/components/{p-BtR-iDdk.js → p-_C-vBKCe.js} +1 -1
- package/dist/components/p-eTLWmtnI.js +5 -0
- package/dist/components/{p-C3JyRnEg.js → p-vEsQVFLN.js} +1 -1
- package/dist/components/{p-CFfmHNjt.js → p-zofQKKfh.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-slider.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 +7 -7
- package/dist/esm/decode-time-offset-Cfi43WoV.js +35 -0
- 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 +219 -0
- package/dist/esm/form-dialog_8.entry.js +800 -0
- package/dist/esm/{form-input-prefix-uiMTBAZe.js → form-input-label-BhD_T_C5.js} +1 -9
- package/dist/esm/form-input-prefix-C48SfAOK.js +16 -0
- package/dist/esm/form-input_4.entry.js +30 -13
- package/dist/esm/form-switch.entry.js +2 -2
- package/dist/esm/form-time-picker.entry.js +163 -0
- package/dist/esm/general-inquiry-form.entry.js +11 -9
- package/dist/esm/{get-local-language-B3oLMQ7x.js → get-local-language-CCj6E27L.js} +1 -1
- package/dist/esm/index-BILW0yP6.js +22145 -0
- package/dist/esm/information-table.entry.js +1 -1
- package/dist/esm/{loader-icon-BT-MqKj_.js → loader-icon-DhBPTC5g.js} +39 -15
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/manufacturer-part-lookup.entry.js +3 -3
- package/dist/esm/part-lookup.entry.js +3 -3
- package/dist/esm/service-booking-form.entry.js +21 -194
- package/dist/esm/shift-components.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 +11 -9
- package/dist/esm/state-object-Cwph5K2Q.js +238 -0
- package/dist/esm/test-drive-form.entry.js +11 -9
- package/dist/esm/{type-B96smKVB.js → type-BluG_k1P.js} +1 -1
- package/dist/esm/{type-CJFFdz9f.js → type-D_rpjbuj.js} +1 -1
- package/dist/esm/{type-BymH_Reb.js → type-zroDKO0U.js} +1 -1
- package/dist/esm/vehicle-accessories_7.entry.js +24 -24
- package/dist/esm/vehicle-lookup.entry.js +3 -3
- package/dist/esm/vehicle-quotation-form.entry.js +14 -11
- package/dist/locales/vehicleLookup/saleInformation/ar.json +1 -1
- package/dist/locales/vehicleLookup/saleInformation/en.json +1 -1
- package/dist/locales/vehicleLookup/saleInformation/ku.json +1 -1
- package/dist/locales/vehicleLookup/saleInformation/ru.json +1 -1
- package/dist/shift-components/p-0a728fec.entry.js +5 -0
- package/dist/shift-components/p-0e630c66.entry.js +5 -0
- package/dist/shift-components/p-0f83786b.entry.js +5 -0
- package/dist/shift-components/p-1c93d5e6.entry.js +5 -0
- package/dist/shift-components/p-26f3e6da.entry.js +5 -0
- package/dist/shift-components/p-3a7196d4.entry.js +5 -0
- package/dist/shift-components/{p-ce1bf4af.entry.js → p-45670df9.entry.js} +1 -1
- package/dist/shift-components/{p-d9234e52.entry.js → p-4aa6f707.entry.js} +1 -1
- package/dist/shift-components/p-50fd9d29.entry.js +5 -0
- package/dist/shift-components/p-63e1e80e.entry.js +5 -0
- package/dist/shift-components/{p-c250576d.entry.js → p-67476178.entry.js} +1 -1
- package/dist/shift-components/p-683f3ab3.entry.js +5 -0
- package/dist/shift-components/p-8700e868.entry.js +5 -0
- package/dist/shift-components/p-90a6803f.entry.js +5 -0
- package/dist/shift-components/{p-DPJOLEPo.js → p-B-8v_CQL.js} +1 -1
- package/dist/shift-components/p-BILW0yP6.js +5 -0
- package/dist/shift-components/{p-C2E0OQuQ.js → p-BK4ZcuiW.js} +1 -1
- package/dist/shift-components/p-BVMG8UaH.js +5 -0
- package/dist/shift-components/{p-BQaoN4EI.js → p-Bfkguwb-.js} +1 -1
- package/dist/shift-components/p-BnQp2Q8E.js +5 -0
- package/dist/shift-components/{p-DitnhRjp.js → p-C3YLTa2J.js} +1 -1
- package/dist/shift-components/p-DXZTo2xz.js +5 -0
- package/dist/shift-components/p-Dgh-j_S7.js +5 -0
- package/dist/shift-components/p-XyQhTm0V.js +5 -0
- package/dist/shift-components/p-b4231e50.entry.js +5 -0
- package/dist/shift-components/p-c7eaf245.entry.js +5 -0
- package/dist/shift-components/{p-6f59eb5f.entry.js → p-d7da1152.entry.js} +1 -1
- package/dist/shift-components/p-f7692371.entry.js +5 -0
- package/dist/shift-components/p-f8ac59ee.entry.js +5 -0
- package/dist/shift-components/p-fac0fdb9.entry.js +5 -0
- package/dist/shift-components/p-fe02d5ed.entry.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/form-elements/VehicleImageViewer.d.ts +7 -0
- package/dist/types/components/form-elements/form-date-picker-legacy.d.ts +44 -0
- package/dist/types/components/form-elements/form-input.d.ts +5 -0
- package/dist/types/components/form-elements/form-picker-input.d.ts +36 -0
- package/dist/types/components/form-elements/form-shadow-input.d.ts +1 -0
- package/dist/types/components/form-elements/form-time-picker-legacy.d.ts +38 -0
- package/dist/types/components/form-elements/form-vin-input.d.ts +1 -1
- package/dist/types/components/forms/defaults/mappers.d.ts +20 -0
- package/dist/types/components/forms/defaults/validation.d.ts +5 -1
- package/dist/types/components/forms/service-booking.d.ts +5 -7
- package/dist/types/components.d.ts +187 -6
- package/dist/types/features/form-hook/functions.d.ts +6 -6
- package/dist/types/global/assets/calendar-days-icon.d.ts +8 -0
- package/dist/types/global/assets/clock-8-icon.d.ts +8 -0
- package/dist/types/global/lib/decode-time-offset.d.ts +6 -0
- package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +2 -2
- package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +2 -2
- package/package.json +2 -1
- package/dist/cjs/form-dialog_2.cjs.entry.js +0 -80
- package/dist/cjs/form-phone-number_5.cjs.entry.js +0 -638
- package/dist/cjs/state-object-BKYoOET2.js +0 -84
- package/dist/components/p-0RPSruUw.js +0 -5
- package/dist/components/p-AXXIpFHS.js +0 -5
- package/dist/components/p-B6oAdbSG.js +0 -5
- package/dist/components/p-B8ficu-2.js +0 -5
- package/dist/components/p-BccOXbO6.js +0 -5
- package/dist/components/p-BiWhrVwg.js +0 -5
- package/dist/components/p-CCnpN4O6.js +0 -5
- package/dist/components/p-CMIWLyy-.js +0 -5
- package/dist/components/p-CTvhIyUe.js +0 -5
- package/dist/components/p-CVPVwYky.js +0 -5
- package/dist/components/p-CY-XNpVl.js +0 -5
- package/dist/components/p-Cfv1Ad7h.js +0 -5
- package/dist/components/p-CmZX4oFn.js +0 -5
- package/dist/components/p-DDwq6NYq.js +0 -5
- package/dist/components/p-DGmPDcfO.js +0 -5
- package/dist/components/p-DnDLOq--.js +0 -5
- package/dist/components/p-Dot72Ksm.js +0 -5
- package/dist/components/p-DwlUO-mQ.js +0 -5
- package/dist/components/p-Dy_xcj4e.js +0 -5
- package/dist/components/p-HU3XmNIl.js +0 -5
- package/dist/components/p-qgWJBcxw.js +0 -5
- package/dist/components/p-uhXr4495.js +0 -5
- package/dist/esm/form-dialog_2.entry.js +0 -77
- package/dist/esm/form-phone-number_5.entry.js +0 -632
- package/dist/esm/state-object-DKRL_FzI.js +0 -79
- package/dist/shift-components/p-0e2d3d93.entry.js +0 -5
- package/dist/shift-components/p-10da80aa.entry.js +0 -5
- package/dist/shift-components/p-1ff500c4.entry.js +0 -5
- package/dist/shift-components/p-361e8b06.entry.js +0 -5
- package/dist/shift-components/p-38bb86f3.entry.js +0 -5
- package/dist/shift-components/p-39914eb3.entry.js +0 -5
- package/dist/shift-components/p-76f94eb5.entry.js +0 -5
- package/dist/shift-components/p-830b1bea.entry.js +0 -5
- package/dist/shift-components/p-835b1234.entry.js +0 -5
- package/dist/shift-components/p-92551553.entry.js +0 -5
- package/dist/shift-components/p-9c01c8ff.entry.js +0 -5
- package/dist/shift-components/p-CaFQm1Ia.js +0 -5
- package/dist/shift-components/p-Cf1rwCRV.js +0 -5
- package/dist/shift-components/p-DpDKQYgQ.js +0 -5
- package/dist/shift-components/p-a2419627.entry.js +0 -5
- package/dist/shift-components/p-a9a116b5.entry.js +0 -5
- package/dist/shift-components/p-bb5c2961.entry.js +0 -5
- package/dist/shift-components/p-bcb6b13e.entry.js +0 -5
- package/dist/shift-components/p-e06782ee.entry.js +0 -5
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by ShiftSoftware
|
|
3
|
+
* Copyright (c)
|
|
4
|
+
*/
|
|
5
|
+
import { Host, h } from "@stencil/core";
|
|
6
|
+
import cn from "../../global/lib/cn";
|
|
7
|
+
import { getNestedValue } from "../../global/lib/get-nested-value";
|
|
8
|
+
import { FormInputLabel } from "./components/form-input-label";
|
|
9
|
+
import { FormInputPrefix } from "./components/form-input-prefix";
|
|
10
|
+
import { FormErrorMessage } from "./components/form-error-message";
|
|
11
|
+
import { decodeTimeOffset } from "../../global/lib/decode-time-offset";
|
|
12
|
+
import { format } from "date-fns";
|
|
13
|
+
const partKeyPrefix = 'form-picker-';
|
|
14
|
+
export class FormPickerInput {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.inputProps = {};
|
|
17
|
+
this.type = 'datetime-local';
|
|
18
|
+
this.iconPosition = 'end';
|
|
19
|
+
this.prefixWidth = 0;
|
|
20
|
+
this.updateDisplayValue = () => {
|
|
21
|
+
var _a;
|
|
22
|
+
this.displayedValue = ((_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
23
|
+
if (this.displayedValue && (this.formatter || this.format)) {
|
|
24
|
+
if (this.formatter)
|
|
25
|
+
this.displayedValue = this.formatter(this.displayedValue);
|
|
26
|
+
if (this.format)
|
|
27
|
+
this.displayedValue = format(new Date(this.displayedValue), this.format);
|
|
28
|
+
this.form.context[`${this.name}-format`] = this.displayedValue;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
delete this.form.context[`${this.name}-format`];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
this.onInputChange = (event) => {
|
|
35
|
+
const target = event.target;
|
|
36
|
+
if (this.inputRef)
|
|
37
|
+
this.inputRef.value = target.value;
|
|
38
|
+
this.updateDisplayValue();
|
|
39
|
+
};
|
|
40
|
+
this.onInputClick = () => {
|
|
41
|
+
var _a;
|
|
42
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.showPicker();
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async componentWillLoad() {
|
|
46
|
+
this.form.subscribe(this.name, this);
|
|
47
|
+
this.onStaticValueChange(this.staticValue, false);
|
|
48
|
+
this.updateDisplayValue();
|
|
49
|
+
}
|
|
50
|
+
async onStaticValueChange(newStaticValue, notInitialLoad = true) {
|
|
51
|
+
if (!!newStaticValue) {
|
|
52
|
+
this.defaultValue = newStaticValue;
|
|
53
|
+
this.inputRef.value = newStaticValue;
|
|
54
|
+
}
|
|
55
|
+
else if (notInitialLoad) {
|
|
56
|
+
this.defaultValue = '';
|
|
57
|
+
this.inputRef.value = '';
|
|
58
|
+
}
|
|
59
|
+
this.updateDisplayValue();
|
|
60
|
+
}
|
|
61
|
+
async componentDidLoad() {
|
|
62
|
+
const prefix = this.el.getElementsByClassName('prefix')[0];
|
|
63
|
+
this.prefixWidth = prefix ? prefix.getBoundingClientRect().width : 0;
|
|
64
|
+
this.inputRef = this.el.getElementsByClassName(partKeyPrefix + this.name)[0];
|
|
65
|
+
this.updateDisplayValue();
|
|
66
|
+
}
|
|
67
|
+
async disconnectedCallback() {
|
|
68
|
+
this.form.unsubscribe(this.name);
|
|
69
|
+
}
|
|
70
|
+
reset(newValue) {
|
|
71
|
+
const value = newValue || this.defaultValue || '';
|
|
72
|
+
this.inputRef.value = value;
|
|
73
|
+
this.updateDisplayValue();
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
const { disabled, isRequired, meta, isError, errorMessage } = this.form.getInputState(this.name);
|
|
78
|
+
const [locale] = this.form.getFormLocale();
|
|
79
|
+
const part = partKeyPrefix + this.name;
|
|
80
|
+
const label = getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.label) || (meta === null || meta === void 0 ? void 0 : meta.label);
|
|
81
|
+
const placeholder = getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.placeholder);
|
|
82
|
+
const isDisabled = disabled || this.isLoading || !!this.staticValue || this.isDisabled;
|
|
83
|
+
const isRtl = ((_a = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _a === void 0 ? void 0 : _a.direction) === 'rtl';
|
|
84
|
+
const isIconStart = this.iconPosition === 'start';
|
|
85
|
+
const iconPaddingSide = isIconStart ? (isRtl ? 'paddingRight' : 'paddingLeft') : isRtl ? 'paddingLeft' : 'paddingRight';
|
|
86
|
+
const iconClass = cn('form-input-icon', {
|
|
87
|
+
'form-input-icon-start': isIconStart,
|
|
88
|
+
'form-input-icon-end': !isIconStart,
|
|
89
|
+
'form-input-icon-interactive': !!this.iconAction,
|
|
90
|
+
});
|
|
91
|
+
const renderIcon = () => this.iconAction ? (h("button", { type: "button", disabled: isDisabled, onClick: this.iconAction, part: `${this.name}-icon form-input-icon`, class: iconClass }, this.icon)) : (h("span", { part: `${this.name}-icon form-input-icon`, class: iconClass }, this.icon));
|
|
92
|
+
return (h(Host, { key: '30e8c5dcf6e73545e9ca8a22ad1b867d2bf2dcb9' }, h("label", { key: 'ca64bc027377e91765e6a40cc9e7d557b195b97e', part: this.name, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, h(FormInputLabel, { key: 'ec51a34f299503b400274c9a7b25991d037b2dca', isRequired: isRequired, label: label }), h("div", { key: 'c844610ddb85d4f9a675a8ae6661d888cd5acb38', part: `${this.name}-container form-input-container relative`, class: "form-input-container" }, h(FormInputPrefix, { key: '39e07d5f9cecb0b61d45ef43d01d6e288d50ca18', name: this.name, direction: (_b = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _b === void 0 ? void 0 : _b.direction, prefix: this.inputPrefix }), h("input", { key: '88095b71ff639f6040c72d864eb5f53d37015c05', type: "text", onInput: () => { }, part: `form-input`, disabled: isDisabled, value: this.displayedValue, onClick: this.onInputClick, placeholder: placeholder || (meta === null || meta === void 0 ? void 0 : meta.placeholder), style: Object.assign(Object.assign({}, (this.prefixWidth ? { [isRtl ? 'paddingRight' : 'paddingLeft']: `${this.prefixWidth}px` } : {})), (this.icon ? { [iconPaddingSide]: '40px' } : {})), class: cn('form-input-style enabled:cursor-pointer', {
|
|
93
|
+
'form-input-error-style': isError,
|
|
94
|
+
}) }), h("input", Object.assign({ key: '085815e83d0e4c2021f8e686082e03718f5da140', type: this.type, name: this.name }, this.inputProps, { onInput: this.onInputChange, part: `${this.name}-input ${part}`, class: cn('shadow-input size-full absolute top-0 left-0 opacity-0 -z-[99]', part), min: Array.isArray(this.min) ? decodeTimeOffset({ offsets: this.min, type: this.type }) : this.min, max: Array.isArray(this.max) ? decodeTimeOffset({ offsets: this.max, type: this.type }) : this.max })), this.icon && renderIcon()), h(FormErrorMessage, { key: 'a3cb212d05e449248b293520eab8eeadbc338452', name: this.name, isError: isError, errorMessage: locale[errorMessage] || errorMessage }))));
|
|
95
|
+
}
|
|
96
|
+
static get is() { return "form-picker-input"; }
|
|
97
|
+
static get originalStyleUrls() {
|
|
98
|
+
return {
|
|
99
|
+
"$": ["form-inputs.css"]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static get styleUrls() {
|
|
103
|
+
return {
|
|
104
|
+
"$": ["form-inputs.css"]
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
static get properties() {
|
|
108
|
+
return {
|
|
109
|
+
"name": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"attribute": "name",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "string",
|
|
115
|
+
"resolved": "string",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"getter": false,
|
|
125
|
+
"setter": false,
|
|
126
|
+
"reflect": false
|
|
127
|
+
},
|
|
128
|
+
"format": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"attribute": "format",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "string",
|
|
134
|
+
"resolved": "string",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": true,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
},
|
|
143
|
+
"getter": false,
|
|
144
|
+
"setter": false,
|
|
145
|
+
"reflect": false
|
|
146
|
+
},
|
|
147
|
+
"wrapperId": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"attribute": "wrapper-id",
|
|
150
|
+
"mutable": false,
|
|
151
|
+
"complexType": {
|
|
152
|
+
"original": "string",
|
|
153
|
+
"resolved": "string",
|
|
154
|
+
"references": {}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": false,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": ""
|
|
161
|
+
},
|
|
162
|
+
"getter": false,
|
|
163
|
+
"setter": false,
|
|
164
|
+
"reflect": false
|
|
165
|
+
},
|
|
166
|
+
"isLoading": {
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"attribute": "is-loading",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "boolean",
|
|
172
|
+
"resolved": "boolean",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": true,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": ""
|
|
180
|
+
},
|
|
181
|
+
"getter": false,
|
|
182
|
+
"setter": false,
|
|
183
|
+
"reflect": false
|
|
184
|
+
},
|
|
185
|
+
"isDisabled": {
|
|
186
|
+
"type": "boolean",
|
|
187
|
+
"attribute": "is-disabled",
|
|
188
|
+
"mutable": false,
|
|
189
|
+
"complexType": {
|
|
190
|
+
"original": "boolean",
|
|
191
|
+
"resolved": "boolean",
|
|
192
|
+
"references": {}
|
|
193
|
+
},
|
|
194
|
+
"required": false,
|
|
195
|
+
"optional": true,
|
|
196
|
+
"docs": {
|
|
197
|
+
"tags": [],
|
|
198
|
+
"text": ""
|
|
199
|
+
},
|
|
200
|
+
"getter": false,
|
|
201
|
+
"setter": false,
|
|
202
|
+
"reflect": false
|
|
203
|
+
},
|
|
204
|
+
"form": {
|
|
205
|
+
"type": "unknown",
|
|
206
|
+
"attribute": "form",
|
|
207
|
+
"mutable": false,
|
|
208
|
+
"complexType": {
|
|
209
|
+
"original": "FormHook<any>",
|
|
210
|
+
"resolved": "FormHook<any>",
|
|
211
|
+
"references": {
|
|
212
|
+
"FormHook": {
|
|
213
|
+
"location": "import",
|
|
214
|
+
"path": "~features/form-hook/form-hook",
|
|
215
|
+
"id": "src/features/form-hook/form-hook.ts::FormHook"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"required": false,
|
|
220
|
+
"optional": false,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": ""
|
|
224
|
+
},
|
|
225
|
+
"getter": false,
|
|
226
|
+
"setter": false
|
|
227
|
+
},
|
|
228
|
+
"inputPrefix": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"attribute": "input-prefix",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "string",
|
|
234
|
+
"resolved": "string",
|
|
235
|
+
"references": {}
|
|
236
|
+
},
|
|
237
|
+
"required": false,
|
|
238
|
+
"optional": false,
|
|
239
|
+
"docs": {
|
|
240
|
+
"tags": [],
|
|
241
|
+
"text": ""
|
|
242
|
+
},
|
|
243
|
+
"getter": false,
|
|
244
|
+
"setter": false,
|
|
245
|
+
"reflect": false
|
|
246
|
+
},
|
|
247
|
+
"wrapperClass": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"attribute": "wrapper-class",
|
|
250
|
+
"mutable": false,
|
|
251
|
+
"complexType": {
|
|
252
|
+
"original": "string",
|
|
253
|
+
"resolved": "string",
|
|
254
|
+
"references": {}
|
|
255
|
+
},
|
|
256
|
+
"required": false,
|
|
257
|
+
"optional": false,
|
|
258
|
+
"docs": {
|
|
259
|
+
"tags": [],
|
|
260
|
+
"text": ""
|
|
261
|
+
},
|
|
262
|
+
"getter": false,
|
|
263
|
+
"setter": false,
|
|
264
|
+
"reflect": false
|
|
265
|
+
},
|
|
266
|
+
"staticValue": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"attribute": "static-value",
|
|
269
|
+
"mutable": false,
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "string",
|
|
272
|
+
"resolved": "string",
|
|
273
|
+
"references": {}
|
|
274
|
+
},
|
|
275
|
+
"required": false,
|
|
276
|
+
"optional": true,
|
|
277
|
+
"docs": {
|
|
278
|
+
"tags": [],
|
|
279
|
+
"text": ""
|
|
280
|
+
},
|
|
281
|
+
"getter": false,
|
|
282
|
+
"setter": false,
|
|
283
|
+
"reflect": false
|
|
284
|
+
},
|
|
285
|
+
"inputProps": {
|
|
286
|
+
"type": "any",
|
|
287
|
+
"attribute": "input-props",
|
|
288
|
+
"mutable": false,
|
|
289
|
+
"complexType": {
|
|
290
|
+
"original": "any",
|
|
291
|
+
"resolved": "any",
|
|
292
|
+
"references": {}
|
|
293
|
+
},
|
|
294
|
+
"required": false,
|
|
295
|
+
"optional": true,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [],
|
|
298
|
+
"text": ""
|
|
299
|
+
},
|
|
300
|
+
"getter": false,
|
|
301
|
+
"setter": false,
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "{}"
|
|
304
|
+
},
|
|
305
|
+
"max": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"attribute": "max",
|
|
308
|
+
"mutable": false,
|
|
309
|
+
"complexType": {
|
|
310
|
+
"original": "string | number[]",
|
|
311
|
+
"resolved": "number[] | string",
|
|
312
|
+
"references": {}
|
|
313
|
+
},
|
|
314
|
+
"required": false,
|
|
315
|
+
"optional": true,
|
|
316
|
+
"docs": {
|
|
317
|
+
"tags": [],
|
|
318
|
+
"text": ""
|
|
319
|
+
},
|
|
320
|
+
"getter": false,
|
|
321
|
+
"setter": false,
|
|
322
|
+
"reflect": false
|
|
323
|
+
},
|
|
324
|
+
"min": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"attribute": "min",
|
|
327
|
+
"mutable": false,
|
|
328
|
+
"complexType": {
|
|
329
|
+
"original": "string | number[]",
|
|
330
|
+
"resolved": "number[] | string",
|
|
331
|
+
"references": {}
|
|
332
|
+
},
|
|
333
|
+
"required": false,
|
|
334
|
+
"optional": true,
|
|
335
|
+
"docs": {
|
|
336
|
+
"tags": [],
|
|
337
|
+
"text": ""
|
|
338
|
+
},
|
|
339
|
+
"getter": false,
|
|
340
|
+
"setter": false,
|
|
341
|
+
"reflect": false
|
|
342
|
+
},
|
|
343
|
+
"type": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"attribute": "type",
|
|
346
|
+
"mutable": false,
|
|
347
|
+
"complexType": {
|
|
348
|
+
"original": "DateTypes",
|
|
349
|
+
"resolved": "\"date\" | \"datetime-local\" | \"time\"",
|
|
350
|
+
"references": {
|
|
351
|
+
"DateTypes": {
|
|
352
|
+
"location": "import",
|
|
353
|
+
"path": "~lib/decode-time-offset",
|
|
354
|
+
"id": "src/global/lib/decode-time-offset.ts::DateTypes"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"required": false,
|
|
359
|
+
"optional": true,
|
|
360
|
+
"docs": {
|
|
361
|
+
"tags": [],
|
|
362
|
+
"text": ""
|
|
363
|
+
},
|
|
364
|
+
"getter": false,
|
|
365
|
+
"setter": false,
|
|
366
|
+
"reflect": false,
|
|
367
|
+
"defaultValue": "'datetime-local'"
|
|
368
|
+
},
|
|
369
|
+
"defaultValue": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"attribute": "default-value",
|
|
372
|
+
"mutable": true,
|
|
373
|
+
"complexType": {
|
|
374
|
+
"original": "string",
|
|
375
|
+
"resolved": "string",
|
|
376
|
+
"references": {}
|
|
377
|
+
},
|
|
378
|
+
"required": false,
|
|
379
|
+
"optional": false,
|
|
380
|
+
"docs": {
|
|
381
|
+
"tags": [],
|
|
382
|
+
"text": ""
|
|
383
|
+
},
|
|
384
|
+
"getter": false,
|
|
385
|
+
"setter": false,
|
|
386
|
+
"reflect": false
|
|
387
|
+
},
|
|
388
|
+
"formatter": {
|
|
389
|
+
"type": "unknown",
|
|
390
|
+
"attribute": "formatter",
|
|
391
|
+
"mutable": false,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "(value: string) => string",
|
|
394
|
+
"resolved": "(value: string) => string",
|
|
395
|
+
"references": {}
|
|
396
|
+
},
|
|
397
|
+
"required": false,
|
|
398
|
+
"optional": true,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [],
|
|
401
|
+
"text": ""
|
|
402
|
+
},
|
|
403
|
+
"getter": false,
|
|
404
|
+
"setter": false
|
|
405
|
+
},
|
|
406
|
+
"icon": {
|
|
407
|
+
"type": "any",
|
|
408
|
+
"attribute": "icon",
|
|
409
|
+
"mutable": false,
|
|
410
|
+
"complexType": {
|
|
411
|
+
"original": "any",
|
|
412
|
+
"resolved": "any",
|
|
413
|
+
"references": {}
|
|
414
|
+
},
|
|
415
|
+
"required": false,
|
|
416
|
+
"optional": true,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": ""
|
|
420
|
+
},
|
|
421
|
+
"getter": false,
|
|
422
|
+
"setter": false,
|
|
423
|
+
"reflect": false
|
|
424
|
+
},
|
|
425
|
+
"iconAction": {
|
|
426
|
+
"type": "unknown",
|
|
427
|
+
"attribute": "icon-action",
|
|
428
|
+
"mutable": false,
|
|
429
|
+
"complexType": {
|
|
430
|
+
"original": "() => void",
|
|
431
|
+
"resolved": "() => void",
|
|
432
|
+
"references": {}
|
|
433
|
+
},
|
|
434
|
+
"required": false,
|
|
435
|
+
"optional": true,
|
|
436
|
+
"docs": {
|
|
437
|
+
"tags": [],
|
|
438
|
+
"text": ""
|
|
439
|
+
},
|
|
440
|
+
"getter": false,
|
|
441
|
+
"setter": false
|
|
442
|
+
},
|
|
443
|
+
"iconPosition": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"attribute": "icon-position",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "'start' | 'end'",
|
|
449
|
+
"resolved": "\"end\" | \"start\"",
|
|
450
|
+
"references": {}
|
|
451
|
+
},
|
|
452
|
+
"required": false,
|
|
453
|
+
"optional": true,
|
|
454
|
+
"docs": {
|
|
455
|
+
"tags": [],
|
|
456
|
+
"text": ""
|
|
457
|
+
},
|
|
458
|
+
"getter": false,
|
|
459
|
+
"setter": false,
|
|
460
|
+
"reflect": false,
|
|
461
|
+
"defaultValue": "'end'"
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
static get states() {
|
|
466
|
+
return {
|
|
467
|
+
"prefixWidth": {},
|
|
468
|
+
"displayedValue": {}
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
static get elementRef() { return "el"; }
|
|
472
|
+
static get watchers() {
|
|
473
|
+
return [{
|
|
474
|
+
"propName": "staticValue",
|
|
475
|
+
"methodName": "onStaticValueChange"
|
|
476
|
+
}];
|
|
477
|
+
}
|
|
478
|
+
}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { h } from "@stencil/core";
|
|
6
6
|
export class FormInput {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.type = 'string';
|
|
9
|
+
}
|
|
7
10
|
async handleNameChange(newName) {
|
|
8
11
|
this.form.validateForm(newName, this.value);
|
|
9
12
|
}
|
|
@@ -13,7 +16,7 @@ export class FormInput {
|
|
|
13
16
|
this.form.validateForm(this.name, newValue);
|
|
14
17
|
}
|
|
15
18
|
render() {
|
|
16
|
-
return h("input", { key: '
|
|
19
|
+
return h("input", { key: '78d94bf48cd98b488197e1f7839cf14b8fc42712', class: "shadow-input", type: this.type, hidden: true, name: this.name, value: this.value });
|
|
17
20
|
}
|
|
18
21
|
static get is() { return "form-shadow-input"; }
|
|
19
22
|
static get originalStyleUrls() {
|
|
@@ -89,6 +92,26 @@ export class FormInput {
|
|
|
89
92
|
},
|
|
90
93
|
"getter": false,
|
|
91
94
|
"setter": false
|
|
95
|
+
},
|
|
96
|
+
"type": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"attribute": "type",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "string",
|
|
102
|
+
"resolved": "string",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": true,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"getter": false,
|
|
112
|
+
"setter": false,
|
|
113
|
+
"reflect": false,
|
|
114
|
+
"defaultValue": "'string'"
|
|
92
115
|
}
|
|
93
116
|
};
|
|
94
117
|
}
|
|
@@ -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: '7db25de8392c182f045f3ff24647414dc1cfb901' }, h("div", { key: 'f23892982a3d6f63ac06927611b43d22eeebc8d7', dir: this.sharedLocales.direction, part: "form-structure-error-container", class: "form-structure-error-container" }, h("div", { key: '99d0c58ceeec05ea9e4bbb3fbba5f0e31acaa087', 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() {
|
|
@@ -21,9 +21,9 @@ export class FormSubmit {
|
|
|
21
21
|
render() {
|
|
22
22
|
const [locale] = this.form.getFormLocale();
|
|
23
23
|
const submitText = getNestedValue(locale, this.submitTextKey) || getNestedValue(locale, 'sharedFormLocales.submit') || 'Submit';
|
|
24
|
-
return (h("button", { key: '
|
|
24
|
+
return (h("button", { key: '6623c7443f11a2b52efa7aec6899d1e34090fd5f', type: "submit", formnovalidate: true, part: buttonSubscriberKey, disabled: this.isLoading, class: cn('form-submit', {
|
|
25
25
|
loading: this.isLoading,
|
|
26
|
-
}) }, h("div", { key: '
|
|
26
|
+
}) }, h("div", { key: '916a453420a7071f30a2d2e53a88869c2aff3862', part: "form-submit-text", class: "opacity-0 form-submit-text-style" }, submitText), h("div", { key: '12603648db6362a933eaaf93c17226b5e668afca', part: "form-submit-text", class: "form-submit-text-style form-submit-text-position" }, submitText), h("div", { key: '307c45086b22cf0cb1b071eb93d6ef3321870df8', part: "form-submit-loading-container", class: "form-submit-loading-container" }, h("img", { key: '55ec7f07d7cd4372c5fb5061ebd30c97d664ea90', part: "form-submit-loading-icon", class: "form-submit-loading-icon", src: Loader }))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "form-submit"; }
|
|
29
29
|
static get originalStyleUrls() {
|
|
@@ -28,7 +28,7 @@ export class FormSwitch {
|
|
|
28
28
|
const { disabled, meta, errorMessage, isError } = this.form.getInputState(this.name);
|
|
29
29
|
const [locale] = this.form.getFormLocale();
|
|
30
30
|
const label = getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.label) || (meta === null || meta === void 0 ? void 0 : meta.label);
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: 'cdb534484bc473a634e6755e9c2e80e7ec9fe6ff' }, h("div", { key: 'fd0f6be89414c7428c86d1e42ce509454d9a2a5c', part: `${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, disabled) }, h("div", { key: '81c588dd1710b7b29ed767d3201d145a9014f1d9', part: `${this.name}-container form-input-container`, class: "form-input-container" }, h("shift-switch", { key: '1a45cd794444116750c43d058b7f047a4e46060a', name: this.name, label: label, class: "form-switch" })), h(FormErrorMessage, { key: '3a15b11afd74132642cea3b9e7db5d688263ced7', name: this.name, isError: isError, errorMessage: locale[errorMessage] || errorMessage }))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "form-switch"; }
|
|
34
34
|
static get originalStyleUrls() {
|
|
@@ -39,9 +39,9 @@ export class FormTextArea {
|
|
|
39
39
|
const label = getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.label) || (meta === null || meta === void 0 ? void 0 : meta.label);
|
|
40
40
|
const placeholder = getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.placeholder);
|
|
41
41
|
const isDisabled = disabled || this.isLoading || !!this.staticValue || this.isDisabled;
|
|
42
|
-
return (h(Host, { key: '
|
|
42
|
+
return (h(Host, { key: '2abbca4df605994309adb2728b12a8e8fbce49c7' }, h("label", { key: '5302017f95d7e42da25b9d524fdf61a6ee839d5d', part: `${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: isDisabled }) }, h(FormInputLabel, { key: '67a31c1a3467402709d388df7cb7f04264065ff7', name: this.name, isRequired: isRequired, label: label }), h("div", { key: '159ea7b8c00d16b494d2c73e8197984b03657cc8', part: `${this.name}-container form-input-container`, class: "form-input-container" }, h("textarea", { key: '91b158f2a12a029a836a5643ab926afbb8479fa7', 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, {
|
|
43
43
|
'form-input-error-style': isError,
|
|
44
|
-
}) }, this.defaultValue)), h("div", { key: '
|
|
44
|
+
}) }, this.defaultValue)), h("div", { key: 'bd90efc257539f9789efa8d00318130aa8e46aef', class: "-mt-1" }, h(FormErrorMessage, { key: '9d7e74c82e7f63da3ace773758f3aa444c0d833a', name: this.name, isError: isError, errorMessage: locale[errorMessage] || errorMessage })))));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "form-text-area"; }
|
|
47
47
|
static get originalStyleUrls() {
|