@visma-swno/customer-onboarding-wizard 1.0.2 → 1.0.4

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 CHANGED
@@ -26,7 +26,7 @@ npm install @visma-swno/customer-onboarding-wizard
26
26
  baseUrl="https://api.example.com"
27
27
  customerId="customer-67890"
28
28
  taskId="task-12345"
29
- locale="en-GB"
29
+ locale="en-US"
30
30
  step="welcome"
31
31
  adminUrl="https://admin.example.com/customer/user-access">
32
32
  </vsn-customer-onboarding-wizard>
@@ -48,7 +48,7 @@ import { CustomerOnboardingWizard } from '@visma-swno/customer-onboarding-wizard
48
48
  | `baseUrl` | String | `''` | **Yes** | Base URL for API calls (e.g., 'https://api.example.com') |
49
49
  | `taskId` | String | `''` | No | Onboarding task ID. Required for saving progress (`save and close`) and completing the wizard; omitting it skips those API calls |
50
50
  | `customerId` | String | `''` | **Yes** | Customer ID used to load company information in Step 1 (Company) |
51
- | `locale` | String | `'en-GB'` | No | Locale for translations (en-GB, en-US, da-DK, fi-FI, nb-NO, nl-NL, sv-SE) |
51
+ | `locale` | String | `'en-US'` | No | Locale for translations. Accepted values: `en-US`, `en-GB` (mapped to `en-US`), `da-DK`, `fi-FI`, `nb-NO`, `nl-NL`, `sv-SE` |
52
52
  | `step` | String | `'welcome'` | No | Initial step to navigate to: `welcome`, `company`, `administrators`, `partner-access`, `complete` |
53
53
  | `adminUrl` | String | `''` | No | Absolute `http`/`https` URL to redirect to after task cleanup when the user clicks "Go to Admin" on the completion step. Relative paths and other schemes are ignored and the wizard closes without redirecting. |
54
54
 
@@ -78,6 +78,7 @@ export declare class CustomerOnboardingWizard extends LitElement {
78
78
  private handleStartSetup;
79
79
  private handleNext;
80
80
  private handleComplete;
81
+ private handleWizardKeydown;
81
82
  private handleSaveAndClose;
82
83
  private handleEditCustomer;
83
84
  private navigate;
@@ -7,6 +7,7 @@ import { Translations } from '../../core/i18n.service';
7
7
  export declare class WizardStepComplete extends LitElement {
8
8
  translations: Translations;
9
9
  static styles: import('lit').CSSResult[];
10
+ protected firstUpdated(): void;
10
11
  private handleClose;
11
12
  private handleGoToAdmin;
12
13
  render(): import('lit-html').TemplateResult<1>;
@@ -8,6 +8,7 @@ export declare class WizardStepWelcome extends LitElement {
8
8
  userName: string;
9
9
  translations: Translations;
10
10
  static styles: import('lit').CSSResult[];
11
+ protected firstUpdated(): void;
11
12
  private handleStartSetup;
12
13
  private handleSaveAndClose;
13
14
  render(): import('lit-html').TemplateResult<1>;
@@ -35,6 +35,8 @@ export declare class WizardStep1Company extends LitElement {
35
35
  private selectCountry;
36
36
  private handleCountryFocusOut;
37
37
  private handleCountryKeydown;
38
+ private handleOptionKeydown;
39
+ protected firstUpdated(): void;
38
40
  protected updated(changedProperties: Map<PropertyKey, unknown>): void;
39
41
  private handleStepKeydown;
40
42
  render(): import('lit-html').TemplateResult<1>;
@@ -19,6 +19,7 @@ export declare class WizardStep2Administrators extends LitElement {
19
19
  private isConfirming;
20
20
  private rowErrors;
21
21
  private _loadSequence;
22
+ protected firstUpdated(): void;
22
23
  protected updated(changedProperties: Map<string, unknown>): void;
23
24
  private sortAdmins;
24
25
  private loadExistingAdmins;
@@ -41,6 +42,7 @@ export declare class WizardStep2Administrators extends LitElement {
41
42
  private validateAllRows;
42
43
  private lookupUser;
43
44
  private handleConfirm;
45
+ private handleAdminTableKeydown;
44
46
  private handleSaveAndClose;
45
47
  static styles: import('lit').CSSResult[];
46
48
  private renderExistingAdminRow;
@@ -18,6 +18,7 @@ export declare class WizardStep3PartnerAccess extends LitElement {
18
18
  private selectedIds;
19
19
  private searchTerm;
20
20
  private _loadSequence;
21
+ protected firstUpdated(): void;
21
22
  protected updated(changedProperties: Map<string, unknown>): void;
22
23
  private loadConsultants;
23
24
  private get filteredConsultants();
@@ -2,8 +2,11 @@
2
2
  * I18n Service
3
3
  * Handles internationalization for the customer onboarding wizard
4
4
  * Supported locales: da-DK, en-GB, en-US, fi-FI, nb-NO, nl-NL, sv-SE
5
+ * Note: en-GB is accepted but served using en-US translations.
5
6
  */
6
7
  export type SupportedLocale = 'da-DK' | 'en-GB' | 'en-US' | 'fi-FI' | 'nb-NO' | 'nl-NL' | 'sv-SE';
8
+ /** Locales that have a dedicated translations entry (en-GB is mapped to en-US). */
9
+ export type ResolvedLocale = Exclude<SupportedLocale, 'en-GB'>;
7
10
  export interface Translations {
8
11
  wizard: {
9
12
  title: string;
@@ -34,6 +37,7 @@ export interface Translations {
34
37
  postalCodeLabel: string;
35
38
  cityLabel: string;
36
39
  countryLabel: string;
40
+ countryLabelWithValue: string;
37
41
  webUrlLabel: string;
38
42
  emailLabel: string;
39
43
  editFormLabel: string;
@@ -60,6 +64,7 @@ export interface Translations {
60
64
  title: string;
61
65
  description: string;
62
66
  findConsultantPlaceholder: string;
67
+ noResultsFound: string;
63
68
  loading: string;
64
69
  confirmSingular: string;
65
70
  confirmPlural: string;
@@ -116,13 +121,15 @@ export declare class I18nService {
116
121
  private currentLocale;
117
122
  /**
118
123
  * Set the current locale
119
- * Returns true when the locale is supported, otherwise falls back to en-GB and returns false.
124
+ * Returns true when the locale is supported, otherwise falls back to en-US and returns false.
125
+ * Note: en-GB is mapped to en-US translations.
120
126
  */
121
127
  setLocale(locale: SupportedLocale | string): boolean;
122
128
  /**
123
129
  * Get the current locale
130
+ * Returns the resolved locale (en-GB is returned as 'en-US').
124
131
  */
125
- getLocale(): SupportedLocale;
132
+ getLocale(): ResolvedLocale;
126
133
  /**
127
134
  * Get translations for the current locale
128
135
  */