@visma-swno/customer-onboarding-wizard 1.0.0 → 1.0.2
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 +4 -2
- package/dist/button-styles.css.d.ts +5 -0
- package/dist/components/customer-onboarding-wizard/customer-onboarding-wizard.d.ts +98 -0
- package/dist/components/customer-onboarding-wizard/wizard-step-complete.d.ts +18 -0
- package/dist/components/customer-onboarding-wizard/wizard-step-welcome.d.ts +19 -0
- package/dist/components/customer-onboarding-wizard/wizard-step1-company.d.ts +46 -0
- package/dist/components/customer-onboarding-wizard/wizard-step2-administrators.d.ts +57 -0
- package/dist/components/customer-onboarding-wizard/wizard-step3-partner-access.d.ts +36 -0
- package/dist/core/http.service.d.ts +221 -0
- package/dist/core/i18n.service.d.ts +135 -0
- package/dist/core/icons.d.ts +21 -0
- package/dist/design-tokens.css.d.ts +6 -0
- package/dist/index.css.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2684 -0
- package/dist/step-styles.css.d.ts +1 -0
- package/package.json +5 -6
- package/dist/assets/Inter-Medium.woff2 +0 -0
- package/dist/assets/Inter-Regular.woff2 +0 -0
- package/dist/assets/Inter-SemiBold.woff2 +0 -0
- package/dist/assets/index.js +0 -2315
- package/dist/index.html +0 -182
package/dist/index.js
ADDED
|
@@ -0,0 +1,2684 @@
|
|
|
1
|
+
import { css as $, svg as v, LitElement as L, html as n, nothing as q } from "lit";
|
|
2
|
+
import { property as g, customElement as S, state as l } from "lit/decorators.js";
|
|
3
|
+
$`:root{--font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;--primary-color:#0066cc;--secondary-color:#6c757d;--success-color:#28a745;--danger-color:#dc3545;--warning-color:#ffc107;--info-color:#17a2b8;--background-color:#ffffff;--surface-color:#f8f9fa;--border-color:#dee2e6;--ga-text-primary:#212529;--ga-text-secondary:#6c757d;--spacing-xs:0.25rem;--spacing-sm:0.5rem;--spacing-md:1rem;--spacing-lg:1.5rem;--spacing-xl:2rem;--border-radius:4px;--box-shadow:0 2px 4px rgba(0,0,0,0.1);}*{box-sizing:border-box;}`;
|
|
4
|
+
const E = $`:host{--ga-color-black:#000;--ga-color-blue-10:#edf4fe;--ga-color-information-accent:var(--ga-color-utility-blue-accent);--ga-color-surface-information:var(--ga-color-information-accent);--ga-color-utility-blue-accent:var(--ga-color-blue-10);--ga-color-blue-40:#93bbf9;--ga-color-utility-blue:var(--ga-color-blue-40);--ga-color-blue-60:#366af6;--ga-color-border-information:var(--ga-color-information);--ga-color-icon-information:var(--ga-color-information);--ga-color-information:var(--ga-color-blue-60);--ga-color-border-action:var(--ga-color-primary);--ga-color-border-action-hover:var(--ga-color-primary-60);--ga-color-border-action-hover-2:var(--ga-color-secondary-30);--ga-color-border-disabled:var(--ga-color-neutral);--ga-color-border-error:var(--ga-color-error);--ga-color-border-focus:var(--ga-color-primary);--ga-color-border-primary:var(--ga-color-neutral-60);--ga-color-border-secondary:var(--ga-color-secondary-30);--ga-color-border-selected:var(--ga-color-green-60);--ga-color-border-success:var(--ga-color-success);--ga-color-border-tertiary:var(--ga-color-neutral);--ga-color-border-warning:var(--ga-color-warning);--ga-color-categorical-graph-01:#6769d8;--ga-color-categorical-graph-02:#479fc6;--ga-color-categorical-graph-03:var(--ga-color-teal-70);--ga-color-categorical-graph-04:#c0497d;--ga-color-categorical-graph-05:#041255;--ga-color-categorical-graph-06:#dc756b;--ga-color-categorical-graph-07:var(--ga-color-rose-40);--ga-color-categorical-graph-08:#984319;--ga-color-categorical-graph-09:var(--ga-color-indigo-40);--ga-color-categorical-graph-10:#610f08;--ga-color-cyan-60:#377ea0;--ga-color-icon-action-hover:var(--ga-color-primary-60);--ga-color-primary-60:var(--ga-color-cyan-60);--ga-color-surface-progress-2:var(--ga-color-primary-60);--ga-color-cyan-70:#2a6480;--ga-color-primary-70:var(--ga-color-cyan-70);--ga-color-surface-progress:var(--ga-color-primary-70);--ga-color-text-body-secondary:var(--ga-color-primary-70);--ga-color-cyan-80:#1f4e66;--ga-color-icon-action:var(--ga-color-primary);--ga-color-primary:var(--ga-color-cyan-80);--ga-color-surface-action:var(--ga-color-primary);--ga-color-text-action:var(--ga-color-primary);--ga-color-cyan-90:#133445;--ga-color-icon-primary:var(--ga-color-primary-90);--ga-color-primary-90:var(--ga-color-cyan-90);--ga-color-surface-action-hover:var(--ga-color-primary-90);--ga-color-text-action-hover:var(--ga-color-primary-90);--ga-color-text-body:var(--ga-color-primary-90);--ga-color-text-error:var(--ga-color-primary-90);--ga-color-text-headings:var(--ga-color-primary-90);--ga-color-text-information:var(--ga-color-primary-90);--ga-color-text-success:var(--ga-color-primary-90);--ga-color-text-warning:var(--ga-color-primary-90);--ga-color-diverging-graph-01:#281986;--ga-color-diverging-graph-02:#3d37a3;--ga-color-diverging-graph-03:#504fba;--ga-color-diverging-graph-04:#6769d8;--ga-color-diverging-graph-05:#8489f5;--ga-color-diverging-graph-06:var(--ga-color-indigo-40);--ga-color-diverging-graph-07:#c5cbfb;--ga-color-diverging-graph-08:var(--ga-color-indigo-10);--ga-color-diverging-graph-09:var(--ga-color-teal-30);--ga-color-diverging-graph-10:var(--ga-color-teal-40);--ga-color-diverging-graph-11:var(--ga-color-teal-50);--ga-color-diverging-graph-12:var(--ga-color-teal-60);--ga-color-diverging-graph-13:var(--ga-color-teal-70);--ga-color-diverging-graph-14:var(--ga-color-teal-80);--ga-color-diverging-graph-15:var(--ga-color-teal-90);--ga-color-error:var(--ga-color-red-60);--ga-color-icon-error:var(--ga-color-error);--ga-color-error-accent:var(--ga-color-utility-red-accent);--ga-color-green-10:#eef5ee;--ga-color-success-accent:var(--ga-color-utility-green-accent);--ga-color-surface-selected:var(--ga-color-green-10);--ga-color-surface-success:var(--ga-color-success-accent);--ga-color-utility-green-accent:var(--ga-color-green-10);--ga-color-green-40:#9bc59b;--ga-color-utility-green:var(--ga-color-green-40);--ga-color-green-60:#448548;--ga-color-icon-success:var(--ga-color-success);--ga-color-success:var(--ga-color-green-60);--ga-color-grey-10:#f2f2f2;--ga-color-utility-grey-accent:var(--ga-color-grey-10);--ga-color-grey-40:#b9b9b9;--ga-color-text-disabled:var(--ga-color-utility-grey);--ga-color-utility-grey:var(--ga-color-grey-40);--ga-color-icon-disabled:var(--ga-color-neutral);--ga-color-icon-on-action:var(--ga-color-secondary);--ga-color-icon-on-disabled:var(--ga-color-neutral-60);--ga-color-icon-on-primary:var(--ga-color-white);--ga-color-icon-warning:var(--ga-color-warning);--ga-color-indigo-10:#f0f2fe;--ga-color-utility-indigo-accent:var(--ga-color-indigo-10);--ga-color-indigo-40:#adb4f9;--ga-color-utility-indigo:var(--ga-color-indigo-40);--ga-color-lime-10:#edf6dd;--ga-color-utility-lime-accent:var(--ga-color-lime-10);--ga-color-lime-40:#a5c656;--ga-color-utility-lime:var(--ga-color-lime-40);--ga-color-miscellaneous-overlay:#70778891;--ga-color-miscellaneous-skeleton-element:var(--ga-color-neutral-10);--ga-color-miscellaneous-skeleton-highlight:var(--ga-color-neutral-20);--ga-color-neutral:var(--ga-color-neutral-30);--ga-color-neutral-10:#f2f3f5;--ga-color-surface-page:var(--ga-color-neutral-10);--ga-color-neutral-20:#e2e4e9;--ga-color-surface-container:var(--ga-color-neutral-20);--ga-color-surface-disabled:var(--ga-color-neutral-20);--ga-color-neutral-30:#cccfd7;--ga-color-neutral-60:#6f7687;--ga-color-surface-disable-selected:var(--ga-color-neutral-60);--ga-color-text-disable-selected:var(--ga-color-neutral-60);--ga-color-text-on-disabled:var(--ga-color-neutral-60);--ga-color-orange-10:#fcf0e7;--ga-color-secondary-10:var(--ga-color-orange-10);--ga-color-surface-warning:var(--ga-color-utility-orange-accent);--ga-color-text-on-action:var(--ga-color-secondary-10);--ga-color-utility-orange-accent:var(--ga-color-orange-10);--ga-color-warning-accent:var(--ga-color-utility-orange-accent);--ga-color-orange-20:#fae0ce;--ga-color-secondary:var(--ga-color-orange-20);--ga-color-surface-action-hover-2:var(--ga-color-orange-20);--ga-color-text-menu:var(--ga-color-secondary);--ga-color-orange-30:#f5c3a1;--ga-color-secondary-30:var(--ga-color-orange-30);--ga-color-surface-highlight:var(--ga-color-secondary-30);--ga-color-orange-40:#f2a676;--ga-color-utility-orange:var(--ga-color-orange-40);--ga-color-orange-60:#bb5822;--ga-color-warning:var(--ga-color-orange-60);--ga-color-pink-10:#fbeefc;--ga-color-utility-pink-accent:var(--ga-color-pink-10);--ga-color-pink-40:#e79dee;--ga-color-utility-pink:var(--ga-color-pink-40);--ga-color-purple-10:#f3f1fe;--ga-color-utility-purple-accent:var(--ga-color-purple-10);--ga-color-purple-40:#c3acf9;--ga-color-utility-purple:var(--ga-color-purple-40);--ga-color-purple-80:#591ab5;--ga-color-text-link-visited:var(--ga-color-purple-80);--ga-color-red-10:#fcf1ee;--ga-color-surface-error:var(--ga-color-utility-red-accent);--ga-color-utility-red-accent:var(--ga-color-red-10);--ga-color-red-40:#eca79e;--ga-color-utility-red:var(--ga-color-red-40);--ga-color-red-60:#cc453e;--ga-color-rose-10:#fcf0f4;--ga-color-utility-rose-accent:var(--ga-color-rose-10);--ga-color-rose-40:#efa1bd;--ga-color-utility-rose:var(--ga-color-rose-40);--ga-color-sequential-graph-10:var(--ga-color-teal-10);--ga-color-sequential-graph-20:var(--ga-color-teal-20);--ga-color-sequential-graph-30:var(--ga-color-teal-30);--ga-color-sequential-graph-40:var(--ga-color-teal-40);--ga-color-sequential-graph-50:var(--ga-color-teal-50);--ga-color-sequential-graph-60:var(--ga-color-teal-60);--ga-color-sequential-graph-70:var(--ga-color-teal-70);--ga-color-sequential-graph-80:var(--ga-color-teal-80);--ga-color-sequential-graph-90:var(--ga-color-teal-90);--ga-color-sequential-graph-100:var(--ga-color-teal-100);--ga-color-surface-primary:var(--ga-color-white);--ga-color-teal-10:#ecf5f4;--ga-color-utility-teal-accent:var(--ga-color-teal-10);--ga-color-teal-20:#d5e8e6;--ga-color-teal-30:#b4d7d4;--ga-color-teal-40:#92c3c0;--ga-color-utility-teal:var(--ga-color-teal-40);--ga-color-teal-50:#51a39e;--ga-color-teal-60:#3a837e;--ga-color-teal-70:#2c6764;--ga-color-teal-80:#21514e;--ga-color-teal-90:#143734;--ga-color-teal-100:#081f1f;--ga-color-white:#fff;--ga-duration-0:0ms;--ga-duration-fast:100ms;--ga-transition-state:var(--ga-duration-fast) 0ms var(--ga-easing-standard);--ga-duration-instant:50ms;--ga-transition-hover:var(--ga-duration-instant) 0ms var(--ga-easing-standard);--ga-duration-moderate:150ms;--ga-transition-dismiss:var(--ga-duration-moderate) 0ms var(--ga-easing-exit);--ga-transition-reveal:var(--ga-duration-moderate) 0ms var(--ga-easing-entrance);--ga-duration-slow:250ms;--ga-transition-overlay-in:var(--ga-duration-slow) 0ms var(--ga-easing-entrance);--ga-transition-overlay-out:var(--ga-duration-slow) 0ms var(--ga-easing-exit);--ga-duration-slower:400ms;--ga-transition-backdrop:var(--ga-duration-slower) 0ms var(--ga-easing-standard);--ga-easing-entrance:cubic-bezier(0,0,0.38,0.9);--ga-easing-exit:cubic-bezier(0.2,0,1,0.9);--ga-easing-standard:cubic-bezier(0.2,0,0.38,0.9);--ga-font-family-primary:"Inter",system-ui,sans-serif;--ga-font-weight-bold:700;--ga-font-weight-medium:500;--ga-font-weight-normal:400;--ga-font-weight-semibold:600;--ga-radius:4px;--ga-radius-round:999px;--ga-radius-sharp:0.02rem;--ga-shadow-east:-2px 0 5px 0 #1334451a,-8px 0 8px 0 #13344517,-19px 0 11px 0 #1334450d,-34px 0 14px 0 #13344503,-53px 0 15px 0 #13344500;--ga-shadow-north:0 4px 8px 0 #1334451a,0 15px 15px 0 #13344517,0 34px 21px 0 #1334450d,0 61px 24px 0 #13344503,0 95px 27px 0 #13344500;--ga-shadow-south:0 -1px 1px 0 #13344514,0 -2px 2px 0 #13344512,0 -6px 3px 0 #1334450a,0 -10px 4px 0 #13344503,0 -15px 4px 0 #13344500;--ga-shadow-west:1px 0 3px 0 #1334451a,5px 0 5px 0 #13344517,12px 0 7px 0 #1334450d,21px 0 8px 0 #13344503,33px 0 9px 0 #13344500;--ga-size-0:0;--ga-size-1:0.0625rem;--ga-size-2:0.125rem;--ga-size-4:0.25rem;--ga-size-6:0.375rem;--ga-size-8:0.5rem;--ga-size-10:0.625rem;--ga-size-11:0.6875rem;--ga-size-12:0.75rem;--ga-size-14:0.875rem;--ga-size-16:1rem;--ga-size-18:1.125rem;--ga-size-20:1.25rem;--ga-size-24:1.5rem;--ga-size-28:1.75rem;--ga-size-32:2rem;--ga-size-36:2.25rem;--ga-size-40:2.5rem;--ga-size-44:2.75rem;--ga-size-48:3rem;--ga-size-56:3.5rem;--ga-size-64:4rem;--ga-size-80:5rem;--ga-size-96:6rem;--ga-size-112:7rem;--ga-size-128:8rem;--ga-size-144:9rem;--ga-size-160:10rem;--ga-size-192:12rem;--ga-size-224:14rem;--ga-size-256:16rem;--ga-size-288:18rem;--ga-size-320:20rem;--ga-size-352:22rem;--ga-size-384:24rem;--ga-size-416:26rem;--ga-size-border-width-lg:4px;--ga-size-border-width-md:2px;--ga-size-border-width-none:0;--ga-size-border-width-sm:1px;--ga-size-spacing-00:0;--ga-size-spacing-01:0.125rem;--ga-size-spacing-02:0.25rem;--ga-size-spacing-03:0.5rem;--ga-size-spacing-04:0.75rem;--ga-size-spacing-05:1rem;--ga-size-spacing-06:1.5rem;--ga-size-spacing-07:2rem;--ga-size-spacing-08:2.5rem;--ga-size-spacing-09:3rem;--ga-size-spacing-10:4rem;--ga-size-spacing-11:5rem;--ga-size-spacing-12:6rem;--ga-size-spacing-13:10rem;--ga-text-2xl-font-size:1.5rem;--ga-text-2xl-font-style:normal;--ga-text-2xl-line-height:2rem;--ga-text-2xl-font-family:inherit;--ga-text-2xl-font-weight:400;--ga-text-2xl-letter-spacing:-0.019rem;--ga-text-2xl:var(--ga-text-2xl-font-style) var(--ga-text-2xl-font-weight) var(--ga-text-2xl-font-size)/var(--ga-text-2xl-line-height) var(--ga-text-2xl-font-family);--ga-text-3xl-font-size:2rem;--ga-text-3xl-font-style:normal;--ga-text-3xl-line-height:2.5rem;--ga-text-3xl-font-family:inherit;--ga-text-3xl-font-weight:400;--ga-text-3xl-letter-spacing:-0.022rem;--ga-text-3xl:var(--ga-text-3xl-font-style) var(--ga-text-3xl-font-weight) var(--ga-text-3xl-font-size)/var(--ga-text-3xl-line-height) var(--ga-text-3xl-font-family);--ga-text-lg-font-size:1rem;--ga-text-lg-font-style:normal;--ga-text-lg-line-height:1.5rem;--ga-text-lg-font-family:inherit;--ga-text-lg-font-weight:400;--ga-text-lg-letter-spacing:-0.011rem;--ga-text-lg:var(--ga-text-lg-font-style) var(--ga-text-lg-font-weight) var(--ga-text-lg-font-size)/var(--ga-text-lg-line-height) var(--ga-text-lg-font-family);--ga-text-md-font-size:0.875rem;--ga-text-md-font-style:normal;--ga-text-md-line-height:1.25rem;--ga-text-md-font-family:inherit;--ga-text-md-font-weight:400;--ga-text-md-letter-spacing:-0.006rem;--ga-text-md:var(--ga-text-md-font-style) var(--ga-text-md-font-weight) var(--ga-text-md-font-size)/var(--ga-text-md-line-height) var(--ga-text-md-font-family);--ga-text-sm-font-size:0.75rem;--ga-text-sm-font-style:normal;--ga-text-sm-line-height:1.25rem;--ga-text-sm-font-family:inherit;--ga-text-sm-font-weight:400;--ga-text-sm-letter-spacing:0;--ga-text-sm:var(--ga-text-sm-font-style) var(--ga-text-sm-font-weight) var(--ga-text-sm-font-size)/var(--ga-text-sm-line-height) var(--ga-text-sm-font-family);--ga-text-xl-font-size:1.125rem;--ga-text-xl-font-style:normal;--ga-text-xl-line-height:1.5rem;--ga-text-xl-font-family:inherit;--ga-text-xl-font-weight:400;--ga-text-xl-letter-spacing:-0.017rem;--ga-text-xl:var(--ga-text-xl-font-style) var(--ga-text-xl-font-weight) var(--ga-text-xl-font-size)/var(--ga-text-xl-line-height) var(--ga-text-xl-font-family);--ga-text-xs-font-size:0.6875rem;--ga-text-xs-font-style:normal;--ga-text-xs-line-height:1rem;--ga-text-xs-font-family:inherit;--ga-text-xs-font-weight:400;--ga-text-xs-letter-spacing:0.005rem;--ga-text-xs:var(--ga-text-xs-font-style) var(--ga-text-xs-font-weight) var(--ga-text-xs-font-size)/var(--ga-text-xs-line-height) var(--ga-text-xs-font-family);--vsn-customer-onboarding-wizard-font-family:var(--font-family,Inter,ui-sans-serif,system-ui,sans-serif);--ga-text-sm-size:var(--ga-text-sm-font-size);--ga-text-md-size:var(--ga-text-md-font-size);--ga-text-md-tracking:var(--ga-text-md-letter-spacing);--ga-text-xl-size:var(--ga-text-xl-font-size);--ga-text-xl-tracking:var(--ga-text-xl-letter-spacing);--ga-text-2xl-size:var(--ga-text-2xl-font-size);--ga-text-2xl-tracking:var(--ga-text-2xl-letter-spacing);--ga-size-content-2xs:11.25rem;--ga-size-content-xs:15rem;--ga-size-content-sm:22.5rem;--ga-color-utility-green-light:var(--ga-color-green-10);--ga-shadow-dropdown:var(--ga-shadow-south);}@media (width >= 48rem){:host{--ga-text-2xl-font-size:1.5rem;--ga-text-2xl-font-style:normal;--ga-text-2xl-line-height:2.5rem;--ga-text-2xl-font-family:inherit;--ga-text-2xl-font-weight:400;--ga-text-2xl-letter-spacing:-0.019rem;--ga-text-2xl:var(--ga-text-2xl-font-style) var(--ga-text-2xl-font-weight) var(--ga-text-2xl-font-size)/var(--ga-text-2xl-line-height) var(--ga-text-2xl-font-family);--ga-text-3xl-font-size:2.25rem;--ga-text-3xl-font-style:normal;--ga-text-3xl-line-height:3rem;--ga-text-3xl-font-family:inherit;--ga-text-3xl-font-weight:400;--ga-text-3xl-letter-spacing:-0.022rem;--ga-text-3xl:var(--ga-text-3xl-font-style) var(--ga-text-3xl-font-weight) var(--ga-text-3xl-font-size)/var(--ga-text-3xl-line-height) var(--ga-text-3xl-font-family);--ga-text-xl-font-size:1.25rem;--ga-text-xl-font-style:normal;--ga-text-xl-line-height:2rem;--ga-text-xl-font-family:inherit;--ga-text-xl-font-weight:400;--ga-text-xl-letter-spacing:-0.017rem;--ga-text-xl:var(--ga-text-xl-font-style) var(--ga-text-xl-font-weight) var(--ga-text-xl-font-size)/var(--ga-text-xl-line-height) var(--ga-text-xl-font-family);}}`, d = {
|
|
5
|
+
circle: () => v`
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
7
|
+
<circle cx="12" cy="12" r="10"/>
|
|
8
|
+
</svg>
|
|
9
|
+
`,
|
|
10
|
+
circleDashed: () => v`
|
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
12
|
+
<path d="M10.1 2.18a9.93 9.93 0 0 1 3.8 0"/>
|
|
13
|
+
<path d="M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7"/>
|
|
14
|
+
<path d="M21.82 10.1a9.93 9.93 0 0 1 0 3.8"/>
|
|
15
|
+
<path d="M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69"/>
|
|
16
|
+
<path d="M13.9 21.82a9.94 9.94 0 0 1-3.8 0"/>
|
|
17
|
+
<path d="M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7"/>
|
|
18
|
+
<path d="M2.18 13.9a9.93 9.93 0 0 1 0-3.8"/>
|
|
19
|
+
<path d="M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69"/>
|
|
20
|
+
</svg>
|
|
21
|
+
`,
|
|
22
|
+
check: () => v`
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
24
|
+
<path d="M20 6 9 17l-5-5"/>
|
|
25
|
+
</svg>
|
|
26
|
+
`,
|
|
27
|
+
circleDotDashed: () => v`
|
|
28
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
29
|
+
<path d="M10.1 2.18a9.93 9.93 0 0 1 3.8 0"/>
|
|
30
|
+
<path d="M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7"/>
|
|
31
|
+
<path d="M21.82 10.1a9.93 9.93 0 0 1 0 3.8"/>
|
|
32
|
+
<path d="M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69"/>
|
|
33
|
+
<path d="M13.9 21.82a9.94 9.94 0 0 1-3.8 0"/>
|
|
34
|
+
<path d="M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7"/>
|
|
35
|
+
<path d="M2.18 13.9a9.93 9.93 0 0 1 0-3.8"/>
|
|
36
|
+
<path d="M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69"/>
|
|
37
|
+
<circle cx="12" cy="12" r="1"/>
|
|
38
|
+
</svg>
|
|
39
|
+
`,
|
|
40
|
+
circleCheckBig: () => v`
|
|
41
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
42
|
+
<path d="M21.801 10A10 10 0 1 1 17 3.335"/>
|
|
43
|
+
<path d="m9 11 3 3L22 4"/>
|
|
44
|
+
</svg>
|
|
45
|
+
`,
|
|
46
|
+
octagonAlert: () => v`
|
|
47
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
48
|
+
<path d="M12 16h.01"/>
|
|
49
|
+
<path d="M12 8v4"/>
|
|
50
|
+
<path d="M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z"/>
|
|
51
|
+
</svg>
|
|
52
|
+
`,
|
|
53
|
+
x: () => v`
|
|
54
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
55
|
+
<path d="M18 6 6 18"/>
|
|
56
|
+
<path d="m6 6 12 12"/>
|
|
57
|
+
</svg>
|
|
58
|
+
`,
|
|
59
|
+
pencil: () => v`
|
|
60
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
61
|
+
<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/>
|
|
62
|
+
<path d="m15 5 4 4"/>
|
|
63
|
+
</svg>
|
|
64
|
+
`,
|
|
65
|
+
info: () => v`
|
|
66
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
67
|
+
<circle cx="12" cy="12" r="10"/>
|
|
68
|
+
<path d="M12 16v-4"/>
|
|
69
|
+
<path d="M12 8h.01"/>
|
|
70
|
+
</svg>
|
|
71
|
+
`,
|
|
72
|
+
chevronDown: () => v`
|
|
73
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
74
|
+
<path d="m6 9 6 6 6-6"/>
|
|
75
|
+
</svg>
|
|
76
|
+
`,
|
|
77
|
+
trash: () => v`
|
|
78
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
79
|
+
<polyline points="3 6 5 6 21 6"/>
|
|
80
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/>
|
|
81
|
+
<line x1="10" y1="11" x2="10" y2="17"/>
|
|
82
|
+
<line x1="14" y1="11" x2="14" y2="17"/>
|
|
83
|
+
</svg>
|
|
84
|
+
`,
|
|
85
|
+
userRound: () => v`
|
|
86
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
87
|
+
<circle cx="12" cy="8" r="5"/>
|
|
88
|
+
<path d="M20 21a8 8 0 0 0-16 0"/>
|
|
89
|
+
</svg>
|
|
90
|
+
`,
|
|
91
|
+
plus: () => v`
|
|
92
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
93
|
+
<path d="M5 12h14"/>
|
|
94
|
+
<path d="M12 5v14"/>
|
|
95
|
+
</svg>
|
|
96
|
+
`,
|
|
97
|
+
search: () => v`
|
|
98
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
99
|
+
<circle cx="11" cy="11" r="8"/>
|
|
100
|
+
<path d="m21 21-4.3-4.3"/>
|
|
101
|
+
</svg>
|
|
102
|
+
`
|
|
103
|
+
}, I = {
|
|
104
|
+
"en-GB": {
|
|
105
|
+
wizard: {
|
|
106
|
+
title: "Set up your company"
|
|
107
|
+
},
|
|
108
|
+
steps: {
|
|
109
|
+
company: "Company",
|
|
110
|
+
administrators: "Administrators",
|
|
111
|
+
partnerAccess: "Partner Access",
|
|
112
|
+
progressLabel: "Setup progress"
|
|
113
|
+
},
|
|
114
|
+
welcome: {
|
|
115
|
+
greeting: "Welcome to Visma Software,",
|
|
116
|
+
description: "Let's get your company account ready. This setup takes about 5 minutes and helps you hit the ground running."
|
|
117
|
+
},
|
|
118
|
+
company: {
|
|
119
|
+
title: "Your company",
|
|
120
|
+
description: "Confirm your company details. This information will be used for your profile and system identity. You can always edit this later in settings.",
|
|
121
|
+
placeholder: "Company information placeholder",
|
|
122
|
+
contactLabel: "Contact",
|
|
123
|
+
editContactLabel: "Edit contact",
|
|
124
|
+
subscriptionLabel: "Your subscription includes",
|
|
125
|
+
address2Placeholder: "Address Line 2 (Optional)",
|
|
126
|
+
saveChanges: "Save changes",
|
|
127
|
+
cancelEdit: "Cancel",
|
|
128
|
+
companyNameLabel: "Company name",
|
|
129
|
+
organizationNumberLabel: "Organization number",
|
|
130
|
+
address1Label: "Address",
|
|
131
|
+
postalCodeLabel: "Postal code",
|
|
132
|
+
cityLabel: "City",
|
|
133
|
+
countryLabel: "Country",
|
|
134
|
+
webUrlLabel: "Website",
|
|
135
|
+
emailLabel: "Email",
|
|
136
|
+
editFormLabel: "Edit company details",
|
|
137
|
+
addressGroupLabel: "Postal code and city",
|
|
138
|
+
managePlanMessage: "Manage your plan by reaching out to your partner {partnerName}.",
|
|
139
|
+
fieldRequired: "This field is required.",
|
|
140
|
+
emailInvalid: "Please enter a valid email address."
|
|
141
|
+
},
|
|
142
|
+
administrators: {
|
|
143
|
+
title: "Administrators",
|
|
144
|
+
description: "Invite colleagues to help manage your company account and users. You can always add more administrators or adjust permissions later in the Admin settings.",
|
|
145
|
+
addAdministratorButton: "Add Administrator",
|
|
146
|
+
addNameButton: "Add name",
|
|
147
|
+
firstNameLabel: "First name",
|
|
148
|
+
lastNameLabel: "Last name",
|
|
149
|
+
youLabel: "You",
|
|
150
|
+
deleteRowLabel: "Delete administrator",
|
|
151
|
+
confirmSingular: "Confirm {count} Administrator",
|
|
152
|
+
confirmPlural: "Confirm {count} Administrators",
|
|
153
|
+
doneButton: "Done",
|
|
154
|
+
editButton: "Edit"
|
|
155
|
+
},
|
|
156
|
+
partnerAccess: {
|
|
157
|
+
title: "Give access to consultants",
|
|
158
|
+
description: "Invite consultants from {partnerName}, and give them access to help you configure the system. You can manage or revoke their access at any time.",
|
|
159
|
+
findConsultantPlaceholder: "Find consultant",
|
|
160
|
+
loading: "Loading consultants...",
|
|
161
|
+
confirmSingular: "Confirm {count} consultant",
|
|
162
|
+
confirmPlural: "Confirm {count} consultants"
|
|
163
|
+
},
|
|
164
|
+
complete: {
|
|
165
|
+
title: "Setup complete!",
|
|
166
|
+
message1: "We have invited your administrators and partners to join you. Your company is now ready.",
|
|
167
|
+
message2: "Please see our admin page to see where you can make further changes.",
|
|
168
|
+
goToAdminButton: "Go to Admin Page"
|
|
169
|
+
},
|
|
170
|
+
common: {
|
|
171
|
+
saveAndClose: "Save and close",
|
|
172
|
+
startSetup: "Start Set Up",
|
|
173
|
+
confirm: "Confirm",
|
|
174
|
+
close: "Close",
|
|
175
|
+
loading: "Loading customer information...",
|
|
176
|
+
dismissError: "Dismiss error"
|
|
177
|
+
},
|
|
178
|
+
errors: {
|
|
179
|
+
invalidRequest: {
|
|
180
|
+
title: "Invalid Request",
|
|
181
|
+
message: "Invalid request. Please check your input."
|
|
182
|
+
},
|
|
183
|
+
validationError: {
|
|
184
|
+
title: "Validation Error",
|
|
185
|
+
message: "Validation error. Please check your input."
|
|
186
|
+
},
|
|
187
|
+
notFound: {
|
|
188
|
+
title: "Not Found",
|
|
189
|
+
message: "Resource not found."
|
|
190
|
+
},
|
|
191
|
+
serverError: {
|
|
192
|
+
title: "Server Error",
|
|
193
|
+
message: "Server error. Please try again later."
|
|
194
|
+
},
|
|
195
|
+
requestTimeout: {
|
|
196
|
+
title: "Request Timeout",
|
|
197
|
+
message: "Request timeout. Please try again."
|
|
198
|
+
},
|
|
199
|
+
networkError: {
|
|
200
|
+
title: "Network Error",
|
|
201
|
+
message: "Network error. Please check your connection."
|
|
202
|
+
},
|
|
203
|
+
requestFailed: {
|
|
204
|
+
title: "Request Failed",
|
|
205
|
+
message: "Request failed. Please try again."
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"en-US": {
|
|
210
|
+
wizard: {
|
|
211
|
+
title: "Set up your company"
|
|
212
|
+
},
|
|
213
|
+
steps: {
|
|
214
|
+
company: "Company",
|
|
215
|
+
administrators: "Administrators",
|
|
216
|
+
partnerAccess: "Partner Access",
|
|
217
|
+
progressLabel: "Setup progress"
|
|
218
|
+
},
|
|
219
|
+
welcome: {
|
|
220
|
+
greeting: "Welcome to Visma Software,",
|
|
221
|
+
description: "Let's get your company account ready. This setup takes about 5 minutes and helps you hit the ground running."
|
|
222
|
+
},
|
|
223
|
+
company: {
|
|
224
|
+
title: "Your company",
|
|
225
|
+
description: "Confirm your company details. This information will be used for your profile and system identity. You can always edit this later in settings.",
|
|
226
|
+
placeholder: "Company information placeholder",
|
|
227
|
+
contactLabel: "Contact",
|
|
228
|
+
editContactLabel: "Edit contact",
|
|
229
|
+
subscriptionLabel: "Your subscription includes",
|
|
230
|
+
address2Placeholder: "Address Line 2 (Optional)",
|
|
231
|
+
saveChanges: "Save changes",
|
|
232
|
+
cancelEdit: "Cancel",
|
|
233
|
+
companyNameLabel: "Company name",
|
|
234
|
+
organizationNumberLabel: "Organization number",
|
|
235
|
+
address1Label: "Address",
|
|
236
|
+
postalCodeLabel: "Postal code",
|
|
237
|
+
cityLabel: "City",
|
|
238
|
+
countryLabel: "Country",
|
|
239
|
+
webUrlLabel: "Website",
|
|
240
|
+
emailLabel: "Email",
|
|
241
|
+
editFormLabel: "Edit company details",
|
|
242
|
+
addressGroupLabel: "Postal code and city",
|
|
243
|
+
managePlanMessage: "Manage your plan by reaching out to your partner {partnerName}.",
|
|
244
|
+
fieldRequired: "This field is required.",
|
|
245
|
+
emailInvalid: "Please enter a valid email address."
|
|
246
|
+
},
|
|
247
|
+
administrators: {
|
|
248
|
+
title: "Administrators",
|
|
249
|
+
description: "Invite colleagues to help manage your company account and users. You can always add more administrators or adjust permissions later in the Admin settings.",
|
|
250
|
+
addAdministratorButton: "Add Administrator",
|
|
251
|
+
addNameButton: "Add name",
|
|
252
|
+
firstNameLabel: "First name",
|
|
253
|
+
lastNameLabel: "Last name",
|
|
254
|
+
youLabel: "You",
|
|
255
|
+
deleteRowLabel: "Delete administrator",
|
|
256
|
+
confirmSingular: "Confirm {count} Administrator",
|
|
257
|
+
confirmPlural: "Confirm {count} Administrators",
|
|
258
|
+
doneButton: "Done",
|
|
259
|
+
editButton: "Edit"
|
|
260
|
+
},
|
|
261
|
+
partnerAccess: {
|
|
262
|
+
title: "Give access to consultants",
|
|
263
|
+
description: "Invite consultants from {partnerName}, and give them access to help you configure the system. You can manage or revoke their access at any time.",
|
|
264
|
+
findConsultantPlaceholder: "Find consultant",
|
|
265
|
+
loading: "Loading consultants...",
|
|
266
|
+
confirmSingular: "Confirm {count} consultant",
|
|
267
|
+
confirmPlural: "Confirm {count} consultants"
|
|
268
|
+
},
|
|
269
|
+
complete: {
|
|
270
|
+
title: "Setup complete!",
|
|
271
|
+
message1: "We have invited your administrators and partners to join you. Your company is now ready.",
|
|
272
|
+
message2: "Please see our admin page to see where you can make further changes.",
|
|
273
|
+
goToAdminButton: "Go to Admin Page"
|
|
274
|
+
},
|
|
275
|
+
common: {
|
|
276
|
+
saveAndClose: "Save and close",
|
|
277
|
+
startSetup: "Start Set Up",
|
|
278
|
+
confirm: "Confirm",
|
|
279
|
+
close: "Close",
|
|
280
|
+
loading: "Loading customer information...",
|
|
281
|
+
dismissError: "Dismiss error"
|
|
282
|
+
},
|
|
283
|
+
errors: {
|
|
284
|
+
invalidRequest: {
|
|
285
|
+
title: "Invalid Request",
|
|
286
|
+
message: "Invalid request. Please check your input."
|
|
287
|
+
},
|
|
288
|
+
validationError: {
|
|
289
|
+
title: "Validation Error",
|
|
290
|
+
message: "Validation error. Please check your input."
|
|
291
|
+
},
|
|
292
|
+
notFound: {
|
|
293
|
+
title: "Not Found",
|
|
294
|
+
message: "Resource not found."
|
|
295
|
+
},
|
|
296
|
+
serverError: {
|
|
297
|
+
title: "Server Error",
|
|
298
|
+
message: "Server error. Please try again later."
|
|
299
|
+
},
|
|
300
|
+
requestTimeout: {
|
|
301
|
+
title: "Request Timeout",
|
|
302
|
+
message: "Request timeout. Please try again."
|
|
303
|
+
},
|
|
304
|
+
networkError: {
|
|
305
|
+
title: "Network Error",
|
|
306
|
+
message: "Network error. Please check your connection."
|
|
307
|
+
},
|
|
308
|
+
requestFailed: {
|
|
309
|
+
title: "Request Failed",
|
|
310
|
+
message: "Request failed. Please try again."
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"da-DK": {
|
|
315
|
+
wizard: {
|
|
316
|
+
title: "Konfigurer din virksomhed"
|
|
317
|
+
},
|
|
318
|
+
steps: {
|
|
319
|
+
company: "Virksomhed",
|
|
320
|
+
administrators: "Administratorer",
|
|
321
|
+
partnerAccess: "Partneradgang",
|
|
322
|
+
progressLabel: "Opsætningsfremgang"
|
|
323
|
+
},
|
|
324
|
+
welcome: {
|
|
325
|
+
greeting: "Velkommen til Visma Software,",
|
|
326
|
+
description: "Lad os få din virksomhedskonto klar. Denne opsætning tager omkring 5 minutter og hjælper dig med at komme godt i gang."
|
|
327
|
+
},
|
|
328
|
+
company: {
|
|
329
|
+
title: "Din virksomhed",
|
|
330
|
+
description: "Bekræft dine virksomhedsoplysninger. Disse oplysninger vil blive brugt til din profil og systemidentitet. Du kan altid redigere dette senere i indstillingerne.",
|
|
331
|
+
placeholder: "Virksomhedsoplysninger pladsholder",
|
|
332
|
+
contactLabel: "Kontakt",
|
|
333
|
+
editContactLabel: "Rediger kontakt",
|
|
334
|
+
subscriptionLabel: "Dit abonnement inkluderer",
|
|
335
|
+
address2Placeholder: "Adresselinje 2 (Valgfri)",
|
|
336
|
+
saveChanges: "Gem ændringer",
|
|
337
|
+
cancelEdit: "Annuller",
|
|
338
|
+
companyNameLabel: "Virksomhedsnavn",
|
|
339
|
+
organizationNumberLabel: "Organisationsnummer",
|
|
340
|
+
address1Label: "Adresse",
|
|
341
|
+
postalCodeLabel: "Postnummer",
|
|
342
|
+
cityLabel: "By",
|
|
343
|
+
countryLabel: "Land",
|
|
344
|
+
webUrlLabel: "Hjemmeside",
|
|
345
|
+
emailLabel: "E-mail",
|
|
346
|
+
editFormLabel: "Rediger virksomhedsoplysninger",
|
|
347
|
+
addressGroupLabel: "Postnummer og by",
|
|
348
|
+
managePlanMessage: "Administrer din plan ved at kontakte din partner {partnerName}.",
|
|
349
|
+
fieldRequired: "Dette felt er påkrævet.",
|
|
350
|
+
emailInvalid: "Indtast venligst en gyldig e-mailadresse."
|
|
351
|
+
},
|
|
352
|
+
administrators: {
|
|
353
|
+
title: "Administratorer",
|
|
354
|
+
description: "Inviter kolleger til at hjælpe med at administrere din virksomhedskonto og brugere. Du kan altid tilføje flere administratorer eller justere tilladelser senere i administratorindstillingerne.",
|
|
355
|
+
addAdministratorButton: "Tilføj administrator",
|
|
356
|
+
addNameButton: "Tilføj navn",
|
|
357
|
+
firstNameLabel: "Fornavn",
|
|
358
|
+
lastNameLabel: "Efternavn",
|
|
359
|
+
youLabel: "Dig",
|
|
360
|
+
deleteRowLabel: "Slet administrator",
|
|
361
|
+
confirmSingular: "Bekræft {count} administrator",
|
|
362
|
+
confirmPlural: "Bekræft {count} administratorer",
|
|
363
|
+
doneButton: "Udført",
|
|
364
|
+
editButton: "Rediger"
|
|
365
|
+
},
|
|
366
|
+
partnerAccess: {
|
|
367
|
+
title: "Giv adgang til konsulenter",
|
|
368
|
+
description: "Inviter konsulenter fra {partnerName}, og giv dem adgang til at hjælpe dig med at konfigurere systemet. Du kan administrere eller tilbagekalde deres adgang når som helst.",
|
|
369
|
+
findConsultantPlaceholder: "Find konsulent",
|
|
370
|
+
loading: "Indlæser konsulenter...",
|
|
371
|
+
confirmSingular: "Bekræft {count} konsulent",
|
|
372
|
+
confirmPlural: "Bekræft {count} konsulenter"
|
|
373
|
+
},
|
|
374
|
+
complete: {
|
|
375
|
+
title: "Opsætning fuldført!",
|
|
376
|
+
message1: "Vi har inviteret dine administratorer og partnere til at slutte sig til dig. Din virksomhed er nu klar.",
|
|
377
|
+
message2: "Se vores administratorside for at se, hvor du kan foretage yderligere ændringer.",
|
|
378
|
+
goToAdminButton: "Gå til administratorside"
|
|
379
|
+
},
|
|
380
|
+
common: {
|
|
381
|
+
saveAndClose: "Gem og luk",
|
|
382
|
+
startSetup: "Start opsætning",
|
|
383
|
+
confirm: "Bekræft",
|
|
384
|
+
close: "Luk",
|
|
385
|
+
loading: "Indlæser kundeoplysninger...",
|
|
386
|
+
dismissError: "Afvis fejl"
|
|
387
|
+
},
|
|
388
|
+
errors: {
|
|
389
|
+
invalidRequest: {
|
|
390
|
+
title: "Ugyldig anmodning",
|
|
391
|
+
message: "Ugyldig anmodning. Tjek venligst dine indtastninger."
|
|
392
|
+
},
|
|
393
|
+
validationError: {
|
|
394
|
+
title: "Valideringsfejl",
|
|
395
|
+
message: "Valideringsfejl. Tjek venligst dine indtastninger."
|
|
396
|
+
},
|
|
397
|
+
notFound: {
|
|
398
|
+
title: "Ikke fundet",
|
|
399
|
+
message: "Ressource ikke fundet."
|
|
400
|
+
},
|
|
401
|
+
serverError: {
|
|
402
|
+
title: "Serverfejl",
|
|
403
|
+
message: "Serverfejl. Prøv venligst igen senere."
|
|
404
|
+
},
|
|
405
|
+
requestTimeout: {
|
|
406
|
+
title: "Anmodningstimeout",
|
|
407
|
+
message: "Anmodningstimeout. Prøv venligst igen."
|
|
408
|
+
},
|
|
409
|
+
networkError: {
|
|
410
|
+
title: "Netværksfejl",
|
|
411
|
+
message: "Netværksfejl. Tjek venligst din forbindelse."
|
|
412
|
+
},
|
|
413
|
+
requestFailed: {
|
|
414
|
+
title: "Anmodning mislykkedes",
|
|
415
|
+
message: "Anmodning mislykkedes. Prøv venligst igen."
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"fi-FI": {
|
|
420
|
+
wizard: {
|
|
421
|
+
title: "Määritä yrityksesi"
|
|
422
|
+
},
|
|
423
|
+
steps: {
|
|
424
|
+
company: "Yritys",
|
|
425
|
+
administrators: "Ylläpitäjät",
|
|
426
|
+
partnerAccess: "Kumppanin käyttöoikeus",
|
|
427
|
+
progressLabel: "Asennuksen edistyminen"
|
|
428
|
+
},
|
|
429
|
+
welcome: {
|
|
430
|
+
greeting: "Tervetuloa Visma Softwareen,",
|
|
431
|
+
description: "Tehdään yrityksesi tili valmiiksi. Tämä asetus kestää noin 5 minuuttia ja auttaa sinua pääsemään alkuun."
|
|
432
|
+
},
|
|
433
|
+
company: {
|
|
434
|
+
title: "Yrityksesi",
|
|
435
|
+
description: "Vahvista yrityksesi tiedot. Näitä tietoja käytetään profiiliisi ja järjestelmän tunnistamiseen. Voit aina muokata tätä myöhemmin asetuksissa.",
|
|
436
|
+
placeholder: "Yritystietojen paikkamerkki",
|
|
437
|
+
contactLabel: "Yhteystiedot",
|
|
438
|
+
editContactLabel: "Muokkaa yhteystietoja",
|
|
439
|
+
subscriptionLabel: "Tilauksesi sisältää",
|
|
440
|
+
address2Placeholder: "Osoiterivi 2 (Valinnainen)",
|
|
441
|
+
saveChanges: "Tallenna muutokset",
|
|
442
|
+
cancelEdit: "Peruuta",
|
|
443
|
+
companyNameLabel: "Yrityksen nimi",
|
|
444
|
+
organizationNumberLabel: "Y-tunnus",
|
|
445
|
+
address1Label: "Osoite",
|
|
446
|
+
postalCodeLabel: "Postinumero",
|
|
447
|
+
cityLabel: "Kaupunki",
|
|
448
|
+
countryLabel: "Maa",
|
|
449
|
+
webUrlLabel: "Verkkosivusto",
|
|
450
|
+
emailLabel: "Sähköposti",
|
|
451
|
+
editFormLabel: "Muokkaa yritystietoja",
|
|
452
|
+
addressGroupLabel: "Postinumero ja kaupunki",
|
|
453
|
+
managePlanMessage: "Hallinnoi suunnitelmaasi ottamalla yhteyttä kumppaniisi {partnerName}.",
|
|
454
|
+
fieldRequired: "Tämä kenttä on pakollinen.",
|
|
455
|
+
emailInvalid: "Syötä kelvollinen sähköpostiosoite."
|
|
456
|
+
},
|
|
457
|
+
administrators: {
|
|
458
|
+
title: "Ylläpitäjät",
|
|
459
|
+
description: "Kutsu kollegoita auttamaan yrityksesi tilin ja käyttäjien hallinnassa. Voit aina lisätä lisää ylläpitäjiä tai muokata käyttöoikeuksia myöhemmin ylläpitoasetuksissa.",
|
|
460
|
+
addAdministratorButton: "Lisää ylläpitäjä",
|
|
461
|
+
addNameButton: "Lisää nimi",
|
|
462
|
+
firstNameLabel: "Etunimi",
|
|
463
|
+
lastNameLabel: "Sukunimi",
|
|
464
|
+
youLabel: "Sinä",
|
|
465
|
+
deleteRowLabel: "Poista ylläpitäjä",
|
|
466
|
+
confirmSingular: "Vahvista {count} ylläpitäjä",
|
|
467
|
+
confirmPlural: "Vahvista {count} ylläpitäjää",
|
|
468
|
+
doneButton: "Valmis",
|
|
469
|
+
editButton: "Muokkaa"
|
|
470
|
+
},
|
|
471
|
+
partnerAccess: {
|
|
472
|
+
title: "Anna käyttöoikeus konsulteille",
|
|
473
|
+
description: "Kutsu konsultteja {partnerName}:stä ja anna heille käyttöoikeus auttaaksesi järjestelmän määrittämisessä. Voit hallita tai peruuttaa heidän käyttöoikeutensa milloin tahansa.",
|
|
474
|
+
findConsultantPlaceholder: "Etsi konsultti",
|
|
475
|
+
loading: "Ladataan konsultteja...",
|
|
476
|
+
confirmSingular: "Vahvista {count} konsultti",
|
|
477
|
+
confirmPlural: "Vahvista {count} konsultit"
|
|
478
|
+
},
|
|
479
|
+
complete: {
|
|
480
|
+
title: "Asetus valmis!",
|
|
481
|
+
message1: "Olemme kutsuneet ylläpitäjät ja kumppanit liittymään. Yrityksesi on nyt valmis.",
|
|
482
|
+
message2: "Katso ylläpitosivu nähdäksesi, missä voit tehdä lisämuutoksia.",
|
|
483
|
+
goToAdminButton: "Siirry ylläpitosivulle"
|
|
484
|
+
},
|
|
485
|
+
common: {
|
|
486
|
+
saveAndClose: "Tallenna ja sulje",
|
|
487
|
+
startSetup: "Aloita asetus",
|
|
488
|
+
confirm: "Vahvista",
|
|
489
|
+
close: "Sulje",
|
|
490
|
+
loading: "Ladataan asiakastietoja...",
|
|
491
|
+
dismissError: "Sulje virhe"
|
|
492
|
+
},
|
|
493
|
+
errors: {
|
|
494
|
+
invalidRequest: {
|
|
495
|
+
title: "Virheellinen pyyntö",
|
|
496
|
+
message: "Virheellinen pyyntö. Tarkista syöttämäsi tiedot."
|
|
497
|
+
},
|
|
498
|
+
validationError: {
|
|
499
|
+
title: "Validointivirhe",
|
|
500
|
+
message: "Validointivirhe. Tarkista syöttämäsi tiedot."
|
|
501
|
+
},
|
|
502
|
+
notFound: {
|
|
503
|
+
title: "Ei löytynyt",
|
|
504
|
+
message: "Resurssia ei löytynyt."
|
|
505
|
+
},
|
|
506
|
+
serverError: {
|
|
507
|
+
title: "Palvelinvirhe",
|
|
508
|
+
message: "Palvelinvirhe. Yritä myöhemmin uudelleen."
|
|
509
|
+
},
|
|
510
|
+
requestTimeout: {
|
|
511
|
+
title: "Pyynnön aikakatkaisu",
|
|
512
|
+
message: "Pyynnön aikakatkaisu. Yritä uudelleen."
|
|
513
|
+
},
|
|
514
|
+
networkError: {
|
|
515
|
+
title: "Verkkovirhe",
|
|
516
|
+
message: "Verkkovirhe. Tarkista yhteytesi."
|
|
517
|
+
},
|
|
518
|
+
requestFailed: {
|
|
519
|
+
title: "Pyyntö epäonnistui",
|
|
520
|
+
message: "Pyyntö epäonnistui. Yritä uudelleen."
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"nb-NO": {
|
|
525
|
+
wizard: {
|
|
526
|
+
title: "Konfigurer selskapet ditt"
|
|
527
|
+
},
|
|
528
|
+
steps: {
|
|
529
|
+
company: "Selskap",
|
|
530
|
+
administrators: "Administratorer",
|
|
531
|
+
partnerAccess: "Partnertilgang",
|
|
532
|
+
progressLabel: "Oppsettfremgang"
|
|
533
|
+
},
|
|
534
|
+
welcome: {
|
|
535
|
+
greeting: "Velkommen til Visma Software,",
|
|
536
|
+
description: "La oss få selskapskontoen din klar. Denne oppsettet tar rundt 5 minutter og hjelper deg i gang."
|
|
537
|
+
},
|
|
538
|
+
company: {
|
|
539
|
+
title: "Ditt selskap",
|
|
540
|
+
description: "Bekreft selskapsdetaljene dine. Denne informasjonen vil bli brukt til profilen din og systemidentiteten. Du kan alltid redigere dette senere i innstillingene.",
|
|
541
|
+
placeholder: "Selskapsinformasjon plassholder",
|
|
542
|
+
contactLabel: "Kontakt",
|
|
543
|
+
editContactLabel: "Rediger kontakt",
|
|
544
|
+
subscriptionLabel: "Abonnementet ditt inkluderer",
|
|
545
|
+
address2Placeholder: "Adresselinje 2 (Valgfri)",
|
|
546
|
+
saveChanges: "Lagre endringer",
|
|
547
|
+
cancelEdit: "Avbryt",
|
|
548
|
+
companyNameLabel: "Selskapsnavn",
|
|
549
|
+
organizationNumberLabel: "Organisasjonsnummer",
|
|
550
|
+
address1Label: "Adresse",
|
|
551
|
+
postalCodeLabel: "Postnummer",
|
|
552
|
+
cityLabel: "By",
|
|
553
|
+
countryLabel: "Land",
|
|
554
|
+
webUrlLabel: "Nettside",
|
|
555
|
+
emailLabel: "E-post",
|
|
556
|
+
editFormLabel: "Rediger bedriftsdetaljer",
|
|
557
|
+
addressGroupLabel: "Postnummer og by",
|
|
558
|
+
managePlanMessage: "Administrer planen din ved å ta kontakt med partneren din {partnerName}.",
|
|
559
|
+
fieldRequired: "Dette feltet er obligatorisk.",
|
|
560
|
+
emailInvalid: "Vennligst skriv inn en gyldig e-postadresse."
|
|
561
|
+
},
|
|
562
|
+
administrators: {
|
|
563
|
+
title: "Administratorer",
|
|
564
|
+
description: "Inviter kolleger til å hjelpe med å administrere selskapskontoen og brukerne dine. Du kan alltid legge til flere administratorer eller justere tillatelser senere i administratorinnstillingene.",
|
|
565
|
+
addAdministratorButton: "Legg til administrator",
|
|
566
|
+
addNameButton: "Legg til navn",
|
|
567
|
+
firstNameLabel: "Fornavn",
|
|
568
|
+
lastNameLabel: "Etternavn",
|
|
569
|
+
youLabel: "Deg",
|
|
570
|
+
deleteRowLabel: "Slett administrator",
|
|
571
|
+
confirmSingular: "Bekreft {count} administrator",
|
|
572
|
+
confirmPlural: "Bekreft {count} administratorer",
|
|
573
|
+
doneButton: "Ferdig",
|
|
574
|
+
editButton: "Rediger"
|
|
575
|
+
},
|
|
576
|
+
partnerAccess: {
|
|
577
|
+
title: "Gi tilgang til konsulenter",
|
|
578
|
+
description: "Inviter konsulenter fra {partnerName}, og gi dem tilgang til å hjelpe deg med å konfigurere systemet. Du kan administrere eller tilbakekalle tilgangen deres når som helst.",
|
|
579
|
+
findConsultantPlaceholder: "Finn konsulent",
|
|
580
|
+
loading: "Laster konsulenter...",
|
|
581
|
+
confirmSingular: "Bekreft {count} konsulent",
|
|
582
|
+
confirmPlural: "Bekreft {count} konsulenter"
|
|
583
|
+
},
|
|
584
|
+
complete: {
|
|
585
|
+
title: "Oppsett fullført!",
|
|
586
|
+
message1: "Vi har invitert administratorene og partnerne dine til å bli med deg. Selskapet ditt er nå klart.",
|
|
587
|
+
message2: "Se vår administratorside for å se hvor du kan gjøre ytterligere endringer.",
|
|
588
|
+
goToAdminButton: "Gå til administratorside"
|
|
589
|
+
},
|
|
590
|
+
common: {
|
|
591
|
+
saveAndClose: "Lagre og lukk",
|
|
592
|
+
startSetup: "Start oppsett",
|
|
593
|
+
confirm: "Bekreft",
|
|
594
|
+
close: "Lukk",
|
|
595
|
+
loading: "Laster kundeinformasjon...",
|
|
596
|
+
dismissError: "Avvis feil"
|
|
597
|
+
},
|
|
598
|
+
errors: {
|
|
599
|
+
invalidRequest: {
|
|
600
|
+
title: "Ugyldig forespørsel",
|
|
601
|
+
message: "Ugyldig forespørsel. Vennligst sjekk inndataene dine."
|
|
602
|
+
},
|
|
603
|
+
validationError: {
|
|
604
|
+
title: "Valideringsfeil",
|
|
605
|
+
message: "Valideringsfeil. Vennligst sjekk inndataene dine."
|
|
606
|
+
},
|
|
607
|
+
notFound: {
|
|
608
|
+
title: "Ikke funnet",
|
|
609
|
+
message: "Ressurs ikke funnet."
|
|
610
|
+
},
|
|
611
|
+
serverError: {
|
|
612
|
+
title: "Serverfeil",
|
|
613
|
+
message: "Serverfeil. Vennligst prøv igjen senere."
|
|
614
|
+
},
|
|
615
|
+
requestTimeout: {
|
|
616
|
+
title: "Tidsavbrudd for forespørsel",
|
|
617
|
+
message: "Tidsavbrudd for forespørsel. Vennligst prøv igjen."
|
|
618
|
+
},
|
|
619
|
+
networkError: {
|
|
620
|
+
title: "Nettverksfeil",
|
|
621
|
+
message: "Nettverksfeil. Vennligst sjekk tilkoblingen din."
|
|
622
|
+
},
|
|
623
|
+
requestFailed: {
|
|
624
|
+
title: "Forespørsel mislyktes",
|
|
625
|
+
message: "Forespørsel mislyktes. Vennligst prøv igjen."
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"nl-NL": {
|
|
630
|
+
wizard: {
|
|
631
|
+
title: "Stel uw bedrijf in"
|
|
632
|
+
},
|
|
633
|
+
steps: {
|
|
634
|
+
company: "Bedrijf",
|
|
635
|
+
administrators: "Beheerders",
|
|
636
|
+
partnerAccess: "Partnertoegang",
|
|
637
|
+
progressLabel: "Installatievoortgang"
|
|
638
|
+
},
|
|
639
|
+
welcome: {
|
|
640
|
+
greeting: "Welkom bij Visma Software,",
|
|
641
|
+
description: "Laten we uw bedrijfsaccount gereed maken. Deze installatie duurt ongeveer 5 minuten en helpt u snel aan de slag te gaan."
|
|
642
|
+
},
|
|
643
|
+
company: {
|
|
644
|
+
title: "Uw bedrijf",
|
|
645
|
+
description: "Bevestig uw bedrijfsgegevens. Deze informatie wordt gebruikt voor uw profiel en systeemidentiteit. U kunt dit later altijd bewerken in de instellingen.",
|
|
646
|
+
placeholder: "Bedrijfsinformatie tijdelijke aanduiding",
|
|
647
|
+
contactLabel: "Contact",
|
|
648
|
+
editContactLabel: "Contactgegevens bewerken",
|
|
649
|
+
subscriptionLabel: "Uw abonnement omvat",
|
|
650
|
+
address2Placeholder: "Adresregel 2 (Optioneel)",
|
|
651
|
+
saveChanges: "Wijzigingen opslaan",
|
|
652
|
+
cancelEdit: "Annuleren",
|
|
653
|
+
companyNameLabel: "Bedrijfsnaam",
|
|
654
|
+
organizationNumberLabel: "Organisatienummer",
|
|
655
|
+
address1Label: "Adres",
|
|
656
|
+
postalCodeLabel: "Postcode",
|
|
657
|
+
cityLabel: "Stad",
|
|
658
|
+
countryLabel: "Land",
|
|
659
|
+
webUrlLabel: "Website",
|
|
660
|
+
emailLabel: "E-mail",
|
|
661
|
+
editFormLabel: "Bedrijfsgegevens bewerken",
|
|
662
|
+
addressGroupLabel: "Postcode en stad",
|
|
663
|
+
managePlanMessage: "Beheer uw abonnement door contact op te nemen met uw partner {partnerName}.",
|
|
664
|
+
fieldRequired: "Dit veld is verplicht.",
|
|
665
|
+
emailInvalid: "Voer een geldig e-mailadres in."
|
|
666
|
+
},
|
|
667
|
+
administrators: {
|
|
668
|
+
title: "Beheerders",
|
|
669
|
+
description: "Nodig collega's uit om te helpen bij het beheren van uw bedrijfsaccount en gebruikers. U kunt altijd meer beheerders toevoegen of machtigingen aanpassen in de beheerdersettings.",
|
|
670
|
+
addAdministratorButton: "Beheerder toevoegen",
|
|
671
|
+
addNameButton: "Naam toevoegen",
|
|
672
|
+
firstNameLabel: "Voornaam",
|
|
673
|
+
lastNameLabel: "Achternaam",
|
|
674
|
+
youLabel: "U",
|
|
675
|
+
deleteRowLabel: "Beheerder verwijderen",
|
|
676
|
+
confirmSingular: "Bevestig {count} beheerder",
|
|
677
|
+
confirmPlural: "Bevestig {count} beheerders",
|
|
678
|
+
doneButton: "Klaar",
|
|
679
|
+
editButton: "Bewerken"
|
|
680
|
+
},
|
|
681
|
+
partnerAccess: {
|
|
682
|
+
title: "Geef toegang aan consultants",
|
|
683
|
+
description: "Nodig consultants van {partnerName} uit en geef ze toegang om u te helpen bij het configureren van het systeem. U kunt hun toegang op elk moment beheren of intrekken.",
|
|
684
|
+
findConsultantPlaceholder: "Zoek consultant",
|
|
685
|
+
loading: "Consultants laden...",
|
|
686
|
+
confirmSingular: "Bevestig {count} consultant",
|
|
687
|
+
confirmPlural: "Bevestig {count} consultants"
|
|
688
|
+
},
|
|
689
|
+
complete: {
|
|
690
|
+
title: "Installatie voltooid!",
|
|
691
|
+
message1: "We hebben uw beheerders en partners uitgenodigd om zich bij u aan te sluiten. Uw bedrijf is nu klaar.",
|
|
692
|
+
message2: "Zie onze beheerders pagina om te zien waar u verdere wijzigingen kunt aanbrengen.",
|
|
693
|
+
goToAdminButton: "Ga naar beheerders pagina"
|
|
694
|
+
},
|
|
695
|
+
common: {
|
|
696
|
+
saveAndClose: "Opslaan en sluiten",
|
|
697
|
+
startSetup: "Start installatie",
|
|
698
|
+
confirm: "Bevestigen",
|
|
699
|
+
close: "Sluiten",
|
|
700
|
+
loading: "Klantinformatie laden...",
|
|
701
|
+
dismissError: "Fout sluiten"
|
|
702
|
+
},
|
|
703
|
+
errors: {
|
|
704
|
+
invalidRequest: {
|
|
705
|
+
title: "Ongeldig verzoek",
|
|
706
|
+
message: "Ongeldig verzoek. Controleer uw invoer."
|
|
707
|
+
},
|
|
708
|
+
validationError: {
|
|
709
|
+
title: "Validatiefout",
|
|
710
|
+
message: "Validatiefout. Controleer uw invoer."
|
|
711
|
+
},
|
|
712
|
+
notFound: {
|
|
713
|
+
title: "Niet gevonden",
|
|
714
|
+
message: "Bron niet gevonden."
|
|
715
|
+
},
|
|
716
|
+
serverError: {
|
|
717
|
+
title: "Serverfout",
|
|
718
|
+
message: "Serverfout. Probeer het later opnieuw."
|
|
719
|
+
},
|
|
720
|
+
requestTimeout: {
|
|
721
|
+
title: "Verzoek time-out",
|
|
722
|
+
message: "Verzoek time-out. Probeer het opnieuw."
|
|
723
|
+
},
|
|
724
|
+
networkError: {
|
|
725
|
+
title: "Netwerkfout",
|
|
726
|
+
message: "Netwerkfout. Controleer uw verbinding."
|
|
727
|
+
},
|
|
728
|
+
requestFailed: {
|
|
729
|
+
title: "Verzoek mislukt",
|
|
730
|
+
message: "Verzoek mislukt. Probeer het opnieuw."
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"sv-SE": {
|
|
735
|
+
wizard: {
|
|
736
|
+
title: "Konfigurera ditt företag"
|
|
737
|
+
},
|
|
738
|
+
steps: {
|
|
739
|
+
company: "Företag",
|
|
740
|
+
administrators: "Administratörer",
|
|
741
|
+
partnerAccess: "Partneråtkomst",
|
|
742
|
+
progressLabel: "Installationsförlopp"
|
|
743
|
+
},
|
|
744
|
+
welcome: {
|
|
745
|
+
greeting: "Välkommen till Visma Software,",
|
|
746
|
+
description: "Låt oss göra ditt företagskonto redo. Denna installation tar cirka 5 minuter och hjälper dig att komma igång snabbt."
|
|
747
|
+
},
|
|
748
|
+
company: {
|
|
749
|
+
title: "Ditt företag",
|
|
750
|
+
description: "Bekräfta dina företagsuppgifter. Denna information kommer att användas för din profil och systemidentitet. Du kan alltid redigera detta senare i inställningarna.",
|
|
751
|
+
placeholder: "Företagsinformation platshållare",
|
|
752
|
+
contactLabel: "Kontakt",
|
|
753
|
+
editContactLabel: "Redigera kontakt",
|
|
754
|
+
subscriptionLabel: "Din prenumeration inkluderar",
|
|
755
|
+
address2Placeholder: "Adressrad 2 (Valfri)",
|
|
756
|
+
saveChanges: "Spara ändringar",
|
|
757
|
+
cancelEdit: "Avbryt",
|
|
758
|
+
companyNameLabel: "Företagsnamn",
|
|
759
|
+
organizationNumberLabel: "Organisationsnummer",
|
|
760
|
+
address1Label: "Adress",
|
|
761
|
+
postalCodeLabel: "Postnummer",
|
|
762
|
+
cityLabel: "Stad",
|
|
763
|
+
countryLabel: "Land",
|
|
764
|
+
webUrlLabel: "Webbplats",
|
|
765
|
+
emailLabel: "E-post",
|
|
766
|
+
editFormLabel: "Redigera företagsuppgifter",
|
|
767
|
+
addressGroupLabel: "Postnummer och stad",
|
|
768
|
+
managePlanMessage: "Hantera din plan genom att kontakta din partner {partnerName}.",
|
|
769
|
+
fieldRequired: "Det här fältet är obligatoriskt.",
|
|
770
|
+
emailInvalid: "Ange en giltig e-postadress."
|
|
771
|
+
},
|
|
772
|
+
administrators: {
|
|
773
|
+
title: "Administratörer",
|
|
774
|
+
description: "Bjud in kollegor för att hjälpa till att hantera ditt företagskonto och användare. Du kan alltid lägga till fler administratörer eller justera behörigheter senare i administratörsinställningarna.",
|
|
775
|
+
addAdministratorButton: "Lägg till administratör",
|
|
776
|
+
addNameButton: "Lägg till namn",
|
|
777
|
+
firstNameLabel: "Förnamn",
|
|
778
|
+
lastNameLabel: "Efternamn",
|
|
779
|
+
youLabel: "Du",
|
|
780
|
+
deleteRowLabel: "Ta bort administratör",
|
|
781
|
+
confirmSingular: "Bekräfta {count} administratör",
|
|
782
|
+
confirmPlural: "Bekräfta {count} administratörer",
|
|
783
|
+
doneButton: "Klar",
|
|
784
|
+
editButton: "Redigera"
|
|
785
|
+
},
|
|
786
|
+
partnerAccess: {
|
|
787
|
+
title: "Ge åtkomst till konsulter",
|
|
788
|
+
description: "Bjud in konsulter från {partnerName} och ge dem åtkomst för att hjälpa dig konfigurera systemet. Du kan hantera eller återkalla deras åtkomst när som helst.",
|
|
789
|
+
findConsultantPlaceholder: "Hitta konsult",
|
|
790
|
+
loading: "Laddar konsulter...",
|
|
791
|
+
confirmSingular: "Bekräfta {count} konsult",
|
|
792
|
+
confirmPlural: "Bekräfta {count} konsulter"
|
|
793
|
+
},
|
|
794
|
+
complete: {
|
|
795
|
+
title: "Installation klar!",
|
|
796
|
+
message1: "Vi har bjudit in dina administratörer och partners att gå med dig. Ditt företag är nu redo.",
|
|
797
|
+
message2: "Se vår administratörssida för att se var du kan göra ytterligare ändringar.",
|
|
798
|
+
goToAdminButton: "Gå till administratörssida"
|
|
799
|
+
},
|
|
800
|
+
common: {
|
|
801
|
+
saveAndClose: "Spara och stäng",
|
|
802
|
+
startSetup: "Starta installation",
|
|
803
|
+
confirm: "Bekräfta",
|
|
804
|
+
close: "Stäng",
|
|
805
|
+
loading: "Laddar kundinformation...",
|
|
806
|
+
dismissError: "Stäng fel"
|
|
807
|
+
},
|
|
808
|
+
errors: {
|
|
809
|
+
invalidRequest: {
|
|
810
|
+
title: "Ogiltig begäran",
|
|
811
|
+
message: "Ogiltig begäran. Kontrollera din inmatning."
|
|
812
|
+
},
|
|
813
|
+
validationError: {
|
|
814
|
+
title: "Valideringsfel",
|
|
815
|
+
message: "Valideringsfel. Kontrollera din inmatning."
|
|
816
|
+
},
|
|
817
|
+
notFound: {
|
|
818
|
+
title: "Hittades inte",
|
|
819
|
+
message: "Resursen hittades inte."
|
|
820
|
+
},
|
|
821
|
+
serverError: {
|
|
822
|
+
title: "Serverfel",
|
|
823
|
+
message: "Serverfel. Försök igen senare."
|
|
824
|
+
},
|
|
825
|
+
requestTimeout: {
|
|
826
|
+
title: "Timeout för begäran",
|
|
827
|
+
message: "Timeout för begäran. Försök igen."
|
|
828
|
+
},
|
|
829
|
+
networkError: {
|
|
830
|
+
title: "Nätverksfel",
|
|
831
|
+
message: "Nätverksfel. Kontrollera din anslutning."
|
|
832
|
+
},
|
|
833
|
+
requestFailed: {
|
|
834
|
+
title: "Begäran misslyckades",
|
|
835
|
+
message: "Begäran misslyckades. Försök igen."
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
class U {
|
|
841
|
+
constructor() {
|
|
842
|
+
this.currentLocale = "en-GB";
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Set the current locale
|
|
846
|
+
* Returns true when the locale is supported, otherwise falls back to en-GB and returns false.
|
|
847
|
+
*/
|
|
848
|
+
setLocale(t) {
|
|
849
|
+
return I[t] ? (this.currentLocale = t, !0) : (console.warn(`Locale "${t}" not supported. Falling back to en-GB.`), this.currentLocale = "en-GB", !1);
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Get the current locale
|
|
853
|
+
*/
|
|
854
|
+
getLocale() {
|
|
855
|
+
return this.currentLocale;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Get translations for the current locale
|
|
859
|
+
*/
|
|
860
|
+
getTranslations() {
|
|
861
|
+
return I[this.currentLocale];
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Get a translation by key path
|
|
865
|
+
*/
|
|
866
|
+
t(t) {
|
|
867
|
+
const a = t.split(".");
|
|
868
|
+
let r = I[this.currentLocale];
|
|
869
|
+
for (const i of a)
|
|
870
|
+
r = r == null ? void 0 : r[i];
|
|
871
|
+
return typeof r == "string" ? r : t;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
class B extends Error {
|
|
875
|
+
constructor(t, a) {
|
|
876
|
+
super(`HTTP ${t}: ${a}`), this.status = t, this.name = "HttpError";
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
class O {
|
|
880
|
+
constructor(t, a = {}, r) {
|
|
881
|
+
if (this.authToken = null, !t)
|
|
882
|
+
throw new Error("[HttpService] baseUrl is required");
|
|
883
|
+
this.baseUrl = t, this.defaultHeaders = {
|
|
884
|
+
"Content-Type": "application/json",
|
|
885
|
+
...a
|
|
886
|
+
}, this.eventTarget = r ?? globalThis.document;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Set the authentication token for all subsequent requests
|
|
890
|
+
* @param token - OAuth2 access token (from sessionStorage)
|
|
891
|
+
*/
|
|
892
|
+
setAuthToken(t) {
|
|
893
|
+
this.authToken = t;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* Get current authentication token
|
|
897
|
+
*/
|
|
898
|
+
getAuthToken() {
|
|
899
|
+
return this.authToken;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Emit HTTP error event for authentication/authorization errors
|
|
903
|
+
* Only emits for 401 (Unauthorized) and 403 (Forbidden)
|
|
904
|
+
* @param status - HTTP status code (401 or 403)
|
|
905
|
+
* @param statusText - HTTP status text
|
|
906
|
+
* @param endpoint - API endpoint that failed
|
|
907
|
+
* @param method - HTTP method
|
|
908
|
+
* @param retryFn - Function to retry the request
|
|
909
|
+
*/
|
|
910
|
+
emitHttpError(t, a, r, i, o) {
|
|
911
|
+
var C;
|
|
912
|
+
if (t !== 401 && t !== 403)
|
|
913
|
+
return;
|
|
914
|
+
const s = {
|
|
915
|
+
status: t,
|
|
916
|
+
statusText: a,
|
|
917
|
+
message: `HTTP ${t}: ${a}`,
|
|
918
|
+
endpoint: r,
|
|
919
|
+
method: i,
|
|
920
|
+
retry: o
|
|
921
|
+
}, z = new CustomEvent("http-error", {
|
|
922
|
+
detail: s,
|
|
923
|
+
bubbles: !0,
|
|
924
|
+
composed: !0
|
|
925
|
+
});
|
|
926
|
+
(C = this.eventTarget) == null || C.dispatchEvent(z);
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Emit error message event for internal error handling
|
|
930
|
+
* Emitted for validation errors (400, 422), not-found errors (404), server errors (5xx), and network errors
|
|
931
|
+
* Component will display these errors in its UI
|
|
932
|
+
* @param status - HTTP status code or 0 for network errors
|
|
933
|
+
* @param errorKey - Translation key for the emitted error
|
|
934
|
+
* @param endpoint - API endpoint that failed
|
|
935
|
+
* @param method - HTTP method
|
|
936
|
+
*/
|
|
937
|
+
emitErrorMessage(t, a, r, i) {
|
|
938
|
+
var z;
|
|
939
|
+
const o = {
|
|
940
|
+
status: t,
|
|
941
|
+
errorKey: a,
|
|
942
|
+
endpoint: r,
|
|
943
|
+
method: i
|
|
944
|
+
}, s = new CustomEvent("error-message", {
|
|
945
|
+
detail: o,
|
|
946
|
+
bubbles: !0,
|
|
947
|
+
composed: !0
|
|
948
|
+
});
|
|
949
|
+
(z = this.eventTarget) == null || z.dispatchEvent(s);
|
|
950
|
+
}
|
|
951
|
+
async request(t, a = {}) {
|
|
952
|
+
const { method: r = "GET", headers: i = {}, body: o, timeout: s = 3e4 } = a, z = new AbortController(), C = setTimeout(() => z.abort(), s), x = {
|
|
953
|
+
...this.defaultHeaders,
|
|
954
|
+
...i
|
|
955
|
+
};
|
|
956
|
+
this.authToken && (x.Authorization = `Bearer ${this.authToken}`);
|
|
957
|
+
try {
|
|
958
|
+
const c = await fetch(`${this.baseUrl}${t}`, {
|
|
959
|
+
method: r,
|
|
960
|
+
headers: x,
|
|
961
|
+
body: o ? JSON.stringify(o) : void 0,
|
|
962
|
+
signal: z.signal
|
|
963
|
+
});
|
|
964
|
+
if (clearTimeout(C), !c.ok) {
|
|
965
|
+
if (c.status === 401 || c.status === 403)
|
|
966
|
+
this.emitHttpError(
|
|
967
|
+
c.status,
|
|
968
|
+
c.statusText,
|
|
969
|
+
t,
|
|
970
|
+
r,
|
|
971
|
+
() => this.request(t, a)
|
|
972
|
+
// Retry function
|
|
973
|
+
);
|
|
974
|
+
else if (!(a.suppressErrorStatuses ?? []).includes(c.status)) {
|
|
975
|
+
const D = this.getErrorKey(c.status);
|
|
976
|
+
this.emitErrorMessage(c.status, D, t, r);
|
|
977
|
+
}
|
|
978
|
+
throw new B(c.status, c.statusText);
|
|
979
|
+
}
|
|
980
|
+
return c.status === 204 ? void 0 : await c.json();
|
|
981
|
+
} catch (c) {
|
|
982
|
+
if (clearTimeout(C), c instanceof B)
|
|
983
|
+
throw c;
|
|
984
|
+
if (c instanceof Error) {
|
|
985
|
+
const w = c.message.includes("aborted") ? "requestTimeout" : "networkError";
|
|
986
|
+
throw this.emitErrorMessage(0, w, t, r), new Error(`Request failed: ${c.message}`);
|
|
987
|
+
}
|
|
988
|
+
throw c;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Get error key based on status code for i18n translation
|
|
993
|
+
*/
|
|
994
|
+
getErrorKey(t) {
|
|
995
|
+
return t >= 500 ? "serverError" : t === 400 ? "invalidRequest" : t === 422 ? "validationError" : t === 404 ? "notFound" : "requestFailed";
|
|
996
|
+
}
|
|
997
|
+
get(t, a) {
|
|
998
|
+
return this.request(t, { method: "GET", headers: a });
|
|
999
|
+
}
|
|
1000
|
+
post(t, a, r) {
|
|
1001
|
+
return this.request(t, { method: "POST", body: a, headers: r });
|
|
1002
|
+
}
|
|
1003
|
+
put(t, a, r) {
|
|
1004
|
+
return this.request(t, { method: "PUT", body: a, headers: r });
|
|
1005
|
+
}
|
|
1006
|
+
delete(t, a) {
|
|
1007
|
+
return this.request(t, { method: "DELETE", headers: a });
|
|
1008
|
+
}
|
|
1009
|
+
getUserProfile() {
|
|
1010
|
+
return this.get("/api/v1/me/profile");
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Get customer info for a customer
|
|
1014
|
+
* @param customerId - The customer ID
|
|
1015
|
+
* @returns Promise with customer, subscriptions, and partner information
|
|
1016
|
+
*/
|
|
1017
|
+
getCustomerInfo(t) {
|
|
1018
|
+
return this.get(`/api/v1/onboarding/customers/${t}`);
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Get administrators for a customer
|
|
1022
|
+
* @param customerId - The customer ID
|
|
1023
|
+
* @returns Promise with paginated list of administrators
|
|
1024
|
+
*/
|
|
1025
|
+
getAdministrators(t) {
|
|
1026
|
+
return this.get(`/api/v1/onboarding/customers/${t}/administrators`);
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Edit customer details (name, address, contact info)
|
|
1030
|
+
* PUT /api/v1/customers/{customerId}
|
|
1031
|
+
* @param customerId - The customer ID
|
|
1032
|
+
* @param data - Fields to update
|
|
1033
|
+
* @returns Promise with the parsed response body from the API
|
|
1034
|
+
*/
|
|
1035
|
+
editCustomer(t, a) {
|
|
1036
|
+
return this.put(`/api/v1/customers/${t}`, a);
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Save onboarding progress for a task
|
|
1040
|
+
* @param taskId - The onboarding task ID
|
|
1041
|
+
* @param step - The current step name
|
|
1042
|
+
*/
|
|
1043
|
+
saveProgress(t, a) {
|
|
1044
|
+
return this.patch(`/api/v1/onboarding/tasks/${t}`, { step: a });
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Delete an onboarding task after completion
|
|
1048
|
+
* @param taskId - The onboarding task ID
|
|
1049
|
+
*/
|
|
1050
|
+
deleteTask(t) {
|
|
1051
|
+
return this.delete(`/api/v1/onboarding/tasks/${t}`);
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Look up a user by email address.
|
|
1055
|
+
* Returns null when the user does not exist (404), without triggering the
|
|
1056
|
+
* error banner — a missing user is a valid business outcome here.
|
|
1057
|
+
* @param email - The email address to look up
|
|
1058
|
+
*/
|
|
1059
|
+
async getUserByEmail(t) {
|
|
1060
|
+
try {
|
|
1061
|
+
return await this.request(
|
|
1062
|
+
`/api/v1/users/email/${encodeURIComponent(t)}`,
|
|
1063
|
+
{ suppressErrorStatuses: [404] }
|
|
1064
|
+
);
|
|
1065
|
+
} catch (a) {
|
|
1066
|
+
if (a instanceof B && a.status === 404)
|
|
1067
|
+
return null;
|
|
1068
|
+
throw a;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Add administrators to a customer account
|
|
1073
|
+
* POST /api/v1/onboarding/customers/{customerId}/administrators
|
|
1074
|
+
* @param customerId - The customer ID
|
|
1075
|
+
* @param admins - Array of administrator data (email, firstName, lastName, languageCode)
|
|
1076
|
+
*/
|
|
1077
|
+
addCustomerAdministrators(t, a) {
|
|
1078
|
+
return this.post(`/api/v1/onboarding/customers/${t}/administrators`, a);
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Get consultants for a partner
|
|
1082
|
+
* @param partnerId - The partner ID
|
|
1083
|
+
* @returns Promise with paginated list of consultants
|
|
1084
|
+
*/
|
|
1085
|
+
getPartnerConsultants(t) {
|
|
1086
|
+
return this.get(`/api/v1/onboarding/partners/${t}/consultants`);
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Add consultants to a customer
|
|
1090
|
+
* @param customerId - The customer ID
|
|
1091
|
+
* @param consultants - Array of consultant data
|
|
1092
|
+
*/
|
|
1093
|
+
addCustomerConsultants(t, a) {
|
|
1094
|
+
return this.post(`/api/v1/onboarding/customers/${t}/consultants`, a);
|
|
1095
|
+
}
|
|
1096
|
+
patch(t, a, r) {
|
|
1097
|
+
return this.request(t, { method: "PATCH", body: a, headers: r });
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
const j = $`button{padding:var(--ga-size-spacing-04) var(--ga-size-spacing-07);border-radius:var(--ga-radius);font-size:var(--ga-text-md-size);font-weight:var(--ga-font-weight-medium);cursor:pointer;transition:background-color var(--ga-transition-hover),border-color var(--ga-transition-hover);border:var(--ga-size-border-width-sm) solid transparent;white-space:nowrap;font-family:var(--vsn-customer-onboarding-wizard-font-family);}.btn-primary{background:var(--ga-color-surface-action);color:var(--ga-color-secondary-10);border-color:var(--ga-color-surface-action);}.btn-primary:hover:not(:disabled){background:var(--ga-color-surface-action-hover);border-color:var(--ga-color-surface-action-hover);}.btn-primary:disabled{opacity:0.5;cursor:not-allowed;}.btn-secondary{background:var(--ga-color-white);color:var(--ga-color-text-body);border-color:var(--ga-color-cyan-80);}.btn-secondary:hover{background:var(--ga-color-secondary-10);}.btn-primary:focus-visible,.btn-secondary:focus-visible{outline:var(--ga-size-border-width-md) solid var(--ga-color-border-focus);outline-offset:var(--ga-size-border-width-md);}`, P = $`:host{display:block;}.step-content{text-align:left;}.step-content h2{font-size:var(--ga-text-2xl-size);line-height:var(--ga-text-2xl-line-height);letter-spacing:var(--ga-text-2xl-tracking);font-weight:var(--ga-font-weight-normal);margin:0 0 var(--ga-size-spacing-03);color:var(--ga-color-text-headings);}.wizard-actions{display:flex;justify-content:flex-end;align-items:center;margin-top:var(--ga-size-spacing-09);gap:var(--ga-size-spacing-05);}.field-error{display:flex;align-items:center;gap:var(--ga-size-spacing-02);margin-top:var(--ga-size-spacing-01);color:var(--ga-color-icon-error);font-size:var(--ga-text-sm-size);font-family:var(--vsn-customer-onboarding-wizard-font-family);line-height:var(--ga-text-sm-line-height);}.field-error svg{width:var(--ga-size-spacing-04);height:var(--ga-size-spacing-04);flex-shrink:0;}.field-error-text{color:var(--ga-color-text-body);}.field-error--empty{visibility:hidden;}`;
|
|
1101
|
+
var M = Object.defineProperty, V = Object.getOwnPropertyDescriptor, F = (e, t, a, r) => {
|
|
1102
|
+
for (var i = r > 1 ? void 0 : r ? V(t, a) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1103
|
+
(s = e[o]) && (i = (r ? s(t, a, i) : s(i)) || i);
|
|
1104
|
+
return r && i && M(t, a, i), i;
|
|
1105
|
+
};
|
|
1106
|
+
let N = class extends L {
|
|
1107
|
+
constructor() {
|
|
1108
|
+
super(...arguments), this.userName = "User";
|
|
1109
|
+
}
|
|
1110
|
+
handleStartSetup() {
|
|
1111
|
+
this.dispatchEvent(new CustomEvent("start-setup", {
|
|
1112
|
+
bubbles: !0,
|
|
1113
|
+
composed: !0
|
|
1114
|
+
}));
|
|
1115
|
+
}
|
|
1116
|
+
handleSaveAndClose() {
|
|
1117
|
+
this.dispatchEvent(new CustomEvent("save-and-close", {
|
|
1118
|
+
bubbles: !0,
|
|
1119
|
+
composed: !0
|
|
1120
|
+
}));
|
|
1121
|
+
}
|
|
1122
|
+
render() {
|
|
1123
|
+
const e = this.translations;
|
|
1124
|
+
return n`
|
|
1125
|
+
<div class="wizard-content">
|
|
1126
|
+
<div class="welcome-wrapper">
|
|
1127
|
+
<h2 class="welcome-message">
|
|
1128
|
+
${e.welcome.greeting}<br />
|
|
1129
|
+
<span class="user-name">${this.userName}!</span>
|
|
1130
|
+
</h2>
|
|
1131
|
+
<p>
|
|
1132
|
+
${e.welcome.description}
|
|
1133
|
+
</p>
|
|
1134
|
+
</div>
|
|
1135
|
+
</div>
|
|
1136
|
+
<div class="wizard-actions">
|
|
1137
|
+
<button type="button" class="btn-secondary" @click=${this.handleSaveAndClose}>
|
|
1138
|
+
${e.common.saveAndClose}
|
|
1139
|
+
</button>
|
|
1140
|
+
<button type="button" class="btn-primary" @click=${this.handleStartSetup}>
|
|
1141
|
+
${e.common.startSetup}
|
|
1142
|
+
</button>
|
|
1143
|
+
</div>
|
|
1144
|
+
`;
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
N.styles = [
|
|
1148
|
+
E,
|
|
1149
|
+
j,
|
|
1150
|
+
P,
|
|
1151
|
+
$`.wizard-content{text-align:left;padding:var(--ga-size-spacing-08) 0 var(--ga-size-spacing-06);}.welcome-wrapper{width:var(--ga-size-content-sm);margin:0 auto;text-align:left;}.welcome-wrapper p{font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);color:var(--ga-color-text-body);margin:0;}.welcome-wrapper h2.welcome-message{font-size:var(--ga-text-2xl-size);line-height:var(--ga-text-2xl-line-height);letter-spacing:var(--ga-text-2xl-tracking);font-weight:400;margin:0 0 var(--ga-size-spacing-06);color:var(--ga-color-text-headings);}`
|
|
1152
|
+
];
|
|
1153
|
+
F([
|
|
1154
|
+
g({ type: String })
|
|
1155
|
+
], N.prototype, "userName", 2);
|
|
1156
|
+
F([
|
|
1157
|
+
g({ type: Object })
|
|
1158
|
+
], N.prototype, "translations", 2);
|
|
1159
|
+
N = F([
|
|
1160
|
+
S("wizard-step-welcome")
|
|
1161
|
+
], N);
|
|
1162
|
+
var _ = Object.defineProperty, G = Object.getOwnPropertyDescriptor, u = (e, t, a, r) => {
|
|
1163
|
+
for (var i = r > 1 ? void 0 : r ? G(t, a) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1164
|
+
(s = e[o]) && (i = (r ? s(t, a, i) : s(i)) || i);
|
|
1165
|
+
return r && i && _(t, a, i), i;
|
|
1166
|
+
};
|
|
1167
|
+
const A = ["NO", "SE", "DK", "FI", "NL"];
|
|
1168
|
+
let p = class extends L {
|
|
1169
|
+
constructor() {
|
|
1170
|
+
super(...arguments), this.locale = "en-GB", this.customerInfo = null, this.editingContact = !1, this.countryDropdownOpen = !1, this.fieldErrors = {}, this.editName = "", this.editAddress1 = "", this.editAddress2 = "", this.editPostalCode = "", this.editCity = "", this.editCountryCode = "", this.editWebUrl = "", this.editContactEmail = "", this.localCustomer = null;
|
|
1171
|
+
}
|
|
1172
|
+
getCountryLabel(e) {
|
|
1173
|
+
try {
|
|
1174
|
+
return new Intl.DisplayNames([this.locale], { type: "region" }).of(e) ?? e;
|
|
1175
|
+
} catch {
|
|
1176
|
+
return e;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
handleNext() {
|
|
1180
|
+
this.dispatchEvent(new CustomEvent("next", {
|
|
1181
|
+
bubbles: !0,
|
|
1182
|
+
composed: !0
|
|
1183
|
+
}));
|
|
1184
|
+
}
|
|
1185
|
+
handleSaveAndClose() {
|
|
1186
|
+
this.dispatchEvent(new CustomEvent("save-and-close", {
|
|
1187
|
+
bubbles: !0,
|
|
1188
|
+
composed: !0
|
|
1189
|
+
}));
|
|
1190
|
+
}
|
|
1191
|
+
handleEditContact() {
|
|
1192
|
+
const e = this.localCustomer ?? this.customerInfo.customer;
|
|
1193
|
+
this.editName = e.name, this.editAddress1 = e.address1, this.editAddress2 = e.address2, this.editPostalCode = e.postalCode, this.editCity = e.city, this.editCountryCode = e.countryCode ?? "", this.editWebUrl = e.webUrl, this.editContactEmail = e.contactEmail, this.editingContact = !0;
|
|
1194
|
+
}
|
|
1195
|
+
handleSaveChanges() {
|
|
1196
|
+
if (!this.validateForm()) return;
|
|
1197
|
+
const e = this.localCustomer ?? this.customerInfo.customer;
|
|
1198
|
+
this.localCustomer = {
|
|
1199
|
+
...e,
|
|
1200
|
+
name: this.editName,
|
|
1201
|
+
address1: this.editAddress1,
|
|
1202
|
+
address2: this.editAddress2,
|
|
1203
|
+
postalCode: this.editPostalCode,
|
|
1204
|
+
city: this.editCity,
|
|
1205
|
+
countryCode: this.editCountryCode,
|
|
1206
|
+
webUrl: this.editWebUrl,
|
|
1207
|
+
contactEmail: this.editContactEmail
|
|
1208
|
+
}, this.editingContact = !1;
|
|
1209
|
+
const t = {
|
|
1210
|
+
name: this.editName,
|
|
1211
|
+
organizationNumber: e.organizationNumber,
|
|
1212
|
+
address1: this.editAddress1,
|
|
1213
|
+
address2: this.editAddress2,
|
|
1214
|
+
postalCode: this.editPostalCode,
|
|
1215
|
+
city: this.editCity,
|
|
1216
|
+
countryCode: this.editCountryCode || void 0,
|
|
1217
|
+
emailAddress: this.editContactEmail,
|
|
1218
|
+
webAddress: this.editWebUrl
|
|
1219
|
+
};
|
|
1220
|
+
this.dispatchEvent(new CustomEvent("edit-customer", {
|
|
1221
|
+
detail: t,
|
|
1222
|
+
bubbles: !0,
|
|
1223
|
+
composed: !0
|
|
1224
|
+
}));
|
|
1225
|
+
}
|
|
1226
|
+
handleCancelEdit() {
|
|
1227
|
+
this.editingContact = !1, this.countryDropdownOpen = !1, this.fieldErrors = {};
|
|
1228
|
+
}
|
|
1229
|
+
validateField(e, t) {
|
|
1230
|
+
const a = this.translations, r = { ...this.fieldErrors };
|
|
1231
|
+
e === "contactEmail" ? t.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t) ? delete r.contactEmail : r.contactEmail = a.company.emailInvalid : r.contactEmail = a.company.fieldRequired : t.trim() ? delete r[e] : r[e] = a.company.fieldRequired, this.fieldErrors = r;
|
|
1232
|
+
}
|
|
1233
|
+
clearFieldError(e) {
|
|
1234
|
+
if (this.fieldErrors[e]) {
|
|
1235
|
+
const { [e]: t, ...a } = this.fieldErrors;
|
|
1236
|
+
this.fieldErrors = a;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
validateForm() {
|
|
1240
|
+
const e = this.translations, t = {};
|
|
1241
|
+
return this.editName.trim() || (t.name = e.company.fieldRequired), this.editAddress1.trim() || (t.address1 = e.company.fieldRequired), this.editPostalCode.trim() || (t.postalCode = e.company.fieldRequired), this.editCity.trim() || (t.city = e.company.fieldRequired), this.editWebUrl.trim() || (t.webUrl = e.company.fieldRequired), this.editContactEmail.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(this.editContactEmail) || (t.contactEmail = e.company.emailInvalid) : t.contactEmail = e.company.fieldRequired, this.fieldErrors = t, Object.keys(t).length === 0;
|
|
1242
|
+
}
|
|
1243
|
+
toggleCountryDropdown() {
|
|
1244
|
+
this.countryDropdownOpen = !this.countryDropdownOpen;
|
|
1245
|
+
}
|
|
1246
|
+
selectCountry(e) {
|
|
1247
|
+
this.editCountryCode = e, this.countryDropdownOpen = !1, this.updateComplete.then(() => {
|
|
1248
|
+
var t, a;
|
|
1249
|
+
(a = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".select-trigger")) == null || a.focus();
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
handleCountryFocusOut(e) {
|
|
1253
|
+
e.currentTarget.contains(e.relatedTarget) || (this.countryDropdownOpen = !1);
|
|
1254
|
+
}
|
|
1255
|
+
handleCountryKeydown(e) {
|
|
1256
|
+
const t = A.indexOf(this.editCountryCode);
|
|
1257
|
+
if (e.key === "ArrowDown") {
|
|
1258
|
+
e.preventDefault(), this.countryDropdownOpen = !0;
|
|
1259
|
+
const a = Math.min(t + 1, A.length - 1);
|
|
1260
|
+
this.editCountryCode = A[a];
|
|
1261
|
+
} else if (e.key === "ArrowUp") {
|
|
1262
|
+
e.preventDefault(), this.countryDropdownOpen = !0;
|
|
1263
|
+
const a = Math.max(t - 1, 0);
|
|
1264
|
+
this.editCountryCode = A[a];
|
|
1265
|
+
} else e.key === "Escape" && (this.countryDropdownOpen = !1);
|
|
1266
|
+
}
|
|
1267
|
+
updated(e) {
|
|
1268
|
+
var t;
|
|
1269
|
+
if (e.has("editingContact"))
|
|
1270
|
+
if (this.editingContact)
|
|
1271
|
+
this.updateComplete.then(() => {
|
|
1272
|
+
var r;
|
|
1273
|
+
const a = (r = this.shadowRoot) == null ? void 0 : r.querySelector(".company-name-input");
|
|
1274
|
+
a == null || a.focus();
|
|
1275
|
+
});
|
|
1276
|
+
else {
|
|
1277
|
+
const a = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".edit-contact-btn");
|
|
1278
|
+
a == null || a.focus();
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
handleStepKeydown(e) {
|
|
1282
|
+
e.key === "Escape" && this.editingContact && (e.preventDefault(), this.handleCancelEdit());
|
|
1283
|
+
}
|
|
1284
|
+
render() {
|
|
1285
|
+
const e = this.translations;
|
|
1286
|
+
if (!this.customerInfo)
|
|
1287
|
+
return n`
|
|
1288
|
+
<div class="step-content">
|
|
1289
|
+
<h2>${e.company.title}</h2>
|
|
1290
|
+
<p>${e.company.description}</p>
|
|
1291
|
+
<hr class="section-divider" />
|
|
1292
|
+
<div class="loading-placeholder">
|
|
1293
|
+
<p>${e.common.loading}</p>
|
|
1294
|
+
</div>
|
|
1295
|
+
</div>
|
|
1296
|
+
<div class="wizard-actions">
|
|
1297
|
+
<button type="button" class="btn-secondary" @click=${this.handleSaveAndClose}>
|
|
1298
|
+
${e.common.saveAndClose}
|
|
1299
|
+
</button>
|
|
1300
|
+
<button type="button" class="btn-primary" disabled>
|
|
1301
|
+
${e.common.confirm}
|
|
1302
|
+
</button>
|
|
1303
|
+
</div>
|
|
1304
|
+
`;
|
|
1305
|
+
const { customer: t, subscriptions: a } = this.customerInfo, r = this.localCustomer ?? t, i = r.name.split(" ").map((o) => o[0]).join("").toUpperCase().substring(0, 2);
|
|
1306
|
+
return n`
|
|
1307
|
+
<div class="step-content" @keydown=${this.handleStepKeydown}>
|
|
1308
|
+
<h2>${e.company.title}</h2>
|
|
1309
|
+
<p>${e.company.description}</p>
|
|
1310
|
+
|
|
1311
|
+
<hr class="section-divider" />
|
|
1312
|
+
|
|
1313
|
+
<div class="company-header">
|
|
1314
|
+
<div class="company-avatar" aria-hidden="true">${i}</div>
|
|
1315
|
+
${this.editingContact ? n`<div class="company-name-wrapper">
|
|
1316
|
+
<input
|
|
1317
|
+
class="form-input company-name-input ${this.fieldErrors.name ? "has-error" : ""}"
|
|
1318
|
+
type="text"
|
|
1319
|
+
aria-label=${e.company.companyNameLabel}
|
|
1320
|
+
aria-invalid=${this.fieldErrors.name ? "true" : "false"}
|
|
1321
|
+
.value=${this.editName}
|
|
1322
|
+
@input=${(o) => {
|
|
1323
|
+
this.editName = o.target.value, this.clearFieldError("name");
|
|
1324
|
+
}}
|
|
1325
|
+
@blur=${(o) => {
|
|
1326
|
+
this.validateField("name", o.target.value);
|
|
1327
|
+
}}
|
|
1328
|
+
/>
|
|
1329
|
+
${this.fieldErrors.name ? n`<span class="field-error">${d.octagonAlert()}<span class="field-error-text">${this.fieldErrors.name}</span></span>` : ""}
|
|
1330
|
+
<span class="org-number" aria-label=${e.company.organizationNumberLabel} title=${e.company.organizationNumberLabel}>${r.organizationNumber}</span>
|
|
1331
|
+
</div>` : n`<div class="company-name-wrapper">
|
|
1332
|
+
<h3 class="company-name">${r.name}</h3>
|
|
1333
|
+
<span class="org-number" aria-label=${e.company.organizationNumberLabel} title=${e.company.organizationNumberLabel}>${r.organizationNumber}</span>
|
|
1334
|
+
</div>`}
|
|
1335
|
+
</div>
|
|
1336
|
+
|
|
1337
|
+
<div class="company-columns">
|
|
1338
|
+
<!-- Left column: Contact info or edit form -->
|
|
1339
|
+
<div class="contact-column">
|
|
1340
|
+
${this.editingContact ? n`
|
|
1341
|
+
<div class="edit-form" role="group" aria-label=${e.company.editFormLabel}>
|
|
1342
|
+
<div class="form-field">
|
|
1343
|
+
<input
|
|
1344
|
+
class="form-input ${this.fieldErrors.address1 ? "has-error" : ""}"
|
|
1345
|
+
type="text"
|
|
1346
|
+
aria-label=${e.company.address1Label}
|
|
1347
|
+
aria-invalid=${this.fieldErrors.address1 ? "true" : "false"}
|
|
1348
|
+
.value=${this.editAddress1}
|
|
1349
|
+
@input=${(o) => {
|
|
1350
|
+
this.editAddress1 = o.target.value, this.clearFieldError("address1");
|
|
1351
|
+
}}
|
|
1352
|
+
@blur=${(o) => {
|
|
1353
|
+
this.validateField("address1", o.target.value);
|
|
1354
|
+
}}
|
|
1355
|
+
/>
|
|
1356
|
+
${this.fieldErrors.address1 ? n`<span class="field-error">${d.octagonAlert()}<span class="field-error-text">${this.fieldErrors.address1}</span></span>` : ""}
|
|
1357
|
+
</div>
|
|
1358
|
+
<input
|
|
1359
|
+
class="form-input"
|
|
1360
|
+
type="text"
|
|
1361
|
+
aria-label=${e.company.address2Placeholder}
|
|
1362
|
+
.value=${this.editAddress2}
|
|
1363
|
+
placeholder=${e.company.address2Placeholder}
|
|
1364
|
+
@input=${(o) => {
|
|
1365
|
+
this.editAddress2 = o.target.value;
|
|
1366
|
+
}}
|
|
1367
|
+
/>
|
|
1368
|
+
<div class="form-field">
|
|
1369
|
+
<div class="postal-city-row" role="group" aria-label=${e.company.addressGroupLabel}>
|
|
1370
|
+
<input
|
|
1371
|
+
class="form-input input-postal ${this.fieldErrors.postalCode ? "has-error" : ""}"
|
|
1372
|
+
type="text"
|
|
1373
|
+
inputmode="numeric"
|
|
1374
|
+
pattern="[0-9]*"
|
|
1375
|
+
aria-label=${e.company.postalCodeLabel}
|
|
1376
|
+
aria-invalid=${this.fieldErrors.postalCode ? "true" : "false"}
|
|
1377
|
+
.value=${this.editPostalCode}
|
|
1378
|
+
@input=${(o) => {
|
|
1379
|
+
this.editPostalCode = o.target.value, this.clearFieldError("postalCode");
|
|
1380
|
+
}}
|
|
1381
|
+
@blur=${(o) => {
|
|
1382
|
+
this.validateField("postalCode", o.target.value);
|
|
1383
|
+
}}
|
|
1384
|
+
/>
|
|
1385
|
+
<input
|
|
1386
|
+
class="form-input input-city ${this.fieldErrors.city ? "has-error" : ""}"
|
|
1387
|
+
type="text"
|
|
1388
|
+
aria-label=${e.company.cityLabel}
|
|
1389
|
+
aria-invalid=${this.fieldErrors.city ? "true" : "false"}
|
|
1390
|
+
.value=${this.editCity}
|
|
1391
|
+
@input=${(o) => {
|
|
1392
|
+
this.editCity = o.target.value, this.clearFieldError("city");
|
|
1393
|
+
}}
|
|
1394
|
+
@blur=${(o) => {
|
|
1395
|
+
this.validateField("city", o.target.value);
|
|
1396
|
+
}}
|
|
1397
|
+
/>
|
|
1398
|
+
</div>
|
|
1399
|
+
${this.fieldErrors.postalCode ? n`<span class="field-error">${d.octagonAlert()}<span class="field-error-text">${this.fieldErrors.postalCode}</span></span>` : ""}
|
|
1400
|
+
${this.fieldErrors.city ? n`<span class="field-error">${d.octagonAlert()}<span class="field-error-text">${this.fieldErrors.city}</span></span>` : ""}
|
|
1401
|
+
</div>
|
|
1402
|
+
<div
|
|
1403
|
+
class="select-wrapper"
|
|
1404
|
+
@focusout=${this.handleCountryFocusOut}
|
|
1405
|
+
>
|
|
1406
|
+
<button
|
|
1407
|
+
type="button"
|
|
1408
|
+
class="form-input select-trigger"
|
|
1409
|
+
aria-haspopup="listbox"
|
|
1410
|
+
aria-expanded=${String(this.countryDropdownOpen)}
|
|
1411
|
+
aria-label=${e.company.countryLabel}
|
|
1412
|
+
@click=${this.toggleCountryDropdown}
|
|
1413
|
+
@keydown=${this.handleCountryKeydown}
|
|
1414
|
+
>
|
|
1415
|
+
<span>${this.editCountryCode ? this.getCountryLabel(this.editCountryCode) : ""}</span>
|
|
1416
|
+
${d.chevronDown()}
|
|
1417
|
+
</button>
|
|
1418
|
+
${this.countryDropdownOpen ? n`
|
|
1419
|
+
<ul class="dropdown-menu" role="listbox" aria-label=${e.company.countryLabel}>
|
|
1420
|
+
${A.map((o) => n`
|
|
1421
|
+
<li
|
|
1422
|
+
class="dropdown-option"
|
|
1423
|
+
role="option"
|
|
1424
|
+
aria-selected=${String(o === this.editCountryCode)}
|
|
1425
|
+
tabindex="0"
|
|
1426
|
+
@click=${() => this.selectCountry(o)}
|
|
1427
|
+
@keydown=${(s) => {
|
|
1428
|
+
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), this.selectCountry(o));
|
|
1429
|
+
}}
|
|
1430
|
+
>
|
|
1431
|
+
<span class="dropdown-option-icon">${o === this.editCountryCode ? d.check() : ""}</span>
|
|
1432
|
+
${this.getCountryLabel(o)}
|
|
1433
|
+
</li>
|
|
1434
|
+
`)}
|
|
1435
|
+
</ul>
|
|
1436
|
+
` : ""}
|
|
1437
|
+
</div>
|
|
1438
|
+
<div class="form-field">
|
|
1439
|
+
<input
|
|
1440
|
+
class="form-input ${this.fieldErrors.webUrl ? "has-error" : ""}"
|
|
1441
|
+
type="text"
|
|
1442
|
+
aria-label=${e.company.webUrlLabel}
|
|
1443
|
+
aria-invalid=${this.fieldErrors.webUrl ? "true" : "false"}
|
|
1444
|
+
.value=${this.editWebUrl}
|
|
1445
|
+
@input=${(o) => {
|
|
1446
|
+
this.editWebUrl = o.target.value, this.clearFieldError("webUrl");
|
|
1447
|
+
}}
|
|
1448
|
+
@blur=${(o) => {
|
|
1449
|
+
this.validateField("webUrl", o.target.value);
|
|
1450
|
+
}}
|
|
1451
|
+
/>
|
|
1452
|
+
${this.fieldErrors.webUrl ? n`<span class="field-error">${d.octagonAlert()}<span class="field-error-text">${this.fieldErrors.webUrl}</span></span>` : ""}
|
|
1453
|
+
</div>
|
|
1454
|
+
<div class="form-field">
|
|
1455
|
+
<input
|
|
1456
|
+
class="form-input ${this.fieldErrors.contactEmail ? "has-error" : ""}"
|
|
1457
|
+
type="email"
|
|
1458
|
+
aria-label=${e.company.emailLabel}
|
|
1459
|
+
aria-invalid=${this.fieldErrors.contactEmail ? "true" : "false"}
|
|
1460
|
+
.value=${this.editContactEmail}
|
|
1461
|
+
@input=${(o) => {
|
|
1462
|
+
this.editContactEmail = o.target.value, this.clearFieldError("contactEmail");
|
|
1463
|
+
}}
|
|
1464
|
+
@blur=${(o) => {
|
|
1465
|
+
this.validateField("contactEmail", o.target.value);
|
|
1466
|
+
}}
|
|
1467
|
+
/>
|
|
1468
|
+
${this.fieldErrors.contactEmail ? n`<span class="field-error">${d.octagonAlert()}<span class="field-error-text">${this.fieldErrors.contactEmail}</span></span>` : ""}
|
|
1469
|
+
</div>
|
|
1470
|
+
<div class="edit-actions">
|
|
1471
|
+
<button type="button" class="btn-primary" @click=${this.handleSaveChanges}>
|
|
1472
|
+
${e.company.saveChanges}
|
|
1473
|
+
</button>
|
|
1474
|
+
<button type="button" class="btn-secondary" @click=${this.handleCancelEdit}>
|
|
1475
|
+
${e.company.cancelEdit}
|
|
1476
|
+
</button>
|
|
1477
|
+
</div>
|
|
1478
|
+
</div>
|
|
1479
|
+
` : n`
|
|
1480
|
+
<div class="contact-info">
|
|
1481
|
+
<div class="contact-group">
|
|
1482
|
+
<p>${r.address1}</p>
|
|
1483
|
+
${r.address2 ? n`<p>${r.address2}</p>` : ""}
|
|
1484
|
+
<p>${r.postalCode} ${r.city}</p>
|
|
1485
|
+
<p>${this.getCountryLabel(r.countryCode)}</p>
|
|
1486
|
+
</div>
|
|
1487
|
+
<div class="contact-group">
|
|
1488
|
+
<p>${r.webUrl}</p>
|
|
1489
|
+
<p>${r.contactEmail}</p>
|
|
1490
|
+
</div>
|
|
1491
|
+
</div>
|
|
1492
|
+
<button class="edit-contact-btn" type="button" aria-label=${e.company.editContactLabel} aria-expanded=${String(this.editingContact)} title=${e.company.editContactLabel} @click=${this.handleEditContact}>
|
|
1493
|
+
${d.pencil()}
|
|
1494
|
+
</button>
|
|
1495
|
+
`}
|
|
1496
|
+
</div>
|
|
1497
|
+
|
|
1498
|
+
<!-- Right column: Subscription card -->
|
|
1499
|
+
<div class="subscription-card">
|
|
1500
|
+
<h4 class="subscription-title">${e.company.subscriptionLabel}</h4>
|
|
1501
|
+
<ul class="subscription-list">
|
|
1502
|
+
${a.map((o) => n`
|
|
1503
|
+
<li>
|
|
1504
|
+
${d.check()}
|
|
1505
|
+
${o}
|
|
1506
|
+
</li>
|
|
1507
|
+
`)}
|
|
1508
|
+
</ul>
|
|
1509
|
+
${this.editingContact ? n`
|
|
1510
|
+
<div class="plan-notification" role="note">
|
|
1511
|
+
<div class="plan-notification-icon">${d.info()}</div>
|
|
1512
|
+
<p class="plan-notification-text">
|
|
1513
|
+
${(() => {
|
|
1514
|
+
const o = e.company.managePlanMessage.split("{partnerName}"), s = this.customerInfo.partner.name;
|
|
1515
|
+
return n`${o[0]}<strong>${s}</strong>${o[1]}`;
|
|
1516
|
+
})()}
|
|
1517
|
+
</p>
|
|
1518
|
+
</div>
|
|
1519
|
+
` : ""}
|
|
1520
|
+
</div>
|
|
1521
|
+
</div>
|
|
1522
|
+
</div>
|
|
1523
|
+
|
|
1524
|
+
<hr class="section-divider" />
|
|
1525
|
+
|
|
1526
|
+
<div class="wizard-actions">
|
|
1527
|
+
<button type="button" class="btn-secondary" @click=${this.handleSaveAndClose}>
|
|
1528
|
+
${e.common.saveAndClose}
|
|
1529
|
+
</button>
|
|
1530
|
+
<button type="button" class="btn-primary" ?disabled=${this.editingContact} @click=${this.handleNext}>
|
|
1531
|
+
${e.common.confirm}
|
|
1532
|
+
</button>
|
|
1533
|
+
</div>
|
|
1534
|
+
`;
|
|
1535
|
+
}
|
|
1536
|
+
};
|
|
1537
|
+
p.styles = [
|
|
1538
|
+
E,
|
|
1539
|
+
j,
|
|
1540
|
+
P,
|
|
1541
|
+
$`:host{--avatar-size:var(--ga-size-spacing-09);}.step-content > p{font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);color:var(--ga-color-text-body);margin:0 0 var(--ga-size-spacing-06);}.section-divider{border:none;border-top:var(--ga-size-border-width-sm) solid var(--ga-color-neutral-30);margin:0 0 var(--ga-size-spacing-06);}.loading-placeholder{padding:var(--ga-size-spacing-05);background:var(--ga-color-neutral-10);border-radius:var(--ga-radius);color:var(--ga-color-neutral-60);font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);}.company-header{display:flex;align-items:center;gap:var(--ga-size-spacing-05);margin-bottom:var(--ga-size-spacing-07);}.company-avatar{width:var(--avatar-size);height:var(--avatar-size);border-radius:var(--ga-radius-round);background:transparent;border:var(--ga-size-border-width-sm) solid var(--ga-color-text-headings);color:var(--ga-color-text-headings);display:flex;align-items:center;justify-content:center;font-size:var(--ga-text-md-size);font-weight:600;flex-shrink:0;}.company-name{font-size:var(--ga-text-xl-size);line-height:var(--ga-text-xl-line-height);letter-spacing:var(--ga-text-xl-tracking);font-weight:400;margin:0;color:var(--ga-color-text-headings);}.company-columns{display:flex;gap:var(--ga-size-spacing-07);align-items:flex-start;padding-bottom:var(--ga-size-spacing-04);padding-left:var(--ga-size-spacing-10);padding-right:var(--ga-size-spacing-10);}.contact-column{width:var(--ga-size-content-xs);flex-shrink:0;display:flex;flex-direction:column;gap:var(--ga-size-spacing-05);}.edit-contact-btn{all:unset;display:flex;align-items:center;justify-content:center;width:var(--ga-size-spacing-07);height:var(--ga-size-spacing-07);border:var(--ga-size-border-width-sm) solid var(--ga-color-border-primary);border-radius:var(--ga-radius);cursor:pointer;color:var(--ga-color-text-body);}.edit-contact-btn:hover{background:var(--ga-color-neutral-10);}.edit-contact-btn:focus-visible{outline:var(--ga-size-border-width-md) solid var(--ga-color-primary);outline-offset:var(--ga-size-border-width-md);}.edit-contact-btn svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);}.edit-form{display:flex;flex-direction:column;gap:var(--ga-size-spacing-05);}.form-field{display:flex;flex-direction:column;}.form-input{width:100%;padding:var(--ga-size-spacing-03) var(--ga-size-spacing-04);border:var(--ga-size-border-width-sm) solid var(--ga-color-border-primary);border-radius:var(--ga-radius);font-size:var(--ga-text-md-size);font-family:var(--ga-font-family-primary);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);color:var(--ga-color-text-action);background:var(--ga-color-white);box-sizing:border-box;outline:none;transition:border-color 0.2s;}.form-input:focus{border-color:var(--ga-color-border-focus);box-shadow:0 0 0 var(--ga-size-border-width-md) var(--ga-color-white),0 0 0 var(--ga-size-border-width-lg) var(--ga-color-border-focus);}.form-input.has-error{border-color:var(--ga-color-border-error);background:var(--ga-color-surface-error);}.form-input.has-error:focus{border-color:var(--ga-color-border-error);box-shadow:0 0 0 var(--ga-size-border-width-md) var(--ga-color-white),0 0 0 var(--ga-size-border-width-lg) var(--ga-color-border-error);}.postal-city-row{display:flex;gap:var(--ga-size-spacing-03);}.input-postal{width:var(--ga-size-spacing-10);flex-shrink:0;}.input-city{flex:1;}.input-country{max-width:var(--ga-size-content-2xs);}.select-wrapper{position:relative;max-width:var(--ga-size-content-2xs);}.select-trigger{display:flex;align-items:center;justify-content:space-between;text-align:left;cursor:pointer;width:100%;padding-right:var(--ga-size-spacing-04);}.select-trigger svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);flex-shrink:0;color:var(--ga-color-text-action);}.dropdown-menu{position:absolute;top:calc(100% + var(--ga-size-spacing-01));left:0;right:0;background:var(--ga-color-surface-primary);border:var(--ga-size-border-width-sm) solid var(--ga-color-border-primary);border-radius:var(--ga-radius);box-shadow:var(--ga-shadow-dropdown);list-style:none;margin:0;padding:0;z-index:10;overflow:hidden;}.dropdown-option{display:flex;align-items:center;gap:var(--ga-size-spacing-03);padding:var(--ga-size-spacing-03) var(--ga-size-spacing-04);font-size:var(--ga-text-md-size);font-family:var(--ga-font-family-primary);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);color:var(--ga-color-text-body);cursor:pointer;list-style:none;outline:none;position:relative;}.dropdown-option[aria-selected='true']{background:var(--ga-color-surface-selected);}.dropdown-option:hover{background:var(--ga-color-surface-action-hover-2);color:var(--ga-color-text-action-hover);}.dropdown-option:focus{box-shadow:inset 0 0 0 var(--ga-size-border-width-md) var(--ga-color-border-focus);}.dropdown-option-icon{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--ga-color-text-body);}.dropdown-option-icon svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);}.company-name-wrapper{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--ga-size-spacing-03);}.org-number{font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-text-subtle);}.company-name-input{width:100%;}.edit-actions{display:flex;gap:var(--ga-size-spacing-05);align-items:center;margin-top:var(--ga-size-spacing-03);}.subscription-card{flex:1;border:var(--ga-size-border-width-sm) solid var(--ga-color-border-primary);border-radius:var(--ga-radius);background:var(--ga-color-white);padding:var(--ga-size-spacing-03) var(--ga-size-spacing-03) var(--ga-size-spacing-03) var(--ga-size-spacing-05);display:flex;flex-direction:column;gap:var(--ga-size-spacing-03);}.subscription-title{font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);font-weight:700;color:var(--ga-color-text-body);margin:0;}.contact-info{display:flex;flex-direction:column;gap:var(--ga-size-spacing-05);}.contact-group{display:flex;flex-direction:column;gap:var(--ga-size-spacing-01);}.contact-info p{margin:0;font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);color:var(--ga-color-text-body);}.subscription-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--ga-size-spacing-03);}.subscription-list li{display:flex;align-items:center;gap:var(--ga-size-spacing-03);font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);color:var(--ga-color-text-body);}.subscription-list li svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);color:var(--ga-color-text-body);flex-shrink:0;}.plan-notification{display:flex;align-items:flex-start;gap:var(--ga-size-spacing-05);padding:var(--ga-size-spacing-03) var(--ga-size-spacing-03) var(--ga-size-spacing-03) var(--ga-size-spacing-05);background:var(--ga-color-surface-information);border:var(--ga-size-border-width-sm) solid var(--ga-color-border-information);border-radius:var(--ga-radius);}.plan-notification-icon{color:var(--ga-color-icon-information);flex-shrink:0;padding-top:var(--ga-size-spacing-03);}.plan-notification-icon svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);}.plan-notification-text{font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);color:var(--ga-color-text-body);margin:var(--ga-size-spacing-03) 0;}.wizard-actions{margin-top:0;}`
|
|
1542
|
+
];
|
|
1543
|
+
u([
|
|
1544
|
+
g({ type: Object })
|
|
1545
|
+
], p.prototype, "translations", 2);
|
|
1546
|
+
u([
|
|
1547
|
+
g({ type: String })
|
|
1548
|
+
], p.prototype, "locale", 2);
|
|
1549
|
+
u([
|
|
1550
|
+
g({ type: Object })
|
|
1551
|
+
], p.prototype, "customerInfo", 2);
|
|
1552
|
+
u([
|
|
1553
|
+
l()
|
|
1554
|
+
], p.prototype, "editingContact", 2);
|
|
1555
|
+
u([
|
|
1556
|
+
l()
|
|
1557
|
+
], p.prototype, "countryDropdownOpen", 2);
|
|
1558
|
+
u([
|
|
1559
|
+
l()
|
|
1560
|
+
], p.prototype, "fieldErrors", 2);
|
|
1561
|
+
u([
|
|
1562
|
+
l()
|
|
1563
|
+
], p.prototype, "editName", 2);
|
|
1564
|
+
u([
|
|
1565
|
+
l()
|
|
1566
|
+
], p.prototype, "editAddress1", 2);
|
|
1567
|
+
u([
|
|
1568
|
+
l()
|
|
1569
|
+
], p.prototype, "editAddress2", 2);
|
|
1570
|
+
u([
|
|
1571
|
+
l()
|
|
1572
|
+
], p.prototype, "editPostalCode", 2);
|
|
1573
|
+
u([
|
|
1574
|
+
l()
|
|
1575
|
+
], p.prototype, "editCity", 2);
|
|
1576
|
+
u([
|
|
1577
|
+
l()
|
|
1578
|
+
], p.prototype, "editCountryCode", 2);
|
|
1579
|
+
u([
|
|
1580
|
+
l()
|
|
1581
|
+
], p.prototype, "editWebUrl", 2);
|
|
1582
|
+
u([
|
|
1583
|
+
l()
|
|
1584
|
+
], p.prototype, "editContactEmail", 2);
|
|
1585
|
+
u([
|
|
1586
|
+
l()
|
|
1587
|
+
], p.prototype, "localCustomer", 2);
|
|
1588
|
+
p = u([
|
|
1589
|
+
S("wizard-step1-company")
|
|
1590
|
+
], p);
|
|
1591
|
+
var W = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, y = (e, t, a, r) => {
|
|
1592
|
+
for (var i = r > 1 ? void 0 : r ? Y(t, a) : t, o = e.length - 1, s; o >= 0; o--)
|
|
1593
|
+
(s = e[o]) && (i = (r ? s(t, a, i) : s(i)) || i);
|
|
1594
|
+
return r && i && W(t, a, i), i;
|
|
1595
|
+
};
|
|
1596
|
+
let h = class extends L {
|
|
1597
|
+
constructor() {
|
|
1598
|
+
super(...arguments), this.httpService = null, this.customerId = "", this.locale = "en-GB", this.currentUser = null, this.existingAdmins = [], this.isLoadingAdmins = !1, this.rows = [], this.nextId = 1, this.lookingUpIds = /* @__PURE__ */ new Set(), this.isConfirming = !1, this.rowErrors = /* @__PURE__ */ new Map(), this._loadSequence = 0;
|
|
1599
|
+
}
|
|
1600
|
+
updated(e) {
|
|
1601
|
+
e.has("httpService") || e.has("customerId") ? this.loadExistingAdmins() : e.has("currentUser") && this.existingAdmins.length > 0 && (this.existingAdmins = this.sortAdmins([...this.existingAdmins]));
|
|
1602
|
+
}
|
|
1603
|
+
sortAdmins(e) {
|
|
1604
|
+
var a;
|
|
1605
|
+
const t = (a = this.currentUser) == null ? void 0 : a.email.toLowerCase();
|
|
1606
|
+
return t ? e.sort((r, i) => {
|
|
1607
|
+
const o = r.email.toLowerCase() === t, s = i.email.toLowerCase() === t;
|
|
1608
|
+
return o && s ? 0 : o ? -1 : s ? 1 : 0;
|
|
1609
|
+
}) : e;
|
|
1610
|
+
}
|
|
1611
|
+
async loadExistingAdmins() {
|
|
1612
|
+
if (!this.httpService || !this.customerId) return;
|
|
1613
|
+
const e = ++this._loadSequence;
|
|
1614
|
+
this.isLoadingAdmins = !0;
|
|
1615
|
+
try {
|
|
1616
|
+
const t = await this.httpService.getAdministrators(this.customerId);
|
|
1617
|
+
if (e !== this._loadSequence) return;
|
|
1618
|
+
this.existingAdmins = this.sortAdmins([...t.content]);
|
|
1619
|
+
} catch {
|
|
1620
|
+
} finally {
|
|
1621
|
+
e === this._loadSequence && (this.isLoadingAdmins = !1);
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
get hasOpenRow() {
|
|
1625
|
+
return this.rows.some((e) => !e.isDone);
|
|
1626
|
+
}
|
|
1627
|
+
get validAdminCount() {
|
|
1628
|
+
return this.rows.filter(
|
|
1629
|
+
(e) => e.isDone && (e.state === "found" || e.state === "not-found" && e.firstName.trim() !== "" && e.lastName.trim() !== "")
|
|
1630
|
+
).length;
|
|
1631
|
+
}
|
|
1632
|
+
get canConfirm() {
|
|
1633
|
+
return !this.hasOpenRow && !this.isConfirming && !this.isLoadingAdmins;
|
|
1634
|
+
}
|
|
1635
|
+
get canAddMore() {
|
|
1636
|
+
return !this.hasOpenRow && !this.isConfirming;
|
|
1637
|
+
}
|
|
1638
|
+
get confirmButtonLabel() {
|
|
1639
|
+
const e = this.translations, t = this.validAdminCount;
|
|
1640
|
+
return t === 0 ? e.common.confirm : (t === 1 ? e.administrators.confirmSingular : e.administrators.confirmPlural).replace("{count}", String(t));
|
|
1641
|
+
}
|
|
1642
|
+
async addRow() {
|
|
1643
|
+
var a;
|
|
1644
|
+
if (!this.canAddMore) return;
|
|
1645
|
+
const e = this.nextId++;
|
|
1646
|
+
this.rows = [...this.rows, { id: e, state: "lookup", isDone: !1, email: "", firstName: "", lastName: "" }], await this.updateComplete;
|
|
1647
|
+
const t = (a = this.shadowRoot) == null ? void 0 : a.querySelectorAll('input[type="email"]');
|
|
1648
|
+
t && t.length > 0 && t[t.length - 1].focus();
|
|
1649
|
+
}
|
|
1650
|
+
removeRow(e) {
|
|
1651
|
+
this.rows = this.rows.filter((a) => a.id !== e);
|
|
1652
|
+
const t = new Map(this.rowErrors);
|
|
1653
|
+
t.delete(e), this.rowErrors = t;
|
|
1654
|
+
}
|
|
1655
|
+
doneRow(e) {
|
|
1656
|
+
const t = this.rows.find((a) => a.id === e);
|
|
1657
|
+
if (t && t.state !== "lookup") {
|
|
1658
|
+
if (t.state === "not-found") {
|
|
1659
|
+
const a = this.validateRowRequiredField(e, "firstName", t.firstName), r = this.validateRowRequiredField(e, "lastName", t.lastName);
|
|
1660
|
+
if (!a || !r) return;
|
|
1661
|
+
}
|
|
1662
|
+
this.rows = this.rows.map(
|
|
1663
|
+
(a) => a.id === e ? { ...a, isDone: !0, email: a.email.trim(), firstName: a.firstName.trim(), lastName: a.lastName.trim() } : a
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
editRow(e) {
|
|
1668
|
+
this.rows = this.rows.map((t) => t.id === e ? { ...t, isDone: !1 } : t);
|
|
1669
|
+
}
|
|
1670
|
+
updateRowEmail(e, t) {
|
|
1671
|
+
this.rows = this.rows.map(
|
|
1672
|
+
(r) => r.id === e ? { ...r, email: t, state: "lookup", firstName: "", lastName: "" } : r
|
|
1673
|
+
);
|
|
1674
|
+
const a = new Map(this.rowErrors);
|
|
1675
|
+
a.delete(e), this.rowErrors = a;
|
|
1676
|
+
}
|
|
1677
|
+
updateFirstName(e, t) {
|
|
1678
|
+
this.rows = this.rows.map((a) => a.id === e ? { ...a, firstName: t } : a), this.clearRowFieldError(e, "firstName");
|
|
1679
|
+
}
|
|
1680
|
+
updateLastName(e, t) {
|
|
1681
|
+
this.rows = this.rows.map((a) => a.id === e ? { ...a, lastName: t } : a), this.clearRowFieldError(e, "lastName");
|
|
1682
|
+
}
|
|
1683
|
+
setRowFieldError(e, t, a) {
|
|
1684
|
+
const r = new Map(this.rowErrors);
|
|
1685
|
+
r.set(e, { ...r.get(e) ?? {}, [t]: a }), this.rowErrors = r;
|
|
1686
|
+
}
|
|
1687
|
+
clearRowFieldError(e, t) {
|
|
1688
|
+
const a = this.rowErrors.get(e);
|
|
1689
|
+
if (!(a != null && a[t])) return;
|
|
1690
|
+
const { [t]: r, ...i } = a, o = new Map(this.rowErrors);
|
|
1691
|
+
Object.keys(i).length === 0 ? o.delete(e) : o.set(e, i), this.rowErrors = o;
|
|
1692
|
+
}
|
|
1693
|
+
validateRowEmail(e, t) {
|
|
1694
|
+
const a = this.translations;
|
|
1695
|
+
return t.trim() ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.trim()) ? (this.clearRowFieldError(e, "email"), !0) : (this.setRowFieldError(e, "email", a.company.emailInvalid), !1) : (this.setRowFieldError(e, "email", a.company.fieldRequired), !1);
|
|
1696
|
+
}
|
|
1697
|
+
validateRowRequiredField(e, t, a) {
|
|
1698
|
+
const r = this.translations;
|
|
1699
|
+
return a.trim() ? (this.clearRowFieldError(e, t), !0) : (this.setRowFieldError(e, t, r.company.fieldRequired), !1);
|
|
1700
|
+
}
|
|
1701
|
+
validateAllRows() {
|
|
1702
|
+
let e = !0;
|
|
1703
|
+
for (const t of this.rows)
|
|
1704
|
+
t.state === "not-found" && (this.validateRowRequiredField(t.id, "firstName", t.firstName) || (e = !1), this.validateRowRequiredField(t.id, "lastName", t.lastName) || (e = !1));
|
|
1705
|
+
return e;
|
|
1706
|
+
}
|
|
1707
|
+
async lookupUser(e) {
|
|
1708
|
+
var r, i, o, s, z, C;
|
|
1709
|
+
const t = this.rows.find((x) => x.id === e);
|
|
1710
|
+
if (!t || !this.httpService) return;
|
|
1711
|
+
if (!this.validateRowEmail(e, t.email)) {
|
|
1712
|
+
(i = (r = this.shadowRoot) == null ? void 0 : r.querySelector(`input[data-email-row-id="${e}"]`)) == null || i.focus();
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
const a = t.email.trim();
|
|
1716
|
+
this.lookingUpIds = /* @__PURE__ */ new Set([...this.lookingUpIds, e]);
|
|
1717
|
+
try {
|
|
1718
|
+
const x = await this.httpService.getUserByEmail(a), c = this.rows.find((w) => w.id === e);
|
|
1719
|
+
if (!c || c.email.trim() !== a) return;
|
|
1720
|
+
x ? (this.rows = this.rows.map(
|
|
1721
|
+
(w) => w.id === e ? { ...w, state: "found", firstName: x.firstName, lastName: x.lastName } : w
|
|
1722
|
+
), await this.updateComplete, (s = (o = this.shadowRoot) == null ? void 0 : o.querySelector(`button[data-done-row-id="${e}"]`)) == null || s.focus()) : (this.rows = this.rows.map(
|
|
1723
|
+
(w) => w.id === e ? { ...w, state: "not-found", firstName: "", lastName: "" } : w
|
|
1724
|
+
), await this.updateComplete, (C = (z = this.shadowRoot) == null ? void 0 : z.querySelector(`input[data-row-id="${e}"]`)) == null || C.focus());
|
|
1725
|
+
} catch {
|
|
1726
|
+
} finally {
|
|
1727
|
+
const x = new Set(this.lookingUpIds);
|
|
1728
|
+
x.delete(e), this.lookingUpIds = x;
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
async handleConfirm() {
|
|
1732
|
+
if (!this.canConfirm || !this.httpService || !this.customerId || !this.validateAllRows()) return;
|
|
1733
|
+
this.isConfirming = !0;
|
|
1734
|
+
const e = this.rows.filter(
|
|
1735
|
+
(t) => t.state === "found" || t.state === "not-found" && t.firstName.trim() && t.lastName.trim()
|
|
1736
|
+
);
|
|
1737
|
+
try {
|
|
1738
|
+
if (e.length > 0) {
|
|
1739
|
+
const t = e.map((a) => ({
|
|
1740
|
+
email: a.email.trim(),
|
|
1741
|
+
firstName: a.firstName.trim(),
|
|
1742
|
+
lastName: a.lastName.trim(),
|
|
1743
|
+
languageCode: this.locale
|
|
1744
|
+
}));
|
|
1745
|
+
await this.httpService.addCustomerAdministrators(this.customerId, t);
|
|
1746
|
+
}
|
|
1747
|
+
this.dispatchEvent(new CustomEvent("next", { bubbles: !0, composed: !0 }));
|
|
1748
|
+
} catch {
|
|
1749
|
+
} finally {
|
|
1750
|
+
this.isConfirming = !1;
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
handleSaveAndClose() {
|
|
1754
|
+
this.dispatchEvent(new CustomEvent("save-and-close", { bubbles: !0, composed: !0 }));
|
|
1755
|
+
}
|
|
1756
|
+
renderExistingAdminRow(e, t) {
|
|
1757
|
+
var i;
|
|
1758
|
+
const a = this.translations, r = ((i = this.currentUser) == null ? void 0 : i.email.toLowerCase()) === e.email.toLowerCase();
|
|
1759
|
+
return n`
|
|
1760
|
+
<div class="admin-row admin-row--done">
|
|
1761
|
+
<span class="row-num">${t}</span>
|
|
1762
|
+
<div class="cell-email">
|
|
1763
|
+
<span class="name-text">${e.email}</span>
|
|
1764
|
+
</div>
|
|
1765
|
+
<div class="cell-name">
|
|
1766
|
+
<span class="name-text">${e.firstName}</span>
|
|
1767
|
+
</div>
|
|
1768
|
+
<div class="cell-name-last">
|
|
1769
|
+
<span class="name-text">${e.lastName}</span>
|
|
1770
|
+
</div>
|
|
1771
|
+
<div class="cell-action">
|
|
1772
|
+
${r ? n`
|
|
1773
|
+
<div class="you-tag" aria-label=${a.administrators.youLabel}>
|
|
1774
|
+
<span>${d.userRound()}</span>
|
|
1775
|
+
<span>${a.administrators.youLabel}</span>
|
|
1776
|
+
</div>
|
|
1777
|
+
` : q}
|
|
1778
|
+
</div>
|
|
1779
|
+
</div>
|
|
1780
|
+
`;
|
|
1781
|
+
}
|
|
1782
|
+
renderLookupRow(e, t) {
|
|
1783
|
+
const a = this.translations, r = this.lookingUpIds.has(e.id), i = e.email.trim().length > 0, o = this.rowErrors.get(e.id) ?? {};
|
|
1784
|
+
return n`
|
|
1785
|
+
<div class="admin-row">
|
|
1786
|
+
<span class="row-num">${t}</span>
|
|
1787
|
+
<div class="cell-email">
|
|
1788
|
+
<input
|
|
1789
|
+
class="grid-input ${o.email ? "has-error" : ""}"
|
|
1790
|
+
type="email"
|
|
1791
|
+
data-email-row-id=${e.id}
|
|
1792
|
+
.value=${e.email}
|
|
1793
|
+
placeholder=${a.company.emailLabel}
|
|
1794
|
+
aria-label=${a.company.emailLabel}
|
|
1795
|
+
aria-invalid=${o.email ? "true" : "false"}
|
|
1796
|
+
@input=${(s) => this.updateRowEmail(e.id, s.target.value)}
|
|
1797
|
+
@blur=${(s) => this.validateRowEmail(e.id, s.target.value)}
|
|
1798
|
+
/>
|
|
1799
|
+
<span class="field-error ${o.email ? "" : "field-error--empty"}" aria-hidden=${o.email ? "false" : "true"}>${d.octagonAlert()}<span class="field-error-text">${o.email ?? ""}</span></span>
|
|
1800
|
+
</div>
|
|
1801
|
+
<div class="cell-lookup-btn">
|
|
1802
|
+
<button
|
|
1803
|
+
type="button"
|
|
1804
|
+
class="btn-add-name"
|
|
1805
|
+
@click=${() => this.lookupUser(e.id)}
|
|
1806
|
+
?disabled=${!i || r}
|
|
1807
|
+
aria-label=${a.administrators.addNameButton}
|
|
1808
|
+
>
|
|
1809
|
+
${a.administrators.addNameButton}
|
|
1810
|
+
</button>
|
|
1811
|
+
</div>
|
|
1812
|
+
<div class="cell-action">
|
|
1813
|
+
<button
|
|
1814
|
+
type="button"
|
|
1815
|
+
class="btn-icon"
|
|
1816
|
+
@click=${() => this.removeRow(e.id)}
|
|
1817
|
+
aria-label=${a.administrators.deleteRowLabel}
|
|
1818
|
+
>
|
|
1819
|
+
${d.trash()}
|
|
1820
|
+
</button>
|
|
1821
|
+
</div>
|
|
1822
|
+
</div>
|
|
1823
|
+
`;
|
|
1824
|
+
}
|
|
1825
|
+
renderFoundRow(e, t) {
|
|
1826
|
+
const a = this.translations;
|
|
1827
|
+
if (e.isDone)
|
|
1828
|
+
return n`
|
|
1829
|
+
<div class="admin-row admin-row--done">
|
|
1830
|
+
<span class="row-num">${t}</span>
|
|
1831
|
+
<div class="cell-email">
|
|
1832
|
+
<span class="name-text">${e.email}</span>
|
|
1833
|
+
</div>
|
|
1834
|
+
<div class="cell-name">
|
|
1835
|
+
<span class="name-text">${e.firstName}</span>
|
|
1836
|
+
</div>
|
|
1837
|
+
<div class="cell-name-last">
|
|
1838
|
+
<span class="name-text">${e.lastName}</span>
|
|
1839
|
+
</div>
|
|
1840
|
+
<div class="cell-action">
|
|
1841
|
+
<button
|
|
1842
|
+
type="button"
|
|
1843
|
+
class="btn-edit"
|
|
1844
|
+
@click=${() => this.editRow(e.id)}
|
|
1845
|
+
aria-label=${a.administrators.editButton}
|
|
1846
|
+
>
|
|
1847
|
+
${a.administrators.editButton}
|
|
1848
|
+
</button>
|
|
1849
|
+
</div>
|
|
1850
|
+
</div>
|
|
1851
|
+
`;
|
|
1852
|
+
const r = this.lookingUpIds.has(e.id), i = this.rowErrors.get(e.id) ?? {};
|
|
1853
|
+
return n`
|
|
1854
|
+
<div class="admin-row">
|
|
1855
|
+
<span class="row-num">${t}</span>
|
|
1856
|
+
<div class="cell-email">
|
|
1857
|
+
<input
|
|
1858
|
+
class="grid-input ${i.email ? "has-error" : ""}"
|
|
1859
|
+
type="email"
|
|
1860
|
+
.value=${e.email}
|
|
1861
|
+
placeholder=${a.company.emailLabel}
|
|
1862
|
+
aria-label=${a.company.emailLabel}
|
|
1863
|
+
aria-invalid=${i.email ? "true" : "false"}
|
|
1864
|
+
?disabled=${r}
|
|
1865
|
+
@input=${(o) => this.updateRowEmail(e.id, o.target.value)}
|
|
1866
|
+
@blur=${(o) => this.validateRowEmail(e.id, o.target.value)}
|
|
1867
|
+
/>
|
|
1868
|
+
<span class="field-error ${i.email ? "" : "field-error--empty"}" aria-hidden=${i.email ? "false" : "true"}>${d.octagonAlert()}<span class="field-error-text">${i.email ?? ""}</span></span>
|
|
1869
|
+
</div>
|
|
1870
|
+
<div class="cell-name">
|
|
1871
|
+
<span class="name-text">${e.firstName}</span>
|
|
1872
|
+
</div>
|
|
1873
|
+
<div class="cell-name-last">
|
|
1874
|
+
<span class="name-text">${e.lastName}</span>
|
|
1875
|
+
</div>
|
|
1876
|
+
<div class="cell-action">
|
|
1877
|
+
<button
|
|
1878
|
+
type="button"
|
|
1879
|
+
data-trash-row-id=${e.id}
|
|
1880
|
+
class="btn-icon"
|
|
1881
|
+
@click=${() => this.removeRow(e.id)}
|
|
1882
|
+
aria-label=${a.administrators.deleteRowLabel}
|
|
1883
|
+
>
|
|
1884
|
+
${d.trash()}
|
|
1885
|
+
</button>
|
|
1886
|
+
<button
|
|
1887
|
+
type="button"
|
|
1888
|
+
data-done-row-id=${e.id}
|
|
1889
|
+
class="btn-done"
|
|
1890
|
+
@click=${() => this.doneRow(e.id)}
|
|
1891
|
+
aria-label=${a.administrators.doneButton}
|
|
1892
|
+
>
|
|
1893
|
+
${a.administrators.doneButton}
|
|
1894
|
+
</button>
|
|
1895
|
+
</div>
|
|
1896
|
+
</div>
|
|
1897
|
+
`;
|
|
1898
|
+
}
|
|
1899
|
+
renderNotFoundRow(e, t) {
|
|
1900
|
+
const a = this.translations, r = this.rowErrors.get(e.id) ?? {};
|
|
1901
|
+
return e.isDone ? n`
|
|
1902
|
+
<div class="admin-row admin-row--done">
|
|
1903
|
+
<span class="row-num">${t}</span>
|
|
1904
|
+
<div class="cell-email">
|
|
1905
|
+
<span class="name-text">${e.email}</span>
|
|
1906
|
+
</div>
|
|
1907
|
+
<div class="cell-name">
|
|
1908
|
+
<span class="name-text">${e.firstName}</span>
|
|
1909
|
+
</div>
|
|
1910
|
+
<div class="cell-name-last">
|
|
1911
|
+
<span class="name-text">${e.lastName}</span>
|
|
1912
|
+
</div>
|
|
1913
|
+
<div class="cell-action">
|
|
1914
|
+
<button
|
|
1915
|
+
type="button"
|
|
1916
|
+
class="btn-edit"
|
|
1917
|
+
@click=${() => this.editRow(e.id)}
|
|
1918
|
+
aria-label=${a.administrators.editButton}
|
|
1919
|
+
>
|
|
1920
|
+
${a.administrators.editButton}
|
|
1921
|
+
</button>
|
|
1922
|
+
</div>
|
|
1923
|
+
</div>
|
|
1924
|
+
` : n`
|
|
1925
|
+
<div class="admin-row">
|
|
1926
|
+
<span class="row-num">${t}</span>
|
|
1927
|
+
<div class="cell-email">
|
|
1928
|
+
<input
|
|
1929
|
+
class="grid-input ${r.email ? "has-error" : ""}"
|
|
1930
|
+
type="email"
|
|
1931
|
+
.value=${e.email}
|
|
1932
|
+
placeholder=${a.company.emailLabel}
|
|
1933
|
+
aria-label=${a.company.emailLabel}
|
|
1934
|
+
aria-invalid=${r.email ? "true" : "false"}
|
|
1935
|
+
@input=${(i) => this.updateRowEmail(e.id, i.target.value)}
|
|
1936
|
+
@blur=${(i) => this.validateRowEmail(e.id, i.target.value)}
|
|
1937
|
+
/>
|
|
1938
|
+
<span class="field-error ${r.email ? "" : "field-error--empty"}" aria-hidden=${r.email ? "false" : "true"}>${d.octagonAlert()}<span class="field-error-text">${r.email ?? ""}</span></span>
|
|
1939
|
+
</div>
|
|
1940
|
+
<div class="cell-name">
|
|
1941
|
+
<input
|
|
1942
|
+
data-row-id=${e.id}
|
|
1943
|
+
class="grid-input ${r.firstName ? "has-error" : ""}"
|
|
1944
|
+
type="text"
|
|
1945
|
+
.value=${e.firstName}
|
|
1946
|
+
placeholder=${a.administrators.firstNameLabel}
|
|
1947
|
+
aria-label=${a.administrators.firstNameLabel}
|
|
1948
|
+
aria-invalid=${r.firstName ? "true" : "false"}
|
|
1949
|
+
@input=${(i) => this.updateFirstName(e.id, i.target.value)}
|
|
1950
|
+
/>
|
|
1951
|
+
<span class="field-error ${r.firstName ? "" : "field-error--empty"}" aria-hidden=${r.firstName ? "false" : "true"}>${d.octagonAlert()}<span class="field-error-text">${r.firstName ?? ""}</span></span>
|
|
1952
|
+
</div>
|
|
1953
|
+
<div class="cell-name-last">
|
|
1954
|
+
<input
|
|
1955
|
+
class="grid-input ${r.lastName ? "has-error" : ""}"
|
|
1956
|
+
type="text"
|
|
1957
|
+
.value=${e.lastName}
|
|
1958
|
+
placeholder=${a.administrators.lastNameLabel}
|
|
1959
|
+
aria-label=${a.administrators.lastNameLabel}
|
|
1960
|
+
aria-invalid=${r.lastName ? "true" : "false"}
|
|
1961
|
+
@input=${(i) => this.updateLastName(e.id, i.target.value)}
|
|
1962
|
+
/>
|
|
1963
|
+
<span class="field-error ${r.lastName ? "" : "field-error--empty"}" aria-hidden=${r.lastName ? "false" : "true"}>${d.octagonAlert()}<span class="field-error-text">${r.lastName ?? ""}</span></span>
|
|
1964
|
+
</div>
|
|
1965
|
+
<div class="cell-action">
|
|
1966
|
+
<button
|
|
1967
|
+
type="button"
|
|
1968
|
+
class="btn-icon"
|
|
1969
|
+
@click=${() => this.removeRow(e.id)}
|
|
1970
|
+
aria-label=${a.administrators.deleteRowLabel}
|
|
1971
|
+
>
|
|
1972
|
+
${d.trash()}
|
|
1973
|
+
</button>
|
|
1974
|
+
<button
|
|
1975
|
+
type="button"
|
|
1976
|
+
class="btn-done"
|
|
1977
|
+
@click=${() => this.doneRow(e.id)}
|
|
1978
|
+
aria-label=${a.administrators.doneButton}
|
|
1979
|
+
>
|
|
1980
|
+
${a.administrators.doneButton}
|
|
1981
|
+
</button>
|
|
1982
|
+
</div>
|
|
1983
|
+
</div>
|
|
1984
|
+
`;
|
|
1985
|
+
}
|
|
1986
|
+
renderAdminRow(e, t) {
|
|
1987
|
+
switch (e.state) {
|
|
1988
|
+
case "lookup":
|
|
1989
|
+
return this.renderLookupRow(e, t);
|
|
1990
|
+
case "found":
|
|
1991
|
+
return this.renderFoundRow(e, t);
|
|
1992
|
+
case "not-found":
|
|
1993
|
+
return this.renderNotFoundRow(e, t);
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
render() {
|
|
1997
|
+
const e = this.translations, t = this.existingAdmins.length + 1;
|
|
1998
|
+
return n`
|
|
1999
|
+
<div class="step-content">
|
|
2000
|
+
<h2>${e.administrators.title}</h2>
|
|
2001
|
+
<p>${e.administrators.description}</p>
|
|
2002
|
+
|
|
2003
|
+
<div class="admin-table">
|
|
2004
|
+
${this.existingAdmins.map((a, r) => this.renderExistingAdminRow(a, r + 1))}
|
|
2005
|
+
${this.rows.map((a, r) => this.renderAdminRow(a, t + r))}
|
|
2006
|
+
<div class="table-footer">
|
|
2007
|
+
<button
|
|
2008
|
+
type="button"
|
|
2009
|
+
class="btn-add-row"
|
|
2010
|
+
@click=${this.addRow}
|
|
2011
|
+
?disabled=${!this.canAddMore}
|
|
2012
|
+
aria-label=${e.administrators.addAdministratorButton}
|
|
2013
|
+
>
|
|
2014
|
+
${d.plus()}
|
|
2015
|
+
${e.administrators.addAdministratorButton}
|
|
2016
|
+
</button>
|
|
2017
|
+
</div>
|
|
2018
|
+
</div>
|
|
2019
|
+
</div>
|
|
2020
|
+
|
|
2021
|
+
<div class="wizard-actions">
|
|
2022
|
+
<button type="button" class="btn-secondary" @click=${this.handleSaveAndClose}>
|
|
2023
|
+
${e.common.saveAndClose}
|
|
2024
|
+
</button>
|
|
2025
|
+
<button
|
|
2026
|
+
type="button"
|
|
2027
|
+
class="btn-primary"
|
|
2028
|
+
@click=${this.handleConfirm}
|
|
2029
|
+
?disabled=${!this.canConfirm}
|
|
2030
|
+
>
|
|
2031
|
+
${this.confirmButtonLabel}
|
|
2032
|
+
</button>
|
|
2033
|
+
</div>
|
|
2034
|
+
`;
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
h.styles = [
|
|
2038
|
+
E,
|
|
2039
|
+
j,
|
|
2040
|
+
P,
|
|
2041
|
+
$`.step-content > p{font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);letter-spacing:var(--ga-text-md-tracking);color:var(--ga-color-text-body);margin:0 0 var(--ga-size-spacing-07);}.admin-table{background:var(--ga-color-surface-page);border-radius:var(--ga-radius);overflow:hidden;}.admin-row{display:flex;align-items:flex-start;gap:var(--ga-size-spacing-04);padding:var(--ga-size-spacing-03) var(--ga-size-spacing-05);min-height:var(--ga-size-56);}.admin-row + .admin-row{border-top:var(--ga-size-border-width-sm) solid var(--ga-color-neutral-20);}.admin-row--done{align-items:center;}.row-num{font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-text-body);width:var(--ga-size-spacing-05);text-align:right;flex-shrink:0;align-self:flex-start;padding-top:var(--ga-size-spacing-04);}.admin-row--done .row-num{align-self:auto;padding-top:0;}.cell-email{flex:0 0 var(--ga-size-content-xs);min-width:0;}.cell-name,.cell-name-last{flex:1 1 0;min-width:0;}.cell-lookup-btn{flex:1 1 0;}.cell-action{flex-shrink:0;display:flex;align-items:center;justify-content:flex-end;gap:var(--ga-size-spacing-02);min-width:calc(var(--ga-size-spacing-12) + var(--ga-size-spacing-03));}.name-text{font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-text-body);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;padding:0 var(--ga-size-spacing-02);}.grid-input{background:var(--ga-color-white);border:var(--ga-size-border-width-sm) solid var(--ga-color-neutral-30);border-radius:var(--ga-radius);height:var(--ga-size-40);padding:0 var(--ga-size-spacing-04);font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-text-body);width:100%;box-sizing:border-box;outline:none;font-family:var(--vsn-customer-onboarding-wizard-font-family);}.grid-input:focus{border-color:var(--ga-color-border-focus);outline:var(--ga-size-border-width-md) solid var(--ga-color-border-focus);outline-offset:var(--ga-size-border-width-md);}.grid-input.has-error{border-color:var(--ga-color-border-error);background:var(--ga-color-surface-error);}.grid-input.has-error:focus{border-color:var(--ga-color-border-error);}.you-tag{display:inline-flex;align-items:center;gap:var(--ga-size-spacing-02);background:var(--ga-color-utility-green-light);border:var(--ga-size-border-width-sm) solid var(--ga-color-utility-green);border-radius:var(--ga-radius);padding:var(--ga-size-spacing-01) var(--ga-size-spacing-02);font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-text-body);white-space:nowrap;}.you-tag svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);flex-shrink:0;}.btn-add-name{background:transparent;border:var(--ga-size-border-width-sm) solid var(--ga-color-primary);border-radius:var(--ga-radius);color:var(--ga-color-primary);font-size:var(--ga-text-sm-size);font-weight:500;height:var(--ga-size-40);padding:0 var(--ga-size-spacing-04);cursor:pointer;white-space:nowrap;font-family:var(--vsn-customer-onboarding-wizard-font-family);}.btn-add-name:hover:not(:disabled){background:var(--ga-color-surface-page);}.btn-add-name:focus-visible,.btn-done:focus-visible,.btn-edit:focus-visible,.btn-icon:focus-visible,.btn-add-row:focus-visible{outline:var(--ga-size-border-width-md) solid var(--ga-color-border-focus);outline-offset:var(--ga-size-border-width-md);}.btn-add-name:disabled{border-color:var(--ga-color-border-disabled);color:var(--ga-color-text-disabled);cursor:not-allowed;}.btn-done{background:var(--ga-color-primary-70);color:var(--ga-color-secondary-10);border:var(--ga-size-border-width-sm) solid var(--ga-color-primary-70);border-radius:var(--ga-radius);font-size:var(--ga-text-sm-size);font-weight:500;height:var(--ga-size-40);padding:0 var(--ga-size-spacing-04);cursor:pointer;white-space:nowrap;font-family:var(--vsn-customer-onboarding-wizard-font-family);}.btn-done:hover{background:var(--ga-color-primary-90);border-color:var(--ga-color-primary-90);}.btn-edit{background:var(--ga-color-white);color:var(--ga-color-text-body);border:var(--ga-size-border-width-sm) solid var(--ga-color-cyan-80);border-radius:var(--ga-radius);font-size:var(--ga-text-sm-size);font-weight:500;height:var(--ga-size-40);padding:0 var(--ga-size-spacing-04);cursor:pointer;white-space:nowrap;font-family:var(--vsn-customer-onboarding-wizard-font-family);}.btn-edit:hover{background:var(--ga-color-secondary-10);}.btn-icon{background:transparent;border:none;padding:var(--ga-size-spacing-02);cursor:pointer;color:var(--ga-color-primary);display:flex;align-items:center;justify-content:center;border-radius:var(--ga-radius);}.btn-icon:hover{background:var(--ga-color-surface-page);}.btn-icon svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);}.table-footer{border-top:var(--ga-size-border-width-sm) solid var(--ga-color-neutral-20);padding:var(--ga-size-spacing-03) var(--ga-size-spacing-05);display:flex;align-items:center;}.btn-add-row{display:inline-flex;align-items:center;gap:var(--ga-size-spacing-02);background:transparent;border:var(--ga-size-border-width-sm) solid var(--ga-color-primary);color:var(--ga-color-primary);font-size:var(--ga-text-md-size);font-weight:500;padding:var(--ga-size-spacing-03) var(--ga-size-spacing-05);cursor:pointer;border-radius:var(--ga-radius);font-family:var(--vsn-customer-onboarding-wizard-font-family);}.btn-add-row:hover:not(:disabled){background:var(--ga-color-surface-page);}.btn-add-row:disabled{color:var(--ga-color-text-disabled);border-color:var(--ga-color-neutral-30);cursor:not-allowed;}.btn-add-row svg{width:var(--ga-size-16);height:var(--ga-size-16);}.admin-row:not(.admin-row--done) .name-text{line-height:var(--ga-size-40);}`
|
|
2042
|
+
];
|
|
2043
|
+
y([
|
|
2044
|
+
g({ type: Object })
|
|
2045
|
+
], h.prototype, "translations", 2);
|
|
2046
|
+
y([
|
|
2047
|
+
g({ type: Object })
|
|
2048
|
+
], h.prototype, "httpService", 2);
|
|
2049
|
+
y([
|
|
2050
|
+
g({ type: String })
|
|
2051
|
+
], h.prototype, "customerId", 2);
|
|
2052
|
+
y([
|
|
2053
|
+
g({ type: String })
|
|
2054
|
+
], h.prototype, "locale", 2);
|
|
2055
|
+
y([
|
|
2056
|
+
g({ type: Object })
|
|
2057
|
+
], h.prototype, "currentUser", 2);
|
|
2058
|
+
y([
|
|
2059
|
+
l()
|
|
2060
|
+
], h.prototype, "existingAdmins", 2);
|
|
2061
|
+
y([
|
|
2062
|
+
l()
|
|
2063
|
+
], h.prototype, "isLoadingAdmins", 2);
|
|
2064
|
+
y([
|
|
2065
|
+
l()
|
|
2066
|
+
], h.prototype, "rows", 2);
|
|
2067
|
+
y([
|
|
2068
|
+
l()
|
|
2069
|
+
], h.prototype, "nextId", 2);
|
|
2070
|
+
y([
|
|
2071
|
+
l()
|
|
2072
|
+
], h.prototype, "lookingUpIds", 2);
|
|
2073
|
+
y([
|
|
2074
|
+
l()
|
|
2075
|
+
], h.prototype, "isConfirming", 2);
|
|
2076
|
+
y([
|
|
2077
|
+
l()
|
|
2078
|
+
], h.prototype, "rowErrors", 2);
|
|
2079
|
+
h = y([
|
|
2080
|
+
S("wizard-step2-administrators")
|
|
2081
|
+
], h);
|
|
2082
|
+
var K = Object.defineProperty, H = Object.getOwnPropertyDescriptor, k = (e, t, a, r) => {
|
|
2083
|
+
for (var i = r > 1 ? void 0 : r ? H(t, a) : t, o = e.length - 1, s; o >= 0; o--)
|
|
2084
|
+
(s = e[o]) && (i = (r ? s(t, a, i) : s(i)) || i);
|
|
2085
|
+
return r && i && K(t, a, i), i;
|
|
2086
|
+
};
|
|
2087
|
+
let b = class extends L {
|
|
2088
|
+
constructor() {
|
|
2089
|
+
super(...arguments), this.httpService = null, this.customerId = "", this.partnerId = "", this.partnerName = "", this.consultants = [], this.isLoading = !1, this.isConfirming = !1, this.selectedIds = /* @__PURE__ */ new Set(), this.searchTerm = "", this._loadSequence = 0;
|
|
2090
|
+
}
|
|
2091
|
+
updated(e) {
|
|
2092
|
+
(e.has("httpService") || e.has("partnerId")) && this.loadConsultants();
|
|
2093
|
+
}
|
|
2094
|
+
async loadConsultants() {
|
|
2095
|
+
if (!this.httpService || !this.partnerId) {
|
|
2096
|
+
++this._loadSequence, this.consultants = [], this.selectedIds = /* @__PURE__ */ new Set(), this.searchTerm = "", this.isLoading = !1;
|
|
2097
|
+
return;
|
|
2098
|
+
}
|
|
2099
|
+
const e = ++this._loadSequence;
|
|
2100
|
+
this.isLoading = !0, this.consultants = [], this.selectedIds = /* @__PURE__ */ new Set(), this.searchTerm = "";
|
|
2101
|
+
try {
|
|
2102
|
+
const t = await this.httpService.getPartnerConsultants(this.partnerId);
|
|
2103
|
+
if (e !== this._loadSequence) return;
|
|
2104
|
+
this.consultants = t.content;
|
|
2105
|
+
} catch {
|
|
2106
|
+
} finally {
|
|
2107
|
+
e === this._loadSequence && (this.isLoading = !1);
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
get filteredConsultants() {
|
|
2111
|
+
const e = this.searchTerm.trim().toLowerCase();
|
|
2112
|
+
return e ? this.consultants.filter(
|
|
2113
|
+
(t) => `${t.firstName} ${t.lastName}`.toLowerCase().includes(e) || t.email.toLowerCase().includes(e)
|
|
2114
|
+
) : this.consultants;
|
|
2115
|
+
}
|
|
2116
|
+
get confirmButtonLabel() {
|
|
2117
|
+
const e = this.translations, t = this.selectedIds.size;
|
|
2118
|
+
return t === 0 ? e.common.confirm : (t === 1 ? e.partnerAccess.confirmSingular : e.partnerAccess.confirmPlural).replace("{count}", String(t));
|
|
2119
|
+
}
|
|
2120
|
+
toggleConsultant(e) {
|
|
2121
|
+
const t = new Set(this.selectedIds);
|
|
2122
|
+
t.has(e) ? t.delete(e) : t.add(e), this.selectedIds = t;
|
|
2123
|
+
}
|
|
2124
|
+
async handleConfirm() {
|
|
2125
|
+
if (!(this.isConfirming || this.isLoading) && !(!this.httpService || !this.customerId)) {
|
|
2126
|
+
this.isConfirming = !0;
|
|
2127
|
+
try {
|
|
2128
|
+
const e = this.consultants.filter((t) => this.selectedIds.has(t.id));
|
|
2129
|
+
e.length > 0 && await this.httpService.addCustomerConsultants(this.customerId, e), this.dispatchEvent(new CustomEvent("complete", { bubbles: !0, composed: !0 }));
|
|
2130
|
+
} catch {
|
|
2131
|
+
} finally {
|
|
2132
|
+
this.isConfirming = !1;
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
handleSaveAndClose() {
|
|
2137
|
+
this.dispatchEvent(new CustomEvent("save-and-close", { bubbles: !0, composed: !0 }));
|
|
2138
|
+
}
|
|
2139
|
+
renderConsultantRow(e) {
|
|
2140
|
+
const t = this.selectedIds.has(e.id), a = `${e.firstName} ${e.lastName}`;
|
|
2141
|
+
return n`
|
|
2142
|
+
<label class="consultant-row ${t ? "consultant-row--selected" : ""}" role="listitem">
|
|
2143
|
+
<input
|
|
2144
|
+
type="checkbox"
|
|
2145
|
+
class="sr-only"
|
|
2146
|
+
.checked=${t}
|
|
2147
|
+
@change=${() => this.toggleConsultant(e.id)}
|
|
2148
|
+
/>
|
|
2149
|
+
<span class="checkbox-visual ${t ? "checkbox-visual--checked" : ""}">
|
|
2150
|
+
${t ? d.check() : q}
|
|
2151
|
+
</span>
|
|
2152
|
+
<span class="consultant-name">${a}</span>
|
|
2153
|
+
<span class="consultant-email">${e.email}</span>
|
|
2154
|
+
</label>
|
|
2155
|
+
`;
|
|
2156
|
+
}
|
|
2157
|
+
render() {
|
|
2158
|
+
const e = this.translations;
|
|
2159
|
+
return n`
|
|
2160
|
+
<div class="step-content">
|
|
2161
|
+
<h2>${e.partnerAccess.title}</h2>
|
|
2162
|
+
<p>${(() => {
|
|
2163
|
+
const t = e.partnerAccess.description.split("{partnerName}");
|
|
2164
|
+
return t.length === 1 ? e.partnerAccess.description : n`${t.map(
|
|
2165
|
+
(a, r) => r < t.length - 1 ? n`${a}<strong>${this.partnerName}</strong>` : a
|
|
2166
|
+
)}`;
|
|
2167
|
+
})()}</p>
|
|
2168
|
+
|
|
2169
|
+
<div class="search-row">
|
|
2170
|
+
<div class="search-wrapper">
|
|
2171
|
+
<span class="search-icon" aria-hidden="true">${d.search()}</span>
|
|
2172
|
+
<input
|
|
2173
|
+
type="search"
|
|
2174
|
+
class="search-input"
|
|
2175
|
+
placeholder=${e.partnerAccess.findConsultantPlaceholder}
|
|
2176
|
+
aria-label=${e.partnerAccess.findConsultantPlaceholder}
|
|
2177
|
+
.value=${this.searchTerm}
|
|
2178
|
+
@input=${(t) => {
|
|
2179
|
+
this.searchTerm = t.target.value;
|
|
2180
|
+
}}
|
|
2181
|
+
/>
|
|
2182
|
+
</div>
|
|
2183
|
+
</div>
|
|
2184
|
+
|
|
2185
|
+
<div class="consultant-list" role="list" aria-label=${e.partnerAccess.title}>
|
|
2186
|
+
${this.isLoading ? n`<div class="loading-row" role="listitem">${e.partnerAccess.loading}</div>` : this.filteredConsultants.map((t) => this.renderConsultantRow(t))}
|
|
2187
|
+
</div>
|
|
2188
|
+
</div>
|
|
2189
|
+
|
|
2190
|
+
<div class="wizard-actions">
|
|
2191
|
+
<button type="button" class="btn-secondary" @click=${this.handleSaveAndClose}>
|
|
2192
|
+
${e.common.saveAndClose}
|
|
2193
|
+
</button>
|
|
2194
|
+
<button
|
|
2195
|
+
type="button"
|
|
2196
|
+
class="btn-primary"
|
|
2197
|
+
@click=${this.handleConfirm}
|
|
2198
|
+
?disabled=${this.isConfirming || this.isLoading || !this.httpService || !this.customerId}
|
|
2199
|
+
>
|
|
2200
|
+
${this.confirmButtonLabel}
|
|
2201
|
+
</button>
|
|
2202
|
+
</div>
|
|
2203
|
+
`;
|
|
2204
|
+
}
|
|
2205
|
+
};
|
|
2206
|
+
b.styles = [
|
|
2207
|
+
E,
|
|
2208
|
+
j,
|
|
2209
|
+
P,
|
|
2210
|
+
$`.step-content > p{font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);color:var(--ga-color-text-body);margin:0 0 var(--ga-size-spacing-07);}.search-row{display:flex;justify-content:flex-end;margin-bottom:var(--ga-size-spacing-03);}.search-wrapper{position:relative;width:var(--ga-size-content-xs);}.search-icon{position:absolute;left:var(--ga-size-spacing-03);top:50%;transform:translateY(-50%);color:var(--ga-color-icon-action);display:flex;align-items:center;pointer-events:none;}.search-icon svg{width:var(--ga-size-spacing-05);height:var(--ga-size-spacing-05);}.search-input{width:100%;box-sizing:border-box;height:var(--ga-size-40);padding:0 var(--ga-size-spacing-04) 0 var(--ga-size-spacing-07);border:var(--ga-size-border-width-sm) solid var(--ga-color-neutral-30);border-radius:var(--ga-radius);background:var(--ga-color-white);font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-text-body);outline:none;font-family:var(--vsn-customer-onboarding-wizard-font-family);}.search-input::placeholder{color:var(--ga-color-neutral-60);}.search-input:focus{border-color:var(--ga-color-border-focus);}.consultant-list{background:var(--ga-color-surface-page);border-radius:var(--ga-radius);overflow:hidden;}.consultant-row{display:flex;align-items:center;gap:var(--ga-size-spacing-03);height:var(--ga-size-56);padding:0 var(--ga-size-spacing-05);cursor:pointer;}.consultant-row + .consultant-row{border-top:var(--ga-size-border-width-sm) solid var(--ga-color-neutral-20);}.consultant-row--selected{background:var(--ga-color-surface-selected);}.consultant-row:hover:not(.consultant-row--selected){background:var(--ga-color-neutral-10);}.consultant-row:focus-within .checkbox-visual{outline:var(--ga-size-border-width-md) solid var(--ga-color-border-focus);outline-offset:var(--ga-size-border-width-sm);}.checkbox-visual{flex-shrink:0;width:var(--ga-size-16);height:var(--ga-size-16);border:var(--ga-size-border-width-sm) solid var(--ga-color-neutral-30);border-radius:var(--ga-radius);background:var(--ga-color-white);display:flex;align-items:center;justify-content:center;pointer-events:none;}.checkbox-visual--checked{background:var(--ga-color-primary-70);border-color:var(--ga-color-primary-70);}.checkbox-visual svg{width:var(--ga-size-12);height:var(--ga-size-12);color:var(--ga-color-white);stroke-width:var(--ga-size-border-width-lg);}.sr-only{position:absolute;width:var(--ga-size-border-width-sm);height:var(--ga-size-border-width-sm);padding:0;margin:calc(var(--ga-size-border-width-sm) * -1);overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;}.consultant-name,.consultant-email{flex:1 1 0;min-width:0;font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-text-body);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.consultant-email{text-align:left;}.loading-row{padding:var(--ga-size-spacing-05);text-align:center;font-size:var(--ga-text-sm-size);color:var(--ga-color-neutral-60);}`
|
|
2211
|
+
];
|
|
2212
|
+
k([
|
|
2213
|
+
g({ type: Object })
|
|
2214
|
+
], b.prototype, "translations", 2);
|
|
2215
|
+
k([
|
|
2216
|
+
g({ type: Object })
|
|
2217
|
+
], b.prototype, "httpService", 2);
|
|
2218
|
+
k([
|
|
2219
|
+
g({ type: String })
|
|
2220
|
+
], b.prototype, "customerId", 2);
|
|
2221
|
+
k([
|
|
2222
|
+
g({ type: String })
|
|
2223
|
+
], b.prototype, "partnerId", 2);
|
|
2224
|
+
k([
|
|
2225
|
+
g({ type: String })
|
|
2226
|
+
], b.prototype, "partnerName", 2);
|
|
2227
|
+
k([
|
|
2228
|
+
l()
|
|
2229
|
+
], b.prototype, "consultants", 2);
|
|
2230
|
+
k([
|
|
2231
|
+
l()
|
|
2232
|
+
], b.prototype, "isLoading", 2);
|
|
2233
|
+
k([
|
|
2234
|
+
l()
|
|
2235
|
+
], b.prototype, "isConfirming", 2);
|
|
2236
|
+
k([
|
|
2237
|
+
l()
|
|
2238
|
+
], b.prototype, "selectedIds", 2);
|
|
2239
|
+
k([
|
|
2240
|
+
l()
|
|
2241
|
+
], b.prototype, "searchTerm", 2);
|
|
2242
|
+
b = k([
|
|
2243
|
+
S("wizard-step3-partner-access")
|
|
2244
|
+
], b);
|
|
2245
|
+
var Z = Object.defineProperty, J = Object.getOwnPropertyDescriptor, T = (e, t, a, r) => {
|
|
2246
|
+
for (var i = r > 1 ? void 0 : r ? J(t, a) : t, o = e.length - 1, s; o >= 0; o--)
|
|
2247
|
+
(s = e[o]) && (i = (r ? s(t, a, i) : s(i)) || i);
|
|
2248
|
+
return r && i && Z(t, a, i), i;
|
|
2249
|
+
};
|
|
2250
|
+
let R = class extends L {
|
|
2251
|
+
handleClose() {
|
|
2252
|
+
this.dispatchEvent(new CustomEvent("close", {
|
|
2253
|
+
bubbles: !0,
|
|
2254
|
+
composed: !0
|
|
2255
|
+
}));
|
|
2256
|
+
}
|
|
2257
|
+
handleGoToAdmin() {
|
|
2258
|
+
this.dispatchEvent(new CustomEvent("close", {
|
|
2259
|
+
detail: { redirect: !0 },
|
|
2260
|
+
bubbles: !0,
|
|
2261
|
+
composed: !0
|
|
2262
|
+
}));
|
|
2263
|
+
}
|
|
2264
|
+
render() {
|
|
2265
|
+
const e = this.translations;
|
|
2266
|
+
return n`
|
|
2267
|
+
<div class="step-content">
|
|
2268
|
+
<h2>${e.complete.title}</h2>
|
|
2269
|
+
<p>${e.complete.message1}</p>
|
|
2270
|
+
<p>${e.complete.message2}</p>
|
|
2271
|
+
|
|
2272
|
+
<button type="button" class="btn-primary primary-action" @click=${this.handleGoToAdmin}>
|
|
2273
|
+
${e.complete.goToAdminButton}
|
|
2274
|
+
</button>
|
|
2275
|
+
</div>
|
|
2276
|
+
|
|
2277
|
+
<div class="wizard-actions">
|
|
2278
|
+
<button type="button" class="btn-secondary" @click=${this.handleClose}>
|
|
2279
|
+
${e.common.close}
|
|
2280
|
+
</button>
|
|
2281
|
+
</div>
|
|
2282
|
+
`;
|
|
2283
|
+
}
|
|
2284
|
+
};
|
|
2285
|
+
R.styles = [
|
|
2286
|
+
E,
|
|
2287
|
+
j,
|
|
2288
|
+
P,
|
|
2289
|
+
$`.step-content h2{font-weight:var(--ga-font-weight-semibold);margin:0 0 var(--ga-size-spacing-06);}.step-content p{font-size:var(--ga-text-md-size);line-height:var(--ga-text-md-line-height);color:var(--ga-color-text-body);margin:0 0 var(--ga-size-spacing-04);}.primary-action{margin-top:var(--ga-size-spacing-06);}`
|
|
2290
|
+
];
|
|
2291
|
+
T([
|
|
2292
|
+
g({ type: Object })
|
|
2293
|
+
], R.prototype, "translations", 2);
|
|
2294
|
+
R = T([
|
|
2295
|
+
S("wizard-step-complete")
|
|
2296
|
+
], R);
|
|
2297
|
+
var Q = Object.defineProperty, X = Object.getOwnPropertyDescriptor, f = (e, t, a, r) => {
|
|
2298
|
+
for (var i = r > 1 ? void 0 : r ? X(t, a) : t, o = e.length - 1, s; o >= 0; o--)
|
|
2299
|
+
(s = e[o]) && (i = (r ? s(t, a, i) : s(i)) || i);
|
|
2300
|
+
return r && i && Q(t, a, i), i;
|
|
2301
|
+
};
|
|
2302
|
+
let m = class extends L {
|
|
2303
|
+
constructor() {
|
|
2304
|
+
super(...arguments), this.locale = "en-GB", this.baseUrl = "", this.adminUrl = "", this.taskId = "", this.customerId = "", this.step = "welcome", this.userName = "User", this.currentUserProfile = null, this.currentStep = 0, this.completedSteps = /* @__PURE__ */ new Set(), this.errorState = null, this.customerInfo = null, this.visible = !0, this.i18n = new U(), this.errorMessageListener = null;
|
|
2305
|
+
}
|
|
2306
|
+
get steps() {
|
|
2307
|
+
const e = this.i18n.getTranslations();
|
|
2308
|
+
return [
|
|
2309
|
+
{ id: 1, label: e.steps.company },
|
|
2310
|
+
{ id: 2, label: e.steps.administrators },
|
|
2311
|
+
{ id: 3, label: e.steps.partnerAccess }
|
|
2312
|
+
];
|
|
2313
|
+
}
|
|
2314
|
+
connectedCallback() {
|
|
2315
|
+
super.connectedCallback(), this.currentStep = m.stepMap[this.step] ?? 0, this.httpService = new O(this.baseUrl, {}, this), this.i18n.setLocale(this.locale), this.initializeWithAuth(), this.setupErrorMessageListener();
|
|
2316
|
+
}
|
|
2317
|
+
disconnectedCallback() {
|
|
2318
|
+
super.disconnectedCallback(), this.removeErrorMessageListener();
|
|
2319
|
+
}
|
|
2320
|
+
/**
|
|
2321
|
+
* Set up listener for error-message events from HttpService
|
|
2322
|
+
* Listens on component element for instance-scoped events
|
|
2323
|
+
*/
|
|
2324
|
+
setupErrorMessageListener() {
|
|
2325
|
+
this.errorMessageListener = ((e) => {
|
|
2326
|
+
const { errorKey: t } = e.detail;
|
|
2327
|
+
this.errorState = { errorKey: t };
|
|
2328
|
+
}), this.addEventListener("error-message", this.errorMessageListener);
|
|
2329
|
+
}
|
|
2330
|
+
/**
|
|
2331
|
+
* Remove error-message listener on component disconnect
|
|
2332
|
+
*/
|
|
2333
|
+
removeErrorMessageListener() {
|
|
2334
|
+
this.errorMessageListener && (this.removeEventListener("error-message", this.errorMessageListener), this.errorMessageListener = null);
|
|
2335
|
+
}
|
|
2336
|
+
/**
|
|
2337
|
+
* Dismiss error message manually
|
|
2338
|
+
*/
|
|
2339
|
+
dismissError() {
|
|
2340
|
+
this.errorState = null;
|
|
2341
|
+
}
|
|
2342
|
+
/**
|
|
2343
|
+
* Initialize component with authentication token from host application
|
|
2344
|
+
*/
|
|
2345
|
+
async initializeWithAuth() {
|
|
2346
|
+
try {
|
|
2347
|
+
const e = await this.requestAuthToken();
|
|
2348
|
+
if (!e) {
|
|
2349
|
+
console.warn("[CustomerOnboardingWizard] No authentication token provided by host application");
|
|
2350
|
+
return;
|
|
2351
|
+
}
|
|
2352
|
+
this.httpService.setAuthToken(e), await this.loadUserProfile(), this.loadDataForStep(this.currentStep);
|
|
2353
|
+
} catch (e) {
|
|
2354
|
+
console.error("Failed to initialize component:", e);
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
/**
|
|
2358
|
+
* Request authentication token from host application
|
|
2359
|
+
* Host must listen to 'request-token' event and provide token via callback
|
|
2360
|
+
* @returns Promise that resolves with the authentication token
|
|
2361
|
+
*/
|
|
2362
|
+
requestAuthToken() {
|
|
2363
|
+
return new Promise((e) => {
|
|
2364
|
+
let t = !1;
|
|
2365
|
+
const a = setTimeout(() => {
|
|
2366
|
+
t || (t = !0, e(null));
|
|
2367
|
+
}, 5e3), r = new CustomEvent("request-token", {
|
|
2368
|
+
detail: {
|
|
2369
|
+
callback: (i) => {
|
|
2370
|
+
t || (t = !0, clearTimeout(a), e(i));
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
bubbles: !0,
|
|
2374
|
+
composed: !0
|
|
2375
|
+
});
|
|
2376
|
+
this.dispatchEvent(r);
|
|
2377
|
+
});
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2380
|
+
* Load user profile from API and set userName
|
|
2381
|
+
* userName is populated from getUserProfile() API call
|
|
2382
|
+
* Falls back to default 'User' if request fails
|
|
2383
|
+
*/
|
|
2384
|
+
async loadUserProfile() {
|
|
2385
|
+
try {
|
|
2386
|
+
const e = await this.httpService.getUserProfile();
|
|
2387
|
+
this.currentUserProfile = e, this.userName = `${e.firstName} ${e.lastName}`;
|
|
2388
|
+
} catch (e) {
|
|
2389
|
+
console.error("Failed to load user profile:", e);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
/**
|
|
2393
|
+
* Load customer info from API
|
|
2394
|
+
* customerInfo is populated from getCustomerInfo() API call
|
|
2395
|
+
* Falls back to null if request fails or customerId is not provided
|
|
2396
|
+
*/
|
|
2397
|
+
async loadCustomerInfo() {
|
|
2398
|
+
if (!this.customerId) {
|
|
2399
|
+
console.warn("[CustomerOnboardingWizard] No customerId provided, skipping customer info load");
|
|
2400
|
+
return;
|
|
2401
|
+
}
|
|
2402
|
+
try {
|
|
2403
|
+
this.customerInfo = await this.httpService.getCustomerInfo(this.customerId);
|
|
2404
|
+
} catch (e) {
|
|
2405
|
+
console.error("Failed to load customer info:", e);
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Update authentication token
|
|
2410
|
+
* Call this method from host application to update token (e.g., after refresh)
|
|
2411
|
+
* @param token - New OAuth2 access token
|
|
2412
|
+
*/
|
|
2413
|
+
updateToken(e) {
|
|
2414
|
+
this.httpService.setAuthToken(e);
|
|
2415
|
+
}
|
|
2416
|
+
willUpdate(e) {
|
|
2417
|
+
e.has("locale") && (this.i18n.setLocale(this.locale) || (this.locale = this.i18n.getLocale()));
|
|
2418
|
+
}
|
|
2419
|
+
/**
|
|
2420
|
+
* Load data required for the given step number.
|
|
2421
|
+
* Called in two scenarios:
|
|
2422
|
+
* 1. On initial load — from `initializeWithAuth()` after the auth token is set,
|
|
2423
|
+
* using the `currentStep` derived from the `step` property (direct navigation).
|
|
2424
|
+
* 2. On user navigation — from `handleStartSetup()` when entering step 1.
|
|
2425
|
+
*
|
|
2426
|
+
* When adding data requirements for future steps (e.g. administrators for step 2),
|
|
2427
|
+
* add the corresponding fetch call here with the appropriate step guard.
|
|
2428
|
+
*/
|
|
2429
|
+
loadDataForStep(e) {
|
|
2430
|
+
e >= 1 && !this.customerInfo && this.customerId && this.loadCustomerInfo();
|
|
2431
|
+
}
|
|
2432
|
+
handleStartSetup() {
|
|
2433
|
+
this.currentStep = 1, this.loadDataForStep(1);
|
|
2434
|
+
}
|
|
2435
|
+
handleNext() {
|
|
2436
|
+
if (this.currentStep === 1 && !this.customerInfo) {
|
|
2437
|
+
console.warn("[CustomerOnboardingWizard] Cannot proceed: customer info not loaded");
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
this.currentStep < 3 && (this.completedSteps.add(this.currentStep), this.currentStep++, this.requestUpdate());
|
|
2441
|
+
}
|
|
2442
|
+
handleComplete() {
|
|
2443
|
+
this.completedSteps.add(this.currentStep), this.currentStep = 4;
|
|
2444
|
+
}
|
|
2445
|
+
handleSaveAndClose() {
|
|
2446
|
+
const t = {
|
|
2447
|
+
0: "welcome",
|
|
2448
|
+
1: "company",
|
|
2449
|
+
2: "administrators",
|
|
2450
|
+
3: "partner-access"
|
|
2451
|
+
}[this.currentStep];
|
|
2452
|
+
this.visible = !1, this.dispatchEvent(new CustomEvent("wizard-closed", {
|
|
2453
|
+
detail: { completed: !1, currentStep: this.currentStep },
|
|
2454
|
+
bubbles: !0,
|
|
2455
|
+
composed: !0
|
|
2456
|
+
})), t && this.taskId && this.httpService.saveProgress(this.taskId, t).catch(() => {
|
|
2457
|
+
});
|
|
2458
|
+
}
|
|
2459
|
+
handleEditCustomer(e) {
|
|
2460
|
+
this.customerId && this.httpService.editCustomer(this.customerId, e.detail).catch(() => {
|
|
2461
|
+
});
|
|
2462
|
+
}
|
|
2463
|
+
navigate(e) {
|
|
2464
|
+
window.location.href = e;
|
|
2465
|
+
}
|
|
2466
|
+
handleClose(e) {
|
|
2467
|
+
var i;
|
|
2468
|
+
const a = ((i = e.detail) == null ? void 0 : i.redirect) === !0 ? this.adminUrl : "";
|
|
2469
|
+
this.dispatchEvent(new CustomEvent("wizard-closed", {
|
|
2470
|
+
detail: { completed: !0 },
|
|
2471
|
+
bubbles: !0,
|
|
2472
|
+
composed: !0
|
|
2473
|
+
}));
|
|
2474
|
+
const r = (o) => {
|
|
2475
|
+
try {
|
|
2476
|
+
const { protocol: s } = new URL(o);
|
|
2477
|
+
(s === "https:" || s === "http:") && this.navigate(o);
|
|
2478
|
+
} catch {
|
|
2479
|
+
}
|
|
2480
|
+
};
|
|
2481
|
+
this.taskId ? this.httpService.deleteTask(this.taskId).then(() => {
|
|
2482
|
+
this.visible = !1, a && r(a);
|
|
2483
|
+
}).catch(() => {
|
|
2484
|
+
this.visible = !1;
|
|
2485
|
+
}) : (this.visible = !1, a && r(a));
|
|
2486
|
+
}
|
|
2487
|
+
getStepClass(e) {
|
|
2488
|
+
return this.completedSteps.has(e) ? "completed" : this.currentStep === e ? "active" : "";
|
|
2489
|
+
}
|
|
2490
|
+
getLineSegmentClass(e) {
|
|
2491
|
+
const t = e + 1;
|
|
2492
|
+
return this.completedSteps.has(t) ? "completed" : this.currentStep === t ? "active" : "";
|
|
2493
|
+
}
|
|
2494
|
+
renderStepIndicators(e) {
|
|
2495
|
+
return this.currentStep === 0 || this.currentStep === 4 ? n`
|
|
2496
|
+
<div class="step-indicators">
|
|
2497
|
+
<div class="line-row">
|
|
2498
|
+
${this.steps.map(() => n`
|
|
2499
|
+
<div class="line-segment ${this.currentStep === 4 ? "completed" : ""}"></div>
|
|
2500
|
+
`)}
|
|
2501
|
+
</div>
|
|
2502
|
+
<div class="steps-row" role="list" aria-label=${e.steps.progressLabel}>
|
|
2503
|
+
${this.steps.map((t) => n`
|
|
2504
|
+
<div class="step-wrapper" role="listitem">
|
|
2505
|
+
<div class="step-indicator ${this.currentStep === 4 ? "completed" : ""}">
|
|
2506
|
+
<div class="step-icon">
|
|
2507
|
+
${this.currentStep === 4 ? d.circleCheckBig() : d.circleDashed()}
|
|
2508
|
+
</div>
|
|
2509
|
+
<span class="step-label">${t.label}</span>
|
|
2510
|
+
</div>
|
|
2511
|
+
</div>
|
|
2512
|
+
`)}
|
|
2513
|
+
</div>
|
|
2514
|
+
</div>
|
|
2515
|
+
` : n`
|
|
2516
|
+
<div class="step-indicators">
|
|
2517
|
+
<div class="line-row">
|
|
2518
|
+
${this.steps.map((t, a) => n`
|
|
2519
|
+
<div class="line-segment ${this.getLineSegmentClass(a)}"></div>
|
|
2520
|
+
`)}
|
|
2521
|
+
</div>
|
|
2522
|
+
<div class="steps-row" role="list" aria-label=${e.steps.progressLabel}>
|
|
2523
|
+
${this.steps.map((t) => n`
|
|
2524
|
+
<div class="step-wrapper" role="listitem">
|
|
2525
|
+
<div class="step-indicator ${this.getStepClass(t.id)}" aria-current=${this.currentStep === t.id ? "step" : q}>
|
|
2526
|
+
<div class="step-icon">
|
|
2527
|
+
${this.completedSteps.has(t.id) ? d.circleCheckBig() : this.currentStep === t.id ? d.circleDotDashed() : d.circleDashed()}
|
|
2528
|
+
</div>
|
|
2529
|
+
<span class="step-label">${t.label}</span>
|
|
2530
|
+
</div>
|
|
2531
|
+
</div>
|
|
2532
|
+
`)}
|
|
2533
|
+
</div>
|
|
2534
|
+
</div>
|
|
2535
|
+
`;
|
|
2536
|
+
}
|
|
2537
|
+
render() {
|
|
2538
|
+
var t, a, r, i;
|
|
2539
|
+
const e = this.i18n.getTranslations();
|
|
2540
|
+
return n`
|
|
2541
|
+
${this.visible ? n`
|
|
2542
|
+
<div class="overlay">
|
|
2543
|
+
<div class="wizard-container" role="dialog" aria-modal="true" aria-labelledby="wizard-title">
|
|
2544
|
+
<h1 class="wizard-title" id="wizard-title">${e.wizard.title}</h1>
|
|
2545
|
+
${this.renderErrorBanner(e)}
|
|
2546
|
+
${this.renderStepIndicators(e)}
|
|
2547
|
+
|
|
2548
|
+
${this.currentStep === 0 ? n`
|
|
2549
|
+
<wizard-step-welcome
|
|
2550
|
+
.userName=${this.userName}
|
|
2551
|
+
.translations=${e}
|
|
2552
|
+
@start-setup=${this.handleStartSetup}
|
|
2553
|
+
@save-and-close=${this.handleSaveAndClose}
|
|
2554
|
+
></wizard-step-welcome>
|
|
2555
|
+
` : ""}
|
|
2556
|
+
|
|
2557
|
+
${this.currentStep === 1 ? n`
|
|
2558
|
+
<wizard-step1-company
|
|
2559
|
+
.translations=${e}
|
|
2560
|
+
.locale=${this.locale}
|
|
2561
|
+
.customerInfo=${this.customerInfo}
|
|
2562
|
+
@next=${this.handleNext}
|
|
2563
|
+
@save-and-close=${this.handleSaveAndClose}
|
|
2564
|
+
@edit-customer=${this.handleEditCustomer}
|
|
2565
|
+
></wizard-step1-company>
|
|
2566
|
+
` : ""}
|
|
2567
|
+
|
|
2568
|
+
${this.currentStep === 2 ? n`
|
|
2569
|
+
<wizard-step2-administrators
|
|
2570
|
+
.translations=${e}
|
|
2571
|
+
.httpService=${this.httpService}
|
|
2572
|
+
.customerId=${this.customerId}
|
|
2573
|
+
.locale=${this.locale}
|
|
2574
|
+
.currentUser=${this.currentUserProfile}
|
|
2575
|
+
@next=${this.handleNext}
|
|
2576
|
+
@save-and-close=${this.handleSaveAndClose}
|
|
2577
|
+
></wizard-step2-administrators>
|
|
2578
|
+
` : ""}
|
|
2579
|
+
|
|
2580
|
+
${this.currentStep === 3 ? n`
|
|
2581
|
+
<wizard-step3-partner-access
|
|
2582
|
+
.translations=${e}
|
|
2583
|
+
.httpService=${this.httpService}
|
|
2584
|
+
.customerId=${this.customerId}
|
|
2585
|
+
.partnerId=${((a = (t = this.customerInfo) == null ? void 0 : t.partner) == null ? void 0 : a.partnerId) ?? ""}
|
|
2586
|
+
.partnerName=${((i = (r = this.customerInfo) == null ? void 0 : r.partner) == null ? void 0 : i.name) ?? ""}
|
|
2587
|
+
@complete=${this.handleComplete}
|
|
2588
|
+
@save-and-close=${this.handleSaveAndClose}
|
|
2589
|
+
></wizard-step3-partner-access>
|
|
2590
|
+
` : ""}
|
|
2591
|
+
|
|
2592
|
+
${this.currentStep === 4 ? n`
|
|
2593
|
+
<wizard-step-complete
|
|
2594
|
+
.translations=${e}
|
|
2595
|
+
@close=${this.handleClose}
|
|
2596
|
+
></wizard-step-complete>
|
|
2597
|
+
` : ""}
|
|
2598
|
+
</div>
|
|
2599
|
+
</div>
|
|
2600
|
+
` : ""}
|
|
2601
|
+
`;
|
|
2602
|
+
}
|
|
2603
|
+
/**
|
|
2604
|
+
* Render error banner if there's an error message
|
|
2605
|
+
*/
|
|
2606
|
+
renderErrorBanner(e) {
|
|
2607
|
+
if (!this.errorState)
|
|
2608
|
+
return n``;
|
|
2609
|
+
const t = e.errors[this.errorState.errorKey];
|
|
2610
|
+
return n`
|
|
2611
|
+
<div class="error-banner" role="alert">
|
|
2612
|
+
<div class="error-content">
|
|
2613
|
+
<div class="error-icon">
|
|
2614
|
+
${d.octagonAlert()}
|
|
2615
|
+
</div>
|
|
2616
|
+
<div class="error-text-container">
|
|
2617
|
+
<div class="error-title">${t.title}</div>
|
|
2618
|
+
<div class="error-message">${t.message}</div>
|
|
2619
|
+
</div>
|
|
2620
|
+
</div>
|
|
2621
|
+
<button type="button" class="error-dismiss" @click=${this.dismissError} aria-label=${e.common.dismissError}>
|
|
2622
|
+
${d.x()}
|
|
2623
|
+
</button>
|
|
2624
|
+
</div>
|
|
2625
|
+
`;
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
m.stepMap = {
|
|
2629
|
+
welcome: 0,
|
|
2630
|
+
company: 1,
|
|
2631
|
+
administrators: 2,
|
|
2632
|
+
"partner-access": 3,
|
|
2633
|
+
complete: 4
|
|
2634
|
+
};
|
|
2635
|
+
m.styles = [
|
|
2636
|
+
E,
|
|
2637
|
+
$`:host{display:block;font-family:var(--vsn-customer-onboarding-wizard-font-family);}.overlay{position:fixed;inset:0;background:var(--ga-color-surface-page);display:flex;align-items:center;justify-content:center;z-index:1000;}.wizard-container{background:var(--ga-color-white);width:780px;min-height:520px;padding:var(--ga-size-spacing-08) var(--ga-size-spacing-10);border-radius:var(--ga-radius);border:1px solid var(--ga-color-cyan-80);}h1.wizard-title{font-size:var(--ga-text-2xl-size);line-height:var(--ga-text-2xl-line-height);font-weight:600;margin:0 0 var(--ga-size-spacing-07);color:var(--ga-color-text-headings);text-align:left;letter-spacing:-0.27px}.error-banner{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--ga-size-spacing-04);padding:var(--ga-size-spacing-05);margin-bottom:var(--ga-size-spacing-06);background-color:#FEF2F2;border:1px solid #FCA5A5;border-radius:var(--ga-radius);animation:slideDown 0.3s ease-out;}@keyframes slideDown{from{opacity:0;transform:translateY(-10px);}to{opacity:1;transform:translateY(0);}}.error-content{display:flex;align-items:flex-start;gap:var(--ga-size-spacing-04);flex:1;}.error-icon{width:24px;height:24px;color:var(--ga-color-error);flex-shrink:0;}.error-icon svg{width:24px;height:24px;}.error-text-container{display:flex;flex-direction:column;gap:var(--ga-size-spacing-01);flex:1;}.error-title{font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-cyan-90);font-weight:600;margin:0;}.error-message{font-size:var(--ga-text-sm-size);line-height:var(--ga-text-sm-line-height);color:var(--ga-color-cyan-90);font-weight:400;margin:0;}.error-dismiss{background:none;border:none;padding:0;cursor:pointer;color:var(--ga-color-red-60);width:24px;height:24px;flex-shrink:0;display:flex;align-items:center;justify-content:center;opacity:0.7;transition:opacity 0.2s;}.error-dismiss:hover{opacity:1;}.error-dismiss svg{width:20px;height:20px;}.step-indicators{display:flex;flex-direction:column;margin-bottom:var(--ga-size-spacing-10);}.line-row{display:flex;gap:0;margin-bottom:var(--ga-size-spacing-04);}.line-segment{flex:1;border-bottom:2px solid var(--ga-color-neutral-30);margin:0;padding:0;}.line-segment.completed{border-bottom-color:var(--ga-color-success);}.line-segment.active{border-bottom-color:var(--ga-color-primary);border-bottom-width:4px;margin-bottom:-2px;}.steps-row{display:flex;gap:0;}.step-wrapper{flex:1;display:flex;align-items:center;}.step-indicator{display:flex;align-items:center;gap:var(--ga-size-spacing-03);}.step-icon{width:24px;height:24px;border-radius:var(--ga-radius-round);background:transparent;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--ga-color-primary);}.step-indicator.active .step-icon{color:var(--ga-color-primary);}.step-indicator.completed .step-icon{color:var(--ga-color-success);}.step-label{font-size:var(--ga-text-md-size);font-weight:500;color:var(--ga-color-primary);white-space:nowrap;letter-spacing:-0.1px}.step-indicator.active .step-label{color:var(--ga-color-text-headings);font-weight:500;}`
|
|
2638
|
+
];
|
|
2639
|
+
f([
|
|
2640
|
+
g({ type: String })
|
|
2641
|
+
], m.prototype, "locale", 2);
|
|
2642
|
+
f([
|
|
2643
|
+
g({ type: String })
|
|
2644
|
+
], m.prototype, "baseUrl", 2);
|
|
2645
|
+
f([
|
|
2646
|
+
g({ type: String })
|
|
2647
|
+
], m.prototype, "adminUrl", 2);
|
|
2648
|
+
f([
|
|
2649
|
+
g({ type: String })
|
|
2650
|
+
], m.prototype, "taskId", 2);
|
|
2651
|
+
f([
|
|
2652
|
+
g({ type: String })
|
|
2653
|
+
], m.prototype, "customerId", 2);
|
|
2654
|
+
f([
|
|
2655
|
+
g({ type: String })
|
|
2656
|
+
], m.prototype, "step", 2);
|
|
2657
|
+
f([
|
|
2658
|
+
l()
|
|
2659
|
+
], m.prototype, "userName", 2);
|
|
2660
|
+
f([
|
|
2661
|
+
l()
|
|
2662
|
+
], m.prototype, "currentUserProfile", 2);
|
|
2663
|
+
f([
|
|
2664
|
+
l()
|
|
2665
|
+
], m.prototype, "currentStep", 2);
|
|
2666
|
+
f([
|
|
2667
|
+
l()
|
|
2668
|
+
], m.prototype, "completedSteps", 2);
|
|
2669
|
+
f([
|
|
2670
|
+
l()
|
|
2671
|
+
], m.prototype, "errorState", 2);
|
|
2672
|
+
f([
|
|
2673
|
+
l()
|
|
2674
|
+
], m.prototype, "customerInfo", 2);
|
|
2675
|
+
f([
|
|
2676
|
+
l()
|
|
2677
|
+
], m.prototype, "visible", 2);
|
|
2678
|
+
m = f([
|
|
2679
|
+
S("vsn-customer-onboarding-wizard")
|
|
2680
|
+
], m);
|
|
2681
|
+
export {
|
|
2682
|
+
m as CustomerOnboardingWizard,
|
|
2683
|
+
O as HttpService
|
|
2684
|
+
};
|