asma-core-helpers 0.42.1 → 0.43.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/lib/overlayBack.d.ts +7 -0
- package/lib/overlayBack.d.ts.map +1 -1
- package/lib/overlayBack.js +76 -10
- package/lib/overlayBack.js.map +1 -1
- package/lib/validation/index.d.ts +1 -1
- package/lib/validation/index.d.ts.map +1 -1
- package/lib/validation/index.js +1 -1
- package/lib/validation/index.js.map +1 -1
- package/lib/validation/messages.d.ts +136 -24
- package/lib/validation/messages.d.ts.map +1 -1
- package/lib/validation/messages.js +140 -23
- package/lib/validation/messages.js.map +1 -1
- package/package.json +2 -2
- package/src/helpers/createTadaBrowserClient.test.ts +82 -0
- package/src/overlayBack.test.ts +107 -1
- package/src/overlayBack.ts +87 -9
- package/src/validation/index.ts +3 -0
- package/src/validation/messages.test.ts +60 -4
- package/src/validation/messages.ts +202 -25
|
@@ -1,39 +1,156 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Default NB/EN validation catalog for ASMA forms (ASMA-7729).
|
|
2
|
+
* Default NB/EN validation catalog for ASMA forms (ASMA-7729, ASMA-8073).
|
|
3
|
+
* EN copy follows Figma "Admin panel → Error messages" (node 11381:172081).
|
|
4
|
+
* Placeholders use `{name}` and are filled by `formatValidationMessage`.
|
|
3
5
|
* Apps override via shallow merge — translations stay in app i18n.
|
|
4
6
|
*/
|
|
5
7
|
export const validationMessages = {
|
|
6
8
|
nb: {
|
|
7
|
-
required: '
|
|
8
|
-
invalid_email: '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
required: 'Obligatorisk',
|
|
10
|
+
invalid_email: 'Skriv inn en gyldig e-postadresse med domene.',
|
|
11
|
+
email_missing_at: 'Skriv inn en e-postadresse med @.',
|
|
12
|
+
invalid_name: 'Bruk bokstaver, mellomrom, bindestrek eller apostrof.',
|
|
13
|
+
invalid_phone: 'Skriv inn et gyldig telefonnummer, for eksempel +47 12 34 56 78.',
|
|
14
|
+
invalid_personal_number: 'Skriv inn et gyldig personnummer.',
|
|
15
|
+
personal_number_length: 'Skriv inn 11 sifre.',
|
|
16
|
+
personal_number_no_spaces: 'Skriv inn 11 sifre uten mellomrom.',
|
|
17
|
+
personal_number_birth_date: 'Skriv inn et gyldig personnummer.',
|
|
18
|
+
personal_number_enter: 'Skriv inn personnummeret ditt.',
|
|
19
|
+
duplicate_email: 'Skriv inn en annen e-postadresse.',
|
|
20
|
+
duplicate_journal_id: 'Skriv inn en annen journal-ID.',
|
|
21
|
+
duplicate_personal_number: 'Skriv inn et annet personnummer.',
|
|
22
|
+
duplicate_username: 'Skriv inn et annet brukernavn.',
|
|
23
|
+
duplicate_category: 'Skriv inn en annen kategori.',
|
|
24
|
+
min_length: 'Skriv inn minst {n} tegn.',
|
|
25
|
+
max_length: 'Skriv inn maks {n} tegn.',
|
|
26
|
+
length_between: 'Skriv inn mellom {min} og {max} tegn.',
|
|
27
|
+
digits_only: 'Skriv inn bare sifre.',
|
|
28
|
+
letters_numbers_only: 'Bruk bare bokstaver og tall.',
|
|
29
|
+
subdomain_chars: 'Bruk bare bokstaver, tall og bindestrek.',
|
|
30
|
+
invalid_subdomain: 'Skriv inn et gyldig underdomene.',
|
|
31
|
+
date_invalid_format: 'Skriv inn en gyldig dato i formatet DD.MM.ÅÅÅÅ.',
|
|
32
|
+
date_invalid_day: 'Skriv inn en gyldig dag.',
|
|
33
|
+
date_invalid_month: 'Skriv inn en gyldig måned.',
|
|
34
|
+
date_year_range: 'Skriv inn et år mellom {min} og {max}.',
|
|
35
|
+
date_invalid: 'Skriv inn en gyldig dato.',
|
|
36
|
+
date_after_start: 'Velg en dato på eller etter startdatoen.',
|
|
37
|
+
date_unavailable: 'Velg en annen dato.',
|
|
38
|
+
date_today_or_future: 'Velg dagens dato eller en senere dato.',
|
|
39
|
+
date_today_or_earlier: 'Velg dagens dato eller en tidligere dato.',
|
|
40
|
+
date_of_birth_invalid_format: 'Skriv inn en gyldig fødselsdato i formatet DD.MM.ÅÅÅÅ.',
|
|
41
|
+
date_of_birth_invalid: 'Skriv inn en gyldig fødselsdato.',
|
|
42
|
+
date_of_birth_not_future: 'Skriv inn en fødselsdato som er i dag eller tidligere.',
|
|
43
|
+
time_invalid_format: 'Skriv inn et gyldig klokkeslett i formatet TT:mm.',
|
|
44
|
+
time_after_start: 'Velg et klokkeslett på eller etter starttidspunktet.',
|
|
45
|
+
hour_invalid: 'Skriv inn en gyldig time.',
|
|
46
|
+
hour_range: 'Skriv inn en time mellom {min} og {max}.',
|
|
47
|
+
minutes_quarter: 'Skriv inn 0, 15, 30 eller 45 minutter.',
|
|
48
|
+
time_greater_than_zero: 'Skriv inn en tid som er større enn 0.',
|
|
49
|
+
select_at_least_one_recipient: 'Velg minst én mottaker.',
|
|
50
|
+
category_from_list: 'Velg en kategori fra listen.',
|
|
51
|
+
customer_required: 'Velg en kunde.',
|
|
52
|
+
patient_invalid: 'Velg en gyldig pasient.',
|
|
53
|
+
file_required: 'Velg en fil å laste opp.',
|
|
54
|
+
file_download_required: 'Velg en fil å laste ned.',
|
|
55
|
+
file_count_max: 'Velg opptil {n} filer.',
|
|
56
|
+
file_single: 'Velg én fil.',
|
|
57
|
+
file_empty: 'Denne filen er tom. Velg en annen fil.',
|
|
58
|
+
file_type: 'Velg en støttet filtype.',
|
|
59
|
+
file_media_type: 'Velg en støttet bilde- eller videofil.',
|
|
60
|
+
file_size_max: 'Velg en fil som ikke er større enn {size}.',
|
|
61
|
+
code_invalid: 'Skriv inn en gyldig kode.',
|
|
62
|
+
code_request_new: 'Be om en ny kode.',
|
|
63
|
+
code_wait: 'Vent {n} minutter før du ber om en ny kode.',
|
|
64
|
+
phone_not_linked: 'Skriv inn et telefonnummer som er knyttet til en konto.',
|
|
65
|
+
no_portal_access: 'Kontakt administratoren din for å få tilgang til denne portalen.',
|
|
66
|
+
sign_in_method_unavailable: 'Denne innloggingsmetoden er ikke tilgjengelig for organisasjonen din.',
|
|
67
|
+
credentials_invalid: 'Skriv inn riktig e-postadresse og passord.',
|
|
68
|
+
invitation_code_invalid: 'Skriv inn en gyldig invitasjonskode på 25 tegn.',
|
|
69
|
+
refresh_and_try_again: 'Last inn siden på nytt og prøv igjen.',
|
|
70
|
+
check_and_try_again: 'Sjekk svaret ditt og prøv igjen.',
|
|
71
|
+
reduce_data_and_try_again: 'Reduser mengden data og prøv igjen.',
|
|
72
|
+
try_again: 'Prøv igjen.',
|
|
18
73
|
},
|
|
19
74
|
en: {
|
|
20
|
-
required: '
|
|
21
|
-
invalid_email: '
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
75
|
+
required: 'Required',
|
|
76
|
+
invalid_email: 'Enter a valid email address with a domain.',
|
|
77
|
+
email_missing_at: 'Enter an email address with an @.',
|
|
78
|
+
invalid_name: 'Use letters, spaces, hyphens, or apostrophes.',
|
|
79
|
+
invalid_phone: 'Enter a valid phone number, like +47 12 34 56 78.',
|
|
80
|
+
invalid_personal_number: 'Enter a valid personal number.',
|
|
81
|
+
personal_number_length: 'Enter 11 digits.',
|
|
82
|
+
personal_number_no_spaces: 'Enter 11 digits without spaces.',
|
|
83
|
+
personal_number_birth_date: 'Enter a valid personal number.',
|
|
84
|
+
personal_number_enter: 'Enter your personal number.',
|
|
85
|
+
duplicate_email: 'Enter a different email address.',
|
|
86
|
+
duplicate_journal_id: 'Enter a different journal ID.',
|
|
87
|
+
duplicate_personal_number: 'Enter a different personal number.',
|
|
88
|
+
duplicate_username: 'Enter a different username.',
|
|
89
|
+
duplicate_category: 'Enter a different category.',
|
|
90
|
+
min_length: 'Enter at least {n} characters.',
|
|
91
|
+
max_length: 'Enter no more than {n} characters.',
|
|
92
|
+
length_between: 'Enter between {min} and {max} characters.',
|
|
93
|
+
digits_only: 'Enter digits only.',
|
|
94
|
+
letters_numbers_only: 'Use letters and numbers only.',
|
|
95
|
+
subdomain_chars: 'Use letters, numbers, and hyphens only.',
|
|
96
|
+
invalid_subdomain: 'Enter a valid subdomain.',
|
|
97
|
+
date_invalid_format: 'Enter a valid date in DD.MM.YYYY format.',
|
|
98
|
+
date_invalid_day: 'Enter a valid day.',
|
|
99
|
+
date_invalid_month: 'Enter a valid month.',
|
|
100
|
+
date_year_range: 'Enter a year between {min} and {max}.',
|
|
101
|
+
date_invalid: 'Enter a valid date.',
|
|
102
|
+
date_after_start: 'Select a date on or after the start date.',
|
|
103
|
+
date_unavailable: 'Select another date.',
|
|
104
|
+
date_today_or_future: 'Select today or a future date.',
|
|
105
|
+
date_today_or_earlier: 'Select today or an earlier date.',
|
|
106
|
+
date_of_birth_invalid_format: 'Enter a valid date of birth in DD.MM.YYYY format.',
|
|
107
|
+
date_of_birth_invalid: 'Enter a real date of birth.',
|
|
108
|
+
date_of_birth_not_future: "Enter a date of birth that's today or earlier.",
|
|
109
|
+
time_invalid_format: 'Enter a valid time in HH:mm format.',
|
|
110
|
+
time_after_start: 'Select a time at or after the start time.',
|
|
111
|
+
hour_invalid: 'Enter a valid hour.',
|
|
112
|
+
hour_range: 'Enter an hour between {min} and {max}.',
|
|
113
|
+
minutes_quarter: 'Enter 0, 15, 30, or 45 minutes.',
|
|
114
|
+
time_greater_than_zero: 'Enter a time greater than 0.',
|
|
115
|
+
select_at_least_one_recipient: 'Select at least one recipient.',
|
|
116
|
+
category_from_list: 'Select a category from the list.',
|
|
117
|
+
customer_required: 'Select a customer.',
|
|
118
|
+
patient_invalid: 'Select a valid patient.',
|
|
119
|
+
file_required: 'Select a file to upload.',
|
|
120
|
+
file_download_required: 'Select a file to download.',
|
|
121
|
+
file_count_max: 'Select up to {n} files.',
|
|
122
|
+
file_single: 'Select one file.',
|
|
123
|
+
file_empty: 'This file is empty. Select another file.',
|
|
124
|
+
file_type: 'Select a supported file type.',
|
|
125
|
+
file_media_type: 'Select a supported image or video file.',
|
|
126
|
+
file_size_max: 'Select a file no larger than {size}.',
|
|
127
|
+
code_invalid: 'Enter a valid code.',
|
|
128
|
+
code_request_new: 'Request a new code.',
|
|
129
|
+
code_wait: 'Wait {n} minutes before requesting a new code.',
|
|
130
|
+
phone_not_linked: 'Enter a phone number linked to an account.',
|
|
131
|
+
no_portal_access: 'Contact your administrator for access to this portal.',
|
|
132
|
+
sign_in_method_unavailable: "This sign-in method isn't available for your organization.",
|
|
133
|
+
credentials_invalid: 'Enter the correct email and password.',
|
|
134
|
+
invitation_code_invalid: 'Enter a valid 25-character invitation code.',
|
|
135
|
+
refresh_and_try_again: 'Refresh the page and try again.',
|
|
136
|
+
check_and_try_again: 'Check your answer and try again.',
|
|
137
|
+
reduce_data_and_try_again: 'Reduce the amount of data and try again.',
|
|
138
|
+
try_again: 'Try again.',
|
|
31
139
|
},
|
|
32
140
|
};
|
|
33
141
|
/** Shallow-merge overrides over the locale catalog (per-app i18n). */
|
|
34
142
|
export function getValidationMessages(locale, overrides) {
|
|
35
143
|
return { ...validationMessages[locale], ...overrides };
|
|
36
144
|
}
|
|
145
|
+
/** Fills `{name}` placeholders; unknown placeholders stay visible so a missing param is caught in review. */
|
|
146
|
+
export function formatValidationMessage(template, params) {
|
|
147
|
+
if (!params)
|
|
148
|
+
return template;
|
|
149
|
+
return template.replace(/\{(\w+)\}/g, (match, key) => (key in params ? String(params[key]) : match));
|
|
150
|
+
}
|
|
151
|
+
export function getValidationMessage(locale, key, params) {
|
|
152
|
+
return formatValidationMessage(validationMessages[locale][key], params);
|
|
153
|
+
}
|
|
37
154
|
/**
|
|
38
155
|
* REQ-003: actionable "what's wrong — how to fix" composition.
|
|
39
156
|
* e.g. errorWithHint('Invalid email', 'name@carasent.com') → 'Invalid email — name@carasent.com'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/validation/messages.ts"],"names":[],"mappings":"AA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,iCAAiC;QACxD,mBAAmB,EAAE,kCAAkC;QACvD,yBAAyB,EAAE,0CAA0C;QACrE,SAAS,EAAE,YAAY;KAC1B;CAC4D,CAAA;AAEjE,sEAAsE;AACtE,MAAM,UAAU,qBAAqB,CACjC,MAAwB,EACxB,SAAuC;IAEvC,OAAO,EAAE,GAAG,kBAAkB,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,EAAE,CAAA;AAC1D,CAAC;AAID,6GAA6G;AAC7G,MAAM,UAAU,uBAAuB,CAAC,QAAgB,EAAE,MAAgC;IACtF,IAAI,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAA;IAC5B,OAAO,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA;AAChH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAChC,MAAwB,EACxB,GAAyB,EACzB,MAAgC;IAEhC,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAA;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,IAAY;IACrD,OAAO,GAAG,KAAK,MAAM,IAAI,EAAE,CAAA;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asma-core-helpers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Core helper utilities for ASMA applications",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib/**/*",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@openreplay/tracker": "^16.4.10",
|
|
54
54
|
"asma-qiankun-react-loader": "^0.8.2",
|
|
55
|
-
"asma-types": "^2.
|
|
55
|
+
"asma-types": "^2.16.0",
|
|
56
56
|
"history": "^5.3.0",
|
|
57
57
|
"jsdom": "^27.0.0",
|
|
58
58
|
"lefthook": "^2.1.1",
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import assert from 'node:assert/strict'
|
|
2
|
+
import { test } from 'node:test'
|
|
3
|
+
|
|
4
|
+
import { parse } from '@0no-co/graphql.web'
|
|
5
|
+
|
|
6
|
+
import { createTadaBrowserClient } from './createTadaBrowserClient.js'
|
|
7
|
+
|
|
8
|
+
const createClient = async (fetchImpl: typeof fetch) => {
|
|
9
|
+
let fetchCalls = 0
|
|
10
|
+
let getJwtCalls = 0
|
|
11
|
+
|
|
12
|
+
const { getClient } = createTadaBrowserClient({
|
|
13
|
+
url: 'https://tada.example/v1/graphql',
|
|
14
|
+
getJwt: async () => {
|
|
15
|
+
getJwtCalls += 1
|
|
16
|
+
return 'jwt'
|
|
17
|
+
},
|
|
18
|
+
getJwtToken: () => 'jwt',
|
|
19
|
+
isJwtValid: () => true,
|
|
20
|
+
clientOptions: {
|
|
21
|
+
fetch: async (input, init) => {
|
|
22
|
+
fetchCalls += 1
|
|
23
|
+
return fetchImpl(input, init)
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
client: await getClient(),
|
|
30
|
+
calls: {
|
|
31
|
+
fetch: () => fetchCalls,
|
|
32
|
+
getJwt: () => getJwtCalls,
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
test(
|
|
38
|
+
'surfaces a response-less network error instead of throwing in didAuthError',
|
|
39
|
+
{ timeout: 2000 },
|
|
40
|
+
async () => {
|
|
41
|
+
const { client, calls } = await createClient(async () => {
|
|
42
|
+
throw new TypeError('Failed to fetch')
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const result = await client
|
|
46
|
+
.mutation(parse('mutation BrowserClientNetworkErrorTest { __typename }'), {})
|
|
47
|
+
.toPromise()
|
|
48
|
+
|
|
49
|
+
assert.equal(result.error?.networkError?.message, 'Failed to fetch')
|
|
50
|
+
assert.equal(result.error?.response, undefined)
|
|
51
|
+
assert.equal(calls.fetch(), 1)
|
|
52
|
+
assert.equal(calls.getJwt(), 1)
|
|
53
|
+
},
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
test('refreshes the JWT and retries once after a 401 response', async () => {
|
|
57
|
+
const { client, calls } = await createClient(async () =>
|
|
58
|
+
Response.json({ errors: [{ message: 'unauthorized' }] }, { status: 401 }),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
const result = await client
|
|
62
|
+
.mutation(parse('mutation BrowserClientUnauthorizedTest { __typename }'), {})
|
|
63
|
+
.toPromise()
|
|
64
|
+
|
|
65
|
+
assert.equal(result.error?.response?.status, 401)
|
|
66
|
+
assert.equal(calls.fetch(), 2)
|
|
67
|
+
assert.equal(calls.getJwt(), 2)
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
test('does not refresh the JWT for a GraphQL error with a response', async () => {
|
|
71
|
+
const { client, calls } = await createClient(async () =>
|
|
72
|
+
Response.json({ data: null, errors: [{ message: 'x' }] }),
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const result = await client
|
|
76
|
+
.mutation(parse('mutation BrowserClientGraphQLErrorTest { __typename }'), {})
|
|
77
|
+
.toPromise()
|
|
78
|
+
|
|
79
|
+
assert.equal(result.error?.graphQLErrors.length, 1)
|
|
80
|
+
assert.equal(calls.fetch(), 1)
|
|
81
|
+
assert.equal(calls.getJwt(), 1)
|
|
82
|
+
})
|
package/src/overlayBack.test.ts
CHANGED
|
@@ -2,7 +2,7 @@ import assert from 'node:assert/strict'
|
|
|
2
2
|
import { describe, it } from 'node:test'
|
|
3
3
|
|
|
4
4
|
import { createBrowserHistory } from 'history'
|
|
5
|
-
import type { History } from 'history'
|
|
5
|
+
import type { History, Transition } from 'history'
|
|
6
6
|
import { JSDOM } from 'jsdom'
|
|
7
7
|
|
|
8
8
|
import {
|
|
@@ -658,6 +658,112 @@ describe('overlayBack adapter', () => {
|
|
|
658
658
|
assert.equal(closeCalls, 1)
|
|
659
659
|
assert.equal(adapter.pendingNavigation, false)
|
|
660
660
|
})
|
|
661
|
+
|
|
662
|
+
/** The unsaved-changes prompt shape: history@5 blocks a push, the dialog opens (registers), and
|
|
663
|
+
* "discard" replays the transition through `tx.retry` — history@5's real push, which the
|
|
664
|
+
* wrapper never sees. Returns the armed adapter sitting on the entry pushed past the guard. */
|
|
665
|
+
function pushPastGuardThroughBlockerRetry() {
|
|
666
|
+
const fixture = setUp('https://example.test/home')
|
|
667
|
+
const { adapter, history } = fixture
|
|
668
|
+
history.push('/list')
|
|
669
|
+
adapter.enabled = true
|
|
670
|
+
|
|
671
|
+
let blockedTx: Transition | null = null
|
|
672
|
+
const unblock = history.block((tx) => {
|
|
673
|
+
blockedTx = tx
|
|
674
|
+
})
|
|
675
|
+
history.push('/checkout')
|
|
676
|
+
assert.equal(history.location.pathname, '/list')
|
|
677
|
+
assert.ok(blockedTx)
|
|
678
|
+
|
|
679
|
+
const unregister: () => void = adapter.register(() => {})
|
|
680
|
+
const internal = __inspectOverlayBackForTests__(fixture.win)!
|
|
681
|
+
assert.ok(internal.guard)
|
|
682
|
+
const guardMarker = internal.guard!.marker
|
|
683
|
+
|
|
684
|
+
unblock()
|
|
685
|
+
blockedTx!.retry()
|
|
686
|
+
assert.equal(history.location.pathname, '/checkout')
|
|
687
|
+
assert.equal((fixture.win.history.state as Record<string, unknown>).__asmaOverlayBack, undefined)
|
|
688
|
+
|
|
689
|
+
return { ...fixture, internal, unregister, guardMarker }
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
it('ASMA-8894: a blocker retry pushed past the guard retires it on close instead of popping the new entry', async () => {
|
|
693
|
+
const { win, adapter, history, internal, unregister, guardMarker } = pushPastGuardThroughBlockerRetry()
|
|
694
|
+
|
|
695
|
+
let popstates = 0
|
|
696
|
+
win.addEventListener('popstate', () => {
|
|
697
|
+
popstates += 1
|
|
698
|
+
})
|
|
699
|
+
unregister()
|
|
700
|
+
await new Promise((resolve) => setTimeout(resolve, 20))
|
|
701
|
+
|
|
702
|
+
assert.equal(popstates, 0)
|
|
703
|
+
assert.equal(history.location.pathname, '/checkout')
|
|
704
|
+
assert.equal(win.location.pathname, '/checkout')
|
|
705
|
+
assert.equal(internal.guard, null)
|
|
706
|
+
assert.deepEqual(internal.retiredMarker, guardMarker)
|
|
707
|
+
assert.equal(adapter.pendingNavigation, false)
|
|
708
|
+
|
|
709
|
+
// Back from the new entry crosses the abandoned guard in one press and history@5 follows.
|
|
710
|
+
history.back()
|
|
711
|
+
await waitUntil(() => win.location.pathname === '/list' && !internal.retiredBouncePending)
|
|
712
|
+
assert.equal(history.location.pathname, '/list')
|
|
713
|
+
assert.equal((win.history.state as Record<string, unknown>).__asmaOverlayBack, undefined)
|
|
714
|
+
|
|
715
|
+
history.back()
|
|
716
|
+
await waitUntil(() => history.location.pathname === '/home')
|
|
717
|
+
assert.equal(win.location.pathname, '/home')
|
|
718
|
+
})
|
|
719
|
+
|
|
720
|
+
it('ASMA-8894: a same-path replace on the entry pushed past the guard neither re-merges the marker nor defers', async () => {
|
|
721
|
+
const { win, history, internal, unregister } = pushPastGuardThroughBlockerRetry()
|
|
722
|
+
|
|
723
|
+
history.replace('/checkout?x=1')
|
|
724
|
+
|
|
725
|
+
assert.equal(win.location.search, '?x=1')
|
|
726
|
+
assert.equal((win.history.state as Record<string, unknown>).__asmaOverlayBack, undefined)
|
|
727
|
+
assert.equal(internal.guard, null)
|
|
728
|
+
|
|
729
|
+
let popstates = 0
|
|
730
|
+
win.addEventListener('popstate', () => {
|
|
731
|
+
popstates += 1
|
|
732
|
+
})
|
|
733
|
+
unregister()
|
|
734
|
+
await new Promise((resolve) => setTimeout(resolve, 20))
|
|
735
|
+
assert.equal(popstates, 0)
|
|
736
|
+
assert.equal(history.location.pathname, '/checkout')
|
|
737
|
+
})
|
|
738
|
+
|
|
739
|
+
it('a blocker retry that replaces the guard entry in place still drains onto the base', async () => {
|
|
740
|
+
const { win, adapter, history } = setUp('https://example.test/home')
|
|
741
|
+
history.push('/list')
|
|
742
|
+
adapter.enabled = true
|
|
743
|
+
|
|
744
|
+
let blockedTx: Transition | null = null
|
|
745
|
+
const unblock = history.block((tx) => {
|
|
746
|
+
blockedTx = tx
|
|
747
|
+
})
|
|
748
|
+
history.replace('/checkout')
|
|
749
|
+
assert.equal(history.location.pathname, '/list')
|
|
750
|
+
|
|
751
|
+
const unregister = adapter.register(() => {})
|
|
752
|
+
const internal = __inspectOverlayBackForTests__(win)!
|
|
753
|
+
assert.ok(internal.guard)
|
|
754
|
+
|
|
755
|
+
unblock()
|
|
756
|
+
blockedTx!.retry()
|
|
757
|
+
assert.equal(history.location.pathname, '/checkout')
|
|
758
|
+
|
|
759
|
+
unregister()
|
|
760
|
+
await waitUntil(() => internal.guard === null)
|
|
761
|
+
|
|
762
|
+
assert.equal(history.location.pathname, '/checkout')
|
|
763
|
+
assert.equal(win.location.pathname, '/checkout')
|
|
764
|
+
history.back()
|
|
765
|
+
await waitUntil(() => history.location.pathname === '/home')
|
|
766
|
+
})
|
|
661
767
|
})
|
|
662
768
|
|
|
663
769
|
describe('overlayBack arming gate', () => {
|
package/src/overlayBack.ts
CHANGED
|
@@ -36,6 +36,8 @@ type OverlayBackHistoryState = Record<string, unknown> & {
|
|
|
36
36
|
interface GuardState {
|
|
37
37
|
marker: OverlayBackMarker
|
|
38
38
|
baseKey: string | undefined
|
|
39
|
+
/** history@5 index cloned from the base entry on arm (CON-003); the guard entry shares it. */
|
|
40
|
+
baseIdx: number | undefined
|
|
39
41
|
requestClose: () => false | void | Promise<unknown>
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -65,6 +67,11 @@ export interface OverlayBackInternalState {
|
|
|
65
67
|
lastGestureAt: number
|
|
66
68
|
/** Timestamp (ms) of the last popstate, owned or foreign. */
|
|
67
69
|
lastPopstateAt: number
|
|
70
|
+
/** history@5 `idx` of the entry this adapter last saw the document on. Read on every popstate,
|
|
71
|
+
* wrapped push/replace and guard retirement; a raw `pushState` the wrapper never sees leaves
|
|
72
|
+
* it stale until the next hop. Tells a bounce off a retired guard whether Back arrived from an
|
|
73
|
+
* entry ahead of it (ASMA-8894) or Forward arrived from the base (REQ-006). */
|
|
74
|
+
lastSeenIdx: number | undefined
|
|
68
75
|
originalPush: History['push'] | null
|
|
69
76
|
originalReplace: History['replace'] | null
|
|
70
77
|
public: OverlayBackAdapter
|
|
@@ -137,6 +144,7 @@ function getOrCreateInternal(win: Window): OverlayBackInternalState {
|
|
|
137
144
|
historyWrapped: false,
|
|
138
145
|
lastGestureAt: Number.NEGATIVE_INFINITY,
|
|
139
146
|
lastPopstateAt: Number.NEGATIVE_INFINITY,
|
|
147
|
+
lastSeenIdx: undefined,
|
|
140
148
|
originalPush: null,
|
|
141
149
|
originalReplace: null,
|
|
142
150
|
public: publicApi,
|
|
@@ -249,7 +257,8 @@ function arm(win: Window, internal: OverlayBackInternalState, requestClose: () =
|
|
|
249
257
|
} catch {
|
|
250
258
|
return // WebKit's 100-push budget or similar: fail open, stay idle
|
|
251
259
|
}
|
|
252
|
-
internal.guard = { marker, baseKey: baseState?.key, requestClose }
|
|
260
|
+
internal.guard = { marker, baseKey: baseState?.key, baseIdx: baseState?.idx, requestClose }
|
|
261
|
+
internal.lastSeenIdx = baseState?.idx
|
|
253
262
|
internal.retiredMarker = null
|
|
254
263
|
internal.retiredBaseKey = undefined
|
|
255
264
|
internal.retiredBouncePending = false
|
|
@@ -287,18 +296,19 @@ function finishDrain(win: Window, internal: OverlayBackInternalState): void {
|
|
|
287
296
|
internal.pendingRearmRequestClose = null
|
|
288
297
|
|
|
289
298
|
if (pendingNav) {
|
|
290
|
-
queueMicrotask(() => runPendingNav(internal, pendingNav))
|
|
299
|
+
queueMicrotask(() => runPendingNav(win, internal, pendingNav))
|
|
291
300
|
} else if (pendingRearm) {
|
|
292
301
|
arm(win, internal, pendingRearm)
|
|
293
302
|
}
|
|
294
303
|
}
|
|
295
304
|
|
|
296
|
-
function runPendingNav(internal: OverlayBackInternalState, pending: PendingNav): void {
|
|
305
|
+
function runPendingNav(win: Window, internal: OverlayBackInternalState, pending: PendingNav): void {
|
|
297
306
|
if (pending.kind === 'PUSH') {
|
|
298
307
|
internal.originalPush?.(pending.to, pending.state)
|
|
299
308
|
} else {
|
|
300
309
|
internal.originalReplace?.(pending.to, pending.state)
|
|
301
310
|
}
|
|
311
|
+
internal.lastSeenIdx = readState(win)?.idx
|
|
302
312
|
}
|
|
303
313
|
|
|
304
314
|
function failOpenPendingNavigation(win: Window, internal: OverlayBackInternalState): void {
|
|
@@ -320,7 +330,7 @@ function failOpenPendingNavigation(win: Window, internal: OverlayBackInternalSta
|
|
|
320
330
|
internal.retiredBaseKey = internal.guard?.baseKey ?? internal.retiredBaseKey
|
|
321
331
|
internal.guard = null
|
|
322
332
|
internal.phase = null
|
|
323
|
-
queueMicrotask(() => runPendingNav(internal, pending))
|
|
333
|
+
queueMicrotask(() => runPendingNav(win, internal, pending))
|
|
324
334
|
}
|
|
325
335
|
|
|
326
336
|
function requestCloseForPendingNavigation(
|
|
@@ -362,11 +372,53 @@ function requestCloseForPendingNavigation(
|
|
|
362
372
|
}
|
|
363
373
|
}
|
|
364
374
|
|
|
375
|
+
/** True when the document is no longer on the guard entry. history@5's blocker `retry` closes over
|
|
376
|
+
* the real, unwrapped `push`, so an unsaved-changes prompt that replays the blocked push on
|
|
377
|
+
* "discard" lands past the guard while the prompt is still registered, and this wrapper never
|
|
378
|
+
* sees the hop (ASMA-8894). Only a push moves `idx`; a raw `replaceState` that wiped the marker
|
|
379
|
+
* keeps it and still counts as the guard (TEST-005). No `idx` at all: assume the guard. */
|
|
380
|
+
function guardEntryAbandoned(win: Window, guard: GuardState): boolean {
|
|
381
|
+
const state = readState(win)
|
|
382
|
+
if (markerMatches(readMarker(state), guard.marker)) {
|
|
383
|
+
return false
|
|
384
|
+
}
|
|
385
|
+
const idx = state?.idx
|
|
386
|
+
return typeof idx === 'number' && typeof guard.baseIdx === 'number' && idx !== guard.baseIdx
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/** Drop a guard whose entry is behind the current one without moving history — a `go(-1)` here
|
|
390
|
+
* would pop the entry the app just navigated to. The marker still sits on the abandoned entry, so
|
|
391
|
+
* it is retired for the bounce (REQ-006), and a route intent queued against the dead guard runs. */
|
|
392
|
+
function retireAbandonedGuard(win: Window, internal: OverlayBackInternalState): void {
|
|
393
|
+
const guard = internal.guard
|
|
394
|
+
if (!guard) {
|
|
395
|
+
return
|
|
396
|
+
}
|
|
397
|
+
internal.guard = null
|
|
398
|
+
internal.phase = null
|
|
399
|
+
internal.pendingDrainSnapshot = null
|
|
400
|
+
internal.pendingRearmRequestClose = null
|
|
401
|
+
internal.disablePending = false
|
|
402
|
+
internal.retiredMarker = guard.marker
|
|
403
|
+
internal.retiredBaseKey = guard.baseKey
|
|
404
|
+
internal.lastSeenIdx = readState(win)?.idx
|
|
405
|
+
|
|
406
|
+
const pendingNav = internal.pendingNav
|
|
407
|
+
internal.pendingNav = null
|
|
408
|
+
if (pendingNav) {
|
|
409
|
+
queueMicrotask(() => runPendingNav(win, internal, pendingNav))
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
365
413
|
function drain(win: Window, internal: OverlayBackInternalState): void {
|
|
366
414
|
const guard = internal.guard
|
|
367
415
|
if (!guard) {
|
|
368
416
|
return
|
|
369
417
|
}
|
|
418
|
+
if (guardEntryAbandoned(win, guard)) {
|
|
419
|
+
retireAbandonedGuard(win, internal)
|
|
420
|
+
return
|
|
421
|
+
}
|
|
370
422
|
const state = readState(win)
|
|
371
423
|
const { [OVERLAY_BACK_MARKER_KEY]: _marker, ...rest } = state ?? {}
|
|
372
424
|
internal.pendingDrainSnapshot = {
|
|
@@ -434,6 +486,8 @@ function handlePopstate(win: Window, internal: OverlayBackInternalState, event:
|
|
|
434
486
|
const state = readState(win)
|
|
435
487
|
const marker = readMarker(state)
|
|
436
488
|
const guard = internal.guard
|
|
489
|
+
const previousIdx = internal.lastSeenIdx
|
|
490
|
+
internal.lastSeenIdx = state?.idx
|
|
437
491
|
|
|
438
492
|
if (!guard) {
|
|
439
493
|
if (internal.retiredBouncePending) {
|
|
@@ -444,9 +498,16 @@ function handlePopstate(win: Window, internal: OverlayBackInternalState, event:
|
|
|
444
498
|
}
|
|
445
499
|
}
|
|
446
500
|
if (markerMatches(marker, internal.retiredMarker)) {
|
|
447
|
-
//
|
|
448
|
-
// never
|
|
449
|
-
|
|
501
|
+
// Landed on a retired guard marker: bounce back with go(-1). From the base this is a
|
|
502
|
+
// Forward with delta 0, never a real page, so history@5 must not hear it (REQ-006).
|
|
503
|
+
// From an entry pushed past the guard (ASMA-8894) it is a real Back: history@5 still
|
|
504
|
+
// holds that entry, so this hop has to reach it; the bounce onto the base then lands
|
|
505
|
+
// on the same key and index history@5 just read, and is suppressed as usual.
|
|
506
|
+
const cameFromAhead =
|
|
507
|
+
typeof previousIdx === 'number' && typeof state?.idx === 'number' && previousIdx > state.idx
|
|
508
|
+
if (!cameFromAhead) {
|
|
509
|
+
;(event as PopStateEvent).stopImmediatePropagation()
|
|
510
|
+
}
|
|
450
511
|
internal.retiredBouncePending = true
|
|
451
512
|
try {
|
|
452
513
|
win.history.go(-1)
|
|
@@ -544,6 +605,7 @@ export function installOverlayBackPopstateListener(win: Window): OverlayBackAdap
|
|
|
544
605
|
internal.listenerInstalled = true
|
|
545
606
|
|
|
546
607
|
stripStaleMarker(win)
|
|
608
|
+
internal.lastSeenIdx = readState(win)?.idx
|
|
547
609
|
|
|
548
610
|
const recordTrustedGesture = (event: Event) => {
|
|
549
611
|
if (event.isTrusted) {
|
|
@@ -595,10 +657,20 @@ export function finishOverlayBackInstall(win: Window, history: History): void {
|
|
|
595
657
|
internal.originalPush = originalPush
|
|
596
658
|
internal.originalReplace = originalReplace
|
|
597
659
|
|
|
660
|
+
const navigateUnguarded = (navigate: () => void): void => {
|
|
661
|
+
navigate()
|
|
662
|
+
internal.lastSeenIdx = readState(win)?.idx
|
|
663
|
+
}
|
|
664
|
+
|
|
598
665
|
history.push = (to: To, state?: unknown) => {
|
|
599
666
|
const guard = internal.guard
|
|
600
667
|
if (!guard || internal.phase === 'draining') {
|
|
601
|
-
originalPush(to, state)
|
|
668
|
+
navigateUnguarded(() => originalPush(to, state))
|
|
669
|
+
return
|
|
670
|
+
}
|
|
671
|
+
if (internal.phase === null && !internal.pendingNav && guardEntryAbandoned(win, guard)) {
|
|
672
|
+
retireAbandonedGuard(win, internal)
|
|
673
|
+
navigateUnguarded(() => originalPush(to, state))
|
|
602
674
|
return
|
|
603
675
|
}
|
|
604
676
|
if (internal.pendingNav) {
|
|
@@ -612,7 +684,13 @@ export function finishOverlayBackInstall(win: Window, history: History): void {
|
|
|
612
684
|
history.replace = (to: To, state?: unknown) => {
|
|
613
685
|
const guard = internal.guard
|
|
614
686
|
if (!guard || internal.phase === 'draining') {
|
|
615
|
-
originalReplace(to, state)
|
|
687
|
+
navigateUnguarded(() => originalReplace(to, state))
|
|
688
|
+
return
|
|
689
|
+
}
|
|
690
|
+
if (internal.phase === null && !internal.pendingNav && guardEntryAbandoned(win, guard)) {
|
|
691
|
+
// The entry being replaced is not the guard, so the marker must not be re-merged onto it.
|
|
692
|
+
retireAbandonedGuard(win, internal)
|
|
693
|
+
navigateUnguarded(() => originalReplace(to, state))
|
|
616
694
|
return
|
|
617
695
|
}
|
|
618
696
|
if (internal.phase === null && pathOf(to, history.location.pathname) === history.location.pathname) {
|
package/src/validation/index.ts
CHANGED
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
export {
|
|
9
9
|
errorWithHint,
|
|
10
|
+
formatValidationMessage,
|
|
11
|
+
getValidationMessage,
|
|
10
12
|
getValidationMessages,
|
|
11
13
|
validationMessages,
|
|
12
14
|
type ValidationLocale,
|
|
13
15
|
type ValidationMessageKey,
|
|
16
|
+
type ValidationMessageParams,
|
|
14
17
|
type ValidationMessages,
|
|
15
18
|
} from './messages.js'
|
|
16
19
|
|