@easygov/web-components 0.13.0 → 0.15.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/README.md +22 -13
- package/dist/chunk-3UU6OKOA.js +27 -0
- package/dist/chunk-3UU6OKOA.js.map +1 -0
- package/dist/{chunk-QRAMWBK3.js → chunk-N43E73KP.js} +9 -9
- package/dist/{chunk-QRAMWBK3.js.map → chunk-N43E73KP.js.map} +1 -1
- package/dist/{chunk-KANVHPUT.js → chunk-SGE3GQLT.js} +2 -2
- package/dist/{chunk-KANVHPUT.js.map → chunk-SGE3GQLT.js.map} +1 -1
- package/dist/footer.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.d.ts +111 -22
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-WCFIQ7YK.js +0 -27
- package/dist/chunk-WCFIQ7YK.js.map +0 -1
package/dist/header.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
1
|
+
import{e}from"./chunk-3UU6OKOA.js";import{a as o,b as r}from"./chunk-N43E73KP.js";import"./chunk-SGE3GQLT.js";var m=r(o(e,{shadow:"open"}));customElements.define("eg-easygov-header",m);
|
|
2
2
|
//# sourceMappingURL=header.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,16 @@ type AccountVerificationStatus = 'NOT_VERIFIED' | 'VERIFIED';
|
|
|
7
7
|
* the two are free to diverge on the wire.
|
|
8
8
|
*/
|
|
9
9
|
type ManagementRoleStatus = 'NOT_VERIFIED' | 'VERIFIED';
|
|
10
|
-
type ProcessStatus = 'PRELIMINARY' | 'REQUEST_IN_PROGRESS' | 'REQUEST_COMPLETED' | 'SERVICE_PROVISION_PENDING' | 'FINISHED' | '
|
|
10
|
+
type ProcessStatus = 'PRELIMINARY' | 'REQUEST_IN_PROGRESS' | 'REQUEST_COMPLETED' | 'REQUEST_IN_SUBMISSION' | 'SERVICE_PROVISION_PENDING' | 'FINISHED' | 'REQUEST_WITHDRAWN';
|
|
11
|
+
/** Black/white outcome of a Behördengang. */
|
|
12
|
+
type ProcessResultInfo = 'POSITIVE' | 'NEGATIVE';
|
|
13
|
+
type ServiceAppType = 'SERVICE_REQUEST_APP' | 'SELF_SERVICE_APP';
|
|
14
|
+
/** The onboarding path on which a customer account was registered. */
|
|
15
|
+
type OnboardingMethod = 'ADDING_INDIVIDUAL' | 'ADDING_SWISS_ORGANIZATION' | 'FOUNDING_SWISS_ORGANIZATION' | 'ADDING_FOREIGN_ORGANIZATION';
|
|
16
|
+
/** Status of an entry in a register (UID, commercial register, VAT). */
|
|
17
|
+
type RegisterEntryStatus = 'ACTIVE' | 'DELETED';
|
|
18
|
+
/** Like `RegisterEntryStatus`, plus the organization has no entry in that register at all. */
|
|
19
|
+
type RegisterRelationStatus = RegisterEntryStatus | 'NO_RELATION';
|
|
11
20
|
/** An Agent's permission level on one ServiceApp (Leistungsberechtigung). */
|
|
12
21
|
type PermissionLevel = 'READ_ONLY' | 'EDIT' | 'AUTHORIZE';
|
|
13
22
|
/**
|
|
@@ -28,6 +37,8 @@ interface ManagementRole {
|
|
|
28
37
|
roleType: ManagementRoleType;
|
|
29
38
|
/** Only present for SUPER_AGENT. */
|
|
30
39
|
status?: ManagementRoleStatus;
|
|
40
|
+
/** Whether the user receives notification e-mails for this customer account. */
|
|
41
|
+
enableNotificationMail: boolean;
|
|
31
42
|
/**
|
|
32
43
|
* Only for an AGENT, and only for the current ServiceApp. Absent for a SUPER_AGENT, on a screen
|
|
33
44
|
* without a current ServiceApp, for an app with the individual permission model (the fach module
|
|
@@ -36,36 +47,117 @@ interface ManagementRole {
|
|
|
36
47
|
*/
|
|
37
48
|
servicePermission?: ServicePermission;
|
|
38
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Seat, domicile or residence address of a customer account (eCH-0010 v8.1). Attributes without a
|
|
52
|
+
* value are left out.
|
|
53
|
+
*/
|
|
54
|
+
interface MainAddress {
|
|
55
|
+
/** First additional address line, for details that name a person, e.g. c/o. */
|
|
56
|
+
addressLine1?: string;
|
|
57
|
+
/** Second additional address line, for details that do not name a person. */
|
|
58
|
+
addressLine2?: string;
|
|
59
|
+
street?: string;
|
|
60
|
+
houseNumber?: string;
|
|
61
|
+
/** Post office box, either the number or the text. */
|
|
62
|
+
postOfficeBox?: string;
|
|
63
|
+
/** Swiss or foreign zip code, as text. */
|
|
64
|
+
zipCode: string;
|
|
65
|
+
town: string;
|
|
66
|
+
/** Canton abbreviation (eCH-0007), e.g. `ZH`. */
|
|
67
|
+
canton?: string;
|
|
68
|
+
/** BFS municipality number, 1 to 9999. */
|
|
69
|
+
gdeId?: string;
|
|
70
|
+
/** ISO 3166-1 alpha-2 country code. */
|
|
71
|
+
country: string;
|
|
72
|
+
emailAddress?: string;
|
|
73
|
+
/** Canonical E.164 form: `+` and at most 15 digits. */
|
|
74
|
+
phoneNumber?: string;
|
|
75
|
+
}
|
|
39
76
|
interface CustomerAccountBase {
|
|
40
77
|
id: string;
|
|
78
|
+
/**
|
|
79
|
+
* Short display name: `orgName` for an organization, `firstName lastName` for an individual.
|
|
80
|
+
* Not in the token: the header derives it, by the same rule as core-backend's
|
|
81
|
+
* `CustomerAccount.label`. A backend reading the raw `contextJwt` does not get it.
|
|
82
|
+
*/
|
|
41
83
|
label: string;
|
|
42
84
|
status: AccountVerificationStatus;
|
|
85
|
+
onboardingMethod: OnboardingMethod;
|
|
86
|
+
mainAddress: MainAddress;
|
|
43
87
|
managementRole: ManagementRole;
|
|
44
88
|
}
|
|
89
|
+
/** The attributes of an organization, shared by the ORGANIZATION and FOREIGN_ORGANIZATION accounts. */
|
|
90
|
+
interface OrganizationAttributes {
|
|
91
|
+
/** Name of the enterprise. */
|
|
92
|
+
orgName: string;
|
|
93
|
+
/** Four-digit BFS legal form code, e.g. `0106`. */
|
|
94
|
+
legalForm: string;
|
|
95
|
+
/**
|
|
96
|
+
* `CHE` + nine digits, e.g. `CHE114271588`. Absent while the organization has no UID register
|
|
97
|
+
* entry.
|
|
98
|
+
*/
|
|
99
|
+
uid?: string;
|
|
100
|
+
/**
|
|
101
|
+
* `uid` in its display form, e.g. `CHE-114.271.588`. Present exactly when `uid` is. Not in the
|
|
102
|
+
* token: the header derives it.
|
|
103
|
+
*/
|
|
104
|
+
uidFormatted?: string;
|
|
105
|
+
uidStatus?: RegisterEntryStatus;
|
|
106
|
+
/** CH-ID (commercial register number) as the register delivers it, without separators. */
|
|
107
|
+
chId?: string;
|
|
108
|
+
commercialRegisterStatus?: RegisterRelationStatus;
|
|
109
|
+
vatRegisterStatus?: RegisterRelationStatus;
|
|
110
|
+
/** Start of the VAT obligation: ISO-8601 date. */
|
|
111
|
+
vatStartOfObligation?: string;
|
|
112
|
+
/** VAT number as stated in the UID entry, without separators. */
|
|
113
|
+
vatUid?: string;
|
|
114
|
+
/**
|
|
115
|
+
* `vatUid` in its display form, e.g. `CHE-114.271.588`, without the MWST/TVA/IVA suffix. Present
|
|
116
|
+
* exactly when `vatUid` is. Not in the token: the header derives it.
|
|
117
|
+
*/
|
|
118
|
+
vatUidFormatted?: string;
|
|
119
|
+
}
|
|
45
120
|
/**
|
|
46
|
-
* A customer account of type ORGANIZATION. Decoded from the context JWT, signature unverified:
|
|
121
|
+
* A customer account of type ORGANIZATION. Decoded from the context JWT, signature unverified:
|
|
122
|
+
* safe to render, never to authorize.
|
|
47
123
|
*/
|
|
48
|
-
interface OrganizationAccount extends CustomerAccountBase {
|
|
124
|
+
interface OrganizationAccount extends CustomerAccountBase, OrganizationAttributes {
|
|
49
125
|
accountType: 'ORGANIZATION';
|
|
50
|
-
legalForm: string;
|
|
51
|
-
/** Absent while the organization has no UID register entry. */
|
|
52
|
-
uid?: string;
|
|
53
126
|
}
|
|
54
127
|
/**
|
|
55
128
|
* A customer account of type FOREIGN_ORGANIZATION: an organization domiciled abroad, carrying the
|
|
56
|
-
* same attributes as an ORGANIZATION. Decoded from the context JWT, signature unverified: safe to
|
|
129
|
+
* same attributes as an ORGANIZATION. Decoded from the context JWT, signature unverified: safe to
|
|
130
|
+
* render, never to authorize.
|
|
57
131
|
*/
|
|
58
|
-
interface ForeignOrganizationAccount extends CustomerAccountBase {
|
|
132
|
+
interface ForeignOrganizationAccount extends CustomerAccountBase, OrganizationAttributes {
|
|
59
133
|
accountType: 'FOREIGN_ORGANIZATION';
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
uid?: string;
|
|
134
|
+
/** Whether EasyGov, as the UID office, assigned the UID of the enterprise. */
|
|
135
|
+
uidProvidedByEasyGov: boolean;
|
|
63
136
|
}
|
|
64
137
|
/**
|
|
65
|
-
* A customer account of type INDIVIDUAL. Decoded from the context JWT, signature
|
|
138
|
+
* A customer account of type INDIVIDUAL. Personal data. Decoded from the context JWT, signature
|
|
139
|
+
* unverified: safe to render, never to authorize.
|
|
66
140
|
*/
|
|
67
141
|
interface IndividualAccount extends CustomerAccountBase {
|
|
68
142
|
accountType: 'INDIVIDUAL';
|
|
143
|
+
/** Official first name(s). */
|
|
144
|
+
firstName: string;
|
|
145
|
+
/** Official last name. */
|
|
146
|
+
lastName: string;
|
|
147
|
+
/** ISO-8601 date. */
|
|
148
|
+
dateOfBirth: string;
|
|
149
|
+
/** Two-letter country code (eCH-0008 / eCH-0072). */
|
|
150
|
+
nationality: string;
|
|
151
|
+
/**
|
|
152
|
+
* Extensible value list: `1` male, `2` female (eCH-0011). Treat an unknown value as if no sex
|
|
153
|
+
* were given.
|
|
154
|
+
*/
|
|
155
|
+
sex: string;
|
|
156
|
+
/**
|
|
157
|
+
* Official identity number as `<namespace>:<id>`, e.g. `CH.AHV:7560000000002`. The namespace is
|
|
158
|
+
* open for further values. Absent when not known.
|
|
159
|
+
*/
|
|
160
|
+
personIdentification?: string;
|
|
69
161
|
}
|
|
70
162
|
/**
|
|
71
163
|
* Discriminated on `accountType` — narrow before reading organization-only fields.
|
|
@@ -80,6 +172,7 @@ interface ServiceApp {
|
|
|
80
172
|
id: string;
|
|
81
173
|
/** URN (`urn_core_businessmodule_…`) of the BusinessModule that owns this ServiceApp. */
|
|
82
174
|
businessModuleId: string;
|
|
175
|
+
appType: ServiceAppType;
|
|
83
176
|
/** The fach module, not core, manages the Agents' rights for this ServiceApp. */
|
|
84
177
|
individualServicePermissionModel: boolean;
|
|
85
178
|
}
|
|
@@ -91,7 +184,9 @@ interface ServiceApp {
|
|
|
91
184
|
interface SelectedProcess {
|
|
92
185
|
id: string;
|
|
93
186
|
status: ProcessStatus;
|
|
94
|
-
|
|
187
|
+
/** Black/white outcome. Present only once the Behördengang has one, independent of `status`. */
|
|
188
|
+
resultInfo?: ProcessResultInfo;
|
|
189
|
+
serviceRequestAppId: string;
|
|
95
190
|
/**
|
|
96
191
|
* Global identifier of this process's own parent. Absent for a top-level Behördengang. This
|
|
97
192
|
* reference is the only representation of a selected process's parent: the context carries no
|
|
@@ -100,24 +195,18 @@ interface SelectedProcess {
|
|
|
100
195
|
parentProcessId?: string;
|
|
101
196
|
}
|
|
102
197
|
/**
|
|
103
|
-
* The authenticated user
|
|
198
|
+
* The authenticated user, as far as only core-backend knows it. Name, e-mail, roles, QoA, SSO
|
|
199
|
+
* session and IdP are not here: they are in the access token (`useEasygovSession().accessToken`).
|
|
104
200
|
* Decoded from the context JWT, signature unverified: safe to render, never to authorize.
|
|
105
201
|
*/
|
|
106
202
|
interface UserProfile {
|
|
107
203
|
id: string;
|
|
204
|
+
/** The eIAM identity (the access token's `name_identifier`); ties this context to that token. */
|
|
108
205
|
eiamIdentity: string;
|
|
109
|
-
eiamSSOsessionID: string;
|
|
110
|
-
qoA: number;
|
|
111
206
|
/** Whether the user has accepted the general terms and conditions. */
|
|
112
207
|
gtcAccepted: boolean;
|
|
113
208
|
/** When the user registered: ISO-8601 date-time, UTC. */
|
|
114
209
|
registerDate: string;
|
|
115
|
-
/** The IdP the user chose in eIAM, e.g. `externalIDP\AgovIDP`. */
|
|
116
|
-
idpUsed: string;
|
|
117
|
-
emailAddress?: string;
|
|
118
|
-
firstName?: string;
|
|
119
|
-
lastName?: string;
|
|
120
|
-
roles?: string[];
|
|
121
210
|
}
|
|
122
211
|
/**
|
|
123
212
|
* Decoded payload of `contextJwt`. The signature is NOT verified by EasygovHeader — the
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s,b as a,c as t,d as o}from"./chunk-
|
|
1
|
+
import{a as s,b as a,c as t,d as o}from"./chunk-3UU6OKOA.js";import"./chunk-SGE3GQLT.js";function i(){return a()}function g(e){t(e)}function r(e){return o(e)}function u(e){s(e)}export{i as getDisplayLanguage,u as setBusinessModuleVersion,g as setDisplayLanguage,r as subscribeDisplayLanguage};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easygov/web-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Framework-agnostic custom elements for EasyGov, wrapping @easygov/react-components as a self-contained browser bundle.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@easygov/eslint-config": "0.0.0",
|
|
46
|
-
"@easygov/react-components": "0.
|
|
46
|
+
"@easygov/react-components": "0.24.0",
|
|
47
47
|
"@easygov/typescript-config": "0.0.0",
|
|
48
48
|
"@types/node": "^26.0.0",
|
|
49
49
|
"@types/react": "19.3.3",
|