@jotul/jotul-widgets 1.2.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -28
- package/dist/JotulWidget.css +1 -1
- package/dist/JotulWidget.d.ts +1 -1
- package/dist/JotulWidget.js +325 -132
- package/dist/analytics/WidgetTrackingContext.d.ts +14 -0
- package/dist/analytics/WidgetTrackingContext.js +5 -0
- package/dist/analytics/gtm.d.ts +7 -0
- package/dist/analytics/gtm.js +17 -0
- package/dist/analytics/widgetTracking.d.ts +54 -0
- package/dist/analytics/widgetTracking.js +144 -0
- package/dist/api.d.ts +27 -1
- package/dist/api.js +74 -0
- package/dist/components/FindDealerDrawerWidget.d.ts +7 -4
- package/dist/components/FindDealerDrawerWidget.js +17 -14
- package/dist/components/InquiryField.d.ts +3 -1
- package/dist/components/InquiryField.js +19 -2
- package/dist/components/InquirySelectField.d.ts +13 -0
- package/dist/components/InquirySelectField.js +5 -0
- package/dist/components/ProductPageWidget.d.ts +7 -4
- package/dist/components/ProductPageWidget.js +12 -14
- package/dist/components/TurnstileField.d.ts +7 -0
- package/dist/components/TurnstileField.js +48 -0
- package/dist/components/WarrantyFormWidget.d.ts +12 -0
- package/dist/components/WarrantyFormWidget.js +98 -0
- package/dist/components/product-page/DealerList.d.ts +1 -1
- package/dist/components/product-page/DealerList.js +14 -6
- package/dist/components/product-page/InquiryForm.d.ts +6 -2
- package/dist/components/product-page/InquiryForm.js +21 -3
- package/dist/constants/turnstile.d.ts +8 -0
- package/dist/constants/turnstile.js +19 -0
- package/dist/hooks/useTurnstileSiteKey.d.ts +1 -0
- package/dist/hooks/useTurnstileSiteKey.js +38 -0
- package/dist/i18n/locales/cz.json +34 -1
- package/dist/i18n/locales/de.json +34 -1
- package/dist/i18n/locales/en.json +34 -1
- package/dist/i18n/locales/fi.json +34 -1
- package/dist/i18n/locales/fr.json +34 -1
- package/dist/i18n/locales/nl.json +34 -1
- package/dist/i18n/locales/no.json +34 -1
- package/dist/i18n/locales/pl.json +34 -1
- package/dist/i18n/locales/se.json +34 -1
- package/dist/i18n/widgetStrings.d.ts +33 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/turnstile.d.ts +18 -0
- package/dist/turnstile.js +31 -0
- package/dist/types.d.ts +56 -0
- package/dist/utils/inquiryCategories.d.ts +8 -0
- package/dist/utils/inquiryCategories.js +24 -0
- package/dist/utils/inquirySubmit.d.ts +24 -0
- package/dist/utils/inquirySubmit.js +35 -0
- package/dist/utils/urlDealerId.d.ts +2 -0
- package/dist/utils/urlDealerId.js +5 -0
- package/dist/utils/usMarket.d.ts +2 -0
- package/dist/utils/usMarket.js +9 -0
- package/dist/utils/warrantyForm.d.ts +38 -0
- package/dist/utils/warrantyForm.js +80 -0
- package/dist/utils.d.ts +10 -1
- package/dist/utils.js +46 -3
- package/package.json +5 -2
|
@@ -26,12 +26,45 @@
|
|
|
26
26
|
"fieldEmail": "Email",
|
|
27
27
|
"fieldPhone": "Phone",
|
|
28
28
|
"fieldComment": "Comment",
|
|
29
|
-
"
|
|
29
|
+
"dealerNotFound": "Dealer not found.",
|
|
30
|
+
"fieldRequestCategory": "Request category",
|
|
31
|
+
"requestCategoryPriceQuote": "Price quote",
|
|
32
|
+
"requestCategoryProductHelp": "Product help / questions",
|
|
33
|
+
"requestCategoryService": "Service",
|
|
34
|
+
"requestCategoryOther": "Other",
|
|
35
|
+
"warrantyCustomerSectionTitle": "Customer information",
|
|
36
|
+
"warrantyProductSectionTitle": "Product information",
|
|
37
|
+
"fieldFirstName": "First name",
|
|
38
|
+
"fieldLastName": "Last name",
|
|
39
|
+
"fieldAddress": "Address",
|
|
40
|
+
"fieldCity": "City",
|
|
41
|
+
"fieldZipcode": "Zipcode",
|
|
42
|
+
"fieldCounty": "County",
|
|
43
|
+
"fieldProductName": "Product name",
|
|
44
|
+
"fieldProductNameHint": "For example Jøtul F 602",
|
|
45
|
+
"fieldPurchaseDate": "Date of purchase",
|
|
46
|
+
"fieldPurchasedFromDealer": "Purchased from dealer",
|
|
47
|
+
"fieldSelfInstalled": "Did you install the product yourself?",
|
|
48
|
+
"fieldSelfInstalledYes": "Yes",
|
|
49
|
+
"fieldSelfInstalledNo": "No",
|
|
50
|
+
"fieldInstallerName": "If no, who installed the product?",
|
|
51
|
+
"fieldConsent": "I consent to my information being sent to Jøtul for information and commercial purposes. I have the right to view and delete my information",
|
|
52
|
+
"warrantySubmitCta": "Send",
|
|
53
|
+
"warrantySubmitting": "Sending …",
|
|
54
|
+
"warrantySuccessTitle": "Thank you for registering",
|
|
55
|
+
"warrantySuccessMessage": "Your warranty registration has been sent. Check your email for confirmation.",
|
|
56
|
+
"formValidationConsent": "You must consent to continue.",
|
|
57
|
+
"formValidationInstaller": "Enter who installed the product.",
|
|
58
|
+
"formValidationCaptcha": "Please complete the security check.",
|
|
59
|
+
"formValidationRequired": "Please fill in all required fields.",
|
|
30
60
|
"formValidationEmail": "Enter a valid email address.",
|
|
31
61
|
"dealersNearYou": "{count} dealers nearby",
|
|
32
62
|
"unknownDealer": "Unknown dealer",
|
|
33
63
|
"sendInquiryCta": "Send request",
|
|
34
64
|
"sendInquiryEditing": "Editing request",
|
|
65
|
+
"showMore": "Show more",
|
|
66
|
+
"exclusiveDealerBadgeAlt": "Jotul exclusive dealer",
|
|
67
|
+
"ildstedetDealerBadgeAlt": "Ildstedet dealer",
|
|
35
68
|
"readyDealerFinder": "JotulWidget ready: dealerFinder",
|
|
36
69
|
"readyWarrantyForm": "JotulWidget ready: warrantyForm",
|
|
37
70
|
"listView": "List",
|
|
@@ -26,12 +26,45 @@
|
|
|
26
26
|
"fieldEmail": "Sähköposti",
|
|
27
27
|
"fieldPhone": "Puhelin",
|
|
28
28
|
"fieldComment": "Kommentti",
|
|
29
|
-
"
|
|
29
|
+
"dealerNotFound": "Jälleenmyyjää ei löytynyt.",
|
|
30
|
+
"fieldRequestCategory": "Pyyntötyyppi",
|
|
31
|
+
"requestCategoryPriceQuote": "Hintatarjous",
|
|
32
|
+
"requestCategoryProductHelp": "Tuotetuki / kysymykset",
|
|
33
|
+
"requestCategoryService": "Huolto",
|
|
34
|
+
"requestCategoryOther": "Muu",
|
|
35
|
+
"warrantyCustomerSectionTitle": "Asiakastiedot",
|
|
36
|
+
"warrantyProductSectionTitle": "Tuotetiedot",
|
|
37
|
+
"fieldFirstName": "Etunimi",
|
|
38
|
+
"fieldLastName": "Sukunimi",
|
|
39
|
+
"fieldAddress": "Osoite",
|
|
40
|
+
"fieldCity": "Kaupunki",
|
|
41
|
+
"fieldZipcode": "Postinumero",
|
|
42
|
+
"fieldCounty": "Lääni",
|
|
43
|
+
"fieldProductName": "Tuotenimi",
|
|
44
|
+
"fieldProductNameHint": "Esimerkiksi Jøtul F 602",
|
|
45
|
+
"fieldPurchaseDate": "Ostopäivä",
|
|
46
|
+
"fieldPurchasedFromDealer": "Ostettu jälleenmyyjältä",
|
|
47
|
+
"fieldSelfInstalled": "Asensitko tuotteen itse?",
|
|
48
|
+
"fieldSelfInstalledYes": "Kyllä",
|
|
49
|
+
"fieldSelfInstalledNo": "Ei",
|
|
50
|
+
"fieldInstallerName": "Jos ei, kuka asensi tuotteen?",
|
|
51
|
+
"fieldConsent": "Suostun siihen, että tietoni lähetetään Jøtulille tiedotus- ja kaupallisiin tarkoituksiin. Minulla on oikeus tarkastella ja poistaa tietoni",
|
|
52
|
+
"warrantySubmitCta": "Lähetä",
|
|
53
|
+
"warrantySubmitting": "Lähetetään …",
|
|
54
|
+
"warrantySuccessTitle": "Kiitos rekisteröinnistä",
|
|
55
|
+
"warrantySuccessMessage": "Takuurekisteröintisi on lähetetty. Tarkista sähköpostisi vahvistusta varten.",
|
|
56
|
+
"formValidationConsent": "Sinun on annettava suostumus jatkaaksesi.",
|
|
57
|
+
"formValidationInstaller": "Ilmoita kuka asensi tuotteen.",
|
|
58
|
+
"formValidationCaptcha": "Suorita turvatarkistus loppuun.",
|
|
59
|
+
"formValidationRequired": "Täytä kaikki pakolliset kentät.",
|
|
30
60
|
"formValidationEmail": "Anna kelvollinen sähköpostiosoite.",
|
|
31
61
|
"dealersNearYou": "{count} jälleenmyyjää lähelläsi",
|
|
32
62
|
"unknownDealer": "Tuntematon jälleenmyyjä",
|
|
33
63
|
"sendInquiryCta": "Lähetä pyyntö",
|
|
34
64
|
"sendInquiryEditing": "Muokataan pyyntöä",
|
|
65
|
+
"showMore": "Näytä lisää",
|
|
66
|
+
"exclusiveDealerBadgeAlt": "Jotul exclusive -jälleenmyyjä",
|
|
67
|
+
"ildstedetDealerBadgeAlt": "Ildstedet-jälleenmyyjä",
|
|
35
68
|
"readyDealerFinder": "JotulWidget valmis: dealerFinder",
|
|
36
69
|
"readyWarrantyForm": "JotulWidget valmis: warrantyForm",
|
|
37
70
|
"listView": "Lista",
|
|
@@ -26,12 +26,45 @@
|
|
|
26
26
|
"fieldEmail": "E-mail",
|
|
27
27
|
"fieldPhone": "Téléphone",
|
|
28
28
|
"fieldComment": "Commentaire",
|
|
29
|
-
"
|
|
29
|
+
"dealerNotFound": "Revendeur introuvable.",
|
|
30
|
+
"fieldRequestCategory": "Catégorie de demande",
|
|
31
|
+
"requestCategoryPriceQuote": "Devis",
|
|
32
|
+
"requestCategoryProductHelp": "Aide produit / questions",
|
|
33
|
+
"requestCategoryService": "Service",
|
|
34
|
+
"requestCategoryOther": "Autre",
|
|
35
|
+
"warrantyCustomerSectionTitle": "Informations client",
|
|
36
|
+
"warrantyProductSectionTitle": "Informations produit",
|
|
37
|
+
"fieldFirstName": "Prénom",
|
|
38
|
+
"fieldLastName": "Nom",
|
|
39
|
+
"fieldAddress": "Adresse",
|
|
40
|
+
"fieldCity": "Ville",
|
|
41
|
+
"fieldZipcode": "Code postal",
|
|
42
|
+
"fieldCounty": "Comté",
|
|
43
|
+
"fieldProductName": "Nom du produit",
|
|
44
|
+
"fieldProductNameHint": "Par exemple Jøtul F 602",
|
|
45
|
+
"fieldPurchaseDate": "Date d'achat",
|
|
46
|
+
"fieldPurchasedFromDealer": "Acheté chez le revendeur",
|
|
47
|
+
"fieldSelfInstalled": "Avez-vous installé le produit vous-même ?",
|
|
48
|
+
"fieldSelfInstalledYes": "Oui",
|
|
49
|
+
"fieldSelfInstalledNo": "Non",
|
|
50
|
+
"fieldInstallerName": "Si non, qui a installé le produit ?",
|
|
51
|
+
"fieldConsent": "Je consens à ce que mes informations soient envoyées à Jøtul à des fins d'information et commerciales. J'ai le droit de consulter et de supprimer mes informations",
|
|
52
|
+
"warrantySubmitCta": "Envoyer",
|
|
53
|
+
"warrantySubmitting": "Envoi …",
|
|
54
|
+
"warrantySuccessTitle": "Merci pour votre enregistrement",
|
|
55
|
+
"warrantySuccessMessage": "Votre enregistrement de garantie a été envoyé. Consultez votre e-mail pour confirmation.",
|
|
56
|
+
"formValidationConsent": "Vous devez consentir pour continuer.",
|
|
57
|
+
"formValidationInstaller": "Indiquez qui a installé le produit.",
|
|
58
|
+
"formValidationCaptcha": "Veuillez compléter la vérification de sécurité.",
|
|
59
|
+
"formValidationRequired": "Veuillez remplir tous les champs obligatoires.",
|
|
30
60
|
"formValidationEmail": "Saisissez une adresse e-mail valide.",
|
|
31
61
|
"dealersNearYou": "{count} revendeurs à proximité",
|
|
32
62
|
"unknownDealer": "Revendeur inconnu",
|
|
33
63
|
"sendInquiryCta": "Envoyer la demande",
|
|
34
64
|
"sendInquiryEditing": "Modification de la demande",
|
|
65
|
+
"showMore": "Afficher plus",
|
|
66
|
+
"exclusiveDealerBadgeAlt": "Revendeur exclusif Jotul",
|
|
67
|
+
"ildstedetDealerBadgeAlt": "Revendeur Ildstedet",
|
|
35
68
|
"readyDealerFinder": "JotulWidget prêt : dealerFinder",
|
|
36
69
|
"readyWarrantyForm": "JotulWidget prêt : warrantyForm",
|
|
37
70
|
"listView": "Liste",
|
|
@@ -26,12 +26,45 @@
|
|
|
26
26
|
"fieldEmail": "E-mail",
|
|
27
27
|
"fieldPhone": "Telefoon",
|
|
28
28
|
"fieldComment": "Opmerking",
|
|
29
|
-
"
|
|
29
|
+
"dealerNotFound": "Dealer niet gevonden.",
|
|
30
|
+
"fieldRequestCategory": "Type aanvraag",
|
|
31
|
+
"requestCategoryPriceQuote": "Prijsopgave",
|
|
32
|
+
"requestCategoryProductHelp": "Producthulp / vragen",
|
|
33
|
+
"requestCategoryService": "Service",
|
|
34
|
+
"requestCategoryOther": "Overig",
|
|
35
|
+
"warrantyCustomerSectionTitle": "Klantgegevens",
|
|
36
|
+
"warrantyProductSectionTitle": "Productinformatie",
|
|
37
|
+
"fieldFirstName": "Voornaam",
|
|
38
|
+
"fieldLastName": "Achternaam",
|
|
39
|
+
"fieldAddress": "Adres",
|
|
40
|
+
"fieldCity": "Plaats",
|
|
41
|
+
"fieldZipcode": "Postcode",
|
|
42
|
+
"fieldCounty": "Provincie",
|
|
43
|
+
"fieldProductName": "Productnaam",
|
|
44
|
+
"fieldProductNameHint": "Bijvoorbeeld Jøtul F 602",
|
|
45
|
+
"fieldPurchaseDate": "Aankoopdatum",
|
|
46
|
+
"fieldPurchasedFromDealer": "Gekocht bij dealer",
|
|
47
|
+
"fieldSelfInstalled": "Heeft u het product zelf geïnstalleerd?",
|
|
48
|
+
"fieldSelfInstalledYes": "Ja",
|
|
49
|
+
"fieldSelfInstalledNo": "Nee",
|
|
50
|
+
"fieldInstallerName": "Zo nee, wie heeft het product geïnstalleerd?",
|
|
51
|
+
"fieldConsent": "Ik stem ermee in dat mijn gegevens naar Jøtul worden gestuurd voor informatie- en commerciële doeleinden. Ik heb het recht om mijn gegevens in te zien en te verwijderen",
|
|
52
|
+
"warrantySubmitCta": "Versturen",
|
|
53
|
+
"warrantySubmitting": "Bezig met verzenden …",
|
|
54
|
+
"warrantySuccessTitle": "Bedankt voor uw registratie",
|
|
55
|
+
"warrantySuccessMessage": "Uw garantieregistratie is verzonden. Controleer uw e-mail voor bevestiging.",
|
|
56
|
+
"formValidationConsent": "U moet toestemming geven om door te gaan.",
|
|
57
|
+
"formValidationInstaller": "Geef aan wie het product heeft geïnstalleerd.",
|
|
58
|
+
"formValidationCaptcha": "Voltooi de beveiligingscontrole.",
|
|
59
|
+
"formValidationRequired": "Vul alle verplichte velden in.",
|
|
30
60
|
"formValidationEmail": "Voer een geldig e-mailadres in.",
|
|
31
61
|
"dealersNearYou": "{count} dealers in de buurt",
|
|
32
62
|
"unknownDealer": "Onbekende dealer",
|
|
33
63
|
"sendInquiryCta": "Aanvraag verzenden",
|
|
34
64
|
"sendInquiryEditing": "Aanvraag bewerken",
|
|
65
|
+
"showMore": "Meer weergeven",
|
|
66
|
+
"exclusiveDealerBadgeAlt": "Jotul exclusive dealer",
|
|
67
|
+
"ildstedetDealerBadgeAlt": "Ildstedet dealer",
|
|
35
68
|
"readyDealerFinder": "JotulWidget klaar: dealerFinder",
|
|
36
69
|
"readyWarrantyForm": "JotulWidget klaar: warrantyForm",
|
|
37
70
|
"listView": "Lijst",
|
|
@@ -26,12 +26,45 @@
|
|
|
26
26
|
"fieldEmail": "E-post",
|
|
27
27
|
"fieldPhone": "Telefon",
|
|
28
28
|
"fieldComment": "Kommentar",
|
|
29
|
-
"
|
|
29
|
+
"dealerNotFound": "Forhandleren ble ikke funnet.",
|
|
30
|
+
"fieldRequestCategory": "Type forespørsel",
|
|
31
|
+
"requestCategoryPriceQuote": "Pristilbud",
|
|
32
|
+
"requestCategoryProductHelp": "Produkthjelp / spørsmål",
|
|
33
|
+
"requestCategoryService": "Service",
|
|
34
|
+
"requestCategoryOther": "Annet",
|
|
35
|
+
"warrantyCustomerSectionTitle": "Kundeinformasjon",
|
|
36
|
+
"warrantyProductSectionTitle": "Produktinformasjon",
|
|
37
|
+
"fieldFirstName": "Fornavn",
|
|
38
|
+
"fieldLastName": "Etternavn",
|
|
39
|
+
"fieldAddress": "Adresse",
|
|
40
|
+
"fieldCity": "Sted",
|
|
41
|
+
"fieldZipcode": "Postnummer",
|
|
42
|
+
"fieldCounty": "Fylke",
|
|
43
|
+
"fieldProductName": "Produktnavn",
|
|
44
|
+
"fieldProductNameHint": "For eksempel Jøtul F 602",
|
|
45
|
+
"fieldPurchaseDate": "Kjøpsdato",
|
|
46
|
+
"fieldPurchasedFromDealer": "Kjøpt hos forhandler",
|
|
47
|
+
"fieldSelfInstalled": "Installerte du produktet selv?",
|
|
48
|
+
"fieldSelfInstalledYes": "Ja",
|
|
49
|
+
"fieldSelfInstalledNo": "Nei",
|
|
50
|
+
"fieldInstallerName": "Hvis nei, hvem installerte produktet?",
|
|
51
|
+
"fieldConsent": "Jeg samtykker til at opplysningene mine sendes til Jøtul for informasjon og kommersielle formål. Jeg har rett til å se og slette opplysningene mine",
|
|
52
|
+
"warrantySubmitCta": "Send",
|
|
53
|
+
"warrantySubmitting": "Sender …",
|
|
54
|
+
"warrantySuccessTitle": "Takk for registreringen",
|
|
55
|
+
"warrantySuccessMessage": "Garantiregistreringen er sendt. Sjekk e-posten din for bekreftelse.",
|
|
56
|
+
"formValidationConsent": "Du må samtykke for å fortsette.",
|
|
57
|
+
"formValidationInstaller": "Oppgi hvem som installerte produktet.",
|
|
58
|
+
"formValidationCaptcha": "Fullfør sikkerhetskontrollen.",
|
|
59
|
+
"formValidationRequired": "Fyll ut alle obligatoriske felt.",
|
|
30
60
|
"formValidationEmail": "Skriv inn en gyldig e-postadresse.",
|
|
31
61
|
"dealersNearYou": "{count} forhandlere i nærheten",
|
|
32
62
|
"unknownDealer": "Ukjent forhandler",
|
|
33
63
|
"sendInquiryCta": "Send forespørsel",
|
|
34
64
|
"sendInquiryEditing": "Redigerer forespørsel",
|
|
65
|
+
"showMore": "Vis flere",
|
|
66
|
+
"exclusiveDealerBadgeAlt": "Jotul exclusive-forhandler",
|
|
67
|
+
"ildstedetDealerBadgeAlt": "Ildstedet-forhandler",
|
|
35
68
|
"readyDealerFinder": "JotulWidget klar: dealerFinder",
|
|
36
69
|
"readyWarrantyForm": "JotulWidget klar: warrantyForm",
|
|
37
70
|
"listView": "Liste",
|
|
@@ -26,12 +26,45 @@
|
|
|
26
26
|
"fieldEmail": "E-mail",
|
|
27
27
|
"fieldPhone": "Telefon",
|
|
28
28
|
"fieldComment": "Komentarz",
|
|
29
|
-
"
|
|
29
|
+
"dealerNotFound": "Nie znaleziono dealera.",
|
|
30
|
+
"fieldRequestCategory": "Kategoria zapytania",
|
|
31
|
+
"requestCategoryPriceQuote": "Wycena",
|
|
32
|
+
"requestCategoryProductHelp": "Pomoc produktowa / pytania",
|
|
33
|
+
"requestCategoryService": "Serwis",
|
|
34
|
+
"requestCategoryOther": "Inne",
|
|
35
|
+
"warrantyCustomerSectionTitle": "Dane klienta",
|
|
36
|
+
"warrantyProductSectionTitle": "Informacje o produkcie",
|
|
37
|
+
"fieldFirstName": "Imię",
|
|
38
|
+
"fieldLastName": "Nazwisko",
|
|
39
|
+
"fieldAddress": "Adres",
|
|
40
|
+
"fieldCity": "Miasto",
|
|
41
|
+
"fieldZipcode": "Kod pocztowy",
|
|
42
|
+
"fieldCounty": "Hrabstwo",
|
|
43
|
+
"fieldProductName": "Nazwa produktu",
|
|
44
|
+
"fieldProductNameHint": "Na przykład Jøtul F 602",
|
|
45
|
+
"fieldPurchaseDate": "Data zakupu",
|
|
46
|
+
"fieldPurchasedFromDealer": "Kupiono u dealera",
|
|
47
|
+
"fieldSelfInstalled": "Czy samodzielnie zainstalowałeś produkt?",
|
|
48
|
+
"fieldSelfInstalledYes": "Tak",
|
|
49
|
+
"fieldSelfInstalledNo": "Nie",
|
|
50
|
+
"fieldInstallerName": "Jeśli nie, kto zainstalował produkt?",
|
|
51
|
+
"fieldConsent": "Wyrażam zgodę na przesłanie moich danych do Jøtul w celach informacyjnych i handlowych. Mam prawo do wglądu i usunięcia moich danych",
|
|
52
|
+
"warrantySubmitCta": "Wyślij",
|
|
53
|
+
"warrantySubmitting": "Wysyłanie …",
|
|
54
|
+
"warrantySuccessTitle": "Dziękujemy za rejestrację",
|
|
55
|
+
"warrantySuccessMessage": "Rejestracja gwarancji została wysłana. Sprawdź e-mail w celu potwierdzenia.",
|
|
56
|
+
"formValidationConsent": "Musisz wyrazić zgodę, aby kontynuować.",
|
|
57
|
+
"formValidationInstaller": "Podaj, kto zainstalował produkt.",
|
|
58
|
+
"formValidationCaptcha": "Dokończ weryfikację bezpieczeństwa.",
|
|
59
|
+
"formValidationRequired": "Wypełnij wszystkie wymagane pola.",
|
|
30
60
|
"formValidationEmail": "Wpisz prawidłowy adres e-mail.",
|
|
31
61
|
"dealersNearYou": "{count} dealerów w pobliżu",
|
|
32
62
|
"unknownDealer": "Nieznany dealer",
|
|
33
63
|
"sendInquiryCta": "Wyślij zapytanie",
|
|
34
64
|
"sendInquiryEditing": "Edycja zapytania",
|
|
65
|
+
"showMore": "Pokaż więcej",
|
|
66
|
+
"exclusiveDealerBadgeAlt": "Dealer Jotul exclusive",
|
|
67
|
+
"ildstedetDealerBadgeAlt": "Dealer Ildstedet",
|
|
35
68
|
"readyDealerFinder": "JotulWidget gotowy: dealerFinder",
|
|
36
69
|
"readyWarrantyForm": "JotulWidget gotowy: warrantyForm",
|
|
37
70
|
"listView": "Lista",
|
|
@@ -26,12 +26,45 @@
|
|
|
26
26
|
"fieldEmail": "E-post",
|
|
27
27
|
"fieldPhone": "Telefon",
|
|
28
28
|
"fieldComment": "Kommentar",
|
|
29
|
-
"
|
|
29
|
+
"dealerNotFound": "Återförsäljaren hittades inte.",
|
|
30
|
+
"fieldRequestCategory": "Typ av förfrågan",
|
|
31
|
+
"requestCategoryPriceQuote": "Prisoffert",
|
|
32
|
+
"requestCategoryProductHelp": "Produkthjälp / frågor",
|
|
33
|
+
"requestCategoryService": "Service",
|
|
34
|
+
"requestCategoryOther": "Annat",
|
|
35
|
+
"warrantyCustomerSectionTitle": "Kundinformation",
|
|
36
|
+
"warrantyProductSectionTitle": "Produktinformation",
|
|
37
|
+
"fieldFirstName": "Förnamn",
|
|
38
|
+
"fieldLastName": "Efternamn",
|
|
39
|
+
"fieldAddress": "Adress",
|
|
40
|
+
"fieldCity": "Ort",
|
|
41
|
+
"fieldZipcode": "Postnummer",
|
|
42
|
+
"fieldCounty": "Län",
|
|
43
|
+
"fieldProductName": "Produktnamn",
|
|
44
|
+
"fieldProductNameHint": "Till exempel Jøtul F 602",
|
|
45
|
+
"fieldPurchaseDate": "Inköpsdatum",
|
|
46
|
+
"fieldPurchasedFromDealer": "Köpt hos återförsäljare",
|
|
47
|
+
"fieldSelfInstalled": "Installerade du produkten själv?",
|
|
48
|
+
"fieldSelfInstalledYes": "Ja",
|
|
49
|
+
"fieldSelfInstalledNo": "Nej",
|
|
50
|
+
"fieldInstallerName": "Om nej, vem installerade produkten?",
|
|
51
|
+
"fieldConsent": "Jag samtycker till att mina uppgifter skickas till Jøtul för information och kommersiella ändamål. Jag har rätt att se och radera mina uppgifter",
|
|
52
|
+
"warrantySubmitCta": "Skicka",
|
|
53
|
+
"warrantySubmitting": "Skickar …",
|
|
54
|
+
"warrantySuccessTitle": "Tack för registreringen",
|
|
55
|
+
"warrantySuccessMessage": "Din garantiregistrering har skickats. Kontrollera din e-post för bekräftelse.",
|
|
56
|
+
"formValidationConsent": "Du måste samtycka för att fortsätta.",
|
|
57
|
+
"formValidationInstaller": "Ange vem som installerade produkten.",
|
|
58
|
+
"formValidationCaptcha": "Slutför säkerhetskontrollen.",
|
|
59
|
+
"formValidationRequired": "Fyll i alla obligatoriska fält.",
|
|
30
60
|
"formValidationEmail": "Ange en giltig e-postadress.",
|
|
31
61
|
"dealersNearYou": "{count} aterforsaljare i narheten",
|
|
32
62
|
"unknownDealer": "Okand aterforsaljare",
|
|
33
63
|
"sendInquiryCta": "Skicka forfragan",
|
|
34
64
|
"sendInquiryEditing": "Redigerar forfragan",
|
|
65
|
+
"showMore": "Visa fler",
|
|
66
|
+
"exclusiveDealerBadgeAlt": "Jotul exclusive-aterforsaljare",
|
|
67
|
+
"ildstedetDealerBadgeAlt": "Ildstedet-aterforsaljare",
|
|
35
68
|
"readyDealerFinder": "JotulWidget klar: dealerFinder",
|
|
36
69
|
"readyWarrantyForm": "JotulWidget klar: warrantyForm",
|
|
37
70
|
"listView": "Lista",
|
|
@@ -35,6 +35,9 @@ export type WidgetStrings = {
|
|
|
35
35
|
unknownDealer: string;
|
|
36
36
|
sendInquiryCta: string;
|
|
37
37
|
sendInquiryEditing: string;
|
|
38
|
+
showMore: string;
|
|
39
|
+
exclusiveDealerBadgeAlt: string;
|
|
40
|
+
ildstedetDealerBadgeAlt: string;
|
|
38
41
|
listView: string;
|
|
39
42
|
mapView: string;
|
|
40
43
|
closeMap: string;
|
|
@@ -45,6 +48,36 @@ export type WidgetStrings = {
|
|
|
45
48
|
campaignEnded: string;
|
|
46
49
|
readyDealerFinder: string;
|
|
47
50
|
readyWarrantyForm: string;
|
|
51
|
+
dealerNotFound: string;
|
|
52
|
+
fieldRequestCategory: string;
|
|
53
|
+
requestCategoryPriceQuote: string;
|
|
54
|
+
requestCategoryProductHelp: string;
|
|
55
|
+
requestCategoryService: string;
|
|
56
|
+
requestCategoryOther: string;
|
|
57
|
+
warrantyCustomerSectionTitle: string;
|
|
58
|
+
warrantyProductSectionTitle: string;
|
|
59
|
+
fieldFirstName: string;
|
|
60
|
+
fieldLastName: string;
|
|
61
|
+
fieldAddress: string;
|
|
62
|
+
fieldCity: string;
|
|
63
|
+
fieldZipcode: string;
|
|
64
|
+
fieldCounty: string;
|
|
65
|
+
fieldProductName: string;
|
|
66
|
+
fieldProductNameHint: string;
|
|
67
|
+
fieldPurchaseDate: string;
|
|
68
|
+
fieldPurchasedFromDealer: string;
|
|
69
|
+
fieldSelfInstalled: string;
|
|
70
|
+
fieldSelfInstalledYes: string;
|
|
71
|
+
fieldSelfInstalledNo: string;
|
|
72
|
+
fieldInstallerName: string;
|
|
73
|
+
fieldConsent: string;
|
|
74
|
+
warrantySubmitCta: string;
|
|
75
|
+
warrantySubmitting: string;
|
|
76
|
+
warrantySuccessTitle: string;
|
|
77
|
+
warrantySuccessMessage: string;
|
|
78
|
+
formValidationConsent: string;
|
|
79
|
+
formValidationInstaller: string;
|
|
80
|
+
formValidationCaptcha: string;
|
|
48
81
|
};
|
|
49
82
|
export declare const WIDGET_STRINGS: Record<JotulWidgetLocale, WidgetStrings>;
|
|
50
83
|
export declare function resolveWidgetUiLocale(raw: string | undefined, market?: string): JotulWidgetLocale;
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
1
|
export { checkWidgetAuthorization, DEFAULT_WIDGET_LOCALE_TAG, normalizeWidgetLocale, resolveWidgetUiLocale, searchDealersByCoordinates, searchDealersByPostalCode, JotulWidget, type CheckWidgetAuthorizationOptions, type DealerSearchResponse, type JotulWidgetBorderStyling, type JotulWidgetButtonStyling, type JotulWidgetHandle, type JotulWidgetLocale, type JotulWidgetProps, type JotulWidgetStyling, type JotulWidgetType, type WidgetAuthClientResponse, } from './JotulWidget';
|
|
2
|
+
export { fetchDealerById, submitInquiry, submitWarranty } from './api';
|
|
3
|
+
export type { DealerByIdResponse, InquirySubmitResponse, WarrantySubmitResponse } from './types';
|
|
4
|
+
export { readDealerIdFromUrlSearch } from './utils/urlDealerId';
|
|
5
|
+
export { ensureDataLayer } from './analytics/gtm';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
export { checkWidgetAuthorization, DEFAULT_WIDGET_LOCALE_TAG, normalizeWidgetLocale, resolveWidgetUiLocale, searchDealersByCoordinates, searchDealersByPostalCode, JotulWidget, } from './JotulWidget';
|
|
3
|
+
export { fetchDealerById, submitInquiry, submitWarranty } from './api';
|
|
4
|
+
export { readDealerIdFromUrlSearch } from './utils/urlDealerId';
|
|
5
|
+
export { ensureDataLayer } from './analytics/gtm';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
turnstile?: {
|
|
4
|
+
render: (container: HTMLElement, options: {
|
|
5
|
+
sitekey: string;
|
|
6
|
+
callback?: (token: string) => void;
|
|
7
|
+
'expired-callback'?: () => void;
|
|
8
|
+
'error-callback'?: () => void;
|
|
9
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
10
|
+
size?: 'normal' | 'flexible' | 'compact';
|
|
11
|
+
}) => string;
|
|
12
|
+
remove: (widgetId: string) => void;
|
|
13
|
+
reset: (widgetId: string) => void;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare function loadTurnstileScript(): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
let scriptPromise = null;
|
|
2
|
+
export function loadTurnstileScript() {
|
|
3
|
+
if (typeof window === 'undefined') {
|
|
4
|
+
return Promise.resolve();
|
|
5
|
+
}
|
|
6
|
+
if (window.turnstile) {
|
|
7
|
+
return Promise.resolve();
|
|
8
|
+
}
|
|
9
|
+
if (!scriptPromise) {
|
|
10
|
+
scriptPromise = new Promise((resolve, reject) => {
|
|
11
|
+
const existing = document.querySelector('script[data-jotul-turnstile="true"]');
|
|
12
|
+
if (existing) {
|
|
13
|
+
existing.addEventListener('load', () => resolve(), { once: true });
|
|
14
|
+
existing.addEventListener('error', () => reject(new Error('Turnstile script failed')), {
|
|
15
|
+
once: true,
|
|
16
|
+
});
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const script = document.createElement('script');
|
|
20
|
+
script.src = 'https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit';
|
|
21
|
+
script.async = true;
|
|
22
|
+
script.defer = true;
|
|
23
|
+
script.dataset.jotulTurnstile = 'true';
|
|
24
|
+
script.onload = () => resolve();
|
|
25
|
+
script.onerror = () => reject(new Error('Turnstile script failed'));
|
|
26
|
+
document.head.appendChild(script);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return scriptPromise;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -32,6 +32,13 @@ export type DealerSearchResponse = {
|
|
|
32
32
|
} | null;
|
|
33
33
|
error?: string;
|
|
34
34
|
};
|
|
35
|
+
export type DealerByIdResponse = {
|
|
36
|
+
apiVersion?: string;
|
|
37
|
+
ok: boolean;
|
|
38
|
+
type?: 'dealer';
|
|
39
|
+
dealer?: Record<string, unknown>;
|
|
40
|
+
error?: string;
|
|
41
|
+
};
|
|
35
42
|
export type LocationSuggestion = {
|
|
36
43
|
label: string;
|
|
37
44
|
latitude: number;
|
|
@@ -79,6 +86,9 @@ export type JotulWidgetProps = {
|
|
|
79
86
|
className?: string;
|
|
80
87
|
productName?: string;
|
|
81
88
|
locale?: string;
|
|
89
|
+
/** ISO 3166-1 alpha-2 market code for the warranty form (singular). */
|
|
90
|
+
market?: string;
|
|
91
|
+
/** ISO 3166-1 alpha-2 market(s) for dealer widgets. */
|
|
82
92
|
markets?: string[];
|
|
83
93
|
scope?: JotulWidgetScope;
|
|
84
94
|
brands?: string[];
|
|
@@ -90,13 +100,59 @@ export type JotulWidgetProps = {
|
|
|
90
100
|
buttonLoading?: ReactNode;
|
|
91
101
|
/** Ref handle for imperative open/close control (alternative to `button`). */
|
|
92
102
|
widgetRef?: React.Ref<JotulWidgetHandle>;
|
|
103
|
+
/** Analytics page type. Defaults to `page` (drawer) or `product_page` (product page widget). */
|
|
104
|
+
pageType?: string;
|
|
105
|
+
/** Optional product identifier for analytics on the product page widget. */
|
|
106
|
+
productId?: string;
|
|
107
|
+
/** Partner proxy route for warranty form submissions. Defaults to `/api/jotul/warranty`. */
|
|
108
|
+
warrantyEndpoint?: string;
|
|
109
|
+
/** Partner proxy route for inquiry form submissions. Defaults to `/api/jotul/submission`. */
|
|
110
|
+
submissionEndpoint?: string;
|
|
111
|
+
/** Advanced override — Turnstile site key is fetched from Jotul automatically. */
|
|
112
|
+
turnstileSiteKey?: string;
|
|
113
|
+
/** Advanced override for Turnstile config URL (defaults to api.jotul.com). */
|
|
114
|
+
turnstileConfigEndpoint?: string;
|
|
93
115
|
};
|
|
94
116
|
export type DealerRecord = Record<string, unknown>;
|
|
117
|
+
export type InquiryRequestCategory = 'price_quote' | 'product_help' | 'service' | 'other';
|
|
95
118
|
export type InquiryFormValues = {
|
|
96
119
|
productName: string;
|
|
97
120
|
dealerName: string;
|
|
121
|
+
dealerId?: string;
|
|
122
|
+
dealerEmail?: string;
|
|
123
|
+
salesRepresentative?: string;
|
|
124
|
+
market?: string;
|
|
125
|
+
requestCategory: InquiryRequestCategory;
|
|
98
126
|
name: string;
|
|
99
127
|
email: string;
|
|
100
128
|
phone: string;
|
|
101
129
|
comment: string;
|
|
102
130
|
};
|
|
131
|
+
export type WarrantyFormValues = {
|
|
132
|
+
firstName: string;
|
|
133
|
+
lastName: string;
|
|
134
|
+
address: string;
|
|
135
|
+
zipcode: string;
|
|
136
|
+
city: string;
|
|
137
|
+
county: string;
|
|
138
|
+
phone: string;
|
|
139
|
+
email: string;
|
|
140
|
+
productName: string;
|
|
141
|
+
purchaseDate: string;
|
|
142
|
+
purchasedFromDealer: string;
|
|
143
|
+
selfInstalled: 'yes' | 'no' | '';
|
|
144
|
+
installerName: string;
|
|
145
|
+
consent: boolean;
|
|
146
|
+
};
|
|
147
|
+
export type WarrantySubmitResponse = {
|
|
148
|
+
apiVersion?: string;
|
|
149
|
+
ok: boolean;
|
|
150
|
+
message?: string;
|
|
151
|
+
error?: string;
|
|
152
|
+
};
|
|
153
|
+
export type InquirySubmitResponse = {
|
|
154
|
+
apiVersion?: string;
|
|
155
|
+
ok: boolean;
|
|
156
|
+
message?: string;
|
|
157
|
+
error?: string;
|
|
158
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InquiryRequestCategory } from '../types';
|
|
2
|
+
import type { WidgetStrings } from '../i18n/widgetStrings';
|
|
3
|
+
export declare const INQUIRY_REQUEST_CATEGORIES: InquiryRequestCategory[];
|
|
4
|
+
export declare function inquiryCategoryLabel(category: InquiryRequestCategory, t: WidgetStrings): string;
|
|
5
|
+
export declare function inquiryCategoryOptions(t: WidgetStrings): {
|
|
6
|
+
value: InquiryRequestCategory;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const INQUIRY_REQUEST_CATEGORIES = [
|
|
2
|
+
'price_quote',
|
|
3
|
+
'product_help',
|
|
4
|
+
'service',
|
|
5
|
+
'other',
|
|
6
|
+
];
|
|
7
|
+
export function inquiryCategoryLabel(category, t) {
|
|
8
|
+
switch (category) {
|
|
9
|
+
case 'price_quote':
|
|
10
|
+
return t.requestCategoryPriceQuote;
|
|
11
|
+
case 'product_help':
|
|
12
|
+
return t.requestCategoryProductHelp;
|
|
13
|
+
case 'service':
|
|
14
|
+
return t.requestCategoryService;
|
|
15
|
+
case 'other':
|
|
16
|
+
return t.requestCategoryOther;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function inquiryCategoryOptions(t) {
|
|
20
|
+
return INQUIRY_REQUEST_CATEGORIES.map((value) => ({
|
|
21
|
+
value,
|
|
22
|
+
label: inquiryCategoryLabel(value, t),
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { InquiryFormValues } from '../types';
|
|
2
|
+
import type { WidgetFormId } from '../analytics/widgetTracking';
|
|
3
|
+
export type InquirySubmitPayload = {
|
|
4
|
+
name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
telephone: string;
|
|
7
|
+
product?: string;
|
|
8
|
+
dealer?: string;
|
|
9
|
+
dealerId?: string;
|
|
10
|
+
dealerEmail?: string;
|
|
11
|
+
salesRepresentative?: string;
|
|
12
|
+
market?: string;
|
|
13
|
+
domain?: string;
|
|
14
|
+
category?: string;
|
|
15
|
+
comment?: string;
|
|
16
|
+
formId?: WidgetFormId;
|
|
17
|
+
source: 'widget';
|
|
18
|
+
turnstileToken?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function inquiryFormValuesToApiPayload(values: InquiryFormValues, options: {
|
|
21
|
+
formId: WidgetFormId;
|
|
22
|
+
categoryLabel: string;
|
|
23
|
+
domain?: string;
|
|
24
|
+
}): InquirySubmitPayload;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function inquiryFormValuesToApiPayload(values, options) {
|
|
2
|
+
const payload = {
|
|
3
|
+
name: values.name.trim(),
|
|
4
|
+
email: values.email.trim(),
|
|
5
|
+
telephone: values.phone.trim(),
|
|
6
|
+
category: options.categoryLabel,
|
|
7
|
+
formId: options.formId,
|
|
8
|
+
source: 'widget',
|
|
9
|
+
};
|
|
10
|
+
const product = values.productName.trim();
|
|
11
|
+
if (product)
|
|
12
|
+
payload.product = product;
|
|
13
|
+
const dealer = values.dealerName.trim();
|
|
14
|
+
if (dealer)
|
|
15
|
+
payload.dealer = dealer;
|
|
16
|
+
const dealerId = values.dealerId?.trim();
|
|
17
|
+
if (dealerId)
|
|
18
|
+
payload.dealerId = dealerId;
|
|
19
|
+
const dealerEmail = values.dealerEmail?.trim();
|
|
20
|
+
if (dealerEmail)
|
|
21
|
+
payload.dealerEmail = dealerEmail;
|
|
22
|
+
const salesRepresentative = values.salesRepresentative?.trim();
|
|
23
|
+
if (salesRepresentative)
|
|
24
|
+
payload.salesRepresentative = salesRepresentative;
|
|
25
|
+
const market = values.market?.trim();
|
|
26
|
+
if (market)
|
|
27
|
+
payload.market = market.toUpperCase();
|
|
28
|
+
const domain = options.domain?.trim();
|
|
29
|
+
if (domain)
|
|
30
|
+
payload.domain = domain;
|
|
31
|
+
const comment = values.comment.trim();
|
|
32
|
+
if (comment)
|
|
33
|
+
payload.comment = comment;
|
|
34
|
+
return payload;
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** True when the warranty form should collect a US county field. */
|
|
2
|
+
export function isUsWarrantyMarket(market, locale) {
|
|
3
|
+
if (market?.trim().toUpperCase() === 'US')
|
|
4
|
+
return true;
|
|
5
|
+
const normalizedLocale = locale?.trim().toLowerCase();
|
|
6
|
+
if (!normalizedLocale)
|
|
7
|
+
return false;
|
|
8
|
+
return normalizedLocale === 'us' || normalizedLocale.endsWith('-us');
|
|
9
|
+
}
|