@everymatrix/general-input 1.87.0 → 1.87.2
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/checkbox-group-input_14.cjs.entry.js +310 -86
- package/dist/cjs/general-input.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/date-input/date-input.js +60 -3
- package/dist/collection/components/general-input/general-input.js +41 -5
- package/dist/collection/components/password-input/password-input.css +52 -0
- package/dist/collection/components/password-input/password-input.js +31 -3
- package/dist/collection/components/text-input/text-input.js +133 -33
- package/dist/collection/components/twofa-input/twofa-input.js +105 -40
- package/dist/collection/utils/locale.utils.js +77 -5
- package/dist/esm/checkbox-group-input_14.entry.js +310 -86
- package/dist/esm/general-input.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/general-input/checkbox-group-input_14.entry.js +239 -239
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/types/components/date-input/date-input.d.ts +7 -0
- package/dist/types/components/general-input/general-input.d.ts +8 -0
- package/dist/types/components/password-input/password-input.d.ts +5 -0
- package/dist/types/components/text-input/text-input.d.ts +12 -1
- package/dist/types/components/twofa-input/twofa-input.d.ts +12 -1
- package/dist/types/components.d.ts +56 -0
- package/dist/types/utils/locale.utils.d.ts +28 -0
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["checkbox-group-input_14.cjs",[[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"noValidation":[516,"no-validation"],"clientStyling":[520,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"dateFormat":[513,"date-format"],"translationUrl":[513,"translation-url"],"emitOnClick":[516,"emit-on-click"],"twofaDestination":[513,"twofa-destination"],"twofaResendIntervalSeconds":[514,"twofa-resend-interval-seconds"],"haspostalcodelookup":[516],"postalcodelength":[514],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"]}],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32],"showCheckboxes":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"selectedValues":["setValue"],"emitValue":["emitValueHandler"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"emitOnClick":[516,"emit-on-click"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"noValidation":[516,"no-validation"],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"value":["valueChanged"],"emitValue":["emitValueHandler"]}],[1,"postalcode-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"postalcodelength":[520],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32],"currentPostalCode":[32],"openAddressDropdown":[32],"showNoResultsMessage":[32],"refreshTrigger":[32],"isFetchingAddresses":[32]},[[10,"click","handleClickOutside"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[8,"addressFetchStarted","handleFetchStarted"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"addresses":["handleAddresses"]}],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"disablePhonePrefix":[32],"phoneValue":[32],"phoneCodesOptions":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"haspostalcodelookup":[516],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"],[16,"validationChange","handleValidationChange"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[16,"sendAddressValue","handleAddressSelection"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"twofa-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"destination":[513],"resendIntervalSeconds":[514,"resend-interval-seconds"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32],"isValid":[32],"isResendButtonAvailable":[32],"showTooltip":[32],"errorMessage":[32],"code":[32],"resendIntervalSecondsLeft":[32]},[[10,"click","handleClickOutside"]],{"
|
|
22
|
+
return index.bootstrapLazy([["checkbox-group-input_14.cjs",[[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"noValidation":[516,"no-validation"],"clientStyling":[520,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"dateFormat":[513,"date-format"],"translationUrl":[513,"translation-url"],"emitOnClick":[516,"emit-on-click"],"twofaDestination":[513,"twofa-destination"],"twofaResendIntervalSeconds":[514,"twofa-resend-interval-seconds"],"haspostalcodelookup":[516],"postalcodelength":[514],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"pinAttemptsExceeded":[516,"pin-attempts-exceeded"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"]}],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32],"showCheckboxes":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"selectedValues":["setValue"],"emitValue":["emitValueHandler"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"emitOnClick":[516,"emit-on-click"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"enableSouthAfricanMode":["handleCustomRegistrationChange"]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"noValidation":[516,"no-validation"],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"clientStyling":[513,"client-styling"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"value":["valueChanged"],"emitValue":["emitValueHandler"]}],[1,"postalcode-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"postalcodelength":[520],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32],"currentPostalCode":[32],"openAddressDropdown":[32],"showNoResultsMessage":[32],"refreshTrigger":[32],"isFetchingAddresses":[32]},[[10,"click","handleClickOutside"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[8,"addressFetchStarted","handleFetchStarted"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"addresses":["handleAddresses"]}],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"disablePhonePrefix":[32],"phoneValue":[32],"phoneCodesOptions":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"haspostalcodelookup":[516],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"],[16,"validationChange","handleValidationChange"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[16,"sendAddressValue","handleAddressSelection"],[8,"documentNumberUpdatedExternally","handleExternalDocUpdate"],[8,"documentNumberResetValidation","handleDocReset"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"twofa-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"destination":[513],"resendIntervalSeconds":[514,"resend-interval-seconds"],"clientStyling":[513,"client-styling"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"pinAttemptsExceeded":[516,"pin-attempts-exceeded"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32],"isValid":[32],"isResendButtonAvailable":[32],"showTooltip":[32],"errorMessage":[32],"code":[32],"resendIntervalSecondsLeft":[32],"revealedIndexes":[32]},[[10,"click","handleClickOutside"]],{"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"clientStylingUrl":["handleStylingUrlChange"],"clientStyling":["handleStylingChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["checkbox-group-input_14.cjs",[[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"noValidation":[516,"no-validation"],"clientStyling":[520,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"dateFormat":[513,"date-format"],"translationUrl":[513,"translation-url"],"emitOnClick":[516,"emit-on-click"],"twofaDestination":[513,"twofa-destination"],"twofaResendIntervalSeconds":[514,"twofa-resend-interval-seconds"],"haspostalcodelookup":[516],"postalcodelength":[514],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"]}],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32],"showCheckboxes":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"selectedValues":["setValue"],"emitValue":["emitValueHandler"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"emitOnClick":[516,"emit-on-click"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"noValidation":[516,"no-validation"],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"value":["valueChanged"],"emitValue":["emitValueHandler"]}],[1,"postalcode-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"postalcodelength":[520],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32],"currentPostalCode":[32],"openAddressDropdown":[32],"showNoResultsMessage":[32],"refreshTrigger":[32],"isFetchingAddresses":[32]},[[10,"click","handleClickOutside"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[8,"addressFetchStarted","handleFetchStarted"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"addresses":["handleAddresses"]}],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"disablePhonePrefix":[32],"phoneValue":[32],"phoneCodesOptions":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"haspostalcodelookup":[516],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"],[16,"validationChange","handleValidationChange"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[16,"sendAddressValue","handleAddressSelection"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"twofa-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"destination":[513],"resendIntervalSeconds":[514,"resend-interval-seconds"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32],"isValid":[32],"isResendButtonAvailable":[32],"showTooltip":[32],"errorMessage":[32],"code":[32],"resendIntervalSecondsLeft":[32]},[[10,"click","handleClickOutside"]],{"
|
|
11
|
+
return index.bootstrapLazy([["checkbox-group-input_14.cjs",[[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"tooltip":[513],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"noValidation":[516,"no-validation"],"clientStyling":[520,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"dateFormat":[513,"date-format"],"translationUrl":[513,"translation-url"],"emitOnClick":[516,"emit-on-click"],"twofaDestination":[513,"twofa-destination"],"twofaResendIntervalSeconds":[514,"twofa-resend-interval-seconds"],"haspostalcodelookup":[516],"postalcodelength":[514],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"pinAttemptsExceeded":[516,"pin-attempts-exceeded"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}],[1,"toggle-checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"options":[16],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"showFields":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"]}],[1,"checkbox-group-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedValues":[32],"showCheckboxes":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"selectedValues":["setValue"],"emitValue":["emitValueHandler"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"dateFormat":[513,"date-format"],"emitOnClick":[516,"emit-on-click"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"enableSouthAfricanMode":["handleCustomRegistrationChange"]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"validation":[16],"noValidation":[516,"no-validation"],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"hidePasswordComplexity":[516,"hide-password-complexity"],"clientStyling":[513,"client-styling"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"passwordComplexity":[32],"showPopup":[32],"value":[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"value":["valueChanged"],"emitValue":["emitValueHandler"]}],[1,"postalcode-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"postalcodelength":[520],"addresses":[520],"ignoreCountry":[516,"ignore-country"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32],"currentPostalCode":[32],"openAddressDropdown":[32],"showNoResultsMessage":[32],"refreshTrigger":[32],"isFetchingAddresses":[32]},[[10,"click","handleClickOutside"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[8,"addressFetchStarted","handleFetchStarted"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"addresses":["handleAddresses"]}],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32],"showTooltip":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[520,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"disablePhonePrefix":[32],"phoneValue":[32],"phoneCodesOptions":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"tooltip":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"haspostalcodelookup":[516],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32],"showTooltip":[32],"selectedCountryCode":[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"],[16,"validationChange","handleValidationChange"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[16,"sendAddressValue","handleAddressSelection"],[8,"documentNumberUpdatedExternally","handleExternalDocUpdate"],[8,"documentNumberResetValidation","handleDocReset"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}],[1,"twofa-input",{"name":[513],"displayName":[513,"display-name"],"placeholder":[513],"validation":[16],"tooltip":[513],"language":[513],"emitValue":[516,"emit-value"],"destination":[513],"resendIntervalSeconds":[514,"resend-interval-seconds"],"clientStyling":[513,"client-styling"],"enableSouthAfricanMode":[516,"enable-south-african-mode"],"pinAttemptsExceeded":[516,"pin-attempts-exceeded"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"limitStylingAppends":[32],"isValid":[32],"isResendButtonAvailable":[32],"showTooltip":[32],"errorMessage":[32],"code":[32],"resendIntervalSecondsLeft":[32],"revealedIndexes":[32]},[[10,"click","handleClickOutside"]],{"isValid":["validityChanged"],"emitValue":["emitValueHandler"],"clientStylingUrl":["handleStylingUrlChange"],"clientStyling":["handleStylingChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { translate } from "../../utils/locale.utils";
|
|
2
|
+
import { translate, CONSTANTS } from "../../utils/locale.utils";
|
|
3
3
|
import tooltipIcon from "../../utils/tooltipIcon.svg";
|
|
4
4
|
import dateFnsFormat from "date-fns/format";
|
|
5
5
|
import dateFnsParse from "date-fns/parse";
|
|
@@ -21,6 +21,21 @@ export class DateInput {
|
|
|
21
21
|
sheet.innerHTML = this.clientStyling;
|
|
22
22
|
this.stylingContainer.prepend(sheet);
|
|
23
23
|
};
|
|
24
|
+
this.handleDocumentIdUpdate = (e) => {
|
|
25
|
+
if (this.name !== CONSTANTS.BIRTHDATE) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const dateStr = e.detail;
|
|
29
|
+
this.value = dateStr;
|
|
30
|
+
this.valueAsDate = dateFnsParse(this.value || '', CONSTANTS.DATE_FORMAT, new Date());
|
|
31
|
+
this.touched = true;
|
|
32
|
+
if (this.datePicker) {
|
|
33
|
+
this.datePicker.value = this.value;
|
|
34
|
+
}
|
|
35
|
+
this.isValid = this.setValidity();
|
|
36
|
+
this.errorMessage = this.setErrorMessage();
|
|
37
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
38
|
+
};
|
|
24
39
|
this.name = undefined;
|
|
25
40
|
this.displayName = undefined;
|
|
26
41
|
this.placeholder = undefined;
|
|
@@ -33,6 +48,7 @@ export class DateInput {
|
|
|
33
48
|
this.clientStyling = '';
|
|
34
49
|
this.dateFormat = 'yyyy-MM-dd';
|
|
35
50
|
this.emitOnClick = false;
|
|
51
|
+
this.enableSouthAfricanMode = undefined;
|
|
36
52
|
this.errorMessage = undefined;
|
|
37
53
|
this.isValid = undefined;
|
|
38
54
|
this.limitStylingAppends = false;
|
|
@@ -62,6 +78,14 @@ export class DateInput {
|
|
|
62
78
|
this.valueHandler({ name: this.name, value: this.value });
|
|
63
79
|
}
|
|
64
80
|
}
|
|
81
|
+
handleCustomRegistrationChange(newValue) {
|
|
82
|
+
if (newValue) {
|
|
83
|
+
window.addEventListener('documentIdUpdated', this.handleDocumentIdUpdate);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
window.removeEventListener('documentIdUpdated', this.handleDocumentIdUpdate);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
65
89
|
valueHandler(inputValueEvent) {
|
|
66
90
|
this.sendInputValue.emit(inputValueEvent);
|
|
67
91
|
}
|
|
@@ -105,6 +129,9 @@ export class DateInput {
|
|
|
105
129
|
}
|
|
106
130
|
});
|
|
107
131
|
}
|
|
132
|
+
if (this.enableSouthAfricanMode) {
|
|
133
|
+
window.addEventListener('documentIdUpdated', this.handleDocumentIdUpdate);
|
|
134
|
+
}
|
|
108
135
|
this.datePicker.i18n = Object.assign(Object.assign({}, this.datePicker.i18n), { formatDate: this.formatDate, parseDate: this.parseDate });
|
|
109
136
|
if (this.defaultValue) {
|
|
110
137
|
this.value = this.defaultValue;
|
|
@@ -112,6 +139,11 @@ export class DateInput {
|
|
|
112
139
|
}
|
|
113
140
|
this.isValid = this.setValidity();
|
|
114
141
|
}
|
|
142
|
+
disconnectedCallback() {
|
|
143
|
+
if (this.enableSouthAfricanMode) {
|
|
144
|
+
window.removeEventListener('documentIdUpdated', this.handleDocumentIdUpdate);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
115
147
|
handleCalendarIconClick() {
|
|
116
148
|
if (this.datePicker.opened && this.emitOnClick) {
|
|
117
149
|
window.postMessage({ type: `registration${this.name}Clicked` }, window.location.href);
|
|
@@ -124,6 +156,11 @@ export class DateInput {
|
|
|
124
156
|
this.isValid = this.setValidity();
|
|
125
157
|
this.errorMessage = this.setErrorMessage();
|
|
126
158
|
this.emitValueHandler(true);
|
|
159
|
+
if (this.enableSouthAfricanMode) {
|
|
160
|
+
window.dispatchEvent(new CustomEvent('birthDateUpdated', {
|
|
161
|
+
detail: { birthDate: this.value }
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
127
164
|
}
|
|
128
165
|
setValidity() {
|
|
129
166
|
if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate) || !isMatch(this.formattedValue, this.dateFormat)) {
|
|
@@ -158,8 +195,8 @@ export class DateInput {
|
|
|
158
195
|
if (this.touched) {
|
|
159
196
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
160
197
|
}
|
|
161
|
-
return h("div", { key: '
|
|
162
|
-
h("img", { key: '
|
|
198
|
+
return h("div", { key: '9399c1be2edcbe3ed5c0e133cad52b1917e77e96', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '1094491a5fc441c4f704441d376ed965d6946637', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: '8c922586399999885841ede07e46b715b2f6760f', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e) }), h("small", { key: '67c1b6a0daafee536ab7179d1fe90a2870bb12b1', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
|
|
199
|
+
h("img", { key: '4d02f23affc8ce9f5eb41a44fd2f346960c6d458', class: 'date__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
163
200
|
}
|
|
164
201
|
static get is() { return "date-input"; }
|
|
165
202
|
static get encapsulation() { return "shadow"; }
|
|
@@ -385,6 +422,23 @@ export class DateInput {
|
|
|
385
422
|
"attribute": "emit-on-click",
|
|
386
423
|
"reflect": true,
|
|
387
424
|
"defaultValue": "false"
|
|
425
|
+
},
|
|
426
|
+
"enableSouthAfricanMode": {
|
|
427
|
+
"type": "boolean",
|
|
428
|
+
"mutable": false,
|
|
429
|
+
"complexType": {
|
|
430
|
+
"original": "boolean",
|
|
431
|
+
"resolved": "boolean",
|
|
432
|
+
"references": {}
|
|
433
|
+
},
|
|
434
|
+
"required": false,
|
|
435
|
+
"optional": false,
|
|
436
|
+
"docs": {
|
|
437
|
+
"tags": [],
|
|
438
|
+
"text": "Enable South African registration mode"
|
|
439
|
+
},
|
|
440
|
+
"attribute": "enable-south-african-mode",
|
|
441
|
+
"reflect": true
|
|
388
442
|
}
|
|
389
443
|
};
|
|
390
444
|
}
|
|
@@ -452,6 +506,9 @@ export class DateInput {
|
|
|
452
506
|
}, {
|
|
453
507
|
"propName": "emitValue",
|
|
454
508
|
"methodName": "emitValueHandler"
|
|
509
|
+
}, {
|
|
510
|
+
"propName": "enableSouthAfricanMode",
|
|
511
|
+
"methodName": "handleCustomRegistrationChange"
|
|
455
512
|
}];
|
|
456
513
|
}
|
|
457
514
|
static get listeners() {
|
|
@@ -61,6 +61,8 @@ export class GeneralInput {
|
|
|
61
61
|
this.postalcodelength = undefined;
|
|
62
62
|
this.addresses = [];
|
|
63
63
|
this.ignoreCountry = false;
|
|
64
|
+
this.enableSouthAfricanMode = undefined;
|
|
65
|
+
this.pinAttemptsExceeded = undefined;
|
|
64
66
|
this.mbSource = undefined;
|
|
65
67
|
this.limitStylingAppends = false;
|
|
66
68
|
}
|
|
@@ -104,7 +106,7 @@ export class GeneralInput {
|
|
|
104
106
|
return h("postalcode-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, postalcodelength: this.postalcodelength, addresses: this.addresses, ignoreCountry: this.ignoreCountry });
|
|
105
107
|
}
|
|
106
108
|
else {
|
|
107
|
-
return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, haspostalcodelookup: this.haspostalcodelookup });
|
|
109
|
+
return h("text-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, haspostalcodelookup: this.haspostalcodelookup, "enable-south-african-mode": this.enableSouthAfricanMode });
|
|
108
110
|
}
|
|
109
111
|
case 'email':
|
|
110
112
|
return h("email-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
|
|
@@ -117,9 +119,9 @@ export class GeneralInput {
|
|
|
117
119
|
case 'togglecheckbox':
|
|
118
120
|
return h("toggle-checkbox-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, options: this.options, "emit-on-click": this.emitOnClick });
|
|
119
121
|
case 'datetime':
|
|
120
|
-
return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, dateFormat: this.dateFormat, "emit-on-click": this.emitOnClick });
|
|
122
|
+
return h("date-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, dateFormat: this.dateFormat, "emit-on-click": this.emitOnClick, "enable-south-african-mode": this.enableSouthAfricanMode });
|
|
121
123
|
case 'password':
|
|
122
|
-
return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, hidePasswordComplexity: this.hidePasswordComplexity, "no-validation": this.noValidation, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
|
|
124
|
+
return h("password-input", { name: this.name, displayName: this.displayName, validation: this.validation, defaultValue: this.defaultValue, autofilled: this.autofilled, emitValue: this.emitValue, language: this.language, isDuplicateInput: this.isDuplicateInput, hidePasswordComplexity: this.hidePasswordComplexity, "no-validation": this.noValidation, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder, "enable-south-african-mode": this.enableSouthAfricanMode });
|
|
123
125
|
case 'radio':
|
|
124
126
|
return h("radio-input", { name: this.name, displayName: this.displayName, optionsGroup: this.options, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling });
|
|
125
127
|
case 'tel':
|
|
@@ -127,13 +129,13 @@ export class GeneralInput {
|
|
|
127
129
|
case 'dropdown':
|
|
128
130
|
return h("select-input", { name: this.name, action: this.action, defaultValue: this.defaultValue, displayName: this.displayName, options: this.options, validation: this.validation, emitValue: this.emitValue, autofilled: this.autofilled, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, placeholder: this.placeholder });
|
|
129
131
|
case 'twofa':
|
|
130
|
-
return h("twofa-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, destination: this.twofaDestination, "resend-interval-seconds": this.twofaResendIntervalSeconds, "mb-source": this.mbSource });
|
|
132
|
+
return h("twofa-input", { name: this.name, displayName: this.displayName, validation: this.validation, emitValue: this.emitValue, language: this.language, "client-styling": this.clientStyling, tooltip: this.tooltip, destination: this.twofaDestination, "resend-interval-seconds": this.twofaResendIntervalSeconds, "enable-south-african-mode": this.enableSouthAfricanMode, "pin-attempts-exceeded": this.pinAttemptsExceeded, "mb-source": this.mbSource });
|
|
131
133
|
default:
|
|
132
134
|
return h("p", null, "The ", this.type, " input type is not valid");
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
render() {
|
|
136
|
-
return (h(Host, { key: '
|
|
138
|
+
return (h(Host, { key: '7d036183d9376203451d9805e76b608cfa63570b', class: `general-input--${this.name}`, onClick: this.handleClick }, this.renderInput()));
|
|
137
139
|
}
|
|
138
140
|
static get is() { return "general-input"; }
|
|
139
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -605,6 +607,40 @@ export class GeneralInput {
|
|
|
605
607
|
"reflect": true,
|
|
606
608
|
"defaultValue": "false"
|
|
607
609
|
},
|
|
610
|
+
"enableSouthAfricanMode": {
|
|
611
|
+
"type": "boolean",
|
|
612
|
+
"mutable": false,
|
|
613
|
+
"complexType": {
|
|
614
|
+
"original": "boolean",
|
|
615
|
+
"resolved": "boolean",
|
|
616
|
+
"references": {}
|
|
617
|
+
},
|
|
618
|
+
"required": false,
|
|
619
|
+
"optional": false,
|
|
620
|
+
"docs": {
|
|
621
|
+
"tags": [],
|
|
622
|
+
"text": "Enable South African registration mode"
|
|
623
|
+
},
|
|
624
|
+
"attribute": "enable-south-african-mode",
|
|
625
|
+
"reflect": true
|
|
626
|
+
},
|
|
627
|
+
"pinAttemptsExceeded": {
|
|
628
|
+
"type": "boolean",
|
|
629
|
+
"mutable": false,
|
|
630
|
+
"complexType": {
|
|
631
|
+
"original": "boolean",
|
|
632
|
+
"resolved": "boolean",
|
|
633
|
+
"references": {}
|
|
634
|
+
},
|
|
635
|
+
"required": false,
|
|
636
|
+
"optional": false,
|
|
637
|
+
"docs": {
|
|
638
|
+
"tags": [],
|
|
639
|
+
"text": "If user has exceeded failed pin attempts"
|
|
640
|
+
},
|
|
641
|
+
"attribute": "pin-attempts-exceeded",
|
|
642
|
+
"reflect": true
|
|
643
|
+
},
|
|
608
644
|
"mbSource": {
|
|
609
645
|
"type": "string",
|
|
610
646
|
"mutable": false,
|
|
@@ -190,4 +190,56 @@
|
|
|
190
190
|
}
|
|
191
191
|
.password__tooltip.visible {
|
|
192
192
|
opacity: 1;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.customreg-password__complexity {
|
|
196
|
+
background: var(--emw--color-white, #FFFFFF);
|
|
197
|
+
border-radius: 6px;
|
|
198
|
+
padding: 14px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.customreg-password__complexity--title {
|
|
202
|
+
font-size: var(--emw--font-size-small, 14px);
|
|
203
|
+
color: var(--emw--color-black, #000000);
|
|
204
|
+
margin-bottom: 12px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.customreg-password__complexity--rules {
|
|
208
|
+
display: flex;
|
|
209
|
+
flex-direction: column;
|
|
210
|
+
gap: 10px;
|
|
211
|
+
font-size: var(--emw--font-size-small-xs, 12px);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.customreg-password__complexity--rule {
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
color: var(--emw--color-black, #000000);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.customreg-password__complexity--icon {
|
|
221
|
+
width: 20px;
|
|
222
|
+
height: 20px;
|
|
223
|
+
min-width: 20px;
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
font-size: 12px;
|
|
228
|
+
font-weight: bold;
|
|
229
|
+
border-radius: 50%;
|
|
230
|
+
margin-right: 10px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.customreg-password__complexity--icon.failed {
|
|
234
|
+
background-color: var(--emw--color-error, #FD2839);
|
|
235
|
+
color: var(--emw--color-white, #FFFFFF);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.customreg-password__complexity--icon.passed {
|
|
239
|
+
background-color: var(--emw--color-lottoball-green, #01af15);
|
|
240
|
+
color: var(--emw--color-white, #FFFFFF);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.customreg-password__complexity::after {
|
|
244
|
+
display: none;
|
|
193
245
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { translate } from "../../utils/locale.utils";
|
|
2
|
+
import { translate, STATUS_ICONS, CONSTANTS } from "../../utils/locale.utils";
|
|
3
3
|
import tooltipIcon from "../../utils/tooltipIcon.svg";
|
|
4
4
|
export class PasswordInput {
|
|
5
5
|
constructor() {
|
|
@@ -54,6 +54,7 @@ export class PasswordInput {
|
|
|
54
54
|
this.isDuplicateInput = undefined;
|
|
55
55
|
this.hidePasswordComplexity = false;
|
|
56
56
|
this.clientStyling = '';
|
|
57
|
+
this.enableSouthAfricanMode = undefined;
|
|
57
58
|
this.isValid = undefined;
|
|
58
59
|
this.errorMessage = undefined;
|
|
59
60
|
this.limitStylingAppends = false;
|
|
@@ -232,13 +233,23 @@ export class PasswordInput {
|
|
|
232
233
|
return (h("div", { key: index }, h("input", { class: 'password__complexity--checkbox', type: "checkbox", checked: complexity.passed, disabled: true }), h("span", null, translate(`${complexity.ruleKey}`, this.language) ? translate(`${complexity.ruleKey}`, this.language) : complexity.rule)));
|
|
233
234
|
}))));
|
|
234
235
|
}
|
|
236
|
+
renderCustomComplexityPopup() {
|
|
237
|
+
return (h("div", { class: `customreg-password__complexity ${!this.showPopup ? 'customreg-password__complexity--hidden' : ''}` }, h("p", { class: 'customreg-password__complexity--title' }, translate('PasswordMustContain', this.language)), h("div", { class: 'customreg-password__complexity--rules' }, this.passwordComplexity.map((complexity, index) => (h("div", { class: 'customreg-password__complexity--rule', key: index }, h("span", { class: `customreg-password__complexity--icon ${complexity.passed
|
|
238
|
+
? CONSTANTS.PASSWORD_COMPLEXITY_PASSED : CONSTANTS.PASSWORD_COMPLEXITY_FAILED}` }, complexity.passed ? STATUS_ICONS.PASSED : STATUS_ICONS.FAILED), h("span", null, translate(complexity.ruleKey, this.language) || complexity.rule)))))));
|
|
239
|
+
}
|
|
235
240
|
render() {
|
|
236
241
|
let invalidClass = '';
|
|
237
242
|
if (this.touched) {
|
|
238
243
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
239
244
|
}
|
|
240
|
-
return h("div", { key: '
|
|
241
|
-
h("img", { key: '
|
|
245
|
+
return h("div", { key: 'c2dd473e71853ebb3d0b5b6245af606f75f8b479', class: `password__wrapper ${this.autofilled ? 'password__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '4ba641a832be3b8efb1957af5f45eb7b7cc69adc', class: 'password__wrapper--flex' }, h("label", { key: 'a4440e8b59a743831fa833d8e1c680c01cfcb93e', class: `password__label ${this.validation.mandatory ? 'password__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '2e194f2096a69bc691694be0ac49004a54aa3cde', class: 'password__wrapper--relative' }, this.tooltip &&
|
|
246
|
+
h("img", { key: 'eafce2331ec867fcd8abc253d3605f5214557b8b', class: 'password__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("vaadin-password-field", { key: '0f1c9cd805fd9794de896c33a85abe12c9473d00', type: "password", id: `${this.name}__input`, class: `password__input ${invalidClass}`, name: this.name, readOnly: this.autofilled, value: this.defaultValue, required: this.validation.mandatory, maxlength: this.validation.maxLength, minlength: this.validation.minLength, pattern: this.validationPattern, placeholder: `${this.placeholder}`, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus }), !this.noValidation && h("small", { key: 'd20a6946d4757da4311f33b2770079cc7f80bcfa', class: 'password__error-message' }, this.errorMessage), this.passwordComplexity &&
|
|
247
|
+
this.showPopup &&
|
|
248
|
+
!this.hidePasswordComplexity &&
|
|
249
|
+
!this.isDuplicateInput &&
|
|
250
|
+
(this.enableSouthAfricanMode
|
|
251
|
+
? this.renderCustomComplexityPopup()
|
|
252
|
+
: this.renderComplexityPopup()));
|
|
242
253
|
}
|
|
243
254
|
static get is() { return "password-input"; }
|
|
244
255
|
static get encapsulation() { return "shadow"; }
|
|
@@ -482,6 +493,23 @@ export class PasswordInput {
|
|
|
482
493
|
"attribute": "client-styling",
|
|
483
494
|
"reflect": true,
|
|
484
495
|
"defaultValue": "''"
|
|
496
|
+
},
|
|
497
|
+
"enableSouthAfricanMode": {
|
|
498
|
+
"type": "boolean",
|
|
499
|
+
"mutable": false,
|
|
500
|
+
"complexType": {
|
|
501
|
+
"original": "boolean",
|
|
502
|
+
"resolved": "boolean",
|
|
503
|
+
"references": {}
|
|
504
|
+
},
|
|
505
|
+
"required": false,
|
|
506
|
+
"optional": false,
|
|
507
|
+
"docs": {
|
|
508
|
+
"tags": [],
|
|
509
|
+
"text": "Enable South African registration mode"
|
|
510
|
+
},
|
|
511
|
+
"attribute": "enable-south-african-mode",
|
|
512
|
+
"reflect": true
|
|
485
513
|
}
|
|
486
514
|
};
|
|
487
515
|
}
|