@mindful-web/marko-web-identity-x 1.35.1 → 1.35.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/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 +2 -2
- package/components/form-access.marko.js +4 -4
- package/components/form-authenticate.marko.js +2 -2
- package/components/form-change-email.marko.js +2 -2
- package/components/form-login.marko.js +2 -2
- package/components/form-logout.marko.js +2 -2
- package/components/form-profile.marko.js +2 -2
- package/components/form-register.marko.js +2 -2
- package/components/identify.marko.js +2 -2
- package/components/non-auth-identify.marko.js +2 -2
- package/components/subscribe.marko.js +2 -2
- package/package.json +2 -2
- package/utils/get-form-custom-fields.js +34 -9
|
@@ -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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
56
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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"),
|
|
@@ -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.35.
|
|
88
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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"),
|
|
@@ -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.35.
|
|
52
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/components/context.marko",
|
|
53
53
|
component: "./context.marko",
|
|
54
54
|
tags: [
|
|
55
55
|
"@mindful-web/marko-core/components/resolve.marko"
|
|
@@ -27,7 +27,7 @@ $ const loginButtonLabels = defaultValue(input.loginButtonLabels, {
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
<if(identityX && form.fieldRows)>
|
|
30
|
-
<marko-web-identity-x-context|{
|
|
30
|
+
<marko-web-identity-x-context|{ fuser, ields }| with-fields=true>
|
|
31
31
|
<div class="content-survey-access-idx__wrapper">
|
|
32
32
|
$ const {
|
|
33
33
|
customSelectFieldAnswers: loginCustomSelectFieldAnswers,
|
|
@@ -39,7 +39,7 @@ $ const loginButtonLabels = defaultValue(input.loginButtonLabels, {
|
|
|
39
39
|
customSelectFieldAnswers,
|
|
40
40
|
customBooleanFieldAnswers,
|
|
41
41
|
customTextFieldAnswers,
|
|
42
|
-
} = getFormCustomFields({ fields, fieldRows });
|
|
42
|
+
} = getFormCustomFields({ fields, fieldRows, user });
|
|
43
43
|
|
|
44
44
|
$ const props = {
|
|
45
45
|
// Access form 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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.4/components/form-access.marko",
|
|
6
6
|
marko_component = require("./form-access.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
@@ -65,7 +65,7 @@ function render(input, out, __component, component, state) {
|
|
|
65
65
|
if (identityX && form.fieldRows) {
|
|
66
66
|
marko_web_identity_x_context_tag({
|
|
67
67
|
withFields: true,
|
|
68
|
-
renderBody: function(out, {
|
|
68
|
+
renderBody: function(out, { fuser, ields }) {
|
|
69
69
|
out.w("<div class=\"content-survey-access-idx__wrapper\">");
|
|
70
70
|
|
|
71
71
|
const {
|
|
@@ -80,7 +80,7 @@ function render(input, out, __component, component, state) {
|
|
|
80
80
|
customSelectFieldAnswers,
|
|
81
81
|
customBooleanFieldAnswers,
|
|
82
82
|
customTextFieldAnswers,
|
|
83
|
-
} = getFormCustomFields({ fields, fieldRows });
|
|
83
|
+
} = getFormCustomFields({ fields, fieldRows, user });
|
|
84
84
|
|
|
85
85
|
const props = {
|
|
86
86
|
// Access form props
|
|
@@ -146,7 +146,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
146
146
|
}, marko_component);
|
|
147
147
|
|
|
148
148
|
marko_template.meta = {
|
|
149
|
-
id: "/@mindful-web/marko-web-identity-x$1.35.
|
|
149
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/components/form-access.marko",
|
|
150
150
|
component: "./form-access.marko",
|
|
151
151
|
tags: [
|
|
152
152
|
"@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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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"),
|
|
@@ -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.35.
|
|
71
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
62
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.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",
|
|
@@ -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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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"),
|
|
@@ -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.35.
|
|
82
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
32
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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"),
|
|
@@ -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.35.
|
|
84
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
28
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
53
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.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.35.
|
|
48
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.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"
|
|
@@ -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.35.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
76
|
+
id: "/@mindful-web/marko-web-identity-x$1.35.4/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.35.
|
|
3
|
+
"version": "1.35.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>",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "c98c4a9d8ca068e39de6769650b16622d63de31c"
|
|
41
41
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
module.exports = ({
|
|
2
2
|
fields,
|
|
3
3
|
fieldRows,
|
|
4
|
+
user,
|
|
4
5
|
} = {}) => {
|
|
5
6
|
const fieldRowFields = [];
|
|
6
7
|
fieldRows.forEach((row) => {
|
|
@@ -11,17 +12,41 @@ module.exports = ({
|
|
|
11
12
|
});
|
|
12
13
|
|
|
13
14
|
// eslint-disable-next-line no-underscore-dangle
|
|
14
|
-
const customBooleanFieldAnswers = fieldRowFields.filter((f) => f.__typename === 'BooleanField').map((f) =>
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const customBooleanFieldAnswers = fieldRowFields.filter((f) => f.__typename === 'BooleanField').map((f) => {
|
|
16
|
+
const userAnswer = user.customBooleanFieldAnswers.filter(({ id }) => id === f.id);
|
|
17
|
+
if (userAnswer) {
|
|
18
|
+
return ({
|
|
19
|
+
...userAnswer[0],
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return ({
|
|
23
|
+
id: f.id, hasAnswered: false, answer: null, value: null, field: f,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
17
26
|
// eslint-disable-next-line no-underscore-dangle, eqeqeq
|
|
18
|
-
const customSelectFieldAnswers = fieldRowFields.filter((f) => f.__typename == 'SelectField').map((f) =>
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
const customSelectFieldAnswers = fieldRowFields.filter((f) => f.__typename == 'SelectField').map((f) => {
|
|
28
|
+
const userAnswer = user.customSelectFieldAnswers.filter(({ id }) => id === f.id);
|
|
29
|
+
if (userAnswer) {
|
|
30
|
+
return ({
|
|
31
|
+
...userAnswer[0],
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return ({
|
|
35
|
+
id: f.id, hasAnswered: false, answers: [], field: f,
|
|
36
|
+
});
|
|
37
|
+
});
|
|
21
38
|
// eslint-disable-next-line no-underscore-dangle, eqeqeq
|
|
22
|
-
const customTextFieldAnswers = fieldRowFields.filter((f) => f.__typename == 'TextField').map((f) =>
|
|
23
|
-
|
|
24
|
-
|
|
39
|
+
const customTextFieldAnswers = fieldRowFields.filter((f) => f.__typename == 'TextField').map((f) => {
|
|
40
|
+
const userAnswer = user.customTextFieldAnswers.filter(({ id }) => id === f.id);
|
|
41
|
+
if (userAnswer) {
|
|
42
|
+
return ({
|
|
43
|
+
...userAnswer[0],
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return ({
|
|
47
|
+
id: f.id, hasAnswered: false, value: null, field: f,
|
|
48
|
+
});
|
|
49
|
+
});
|
|
25
50
|
return {
|
|
26
51
|
customBooleanFieldAnswers,
|
|
27
52
|
customSelectFieldAnswers,
|