@mindful-web/marko-web-identity-x 1.32.0 → 1.35.1

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.
@@ -11,6 +11,9 @@
11
11
  <custom-column
12
12
  v-for="(col, cidx) in row"
13
13
  :key="`${ridx}_${cidx}`"
14
+ :custom-boolean-field-answers="customBooleanFieldAnswers"
15
+ :custom-select-field-answers="customSelectFieldAnswers"
16
+ :custom-text-field-answers="customTextFieldAnswers"
14
17
  :label="col.label || defaultFieldLabels[col.key]"
15
18
  :field-key="col.key"
16
19
  :field-id="col.id"
@@ -223,6 +226,18 @@ export default {
223
226
  type: Object,
224
227
  default: null,
225
228
  },
229
+ customBooleanFieldAnswers: {
230
+ type: Array,
231
+ default: () => [],
232
+ },
233
+ customSelectFieldAnswers: {
234
+ type: Array,
235
+ default: () => [],
236
+ },
237
+ customTextFieldAnswers: {
238
+ type: Array,
239
+ default: () => [],
240
+ },
226
241
  loginCustomBooleanFieldAnswers: {
227
242
  type: Array,
228
243
  default: () => [],
@@ -253,6 +253,7 @@ export default {
253
253
  const customAnswerIds = [
254
254
  ...data.user.customBooleanFieldAnswers,
255
255
  ...data.user.customSelectFieldAnswers,
256
+ ...data.user.customTextFieldAnswers,
256
257
  ].filter((field) => field.hasAnswered).map((field) => field.id);
257
258
 
258
259
  this.isProfileComplete = this.requiredFields
@@ -11,6 +11,9 @@
11
11
  <custom-column
12
12
  v-for="(col, cidx) in row"
13
13
  :key="`${ridx}_${cidx}`"
14
+ :custom-boolean-field-answers="customBooleanFieldAnswers"
15
+ :custom-select-field-answers="customSelectFieldAnswers"
16
+ :custom-text-field-answers="customTextFieldAnswers"
14
17
  :label="col.label || defaultFieldLabels[col.key]"
15
18
  :field-key="col.key"
16
19
  :field-id="col.id"
@@ -235,6 +238,18 @@ export default {
235
238
  type: Object,
236
239
  default: null,
237
240
  },
241
+ customBooleanFieldAnswers: {
242
+ type: Array,
243
+ default: () => [],
244
+ },
245
+ customSelectFieldAnswers: {
246
+ type: Array,
247
+ default: () => [],
248
+ },
249
+ customTextFieldAnswers: {
250
+ type: Array,
251
+ default: () => [],
252
+ },
238
253
  loginCustomBooleanFieldAnswers: {
239
254
  type: Array,
240
255
  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.32.0/components/access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/access.marko",
56
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/comment-stream.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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"),
@@ -85,7 +85,7 @@ marko_template._ = marko_renderer(render, {
85
85
  }, marko_component);
86
86
 
87
87
  marko_template.meta = {
88
- id: "/@mindful-web/marko-web-identity-x$1.32.0/components/comment-stream.marko",
88
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/components/comment-stream.marko",
89
89
  component: "./comment-stream.marko",
90
90
  tags: [
91
91
  "@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.32.0/components/context.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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"),
@@ -49,7 +49,7 @@ marko_template._ = marko_renderer(render, {
49
49
  }, marko_component);
50
50
 
51
51
  marko_template.meta = {
52
- id: "/@mindful-web/marko-web-identity-x$1.32.0/components/context.marko",
52
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/components/context.marko",
53
53
  component: "./context.marko",
54
54
  tags: [
55
55
  "@mindful-web/marko-core/components/resolve.marko"
@@ -3,6 +3,7 @@ import defaultValue from "@mindful-web/marko-core/utils/default-value";
3
3
  import { get, getAsArray, getAsObject } from "@mindful-web/object-path";
4
4
 
5
5
  import getCreateUserCustomFields from '../utils/get-create-user-custom-fields'
6
+ import getFormCustomFields from '../utils/get-form-custom-fields'
6
7
 
7
8
  $ const { req: { identityX }, site, i18n } = out.global;
8
9
  $ const { content, formId, user, application } = input;
@@ -24,49 +25,64 @@ $ const loginButtonLabels = defaultValue(input.loginButtonLabels, {
24
25
  profile: i18n("Modify Profile"),
25
26
  });
26
27
 
27
- $ const fields = getAsArray(input, 'fields');
28
- $ const { customSelectFieldAnswers, customBooleanFieldAnswers, customTextFieldAnswers } = getCreateUserCustomFields({ fields });
29
28
 
30
- <if(identityX && form.fieldRows, displayForm)>
31
- <div class="content-survey-access-idx__wrapper">
32
- $ const props = {
33
- // Access form props
34
- content: content,
35
- title: form.title,
36
- fieldRows: form.fieldRows,
37
- loginSource: "contentAccess",
38
- title: title,
39
- cookie,
40
- displayForm,
41
- callToAction: callToAction,
42
- callToActionLoggedOut: callToActionLoggedOut,
43
- updateProfileOnSubmit,
29
+ <if(identityX && form.fieldRows)>
30
+ <marko-web-identity-x-context|{ fields }| with-fields=true>
31
+ <div class="content-survey-access-idx__wrapper">
32
+ $ const {
33
+ customSelectFieldAnswers: loginCustomSelectFieldAnswers,
34
+ customBooleanFieldAnswers: loginCustomBooleanFieldAnswers,
35
+ customTextFieldAnswers: loginCustomTextFieldAnswers,
36
+ } = getCreateUserCustomFields({ fields });
37
+ $ const { fieldRows } = form;
38
+ $ const {
39
+ customSelectFieldAnswers,
40
+ customBooleanFieldAnswers,
41
+ customTextFieldAnswers,
42
+ } = getFormCustomFields({ fields, fieldRows });
44
43
 
45
- // Login props
46
- activeUser: user,
47
- loginCustomSelectFieldAnswers: customSelectFieldAnswers,
48
- loginCustomBooleanFieldAnswers: customBooleanFieldAnswers,
49
- loginCustomTextFieldAnswers: customTextFieldAnswers,
50
- additionalEventData: additionalEventData,
51
- appContextId: identityX.config.get("appContextId"),
52
- buttonLabel: buttonLabel,
53
- loginButtonLabels: loginButtonLabels,
54
- defaultCountryCode: identityX.config.get("defaultCountryCode"),
55
- defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
56
- enableChangeEmail: identityX.config.get("enableChangeEmail"),
57
- endpoints: identityX.config.getEndpoints(),
58
- requiredCreateFieldRows: identityX.config.getRequiredCreateFieldRows(),
44
+ $ const props = {
45
+ // Access form props
46
+ content: content,
47
+ title: form.title,
48
+ fieldRows: form.fieldRows,
49
+ loginSource: "contentAccess",
50
+ title: title,
51
+ cookie,
52
+ displayForm,
53
+ callToAction: callToAction,
54
+ callToActionLoggedOut: callToActionLoggedOut,
55
+ updateProfileOnSubmit,
59
56
 
60
- // Consent
61
- consentPolicy: consentPolicy,
62
- consentPolicyEnabled: defaultValue(input.consentPolicyEnabled, true),
63
- emailConsentRequest: emailConsentRequest,
64
- emailConsentRequestEnabled: defaultValue(input.emailConsentRequest, true),
65
- regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
66
- lang,
67
- };
68
- <marko-web-browser-component name="IdentityXAccess" props=props />
69
- </div>
57
+ // Login props
58
+ activeUser: user,
59
+ customSelectFieldAnswers,
60
+ customBooleanFieldAnswers,
61
+ customTextFieldAnswers,
62
+ loginCustomSelectFieldAnswers,
63
+ loginCustomBooleanFieldAnswers,
64
+ loginCustomTextFieldAnswers,
65
+ additionalEventData: additionalEventData,
66
+ appContextId: identityX.config.get("appContextId"),
67
+ buttonLabel: buttonLabel,
68
+ loginButtonLabels: loginButtonLabels,
69
+ defaultCountryCode: identityX.config.get("defaultCountryCode"),
70
+ defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
71
+ enableChangeEmail: identityX.config.get("enableChangeEmail"),
72
+ endpoints: identityX.config.getEndpoints(),
73
+ requiredCreateFieldRows: identityX.config.getRequiredCreateFieldRows(),
74
+
75
+ // Consent
76
+ consentPolicy: consentPolicy,
77
+ consentPolicyEnabled: defaultValue(input.consentPolicyEnabled, true),
78
+ emailConsentRequest: emailConsentRequest,
79
+ emailConsentRequestEnabled: defaultValue(input.emailConsentRequest, true),
80
+ regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
81
+ lang,
82
+ };
83
+ <marko-web-browser-component name="IdentityXAccess" props=props />
84
+ </div>
85
+ </marko-web-identity-x-context>
70
86
  </if>
71
87
  <else>
72
88
  $ const msg = `IdentityX Survey Gating: couldn't load form "${formId}"!`;
@@ -2,7 +2,8 @@
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.32.0/components/form-access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/components/form-access.marko",
6
+ marko_component = require("./form-access.marko"),
6
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
8
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
8
9
  defaultValue = module_defaultValue.default || module_defaultValue,
@@ -13,9 +14,13 @@ var marko_template = module.exports = require("marko/dist/html").t(__filename),
13
14
  getAsObject = module_objectPath_module.getAsObject,
14
15
  module_getCreateUserCustomFields = require("../utils/get-create-user-custom-fields"),
15
16
  getCreateUserCustomFields = module_getCreateUserCustomFields.default || module_getCreateUserCustomFields,
17
+ module_getFormCustomFields = require("../utils/get-form-custom-fields"),
18
+ getFormCustomFields = module_getFormCustomFields.default || module_getFormCustomFields,
16
19
  marko_web_browser_component_template = require("@mindful-web/marko-web/components/browser-component.marko"),
17
20
  marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
18
21
  marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
22
+ marko_web_identity_x_context_template = require("./context.marko"),
23
+ marko_web_identity_x_context_tag = marko_loadTag(marko_web_identity_x_context_template),
19
24
  helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
20
25
  marko_escapeXml = helpers_escape_xml.x,
21
26
  marko_attr = require("marko/dist/runtime/html/helpers/attr");
@@ -57,56 +62,74 @@ function render(input, out, __component, component, state) {
57
62
  profile: i18n("Modify Profile"),
58
63
  });
59
64
 
60
- const fields = getAsArray(input, 'fields');
61
-
62
- const { customSelectFieldAnswers, customBooleanFieldAnswers, customTextFieldAnswers } = getCreateUserCustomFields({ fields });
63
-
64
- if (identityX && form.fieldRows, displayForm) {
65
- out.w("<div class=\"content-survey-access-idx__wrapper\">");
66
-
67
- const props = {
68
- // Access form props
69
- content: content,
70
- title: form.title,
71
- fieldRows: form.fieldRows,
72
- loginSource: "contentAccess",
73
- title: title,
74
- cookie,
75
- displayForm,
76
- callToAction: callToAction,
77
- callToActionLoggedOut: callToActionLoggedOut,
78
- updateProfileOnSubmit,
79
-
80
- // Login props
81
- activeUser: user,
82
- loginCustomSelectFieldAnswers: customSelectFieldAnswers,
83
- loginCustomBooleanFieldAnswers: customBooleanFieldAnswers,
84
- loginCustomTextFieldAnswers: customTextFieldAnswers,
85
- additionalEventData: additionalEventData,
86
- appContextId: identityX.config.get("appContextId"),
87
- buttonLabel: buttonLabel,
88
- loginButtonLabels: loginButtonLabels,
89
- defaultCountryCode: identityX.config.get("defaultCountryCode"),
90
- defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
91
- enableChangeEmail: identityX.config.get("enableChangeEmail"),
92
- endpoints: identityX.config.getEndpoints(),
93
- requiredCreateFieldRows: identityX.config.getRequiredCreateFieldRows(),
94
-
95
- // Consent
96
- consentPolicy: consentPolicy,
97
- consentPolicyEnabled: defaultValue(input.consentPolicyEnabled, true),
98
- emailConsentRequest: emailConsentRequest,
99
- emailConsentRequestEnabled: defaultValue(input.emailConsentRequest, true),
100
- regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
101
- lang,
102
- };
103
-
104
- marko_web_browser_component_tag({
105
- name: "IdentityXAccess",
106
- props: props
107
- }, out, __component, "1");
108
-
109
- out.w("</div>");
65
+ if (identityX && form.fieldRows) {
66
+ marko_web_identity_x_context_tag({
67
+ withFields: true,
68
+ renderBody: function(out, { fields }) {
69
+ out.w("<div class=\"content-survey-access-idx__wrapper\">");
70
+
71
+ const {
72
+ customSelectFieldAnswers: loginCustomSelectFieldAnswers,
73
+ customBooleanFieldAnswers: loginCustomBooleanFieldAnswers,
74
+ customTextFieldAnswers: loginCustomTextFieldAnswers,
75
+ } = getCreateUserCustomFields({ fields });
76
+
77
+ const { fieldRows } = form;
78
+
79
+ const {
80
+ customSelectFieldAnswers,
81
+ customBooleanFieldAnswers,
82
+ customTextFieldAnswers,
83
+ } = getFormCustomFields({ fields, fieldRows });
84
+
85
+ const props = {
86
+ // Access form props
87
+ content: content,
88
+ title: form.title,
89
+ fieldRows: form.fieldRows,
90
+ loginSource: "contentAccess",
91
+ title: title,
92
+ cookie,
93
+ displayForm,
94
+ callToAction: callToAction,
95
+ callToActionLoggedOut: callToActionLoggedOut,
96
+ updateProfileOnSubmit,
97
+
98
+ // Login props
99
+ activeUser: user,
100
+ customSelectFieldAnswers,
101
+ customBooleanFieldAnswers,
102
+ customTextFieldAnswers,
103
+ loginCustomSelectFieldAnswers,
104
+ loginCustomBooleanFieldAnswers,
105
+ loginCustomTextFieldAnswers,
106
+ additionalEventData: additionalEventData,
107
+ appContextId: identityX.config.get("appContextId"),
108
+ buttonLabel: buttonLabel,
109
+ loginButtonLabels: loginButtonLabels,
110
+ defaultCountryCode: identityX.config.get("defaultCountryCode"),
111
+ defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
112
+ enableChangeEmail: identityX.config.get("enableChangeEmail"),
113
+ endpoints: identityX.config.getEndpoints(),
114
+ requiredCreateFieldRows: identityX.config.getRequiredCreateFieldRows(),
115
+
116
+ // Consent
117
+ consentPolicy: consentPolicy,
118
+ consentPolicyEnabled: defaultValue(input.consentPolicyEnabled, true),
119
+ emailConsentRequest: emailConsentRequest,
120
+ emailConsentRequestEnabled: defaultValue(input.emailConsentRequest, true),
121
+ regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
122
+ lang,
123
+ };
124
+
125
+ marko_web_browser_component_tag({
126
+ name: "IdentityXAccess",
127
+ props: props
128
+ }, out, __component, "2");
129
+
130
+ out.w("</div>");
131
+ }
132
+ }, out, __component, "0");
110
133
  } else {
111
134
  const msg = `IdentityX Survey Gating: couldn't load form "${formId}"!`;
112
135
 
@@ -119,13 +142,14 @@ function render(input, out, __component, component, state) {
119
142
  }
120
143
 
121
144
  marko_template._ = marko_renderer(render, {
122
- d_: true,
123
145
  e_: marko_componentType
124
- });
146
+ }, marko_component);
125
147
 
126
148
  marko_template.meta = {
127
- id: "/@mindful-web/marko-web-identity-x$1.32.0/components/form-access.marko",
149
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/components/form-access.marko",
150
+ component: "./form-access.marko",
128
151
  tags: [
129
- "@mindful-web/marko-web/components/browser-component.marko"
152
+ "@mindful-web/marko-web/components/browser-component.marko",
153
+ "./context.marko"
130
154
  ]
131
155
  };
@@ -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.32.0/components/form-authenticate.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/form-authenticate.marko",
71
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/form-change-email.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/form-change-email.marko",
62
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/form-login.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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"),
@@ -79,7 +79,7 @@ marko_template._ = marko_renderer(render, {
79
79
  }, marko_component);
80
80
 
81
81
  marko_template.meta = {
82
- id: "/@mindful-web/marko-web-identity-x$1.32.0/components/form-login.marko",
82
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/components/form-login.marko",
83
83
  component: "./form-login.marko",
84
84
  tags: [
85
85
  "@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.32.0/components/form-logout.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/form-logout.marko",
32
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/form-profile.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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"),
@@ -81,7 +81,7 @@ marko_template._ = marko_renderer(render, {
81
81
  }, marko_component);
82
82
 
83
83
  marko_template.meta = {
84
- id: "/@mindful-web/marko-web-identity-x$1.32.0/components/form-profile.marko",
84
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/components/form-profile.marko",
85
85
  component: "./form-profile.marko",
86
86
  tags: [
87
87
  "@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.32.0/components/form-register.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/form-register.marko",
28
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/identify.marko",
53
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/non-auth-identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/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.32.0/components/non-auth-identify.marko",
48
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/components/non-auth-identify.marko",
49
49
  component: "./non-auth-identify.marko",
50
50
  tags: [
51
51
  "@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.32.0/components/subscribe.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.1/components/subscribe.marko",
6
6
  marko_component = require("./subscribe.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.32.0/components/subscribe.marko",
76
+ id: "/@mindful-web/marko-web-identity-x$1.35.1/components/subscribe.marko",
77
77
  component: "./subscribe.marko",
78
78
  tags: [
79
79
  "@mindful-web/marko-web/components/browser-component.marko",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindful-web/marko-web-identity-x",
3
- "version": "1.32.0",
3
+ "version": "1.35.1",
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": "aa3ef6e2c50376b37b11a932c3dc46cafd02cf6a"
40
+ "gitHead": "3cd88e7347f5f86369380d14162cb8af3379919c"
41
41
  }
@@ -0,0 +1,30 @@
1
+ module.exports = ({
2
+ fields,
3
+ fieldRows,
4
+ } = {}) => {
5
+ const fieldRowFields = [];
6
+ fieldRows.forEach((row) => {
7
+ row.forEach((q) => {
8
+ const fieldsQ = fields.find(({ id }) => q.id === id);
9
+ if (fieldsQ) fieldRowFields.push(fieldsQ);
10
+ });
11
+ });
12
+
13
+ // eslint-disable-next-line no-underscore-dangle
14
+ const customBooleanFieldAnswers = fieldRowFields.filter((f) => f.__typename === 'BooleanField').map((f) => ({
15
+ id: f.id, hasAnswered: false, answer: null, value: null, field: f,
16
+ }));
17
+ // eslint-disable-next-line no-underscore-dangle, eqeqeq
18
+ const customSelectFieldAnswers = fieldRowFields.filter((f) => f.__typename == 'SelectField').map((f) => ({
19
+ id: f.id, hasAnswered: false, answers: [], field: f,
20
+ }));
21
+ // eslint-disable-next-line no-underscore-dangle, eqeqeq
22
+ const customTextFieldAnswers = fieldRowFields.filter((f) => f.__typename == 'TextField').map((f) => ({
23
+ id: f.id, hasAnswered: false, value: null, field: f,
24
+ }));
25
+ return {
26
+ customBooleanFieldAnswers,
27
+ customSelectFieldAnswers,
28
+ customTextFieldAnswers,
29
+ };
30
+ };