@everymatrix/general-registration 1.80.10 → 1.80.11
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 → checkbox-group-input_15.cjs.entry.js} +618 -42
- package/dist/cjs/general-registration.cjs.js +1 -1
- package/dist/cjs/index-14a0d114.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/general-registration/general-registration.js +229 -24
- package/dist/esm/{checkbox-group-input_14.entry.js → checkbox-group-input_15.entry.js} +618 -43
- package/dist/esm/general-registration.js +1 -1
- package/dist/esm/index-7dc4a1f4.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/general-registration/{checkbox-group-input_14.entry.js → checkbox-group-input_15.entry.js} +124 -124
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/types/components/general-registration/general-registration.d.ts +21 -2
- package/dist/types/components.d.ts +8 -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-
|
|
22
|
+
return index.bootstrapLazy([["checkbox-group-input_15.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"mbSource":[1,"mb-source"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dateFormat":[513,"date-format"],"buttonInsideForm":[516,"button-inside-form"],"btag":[513],"emitOnClick":[516,"emit-on-click"],"haspostalcodelookup":[516],"errorMessage":[32],"isFormValid":[32],"isConsentValid":[32],"isConsentReady":[32],"isLoading":[32],"isLoadingPOST":[32],"registrationStep":[32],"forms":[32],"limitStylingAppends":[32],"autofilled":[32],"isInitalInteraction":[32],"addresses":[32],"addressUpdateKey":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"],[0,"sendAddressValue","handleAddressSelection"],[8,"countryCodeUpdated","handleCountryCodeUpdateGlobal"],[0,"resendCode","handleRequestTwofa"],[8,"message","messageHandler"]],{"registrationStep":["sendStep"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"],"forms":["setFormValidity"],"btag":["addBtag"]}],[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"],"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]}],[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],"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"],"limitStylingAppends":[32],"isValid":[32],"isResendButtonAvailable":[32],"showTooltip":[32],"errorMessage":[32],"code":[32],"resendIntervalSecondsLeft":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
71
71
|
}
|
|
72
72
|
switch(bundleId) {
|
|
73
73
|
|
|
74
|
-
case 'checkbox-group-
|
|
74
|
+
case 'checkbox-group-input_15.cjs':
|
|
75
75
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
76
76
|
/* webpackMode: "lazy" */
|
|
77
|
-
'./checkbox-group-
|
|
77
|
+
'./checkbox-group-input_15.cjs.entry.js')); }).then(processMod, consoleError);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
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-
|
|
11
|
+
return index.bootstrapLazy([["checkbox-group-input_15.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"mbSource":[1,"mb-source"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"dateFormat":[513,"date-format"],"buttonInsideForm":[516,"button-inside-form"],"btag":[513],"emitOnClick":[516,"emit-on-click"],"haspostalcodelookup":[516],"errorMessage":[32],"isFormValid":[32],"isConsentValid":[32],"isConsentReady":[32],"isLoading":[32],"isLoadingPOST":[32],"registrationStep":[32],"forms":[32],"limitStylingAppends":[32],"autofilled":[32],"isInitalInteraction":[32],"addresses":[32],"addressUpdateKey":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"],[0,"sendAddressValue","handleAddressSelection"],[8,"countryCodeUpdated","handleCountryCodeUpdateGlobal"],[0,"resendCode","handleRequestTwofa"],[8,"message","messageHandler"]],{"registrationStep":["sendStep"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"],"forms":["setFormValidity"],"btag":["addBtag"]}],[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"],"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]}],[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],"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"],"limitStylingAppends":[32],"isValid":[32],"isResendButtonAvailable":[32],"showTooltip":[32],"errorMessage":[32],"code":[32],"resendIntervalSecondsLeft":[32]},[[10,"click","handleClickOutside"]],{"clientStyling":["handleStylingChange"],"isValid":["validityChanged"],"emitValue":["emitValueHandler"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -5,6 +5,9 @@ import "../../../../../general-input/dist/types/index";
|
|
|
5
5
|
import "../../../../../../svelte/player-consents/es2015/player-consents";
|
|
6
6
|
export class GeneralRegistration {
|
|
7
7
|
constructor() {
|
|
8
|
+
this.isSelectingAddress = false;
|
|
9
|
+
this.lastPostalCode = null;
|
|
10
|
+
this.selectedCountry = '';
|
|
8
11
|
this.listOfInputValues = [];
|
|
9
12
|
this.listOfInputValidity = [];
|
|
10
13
|
this.listOfActions = [];
|
|
@@ -19,6 +22,7 @@ export class GeneralRegistration {
|
|
|
19
22
|
this.extraActions = [];
|
|
20
23
|
this.registerCredentialsEvent = null;
|
|
21
24
|
this.twofaDestination = '';
|
|
25
|
+
this.postalcodelength = 5;
|
|
22
26
|
this.registrationStepsState = {
|
|
23
27
|
regId: null
|
|
24
28
|
};
|
|
@@ -65,6 +69,7 @@ export class GeneralRegistration {
|
|
|
65
69
|
this.buttonInsideForm = undefined;
|
|
66
70
|
this.btag = null;
|
|
67
71
|
this.emitOnClick = false;
|
|
72
|
+
this.haspostalcodelookup = false;
|
|
68
73
|
this.errorMessage = '';
|
|
69
74
|
this.isFormValid = false;
|
|
70
75
|
this.isConsentValid = false;
|
|
@@ -72,10 +77,12 @@ export class GeneralRegistration {
|
|
|
72
77
|
this.isLoading = true;
|
|
73
78
|
this.isLoadingPOST = false;
|
|
74
79
|
this.registrationStep = '';
|
|
75
|
-
this.forms =
|
|
80
|
+
this.forms = {};
|
|
76
81
|
this.limitStylingAppends = false;
|
|
77
82
|
this.autofilled = false;
|
|
78
83
|
this.isInitalInteraction = true;
|
|
84
|
+
this.addresses = [];
|
|
85
|
+
this.addressUpdateKey = 0;
|
|
79
86
|
}
|
|
80
87
|
sendStep() {
|
|
81
88
|
this.registrationStepUpdated.emit(this.registrationStep);
|
|
@@ -103,21 +110,113 @@ export class GeneralRegistration {
|
|
|
103
110
|
this.addBtagValue();
|
|
104
111
|
}
|
|
105
112
|
checkInputsValidityHandler(event) {
|
|
106
|
-
// Set isValid state of the input in the list.
|
|
107
113
|
this.listOfInputValidity.find(input => input.name == event.detail.name).isValid = event.detail.valid;
|
|
108
114
|
// Check if any one is invalid.
|
|
109
115
|
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
110
116
|
}
|
|
111
117
|
getInputsValueHandler(event) {
|
|
118
|
+
var _a;
|
|
112
119
|
this.listOfInputValues.find(input => {
|
|
113
120
|
if (input.name == event.detail.name) {
|
|
114
121
|
input.value = event.detail.value;
|
|
115
122
|
input.type = event.detail.type || null;
|
|
116
123
|
}
|
|
117
124
|
});
|
|
125
|
+
if (this.haspostalcodelookup) {
|
|
126
|
+
const { name, value } = event.detail;
|
|
127
|
+
if (name === 'CountryCode') {
|
|
128
|
+
this.selectedCountry = value;
|
|
129
|
+
if (value === 'GB') {
|
|
130
|
+
this.selectedCountry = 'UK';
|
|
131
|
+
}
|
|
132
|
+
this.resetAllAddressFields();
|
|
133
|
+
window.dispatchEvent(new CustomEvent('countryCodeUpdated', {
|
|
134
|
+
detail: { name, value: this.selectedCountry }
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
if (name === 'PostalCode') {
|
|
138
|
+
if (!this.isSelectingAddress && this.addresses.length > 0 && value !== this.lastPostalCode) {
|
|
139
|
+
this.addresses = [];
|
|
140
|
+
}
|
|
141
|
+
if (value.length >= this.postalcodelength) {
|
|
142
|
+
if (this.isSelectingAddress) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
// Fetch only if: postal code changed OR no addresses loaded yet
|
|
146
|
+
const shouldFetch = !this.lastPostalCode || this.lastPostalCode !== value ||
|
|
147
|
+
this.addresses.length === 0;
|
|
148
|
+
if (shouldFetch) {
|
|
149
|
+
const country = this.selectedCountry ||
|
|
150
|
+
((_a = this.listOfInputValues.find((i) => i.name === 'CountryCode')) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
151
|
+
let postalCode = value;
|
|
152
|
+
if (this.selectedCountry === 'GB' || this.selectedCountry === 'UK') {
|
|
153
|
+
if (this.addrDebounce)
|
|
154
|
+
clearTimeout(this.addrDebounce);
|
|
155
|
+
this.addrDebounce = setTimeout(() => {
|
|
156
|
+
this.fetchAddresses(country, postalCode);
|
|
157
|
+
}, 500);
|
|
158
|
+
}
|
|
159
|
+
this.lastPostalCode = value;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
else if (value.length < this.postalcodelength) {
|
|
163
|
+
this.addresses = [];
|
|
164
|
+
this.lastPostalCode = null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
118
168
|
this.stepsStateMachine({ event: 'set', type: 'values' });
|
|
119
169
|
this.handleConditionalValidation(event.detail.name, event.detail.value);
|
|
120
170
|
}
|
|
171
|
+
handleAddressSelection(event) {
|
|
172
|
+
const { city, address1, address2 } = event.detail;
|
|
173
|
+
// Update input values
|
|
174
|
+
this.listOfInputValues = this.listOfInputValues.map(input => {
|
|
175
|
+
if (input.name === 'address1')
|
|
176
|
+
return Object.assign(Object.assign({}, input), { value: address1 || '' });
|
|
177
|
+
if (input.name === 'address2')
|
|
178
|
+
return Object.assign(Object.assign({}, input), { value: address2 || '' });
|
|
179
|
+
if (input.name === 'City')
|
|
180
|
+
return Object.assign(Object.assign({}, input), { value: city || '' });
|
|
181
|
+
return input;
|
|
182
|
+
});
|
|
183
|
+
if (this.forms[this.registrationStep]) {
|
|
184
|
+
this.forms[this.registrationStep] = this.forms[this.registrationStep].map(input => {
|
|
185
|
+
if (input.name === 'address1')
|
|
186
|
+
return Object.assign(Object.assign({}, input), { defaultValue: address1 });
|
|
187
|
+
if (input.name === 'address2')
|
|
188
|
+
return Object.assign(Object.assign({}, input), { defaultValue: address2 });
|
|
189
|
+
if (input.name === 'City')
|
|
190
|
+
return Object.assign(Object.assign({}, input), { defaultValue: city });
|
|
191
|
+
return input;
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
// force re-render
|
|
195
|
+
this.addressUpdateKey = Date.now();
|
|
196
|
+
this.forms = Object.assign({}, this.forms);
|
|
197
|
+
this.stepsStateMachine({ event: 'set', type: 'values' });
|
|
198
|
+
this.isFormValid = !this.getInvalidStatus(this.listOfInputValidity);
|
|
199
|
+
this.isSelectingAddress = false;
|
|
200
|
+
}
|
|
201
|
+
handleCountryCodeUpdateGlobal(event) {
|
|
202
|
+
const { name } = event.detail;
|
|
203
|
+
if (name === 'CountryCode') {
|
|
204
|
+
const savedState = localStorage.getItem('registrationStepsState');
|
|
205
|
+
if (savedState) {
|
|
206
|
+
const parsedState = JSON.parse(savedState);
|
|
207
|
+
Object.keys(parsedState).forEach(stepKey => {
|
|
208
|
+
if (parsedState[stepKey] && parsedState[stepKey].registerUserData) {
|
|
209
|
+
['address1', 'address2', 'City', 'PostalCode'].forEach(field => {
|
|
210
|
+
if (parsedState[stepKey].registerUserData[field]) {
|
|
211
|
+
parsedState[stepKey].registerUserData[field].value = '';
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
localStorage.setItem('registrationStepsState', JSON.stringify(parsedState));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
121
220
|
handleRequestTwofa() {
|
|
122
221
|
if (!this.twofaDestination)
|
|
123
222
|
return;
|
|
@@ -615,7 +714,6 @@ export class GeneralRegistration {
|
|
|
615
714
|
}
|
|
616
715
|
formatConfig(config) {
|
|
617
716
|
this.listOfInputs = config.content.fields.flatMap((field) => {
|
|
618
|
-
// Special case for inputs that need to be duplicated.
|
|
619
717
|
const duplicateInputRule = field.validate.custom.find(customRule => customRule.rule === 'duplicate-input');
|
|
620
718
|
const inputElement = Object.assign({}, field);
|
|
621
719
|
if (duplicateInputRule) {
|
|
@@ -690,6 +788,8 @@ export class GeneralRegistration {
|
|
|
690
788
|
else {
|
|
691
789
|
this.isConsentReady = false;
|
|
692
790
|
}
|
|
791
|
+
this.forms[this.registrationStep] = this.listOfInputs;
|
|
792
|
+
this.forms = Object.assign({}, this.forms);
|
|
693
793
|
// The translations for fields happens here.
|
|
694
794
|
if (this.translationUrl) {
|
|
695
795
|
getTranslations(this.translationUrl).then(() => {
|
|
@@ -709,13 +809,8 @@ export class GeneralRegistration {
|
|
|
709
809
|
})
|
|
710
810
|
.catch((error) => {
|
|
711
811
|
console.error('Failed to fetch translations:', error);
|
|
712
|
-
}).finally(() => {
|
|
713
|
-
this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
|
|
714
812
|
});
|
|
715
813
|
}
|
|
716
|
-
else {
|
|
717
|
-
this.forms = [...this.forms, { [this.registrationStep]: this.listOfInputs }];
|
|
718
|
-
}
|
|
719
814
|
// Add the step to the registrationStepsData
|
|
720
815
|
this.registrationStepsState.regId = this.registrationID;
|
|
721
816
|
if (!this.registrationStepsState[this.registrationStep]) {
|
|
@@ -746,19 +841,22 @@ export class GeneralRegistration {
|
|
|
746
841
|
}
|
|
747
842
|
}
|
|
748
843
|
setInitialValidStatus(field) {
|
|
749
|
-
var _a, _b, _c, _d;
|
|
750
|
-
// Input type checkbox, with no validation are valid
|
|
844
|
+
var _a, _b, _c, _d, _e, _f;
|
|
751
845
|
if (((_a = field.inputType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'checkbox' && ((_b = field.validate) === null || _b === void 0 ? void 0 : _b.mandatory) == false) {
|
|
752
846
|
return true;
|
|
753
847
|
}
|
|
754
|
-
//Checkboxes that are mandatory and set as false || null should't be valid.
|
|
755
848
|
if (((_c = field.inputType) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'checkbox' && ((_d = field.validate) === null || _d === void 0 ? void 0 : _d.mandatory) && field.defaultValue !== 'true') {
|
|
756
849
|
return false;
|
|
757
850
|
}
|
|
758
|
-
//Inputs that have default value and aren't mandatory are valid.
|
|
759
851
|
if (field.defaultValue !== null) {
|
|
760
852
|
return true;
|
|
761
853
|
}
|
|
854
|
+
if (((_e = field.validate) === null || _e === void 0 ? void 0 : _e.mandatory) === false) {
|
|
855
|
+
return true;
|
|
856
|
+
}
|
|
857
|
+
if (((_f = field.validate) === null || _f === void 0 ? void 0 : _f.mandatory) === true) {
|
|
858
|
+
return false;
|
|
859
|
+
}
|
|
762
860
|
return false;
|
|
763
861
|
}
|
|
764
862
|
stepChange(action) {
|
|
@@ -771,23 +869,98 @@ export class GeneralRegistration {
|
|
|
771
869
|
}
|
|
772
870
|
}
|
|
773
871
|
getInvalidStatus(listOfInputs) {
|
|
774
|
-
|
|
872
|
+
const invalidInputs = listOfInputs.filter(input => {
|
|
873
|
+
var _a;
|
|
874
|
+
const inputConfig = this.listOfInputs.find(i => i.name === input.name);
|
|
875
|
+
if (inputConfig && !inputConfig.validate.mandatory) {
|
|
876
|
+
const inputValue = (_a = this.listOfInputValues.find(v => v.name === input.name)) === null || _a === void 0 ? void 0 : _a.value;
|
|
877
|
+
if (!inputValue || inputValue.trim() === '') {
|
|
878
|
+
return false;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
return input.isValid == false;
|
|
882
|
+
});
|
|
883
|
+
return invalidInputs.length > 0;
|
|
775
884
|
}
|
|
776
885
|
renderErrorMessage(errorMsg) {
|
|
777
886
|
return (h("p", { class: "registration registration__error-message" }, errorMsg));
|
|
778
887
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
888
|
+
resetAllAddressFields() {
|
|
889
|
+
this.listOfInputValues = this.listOfInputValues.map(input => {
|
|
890
|
+
if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
|
|
891
|
+
return Object.assign(Object.assign({}, input), { value: '' });
|
|
892
|
+
}
|
|
893
|
+
return input;
|
|
894
|
+
});
|
|
895
|
+
// Update forms with new structure
|
|
896
|
+
Object.keys(this.forms).forEach(stepKey => {
|
|
897
|
+
this.forms[stepKey] = this.forms[stepKey].map(input => {
|
|
898
|
+
if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
|
|
899
|
+
return Object.assign(Object.assign({}, input), { defaultValue: '' });
|
|
900
|
+
}
|
|
901
|
+
return input;
|
|
902
|
+
});
|
|
903
|
+
});
|
|
904
|
+
// Reset validity
|
|
905
|
+
this.listOfInputValidity = this.listOfInputValidity.map(input => {
|
|
906
|
+
if (['address1', 'address2', 'City', 'PostalCode'].includes(input.name)) {
|
|
907
|
+
return Object.assign(Object.assign({}, input), { isValid: false });
|
|
908
|
+
}
|
|
909
|
+
return input;
|
|
910
|
+
});
|
|
911
|
+
this.addresses = [];
|
|
912
|
+
this.forms = Object.assign({}, this.forms);
|
|
913
|
+
}
|
|
914
|
+
fetchAddresses(countryCode, postalCode) {
|
|
915
|
+
var _a;
|
|
916
|
+
const currentPostalCode = (_a = this.listOfInputValues.find(i => i.name === 'PostalCode')) === null || _a === void 0 ? void 0 : _a.value;
|
|
917
|
+
if (!currentPostalCode || currentPostalCode.length < this.postalcodelength) {
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
window.dispatchEvent(new CustomEvent('addressFetchStarted', {
|
|
921
|
+
detail: { postalCode }
|
|
922
|
+
}));
|
|
923
|
+
const url = new URL(`${this.endpoint}/api/pam/v1/lookup/addresses?country=${countryCode}&postalCode=${postalCode}`);
|
|
924
|
+
const headers = new Headers();
|
|
925
|
+
headers.append('Content-Type', 'application/json');
|
|
926
|
+
headers.append('Accept', 'application/json');
|
|
927
|
+
const options = {
|
|
928
|
+
method: 'GET',
|
|
929
|
+
headers
|
|
930
|
+
};
|
|
931
|
+
fetch(url.href, options)
|
|
932
|
+
.then(async (res) => {
|
|
933
|
+
if (!res.ok) {
|
|
934
|
+
const err = await res.json();
|
|
935
|
+
throw new Error(`Failed to fetch addresses: ${err.message || JSON.stringify(err)}`);
|
|
936
|
+
}
|
|
937
|
+
return res.json();
|
|
938
|
+
})
|
|
939
|
+
.then((data) => {
|
|
940
|
+
var _a;
|
|
941
|
+
const currentPostalCode = (_a = this.listOfInputValues.find(i => i.name === 'PostalCode')) === null || _a === void 0 ? void 0 : _a.value;
|
|
942
|
+
if (currentPostalCode && currentPostalCode.length >= this.postalcodelength) {
|
|
943
|
+
this.addresses = data.addresses || [];
|
|
944
|
+
}
|
|
945
|
+
else {
|
|
946
|
+
this.addresses = [];
|
|
947
|
+
}
|
|
948
|
+
})
|
|
949
|
+
.catch(() => {
|
|
950
|
+
this.addresses = [];
|
|
951
|
+
this.lastPostalCode = null;
|
|
789
952
|
});
|
|
790
953
|
}
|
|
954
|
+
renderForm() {
|
|
955
|
+
return (h("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form`, ref: el => this.form = el, onClick: this.handleInitialClick }, this.forms[this.registrationStep] && this.forms[this.registrationStep].map((input) => {
|
|
956
|
+
var _a, _b;
|
|
957
|
+
return h("div", { key: input.name, class: "input-wrapper" }, h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data
|
|
958
|
+
? (input.inputType.toLowerCase() === 'checkboxgroup' || input.inputType.toLowerCase() === 'togglecheckbox')
|
|
959
|
+
? input.data.subFields
|
|
960
|
+
: input.data.values
|
|
961
|
+
: [], defaultValue: input.defaultValue, autofilled: input.autofill, emitValue: this.emitValue, language: this.language, isDuplicateInput: input.isDuplicateInput, "client-styling": this.clientStyling, tooltip: input.tooltip, placeholder: input.placeholder == null ? '' : input.placeholder, "date-format": this.dateFormat, "twofa-destination": this.twofaDestination, "twofa-resend-interval-seconds": (_a = input.customInfo) === null || _a === void 0 ? void 0 : _a.twofaResendIntervalSeconds, "translation-url": this.translationUrl, emitOnClick: this.emitOnClick, onClick: this.handleInitialClick, haspostalcodelookup: this.haspostalcodelookup, addresses: this.haspostalcodelookup ? this.addresses : null, postalcodelength: this.haspostalcodelookup ? this.postalcodelength : null, key: ['address1', 'address2', 'City'].includes(input.name) ? `${input.name}-${this.addressUpdateKey}` : input.name }), ((_b = input.customInfo) === null || _b === void 0 ? void 0 : _b.description) && (h("div", { class: "input-description" }, input.customInfo.description)));
|
|
962
|
+
}), this.forms[this.registrationStep] && this.isConsentReady && this.renderConsents(), this.forms[this.registrationStep] && this.buttonInsideForm && this.renderButtons(), h("div", { class: 'registration__wrapper--flex' }, h("p", { class: 'registration__error-message', innerHTML: this.errorMessage }))));
|
|
963
|
+
}
|
|
791
964
|
;
|
|
792
965
|
renderConsents() {
|
|
793
966
|
return (h("div", { class: "consentsContainer" }, h("player-consents", { endpoint: this.endpoint })));
|
|
@@ -995,6 +1168,24 @@ export class GeneralRegistration {
|
|
|
995
1168
|
"attribute": "emit-on-click",
|
|
996
1169
|
"reflect": true,
|
|
997
1170
|
"defaultValue": "false"
|
|
1171
|
+
},
|
|
1172
|
+
"haspostalcodelookup": {
|
|
1173
|
+
"type": "boolean",
|
|
1174
|
+
"mutable": false,
|
|
1175
|
+
"complexType": {
|
|
1176
|
+
"original": "boolean",
|
|
1177
|
+
"resolved": "boolean",
|
|
1178
|
+
"references": {}
|
|
1179
|
+
},
|
|
1180
|
+
"required": false,
|
|
1181
|
+
"optional": false,
|
|
1182
|
+
"docs": {
|
|
1183
|
+
"tags": [],
|
|
1184
|
+
"text": "Addresses dropdown suggestion based on postal code"
|
|
1185
|
+
},
|
|
1186
|
+
"attribute": "haspostalcodelookup",
|
|
1187
|
+
"reflect": true,
|
|
1188
|
+
"defaultValue": "false"
|
|
998
1189
|
}
|
|
999
1190
|
};
|
|
1000
1191
|
}
|
|
@@ -1010,7 +1201,9 @@ export class GeneralRegistration {
|
|
|
1010
1201
|
"forms": {},
|
|
1011
1202
|
"limitStylingAppends": {},
|
|
1012
1203
|
"autofilled": {},
|
|
1013
|
-
"isInitalInteraction": {}
|
|
1204
|
+
"isInitalInteraction": {},
|
|
1205
|
+
"addresses": {},
|
|
1206
|
+
"addressUpdateKey": {}
|
|
1014
1207
|
};
|
|
1015
1208
|
}
|
|
1016
1209
|
static get events() {
|
|
@@ -1093,6 +1286,18 @@ export class GeneralRegistration {
|
|
|
1093
1286
|
"target": undefined,
|
|
1094
1287
|
"capture": false,
|
|
1095
1288
|
"passive": false
|
|
1289
|
+
}, {
|
|
1290
|
+
"name": "sendAddressValue",
|
|
1291
|
+
"method": "handleAddressSelection",
|
|
1292
|
+
"target": undefined,
|
|
1293
|
+
"capture": false,
|
|
1294
|
+
"passive": false
|
|
1295
|
+
}, {
|
|
1296
|
+
"name": "countryCodeUpdated",
|
|
1297
|
+
"method": "handleCountryCodeUpdateGlobal",
|
|
1298
|
+
"target": "window",
|
|
1299
|
+
"capture": false,
|
|
1300
|
+
"passive": false
|
|
1096
1301
|
}, {
|
|
1097
1302
|
"name": "resendCode",
|
|
1098
1303
|
"method": "handleRequestTwofa",
|