@casomoltd/nhs-pay 0.15.2 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -16
- package/dist/afc-band.d.ts +33 -0
- package/dist/afc-band.js +33 -0
- package/dist/afc-band.js.map +1 -0
- package/dist/afc-scales.d.ts +67 -0
- package/dist/afc-scales.js +238 -0
- package/dist/afc-scales.js.map +1 -0
- package/dist/allowances.d.ts +91 -0
- package/dist/allowances.js +180 -0
- package/dist/allowances.js.map +1 -0
- package/dist/award.d.ts +175 -36
- package/dist/award.js +370 -47
- package/dist/award.js.map +1 -1
- package/dist/bands.d.ts +34 -12
- package/dist/bands.js +26 -9
- package/dist/bands.js.map +1 -1
- package/dist/circulars/afc-shapes.d.ts +101 -0
- package/dist/circulars/afc-shapes.js +18 -0
- package/dist/circulars/afc-shapes.js.map +1 -0
- package/dist/circulars/{england-md-1-2026r.d.ts → england-md-1-2026-r2.d.ts} +198 -32
- package/dist/circulars/{england-md-1-2026r.js → england-md-1-2026-r2.js} +142 -76
- package/dist/circulars/england-md-1-2026-r2.js.map +1 -0
- package/dist/circulars/ni-hsc-afc-06-2025.d.ts +63 -0
- package/dist/circulars/ni-hsc-afc-06-2025.js +100 -0
- package/dist/circulars/ni-hsc-afc-06-2025.js.map +1 -0
- package/dist/circulars/ni-hsc-tc8-05-2025.d.ts +1 -1
- package/dist/circulars/ni-hsc-tc8-05-2025.js +1 -1
- package/dist/circulars/scotland-pcs-afc-2026-01.d.ts +82 -0
- package/dist/circulars/scotland-pcs-afc-2026-01.js +208 -0
- package/dist/circulars/scotland-pcs-afc-2026-01.js.map +1 -0
- package/dist/circulars/scotland-pcs-dd-2025-01.d.ts +1 -1
- package/dist/circulars/scotland-pcs-dd-2025-01.js +12 -4
- package/dist/circulars/scotland-pcs-dd-2025-01.js.map +1 -1
- package/dist/circulars/scotland-pcs-dd-2026-01.d.ts +2 -2
- package/dist/circulars/scotland-pcs-dd-2026-01.js +2 -2
- package/dist/circulars/scotland-pcs-dd-2026-02.d.ts +79 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js +185 -0
- package/dist/circulars/scotland-pcs-dd-2026-02.js.map +1 -0
- package/dist/circulars/wales-afc-w-02-2025.d.ts +53 -0
- package/dist/circulars/wales-afc-w-02-2025.js +85 -0
- package/dist/circulars/wales-afc-w-02-2025.js.map +1 -0
- package/dist/circulars/wales-afc-w-02-2026.d.ts +48 -0
- package/dist/circulars/wales-afc-w-02-2026.js +91 -0
- package/dist/circulars/wales-afc-w-02-2026.js.map +1 -0
- package/dist/circulars/wales-mdw-01-2025.d.ts +1 -1
- package/dist/circulars/wales-mdw-01-2025.js +1 -1
- package/dist/circulars/wales-mdw-01-2026.d.ts +1 -1
- package/dist/circulars/wales-mdw-01-2026.js +1 -1
- package/dist/dental-scales.d.ts +4 -4
- package/dist/dental-scales.js +30 -20
- package/dist/dental-scales.js.map +1 -1
- package/dist/document-source.d.ts +141 -0
- package/dist/document-source.js +80 -0
- package/dist/document-source.js.map +1 -0
- package/dist/errors.d.ts +31 -5
- package/dist/errors.js +32 -2
- package/dist/errors.js.map +1 -1
- package/dist/format.d.ts +2 -2
- package/dist/format.js.map +1 -1
- package/dist/gad/erf-2023-06-30.d.ts +1 -1
- package/dist/gad/erf-2023-06-30.js +2 -1
- package/dist/gad/erf-2023-06-30.js.map +1 -1
- package/dist/gad/factor-table.d.ts +2 -1
- package/dist/gad/factor-table.js.map +1 -1
- package/dist/gad/lrf-2023-06-30.d.ts +1 -1
- package/dist/gad/lrf-2023-06-30.js +2 -1
- package/dist/gad/lrf-2023-06-30.js.map +1 -1
- package/dist/hcas.d.ts +10 -14
- package/dist/hcas.js +13 -20
- package/dist/hcas.js.map +1 -1
- package/dist/index.d.ts +17 -9
- package/dist/index.js +17 -8
- package/dist/index.js.map +1 -1
- package/dist/iso-date.d.ts +87 -0
- package/dist/iso-date.js +97 -0
- package/dist/iso-date.js.map +1 -0
- package/dist/medical-scales.d.ts +19 -4
- package/dist/medical-scales.js +77 -20
- package/dist/medical-scales.js.map +1 -1
- package/dist/pension.d.ts +30 -0
- package/dist/pension.js +128 -8
- package/dist/pension.js.map +1 -1
- package/dist/post.d.ts +87 -2
- package/dist/post.js +112 -2
- package/dist/post.js.map +1 -1
- package/dist/regions.d.ts +1 -1
- package/dist/regions.js +1 -1
- package/dist/resolver.d.ts +57 -7
- package/dist/resolver.js +77 -25
- package/dist/resolver.js.map +1 -1
- package/dist/scale-point.d.ts +13 -4
- package/dist/scale-tables.d.ts +57 -10
- package/dist/scale-tables.js +58 -9
- package/dist/scale-tables.js.map +1 -1
- package/dist/scales.d.ts +169 -44
- package/dist/scales.js +462 -226
- package/dist/scales.js.map +1 -1
- package/dist/sources.d.ts +183 -0
- package/dist/sources.js +375 -0
- package/dist/sources.js.map +1 -0
- package/package.json +6 -4
- package/dist/circulars/england-md-1-2026r.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dental-scales.js","sourceRoot":"","sources":["../src/dental-scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"dental-scales.js","sourceRoot":"","sources":["../src/dental-scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAI5D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,OAAO,GACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,oBAAoB,IAAI,GA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rD,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;QACpB,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO;QAC9B,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ;QAChC,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,SAAS;KAC/B;IACD,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;QACpB,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,KAAK;QAC1B,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,eAAe;QAC9C,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,YAAY;KACrC;CACF,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAC3B,MAAM,CAAC,IAAI,CAAC,aAAa,CAC1B,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;AAEnB;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAa,EACb,MAAc;IAEd,OAAO,iBAAiB,CACtB,aAAa,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,CAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published document a figure in this library was read from.
|
|
3
|
+
*
|
|
4
|
+
* One record type for any cited document, because the library cites
|
|
5
|
+
* three different KINDS and a reader must not confuse them: the
|
|
6
|
+
* instrument that ENACTED an award, the circular that PUBLISHES a pay
|
|
7
|
+
* scale, and the letter that sets an allowance. They are different
|
|
8
|
+
* documents in every nation — England's 2026-27 medical award was
|
|
9
|
+
* enacted by a written ministerial statement while its salaries are
|
|
10
|
+
* printed in a Pay & Conditions circular — so collapsing them into one
|
|
11
|
+
* field is how a parliamentary statement ends up cited beneath a table
|
|
12
|
+
* of salaries.
|
|
13
|
+
*
|
|
14
|
+
* The type is shared; the instances are not. Each carrier holds the
|
|
15
|
+
* document that is true for IT.
|
|
16
|
+
*
|
|
17
|
+
* Lives in its own module rather than beside the awards because a pay
|
|
18
|
+
* scale carries one too, and `award.ts` imports every scale module —
|
|
19
|
+
* so defining it there would make a scale citing its source a cycle.
|
|
20
|
+
*/
|
|
21
|
+
import type { IsoDate } from './iso-date.js';
|
|
22
|
+
/**
|
|
23
|
+
* The fields a {@link DocumentSource} is built from.
|
|
24
|
+
*
|
|
25
|
+
* A named-argument object rather than a positional constructor: four
|
|
26
|
+
* of the six fields are strings, and adjacent parameters of one type
|
|
27
|
+
* are how a value ends up in the wrong slot with nothing to catch it.
|
|
28
|
+
*/
|
|
29
|
+
export interface DocumentSourceFields {
|
|
30
|
+
/** Who issued it — 'the Scottish Government', 'NHS Wales'. */
|
|
31
|
+
readonly issuer: string;
|
|
32
|
+
/**
|
|
33
|
+
* The document's own title or publisher reference, as printed:
|
|
34
|
+
* 'PCS(AFC)2026/1', 'HCWS1340', 'NHS pay awards'.
|
|
35
|
+
*
|
|
36
|
+
* Identity, deliberately not a phrase, and deliberately separate
|
|
37
|
+
* from {@link issuer}. A consumer composes its own sentence from the
|
|
38
|
+
* two; hand it one pre-joined fragment and it will splice that into
|
|
39
|
+
* a grammar the fragment was never shaped for. This field says which
|
|
40
|
+
* document it is, nothing more.
|
|
41
|
+
*/
|
|
42
|
+
readonly reference: string;
|
|
43
|
+
/** The document itself, for a page to link. */
|
|
44
|
+
readonly url: string;
|
|
45
|
+
/** ISO date the document was issued. */
|
|
46
|
+
readonly issued: IsoDate;
|
|
47
|
+
/**
|
|
48
|
+
* ISO date by which a NEWER document is expected to replace or
|
|
49
|
+
* revise this one.
|
|
50
|
+
*
|
|
51
|
+
* Two jobs, which is why it is one field rather than a note. It
|
|
52
|
+
* lets a page tell a reader how fresh the figures are — "published
|
|
53
|
+
* 23 January 2026, next expected April 2027" — and it lets a check
|
|
54
|
+
* assert the date is still in the future. Once it passes, the page
|
|
55
|
+
* is visibly claiming something stale and nobody has to remember to
|
|
56
|
+
* look.
|
|
57
|
+
*
|
|
58
|
+
* A lapsed date is NOT necessarily our error. Northern Ireland has
|
|
59
|
+
* missed its cycle two years running; saying so is more useful to a
|
|
60
|
+
* reader than silence, and locates the delay where it belongs.
|
|
61
|
+
*
|
|
62
|
+
* Usually the ordinary annual cycle. Where it is not — a settlement
|
|
63
|
+
* with a review trigger written into it — {@link nextExpectedReason}
|
|
64
|
+
* says what the trigger is.
|
|
65
|
+
*/
|
|
66
|
+
readonly nextExpected?: IsoDate;
|
|
67
|
+
/**
|
|
68
|
+
* Why a newer document is expected then, when the answer is not
|
|
69
|
+
* "the next annual round".
|
|
70
|
+
*
|
|
71
|
+
* Scotland's 2025-26 settlement is the case this exists for: it
|
|
72
|
+
* carried an inflation guarantee of at least a point above average
|
|
73
|
+
* CPI for the calendar year, so a revision was a scheduled
|
|
74
|
+
* contingency with a knowable date — CPI confirms in January — and
|
|
75
|
+
* it duly arrived on 23 January 2026, moving 4.25% to 4.4%. A
|
|
76
|
+
* foreseeable revision that nothing was watching for is how 50 pay
|
|
77
|
+
* points stayed understated for a year.
|
|
78
|
+
*/
|
|
79
|
+
readonly nextExpectedReason?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A document this library cites — not commentary about it. Held on the
|
|
83
|
+
* record so a consumer cites the document rather than keeping its own
|
|
84
|
+
* copy of the URL.
|
|
85
|
+
*
|
|
86
|
+
* A CLASS, not a plain record, because the question a consumer most
|
|
87
|
+
* often asks of a citation — "is this still the newest document
|
|
88
|
+
* expected to exist?" — needs only the fields already on it plus the
|
|
89
|
+
* current time. An entity that carries every coordinate of a query
|
|
90
|
+
* should answer it; a free function asking the caller to pass the
|
|
91
|
+
* record back in is the same fact reached by a longer route.
|
|
92
|
+
*
|
|
93
|
+
* Safe to make a class here because a DocumentSource is never
|
|
94
|
+
* round-tripped through JSON — it is authored in `sources.ts`, read by
|
|
95
|
+
* a renderer, and never parsed back from storage, so nothing loses its
|
|
96
|
+
* methods at a boundary.
|
|
97
|
+
*/
|
|
98
|
+
export declare class DocumentSource {
|
|
99
|
+
/** Who issued it — 'the Scottish Government', 'NHS Wales'. */
|
|
100
|
+
readonly issuer: string;
|
|
101
|
+
/** The document's own title or publisher reference, as printed. */
|
|
102
|
+
readonly reference: string;
|
|
103
|
+
/** The document itself, for a page to link. */
|
|
104
|
+
readonly url: string;
|
|
105
|
+
/** ISO date the document was issued. */
|
|
106
|
+
readonly issued: IsoDate;
|
|
107
|
+
/** ISO date by which a NEWER document is expected. */
|
|
108
|
+
readonly nextExpected?: IsoDate;
|
|
109
|
+
/** Why a newer document is expected then, where it is not the
|
|
110
|
+
* ordinary annual round. */
|
|
111
|
+
readonly nextExpectedReason?: string;
|
|
112
|
+
constructor(fields: DocumentSourceFields);
|
|
113
|
+
/**
|
|
114
|
+
* Whether this document is still within the window in which it is
|
|
115
|
+
* the newest expected to exist, AS AT a given moment.
|
|
116
|
+
*
|
|
117
|
+
* Takes `now` rather than reading the clock, and is a method rather
|
|
118
|
+
* than a stored flag, because currency is a question about a moment
|
|
119
|
+
* and not a property of the record. A boolean computed at module
|
|
120
|
+
* load would freeze the answer for the life of the process — the
|
|
121
|
+
* same shape as the year defect this round exists to fix — and a
|
|
122
|
+
* caller could not ask "was this current when the page was built?".
|
|
123
|
+
*/
|
|
124
|
+
currencyAt(now: Date): SourceCurrency;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Whether a source is still within the window in which it is the
|
|
128
|
+
* newest document expected to exist.
|
|
129
|
+
*
|
|
130
|
+
* `lapsed` means the date we expected a successor by has passed and
|
|
131
|
+
* we hold no successor — so either the publisher is late, or one
|
|
132
|
+
* exists and we have not transcribed it. Both are worth surfacing;
|
|
133
|
+
* the caller decides which it is.
|
|
134
|
+
*
|
|
135
|
+
* `unknown` where no `nextExpected` is recorded. Absence of a date is
|
|
136
|
+
* not evidence of currency, and a consumer must never render it as
|
|
137
|
+
* "current" — nor render nothing, which reads the same way. House
|
|
138
|
+
* position is to state the gap: an unchecked citation should not look
|
|
139
|
+
* identical to a fresh one.
|
|
140
|
+
*/
|
|
141
|
+
export type SourceCurrency = 'current' | 'lapsed' | 'unknown';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published document a figure in this library was read from.
|
|
3
|
+
*
|
|
4
|
+
* One record type for any cited document, because the library cites
|
|
5
|
+
* three different KINDS and a reader must not confuse them: the
|
|
6
|
+
* instrument that ENACTED an award, the circular that PUBLISHES a pay
|
|
7
|
+
* scale, and the letter that sets an allowance. They are different
|
|
8
|
+
* documents in every nation — England's 2026-27 medical award was
|
|
9
|
+
* enacted by a written ministerial statement while its salaries are
|
|
10
|
+
* printed in a Pay & Conditions circular — so collapsing them into one
|
|
11
|
+
* field is how a parliamentary statement ends up cited beneath a table
|
|
12
|
+
* of salaries.
|
|
13
|
+
*
|
|
14
|
+
* The type is shared; the instances are not. Each carrier holds the
|
|
15
|
+
* document that is true for IT.
|
|
16
|
+
*
|
|
17
|
+
* Lives in its own module rather than beside the awards because a pay
|
|
18
|
+
* scale carries one too, and `award.ts` imports every scale module —
|
|
19
|
+
* so defining it there would make a scale citing its source a cycle.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* A document this library cites — not commentary about it. Held on the
|
|
23
|
+
* record so a consumer cites the document rather than keeping its own
|
|
24
|
+
* copy of the URL.
|
|
25
|
+
*
|
|
26
|
+
* A CLASS, not a plain record, because the question a consumer most
|
|
27
|
+
* often asks of a citation — "is this still the newest document
|
|
28
|
+
* expected to exist?" — needs only the fields already on it plus the
|
|
29
|
+
* current time. An entity that carries every coordinate of a query
|
|
30
|
+
* should answer it; a free function asking the caller to pass the
|
|
31
|
+
* record back in is the same fact reached by a longer route.
|
|
32
|
+
*
|
|
33
|
+
* Safe to make a class here because a DocumentSource is never
|
|
34
|
+
* round-tripped through JSON — it is authored in `sources.ts`, read by
|
|
35
|
+
* a renderer, and never parsed back from storage, so nothing loses its
|
|
36
|
+
* methods at a boundary.
|
|
37
|
+
*/
|
|
38
|
+
export class DocumentSource {
|
|
39
|
+
/** Who issued it — 'the Scottish Government', 'NHS Wales'. */
|
|
40
|
+
issuer;
|
|
41
|
+
/** The document's own title or publisher reference, as printed. */
|
|
42
|
+
reference;
|
|
43
|
+
/** The document itself, for a page to link. */
|
|
44
|
+
url;
|
|
45
|
+
/** ISO date the document was issued. */
|
|
46
|
+
issued;
|
|
47
|
+
/** ISO date by which a NEWER document is expected. */
|
|
48
|
+
nextExpected;
|
|
49
|
+
/** Why a newer document is expected then, where it is not the
|
|
50
|
+
* ordinary annual round. */
|
|
51
|
+
nextExpectedReason;
|
|
52
|
+
constructor(fields) {
|
|
53
|
+
this.issuer = fields.issuer;
|
|
54
|
+
this.reference = fields.reference;
|
|
55
|
+
this.url = fields.url;
|
|
56
|
+
this.issued = fields.issued;
|
|
57
|
+
this.nextExpected = fields.nextExpected;
|
|
58
|
+
this.nextExpectedReason = fields.nextExpectedReason;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Whether this document is still within the window in which it is
|
|
62
|
+
* the newest expected to exist, AS AT a given moment.
|
|
63
|
+
*
|
|
64
|
+
* Takes `now` rather than reading the clock, and is a method rather
|
|
65
|
+
* than a stored flag, because currency is a question about a moment
|
|
66
|
+
* and not a property of the record. A boolean computed at module
|
|
67
|
+
* load would freeze the answer for the life of the process — the
|
|
68
|
+
* same shape as the year defect this round exists to fix — and a
|
|
69
|
+
* caller could not ask "was this current when the page was built?".
|
|
70
|
+
*/
|
|
71
|
+
currencyAt(now) {
|
|
72
|
+
if (!this.nextExpected) {
|
|
73
|
+
return 'unknown';
|
|
74
|
+
}
|
|
75
|
+
return this.nextExpected >= now.toISOString().slice(0, 10)
|
|
76
|
+
? 'current'
|
|
77
|
+
: 'lapsed';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=document-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-source.js","sourceRoot":"","sources":["../src/document-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAgEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,cAAc;IACzB,8DAA8D;IACrD,MAAM,CAAS;IACxB,mEAAmE;IAC1D,SAAS,CAAS;IAC3B,+CAA+C;IACtC,GAAG,CAAS;IACrB,wCAAwC;IAC/B,MAAM,CAAU;IACzB,sDAAsD;IAC7C,YAAY,CAAW;IAChC;iCAC6B;IACpB,kBAAkB,CAAU;IAErC,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;IACtD,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU,CAAC,GAAS;QAClB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;YACxD,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ,CAAC;IACf,CAAC;CACF"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* is a library bug, not an input problem, so no caller catches it;
|
|
8
8
|
* it throws a bare Error to fail loud in tests and pages.
|
|
9
9
|
*/
|
|
10
|
-
import type { Nation, TaxYear } from '@casomoltd/paye-calc';
|
|
10
|
+
import type { Nation, PayYear, TaxYear } from '@casomoltd/paye-calc';
|
|
11
11
|
/**
|
|
12
12
|
* Assert a domain invariant that must ALWAYS hold. Throws a bare
|
|
13
13
|
* Error when `condition` is false. Unlike the absent-data errors
|
|
@@ -25,11 +25,18 @@ export declare function invariant(condition: unknown, message: string): asserts
|
|
|
25
25
|
*/
|
|
26
26
|
export declare class ScaleUnavailable extends Error {
|
|
27
27
|
readonly nation: Nation;
|
|
28
|
-
|
|
28
|
+
/** The PAY year — which scale was asked for, not which tax
|
|
29
|
+
* rules apply. A nation whose award is not yet in payment is
|
|
30
|
+
* short a pay year, never a tax year. */
|
|
31
|
+
readonly year: PayYear;
|
|
29
32
|
readonly gradeId?: string | undefined;
|
|
30
33
|
/** Set when the scale exists but the point label doesn't. */
|
|
31
34
|
readonly pointLabel?: string | undefined;
|
|
32
|
-
constructor(nation: Nation,
|
|
35
|
+
constructor(nation: Nation,
|
|
36
|
+
/** The PAY year — which scale was asked for, not which tax
|
|
37
|
+
* rules apply. A nation whose award is not yet in payment is
|
|
38
|
+
* short a pay year, never a tax year. */
|
|
39
|
+
year: PayYear, gradeId?: string | undefined,
|
|
33
40
|
/** Set when the scale exists but the point label doesn't. */
|
|
34
41
|
pointLabel?: string | undefined);
|
|
35
42
|
}
|
|
@@ -70,7 +77,26 @@ export declare class RetirementFactorOutOfRange extends Error {
|
|
|
70
77
|
* award is negotiated data, absent until published.
|
|
71
78
|
*/
|
|
72
79
|
export declare class AwardUnavailable extends Error {
|
|
73
|
-
|
|
80
|
+
/** The PAY year the award would apply to. */
|
|
81
|
+
readonly year: PayYear;
|
|
74
82
|
readonly nation: Nation;
|
|
75
|
-
constructor(
|
|
83
|
+
constructor(
|
|
84
|
+
/** The PAY year the award would apply to. */
|
|
85
|
+
year: PayYear, nation: Nation);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* A pay-point label matched more than one point on a scale.
|
|
89
|
+
*
|
|
90
|
+
* Thrown rather than returning the first match. England's consultant
|
|
91
|
+
* scale is 20 points carrying 5 labels — `Threshold 3` names six of
|
|
92
|
+
* them, differing in years of service — so a label is not an
|
|
93
|
+
* identifier there, and picking the first is an arbitrary answer
|
|
94
|
+
* dressed as a lookup. A caller that already holds the point should
|
|
95
|
+
* use the resolver's `fromPoint` instead.
|
|
96
|
+
*/
|
|
97
|
+
export declare class AmbiguousScalePoint extends Error {
|
|
98
|
+
readonly grade: string;
|
|
99
|
+
readonly pointLabel: string;
|
|
100
|
+
readonly matches: number;
|
|
101
|
+
constructor(grade: string, pointLabel: string, matches: number);
|
|
76
102
|
}
|
package/dist/errors.js
CHANGED
|
@@ -31,7 +31,11 @@ export class ScaleUnavailable extends Error {
|
|
|
31
31
|
year;
|
|
32
32
|
gradeId;
|
|
33
33
|
pointLabel;
|
|
34
|
-
constructor(nation,
|
|
34
|
+
constructor(nation,
|
|
35
|
+
/** The PAY year — which scale was asked for, not which tax
|
|
36
|
+
* rules apply. A nation whose award is not yet in payment is
|
|
37
|
+
* short a pay year, never a tax year. */
|
|
38
|
+
year, gradeId,
|
|
35
39
|
/** Set when the scale exists but the point label doesn't. */
|
|
36
40
|
pointLabel) {
|
|
37
41
|
super(scaleMessage(nation, year, gradeId, pointLabel));
|
|
@@ -94,7 +98,9 @@ export class RetirementFactorOutOfRange extends Error {
|
|
|
94
98
|
export class AwardUnavailable extends Error {
|
|
95
99
|
year;
|
|
96
100
|
nation;
|
|
97
|
-
constructor(
|
|
101
|
+
constructor(
|
|
102
|
+
/** The PAY year the award would apply to. */
|
|
103
|
+
year, nation) {
|
|
98
104
|
super(`No AfC pay award recorded for ${nation} ${year}`);
|
|
99
105
|
this.year = year;
|
|
100
106
|
this.nation = nation;
|
|
@@ -112,4 +118,28 @@ function scaleMessage(nation, year, gradeId, pointLabel) {
|
|
|
112
118
|
}
|
|
113
119
|
return `No published pay scale for ${nation} ${year}`;
|
|
114
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* A pay-point label matched more than one point on a scale.
|
|
123
|
+
*
|
|
124
|
+
* Thrown rather than returning the first match. England's consultant
|
|
125
|
+
* scale is 20 points carrying 5 labels — `Threshold 3` names six of
|
|
126
|
+
* them, differing in years of service — so a label is not an
|
|
127
|
+
* identifier there, and picking the first is an arbitrary answer
|
|
128
|
+
* dressed as a lookup. A caller that already holds the point should
|
|
129
|
+
* use the resolver's `fromPoint` instead.
|
|
130
|
+
*/
|
|
131
|
+
export class AmbiguousScalePoint extends Error {
|
|
132
|
+
grade;
|
|
133
|
+
pointLabel;
|
|
134
|
+
matches;
|
|
135
|
+
constructor(grade, pointLabel, matches) {
|
|
136
|
+
super(`Pay point "${pointLabel}" matches ${matches} points on `
|
|
137
|
+
+ `${grade} — it does not identify one. Use fromPoint with the `
|
|
138
|
+
+ 'point itself.');
|
|
139
|
+
this.grade = grade;
|
|
140
|
+
this.pointLabel = pointLabel;
|
|
141
|
+
this.matches = matches;
|
|
142
|
+
this.name = 'AmbiguousScalePoint';
|
|
143
|
+
}
|
|
144
|
+
}
|
|
115
145
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CACvB,SAAkB,EAClB,OAAe;IAEf,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAE9B;IAIA;IACA;IAEA;IARX,YACW,MAAc;IACvB;;8CAE0C;IACjC,IAAa,EACb,OAAgB;IACzB,6DAA6D;IACpD,UAAmB;QAE5B,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;QAT9C,WAAM,G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CAAC;CACF;AAED,SAAS,YAAY,CACnB,MAAc,EACd,IAAa,EACb,OAAgB,EAChB,UAAmB;IAEnB,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,mBAAmB,UAAU,QAAQ;cACxC,GAAG,OAAO,OAAO,MAAM,IAAI,IAAI,EAAE,CAAC;IACxC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,0BAA0B,OAAO,MAAM;cAC1C,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,8BAA8B,MAAM,IAAI,IAAI,EAAE,CAAC;AACxD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAEjC;IACA;IACA;IAHX,YACW,KAAa,EACb,UAAkB,EAClB,OAAe;QAExB,KAAK,CACH,cAAc,UAAU,aAAa,OAAO,aAAa;cACvD,GAAG,KAAK,sDAAsD;cAC9D,eAAe,CAClB,CAAC;QARO,UAAK,GAAL,KAAK,CAAQ;QACb,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAAQ;QAOxB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF"}
|
package/dist/format.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GBP and percentage formatting helpers for NHS
|
|
3
3
|
* pay data.
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
5
|
+
import type { YearLabel } from '@casomoltd/paye-calc';
|
|
6
6
|
/** Exact salary with £ sign — £31,049 */
|
|
7
7
|
export declare function fmtSalary(n: number): string;
|
|
8
8
|
/** Format as £35,000 (no decimals, Intl). */
|
|
@@ -24,4 +24,4 @@ export declare function formatPct(n: number): string;
|
|
|
24
24
|
*/
|
|
25
25
|
export declare function formatPctPrecise(n: number): string;
|
|
26
26
|
/** '2025-26' → '2025/26' */
|
|
27
|
-
export declare function yearLabel(year:
|
|
27
|
+
export declare function yearLabel(year: YearLabel): string;
|
package/dist/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,mDAAmD;AAEnD,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC/C,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE,KAAK;IACf,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,IAAI,IAAI,CAAC,YAAY,CAC5C,OAAO,EACP;IACE,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE,KAAK;IACf,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;CACzB,CACF,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC/C,KAAK,EAAE,SAAS;IAChB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IACtD,KAAK,EAAE,SAAS;IAChB,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,mDAAmD;AAEnD,yCAAyC;AACzC,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,CACL,QAAQ;UACN,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAC5B,CAAC;AACJ,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,gBAAgB,CAC9B,CAAS;IAET,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,8BAA8B;AAC9B,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AC,CAAC;AAChC,CAAC"}
|
|
@@ -61,7 +61,7 @@ export declare const ERF_0_420: {
|
|
|
61
61
|
readonly sheet: "x-420";
|
|
62
62
|
readonly page: 25;
|
|
63
63
|
readonly guidanceRef: "ERF1";
|
|
64
|
-
readonly issued: "
|
|
64
|
+
readonly issued: import("../iso-date.js").IsoDate;
|
|
65
65
|
readonly sourceUrl: string;
|
|
66
66
|
readonly methodGuidance: string;
|
|
67
67
|
};
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
* eligibility factor for actuarially reduced early retirement,
|
|
54
54
|
* looked up by age rather than by time to NPA.
|
|
55
55
|
*/
|
|
56
|
+
import { isoDate } from '../iso-date.js';
|
|
56
57
|
/** 2015 scheme ERF — Table 0-420, issued 30 Jun 2023. */
|
|
57
58
|
export const ERF_0_420 = {
|
|
58
59
|
kind: 'erf',
|
|
@@ -61,7 +62,7 @@ export const ERF_0_420 = {
|
|
|
61
62
|
sheet: 'x-420',
|
|
62
63
|
page: 25,
|
|
63
64
|
guidanceRef: 'ERF1',
|
|
64
|
-
issued: '2023-06-30',
|
|
65
|
+
issued: isoDate('2023-06-30'),
|
|
65
66
|
sourceUrl: 'https://www.nhsbsa.nhs.uk/sites/default/'
|
|
66
67
|
+ 'files/2024-02/Early%20and%20Late%20Retirement'
|
|
67
68
|
+ '%20Factors.pdf',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erf-2023-06-30.js","sourceRoot":"","sources":["../../src/gad/erf-2023-06-30.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;
|
|
1
|
+
{"version":3,"file":"erf-2023-06-30.js","sourceRoot":"","sources":["../../src/gad/erf-2023-06-30.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAGH,OAAO,EAAC,OAAO,EAAC,MAAM,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KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,OAAO;QACpD,CAAC,KAAK,CAAC,EAAsC,kBAAkB;KAChE;CACiC,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* table 1:1; {@link FactorTable} validates and wraps it; the
|
|
7
7
|
* projection module consumes factors only through it.
|
|
8
8
|
*/
|
|
9
|
+
import type { IsoDate } from '../iso-date.js';
|
|
9
10
|
/**
|
|
10
11
|
* Citation carried in the data itself. Every past defect in this
|
|
11
12
|
* area was a stale-source defect, so the "where did these numbers
|
|
@@ -21,7 +22,7 @@ export interface FactorProvenance {
|
|
|
21
22
|
/** Name in the governing guidance, e.g. 'ERF1' */
|
|
22
23
|
readonly guidanceRef: string;
|
|
23
24
|
/** Date GAD issued the factors, ISO date, e.g. '2023-06-30' */
|
|
24
|
-
readonly issued:
|
|
25
|
+
readonly issued: IsoDate;
|
|
25
26
|
/** Document the transcription was made from */
|
|
26
27
|
/** The publisher's own URL. A consumer RENDERS this — the
|
|
27
28
|
* calculator cites it on its methods panel — which is why it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factor-table.js","sourceRoot":"","sources":["../../src/gad/factor-table.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"factor-table.js","sourceRoot":"","sources":["../../src/gad/factor-table.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,SAAS,EACT,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAkCtB;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE;QACH,QAAQ,EAAE,IAAI;QACd,6DAA6D;QAC7D,6DAA6D;QAC7D,2DAA2D;QAC3D,6DAA6D;QAC7D,2CAA2C;QAC3C,OAAO,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,EAA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UAAU,CAAC,WAAW,qBAAqB;cAC/C,GAAG,MAAM,CAAC,KAAK,MAAM,MAAM,CAAC,MAAM,KAAK;cACvC,GAAG,MAAM,CAAC,IAAI,GAAG,CACtB,CAAC;QACF,IAAI,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,MAAM,CAAC;QAC7B,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,CAAC,CAAC;YACZ,IAAI,MAAM,IAAI,cAAc,EAAE,CAAC;gBAC7B,MAAM,GAAG,CAAC,CAAC;gBACX,KAAK,IAAI,CAAC,CAAC;YACb,CAAC;QACH,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAEd,CAAC;QACd,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;YAClC,MAAM,IAAI,0BAA0B,CAClC,IAAI,CAAC,UAAU,CAAC,WAAW,EAC3B,KAAK,EACL,MAAM,EACN,IAAI,EACJ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAC3B,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -61,7 +61,7 @@ export declare const LRF_0_421: {
|
|
|
61
61
|
readonly sheet: "x-421";
|
|
62
62
|
readonly page: 26;
|
|
63
63
|
readonly guidanceRef: "LRF1";
|
|
64
|
-
readonly issued: "
|
|
64
|
+
readonly issued: import("../iso-date.js").IsoDate;
|
|
65
65
|
readonly sourceUrl: string;
|
|
66
66
|
readonly methodGuidance: string;
|
|
67
67
|
};
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
* eligibility factor for actuarially reduced early retirement,
|
|
54
54
|
* looked up by age rather than by time to NPA.
|
|
55
55
|
*/
|
|
56
|
+
import { isoDate } from '../iso-date.js';
|
|
56
57
|
/** 2015 scheme LRF — Table 0-421, issued 30 Jun 2023. */
|
|
57
58
|
export const LRF_0_421 = {
|
|
58
59
|
kind: 'lrf',
|
|
@@ -61,7 +62,7 @@ export const LRF_0_421 = {
|
|
|
61
62
|
sheet: 'x-421',
|
|
62
63
|
page: 26,
|
|
63
64
|
guidanceRef: 'LRF1',
|
|
64
|
-
issued: '2023-06-30',
|
|
65
|
+
issued: isoDate('2023-06-30'),
|
|
65
66
|
sourceUrl: 'https://www.nhsbsa.nhs.uk/sites/default/'
|
|
66
67
|
+ 'files/2024-02/Early%20and%20Late%20Retirement'
|
|
67
68
|
+ '%20Factors.pdf',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lrf-2023-06-30.js","sourceRoot":"","sources":["../../src/gad/lrf-2023-06-30.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;
|
|
1
|
+
{"version":3,"file":"lrf-2023-06-30.js","sourceRoot":"","sources":["../../src/gad/lrf-2023-06-30.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAGH,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,yDAAyD;AACzD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,KAAK;IACX,UAAU,EAAE;QACV,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC;QAC7B,SAAS,EAAE,0CAA0C;cACjD,+CAA+C;cAC/C,gBAAgB;QACpB,cAAc,EAAE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KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;YACvC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;QACnD,CAAC,KAAK,CAAC,EAAsC,kBAAkB;KAChE;CACiC,CAAC"}
|
package/dist/hcas.d.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Browser-safe — no node:fs dependency.
|
|
6
6
|
*/
|
|
7
|
-
import type { TaxYear } from '@casomoltd/paye-calc';
|
|
8
7
|
import type { HcasZone, HcasZones } from './scales.js';
|
|
9
8
|
import type { AfcRegionId } from './regions.js';
|
|
10
9
|
export declare const HCAS_ZONE_IDS: {
|
|
@@ -21,18 +20,15 @@ export declare function isHcasZoneId(value: string): value is HcasZoneId;
|
|
|
21
20
|
*/
|
|
22
21
|
export declare function calculateHcasSupplement(baseSalary: number, zone: HcasZone): number;
|
|
23
22
|
/**
|
|
24
|
-
* Produce a region's gross from a base salary:
|
|
25
|
-
*
|
|
26
|
-
* for England high-cost zones.
|
|
23
|
+
* Produce a region's gross from a base salary: the HCAS
|
|
24
|
+
* supplement for England's high-cost zones, and nothing else.
|
|
27
25
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* removing it silently underpays Welsh low bands (see the
|
|
36
|
-
* grossSalary↔table equivalence test).
|
|
26
|
+
* No nation adjustment happens here. Every nation's ladder is
|
|
27
|
+
* transcribed in `scales.ts` and reached through
|
|
28
|
+
* `getScalesForYear`, so a caller wanting Welsh pay asks for
|
|
29
|
+
* the Welsh table rather than passing another nation's figure
|
|
30
|
+
* to be adjusted. Flooring an England base for Wales produced
|
|
31
|
+
* a number that was neither nation's once Wales's own scales
|
|
32
|
+
* were read from its circular.
|
|
37
33
|
*/
|
|
38
|
-
export declare function grossSalary(base: number, region: AfcRegionId, hcas: HcasZones
|
|
34
|
+
export declare function grossSalary(base: number, region: AfcRegionId, hcas: HcasZones): number;
|
package/dist/hcas.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Browser-safe — no node:fs dependency.
|
|
6
6
|
*/
|
|
7
|
-
import { applyWalesFloor } from './scales.js';
|
|
8
7
|
import { resolveRegion } from './regions.js';
|
|
9
8
|
export const HCAS_ZONE_IDS = {
|
|
10
9
|
INNER_LONDON: 'inner-london',
|
|
@@ -25,28 +24,22 @@ export function calculateHcasSupplement(baseSalary, zone) {
|
|
|
25
24
|
return Math.round(Math.min(Math.max(raw, zone.min), zone.max));
|
|
26
25
|
}
|
|
27
26
|
/**
|
|
28
|
-
* Produce a region's gross from a base salary:
|
|
29
|
-
*
|
|
30
|
-
* for England high-cost zones.
|
|
27
|
+
* Produce a region's gross from a base salary: the HCAS
|
|
28
|
+
* supplement for England's high-cost zones, and nothing else.
|
|
31
29
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* removing it silently underpays Welsh low bands (see the
|
|
40
|
-
* grossSalary↔table equivalence test).
|
|
30
|
+
* No nation adjustment happens here. Every nation's ladder is
|
|
31
|
+
* transcribed in `scales.ts` and reached through
|
|
32
|
+
* `getScalesForYear`, so a caller wanting Welsh pay asks for
|
|
33
|
+
* the Welsh table rather than passing another nation's figure
|
|
34
|
+
* to be adjusted. Flooring an England base for Wales produced
|
|
35
|
+
* a number that was neither nation's once Wales's own scales
|
|
36
|
+
* were read from its circular.
|
|
41
37
|
*/
|
|
42
|
-
export function grossSalary(base, region, hcas
|
|
43
|
-
const { hcasProp
|
|
44
|
-
const floored = isWales
|
|
45
|
-
? applyWalesFloor(base, year)
|
|
46
|
-
: base;
|
|
38
|
+
export function grossSalary(base, region, hcas) {
|
|
39
|
+
const { hcasProp } = resolveRegion(region);
|
|
47
40
|
if (!hcasProp) {
|
|
48
|
-
return
|
|
41
|
+
return base;
|
|
49
42
|
}
|
|
50
|
-
return
|
|
43
|
+
return base + calculateHcasSupplement(base, hcas[hcasProp]);
|
|
51
44
|
}
|
|
52
45
|
//# sourceMappingURL=hcas.js.map
|
package/dist/hcas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hcas.js","sourceRoot":"","sources":["../src/hcas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"hcas.js","sourceRoot":"","sources":["../src/hcas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,QAAQ;CACR,CAAC;AAOX,MAAM,YAAY,GAChB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAE/B,mDAAmD;AACnD,MAAM,UAAU,YAAY,CAC1B,KAAa;IAEb,OACE,YACD,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,UAAkB,EAClB,IAAc;IAEd,MAAM,GAAG,GAAG,UAAU,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC,KAAK,CACf,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CACzB,IAAY,EACZ,MAAmB,EACnB,IAAe;IAEf,MAAM,EAAC,QAAQ,EAAC,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,GAAG,uBAAuB,CACnC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CACrB,CAAC;AACJ,CAAC"}
|