@mindful-web/marko-web-identity-x 1.0.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.
- package/.eslintignore +1 -0
- package/LICENSE +21 -0
- package/README.md +200 -0
- package/api/fragment-types.json +1 -0
- package/api/fragments/active-user.js +108 -0
- package/api/mutations/add-external-user-id.js +24 -0
- package/api/mutations/create-app-user.js +11 -0
- package/api/mutations/delete-app-user-for-current-application.js +7 -0
- package/api/mutations/impersonate-app-user.js +12 -0
- package/api/mutations/logout-app-user.js +11 -0
- package/api/mutations/send-change-email-link.js +7 -0
- package/api/mutations/send-login-link.js +7 -0
- package/api/mutations/set-custom-attributes.js +15 -0
- package/api/queries/check-content-access.js +19 -0
- package/api/queries/get-active-context.js +45 -0
- package/api/queries/load-user-by-external-id.js +14 -0
- package/api/queries/load-user-by-id.js +11 -0
- package/api/queries/load-user.js +11 -0
- package/browser/.eslintrc.js +11 -0
- package/browser/access.vue +377 -0
- package/browser/authenticate.vue +278 -0
- package/browser/change-email-confirm.vue +120 -0
- package/browser/change-email-init.vue +179 -0
- package/browser/comments/create.vue +107 -0
- package/browser/comments/post.vue +151 -0
- package/browser/comments/stream.vue +319 -0
- package/browser/custom-column.vue +314 -0
- package/browser/dayjs.js +6 -0
- package/browser/download-related.vue +120 -0
- package/browser/download.vue +380 -0
- package/browser/errors/authentication.js +7 -0
- package/browser/errors/feature.js +7 -0
- package/browser/errors/form.js +7 -0
- package/browser/errors/logout.js +7 -0
- package/browser/form/address-block.vue +131 -0
- package/browser/form/common/checkbox-group.vue +140 -0
- package/browser/form/common/form-group.vue +24 -0
- package/browser/form/common/form-label.vue +17 -0
- package/browser/form/consent.vue +121 -0
- package/browser/form/fields/address-extra.vue +68 -0
- package/browser/form/fields/city.vue +68 -0
- package/browser/form/fields/comment-body.vue +63 -0
- package/browser/form/fields/country.vue +94 -0
- package/browser/form/fields/custom-boolean.vue +58 -0
- package/browser/form/fields/custom-select-group.vue +25 -0
- package/browser/form/fields/custom-select-multiple.vue +97 -0
- package/browser/form/fields/custom-select-write-in-inline.vue +39 -0
- package/browser/form/fields/custom-select-write-in.vue +66 -0
- package/browser/form/fields/custom-select.vue +191 -0
- package/browser/form/fields/custom-text.vue +62 -0
- package/browser/form/fields/display-name.vue +64 -0
- package/browser/form/fields/email.vue +62 -0
- package/browser/form/fields/family-name.vue +68 -0
- package/browser/form/fields/given-name.vue +68 -0
- package/browser/form/fields/organization-title.vue +68 -0
- package/browser/form/fields/organization.vue +68 -0
- package/browser/form/fields/phone-number.vue +68 -0
- package/browser/form/fields/postal-code.vue +68 -0
- package/browser/form/fields/receive-email.vue +58 -0
- package/browser/form/fields/region.vue +106 -0
- package/browser/form/fields/regional-policy.vue +59 -0
- package/browser/form/fields/street.vue +68 -0
- package/browser/graphql/create-client.js +65 -0
- package/browser/graphql/parse.js +1 -0
- package/browser/graphql/queries/download-related-content.js +38 -0
- package/browser/index.js +110 -0
- package/browser/login-fields.vue +214 -0
- package/browser/login.vue +331 -0
- package/browser/logout.vue +68 -0
- package/browser/mixins/global-auto-signup-event-emitter.js +18 -0
- package/browser/mixins/global-event-emitter.js +28 -0
- package/browser/profile.vue +688 -0
- package/browser/service.js +32 -0
- package/browser/utils/clean-path.js +1 -0
- package/browser/utils/cookies-enabled.js +10 -0
- package/browser/utils/get-as-array.js +6 -0
- package/browser/utils/get-referring-page.js +7 -0
- package/browser/utils/get.js +8 -0
- package/browser/utils/post.js +10 -0
- package/browser/utils/redirect.js +7 -0
- package/browser/utils/region-country-codes.js +1 -0
- package/components/access.marko +24 -0
- package/components/access.marko.js +61 -0
- package/components/comment-stream.marko +31 -0
- package/components/comment-stream.marko.js +71 -0
- package/components/context.marko +15 -0
- package/components/context.marko.js +52 -0
- package/components/form-access.marko +60 -0
- package/components/form-access.marko.js +111 -0
- package/components/form-authenticate.marko +32 -0
- package/components/form-authenticate.marko.js +73 -0
- package/components/form-change-email.marko +27 -0
- package/components/form-change-email.marko.js +68 -0
- package/components/form-login.marko +32 -0
- package/components/form-login.marko.js +72 -0
- package/components/form-logout.marko +7 -0
- package/components/form-logout.marko.js +36 -0
- package/components/form-profile.marko +38 -0
- package/components/form-profile.marko.js +78 -0
- package/components/form-register.marko +2 -0
- package/components/form-register.marko.js +32 -0
- package/components/identify.marko +17 -0
- package/components/identify.marko.js +59 -0
- package/components/marko.json +90 -0
- package/components/non-auth-identify.marko +15 -0
- package/components/non-auth-identify.marko.js +53 -0
- package/config.js +161 -0
- package/hooks.js +20 -0
- package/index.js +30 -0
- package/marko.json +6 -0
- package/middleware/content-access-state.js +31 -0
- package/middleware/content-download-state.js +27 -0
- package/middleware.js +32 -0
- package/package.json +40 -0
- package/routes/access.js +29 -0
- package/routes/authenticate.js +58 -0
- package/routes/change-email-confirm.js +60 -0
- package/routes/change-email-init.js +16 -0
- package/routes/comment-count.js +19 -0
- package/routes/comments.js +43 -0
- package/routes/countries.js +19 -0
- package/routes/create-comment.js +25 -0
- package/routes/download.js +29 -0
- package/routes/flag-comment.js +21 -0
- package/routes/index.js +40 -0
- package/routes/login-fields.js +35 -0
- package/routes/login.js +95 -0
- package/routes/logout.js +19 -0
- package/routes/profile.js +183 -0
- package/routes/regions.js +22 -0
- package/service.js +483 -0
- package/utils/call-hooks-for.js +28 -0
- package/utils/context-cookie.js +30 -0
- package/utils/create-client.js +48 -0
- package/utils/create-identity-builder.js +33 -0
- package/utils/get-as-array.js +6 -0
- package/utils/json-error-handler.js +41 -0
- package/utils/token-cookie.js +30 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.0.0/components/form-change-email.marko",
|
|
6
|
+
marko_component = require("./form-change-email.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
get = module_objectPath_module.get,
|
|
11
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
12
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
13
|
+
marko_web_browser_component_template = require("@mindful-web/marko-web/components/browser-component.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
|
|
16
|
+
marko_web_identity_x_context_template = require("./context.marko"),
|
|
17
|
+
marko_web_identity_x_context_tag = marko_loadTag(marko_web_identity_x_context_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
const { req } = out.global;
|
|
23
|
+
|
|
24
|
+
const { identityX } = req;
|
|
25
|
+
|
|
26
|
+
if (Boolean(identityX)) {
|
|
27
|
+
marko_web_identity_x_context_tag({
|
|
28
|
+
renderBody: function(out, { user, isEnabled, application }) {
|
|
29
|
+
const props = {
|
|
30
|
+
actionText: input.actionText,
|
|
31
|
+
activeUser: user,
|
|
32
|
+
endpoints: identityX.config.getEndpoints(),
|
|
33
|
+
buttonLabels: input.buttonLabels,
|
|
34
|
+
consentPolicy: get(application, "organization.consentPolicy"),
|
|
35
|
+
appContextId: identityX.config.get("appContextId"),
|
|
36
|
+
token: get(req, "query.token"),
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
if (isEnabled) {
|
|
40
|
+
if (props.token) {
|
|
41
|
+
marko_web_browser_component_tag({
|
|
42
|
+
name: "IdentityXChangeEmailConfirm",
|
|
43
|
+
props: props
|
|
44
|
+
}, out, __component, "1");
|
|
45
|
+
} else {
|
|
46
|
+
marko_web_browser_component_tag({
|
|
47
|
+
name: "IdentityXChangeEmailInit",
|
|
48
|
+
props: props
|
|
49
|
+
}, out, __component, "2");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, out, __component, "0");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
marko_template._ = marko_renderer(render, {
|
|
58
|
+
e_: marko_componentType
|
|
59
|
+
}, marko_component);
|
|
60
|
+
|
|
61
|
+
marko_template.meta = {
|
|
62
|
+
id: "/@mindful-web/marko-web-identity-x$1.0.0/components/form-change-email.marko",
|
|
63
|
+
component: "./form-change-email.marko",
|
|
64
|
+
tags: [
|
|
65
|
+
"@mindful-web/marko-web/components/browser-component.marko",
|
|
66
|
+
"./context.marko"
|
|
67
|
+
]
|
|
68
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { get } from "@mindful-web/object-path";
|
|
2
|
+
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
3
|
+
|
|
4
|
+
$ const { req } = out.global;
|
|
5
|
+
$ const { identityX } = req;
|
|
6
|
+
$ const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
7
|
+
|
|
8
|
+
<if(Boolean(identityX))>
|
|
9
|
+
<marko-web-identity-x-context|{ user, isEnabled, application }|>
|
|
10
|
+
$ const props = {
|
|
11
|
+
additionalEventData,
|
|
12
|
+
source: input.source,
|
|
13
|
+
actionText: input.actionText,
|
|
14
|
+
activeUser: user,
|
|
15
|
+
endpoints: identityX.config.getEndpoints(),
|
|
16
|
+
buttonLabels: input.buttonLabels,
|
|
17
|
+
redirect: input.redirect,
|
|
18
|
+
loginEmailLabel: input.loginEmailLabel,
|
|
19
|
+
loginEmailPlaceholder: input.loginEmailPlaceholder,
|
|
20
|
+
defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
|
|
21
|
+
requiredCreateFields: identityX.config.getRequiredCreateFields(),
|
|
22
|
+
consentPolicy: get(application, "organization.consentPolicy"),
|
|
23
|
+
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
24
|
+
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
25
|
+
appContextId: identityX.config.get("appContextId"),
|
|
26
|
+
lang: defaultValue(input.lang, "en"),
|
|
27
|
+
};
|
|
28
|
+
<if(isEnabled)>
|
|
29
|
+
<marko-web-browser-component name="IdentityXLogin" props=props />
|
|
30
|
+
</if>
|
|
31
|
+
</marko-web-identity-x-context>
|
|
32
|
+
</if>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.0.0/components/form-login.marko",
|
|
6
|
+
marko_component = require("./form-login.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
get = module_objectPath_module.get,
|
|
11
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
12
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
13
|
+
marko_web_browser_component_template = require("@mindful-web/marko-web/components/browser-component.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
|
|
16
|
+
marko_web_identity_x_context_template = require("./context.marko"),
|
|
17
|
+
marko_web_identity_x_context_tag = marko_loadTag(marko_web_identity_x_context_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
const { req } = out.global;
|
|
23
|
+
|
|
24
|
+
const { identityX } = req;
|
|
25
|
+
|
|
26
|
+
const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
27
|
+
|
|
28
|
+
if (Boolean(identityX)) {
|
|
29
|
+
marko_web_identity_x_context_tag({
|
|
30
|
+
renderBody: function(out, { user, isEnabled, application }) {
|
|
31
|
+
const props = {
|
|
32
|
+
additionalEventData,
|
|
33
|
+
source: input.source,
|
|
34
|
+
actionText: input.actionText,
|
|
35
|
+
activeUser: user,
|
|
36
|
+
endpoints: identityX.config.getEndpoints(),
|
|
37
|
+
buttonLabels: input.buttonLabels,
|
|
38
|
+
redirect: input.redirect,
|
|
39
|
+
loginEmailLabel: input.loginEmailLabel,
|
|
40
|
+
loginEmailPlaceholder: input.loginEmailPlaceholder,
|
|
41
|
+
defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
|
|
42
|
+
requiredCreateFields: identityX.config.getRequiredCreateFields(),
|
|
43
|
+
consentPolicy: get(application, "organization.consentPolicy"),
|
|
44
|
+
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
45
|
+
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
46
|
+
appContextId: identityX.config.get("appContextId"),
|
|
47
|
+
lang: defaultValue(input.lang, "en"),
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
if (isEnabled) {
|
|
51
|
+
marko_web_browser_component_tag({
|
|
52
|
+
name: "IdentityXLogin",
|
|
53
|
+
props: props
|
|
54
|
+
}, out, __component, "1");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, out, __component, "0");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
marko_template._ = marko_renderer(render, {
|
|
62
|
+
e_: marko_componentType
|
|
63
|
+
}, marko_component);
|
|
64
|
+
|
|
65
|
+
marko_template.meta = {
|
|
66
|
+
id: "/@mindful-web/marko-web-identity-x$1.0.0/components/form-login.marko",
|
|
67
|
+
component: "./form-login.marko",
|
|
68
|
+
tags: [
|
|
69
|
+
"@mindful-web/marko-web/components/browser-component.marko",
|
|
70
|
+
"./context.marko"
|
|
71
|
+
]
|
|
72
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.0.0/components/form-logout.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
8
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
9
|
+
marko_web_browser_component_template = require("@mindful-web/marko-web/components/browser-component.marko"),
|
|
10
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
11
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template);
|
|
12
|
+
|
|
13
|
+
function render(input, out, __component, component, state) {
|
|
14
|
+
var data = input;
|
|
15
|
+
|
|
16
|
+
const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
17
|
+
|
|
18
|
+
marko_web_browser_component_tag({
|
|
19
|
+
name: "IdentityXLogout",
|
|
20
|
+
props: {
|
|
21
|
+
additionalEventData: additionalEventData
|
|
22
|
+
}
|
|
23
|
+
}, out, __component, "0");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
marko_template._ = marko_renderer(render, {
|
|
27
|
+
d_: true,
|
|
28
|
+
e_: marko_componentType
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
marko_template.meta = {
|
|
32
|
+
id: "/@mindful-web/marko-web-identity-x$1.0.0/components/form-logout.marko",
|
|
33
|
+
tags: [
|
|
34
|
+
"@mindful-web/marko-web/components/browser-component.marko"
|
|
35
|
+
]
|
|
36
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { get } from "@mindful-web/object-path";
|
|
2
|
+
import defaultValue from "@mindful-web/marko-core/utils/default-value";
|
|
3
|
+
|
|
4
|
+
$ const { req } = out.global;
|
|
5
|
+
$ const { identityX, query } = req;
|
|
6
|
+
$ const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
7
|
+
|
|
8
|
+
<if(Boolean(identityX))>
|
|
9
|
+
<marko-web-identity-x-context|{ user, isEnabled, application }|>
|
|
10
|
+
$ const props = {
|
|
11
|
+
additionalEventData: additionalEventData,
|
|
12
|
+
loginSource: input.loginSource,
|
|
13
|
+
activeUser: user,
|
|
14
|
+
requiredServerFields: identityX.config.getRequiredServerFields(),
|
|
15
|
+
requiredClientFields: identityX.config.getRequiredClientFields(),
|
|
16
|
+
requiredCreateFields: identityX.config.getRequiredCreateFields(),
|
|
17
|
+
activeCustomFieldIds: identityX.config.getActiveCustomFieldIds(),
|
|
18
|
+
defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
|
|
19
|
+
hiddenFields: identityX.config.getHiddenFields(),
|
|
20
|
+
defaultCountryCode: identityX.config.get('defaultCountryCode'),
|
|
21
|
+
booleanQuestionsLabel: identityX.config.get('booleanQuestionsLabel'),
|
|
22
|
+
callToAction: input.callToAction,
|
|
23
|
+
reloadPageOnSubmit: input.reloadPageOnSubmit,
|
|
24
|
+
buttonLabel: input.buttonLabel,
|
|
25
|
+
endpoints: identityX.config.getEndpoints(),
|
|
26
|
+
consentPolicy: get(application, "organization.consentPolicy"),
|
|
27
|
+
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
28
|
+
appContextId: identityX.config.get("appContextId"),
|
|
29
|
+
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
30
|
+
returnTo: query.returnTo,
|
|
31
|
+
returnToDelay: input.returnToDelay,
|
|
32
|
+
enableChangeEmail: identityX.config.get("enableChangeEmail"),
|
|
33
|
+
};
|
|
34
|
+
<if(isEnabled)>
|
|
35
|
+
<marko-web-browser-component name="IdentityXProfile" props=props />
|
|
36
|
+
</if>
|
|
37
|
+
</marko-web-identity-x-context>
|
|
38
|
+
</if>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.0.0/components/form-profile.marko",
|
|
6
|
+
marko_component = require("./form-profile.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
get = module_objectPath_module.get,
|
|
11
|
+
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
12
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
13
|
+
marko_web_browser_component_template = require("@mindful-web/marko-web/components/browser-component.marko"),
|
|
14
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
15
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
|
|
16
|
+
marko_web_identity_x_context_template = require("./context.marko"),
|
|
17
|
+
marko_web_identity_x_context_tag = marko_loadTag(marko_web_identity_x_context_template);
|
|
18
|
+
|
|
19
|
+
function render(input, out, __component, component, state) {
|
|
20
|
+
var data = input;
|
|
21
|
+
|
|
22
|
+
const { req } = out.global;
|
|
23
|
+
|
|
24
|
+
const { identityX, query } = req;
|
|
25
|
+
|
|
26
|
+
const additionalEventData = defaultValue(input.additionalEventData, {});
|
|
27
|
+
|
|
28
|
+
if (Boolean(identityX)) {
|
|
29
|
+
marko_web_identity_x_context_tag({
|
|
30
|
+
renderBody: function(out, { user, isEnabled, application }) {
|
|
31
|
+
const props = {
|
|
32
|
+
additionalEventData: additionalEventData,
|
|
33
|
+
loginSource: input.loginSource,
|
|
34
|
+
activeUser: user,
|
|
35
|
+
requiredServerFields: identityX.config.getRequiredServerFields(),
|
|
36
|
+
requiredClientFields: identityX.config.getRequiredClientFields(),
|
|
37
|
+
requiredCreateFields: identityX.config.getRequiredCreateFields(),
|
|
38
|
+
activeCustomFieldIds: identityX.config.getActiveCustomFieldIds(),
|
|
39
|
+
defaultFieldLabels: identityX.config.get("defaultFieldLabels"),
|
|
40
|
+
hiddenFields: identityX.config.getHiddenFields(),
|
|
41
|
+
defaultCountryCode: identityX.config.get('defaultCountryCode'),
|
|
42
|
+
booleanQuestionsLabel: identityX.config.get('booleanQuestionsLabel'),
|
|
43
|
+
callToAction: input.callToAction,
|
|
44
|
+
reloadPageOnSubmit: input.reloadPageOnSubmit,
|
|
45
|
+
buttonLabel: input.buttonLabel,
|
|
46
|
+
endpoints: identityX.config.getEndpoints(),
|
|
47
|
+
consentPolicy: get(application, "organization.consentPolicy"),
|
|
48
|
+
emailConsentRequest: get(application, "organization.emailConsentRequest"),
|
|
49
|
+
appContextId: identityX.config.get("appContextId"),
|
|
50
|
+
regionalConsentPolicies: get(application, "organization.regionalConsentPolicies"),
|
|
51
|
+
returnTo: query.returnTo,
|
|
52
|
+
returnToDelay: input.returnToDelay,
|
|
53
|
+
enableChangeEmail: identityX.config.get("enableChangeEmail"),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
if (isEnabled) {
|
|
57
|
+
marko_web_browser_component_tag({
|
|
58
|
+
name: "IdentityXProfile",
|
|
59
|
+
props: props
|
|
60
|
+
}, out, __component, "1");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}, out, __component, "0");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
marko_template._ = marko_renderer(render, {
|
|
68
|
+
e_: marko_componentType
|
|
69
|
+
}, marko_component);
|
|
70
|
+
|
|
71
|
+
marko_template.meta = {
|
|
72
|
+
id: "/@mindful-web/marko-web-identity-x$1.0.0/components/form-profile.marko",
|
|
73
|
+
component: "./form-profile.marko",
|
|
74
|
+
tags: [
|
|
75
|
+
"@mindful-web/marko-web/components/browser-component.marko",
|
|
76
|
+
"./context.marko"
|
|
77
|
+
]
|
|
78
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.0.0/components/form-register.marko",
|
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
|
+
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
8
|
+
marko_web_identity_x_form_login_template = require("./form-login.marko"),
|
|
9
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
10
|
+
marko_web_identity_x_form_login_tag = marko_loadTag(marko_web_identity_x_form_login_template);
|
|
11
|
+
|
|
12
|
+
function render(input, out, __component, component, state) {
|
|
13
|
+
var data = input;
|
|
14
|
+
|
|
15
|
+
console.log('Warning: `marko-web-identity-x-form-register` is deprecated. Use `marko-web-identity-x-form-login` instead.');
|
|
16
|
+
|
|
17
|
+
marko_web_identity_x_form_login_tag(marko_assign({
|
|
18
|
+
source: "default"
|
|
19
|
+
}, input), out, __component, "0");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
marko_template._ = marko_renderer(render, {
|
|
23
|
+
d_: true,
|
|
24
|
+
e_: marko_componentType
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
marko_template.meta = {
|
|
28
|
+
id: "/@mindful-web/marko-web-identity-x$1.0.0/components/form-register.marko",
|
|
29
|
+
tags: [
|
|
30
|
+
"./form-login.marko"
|
|
31
|
+
]
|
|
32
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getAsObject } from "@mindful-web/object-path";
|
|
2
|
+
import getCookieId from "@mindful-web/marko-web-omeda-identity-x/utils/get-cookie-id";
|
|
3
|
+
import { getResponseCookies } from "@mindful-web/utils";
|
|
4
|
+
|
|
5
|
+
$ const { req, res } = out.global;
|
|
6
|
+
$ const { identityX } = req;
|
|
7
|
+
|
|
8
|
+
<if(Boolean(identityX))>
|
|
9
|
+
<marko-web-resolve|{ resolved: user }| promise=identityX.getIdentityData()>
|
|
10
|
+
<if(user || input.providerData)>
|
|
11
|
+
<!-- additional user data to spread base on provider(omeda, braze...) -->
|
|
12
|
+
$ const providerData = getAsObject(input, "providerData");
|
|
13
|
+
$ const data = { user, ...providerData };
|
|
14
|
+
<marko-web-gtm-push data=data />
|
|
15
|
+
</if>
|
|
16
|
+
</marko-web-resolve>
|
|
17
|
+
</if>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.0.0/components/identify.marko",
|
|
6
|
+
marko_component = require("./identify.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
module_objectPath_module = require("@mindful-web/object-path"),
|
|
9
|
+
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
10
|
+
getAsObject = module_objectPath_module.getAsObject,
|
|
11
|
+
module_getCookieId = require("@mindful-web/marko-web-omeda-identity-x/utils/get-cookie-id"),
|
|
12
|
+
getCookieId = module_getCookieId.default || module_getCookieId,
|
|
13
|
+
module_utils_module = require("@mindful-web/utils"),
|
|
14
|
+
utils_module = module_utils_module.default || module_utils_module,
|
|
15
|
+
getResponseCookies = module_utils_module.getResponseCookies,
|
|
16
|
+
marko_web_gtm_push_template = require("@mindful-web/marko-web-gtm/components/push.marko"),
|
|
17
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
18
|
+
marko_web_gtm_push_tag = marko_loadTag(marko_web_gtm_push_template),
|
|
19
|
+
marko_web_resolve_template = require("@mindful-web/marko-core/components/resolve.marko"),
|
|
20
|
+
marko_web_resolve_tag = marko_loadTag(marko_web_resolve_template);
|
|
21
|
+
|
|
22
|
+
function render(input, out, __component, component, state) {
|
|
23
|
+
var data = input;
|
|
24
|
+
|
|
25
|
+
const { req, res } = out.global;
|
|
26
|
+
|
|
27
|
+
const { identityX } = req;
|
|
28
|
+
|
|
29
|
+
if (Boolean(identityX)) {
|
|
30
|
+
marko_web_resolve_tag({
|
|
31
|
+
promise: identityX.getIdentityData(),
|
|
32
|
+
renderBody: function(out, { resolved: user }) {
|
|
33
|
+
if (user || input.providerData) {
|
|
34
|
+
const providerData = getAsObject(input, "providerData");
|
|
35
|
+
|
|
36
|
+
const data = { user, ...providerData };
|
|
37
|
+
|
|
38
|
+
marko_web_gtm_push_tag({
|
|
39
|
+
name: "dataLayer",
|
|
40
|
+
data: data
|
|
41
|
+
}, out, __component, "1");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, out, __component, "0");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
marko_template._ = marko_renderer(render, {
|
|
49
|
+
e_: marko_componentType
|
|
50
|
+
}, marko_component);
|
|
51
|
+
|
|
52
|
+
marko_template.meta = {
|
|
53
|
+
id: "/@mindful-web/marko-web-identity-x$1.0.0/components/identify.marko",
|
|
54
|
+
component: "./identify.marko",
|
|
55
|
+
tags: [
|
|
56
|
+
"@mindful-web/marko-web-gtm/components/push.marko",
|
|
57
|
+
"@mindful-web/marko-core/components/resolve.marko"
|
|
58
|
+
]
|
|
59
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<marko-web-identity-x-access>": {
|
|
3
|
+
"template": "./access.marko",
|
|
4
|
+
"@enabled": {
|
|
5
|
+
"type": "boolean",
|
|
6
|
+
"default-value": true
|
|
7
|
+
},
|
|
8
|
+
"@required-access-level-ids": {
|
|
9
|
+
"type": "array"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"<marko-web-identity-x-context>": {
|
|
13
|
+
"template": "./context.marko"
|
|
14
|
+
},
|
|
15
|
+
"<marko-web-identity-x-form-authenticate>": {
|
|
16
|
+
"template": "./form-authenticate.marko",
|
|
17
|
+
"@additional-event-data": "object",
|
|
18
|
+
"@call-to-action": "string",
|
|
19
|
+
"@button-label": "string"
|
|
20
|
+
},
|
|
21
|
+
"<marko-web-identity-x-form-change-email>": {
|
|
22
|
+
"template": "./form-change-email.marko",
|
|
23
|
+
"@action-text": "string",
|
|
24
|
+
"@button-labels": "object"
|
|
25
|
+
},
|
|
26
|
+
"<marko-web-identity-x-form-login>": {
|
|
27
|
+
"template": "./form-login.marko",
|
|
28
|
+
"@additional-event-data": "object",
|
|
29
|
+
"@source": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"default-value": "default"
|
|
32
|
+
},
|
|
33
|
+
"@action-text": "string",
|
|
34
|
+
"@button-labels": "object",
|
|
35
|
+
"@login-email-placeholder": "string",
|
|
36
|
+
"@redirect": "string",
|
|
37
|
+
"@login-email-label": "string",
|
|
38
|
+
"@lang": "string"
|
|
39
|
+
},
|
|
40
|
+
"<marko-web-identity-x-form-logout>": {
|
|
41
|
+
"template": "./form-logout.marko",
|
|
42
|
+
"@additional-event-data": "object"
|
|
43
|
+
},
|
|
44
|
+
"<marko-web-identity-x-form-register>": {
|
|
45
|
+
"template": "./form-register.marko",
|
|
46
|
+
"@additional-event-data": "object",
|
|
47
|
+
"@button-labels": "object",
|
|
48
|
+
"@login-email-placeholder": "string",
|
|
49
|
+
"@redirect": "string"
|
|
50
|
+
},
|
|
51
|
+
"<marko-web-identity-x-non-auth-identify>": {
|
|
52
|
+
"template": "./non-auth-identify.marko"
|
|
53
|
+
},
|
|
54
|
+
"<marko-web-identity-x-form-access>": {
|
|
55
|
+
"template": "./form-access.marko"
|
|
56
|
+
},
|
|
57
|
+
"<marko-web-identity-x-form-profile>": {
|
|
58
|
+
"template": "./form-profile.marko",
|
|
59
|
+
"@additional-event-data": "object",
|
|
60
|
+
"@login-source": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"default-value": "default"
|
|
63
|
+
},
|
|
64
|
+
"@call-to-action": "string",
|
|
65
|
+
"@reload-page-on-submit": "boolean",
|
|
66
|
+
"@return-to-delay": "number",
|
|
67
|
+
"@button-label": "string"
|
|
68
|
+
},
|
|
69
|
+
"<marko-web-identity-x-comment-stream>": {
|
|
70
|
+
"template": "./comment-stream.marko",
|
|
71
|
+
"@additional-event-data": "object",
|
|
72
|
+
"@login-source": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"default-value": "comments"
|
|
75
|
+
},
|
|
76
|
+
"@identifier": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"required": true
|
|
79
|
+
},
|
|
80
|
+
"@title": "string",
|
|
81
|
+
"@description": "string",
|
|
82
|
+
"@url": "string",
|
|
83
|
+
"@load-more-button-class": "string",
|
|
84
|
+
"@login-button-labels": "object"
|
|
85
|
+
},
|
|
86
|
+
"<marko-web-identity-x-identify>": {
|
|
87
|
+
"template": "./identify.marko",
|
|
88
|
+
"@provider-data": "object"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
$ const { req } = out.global;
|
|
2
|
+
$ const { identityX } = req;
|
|
3
|
+
|
|
4
|
+
<if(Boolean(identityX))>
|
|
5
|
+
<marko-web-resolve|{ resolved: user }| promise=identityX.getIdentityData()>
|
|
6
|
+
<if(user && user.id)>
|
|
7
|
+
<marko-web-resolve|{ resolved: fullUser }| promise=identityX.findUserById(user.id)>
|
|
8
|
+
<${input.renderBody} user=fullUser />
|
|
9
|
+
</marko-web-resolve>
|
|
10
|
+
</if>
|
|
11
|
+
<else>
|
|
12
|
+
<${input.renderBody} />
|
|
13
|
+
</else>
|
|
14
|
+
</marko-web-resolve>
|
|
15
|
+
</if>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.0.0/components/non-auth-identify.marko",
|
|
6
|
+
marko_component = require("./non-auth-identify.marko"),
|
|
7
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
|
+
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
9
|
+
marko_web_resolve_template = require("@mindful-web/marko-core/components/resolve.marko"),
|
|
10
|
+
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
11
|
+
marko_web_resolve_tag = marko_loadTag(marko_web_resolve_template);
|
|
12
|
+
|
|
13
|
+
function render(input, out, __component, component, state) {
|
|
14
|
+
var data = input;
|
|
15
|
+
|
|
16
|
+
const { req } = out.global;
|
|
17
|
+
|
|
18
|
+
const { identityX } = req;
|
|
19
|
+
|
|
20
|
+
if (Boolean(identityX)) {
|
|
21
|
+
marko_web_resolve_tag({
|
|
22
|
+
promise: identityX.getIdentityData(),
|
|
23
|
+
renderBody: function(out, { resolved: user }) {
|
|
24
|
+
if (user && user.id) {
|
|
25
|
+
marko_web_resolve_tag({
|
|
26
|
+
promise: identityX.findUserById(user.id),
|
|
27
|
+
renderBody: function(out, { resolved: fullUser }) {
|
|
28
|
+
marko_dynamicTag(out, input.renderBody, function() {
|
|
29
|
+
return {
|
|
30
|
+
user: fullUser
|
|
31
|
+
};
|
|
32
|
+
}, null, null, null, __component, "2");
|
|
33
|
+
}
|
|
34
|
+
}, out, __component, "1");
|
|
35
|
+
} else {
|
|
36
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "3");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, out, __component, "0");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
marko_template._ = marko_renderer(render, {
|
|
44
|
+
e_: marko_componentType
|
|
45
|
+
}, marko_component);
|
|
46
|
+
|
|
47
|
+
marko_template.meta = {
|
|
48
|
+
id: "/@mindful-web/marko-web-identity-x$1.0.0/components/non-auth-identify.marko",
|
|
49
|
+
component: "./non-auth-identify.marko",
|
|
50
|
+
tags: [
|
|
51
|
+
"@mindful-web/marko-core/components/resolve.marko"
|
|
52
|
+
]
|
|
53
|
+
};
|