@mindful-web/marko-web-identity-x 1.0.1 → 1.9.0

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.
@@ -15,7 +15,7 @@
15
15
  :required="required"
16
16
  :label="label"
17
17
  />
18
- <div v-else-if="fieldKey === 'email'">
18
+ <div v-else-if="fieldKey === 'email' && hasInitialEmail">
19
19
  <form-label :for="fieldKey" :required="required">
20
20
  {{ label }}
21
21
  </form-label>
@@ -34,6 +34,14 @@
34
34
  </div>
35
35
  </div>
36
36
  </div>
37
+ <email
38
+ v-else-if="fieldKey === 'email' && !hasInitialEmail && allowAnonymous"
39
+ v-model="user.email"
40
+ :disabled="hasInitialEmail"
41
+ :class-name="className"
42
+ :required="required"
43
+ :label="label"
44
+ />
37
45
  <organization
38
46
  v-else-if="fieldKey === 'organization'"
39
47
  v-model="user.organization"
@@ -155,6 +163,7 @@ import PhoneNumber from './form/fields/phone-number.vue';
155
163
  import PostalCode from './form/fields/postal-code.vue';
156
164
  import RegionCode from './form/fields/region.vue';
157
165
  import Street from './form/fields/street.vue';
166
+ import Email from './form/fields/email.vue';
158
167
 
159
168
  export default {
160
169
  /**
@@ -175,6 +184,7 @@ export default {
175
184
  PostalCode,
176
185
  RegionCode,
177
186
  Street,
187
+ Email,
178
188
  },
179
189
  /**
180
190
  *
@@ -226,6 +236,10 @@ export default {
226
236
  type: String,
227
237
  default: '',
228
238
  },
239
+ allowAnonymous: {
240
+ type: Boolean,
241
+ default: false,
242
+ },
229
243
  },
230
244
  /**
231
245
  *
@@ -287,6 +301,13 @@ export default {
287
301
  },
288
302
  },
289
303
 
304
+ /**
305
+ *
306
+ */
307
+ mounted() {
308
+ this.hasInitialEmail = this.user && this.user.email;
309
+ },
310
+
290
311
  /**
291
312
  *
292
313
  */
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id="content-download-idx-form" class="content-page-gate p-block">
3
- <template v-if="hasActiveUser">
3
+ <template v-if="hasActiveUser || allowAnonymous">
4
4
  <h5 class="content-page-gate__title">
5
5
  {{ title }}
6
6
  </h5>
@@ -20,6 +20,7 @@
20
20
  :user="user"
21
21
  :endpoints="endpoints"
22
22
  :enable-change-email="enableChangeEmail"
23
+ :allow-anonymous="allowAnonymous"
23
24
  />
24
25
  </div>
25
26
 
@@ -143,6 +144,10 @@ export default {
143
144
  type: Boolean,
144
145
  default: true,
145
146
  },
147
+ allowAnonymous: {
148
+ type: Boolean,
149
+ default: false,
150
+ },
146
151
 
147
152
  /**
148
153
  * profile/login 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.0.1/components/access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/access.marko",
56
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/comment-stream.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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"),
@@ -62,7 +62,7 @@ marko_template._ = marko_renderer(render, {
62
62
  }, marko_component);
63
63
 
64
64
  marko_template.meta = {
65
- id: "/@mindful-web/marko-web-identity-x$1.0.1/components/comment-stream.marko",
65
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/components/comment-stream.marko",
66
66
  component: "./comment-stream.marko",
67
67
  tags: [
68
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.0.1/components/context.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/context.marko",
47
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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,
@@ -104,7 +104,7 @@ marko_template._ = marko_renderer(render, {
104
104
  });
105
105
 
106
106
  marko_template.meta = {
107
- id: "/@mindful-web/marko-web-identity-x$1.0.1/components/form-access.marko",
107
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/components/form-access.marko",
108
108
  tags: [
109
109
  "@mindful-web/marko-web/components/browser-component.marko"
110
110
  ]
@@ -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.0.1/components/form-authenticate.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-authenticate.marko",
67
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-change-email.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-change-email.marko",
62
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-login.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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"),
@@ -63,7 +63,7 @@ marko_template._ = marko_renderer(render, {
63
63
  }, marko_component);
64
64
 
65
65
  marko_template.meta = {
66
- id: "/@mindful-web/marko-web-identity-x$1.0.1/components/form-login.marko",
66
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/components/form-login.marko",
67
67
  component: "./form-login.marko",
68
68
  tags: [
69
69
  "@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.0.1/components/form-logout.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-logout.marko",
32
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-profile.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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"),
@@ -69,7 +69,7 @@ marko_template._ = marko_renderer(render, {
69
69
  }, marko_component);
70
70
 
71
71
  marko_template.meta = {
72
- id: "/@mindful-web/marko-web-identity-x$1.0.1/components/form-profile.marko",
72
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/components/form-profile.marko",
73
73
  component: "./form-profile.marko",
74
74
  tags: [
75
75
  "@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.0.1/components/form-register.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/form-register.marko",
28
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/identify.marko",
53
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/components/identify.marko",
54
54
  component: "./identify.marko",
55
55
  tags: [
56
56
  "@mindful-web/marko-web-gtm/components/push.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.0.1/components/non-auth-identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1/components/non-auth-identify.marko",
48
+ id: "/@mindful-web/marko-web-identity-x$1.9.0/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.0.1",
3
+ "version": "1.9.0",
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": "32a118ae20fc89f93c2c8c345a73cc2a65de18ae"
39
+ "gitHead": "77e5405c1ae375412852396a743fee7e0ba6de78"
40
40
  }
@@ -16,6 +16,7 @@ const loginAppUser = gql`
16
16
  ...ActiveUserFragment
17
17
  }
18
18
  loginSource
19
+ additionalContext
19
20
  }
20
21
  }
21
22
 
@@ -40,7 +41,10 @@ module.exports = asyncRoute(async (req, res) => {
40
41
  user,
41
42
  authToken,
42
43
  loginSource,
43
- additionalEventData,
44
+ additionalEventData: {
45
+ ...(additionalEventData || {}),
46
+ ...(data.loginAppUser.additionalContext || {}),
47
+ },
44
48
  });
45
49
  tokenCookie.setTo(res, authToken.value);
46
50
  contextCookie.setTo(res, { loginSource });
package/service.js CHANGED
@@ -440,6 +440,7 @@ class IdentityX {
440
440
  mutation: sendLoginLinkMutation,
441
441
  variables: {
442
442
  input: {
443
+ additionalContext: additionalEventData || {},
443
444
  email: appUser.email,
444
445
  authUrl: authUrl || `${this.req.protocol}://${this.req.get('host')}${this.config.getEndpointFor('authenticate')}`,
445
446
  appContextId: this.config.get('appContextId'),