@mindful-web/marko-web-identity-x 1.17.0 → 1.17.4
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/browser/access.vue +5 -0
- package/browser/custom-column.vue +5 -0
- package/browser/download.vue +5 -0
- package/browser/form/fields/country.vue +9 -2
- package/browser/login-fields.vue +6 -1
- package/browser/login.vue +25 -1
- package/browser/profile.vue +59 -13
- package/components/access.marko.js +2 -2
- package/components/comment-stream.marko.js +2 -2
- package/components/context.marko.js +2 -2
- package/components/form-access.marko +3 -1
- package/components/form-access.marko.js +6 -3
- package/components/form-authenticate.marko.js +2 -2
- package/components/form-change-email.marko.js +2 -2
- package/components/form-login.marko +1 -2
- package/components/form-login.marko.js +3 -4
- package/components/form-logout.marko.js +2 -2
- package/components/form-profile.marko +4 -2
- package/components/form-profile.marko.js +7 -4
- package/components/form-register.marko.js +2 -2
- package/components/identify.marko.js +2 -2
- package/components/marko.json +2 -0
- package/components/non-auth-identify.marko.js +2 -2
- package/package.json +2 -2
- package/routes/countries.js +10 -4
package/browser/access.vue
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:user="user"
|
|
21
21
|
:endpoints="endpoints"
|
|
22
22
|
:enable-change-email="enableChangeEmail"
|
|
23
|
+
:lang="lang"
|
|
23
24
|
/>
|
|
24
25
|
</div>
|
|
25
26
|
|
|
@@ -201,6 +202,10 @@ export default {
|
|
|
201
202
|
type: Boolean,
|
|
202
203
|
default: true,
|
|
203
204
|
},
|
|
205
|
+
lang: {
|
|
206
|
+
type: String,
|
|
207
|
+
default: 'en',
|
|
208
|
+
},
|
|
204
209
|
},
|
|
205
210
|
|
|
206
211
|
/**
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
:class-name="className"
|
|
77
77
|
:required="required"
|
|
78
78
|
:label="label"
|
|
79
|
+
:lang="lang"
|
|
79
80
|
/>
|
|
80
81
|
<street
|
|
81
82
|
v-else-if="fieldKey === 'street'"
|
|
@@ -240,6 +241,10 @@ export default {
|
|
|
240
241
|
type: Boolean,
|
|
241
242
|
default: false,
|
|
242
243
|
},
|
|
244
|
+
lang: {
|
|
245
|
+
type: String,
|
|
246
|
+
default: 'en',
|
|
247
|
+
},
|
|
243
248
|
},
|
|
244
249
|
/**
|
|
245
250
|
*
|
package/browser/download.vue
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
:endpoints="endpoints"
|
|
22
22
|
:enable-change-email="enableChangeEmail"
|
|
23
23
|
:allow-anonymous="allowAnonymous"
|
|
24
|
+
:lang="lang"
|
|
24
25
|
/>
|
|
25
26
|
</div>
|
|
26
27
|
|
|
@@ -216,6 +217,10 @@ export default {
|
|
|
216
217
|
type: Boolean,
|
|
217
218
|
default: true,
|
|
218
219
|
},
|
|
220
|
+
lang: {
|
|
221
|
+
type: String,
|
|
222
|
+
default: 'en',
|
|
223
|
+
},
|
|
219
224
|
},
|
|
220
225
|
|
|
221
226
|
/**
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
autocomplete="country"
|
|
14
14
|
>
|
|
15
15
|
<option disabled value="">
|
|
16
|
-
|
|
16
|
+
{{ placeholder }}
|
|
17
17
|
</option>
|
|
18
18
|
<option v-for="country in countries" :key="country.id" :value="country.id">
|
|
19
19
|
{{ country.name }} {{ country.flag }}
|
|
@@ -56,6 +56,10 @@ export default {
|
|
|
56
56
|
type: String,
|
|
57
57
|
default: '',
|
|
58
58
|
},
|
|
59
|
+
lang: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'en',
|
|
62
|
+
},
|
|
59
63
|
},
|
|
60
64
|
data: () => ({
|
|
61
65
|
id: 'sign-on-country',
|
|
@@ -72,6 +76,9 @@ export default {
|
|
|
72
76
|
this.$emit('input', countryCode || null);
|
|
73
77
|
},
|
|
74
78
|
},
|
|
79
|
+
placeholder() {
|
|
80
|
+
return this.lang === 'pt' ? 'Selecione o país...' : 'Select country...';
|
|
81
|
+
},
|
|
75
82
|
},
|
|
76
83
|
created() {
|
|
77
84
|
this.load();
|
|
@@ -81,7 +88,7 @@ export default {
|
|
|
81
88
|
this.error = null;
|
|
82
89
|
this.isLoading = true;
|
|
83
90
|
try {
|
|
84
|
-
const res = await get(
|
|
91
|
+
const res = await get(`/countries?lang=${this.lang}`);
|
|
85
92
|
this.countries = await res.json();
|
|
86
93
|
} catch (e) {
|
|
87
94
|
this.error = e;
|
package/browser/login-fields.vue
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<!-- locale dependent fields -->
|
|
20
20
|
<div v-if="displayCountryField" class="col-md-6">
|
|
21
|
-
<country-code v-model="values.countryCode" required />
|
|
21
|
+
<country-code v-model="values.countryCode" :lang="lang" required />
|
|
22
22
|
</div>
|
|
23
23
|
<div v-if="displayRegionField" class="col-md-6">
|
|
24
24
|
<region-code v-model="values.regionCode" :country-code="values.countryCode" required />
|
|
@@ -134,6 +134,11 @@ export default {
|
|
|
134
134
|
type: Array,
|
|
135
135
|
default: () => [],
|
|
136
136
|
},
|
|
137
|
+
|
|
138
|
+
lang: {
|
|
139
|
+
type: String,
|
|
140
|
+
default: 'en',
|
|
141
|
+
},
|
|
137
142
|
},
|
|
138
143
|
|
|
139
144
|
data: () => ({
|
package/browser/login.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="hasActiveUser">
|
|
3
|
-
<p>
|
|
3
|
+
<p>{{ youAreCurrentlyLoggedInAs }} {{ activeUser.email }}.</p>
|
|
4
4
|
<a
|
|
5
5
|
:href="endpoints.profile"
|
|
6
6
|
class="btn btn-secondary mb-2 mr-2"
|
|
@@ -240,6 +240,20 @@ export default {
|
|
|
240
240
|
Agregue ${this.senderEmailAddress} a su lista blanca e intente registrarse nuevamente.
|
|
241
241
|
</p>`;
|
|
242
242
|
}
|
|
243
|
+
|
|
244
|
+
if (this.lang === 'pt') {
|
|
245
|
+
return `<h4>Quase pronto!</h4>
|
|
246
|
+
<p>
|
|
247
|
+
Acabamos de enviar um e-mail para <em>${this.email}</em> seu link de login único (expira em uma hora).
|
|
248
|
+
Para finalizar ${this.actionText || 'o login'}, abra a mensagem de e-mail e clique no link contido nela.
|
|
249
|
+
</p>
|
|
250
|
+
<p>
|
|
251
|
+
Observação: verifique suas pastas de spam/lixo eletrônico.
|
|
252
|
+
Se você não receber este e-mail, é provável que seu firewall ou ISP o tenha bloqueado.
|
|
253
|
+
Adicione ${this.senderEmailAddress} à sua lista de permissões e tente se registrar novamente.
|
|
254
|
+
</p>`;
|
|
255
|
+
}
|
|
256
|
+
|
|
243
257
|
return `<h4>Almost Done!</h4>
|
|
244
258
|
<p>
|
|
245
259
|
We just sent an email to <em>${this.email}</em> with your one-time login link (expires in one hour).
|
|
@@ -252,6 +266,16 @@ export default {
|
|
|
252
266
|
</p>`;
|
|
253
267
|
},
|
|
254
268
|
|
|
269
|
+
youAreCurrentlyLoggedInAs() {
|
|
270
|
+
if (this.lang === 'es') {
|
|
271
|
+
return 'Actualmente estás conectado como';
|
|
272
|
+
}
|
|
273
|
+
if (this.lang === 'pt') {
|
|
274
|
+
return 'Você está atualmente conectado como';
|
|
275
|
+
}
|
|
276
|
+
return 'You are currently logged in as';
|
|
277
|
+
},
|
|
278
|
+
|
|
255
279
|
/**
|
|
256
280
|
*
|
|
257
281
|
*/
|
package/browser/profile.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<fieldset :disabled="isLoading">
|
|
8
8
|
<div v-if="enableChangeEmail" class="row">
|
|
9
9
|
<div class="col-12">
|
|
10
|
-
<label>
|
|
10
|
+
<label>{{ defaultFieldLabels.emailAddress }}</label>
|
|
11
11
|
<div class="form-group">
|
|
12
12
|
<div class="input-group">
|
|
13
13
|
<input disabled :value="user.email" class="form-control">
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
class="btn btn-outline-secondary d-flex justify-content-center flex-column"
|
|
18
18
|
title="Change your login email address"
|
|
19
19
|
>
|
|
20
|
-
|
|
20
|
+
{{ defaultFieldLabels.changeEmailAddress }}
|
|
21
21
|
</a>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
v-model="user.countryCode"
|
|
116
116
|
:required="countryCodeSettings.required"
|
|
117
117
|
:label="defaultFieldLabels.country"
|
|
118
|
+
:lang="lang"
|
|
118
119
|
/>
|
|
119
120
|
</div>
|
|
120
121
|
</div>
|
|
@@ -196,39 +197,41 @@
|
|
|
196
197
|
</div>
|
|
197
198
|
</fieldset>
|
|
198
199
|
<p v-if="error" class="mt-3 text-danger">
|
|
199
|
-
|
|
200
|
+
{{ translate({ key: 'You must be logged in to modify your user profile.' }) }} {{ error }}
|
|
200
201
|
</p>
|
|
201
202
|
</form>
|
|
202
203
|
<div v-else>
|
|
203
204
|
<div class="success-message">
|
|
204
205
|
<div class="success-message__title">
|
|
205
|
-
Your profile has been saved.
|
|
206
|
+
{{ translate({ key: 'Your profile has been saved.' }) }}
|
|
206
207
|
</div>
|
|
207
208
|
<div v-if="returnTo" class="success-message__message">
|
|
208
209
|
<p>
|
|
209
|
-
You will be automatically redirected in
|
|
210
|
+
{{ translate({ key: 'You will be automatically redirected in ' }) }}
|
|
211
|
+
{{ returnToDelay / 1000 }} {{ translate({ key: 'seconds.' }) }}
|
|
210
212
|
</p>
|
|
211
213
|
<p>
|
|
212
|
-
To continue now,
|
|
213
|
-
<a :href="returnTo">click here</a>.
|
|
214
|
+
{{ translate({ key: 'To continue now,' }) }}
|
|
215
|
+
<a :href="returnTo">{{ translate({ key: 'click here' }) }}</a>.
|
|
214
216
|
</p>
|
|
215
217
|
</div>
|
|
216
218
|
<div v-else class="success-message__message">
|
|
217
219
|
<p>
|
|
218
|
-
To continue modifying your profile,
|
|
220
|
+
{{ translate({ key: 'To continue modifying your profile,' }) }}
|
|
219
221
|
<button class="" type="button" @click="handleReload()">
|
|
220
|
-
click here
|
|
222
|
+
{{ translate({ key: 'click here' }) }}
|
|
221
223
|
</button>.
|
|
222
224
|
</p>
|
|
223
225
|
<p>
|
|
224
|
-
To return to the home page,
|
|
226
|
+
{{ translate({ key: 'To return to the home page, ' }) }}
|
|
227
|
+
<a href="/">{{ translate({ key: 'click here' }) }}</a>.
|
|
225
228
|
</p>
|
|
226
229
|
</div>
|
|
227
230
|
</div>
|
|
228
231
|
</div>
|
|
229
232
|
</div>
|
|
230
233
|
<div v-else>
|
|
231
|
-
|
|
234
|
+
{{ translate({ key: 'You must be logged in to modify your user profile.'}) }}
|
|
232
235
|
<login
|
|
233
236
|
:additional-event-data="additionalEventData"
|
|
234
237
|
:source="loginSource"
|
|
@@ -391,6 +394,10 @@ export default {
|
|
|
391
394
|
type: Boolean,
|
|
392
395
|
default: false,
|
|
393
396
|
},
|
|
397
|
+
lang: {
|
|
398
|
+
type: String,
|
|
399
|
+
default: 'en',
|
|
400
|
+
},
|
|
394
401
|
},
|
|
395
402
|
|
|
396
403
|
/**
|
|
@@ -607,6 +614,47 @@ export default {
|
|
|
607
614
|
this.user.customBooleanFieldAnswers = this.customBooleanFieldAnswers;
|
|
608
615
|
},
|
|
609
616
|
|
|
617
|
+
translate({ key }) {
|
|
618
|
+
const { lang } = this;
|
|
619
|
+
const i18n = {
|
|
620
|
+
pt: {
|
|
621
|
+
'An error occurred': 'Ocorreu um erro: ',
|
|
622
|
+
'Your profile has been saved.': 'Seu perfil foi salvo.',
|
|
623
|
+
'You will be automatically redirected in ': 'Você será redirecionado automaticamente em ',
|
|
624
|
+
'seconds.': 'segundas.',
|
|
625
|
+
'To continue now,': 'Para continuar agora,',
|
|
626
|
+
'click here': 'clique aqui',
|
|
627
|
+
'To continue modifying your profile,': 'Para continuar modificando seu perfil,',
|
|
628
|
+
'To return to the home page, ': 'Para retornar à página inicial, ',
|
|
629
|
+
'You must be logged in to modify your user profile.': 'Você precisa estar logado para modificar seu perfil de usuário.',
|
|
630
|
+
},
|
|
631
|
+
es: {
|
|
632
|
+
'An error occurred': 'Se produjo un error:',
|
|
633
|
+
'Your profile has been saved.': 'Su perfil ha sido guardado.',
|
|
634
|
+
'You will be automatically redirected in ': 'Serás redirigido automáticamente en',
|
|
635
|
+
'seconds.': 'segundos',
|
|
636
|
+
'To continue now,': 'Para continuar ahora,',
|
|
637
|
+
'click here': 'haga clic aquí',
|
|
638
|
+
'To continue modifying your profile,': 'Para continuar modificando tu perfil, ',
|
|
639
|
+
'To return to the home page, ': 'Para volver a la página de inicio, ',
|
|
640
|
+
'You must be logged in to modify your user profile.': 'Você precisa estar logado para modificar seu perfil de usuário.',
|
|
641
|
+
},
|
|
642
|
+
en: {
|
|
643
|
+
'An error occurred: ': 'An error occurred: ',
|
|
644
|
+
'You will be automatically redirected in ': 'You will be automatically redirected in ',
|
|
645
|
+
'seconds.': 'seconds.',
|
|
646
|
+
'To continue now,': 'To continue now,',
|
|
647
|
+
'click here': 'click here',
|
|
648
|
+
'To return to the home page, ': 'To return to the home page, ',
|
|
649
|
+
'To continue modifying your profile,': 'To continue modifying your profile,',
|
|
650
|
+
'Your profile has been saved.': 'Your profile has been saved.',
|
|
651
|
+
'You must be logged in to modify your user profile.': '<p>You must be logged in to modify your user profile.</p>',
|
|
652
|
+
},
|
|
653
|
+
};
|
|
654
|
+
const value = (i18n[lang] && i18n[lang][key]) ? i18n[lang][key] : i18n.en[key] || '';
|
|
655
|
+
return value;
|
|
656
|
+
},
|
|
657
|
+
|
|
610
658
|
onCustomSelectChange(answers, $event) {
|
|
611
659
|
const ids = Array.isArray($event) ? [...$event] : [...($event ? [$event] : [])];
|
|
612
660
|
answers.splice(0);
|
|
@@ -664,12 +712,10 @@ export default {
|
|
|
664
712
|
...(data.additionalEventData || {}),
|
|
665
713
|
},
|
|
666
714
|
}, data.entity);
|
|
667
|
-
|
|
668
715
|
if (this.reloadPageOnSubmit) {
|
|
669
716
|
this.isReloadingPage = true;
|
|
670
717
|
window.location.reload(true);
|
|
671
718
|
}
|
|
672
|
-
|
|
673
719
|
if (this.returnTo) {
|
|
674
720
|
this.isRedirectingPage = true;
|
|
675
721
|
setTimeout(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/access.marko",
|
|
6
6
|
marko_component = require("./access.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -53,7 +53,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
53
53
|
}, marko_component);
|
|
54
54
|
|
|
55
55
|
marko_template.meta = {
|
|
56
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
56
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/access.marko",
|
|
57
57
|
component: "./access.marko",
|
|
58
58
|
tags: [
|
|
59
59
|
"@mindful-web/marko-core/components/resolve.marko"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/comment-stream.marko",
|
|
6
6
|
marko_component = require("./comment-stream.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -68,7 +68,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
68
68
|
}, marko_component);
|
|
69
69
|
|
|
70
70
|
marko_template.meta = {
|
|
71
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
71
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/comment-stream.marko",
|
|
72
72
|
component: "./comment-stream.marko",
|
|
73
73
|
tags: [
|
|
74
74
|
"@mindful-web/marko-web/components/browser-component.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/context.marko",
|
|
6
6
|
marko_component = require("./context.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
@@ -44,7 +44,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
44
44
|
}, marko_component);
|
|
45
45
|
|
|
46
46
|
marko_template.meta = {
|
|
47
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
47
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/context.marko",
|
|
48
48
|
component: "./context.marko",
|
|
49
49
|
tags: [
|
|
50
50
|
"@mindful-web/marko-core/components/resolve.marko"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
3
3
|
import { get, getAsObject } from "@mindful-web/object-path";
|
|
4
4
|
|
|
5
|
-
$ const { req: { identityX } } = out.global;
|
|
5
|
+
$ const { req: { identityX }, site } = out.global;
|
|
6
6
|
$ const { content, formId, user, application } = input;
|
|
7
7
|
$ const form = identityX.config.getAsObject(`forms.${formId}`);
|
|
8
8
|
$ const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
@@ -15,6 +15,7 @@ $ const updateProfileOnSubmit = defaultValue(input.updateProfileOnSubmit, true);
|
|
|
15
15
|
$ const { displayForm, cookie } = getAsObject(out, "global.contentAccessState");
|
|
16
16
|
$ const consentPolicy = defaultValue(form.consentPolicy, get(application, "organization.consentPolicy"));
|
|
17
17
|
$ const emailConsentRequest = defaultValue(form.emailConsentRequest, get(application, "organization.emailConsentRequest"));
|
|
18
|
+
$ const lang = site.config.lang || "en";
|
|
18
19
|
|
|
19
20
|
<if(identityX && form.fieldRows, displayForm)>
|
|
20
21
|
<div class="content-survey-access-idx__wrapper">
|
|
@@ -48,6 +49,7 @@ $ const emailConsentRequest = defaultValue(form.emailConsentRequest, get(applica
|
|
|
48
49
|
emailConsentRequest: emailConsentRequest,
|
|
49
50
|
emailConsentRequestEnabled: defaultValue(input.emailConsentRequest, true),
|
|
50
51
|
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
52
|
+
lang,
|
|
51
53
|
};
|
|
52
54
|
<marko-web-browser-component name="IdentityXAccess" props=props />
|
|
53
55
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/form-access.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
8
8
|
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
@@ -20,7 +20,7 @@ var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
|
20
20
|
function render(input, out, __component, component, state) {
|
|
21
21
|
var data = input;
|
|
22
22
|
|
|
23
|
-
const { req: { identityX } } = out.global;
|
|
23
|
+
const { req: { identityX }, site } = out.global;
|
|
24
24
|
|
|
25
25
|
const { content, formId, user, application } = input;
|
|
26
26
|
|
|
@@ -46,6 +46,8 @@ function render(input, out, __component, component, state) {
|
|
|
46
46
|
|
|
47
47
|
const emailConsentRequest = defaultValue(form.emailConsentRequest, get(application, "organization.emailConsentRequest"));
|
|
48
48
|
|
|
49
|
+
const lang = site.config.lang || "en";
|
|
50
|
+
|
|
49
51
|
if (identityX && form.fieldRows, displayForm) {
|
|
50
52
|
out.w("<div class=\"content-survey-access-idx__wrapper\">");
|
|
51
53
|
|
|
@@ -79,6 +81,7 @@ function render(input, out, __component, component, state) {
|
|
|
79
81
|
emailConsentRequest: emailConsentRequest,
|
|
80
82
|
emailConsentRequestEnabled: defaultValue(input.emailConsentRequest, true),
|
|
81
83
|
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
84
|
+
lang,
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
marko_web_browser_component_tag({
|
|
@@ -104,7 +107,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
104
107
|
});
|
|
105
108
|
|
|
106
109
|
marko_template.meta = {
|
|
107
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
110
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/form-access.marko",
|
|
108
111
|
tags: [
|
|
109
112
|
"@mindful-web/marko-web/components/browser-component.marko"
|
|
110
113
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/form-authenticate.marko",
|
|
6
6
|
marko_component = require("./form-authenticate.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -64,7 +64,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
64
64
|
}, marko_component);
|
|
65
65
|
|
|
66
66
|
marko_template.meta = {
|
|
67
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
67
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/form-authenticate.marko",
|
|
68
68
|
component: "./form-authenticate.marko",
|
|
69
69
|
tags: [
|
|
70
70
|
"@mindful-web/marko-web/components/browser-component.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/form-change-email.marko",
|
|
6
6
|
marko_component = require("./form-change-email.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -59,7 +59,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
59
59
|
}, marko_component);
|
|
60
60
|
|
|
61
61
|
marko_template.meta = {
|
|
62
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
62
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/form-change-email.marko",
|
|
63
63
|
component: "./form-change-email.marko",
|
|
64
64
|
tags: [
|
|
65
65
|
"@mindful-web/marko-web/components/browser-component.marko",
|
|
@@ -19,8 +19,7 @@ $ const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
|
19
19
|
loginEmailPlaceholder: input.loginEmailPlaceholder,
|
|
20
20
|
defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
|
|
21
21
|
requiredCreateFields: identityX.config.getRequiredCreateFields(),
|
|
22
|
-
consentPolicy: get(application, "organization.consentPolicy"),
|
|
23
|
-
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
22
|
+
consentPolicy: identityX.config.get("consentPolicy") || get(application, "organization.consentPolicy"),
|
|
24
23
|
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
25
24
|
appContextId: identityX.config.get("appContextId"),
|
|
26
25
|
lang: defaultValue(input.lang, "en"),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/form-login.marko",
|
|
6
6
|
marko_component = require("./form-login.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -40,8 +40,7 @@ function render(input, out, __component, component, state) {
|
|
|
40
40
|
loginEmailPlaceholder: input.loginEmailPlaceholder,
|
|
41
41
|
defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
|
|
42
42
|
requiredCreateFields: identityX.config.getRequiredCreateFields(),
|
|
43
|
-
consentPolicy: get(application, "organization.consentPolicy"),
|
|
44
|
-
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
43
|
+
consentPolicy: identityX.config.get("consentPolicy") || get(application, "organization.consentPolicy"),
|
|
45
44
|
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
46
45
|
appContextId: identityX.config.get("appContextId"),
|
|
47
46
|
lang: defaultValue(input.lang, "en"),
|
|
@@ -63,7 +62,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
63
62
|
}, marko_component);
|
|
64
63
|
|
|
65
64
|
marko_template.meta = {
|
|
66
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
65
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/form-login.marko",
|
|
67
66
|
component: "./form-login.marko",
|
|
68
67
|
tags: [
|
|
69
68
|
"@mindful-web/marko-web/components/browser-component.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/form-logout.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
8
8
|
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
@@ -29,7 +29,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
marko_template.meta = {
|
|
32
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
32
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/form-logout.marko",
|
|
33
33
|
tags: [
|
|
34
34
|
"@mindful-web/marko-web/components/browser-component.marko"
|
|
35
35
|
]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { get } from "@mindful-web/object-path";
|
|
2
2
|
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
3
3
|
|
|
4
|
-
$ const { req } = out.global;
|
|
4
|
+
$ const { req, site } = out.global;
|
|
5
5
|
$ const { identityX, query } = req;
|
|
6
6
|
$ const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
7
|
+
$ const lang = site.config.lang || "en";
|
|
7
8
|
|
|
8
9
|
<if(Boolean(identityX))>
|
|
9
10
|
<marko-web-identity-x-context|{ user, isEnabled, application }|>
|
|
@@ -23,13 +24,14 @@ $ const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
|
23
24
|
reloadPageOnSubmit: input.reloadPageOnSubmit,
|
|
24
25
|
buttonLabel: input.buttonLabel,
|
|
25
26
|
endpoints: identityX.config.getEndpoints(),
|
|
26
|
-
consentPolicy: get(application, "organization.consentPolicy"),
|
|
27
|
+
consentPolicy: identityX.config.get("consentPolicy") || get(application, "organization.consentPolicy"),
|
|
27
28
|
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
28
29
|
appContextId: identityX.config.get("appContextId"),
|
|
29
30
|
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
30
31
|
returnTo: query.returnTo,
|
|
31
32
|
returnToDelay: input.returnToDelay,
|
|
32
33
|
enableChangeEmail: identityX.config.get("enableChangeEmail"),
|
|
34
|
+
lang,
|
|
33
35
|
};
|
|
34
36
|
<if(isEnabled)>
|
|
35
37
|
<marko-web-browser-component name="IdentityXProfile" props=props />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/form-profile.marko",
|
|
6
6
|
marko_component = require("./form-profile.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -19,12 +19,14 @@ var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
|
19
19
|
function render(input, out, __component, component, state) {
|
|
20
20
|
var data = input;
|
|
21
21
|
|
|
22
|
-
const { req } = out.global;
|
|
22
|
+
const { req, site } = out.global;
|
|
23
23
|
|
|
24
24
|
const { identityX, query } = req;
|
|
25
25
|
|
|
26
26
|
const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
27
27
|
|
|
28
|
+
const lang = site.config.lang || "en";
|
|
29
|
+
|
|
28
30
|
if (Boolean(identityX)) {
|
|
29
31
|
marko_web_identity_x_context_tag({
|
|
30
32
|
renderBody: function(out, { user, isEnabled, application }) {
|
|
@@ -44,13 +46,14 @@ function render(input, out, __component, component, state) {
|
|
|
44
46
|
reloadPageOnSubmit: input.reloadPageOnSubmit,
|
|
45
47
|
buttonLabel: input.buttonLabel,
|
|
46
48
|
endpoints: identityX.config.getEndpoints(),
|
|
47
|
-
consentPolicy: get(application, "organization.consentPolicy"),
|
|
49
|
+
consentPolicy: identityX.config.get("consentPolicy") || get(application, "organization.consentPolicy"),
|
|
48
50
|
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
49
51
|
appContextId: identityX.config.get("appContextId"),
|
|
50
52
|
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
51
53
|
returnTo: query.returnTo,
|
|
52
54
|
returnToDelay: input.returnToDelay,
|
|
53
55
|
enableChangeEmail: identityX.config.get("enableChangeEmail"),
|
|
56
|
+
lang,
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
if (isEnabled) {
|
|
@@ -69,7 +72,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
69
72
|
}, marko_component);
|
|
70
73
|
|
|
71
74
|
marko_template.meta = {
|
|
72
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
75
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/form-profile.marko",
|
|
73
76
|
component: "./form-profile.marko",
|
|
74
77
|
tags: [
|
|
75
78
|
"@mindful-web/marko-web/components/browser-component.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/form-register.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
8
8
|
marko_web_identity_x_form_login_template = require("./form-login.marko"),
|
|
@@ -25,7 +25,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
marko_template.meta = {
|
|
28
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
28
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/form-register.marko",
|
|
29
29
|
tags: [
|
|
30
30
|
"./form-login.marko"
|
|
31
31
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/identify.marko",
|
|
6
6
|
marko_component = require("./identify.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -50,7 +50,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
50
50
|
}, marko_component);
|
|
51
51
|
|
|
52
52
|
marko_template.meta = {
|
|
53
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
53
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/identify.marko",
|
|
54
54
|
component: "./identify.marko",
|
|
55
55
|
tags: [
|
|
56
56
|
"@mindful-web/marko-web-gtm/components/push.marko",
|
package/components/marko.json
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"@action-text": "string",
|
|
34
34
|
"@button-labels": "object",
|
|
35
|
+
"@consent-policy": "string",
|
|
35
36
|
"@login-email-placeholder": "string",
|
|
36
37
|
"@redirect": "string",
|
|
37
38
|
"@login-email-label": "string",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"<marko-web-identity-x-form-profile>": {
|
|
58
59
|
"template": "./form-profile.marko",
|
|
59
60
|
"@additional-event-data": "object",
|
|
61
|
+
"@consent-policy": "string",
|
|
60
62
|
"@login-source": {
|
|
61
63
|
"type": "string",
|
|
62
64
|
"default-value": "default"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.17.4/components/non-auth-identify.marko",
|
|
6
6
|
marko_component = require("./non-auth-identify.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
@@ -45,7 +45,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
45
45
|
}, marko_component);
|
|
46
46
|
|
|
47
47
|
marko_template.meta = {
|
|
48
|
-
id: "/@mindful-web/marko-web-identity-x$1.17.
|
|
48
|
+
id: "/@mindful-web/marko-web-identity-x$1.17.4/components/non-auth-identify.marko",
|
|
49
49
|
component: "./non-auth-identify.marko",
|
|
50
50
|
tags: [
|
|
51
51
|
"@mindful-web/marko-core/components/resolve.marko"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindful-web/marko-web-identity-x",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.4",
|
|
4
4
|
"description": "Marko Wrapper for IdentityX",
|
|
5
5
|
"repository": "https://github.com/parameter1/mindful-web/tree/main/packages/marko-web-identity-x",
|
|
6
6
|
"author": "Josh Worden <josh@parameter1.com>",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "bcf9a32a51bc4bdef9e1c3c762d70a359f6dcfa9"
|
|
40
40
|
}
|
package/routes/countries.js
CHANGED
|
@@ -2,8 +2,8 @@ const gql = require('graphql-tag');
|
|
|
2
2
|
const { asyncRoute } = require('@mindful-web/utils');
|
|
3
3
|
|
|
4
4
|
const localeCountries = gql`
|
|
5
|
-
query LocaleCountries {
|
|
6
|
-
localeCountries {
|
|
5
|
+
query LocaleCountries($input: LocaleCountriesQueryInput) {
|
|
6
|
+
localeCountries(input: $input) {
|
|
7
7
|
id
|
|
8
8
|
name
|
|
9
9
|
flag
|
|
@@ -13,7 +13,13 @@ const localeCountries = gql`
|
|
|
13
13
|
|
|
14
14
|
module.exports = asyncRoute(async (req, res) => {
|
|
15
15
|
/** @type {import('../middleware').IdentityXRequest} */
|
|
16
|
-
const { identityX } = req;
|
|
17
|
-
const {
|
|
16
|
+
const { identityX, query } = req;
|
|
17
|
+
const { lang = 'en' } = query;
|
|
18
|
+
const prioritize = lang === 'pt' ? ['BR', 'US'] : null;
|
|
19
|
+
const input = {
|
|
20
|
+
lang,
|
|
21
|
+
...(prioritize && { prioritize }),
|
|
22
|
+
};
|
|
23
|
+
const { data } = await identityX.client.query({ query: localeCountries, variables: { input } });
|
|
18
24
|
res.json(data.localeCountries);
|
|
19
25
|
});
|