@everymatrix/general-registration 1.88.0 → 1.88.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_15.cjs.entry.js +24 -0
- package/dist/collection/components/general-registration/general-registration.js +24 -0
- package/dist/esm/checkbox-group-input_15.entry.js +24 -0
- package/dist/general-registration/checkbox-group-input_15.entry.js +1 -1
- package/dist/types/components/general-registration/general-registration.d.ts +1 -0
- package/package.json +1 -1
|
@@ -14889,6 +14889,26 @@ const GeneralRegistration = class {
|
|
|
14889
14889
|
this.isRestoringAfterError = false;
|
|
14890
14890
|
});
|
|
14891
14891
|
}
|
|
14892
|
+
setConsents() {
|
|
14893
|
+
const acceptedConsents = {};
|
|
14894
|
+
Object.keys(this.registrationStepsState).forEach((stepKey) => {
|
|
14895
|
+
if (this.registrationStepsState[stepKey]['registerUserData']) {
|
|
14896
|
+
const userData = this.registrationStepsState[stepKey]['registerUserData'];
|
|
14897
|
+
Object.keys(userData).forEach((fieldName) => {
|
|
14898
|
+
if (fieldName.startsWith('CheckBoxGroupParent')) {
|
|
14899
|
+
const consentGroup = userData[fieldName];
|
|
14900
|
+
if (consentGroup && consentGroup.value) {
|
|
14901
|
+
Object.assign(acceptedConsents, consentGroup.value);
|
|
14902
|
+
}
|
|
14903
|
+
}
|
|
14904
|
+
});
|
|
14905
|
+
}
|
|
14906
|
+
});
|
|
14907
|
+
if (localStorage.getItem('playerConsents')) {
|
|
14908
|
+
localStorage.removeItem("playerConsents");
|
|
14909
|
+
}
|
|
14910
|
+
return acceptedConsents;
|
|
14911
|
+
}
|
|
14892
14912
|
setRegister() {
|
|
14893
14913
|
this.isLoading = true;
|
|
14894
14914
|
this.registerErrors = false;
|
|
@@ -14927,8 +14947,12 @@ const GeneralRegistration = class {
|
|
|
14927
14947
|
.then((data) => {
|
|
14928
14948
|
this.isLoading = false;
|
|
14929
14949
|
if (!this.registerErrors) {
|
|
14950
|
+
const acceptedConsents = this.setConsents();
|
|
14930
14951
|
this.dispatchRegisterCredentialsEvent();
|
|
14931
14952
|
window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId, extraActions: this.extraActions }, window.location.href);
|
|
14953
|
+
if (Object.keys(acceptedConsents).length > 0) {
|
|
14954
|
+
window.postMessage({ type: 'ConsentsUpdated', status: 'created', consents: acceptedConsents }, window.location.href);
|
|
14955
|
+
}
|
|
14932
14956
|
window.postMessage({
|
|
14933
14957
|
type: 'WidgetNotification', data: {
|
|
14934
14958
|
type: 'success',
|
|
@@ -675,6 +675,26 @@ export class GeneralRegistration {
|
|
|
675
675
|
this.isRestoringAfterError = false;
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
|
+
setConsents() {
|
|
679
|
+
const acceptedConsents = {};
|
|
680
|
+
Object.keys(this.registrationStepsState).forEach((stepKey) => {
|
|
681
|
+
if (this.registrationStepsState[stepKey]['registerUserData']) {
|
|
682
|
+
const userData = this.registrationStepsState[stepKey]['registerUserData'];
|
|
683
|
+
Object.keys(userData).forEach((fieldName) => {
|
|
684
|
+
if (fieldName.startsWith('CheckBoxGroupParent')) {
|
|
685
|
+
const consentGroup = userData[fieldName];
|
|
686
|
+
if (consentGroup && consentGroup.value) {
|
|
687
|
+
Object.assign(acceptedConsents, consentGroup.value);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
if (localStorage.getItem('playerConsents')) {
|
|
694
|
+
localStorage.removeItem("playerConsents");
|
|
695
|
+
}
|
|
696
|
+
return acceptedConsents;
|
|
697
|
+
}
|
|
678
698
|
setRegister() {
|
|
679
699
|
this.isLoading = true;
|
|
680
700
|
this.registerErrors = false;
|
|
@@ -713,8 +733,12 @@ export class GeneralRegistration {
|
|
|
713
733
|
.then((data) => {
|
|
714
734
|
this.isLoading = false;
|
|
715
735
|
if (!this.registerErrors) {
|
|
736
|
+
const acceptedConsents = this.setConsents();
|
|
716
737
|
this.dispatchRegisterCredentialsEvent();
|
|
717
738
|
window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId, extraActions: this.extraActions }, window.location.href);
|
|
739
|
+
if (Object.keys(acceptedConsents).length > 0) {
|
|
740
|
+
window.postMessage({ type: 'ConsentsUpdated', status: 'created', consents: acceptedConsents }, window.location.href);
|
|
741
|
+
}
|
|
718
742
|
window.postMessage({
|
|
719
743
|
type: 'WidgetNotification', data: {
|
|
720
744
|
type: 'success',
|
|
@@ -14885,6 +14885,26 @@ const GeneralRegistration = class {
|
|
|
14885
14885
|
this.isRestoringAfterError = false;
|
|
14886
14886
|
});
|
|
14887
14887
|
}
|
|
14888
|
+
setConsents() {
|
|
14889
|
+
const acceptedConsents = {};
|
|
14890
|
+
Object.keys(this.registrationStepsState).forEach((stepKey) => {
|
|
14891
|
+
if (this.registrationStepsState[stepKey]['registerUserData']) {
|
|
14892
|
+
const userData = this.registrationStepsState[stepKey]['registerUserData'];
|
|
14893
|
+
Object.keys(userData).forEach((fieldName) => {
|
|
14894
|
+
if (fieldName.startsWith('CheckBoxGroupParent')) {
|
|
14895
|
+
const consentGroup = userData[fieldName];
|
|
14896
|
+
if (consentGroup && consentGroup.value) {
|
|
14897
|
+
Object.assign(acceptedConsents, consentGroup.value);
|
|
14898
|
+
}
|
|
14899
|
+
}
|
|
14900
|
+
});
|
|
14901
|
+
}
|
|
14902
|
+
});
|
|
14903
|
+
if (localStorage.getItem('playerConsents')) {
|
|
14904
|
+
localStorage.removeItem("playerConsents");
|
|
14905
|
+
}
|
|
14906
|
+
return acceptedConsents;
|
|
14907
|
+
}
|
|
14888
14908
|
setRegister() {
|
|
14889
14909
|
this.isLoading = true;
|
|
14890
14910
|
this.registerErrors = false;
|
|
@@ -14923,8 +14943,12 @@ const GeneralRegistration = class {
|
|
|
14923
14943
|
.then((data) => {
|
|
14924
14944
|
this.isLoading = false;
|
|
14925
14945
|
if (!this.registerErrors) {
|
|
14946
|
+
const acceptedConsents = this.setConsents();
|
|
14926
14947
|
this.dispatchRegisterCredentialsEvent();
|
|
14927
14948
|
window.postMessage({ type: 'registrationSuccessful', userId: data === null || data === void 0 ? void 0 : data.userId, extraActions: this.extraActions }, window.location.href);
|
|
14949
|
+
if (Object.keys(acceptedConsents).length > 0) {
|
|
14950
|
+
window.postMessage({ type: 'ConsentsUpdated', status: 'created', consents: acceptedConsents }, window.location.href);
|
|
14951
|
+
}
|
|
14928
14952
|
window.postMessage({
|
|
14929
14953
|
type: 'WidgetNotification', data: {
|
|
14930
14954
|
type: 'success',
|