@mindful-web/marko-web-identity-x 1.20.0 → 1.20.3

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.
@@ -1,9 +1,13 @@
1
1
  <template>
2
2
  <div v-if="isRedirecting">
3
- <p>You've successfully logged in. Redirecting you...</p>
3
+ <p>
4
+ {{ translate({ key: "You've successfully logged in. Redirecting you..." }) }}
5
+ </p>
4
6
  </div>
5
7
  <div v-else-if="isLoading">
6
- <p>Logging in...</p>
8
+ <p>
9
+ {{ translate({ key: 'Logging in...' }) }}
10
+ </p>
7
11
  </div>
8
12
  <div v-else-if="showProfileForm">
9
13
  <profile-form
@@ -33,12 +37,12 @@
33
37
  </div>
34
38
  <div v-else-if="error" class="alert alert-danger" role="alert">
35
39
  <h5 class="alert-heading">
36
- Unable to Login
40
+ {{ translate({ key: "Unable to Login" }) }}
37
41
  </h5>
38
42
  <p>{{ error.message }}</p>
39
43
  <hr>
40
44
  <p class="mb-0">
41
- Please try <a :href="endpoints.login" class="alert-link">logging in</a> again.
45
+ {{ errorMessage }}
42
46
  </p>
43
47
  </div>
44
48
  </template>
@@ -202,6 +206,15 @@ export default {
202
206
  if (this.requiresCustomFieldAnswers) return true;
203
207
  return !this.isProfileComplete;
204
208
  },
209
+
210
+ /**
211
+ *
212
+ */
213
+ errorMessage() {
214
+ if (this.lang === 'es') return `Please try <a href="${this.endpoints.login}" class="alert-link">logging in</a> again.`;
215
+ if (this.lang === 'pt') return `Please try <a href="${this.endpoints.login}" class="alert-link">logging in</a> again.`;
216
+ return `Please try <a href="${this.endpoints.login}" class="alert-link">logging in</a> again.`;
217
+ },
205
218
  },
206
219
 
207
220
  /**
@@ -286,6 +299,28 @@ export default {
286
299
  const redirectTo = this.isUserRedirect ? '/' : this.redirectTo;
287
300
  redirect(redirectTo);
288
301
  },
302
+ translate({ key }) {
303
+ const { lang } = this;
304
+ const i18n = {
305
+ pt: {
306
+ "You've successfully logged in. Redirecting you...": 'Login feito com sucesso. Redirecionando...',
307
+ 'Logging in...': 'Conectando...',
308
+ 'Unable to Login': 'Não consigo fazer login',
309
+ },
310
+ es: {
311
+ "You've successfully logged in. Redirecting you...": 'Has iniciado sesión correctamente. Te estamos redireccionando...',
312
+ 'Logging in...': 'Iniciando sesión...',
313
+ 'Unable to Login': 'No se puede iniciar sesión',
314
+ },
315
+ en: {
316
+ "You've successfully logged in. Redirecting you...": "You've successfully logged in. Redirecting you...",
317
+ 'Logging in...': 'Logging in...',
318
+ 'Unable to Login': 'Unable to Login',
319
+ },
320
+ };
321
+ const value = (i18n[lang] && i18n[lang][key]) ? i18n[lang][key] : i18n.en[key] || key;
322
+ return value;
323
+ },
289
324
  },
290
325
  };
291
326
  </script>
@@ -126,6 +126,7 @@
126
126
  :multiple="customField.field.multiple"
127
127
  :selected="customField.answers"
128
128
  :options="customField.field.options"
129
+ :lang="lang"
129
130
  @change="onCustomSelectChange(customField.answers, $event)"
130
131
  />
131
132
  <custom-boolean
@@ -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.20.0/components/access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/access.marko",
56
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/access.marko",
57
57
  component: "./access.marko",
58
58
  tags: [
59
59
  "@mindful-web/marko-core/components/resolve.marko"
@@ -5,6 +5,7 @@ $ const { req, site } = out.global;
5
5
  $ const { identityX } = req;
6
6
  $ const additionalEventData = defaultValue(input.additionalEventData, {});
7
7
  $ const lang = input.lang || defaultValue(site.config.lang, "en");
8
+ $ const dateFormat = input.dateFormat || defaultValue(site.config.dateFormat, "MMM Do, YYYY h:mma")
8
9
 
9
10
  <if(identityX)>
10
11
  <marko-web-identity-x-context|{ user, isEnabled, application }|>
@@ -18,6 +19,7 @@ $ const lang = input.lang || defaultValue(site.config.lang, "en");
18
19
  url: input.url,
19
20
  loadMoreButtonClass: input.loadMoreButtonClass,
20
21
  loginButtonLabels: input.loginButtonLabels,
22
+ dateFormat,
21
23
  endpoints: identityX.config.getEndpoints(),
22
24
  consentPolicy: get(application, "organization.consentPolicy"),
23
25
  regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
@@ -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.20.0/components/comment-stream.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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"),
@@ -27,6 +27,8 @@ function render(input, out, __component, component, state) {
27
27
 
28
28
  const lang = input.lang || defaultValue(site.config.lang, "en");
29
29
 
30
+ const dateFormat = input.dateFormat || defaultValue(site.config.dateFormat, "MMM Do, YYYY h:mma")
31
+
30
32
  if (identityX) {
31
33
  marko_web_identity_x_context_tag({
32
34
  renderBody: function(out, { user, isEnabled, application }) {
@@ -40,6 +42,7 @@ function render(input, out, __component, component, state) {
40
42
  url: input.url,
41
43
  loadMoreButtonClass: input.loadMoreButtonClass,
42
44
  loginButtonLabels: input.loginButtonLabels,
45
+ dateFormat,
43
46
  endpoints: identityX.config.getEndpoints(),
44
47
  consentPolicy: get(application, "organization.consentPolicy"),
45
48
  regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
@@ -74,7 +77,7 @@ marko_template._ = marko_renderer(render, {
74
77
  }, marko_component);
75
78
 
76
79
  marko_template.meta = {
77
- id: "/@mindful-web/marko-web-identity-x$1.20.0/components/comment-stream.marko",
80
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/comment-stream.marko",
78
81
  component: "./comment-stream.marko",
79
82
  tags: [
80
83
  "@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.20.0/components/context.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/context.marko",
47
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/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
  "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.20.0/components/form-access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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,
@@ -114,7 +114,7 @@ marko_template._ = marko_renderer(render, {
114
114
  });
115
115
 
116
116
  marko_template.meta = {
117
- id: "/@mindful-web/marko-web-identity-x$1.20.0/components/form-access.marko",
117
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/form-access.marko",
118
118
  tags: [
119
119
  "@mindful-web/marko-web/components/browser-component.marko"
120
120
  ]
@@ -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.20.0/components/form-authenticate.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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"),
@@ -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.20.0/components/form-authenticate.marko",
71
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/form-authenticate.marko",
72
72
  component: "./form-authenticate.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.20.0/components/form-change-email.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/form-change-email.marko",
62
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/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",
@@ -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.20.0/components/form-login.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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"),
@@ -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.20.0/components/form-login.marko",
67
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/form-login.marko",
68
68
  component: "./form-login.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.20.0/components/form-logout.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/form-logout.marko",
32
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/form-logout.marko",
33
33
  tags: [
34
34
  "@mindful-web/marko-web/components/browser-component.marko"
35
35
  ]
@@ -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.20.0/components/form-profile.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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"),
@@ -73,7 +73,7 @@ marko_template._ = marko_renderer(render, {
73
73
  }, marko_component);
74
74
 
75
75
  marko_template.meta = {
76
- id: "/@mindful-web/marko-web-identity-x$1.20.0/components/form-profile.marko",
76
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/form-profile.marko",
77
77
  component: "./form-profile.marko",
78
78
  tags: [
79
79
  "@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.20.0/components/form-register.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/form-register.marko",
28
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/identify.marko",
53
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/components/identify.marko",
54
54
  component: "./identify.marko",
55
55
  tags: [
56
56
  "@mindful-web/marko-web-gtm/components/push.marko",
@@ -87,6 +87,7 @@
87
87
  "@url": "string",
88
88
  "@load-more-button-class": "string",
89
89
  "@login-button-labels": "object",
90
+ "@date-format": "string",
90
91
  "@lang": "string"
91
92
  },
92
93
  "<marko-web-identity-x-identify>": {
@@ -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.20.0/components/non-auth-identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0/components/non-auth-identify.marko",
48
+ id: "/@mindful-web/marko-web-identity-x$1.20.3/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.20.0",
3
+ "version": "1.20.3",
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>",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "51c3ed35fd04266e3d46cfea69d64f6043000bb4"
40
+ "gitHead": "c2c60b99628dc560b6cd1fe0b3d64b3bd9a69daf"
41
41
  }