@everymatrix/general-registration 1.60.0 → 1.60.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_13.cjs.entry.js +249 -214
- package/dist/collection/components/general-registration/general-registration.js +43 -8
- package/dist/esm/checkbox-group-input_13.entry.js +249 -214
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-9488becb.entry.js → p-22bd58f6.entry.js} +120 -120
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-registration/general-registration.d.ts +2 -0
- package/package.json +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-input/src/utils/types.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-registration/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -5,6 +5,7 @@ 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.isInitialInteraction = true;
|
|
8
9
|
this.listOfInputValues = [];
|
|
9
10
|
this.listOfInputValidity = [];
|
|
10
11
|
this.listOfActions = [];
|
|
@@ -32,6 +33,16 @@ export class GeneralRegistration {
|
|
|
32
33
|
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
33
34
|
});
|
|
34
35
|
};
|
|
36
|
+
// handles sending a custom event for initial interaction with the registration form
|
|
37
|
+
this.handleInitialClick = (e) => {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
if (!this.isInitialInteraction)
|
|
40
|
+
return;
|
|
41
|
+
if (this.isInitialInteraction) {
|
|
42
|
+
dispatchCustomEvent('register_start', { field: e.target.name });
|
|
43
|
+
this.isInitialInteraction = false;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
35
46
|
this.endpoint = undefined;
|
|
36
47
|
this.language = 'en';
|
|
37
48
|
this.clientStyling = '';
|
|
@@ -312,12 +323,36 @@ export class GeneralRegistration {
|
|
|
312
323
|
}
|
|
313
324
|
});
|
|
314
325
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
326
|
+
// handles sending suctom events and the requested data for each registration step
|
|
327
|
+
if (this.registrationStep === 'Step1') {
|
|
328
|
+
const eventData = {
|
|
329
|
+
// @ts-ignore
|
|
330
|
+
IBAN: registerStep.registerUserDto.IBAN,
|
|
331
|
+
// @ts-ignore
|
|
332
|
+
username: registerStep.registerUserDto.Username,
|
|
333
|
+
};
|
|
334
|
+
dispatchCustomEvent('register_step1', { eventLabel: this.registrationStep, eventAction: 'nextStep', eventCategory: 'Registration', eventData: eventData });
|
|
335
|
+
}
|
|
336
|
+
else if (this.registrationStep === 'Step2') {
|
|
337
|
+
const eventData = {
|
|
338
|
+
// @ts-ignore
|
|
339
|
+
gender: registerStep.registerUserDto.Gender,
|
|
340
|
+
// @ts-ignore
|
|
341
|
+
fullName: `${registerStep.registerUserDto.FirstnameOnDocument} ${registerStep.registerUserDto.LastNameOnDocument}`,
|
|
342
|
+
// @ts-ignore
|
|
343
|
+
city: registerStep.registerUserDto.City
|
|
344
|
+
};
|
|
345
|
+
dispatchCustomEvent('register_step2', { eventLabel: this.registrationStep, eventAction: 'nextStep', eventCategory: 'Registration', eventData: eventData });
|
|
346
|
+
}
|
|
347
|
+
else if (this.registrationStep === 'Step3') {
|
|
348
|
+
const eventData = {
|
|
349
|
+
// @ts-ignore
|
|
350
|
+
OIB: registerStep.registerUserDto.PersonalID,
|
|
351
|
+
// @ts-ignore
|
|
352
|
+
documentType: registerStep.registerUserDto.DocumentType,
|
|
353
|
+
};
|
|
354
|
+
dispatchCustomEvent('register_step3', { eventLabel: this.registrationStep, eventAction: 'nextStep', eventCategory: 'Registration', eventData: eventData });
|
|
355
|
+
}
|
|
321
356
|
return res.json();
|
|
322
357
|
})
|
|
323
358
|
.then((data) => {
|
|
@@ -409,7 +444,7 @@ export class GeneralRegistration {
|
|
|
409
444
|
type: 'success',
|
|
410
445
|
message: translate('successMessage', this.language)
|
|
411
446
|
} }, window.location.href);
|
|
412
|
-
dispatchCustomEvent('
|
|
447
|
+
dispatchCustomEvent('register_closed', { userId: data.userId });
|
|
413
448
|
}
|
|
414
449
|
})
|
|
415
450
|
.catch((err) => {
|
|
@@ -583,7 +618,7 @@ export class GeneralRegistration {
|
|
|
583
618
|
}
|
|
584
619
|
renderForm() {
|
|
585
620
|
return this.forms.map((form, index) => {
|
|
586
|
-
return h("form", { action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index + 1}` ? 'hidden' : ''}`, ref: el => this.form = el }, form[this.registrationStep] && form[this.registrationStep].map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data
|
|
621
|
+
return h("form", { onClick: this.handleInitialClick, action: '.', id: `RegistrationForm${this.registrationStep}`, class: `registration__form ${this.registrationStep !== `Step${index + 1}` ? 'hidden' : ''}`, ref: el => this.form = el }, form[this.registrationStep] && form[this.registrationStep].map(input => h("general-input", { type: input.inputType, name: input.name, displayName: input.displayName, validation: input.validate, action: input.action || null, options: input.data
|
|
587
622
|
? (input.inputType.toLowerCase() == 'checkboxgroup' || input.inputType.toLowerCase() == 'togglecheckbox')
|
|
588
623
|
? input.data.subFields
|
|
589
624
|
: input.data.values
|