@everymatrix/general-registration 1.10.13 → 1.10.14
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-input_11.cjs.entry.js +7 -18
- package/dist/cjs/general-registration.cjs.js +2 -2
- package/dist/cjs/{index-68f93e1e.js → index-a69a5278.js} +11 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/general-registration/general-registration.js +8 -5
- package/dist/components/checkbox-input2.js +7 -7
- package/dist/components/date-input2.js +7 -7
- package/dist/components/email-input2.js +8 -8
- package/dist/components/general-input2.js +13 -28
- package/dist/components/general-registration.js +8 -5
- package/dist/components/number-input2.js +7 -7
- package/dist/components/password-input2.js +8 -8
- package/dist/components/radio-input2.js +5 -5
- package/dist/components/select-input2.js +8 -8
- package/dist/components/tel-input2.js +9 -9
- package/dist/components/text-input2.js +10 -10
- package/dist/esm/checkbox-input_11.entry.js +7 -18
- package/dist/esm/general-registration.js +2 -2
- package/dist/esm/{index-16916adb.js → index-b3c0d3c9.js} +11 -0
- package/dist/esm/loader.js +2 -2
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-c7e0b72f.entry.js → p-3313fb60.entry.js} +2 -2
- package/dist/general-registration/{p-8f644809.js → p-35d6abbe.js} +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-a69a5278.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES$1 = ['ro', 'en'];
|
|
@@ -23251,24 +23251,10 @@ const GeneralInput = class {
|
|
|
23251
23251
|
* Client custom styling via inline style
|
|
23252
23252
|
*/
|
|
23253
23253
|
this.clientStyling = '';
|
|
23254
|
-
this.limitStylingAppends = false;
|
|
23255
|
-
this.setClientStyling = () => {
|
|
23256
|
-
let sheet = document.createElement('style');
|
|
23257
|
-
sheet.innerHTML = this.clientStyling;
|
|
23258
|
-
this.stylingContainer.prepend(sheet);
|
|
23259
|
-
};
|
|
23260
|
-
}
|
|
23261
|
-
componentDidRender() {
|
|
23262
|
-
// start custom styling area
|
|
23263
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
23264
|
-
if (this.clientStyling)
|
|
23265
|
-
this.setClientStyling();
|
|
23266
|
-
this.limitStylingAppends = true;
|
|
23267
|
-
}
|
|
23268
|
-
// end custom styling area
|
|
23269
23254
|
}
|
|
23270
23255
|
render() {
|
|
23271
|
-
|
|
23256
|
+
var _a;
|
|
23257
|
+
switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
|
|
23272
23258
|
case 'text':
|
|
23273
23259
|
return index.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 });
|
|
23274
23260
|
case 'email':
|
|
@@ -23597,7 +23583,10 @@ const GeneralRegistration = class {
|
|
|
23597
23583
|
});
|
|
23598
23584
|
// Populate the list of inputs values and set as null in the beginning
|
|
23599
23585
|
this.listOfInputValues = this.listOfInputs.map(field => {
|
|
23600
|
-
|
|
23586
|
+
var _a;
|
|
23587
|
+
return { name: field.name,
|
|
23588
|
+
value: ((_a = field.inputType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'checkbox' ? 'false' : null,
|
|
23589
|
+
isDuplicate: field.isDuplicateInput || false };
|
|
23601
23590
|
});
|
|
23602
23591
|
// Set the list of actions
|
|
23603
23592
|
this.listOfActions = config.content.actions.map(action => action);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-a69a5278.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["checkbox-input_11.cjs",[[1,"general-registration",{"endpoint":[
|
|
18
|
+
return index.bootstrapLazy([["checkbox-input_11.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"errorMessage":[32],"emitValue":[32],"isFormValid":[32],"listOfInputs":[32],"isLoading":[32],"limitStylingAppends":[32],"registrationStep":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"rules":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]]]]], options);
|
|
19
19
|
});
|
|
@@ -557,9 +557,14 @@ const callNodeRefs = (vNode) => {
|
|
|
557
557
|
};
|
|
558
558
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
559
559
|
const hostElm = hostRef.$hostElement$;
|
|
560
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
560
561
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
561
562
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
562
563
|
hostTagName = hostElm.tagName;
|
|
564
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
565
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
566
|
+
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
567
|
+
}
|
|
563
568
|
rootVnode.$tag$ = null;
|
|
564
569
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
565
570
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -936,6 +941,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
936
941
|
.map(([propName, m]) => {
|
|
937
942
|
const attrName = m[1] || propName;
|
|
938
943
|
attrNameToPropName.set(attrName, propName);
|
|
944
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
945
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
946
|
+
}
|
|
939
947
|
return attrName;
|
|
940
948
|
});
|
|
941
949
|
}
|
|
@@ -1113,6 +1121,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1113
1121
|
{
|
|
1114
1122
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1115
1123
|
}
|
|
1124
|
+
{
|
|
1125
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1126
|
+
}
|
|
1116
1127
|
{
|
|
1117
1128
|
cmpMeta.$watchers$ = {};
|
|
1118
1129
|
}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-a69a5278.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["checkbox-input_11.cjs",[[1,"general-registration",{"endpoint":[
|
|
17
|
+
return index.bootstrapLazy([["checkbox-input_11.cjs",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"errorMessage":[32],"emitValue":[32],"isFormValid":[32],"listOfInputs":[32],"isLoading":[32],"limitStylingAppends":[32],"registrationStep":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"rules":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -270,7 +270,10 @@ export class GeneralRegistration {
|
|
|
270
270
|
});
|
|
271
271
|
// Populate the list of inputs values and set as null in the beginning
|
|
272
272
|
this.listOfInputValues = this.listOfInputs.map(field => {
|
|
273
|
-
|
|
273
|
+
var _a;
|
|
274
|
+
return { name: field.name,
|
|
275
|
+
value: ((_a = field.inputType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'checkbox' ? 'false' : null,
|
|
276
|
+
isDuplicate: field.isDuplicateInput || false };
|
|
274
277
|
});
|
|
275
278
|
// Set the list of actions
|
|
276
279
|
this.listOfActions = config.content.actions.map(action => action);
|
|
@@ -340,7 +343,7 @@ export class GeneralRegistration {
|
|
|
340
343
|
"text": "NorWAy Endpoint for all the calls."
|
|
341
344
|
},
|
|
342
345
|
"attribute": "endpoint",
|
|
343
|
-
"reflect":
|
|
346
|
+
"reflect": true
|
|
344
347
|
},
|
|
345
348
|
"language": {
|
|
346
349
|
"type": "string",
|
|
@@ -357,7 +360,7 @@ export class GeneralRegistration {
|
|
|
357
360
|
"text": "Currently selected language"
|
|
358
361
|
},
|
|
359
362
|
"attribute": "language",
|
|
360
|
-
"reflect":
|
|
363
|
+
"reflect": true,
|
|
361
364
|
"defaultValue": "'en'"
|
|
362
365
|
},
|
|
363
366
|
"clientStyling": {
|
|
@@ -375,7 +378,7 @@ export class GeneralRegistration {
|
|
|
375
378
|
"text": "Client custom styling via inline styles"
|
|
376
379
|
},
|
|
377
380
|
"attribute": "client-styling",
|
|
378
|
-
"reflect":
|
|
381
|
+
"reflect": true,
|
|
379
382
|
"defaultValue": "''"
|
|
380
383
|
},
|
|
381
384
|
"clientStylingUrl": {
|
|
@@ -393,7 +396,7 @@ export class GeneralRegistration {
|
|
|
393
396
|
"text": "Client custom styling via url"
|
|
394
397
|
},
|
|
395
398
|
"attribute": "client-styling-url",
|
|
396
|
-
"reflect":
|
|
399
|
+
"reflect": true,
|
|
397
400
|
"defaultValue": "''"
|
|
398
401
|
}
|
|
399
402
|
}; }
|
|
@@ -81,14 +81,14 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
81
81
|
}; }
|
|
82
82
|
static get style() { return checkboxInputCss; }
|
|
83
83
|
}, [1, "checkbox-input", {
|
|
84
|
-
"name": [
|
|
85
|
-
"displayName": [
|
|
86
|
-
"defaultValue": [
|
|
87
|
-
"autofilled": [
|
|
84
|
+
"name": [513],
|
|
85
|
+
"displayName": [513, "display-name"],
|
|
86
|
+
"defaultValue": [513, "default-value"],
|
|
87
|
+
"autofilled": [516],
|
|
88
88
|
"validation": [16],
|
|
89
|
-
"language": [
|
|
90
|
-
"emitValue": [
|
|
91
|
-
"clientStyling": [
|
|
89
|
+
"language": [513],
|
|
90
|
+
"emitValue": [516, "emit-value"],
|
|
91
|
+
"clientStyling": [513, "client-styling"],
|
|
92
92
|
"errorMessage": [32],
|
|
93
93
|
"isValid": [32],
|
|
94
94
|
"limitStylingAppends": [32]
|
|
@@ -5134,14 +5134,14 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
5134
5134
|
}; }
|
|
5135
5135
|
static get style() { return dateInputCss; }
|
|
5136
5136
|
}, [1, "date-input", {
|
|
5137
|
-
"name": [
|
|
5138
|
-
"displayName": [
|
|
5137
|
+
"name": [513],
|
|
5138
|
+
"displayName": [513, "display-name"],
|
|
5139
5139
|
"validation": [16],
|
|
5140
|
-
"defaultValue": [
|
|
5141
|
-
"autofilled": [
|
|
5142
|
-
"language": [
|
|
5143
|
-
"emitValue": [
|
|
5144
|
-
"clientStyling": [
|
|
5140
|
+
"defaultValue": [513, "default-value"],
|
|
5141
|
+
"autofilled": [516],
|
|
5142
|
+
"language": [513],
|
|
5143
|
+
"emitValue": [516, "emit-value"],
|
|
5144
|
+
"clientStyling": [513, "client-styling"],
|
|
5145
5145
|
"errorMessage": [32],
|
|
5146
5146
|
"isValid": [32],
|
|
5147
5147
|
"limitStylingAppends": [32]
|
|
@@ -105,15 +105,15 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
105
105
|
}; }
|
|
106
106
|
static get style() { return emailInputCss; }
|
|
107
107
|
}, [1, "email-input", {
|
|
108
|
-
"name": [
|
|
109
|
-
"displayName": [
|
|
108
|
+
"name": [513],
|
|
109
|
+
"displayName": [513, "display-name"],
|
|
110
110
|
"validation": [16],
|
|
111
|
-
"defaultValue": [
|
|
112
|
-
"autofilled": [
|
|
113
|
-
"language": [
|
|
114
|
-
"emitValue": [
|
|
115
|
-
"isDuplicateInput": [
|
|
116
|
-
"clientStyling": [
|
|
111
|
+
"defaultValue": [513, "default-value"],
|
|
112
|
+
"autofilled": [516],
|
|
113
|
+
"language": [513],
|
|
114
|
+
"emitValue": [516, "emit-value"],
|
|
115
|
+
"isDuplicateInput": [516, "is-duplicate-input"],
|
|
116
|
+
"clientStyling": [513, "client-styling"],
|
|
117
117
|
"errorMessage": [32],
|
|
118
118
|
"isValid": [32],
|
|
119
119
|
"limitStylingAppends": [32]
|
|
@@ -25,24 +25,10 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
25
25
|
* Client custom styling via inline style
|
|
26
26
|
*/
|
|
27
27
|
this.clientStyling = '';
|
|
28
|
-
this.limitStylingAppends = false;
|
|
29
|
-
this.setClientStyling = () => {
|
|
30
|
-
let sheet = document.createElement('style');
|
|
31
|
-
sheet.innerHTML = this.clientStyling;
|
|
32
|
-
this.stylingContainer.prepend(sheet);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
componentDidRender() {
|
|
36
|
-
// start custom styling area
|
|
37
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
38
|
-
if (this.clientStyling)
|
|
39
|
-
this.setClientStyling();
|
|
40
|
-
this.limitStylingAppends = true;
|
|
41
|
-
}
|
|
42
|
-
// end custom styling area
|
|
43
28
|
}
|
|
44
29
|
render() {
|
|
45
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
|
|
46
32
|
case 'text':
|
|
47
33
|
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 });
|
|
48
34
|
case 'email':
|
|
@@ -67,19 +53,18 @@ const GeneralInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
67
53
|
}
|
|
68
54
|
static get style() { return generalInputCss; }
|
|
69
55
|
}, [1, "general-input", {
|
|
70
|
-
"type": [
|
|
71
|
-
"name": [
|
|
72
|
-
"displayName": [
|
|
73
|
-
"action": [
|
|
56
|
+
"type": [513],
|
|
57
|
+
"name": [513],
|
|
58
|
+
"displayName": [513, "display-name"],
|
|
59
|
+
"action": [513],
|
|
74
60
|
"validation": [16],
|
|
75
|
-
"options": [
|
|
76
|
-
"language": [
|
|
77
|
-
"autofilled": [
|
|
78
|
-
"defaultValue": [
|
|
79
|
-
"emitValue": [
|
|
80
|
-
"isDuplicateInput": [
|
|
81
|
-
"clientStyling": [
|
|
82
|
-
"limitStylingAppends": [32]
|
|
61
|
+
"options": [520],
|
|
62
|
+
"language": [513],
|
|
63
|
+
"autofilled": [516],
|
|
64
|
+
"defaultValue": [520, "default-value"],
|
|
65
|
+
"emitValue": [516, "emit-value"],
|
|
66
|
+
"isDuplicateInput": [516, "is-duplicate-input"],
|
|
67
|
+
"clientStyling": [520, "client-styling"]
|
|
83
68
|
}]);
|
|
84
69
|
function defineCustomElement() {
|
|
85
70
|
if (typeof customElements === "undefined") {
|
|
@@ -315,7 +315,10 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
315
315
|
});
|
|
316
316
|
// Populate the list of inputs values and set as null in the beginning
|
|
317
317
|
this.listOfInputValues = this.listOfInputs.map(field => {
|
|
318
|
-
|
|
318
|
+
var _a;
|
|
319
|
+
return { name: field.name,
|
|
320
|
+
value: ((_a = field.inputType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'checkbox' ? 'false' : null,
|
|
321
|
+
isDuplicate: field.isDuplicateInput || false };
|
|
319
322
|
});
|
|
320
323
|
// Set the list of actions
|
|
321
324
|
this.listOfActions = config.content.actions.map(action => action);
|
|
@@ -362,10 +365,10 @@ const GeneralRegistration$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
362
365
|
}; }
|
|
363
366
|
static get style() { return generalRegistrationCss; }
|
|
364
367
|
}, [1, "general-registration", {
|
|
365
|
-
"endpoint": [
|
|
366
|
-
"language": [
|
|
367
|
-
"clientStyling": [
|
|
368
|
-
"clientStylingUrl": [
|
|
368
|
+
"endpoint": [513],
|
|
369
|
+
"language": [513],
|
|
370
|
+
"clientStyling": [1537, "client-styling"],
|
|
371
|
+
"clientStylingUrl": [513, "client-styling-url"],
|
|
369
372
|
"errorMessage": [32],
|
|
370
373
|
"emitValue": [32],
|
|
371
374
|
"isFormValid": [32],
|
|
@@ -81,14 +81,14 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
81
81
|
}; }
|
|
82
82
|
static get style() { return numberInputCss; }
|
|
83
83
|
}, [1, "number-input", {
|
|
84
|
-
"name": [
|
|
85
|
-
"displayName": [
|
|
84
|
+
"name": [513],
|
|
85
|
+
"displayName": [513, "display-name"],
|
|
86
86
|
"validation": [16],
|
|
87
|
-
"defaultValue": [
|
|
88
|
-
"autofilled": [
|
|
89
|
-
"language": [
|
|
90
|
-
"emitValue": [
|
|
91
|
-
"clientStyling": [
|
|
87
|
+
"defaultValue": [513, "default-value"],
|
|
88
|
+
"autofilled": [516],
|
|
89
|
+
"language": [513],
|
|
90
|
+
"emitValue": [516, "emit-value"],
|
|
91
|
+
"clientStyling": [513, "client-styling"],
|
|
92
92
|
"errorMessage": [32],
|
|
93
93
|
"isValid": [32],
|
|
94
94
|
"limitStylingAppends": [32]
|
|
@@ -831,15 +831,15 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
831
831
|
}; }
|
|
832
832
|
static get style() { return passwordInputCss; }
|
|
833
833
|
}, [1, "password-input", {
|
|
834
|
-
"name": [
|
|
835
|
-
"displayName": [
|
|
836
|
-
"defaultValue": [
|
|
837
|
-
"autofilled": [
|
|
834
|
+
"name": [513],
|
|
835
|
+
"displayName": [513, "display-name"],
|
|
836
|
+
"defaultValue": [513, "default-value"],
|
|
837
|
+
"autofilled": [516],
|
|
838
838
|
"validation": [16],
|
|
839
|
-
"language": [
|
|
840
|
-
"emitValue": [
|
|
841
|
-
"isDuplicateInput": [
|
|
842
|
-
"clientStyling": [
|
|
839
|
+
"language": [513],
|
|
840
|
+
"emitValue": [516, "emit-value"],
|
|
841
|
+
"isDuplicateInput": [516, "is-duplicate-input"],
|
|
842
|
+
"clientStyling": [513, "client-styling"],
|
|
843
843
|
"isValid": [32],
|
|
844
844
|
"errorMessage": [32],
|
|
845
845
|
"limitStylingAppends": [32]
|
|
@@ -71,13 +71,13 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
71
71
|
}; }
|
|
72
72
|
static get style() { return radioInputCss; }
|
|
73
73
|
}, [1, "radio-input", {
|
|
74
|
-
"name": [
|
|
75
|
-
"displayName": [
|
|
74
|
+
"name": [513],
|
|
75
|
+
"displayName": [513, "display-name"],
|
|
76
76
|
"optionsGroup": [16],
|
|
77
77
|
"validation": [16],
|
|
78
|
-
"language": [
|
|
79
|
-
"emitValue": [
|
|
80
|
-
"clientStyling": [
|
|
78
|
+
"language": [513],
|
|
79
|
+
"emitValue": [516, "emit-value"],
|
|
80
|
+
"clientStyling": [513, "client-styling"],
|
|
81
81
|
"errorMessage": [32],
|
|
82
82
|
"isValid": [32],
|
|
83
83
|
"limitStylingAppends": [32]
|
|
@@ -118,16 +118,16 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
118
118
|
}; }
|
|
119
119
|
static get style() { return selectInputCss; }
|
|
120
120
|
}, [1, "select-input", {
|
|
121
|
-
"name": [
|
|
122
|
-
"displayName": [
|
|
123
|
-
"action": [
|
|
124
|
-
"defaultValue": [
|
|
125
|
-
"autofilled": [
|
|
121
|
+
"name": [513],
|
|
122
|
+
"displayName": [513, "display-name"],
|
|
123
|
+
"action": [513],
|
|
124
|
+
"defaultValue": [513, "default-value"],
|
|
125
|
+
"autofilled": [516],
|
|
126
126
|
"options": [16],
|
|
127
127
|
"validation": [16],
|
|
128
|
-
"language": [
|
|
129
|
-
"emitValue": [
|
|
130
|
-
"clientStyling": [
|
|
128
|
+
"language": [513],
|
|
129
|
+
"emitValue": [516, "emit-value"],
|
|
130
|
+
"clientStyling": [513, "client-styling"],
|
|
131
131
|
"errorMessage": [32],
|
|
132
132
|
"isValid": [32],
|
|
133
133
|
"limitStylingAppends": [32]
|
|
@@ -127,16 +127,16 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
127
127
|
}; }
|
|
128
128
|
static get style() { return telInputCss; }
|
|
129
129
|
}, [1, "tel-input", {
|
|
130
|
-
"name": [
|
|
131
|
-
"displayName": [
|
|
132
|
-
"showLabels": [
|
|
133
|
-
"action": [
|
|
130
|
+
"name": [513],
|
|
131
|
+
"displayName": [513, "display-name"],
|
|
132
|
+
"showLabels": [516, "show-labels"],
|
|
133
|
+
"action": [513],
|
|
134
134
|
"validation": [16],
|
|
135
|
-
"defaultValue": [
|
|
136
|
-
"autofilled": [
|
|
137
|
-
"language": [
|
|
138
|
-
"emitValue": [
|
|
139
|
-
"clientStyling": [
|
|
135
|
+
"defaultValue": [513, "default-value"],
|
|
136
|
+
"autofilled": [516],
|
|
137
|
+
"language": [513],
|
|
138
|
+
"emitValue": [516, "emit-value"],
|
|
139
|
+
"clientStyling": [513, "client-styling"],
|
|
140
140
|
"isValid": [32],
|
|
141
141
|
"errorMessage": [32],
|
|
142
142
|
"limitStylingAppends": [32]
|
|
@@ -111,17 +111,17 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
111
111
|
}; }
|
|
112
112
|
static get style() { return textInputCss; }
|
|
113
113
|
}, [1, "text-input", {
|
|
114
|
-
"name": [
|
|
115
|
-
"displayName": [
|
|
114
|
+
"name": [513],
|
|
115
|
+
"displayName": [513, "display-name"],
|
|
116
116
|
"validation": [16],
|
|
117
|
-
"defaultValue": [
|
|
118
|
-
"autofilled": [
|
|
119
|
-
"rules": [
|
|
120
|
-
"language": [
|
|
121
|
-
"checkValidity": [
|
|
122
|
-
"emitValue": [
|
|
123
|
-
"isDuplicateInput": [
|
|
124
|
-
"clientStyling": [
|
|
117
|
+
"defaultValue": [513, "default-value"],
|
|
118
|
+
"autofilled": [516],
|
|
119
|
+
"rules": [513],
|
|
120
|
+
"language": [513],
|
|
121
|
+
"checkValidity": [516, "check-validity"],
|
|
122
|
+
"emitValue": [516, "emit-value"],
|
|
123
|
+
"isDuplicateInput": [516, "is-duplicate-input"],
|
|
124
|
+
"clientStyling": [513, "client-styling"],
|
|
125
125
|
"isValid": [32],
|
|
126
126
|
"errorMessage": [32],
|
|
127
127
|
"limitStylingAppends": [32]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h as h$2, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h as h$2, g as getElement } from './index-b3c0d3c9.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES$1 = ['ro', 'en'];
|
|
@@ -23247,24 +23247,10 @@ const GeneralInput = class {
|
|
|
23247
23247
|
* Client custom styling via inline style
|
|
23248
23248
|
*/
|
|
23249
23249
|
this.clientStyling = '';
|
|
23250
|
-
this.limitStylingAppends = false;
|
|
23251
|
-
this.setClientStyling = () => {
|
|
23252
|
-
let sheet = document.createElement('style');
|
|
23253
|
-
sheet.innerHTML = this.clientStyling;
|
|
23254
|
-
this.stylingContainer.prepend(sheet);
|
|
23255
|
-
};
|
|
23256
|
-
}
|
|
23257
|
-
componentDidRender() {
|
|
23258
|
-
// start custom styling area
|
|
23259
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
23260
|
-
if (this.clientStyling)
|
|
23261
|
-
this.setClientStyling();
|
|
23262
|
-
this.limitStylingAppends = true;
|
|
23263
|
-
}
|
|
23264
|
-
// end custom styling area
|
|
23265
23250
|
}
|
|
23266
23251
|
render() {
|
|
23267
|
-
|
|
23252
|
+
var _a;
|
|
23253
|
+
switch ((_a = this.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) {
|
|
23268
23254
|
case 'text':
|
|
23269
23255
|
return h$2("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 });
|
|
23270
23256
|
case 'email':
|
|
@@ -23593,7 +23579,10 @@ const GeneralRegistration = class {
|
|
|
23593
23579
|
});
|
|
23594
23580
|
// Populate the list of inputs values and set as null in the beginning
|
|
23595
23581
|
this.listOfInputValues = this.listOfInputs.map(field => {
|
|
23596
|
-
|
|
23582
|
+
var _a;
|
|
23583
|
+
return { name: field.name,
|
|
23584
|
+
value: ((_a = field.inputType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) == 'checkbox' ? 'false' : null,
|
|
23585
|
+
isDuplicate: field.isDuplicateInput || false };
|
|
23597
23586
|
});
|
|
23598
23587
|
// Set the list of actions
|
|
23599
23588
|
this.listOfActions = config.content.actions.map(action => action);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-b3c0d3c9.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["checkbox-input_11",[[1,"general-registration",{"endpoint":[
|
|
16
|
+
return bootstrapLazy([["checkbox-input_11",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"errorMessage":[32],"emitValue":[32],"isFormValid":[32],"listOfInputs":[32],"isLoading":[32],"limitStylingAppends":[32],"registrationStep":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"rules":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]]]]], options);
|
|
17
17
|
});
|
|
@@ -535,9 +535,14 @@ const callNodeRefs = (vNode) => {
|
|
|
535
535
|
};
|
|
536
536
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
537
537
|
const hostElm = hostRef.$hostElement$;
|
|
538
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
538
539
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
539
540
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
540
541
|
hostTagName = hostElm.tagName;
|
|
542
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
543
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
544
|
+
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
545
|
+
}
|
|
541
546
|
rootVnode.$tag$ = null;
|
|
542
547
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
543
548
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -914,6 +919,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
914
919
|
.map(([propName, m]) => {
|
|
915
920
|
const attrName = m[1] || propName;
|
|
916
921
|
attrNameToPropName.set(attrName, propName);
|
|
922
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
923
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
924
|
+
}
|
|
917
925
|
return attrName;
|
|
918
926
|
});
|
|
919
927
|
}
|
|
@@ -1091,6 +1099,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1091
1099
|
{
|
|
1092
1100
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1093
1101
|
}
|
|
1102
|
+
{
|
|
1103
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1104
|
+
}
|
|
1094
1105
|
{
|
|
1095
1106
|
cmpMeta.$watchers$ = {};
|
|
1096
1107
|
}
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-b3c0d3c9.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["checkbox-input_11",[[1,"general-registration",{"endpoint":[
|
|
13
|
+
return bootstrapLazy([["checkbox-input_11",[[1,"general-registration",{"endpoint":[513],"language":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"errorMessage":[32],"emitValue":[32],"isFormValid":[32],"listOfInputs":[32],"isLoading":[32],"limitStylingAppends":[32],"registrationStep":[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{"type":[513],"name":[513],"displayName":[513,"display-name"],"action":[513],"validation":[16],"options":[520],"language":[513],"autofilled":[516],"defaultValue":[520,"default-value"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[520,"client-styling"]}],[1,"checkbox-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"date-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"email-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"password-input",{"name":[513],"displayName":[513,"display-name"],"defaultValue":[513,"default-value"],"autofilled":[516],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"radio-input",{"name":[513],"displayName":[513,"display-name"],"optionsGroup":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"select-input",{"name":[513],"displayName":[513,"display-name"],"action":[513],"defaultValue":[513,"default-value"],"autofilled":[516],"options":[16],"validation":[16],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"errorMessage":[32],"isValid":[32],"limitStylingAppends":[32]}],[1,"tel-input",{"name":[513],"displayName":[513,"display-name"],"showLabels":[516,"show-labels"],"action":[513],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"language":[513],"emitValue":[516,"emit-value"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]}],[1,"text-input",{"name":[513],"displayName":[513,"display-name"],"validation":[16],"defaultValue":[513,"default-value"],"autofilled":[516],"rules":[513],"language":[513],"checkValidity":[516,"check-validity"],"emitValue":[516,"emit-value"],"isDuplicateInput":[516,"is-duplicate-input"],"clientStyling":[513,"client-styling"],"isValid":[32],"errorMessage":[32],"limitStylingAppends":[32]},[[16,"sendInputValue","valueChangedHandler"]]]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-
|
|
1
|
+
import{p as e,b as l}from"./p-35d6abbe.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((e=>l([["p-3313fb60",[[1,"general-registration",{endpoint:[513],language:[513],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],errorMessage:[32],emitValue:[32],isFormValid:[32],listOfInputs:[32],isLoading:[32],limitStylingAppends:[32],registrationStep:[32]},[[0,"sendValidityState","checkInputsValidityHandler"],[0,"sendInputValue","getInputsValueHandler"]]],[1,"general-input",{type:[513],name:[513],displayName:[513,"display-name"],action:[513],validation:[16],options:[520],language:[513],autofilled:[516],defaultValue:[520,"default-value"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[520,"client-styling"]}],[1,"checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32]}],[1,"date-input",{name:[513],displayName:[513,"display-name"],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32]}],[1,"email-input",{name:[513],displayName:[513,"display-name"],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"number-input",{name:[513],displayName:[513,"display-name"],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32]}],[1,"password-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],validation:[16],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32]},[[16,"sendInputValue","valueChangedHandler"]]],[1,"radio-input",{name:[513],displayName:[513,"display-name"],optionsGroup:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32]}],[1,"select-input",{name:[513],displayName:[513,"display-name"],action:[513],defaultValue:[513,"default-value"],autofilled:[516],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32]}],[1,"tel-input",{name:[513],displayName:[513,"display-name"],showLabels:[516,"show-labels"],action:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32]}],[1,"text-input",{name:[513],displayName:[513,"display-name"],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],rules:[513],language:[513],checkValidity:[516,"check-validity"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32]},[[16,"sendInputValue","valueChangedHandler"]]]]]],e)));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as s}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,g as s}from"./p-35d6abbe.js";const o=["ro","en"],r={en:{dateError:"The selected date should be between {min} and {max}",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",nextButton:"Next",backButton:"Back",doneButton:"Done"},ro:{lengthError:"Cuvântul introdus este prea scurt. {minLength} and {maxLength}",requiredError:"Acest câmp este obligatoriu."}},n=(t,e,i)=>{const s=e;let n=r[void 0!==s&&o.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},a=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}render(){return i("div",{class:"checkbox__wrapper",ref:t=>this.stylingContainer=t},i("input",{type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:!!this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("small",{class:"checkbox__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};a.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}';
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
@@ -2815,7 +2815,7 @@ class Br{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
|
|
|
2815
2815
|
</vaadin-date-picker-overlay>
|
|
2816
2816
|
|
|
2817
2817
|
<slot name="tooltip"></slot>
|
|
2818
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Or(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Fr(this.inputElement,this._labelController)),this._tooltipController=new ro(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}customElements.define(Vr.is,Vr);const $r=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}render(){const t=1==this.isValid||null==this.isValid?"":"date__input--invalid";return i("div",{class:"date__wrapper",ref:t=>this.stylingContainer=t},i("label",{class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onBlur:t=>this.handleInput(t)}),i("small",{class:"date__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$r.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.date__label--required::after{content:"*";font-family:inherit;color:#1F1F1F;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}';const Lr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.validationPattern="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t;return this.inputReference.validity.patternMismatch?null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorMessage:this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):this.isDuplicateInput&&this.duplicateInputValue!==this.value?this.validation.custom.find((t=>"duplicate-input"===t.rule)).errorMessage:void 0}render(){return i("div",{class:"email__wrapper",ref:t=>this.stylingContainer=t},i("input",{id:`${this.name}__input`,type:"email",class:"email__input "+(1==this.isValid||null==this.isValid?"":"email__input--invalid"),value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onBlur:t=>this.handleInput(t)}),i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Lr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%;padding-top:26px}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.email__label--required::after{content:"*";font-family:inherit;color:#1F1F1F;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}';const jr=class{constructor(e){t(this,e),this.type="text",this.clientStyling="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}render(){switch(this.type.toLowerCase()){case"text":return i("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});case"email":return i("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});case"number":return i("number-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});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling});case"datetime":return i("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});case"password":return i("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,"client-styling":this.clientStyling});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling});case"dropdown":return i("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});default:return i("p",null,"The ",this.type," input type is not valid")}}};jr.style=":host{display:block}";const Rr=["ro","en"],Hr={en:{dateError:"The selected date should be between {min} and {max}",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",nextButton:"Next",backButton:"Back",doneButton:"Done"},ro:{lengthError:"Cuvântul introdus este prea scurt. {minLength} and {maxLength}",requiredError:"Acest câmp este obligatoriu."}},qr=(t,e,i)=>{const s=e;let o=Hr[void 0!==s&&Rr.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},Ur=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.emitValue=!1,this.listOfInputs=[],this.isLoading=!0,this.limitStylingAppends=!1,this.listOfInputValues=[],this.listOfActions=[],this.indexStep=0,this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)}))}}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}checkInputsValidityHandler(t){this.listOfInputs.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputs)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href)}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.isLastStep=!1,this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions),"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions),"values"==t.type){const t=e[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value,console.log(e))}))}}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const s={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,s).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoading=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("Mobile"==e.name?(t.MobilePrefix=e.value.split("|")[0],t[e.name]=e.value.split("|")[1]):t[e.name]=e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const s={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,s).then((t=>{if(t.status>=300)throw new Error("err");return t.json()})).then((t=>{this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?this.setRegister():(this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}setRegister(){this.isLoading=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>{if(t.status>=300)throw new Error("err");return t.json()})).then((t=>{t.userId&&alert(`User registered - the user ID is ${t.userId}`)})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign(Object.assign({},t),{isValid:!1});return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isValid:!1,isDuplicateInput:!0})]:[i]})),this.listOfInputValues=this.listOfInputs.map((t=>({name:t.name,value:null,isDuplicate:t.isDuplicateInput||!1}))),this.listOfActions=t.content.actions.map((t=>t)),this.isLastStep=this.listOfActions.some((t=>"/register"==t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],registerUserData:{},actions:[]})}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderInputs(){return this.listOfInputs.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling})))}renderButtons(){return i("div",{class:"registration__buttons-wrapper"},i("button",{class:"registration__button registration__button--next",type:"submit",form:"RegistrationForm",onClick:t=>this.nextHandler(t)},qr(this.isLastStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},qr("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`,ref:t=>this.stylingContainer=t},i("form",{action:".",id:"RegistrationForm",class:"registration__form"},this.renderInputs()),this.renderButtons())}static get watchers(){return{registrationStep:["sendStep"]}}};Ur.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-around;\n align-items: center;\n}\n.registration__button {\n text-transform: uppercase;\n width: 250px;\n height: 40px;\n border-radius: 3px;\n}\n.registration__button:hover {\n opacity: 0.8;\n}\n.registration__button:active {\n opacity: 1;\n}\n.registration__button--next {\n color: #FFFFFF;\n background-color: #B0B0B0;\n border: none;\n}\n.registration__button--back {\n color: #B0B0B0;\n background-color: #FFFFFF;\n border: 2px solid #B0B0B0;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: column;\n gap: 15px;\n }\n}';const Wr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}render(){return i("div",{class:"number__wrapper",ref:t=>this.stylingContainer=t},i("input",{ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:"number__input "+(1==this.isValid||null==this.isValid?"":"number__input--invalid"),placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onBlur:t=>this.handleInput(t)}),i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Wr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%;padding-top:26px}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.number__label--required::after{content:"*";font-family:inherit;color:#1F1F1F;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}',
|
|
2818
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Or(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Fr(this.inputElement,this._labelController)),this._tooltipController=new ro(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}customElements.define(Vr.is,Vr);const $r=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}render(){const t=1==this.isValid||null==this.isValid?"":"date__input--invalid";return i("div",{class:"date__wrapper",ref:t=>this.stylingContainer=t},i("label",{class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onBlur:t=>this.handleInput(t)}),i("small",{class:"date__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$r.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.date__label--required::after{content:"*";font-family:inherit;color:#1F1F1F;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}';const Lr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.validationPattern="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t;return this.inputReference.validity.patternMismatch?null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorMessage:this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):this.isDuplicateInput&&this.duplicateInputValue!==this.value?this.validation.custom.find((t=>"duplicate-input"===t.rule)).errorMessage:void 0}render(){return i("div",{class:"email__wrapper",ref:t=>this.stylingContainer=t},i("input",{id:`${this.name}__input`,type:"email",class:"email__input "+(1==this.isValid||null==this.isValid?"":"email__input--invalid"),value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onBlur:t=>this.handleInput(t)}),i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Lr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%;padding-top:26px}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.email__label--required::after{content:"*";font-family:inherit;color:#1F1F1F;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}';const jr=class{constructor(e){t(this,e),this.type="text",this.clientStyling=""}render(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("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});case"email":return i("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});case"number":return i("number-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});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling});case"datetime":return i("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});case"password":return i("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,"client-styling":this.clientStyling});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling});case"dropdown":return i("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});default:return i("p",null,"The ",this.type," input type is not valid")}}};jr.style=":host{display:block}";const Rr=["ro","en"],Hr={en:{dateError:"The selected date should be between {min} and {max}",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",nextButton:"Next",backButton:"Back",doneButton:"Done"},ro:{lengthError:"Cuvântul introdus este prea scurt. {minLength} and {maxLength}",requiredError:"Acest câmp este obligatoriu."}},qr=(t,e,i)=>{const s=e;let o=Hr[void 0!==s&&Rr.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},Ur=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.emitValue=!1,this.listOfInputs=[],this.isLoading=!0,this.limitStylingAppends=!1,this.listOfInputValues=[],this.listOfActions=[],this.indexStep=0,this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)}))}}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}checkInputsValidityHandler(t){this.listOfInputs.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputs)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href)}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.isLastStep=!1,this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions),"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions),"values"==t.type){const t=e[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value,console.log(e))}))}}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const s={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,s).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoading=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("Mobile"==e.name?(t.MobilePrefix=e.value.split("|")[0],t[e.name]=e.value.split("|")[1]):t[e.name]=e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const s={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,s).then((t=>{if(t.status>=300)throw new Error("err");return t.json()})).then((t=>{this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?this.setRegister():(this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}setRegister(){this.isLoading=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>{if(t.status>=300)throw new Error("err");return t.json()})).then((t=>{t.userId&&alert(`User registered - the user ID is ${t.userId}`)})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign(Object.assign({},t),{isValid:!1});return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isValid:!1,isDuplicateInput:!0})]:[i]})),this.listOfInputValues=this.listOfInputs.map((t=>{var e;return{name:t.name,value:"checkbox"==(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())?"false":null,isDuplicate:t.isDuplicateInput||!1}})),this.listOfActions=t.content.actions.map((t=>t)),this.isLastStep=this.listOfActions.some((t=>"/register"==t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],registerUserData:{},actions:[]})}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderInputs(){return this.listOfInputs.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling})))}renderButtons(){return i("div",{class:"registration__buttons-wrapper"},i("button",{class:"registration__button registration__button--next",type:"submit",form:"RegistrationForm",onClick:t=>this.nextHandler(t)},qr(this.isLastStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},qr("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`,ref:t=>this.stylingContainer=t},i("form",{action:".",id:"RegistrationForm",class:"registration__form"},this.renderInputs()),this.renderButtons())}static get watchers(){return{registrationStep:["sendStep"]}}};Ur.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-around;\n align-items: center;\n}\n.registration__button {\n text-transform: uppercase;\n width: 250px;\n height: 40px;\n border-radius: 3px;\n}\n.registration__button:hover {\n opacity: 0.8;\n}\n.registration__button:active {\n opacity: 1;\n}\n.registration__button--next {\n color: #FFFFFF;\n background-color: #B0B0B0;\n border: none;\n}\n.registration__button--back {\n color: #B0B0B0;\n background-color: #FFFFFF;\n border: 2px solid #B0B0B0;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .registration__buttons-wrapper {\n flex-direction: column;\n gap: 15px;\n }\n}';const Wr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}render(){return i("div",{class:"number__wrapper",ref:t=>this.stylingContainer=t},i("input",{ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:"number__input "+(1==this.isValid||null==this.isValid?"":"number__input--invalid"),placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onBlur:t=>this.handleInput(t)}),i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Wr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%;padding-top:26px}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#1F1F1F;position:absolute;top:0;left:0}.number__label--required::after{content:"*";font-family:inherit;color:#1F1F1F;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:8px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}',
|
|
2819
2819
|
/**
|
|
2820
2820
|
* @license
|
|
2821
2821
|
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=(e,t,n)=>{n&&n.map((([n,l,s])=>{const c=u(e,n),r=a(t,s),i=f(n);o.ael(c,l,r,i),(t.o=t.o||[]).push((()=>o.rel(c,l,r,i)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){Q(e)}},u=(e,t)=>16&t?s.body:e,f=e=>0!=(2&e),d=new WeakMap,h=e=>"sc-"+e.h,$={},m=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,s=!1,o=!1,c=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?c[c.length-1].$+=l:c.push(s?p(null,l):l),o=s)};if(r(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=p(e,null);return i.m=t,c.length>0&&(i.p=c),i},p=(e,t)=>({t:0,g:e,$:t,S:null,p:null,m:null}),b={},w=(e,t,n,s,c,r)=>{if(n!==s){let i=K(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,l=S(n),o=S(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=m(s);if((i||l&&null!==s)&&!c)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||c)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):K(l,a)?a.slice(2):a[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},g=/\s/,S=e=>e?e.split(g):[],j=(e,t,n,l)=>{const s=11===t.S.nodeType&&t.S.host?t.S.host:t.S,o=e&&e.m||$,c=t.m||$;for(l in o)l in c||w(s,l,o[l],void 0,n,t.t);for(l in c)w(s,l,o[l],c[l],n,t.t)},v=(t,n,l)=>{let o,c,r=n.p[l],i=0;if(null!==r.$)o=r.S=s.createTextNode(r.$);else if(o=r.S=s.createElement(r.g),j(null,r,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),r.p)for(i=0;i<r.p.length;++i)c=v(t,r,i),c&&o.appendChild(c);return o},M=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=v(null,l,o),r&&(s[o].S=r,i.insertBefore(r,n)))},k=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.S,L(l),s.remove())},C=(e,t)=>e.g===t.g,O=(e,t)=>{const n=t.S=e.S,l=e.p,s=t.p,o=t.$;null===o?(j(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],a=t[r],u=l.length-1,f=l[0],d=l[u];for(;o<=r&&c<=u;)null==i?i=t[++o]:null==a?a=t[--r]:null==f?f=l[++c]:null==d?d=l[--u]:C(i,f)?(O(i,f),i=t[++o],f=l[++c]):C(a,d)?(O(a,d),a=t[--r],d=l[--u]):C(i,d)?(O(i,d),e.insertBefore(i.S,a.S.nextSibling),i=t[++o],d=l[--u]):C(a,f)?(O(a,f),e.insertBefore(a.S,i.S),a=t[--r],f=l[++c]):(s=v(t&&t[c],n,c),f=l[++c],s&&i.S.parentNode.insertBefore(s,i.S));o>r?M(e,null==l[u+1]?null:l[u+1].S,n,l,c,u):c>u&&k(t,o,r)})(n,l,t,s):null!==s?(null!==e.$&&(n.textContent=""),M(n,null,t,s,0,s.length-1)):null!==l&&k(l,0,l.length-1)):e.$!==o&&(n.data=o)},L=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(L)},P=e=>G(e).j,x=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},N=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},R=(e,t)=>{if(e.t|=16,!(4&e.t))return N(e,e.M),ce((()=>T(e,t)));e.t|=512},T=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>q(n,e,t))),e.u=null),l=q(n,"componentWillLoad")),F(l,(()=>W(e,n,t)))},W=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.k,n=e.j,l=t.t,o=((e,t)=>{let n=h(t),l=Z.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=d.get(e=e.head||e);o||d.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);A(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>D(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},A=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.C||p(null,null),
|
|
1
|
+
let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=(e,t,n)=>{n&&n.map((([n,l,s])=>{const c=u(e,n),r=a(t,s),i=f(n);o.ael(c,l,r,i),(t.o=t.o||[]).push((()=>o.rel(c,l,r,i)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){Q(e)}},u=(e,t)=>16&t?s.body:e,f=e=>0!=(2&e),d=new WeakMap,h=e=>"sc-"+e.h,$={},m=e=>"object"==(e=typeof e)||"function"===e,y=(e,t,...n)=>{let l=null,s=!1,o=!1,c=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?c[c.length-1].$+=l:c.push(s?p(null,l):l),o=s)};if(r(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=p(e,null);return i.m=t,c.length>0&&(i.p=c),i},p=(e,t)=>({t:0,g:e,$:t,S:null,p:null,m:null}),b={},w=(e,t,n,s,c,r)=>{if(n!==s){let i=K(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,l=S(n),o=S(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=m(s);if((i||l&&null!==s)&&!c)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||c)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):K(l,a)?a.slice(2):a[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},g=/\s/,S=e=>e?e.split(g):[],j=(e,t,n,l)=>{const s=11===t.S.nodeType&&t.S.host?t.S.host:t.S,o=e&&e.m||$,c=t.m||$;for(l in o)l in c||w(s,l,o[l],void 0,n,t.t);for(l in c)w(s,l,o[l],c[l],n,t.t)},v=(t,n,l)=>{let o,c,r=n.p[l],i=0;if(null!==r.$)o=r.S=s.createTextNode(r.$);else if(o=r.S=s.createElement(r.g),j(null,r,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),r.p)for(i=0;i<r.p.length;++i)c=v(t,r,i),c&&o.appendChild(c);return o},M=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=v(null,l,o),r&&(s[o].S=r,i.insertBefore(r,n)))},k=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.S,L(l),s.remove())},C=(e,t)=>e.g===t.g,O=(e,t)=>{const n=t.S=e.S,l=e.p,s=t.p,o=t.$;null===o?(j(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],a=t[r],u=l.length-1,f=l[0],d=l[u];for(;o<=r&&c<=u;)null==i?i=t[++o]:null==a?a=t[--r]:null==f?f=l[++c]:null==d?d=l[--u]:C(i,f)?(O(i,f),i=t[++o],f=l[++c]):C(a,d)?(O(a,d),a=t[--r],d=l[--u]):C(i,d)?(O(i,d),e.insertBefore(i.S,a.S.nextSibling),i=t[++o],d=l[--u]):C(a,f)?(O(a,f),e.insertBefore(a.S,i.S),a=t[--r],f=l[++c]):(s=v(t&&t[c],n,c),f=l[++c],s&&i.S.parentNode.insertBefore(s,i.S));o>r?M(e,null==l[u+1]?null:l[u+1].S,n,l,c,u):c>u&&k(t,o,r)})(n,l,t,s):null!==s?(null!==e.$&&(n.textContent=""),M(n,null,t,s,0,s.length-1)):null!==l&&k(l,0,l.length-1)):e.$!==o&&(n.data=o)},L=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(L)},P=e=>G(e).j,x=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},N=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},R=(e,t)=>{if(e.t|=16,!(4&e.t))return N(e,e.M),ce((()=>T(e,t)));e.t|=512},T=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>q(n,e,t))),e.u=null),l=q(n,"componentWillLoad")),F(l,(()=>W(e,n,t)))},W=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.k,n=e.j,l=t.t,o=((e,t)=>{let n=h(t),l=Z.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=d.get(e=e.head||e);o||d.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);A(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>D(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},A=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.k,c=n.C||p(null,null),r=(e=>e&&e.g===b)(l)?l:y(null,null,l);t=s.tagName,o.O&&(r.m=r.m||{},o.O.map((([e,t])=>r.m[t]=s[e]))),r.g=null,r.t|=4,n.C=r,r.S=c.S=s.shadowRoot||s,e=s["s-sc"],O(c,r)})(n,l)}catch(e){Q(e,n.j)}return null},D=e=>{const t=e.j,n=e.i,l=e.M;q(n,"componentDidRender"),64&e.t||(e.t|=64,H(t),q(n,"componentDidLoad"),e.L(t),l||U()),e.v&&(e.v(),e.v=void 0),512&e.t&&oe((()=>R(e,!1))),e.t&=-517},U=()=>{H(s.documentElement),oe((()=>E(l,"appload",{detail:{namespace:"general-registration"}})))},q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){Q(e)}},F=(e,t)=>e&&e.then?e.then(t):t(),H=e=>e.classList.add("hydrated"),V=(e,t,n)=>{if(t.P){e.watchers&&(t.N=e.watchers);const l=Object.entries(t.P),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>G(this).R.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=G(e),o=s.j,c=s.R.get(t),r=s.t,i=s.i;if(n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.P[t][0]),(!(8&r)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.R.set(t,n),i)){if(l.N&&128&r){const e=l.N[t];e&&e.map((e=>{try{i[e](n,c,t)}catch(e){Q(e,o)}}))}2==(18&r)&&R(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.O.push([e,s]),s}))}}return e},_=e=>{q(e,"connectedCallback")},z=(e,t={})=>{const n=[],c=t.exclude||[],a=l.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let m,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],h:t[1],P:t[2],T:t[3]};l.P=t[2],l.T=t[3],l.O=[],l.N={};const s=l.h,u=class extends HTMLElement{constructor(e){super(e),J(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){m&&(clearTimeout(m),m=null),y?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=G(e),n=t.k,l=()=>{};if(1&t.t)i(e,t,n.T),_(t.i);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){N(t,t.M=n);break}}n.P&&Object.entries(n.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Y(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.N=s.watchers,V(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){Q(e)}t.t&=-9,t.t|=128,e(),_(t.i)}if(s.style){let e=s.style;const t=h(n);if(!Z.has(t)){const l=()=>{};((e,t,n)=>{let l=Z.get(e);r&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,Z.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,c=()=>R(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{if(0==(1&o.t)){const e=G(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return G(this).W}};l.A=e[0],c.includes(s)||a.get(s)||(n.push(s),a.define(s,V(u,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),y=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>m=setTimeout(U,30)))},B=new WeakMap,G=e=>B.get(e),I=(e,t)=>B.set(t.i=e,t),J=(e,t)=>{const n={t:0,j:e,k:t,R:new Map};return n.W=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],i(e,n,t.T),B.set(e,n)},K=(e,t)=>t in e,Q=(e,t)=>(0,console.error)(e,t),X=new Map,Y=e=>{const t=e.h.replace(/-/g,"_"),n=e.A,l=X.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(X.set(n,e),e[t])),Q)},Z=new Map,ee=[],te=[],ne=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?oe(se):o.raf(se))},le=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){Q(e)}e.length=0},se=()=>{le(ee),le(te),(n=ee.length>0)&&o.raf(se)},oe=e=>c().then(e),ce=ne(te,!0);export{z as b,x as c,P as g,y as h,c as p,I as r}
|