@mindful-web/marko-web-identity-x 1.85.0 → 1.85.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +21 -0
- package/browser/progressive-profile.vue +20 -2
- 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.js +2 -2
- 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/google-init.marko.js +2 -2
- package/components/google-sign-in-button.marko.js +2 -2
- package/components/identify.marko.js +2 -2
- package/components/non-auth-identify.marko.js +2 -2
- package/components/progressive-profile-form.marko +23 -2
- package/components/progressive-profile-form.marko.js +13 -4
- package/components/subscribe.marko.js +2 -2
- package/package.json +2 -2
- package/routes/change-email-confirm.js +2 -0
package/CLAUDE.md
CHANGED
|
@@ -382,6 +382,27 @@ No coverage is lost: every field the fleet-wide impact analysis measured is a se
|
|
|
382
382
|
suppression, and the 3-day suppression that follows an unverified submit. **Not** bot safeguards;
|
|
383
383
|
that is reCAPTCHA's job, below.
|
|
384
384
|
|
|
385
|
+
### Gate copy
|
|
386
|
+
|
|
387
|
+
Defaults live in `progressive-profile-form.marko`; a site overrides them per-instance with
|
|
388
|
+
`title` / `callToAction` (threaded through the theme's `progressive-profile-gate.marko`). The
|
|
389
|
+
theme middleware's Joi schema does **not** accept them, so they cannot go in a site's
|
|
390
|
+
`progressiveProfile` config without extending it first — and unknown keys there fail the boot by
|
|
391
|
+
design.
|
|
392
|
+
|
|
393
|
+
The default title names the number of questions (`One` / `Two` / `A few` … `quick question(s),
|
|
394
|
+
then keep reading`), read off `state.missingCount` so it reflects what is actually rendered, not
|
|
395
|
+
what is configured: a two-question site shows the one-question title to a reader who has already
|
|
396
|
+
answered half of it.
|
|
397
|
+
|
|
398
|
+
**Changing any default string is an i18n edit too.** `browser/progressive-profile.vue`'s
|
|
399
|
+
`translate()` map is keyed by the **English source string**, so a reworded default silently falls
|
|
400
|
+
back to English on pt/es sites — no error, no warning. Update the maps in the same change, and add
|
|
401
|
+
one key per count rather than interpolating the number: both translation layers here (the
|
|
402
|
+
app-level `i18n` function and `translate()`) are flat key lookups with no placeholder support.
|
|
403
|
+
Note the two strings translate by different paths — the title runs through `i18n()` *and*
|
|
404
|
+
`translate()`, while `callToAction` is rendered with `v-html` and so never reaches `translate()`.
|
|
405
|
+
|
|
385
406
|
### What happens server-side of the route
|
|
386
407
|
|
|
387
408
|
Everything, in one Mongo transaction: the re-diff that drops already-filled fields, the attribute
|
|
@@ -168,13 +168,16 @@ export default {
|
|
|
168
168
|
type: Boolean,
|
|
169
169
|
default: false,
|
|
170
170
|
},
|
|
171
|
+
// `progressive-profile-form.marko` always passes both of these, and derives the title from the
|
|
172
|
+
// number of questions actually being rendered. These defaults are the two-question wording,
|
|
173
|
+
// which only applies if the component is ever mounted directly.
|
|
171
174
|
title: {
|
|
172
175
|
type: String,
|
|
173
|
-
default: '
|
|
176
|
+
default: 'Two quick questions, then keep reading',
|
|
174
177
|
},
|
|
175
178
|
callToAction: {
|
|
176
179
|
type: String,
|
|
177
|
-
default: '
|
|
180
|
+
default: 'Knowing your role helps us cover the topics that matter to your work. We only ask once.',
|
|
178
181
|
},
|
|
179
182
|
buttonLabel: {
|
|
180
183
|
type: String,
|
|
@@ -359,6 +362,14 @@ export default {
|
|
|
359
362
|
const { lang } = this;
|
|
360
363
|
const i18n = {
|
|
361
364
|
pt: {
|
|
365
|
+
// One key per question count -- see `progressive-profile-form.marko` for why the count
|
|
366
|
+
// isn't interpolated.
|
|
367
|
+
'One quick question, then keep reading': 'Uma pergunta rápida e continue lendo',
|
|
368
|
+
'Two quick questions, then keep reading': 'Duas perguntas rápidas e continue lendo',
|
|
369
|
+
'A few quick questions, then keep reading': 'Algumas perguntas rápidas e continue lendo',
|
|
370
|
+
'Knowing your role helps us cover the topics that matter to your work. We only ask once.': 'Saber sua função nos ajuda a cobrir os temas que importam para o seu trabalho. Perguntamos apenas uma vez.',
|
|
371
|
+
// Retained: these were the defaults before the count-aware rewording, and a site may
|
|
372
|
+
// still be passing them explicitly as `title`/`callToAction`.
|
|
362
373
|
'Tell us a bit more about yourself': 'Conte-nos um pouco mais sobre você',
|
|
363
374
|
'Please answer the questions below to continue reading.': 'Responda às perguntas abaixo para continuar lendo.',
|
|
364
375
|
'Continue Reading': 'Continuar lendo',
|
|
@@ -369,6 +380,13 @@ export default {
|
|
|
369
380
|
Reload: 'Recarregar',
|
|
370
381
|
},
|
|
371
382
|
es: {
|
|
383
|
+
// Formal register (usted), matching the existing strings below.
|
|
384
|
+
'One quick question, then keep reading': 'Una pregunta rápida y continúe leyendo',
|
|
385
|
+
'Two quick questions, then keep reading': 'Dos preguntas rápidas y continúe leyendo',
|
|
386
|
+
'A few quick questions, then keep reading': 'Algunas preguntas rápidas y continúe leyendo',
|
|
387
|
+
'Knowing your role helps us cover the topics that matter to your work. We only ask once.': 'Conocer su función nos ayuda a cubrir los temas que importan para su trabajo. Solo se lo preguntamos una vez.',
|
|
388
|
+
// Retained: these were the defaults before the count-aware rewording, and a site may
|
|
389
|
+
// still be passing them explicitly as `title`/`callToAction`.
|
|
372
390
|
'Tell us a bit more about yourself': 'Cuéntenos un poco más sobre usted',
|
|
373
391
|
'Please answer the questions below to continue reading.': 'Responda las siguientes preguntas para continuar leyendo.',
|
|
374
392
|
'Continue Reading': 'Continuar leyendo',
|
|
@@ -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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/access.marko",
|
|
6
6
|
marko_component = require("./access.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -53,7 +53,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
53
53
|
}, marko_component);
|
|
54
54
|
|
|
55
55
|
marko_template.meta = {
|
|
56
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
56
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/comment-stream.marko",
|
|
6
6
|
marko_component = require("./comment-stream.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -91,7 +91,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
91
91
|
}, marko_component);
|
|
92
92
|
|
|
93
93
|
marko_template.meta = {
|
|
94
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
94
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/comment-stream.marko",
|
|
95
95
|
component: "./comment-stream.marko",
|
|
96
96
|
tags: [
|
|
97
97
|
"@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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/context.marko",
|
|
6
6
|
marko_component = require("./context.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
@@ -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.85.
|
|
52
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/context.marko",
|
|
53
53
|
component: "./context.marko",
|
|
54
54
|
tags: [
|
|
55
55
|
"@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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/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"),
|
|
@@ -179,7 +179,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
179
179
|
}, marko_component);
|
|
180
180
|
|
|
181
181
|
marko_template.meta = {
|
|
182
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
182
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/form-access.marko",
|
|
183
183
|
component: "./form-access.marko",
|
|
184
184
|
tags: [
|
|
185
185
|
"@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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/form-authenticate.marko",
|
|
6
6
|
marko_component = require("./form-authenticate.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -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.85.
|
|
84
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/form-authenticate.marko",
|
|
85
85
|
component: "./form-authenticate.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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/form-change-email.marko",
|
|
6
6
|
marko_component = require("./form-change-email.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -59,7 +59,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
59
59
|
}, marko_component);
|
|
60
60
|
|
|
61
61
|
marko_template.meta = {
|
|
62
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
62
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/form-change-email.marko",
|
|
63
63
|
component: "./form-change-email.marko",
|
|
64
64
|
tags: [
|
|
65
65
|
"@mindful-web/marko-web/components/browser-component.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/form-login.marko",
|
|
6
6
|
marko_component = require("./form-login.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -92,7 +92,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
92
92
|
}, marko_component);
|
|
93
93
|
|
|
94
94
|
marko_template.meta = {
|
|
95
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
95
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/form-login.marko",
|
|
96
96
|
component: "./form-login.marko",
|
|
97
97
|
tags: [
|
|
98
98
|
"@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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/form-logout.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
8
8
|
defaultValue = module_defaultValue.default || module_defaultValue,
|
|
@@ -29,7 +29,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
marko_template.meta = {
|
|
32
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
32
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/form-logout.marko",
|
|
33
33
|
tags: [
|
|
34
34
|
"@mindful-web/marko-web/components/browser-component.marko"
|
|
35
35
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/form-profile.marko",
|
|
6
6
|
marko_component = require("./form-profile.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -84,7 +84,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
84
84
|
}, marko_component);
|
|
85
85
|
|
|
86
86
|
marko_template.meta = {
|
|
87
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
87
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/form-profile.marko",
|
|
88
88
|
component: "./form-profile.marko",
|
|
89
89
|
tags: [
|
|
90
90
|
"@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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/form-register.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_assign = require("marko/dist/runtime/helpers/assign"),
|
|
8
8
|
marko_web_identity_x_form_login_template = require("./form-login.marko"),
|
|
@@ -25,7 +25,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
marko_template.meta = {
|
|
28
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
28
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/form-register.marko",
|
|
29
29
|
tags: [
|
|
30
30
|
"./form-login.marko"
|
|
31
31
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/google-init.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_attr = require("marko/dist/runtime/html/helpers/attr"),
|
|
8
8
|
marko_str = require("marko/dist/runtime/helpers/to-string");
|
|
@@ -239,5 +239,5 @@ marko_template._ = marko_renderer(render, {
|
|
|
239
239
|
});
|
|
240
240
|
|
|
241
241
|
marko_template.meta = {
|
|
242
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
242
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/google-init.marko"
|
|
243
243
|
};
|
|
@@ -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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/google-sign-in-button.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
|
|
8
8
|
marko_escapeXml = helpers_escape_xml.x,
|
|
@@ -40,5 +40,5 @@ marko_template._ = marko_renderer(render, {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
marko_template.meta = {
|
|
43
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
43
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/google-sign-in-button.marko"
|
|
44
44
|
};
|
|
@@ -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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/identify.marko",
|
|
6
6
|
marko_component = require("./identify.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
@@ -50,7 +50,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
50
50
|
}, marko_component);
|
|
51
51
|
|
|
52
52
|
marko_template.meta = {
|
|
53
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
53
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/non-auth-identify.marko",
|
|
6
6
|
marko_component = require("./non-auth-identify.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
|
|
@@ -45,7 +45,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
45
45
|
}, marko_component);
|
|
46
46
|
|
|
47
47
|
marko_template.meta = {
|
|
48
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
48
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/non-auth-identify.marko",
|
|
49
49
|
component: "./non-auth-identify.marko",
|
|
50
50
|
tags: [
|
|
51
51
|
"@mindful-web/marko-core/components/resolve.marko"
|
|
@@ -35,8 +35,29 @@ $ const contentId = content && content.id;
|
|
|
35
35
|
contentGateType: "progressive-profile",
|
|
36
36
|
...(profileState.promoCode ? { promoCode: profileState.promoCode } : {}),
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
<!--
|
|
39
|
+
The default title names how many questions are about to be asked, which is the single biggest
|
|
40
|
+
lever on completion: most abandonment on a gate like this is fear of a long form.
|
|
41
|
+
|
|
42
|
+
Read from `state.missingCount` (the middleware already flattens it), so it is the number
|
|
43
|
+
actually being rendered rather than the number configured -- a site asking two questions shows
|
|
44
|
+
the one-question title to a reader who has already answered half of them. The `missingRows`
|
|
45
|
+
fallback covers a caller that builds the state by hand rather than via the theme middleware.
|
|
46
|
+
|
|
47
|
+
Each count is its own string rather than an interpolated number because both translation
|
|
48
|
+
layers here (the app-level `i18n` function and the Vue component's own `translate` map) are
|
|
49
|
+
flat key lookups with no placeholder support. Three variants covers it: a real form is one or
|
|
50
|
+
two questions, and anything longer reads better as "a few" than as a number.
|
|
51
|
+
-->
|
|
52
|
+
$ const questionCount = profileState.missingCount || fieldRows.reduce((total, row) => total + row.length, 0);
|
|
53
|
+
$ const defaultTitlesByCount = {
|
|
54
|
+
1: "One quick question, then keep reading",
|
|
55
|
+
2: "Two quick questions, then keep reading",
|
|
56
|
+
};
|
|
57
|
+
$ const defaultTitle = defaultTitlesByCount[questionCount] || "A few quick questions, then keep reading";
|
|
58
|
+
|
|
59
|
+
$ const title = defaultValue(input.title, i18n(defaultTitle));
|
|
60
|
+
$ const callToAction = defaultValue(input.callToAction, i18n("Knowing your role helps us cover the topics that matter to your work. We only ask once."));
|
|
40
61
|
$ const buttonLabel = defaultValue(input.buttonLabel, i18n("Continue Reading"));
|
|
41
62
|
$ const dismissLabel = defaultValue(input.dismissLabel, i18n("Not right now"));
|
|
42
63
|
$ const lang = site.config.lang || "en";
|
|
@@ -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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/components/progressive-profile-form.marko",
|
|
6
6
|
marko_component = require("./progressive-profile-form.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
|
|
@@ -45,9 +45,18 @@ function render(input, out, __component, component, state) {
|
|
|
45
45
|
...(profileState.promoCode ? { promoCode: profileState.promoCode } : {}),
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
const
|
|
48
|
+
const questionCount = profileState.missingCount || fieldRows.reduce((total, row) => total + row.length, 0);
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const defaultTitlesByCount = {
|
|
51
|
+
1: "One quick question, then keep reading",
|
|
52
|
+
2: "Two quick questions, then keep reading",
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const defaultTitle = defaultTitlesByCount[questionCount] || "A few quick questions, then keep reading";
|
|
56
|
+
|
|
57
|
+
const title = defaultValue(input.title, i18n(defaultTitle));
|
|
58
|
+
|
|
59
|
+
const callToAction = defaultValue(input.callToAction, i18n("Knowing your role helps us cover the topics that matter to your work. We only ask once."));
|
|
51
60
|
|
|
52
61
|
const buttonLabel = defaultValue(input.buttonLabel, i18n("Continue Reading"));
|
|
53
62
|
|
|
@@ -128,7 +137,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
128
137
|
}, marko_component);
|
|
129
138
|
|
|
130
139
|
marko_template.meta = {
|
|
131
|
-
id: "/@mindful-web/marko-web-identity-x$1.85.
|
|
140
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/components/progressive-profile-form.marko",
|
|
132
141
|
component: "./progressive-profile-form.marko",
|
|
133
142
|
tags: [
|
|
134
143
|
"@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.85.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-identity-x$1.85.3/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.85.
|
|
76
|
+
id: "/@mindful-web/marko-web-identity-x$1.85.3/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.85.
|
|
3
|
+
"version": "1.85.3",
|
|
4
4
|
"description": "Marko Wrapper for IdentityX",
|
|
5
5
|
"repository": "https://github.com/parameter1/mindful-web/tree/main/packages/marko-web-identity-x",
|
|
6
6
|
"author": "Josh Worden <josh@parameter1.com>",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "34418dcc1061957e9782f403c17093281f08c07d"
|
|
43
43
|
}
|