Merge branch '1.5.x' into fix-textmagic-tooltip

This commit is contained in:
Torsten Dittmann authored and GitHub committed 2024-02-08 09:45:52 +01:00
commit 28d2a5072e
3 files changed
+47 -23

No files matched your search

+2 -1
View File
@@ -23,6 +23,7 @@
export let maxlength: number = null;
export let tooltip: string = null;
export let isMultiple = false;
export let isPopoverDefined = true;
let element: HTMLInputElement;
let error: string;
@@ -76,7 +77,7 @@
<svelte:component this={wrapper} {fullWidth}>
{#if label}
<Label {required} {hideRequired} {tooltip} {optionalText} hide={!showLabel} for={id}>
{label}{#if $$slots.popover}
{label}{#if $$slots.popover && isPopoverDefined}
<Drop bind:show display="inline-block">
<!-- TODO: make unclicked icon greyed out and hover and clicked filled -->
&nbsp;<button
@@ -20,11 +20,12 @@ type ProvidersMap = {
[key in Providers]?: {
imageIcon: string;
title: string;
link: string;
description: string;
configure: {
label: string;
name: string;
type: 'text' | 'phone' | 'email' | 'domain' | 'file' | 'switch';
type: 'text' | 'password' | 'phone' | 'email' | 'domain' | 'file' | 'switch';
placeholder?: string;
description?: string;
popover?: string[];
@@ -44,6 +45,7 @@ export const providers: ProvidersMap = {
[Providers.FCM]: {
imageIcon: 'firebase',
title: 'FCM',
link: 'https://firebase.google.com/',
description: 'Firebase Cloud Messaging',
configure: [
{
@@ -53,7 +55,7 @@ export const providers: ProvidersMap = {
allowedFileExtensions: ['json'],
placeholder: 'Enter service account JSON',
popover: [
'<b>How to get the FCM service account JSON?</b>',
'<b>How to get the <a style="text-decoration:underline" href="https://firebase.google.com" target="_blank">FCM</a> service account JSON?</b>',
'Head to <b>Project settings -> Service accounts -> Generate new private key.</b>',
'Generating the new key will result in the download of a JSON file.'
]
@@ -63,6 +65,7 @@ export const providers: ProvidersMap = {
[Providers.APNS]: {
imageIcon: 'apple',
title: 'APNS',
link: 'https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2F&rv=1',
description: 'Apple Push Notification Service',
configure: [
{
@@ -72,7 +75,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter team ID',
popover: [
'<b>How to get the team ID?</b>',
'Head to <b>Apple Developer Member Center -> Membership details -> Team ID.</b>'
'Head to <b><a style="text-decoration:underline" href="https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2F&rv=1" target="_blank">Apple Developer Member Center</a> -> Membership details -> Team ID.</b>'
]
},
{
@@ -82,7 +85,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter bundle ID',
popover: [
'<b>How to get the bundle ID?</b>',
'Head to <b>Apple Developer Member Center -> Certificates, Identifiers & Profiles -> Identifiers.</b>',
'Head to <b><a style="text-decoration:underline" href="https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2F&rv=1" target="_blank">Apple Developer Member Center</a> -> Certificates, Identifiers & Profiles -> Identifiers.</b>',
`<a
href="/images/apns-bundle-id.png"
class="file-preview is-with-image"
@@ -111,7 +114,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter key ID',
popover: [
'<b>How to get the auth key ID?</b>',
'Head to <b>Apple Developer Member Center -> Certificates, Identifiers & Profiles -> Keys.</b>',
'Head to <b><a style="text-decoration:underline" href="https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2F&rv=1" target="_blank">Apple Developer Member Center</a> -> Certificates, Identifiers & Profiles -> Keys.</b>',
'Click on your key to view details.'
]
},
@@ -122,7 +125,7 @@ export const providers: ProvidersMap = {
allowedFileExtensions: ['p8'],
popover: [
'<b>How to get the authentication key?</b>',
'Head to <b>Apple Developer Member Center</b> (under Program resources) <b>-> Certificates, Identifiers & Profiles -> Keys.</b>',
'Head to <b><a style="text-decoration:underline" href="https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2F&rv=1" target="_blank">Apple Developer Member Center</a></b> (under Program resources) <b>-> Certificates, Identifiers & Profiles -> Keys.</b>',
'Create a key and give it a name. Enable the Apple Push Notifications service (APNS), and register your key.'
]
}
@@ -143,6 +146,7 @@ export const providers: ProvidersMap = {
[Providers.Mailgun]: {
imageIcon: 'mailgun',
title: 'Mailgun',
link: 'https://signup.mailgun.com/new/signup',
description: '',
configure: [
{
@@ -152,7 +156,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter API key',
popover: [
'<b>How to get the API key?</b>',
'Create an account in Mailgun.',
'Create an account in <a style="text-decoration:underline" href="https://signup.mailgun.com/new/signup" target="_blank">Mailgun</a>.',
'Head to <b>Profile -> API Security -> Add new key.</b>'
]
},
@@ -164,7 +168,7 @@ export const providers: ProvidersMap = {
popover: [
'<b>How to create a domain?</b>',
'Head to <b>Sending -> Domains -> Add new domain.</b>',
'Follow <b>Mailgun instructions</b> to verify the domain name.'
'Follow <b><a style="text-decoration:underline" href="https://signup.mailgun.com/new/signup" target="_blank">Mailgun</a> instructions</b> to verify the domain name.'
]
},
{
@@ -203,6 +207,7 @@ export const providers: ProvidersMap = {
[Providers.Sendgrid]: {
imageIcon: 'sendgrid',
title: 'Sendgrid',
link: 'https://login.sendgrid.com/login/identifier?_gl=1*3vtcwz*_ga*MTMzODgwNDQ5OC4xNzA2MjAxMDUz*_ga_8W5LR442LD*MTcwNjIwMTA1My4xLjAuMTcwNjIwMTA1My4wLjAuMA..',
description: '',
configure: [
{
@@ -212,8 +217,8 @@ export const providers: ProvidersMap = {
placeholder: 'Enter API key',
popover: [
'<b>How to get the API key?</b>',
'Create an account in Mailgun.',
'Head to <b>Profile -> API Security -> Add new key.</b>'
'Create an account in <a style="text-decoration:underline" href="https://login.sendgrid.com/login/identifier?_gl=1*3vtcwz*_ga*MTMzODgwNDQ5OC4xNzA2MjAxMDUz*_ga_8W5LR442LD*MTcwNjIwMTA1My4xLjAuMTcwNjIwMTA1My4wLjAuMA.." target="_blank">Sendgrid</a>.',
'Head to <b>Settings -> API Keys -> Create API key.</b>'
]
},
{
@@ -253,6 +258,7 @@ export const providers: ProvidersMap = {
[Providers.Twilio]: {
imageIcon: 'twilio',
title: 'Twilio',
link: 'https://login.twilio.com/u/signup?state=hKFo2SBaQktjdzI0ZHdKdm44QUc5YzBRXzlNMmlyTExkRWVTTaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIHpwNUVrWDJzeFRJdUczVU5LTk16X0FHWEQ3dHU0S3hko2NpZNkgTW05M1lTTDVSclpmNzdobUlKZFI3QktZYjZPOXV1cks',
description: '',
configure: [
{
@@ -262,7 +268,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter Account SID',
popover: [
'<b>How to get the Account SID?</b>',
'Head to <b>Twilio console -> Account info -> Account SID.</b>'
'Head to <b><a style="text-decoration:underline" href="https://login.twilio.com/u/signup?state=hKFo2SBaQktjdzI0ZHdKdm44QUc5YzBRXzlNMmlyTExkRWVTTaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIHpwNUVrWDJzeFRJdUczVU5LTk16X0FHWEQ3dHU0S3hko2NpZNkgTW05M1lTTDVSclpmNzdobUlKZFI3QktZYjZPOXV1cks" target="_blank">Twilio</a> console -> Account info -> Account SID.</b>'
]
},
{
@@ -272,7 +278,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter Auth token',
popover: [
'<b>How to get the Auth token?</b>',
'Head to <b>Twilio console -> Account info -> Auth Token.</b>'
'Head to <b><a style="text-decoration:underline" href="https://login.twilio.com/u/signup?state=hKFo2SBaQktjdzI0ZHdKdm44QUc5YzBRXzlNMmlyTExkRWVTTaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIHpwNUVrWDJzeFRJdUczVU5LTk16X0FHWEQ3dHU0S3hko2NpZNkgTW05M1lTTDVSclpmNzdobUlKZFI3QktZYjZPOXV1cks" target="_blank">Twilio</a> console -> Account info -> Auth Token.</b>'
]
},
{
@@ -282,8 +288,8 @@ export const providers: ProvidersMap = {
placeholder: 'Enter phone',
popover: [
'<b>How to get sender number?</b>',
'Head to <b>Twilio console -> Account info -> My Twilio phone number.</b>',
'If you have multiple Twilio phone numbers, you can select one as the default number.'
'Head to <b><a style="text-decoration:underline" href="https://login.twilio.com/u/signup?state=hKFo2SBaQktjdzI0ZHdKdm44QUc5YzBRXzlNMmlyTExkRWVTTaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIHpwNUVrWDJzeFRJdUczVU5LTk16X0FHWEQ3dHU0S3hko2NpZNkgTW05M1lTTDVSclpmNzdobUlKZFI3QktZYjZPOXV1cks" target="_blank">Twilio</a> console -> Account info -> My Twilio phone number.</b>',
'If you have multiple <a style="text-decoration:underline" href="https://login.twilio.com/u/signup?state=hKFo2SBaQktjdzI0ZHdKdm44QUc5YzBRXzlNMmlyTExkRWVTTaFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIHpwNUVrWDJzeFRJdUczVU5LTk16X0FHWEQ3dHU0S3hko2NpZNkgTW05M1lTTDVSclpmNzdobUlKZFI3QktZYjZPOXV1cks" target="_blank">Twilio</a> phone numbers, you can select one as the default number.'
]
}
]
@@ -291,6 +297,7 @@ export const providers: ProvidersMap = {
[Providers.Msg91]: {
imageIcon: 'msg91',
title: 'MSG91',
link: 'https://control.msg91.com/signin/',
description: '',
configure: [
{
@@ -300,7 +307,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter auth key',
popover: [
'<b>How to get the Auth key?</b>',
'Create an account in MSG91.',
'Create an account in <a style="text-decoration:underline" href="https://control.msg91.com/signin/" target="_blank">MSG91</a>.',
'Click to open the <b>Username dropdown -> Authkey -> Verify your mobile number -> Create Authkey.</b>'
]
},
@@ -311,7 +318,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter sender ID',
popover: [
'<b>How to create a Sender ID?</b>',
'Head to <b>MSG91 dashboard -> SMS -> Sender ID -> Create sender ID.</b>'
'Head to <b><a style="text-decoration:underline" href="https://control.msg91.com/signin/" target="_blank">MSG91</a> dashboard -> SMS -> Sender ID -> Create sender ID.</b>'
]
},
{
@@ -325,6 +332,7 @@ export const providers: ProvidersMap = {
[Providers.Telesign]: {
imageIcon: 'telesign',
title: 'Telesign',
link: 'https://www.telesign.com/',
description: '',
configure: [
{
@@ -336,7 +344,7 @@ export const providers: ProvidersMap = {
{
label: 'Password',
name: 'password',
type: 'text',
type: 'password',
placeholder: 'Enter password'
},
{
@@ -350,6 +358,7 @@ export const providers: ProvidersMap = {
[Providers.Textmagic]: {
imageIcon: 'textmagic',
title: 'TextMagic',
link: 'https://app.textmagic.com/login',
description: '',
configure: [
{
@@ -359,8 +368,8 @@ export const providers: ProvidersMap = {
placeholder: 'Enter API key',
popover: [
'<b>How to get the API key?</b>',
'Create an account in TextMagic.',
'Head to <b>TextMagic dashboard -> API -> Add new API key.</b>'
'Create an account in <a style="text-decoration:underline" href="https://app.textmagic.com/login" target="_blank">TextMagic</a>.',
'Head to <b><a style="text-decoration:underline" href="https://app.textmagic.com/login" target="_blank">TextMagic</a> dashboard -> API Settings -> Add new API key.</b>'
]
},
{
@@ -380,6 +389,7 @@ export const providers: ProvidersMap = {
[Providers.Vonage]: {
imageIcon: 'vonage',
title: 'Vonage',
link: 'https://www.vonage.com/?bypassgeoloc=true',
description: '',
configure: [
{
@@ -390,7 +400,7 @@ export const providers: ProvidersMap = {
popover: [
'<b>How to get the API key?</b>',
'Create an account in Vonage.',
'Head to <b>Vonage dashboard and copy the API key.</b>'
'Head to <b><a style="text-decoration:underline" href="https://www.vonage.com/?bypassgeoloc=true" blank="_target">Vonage</a> dashboard and copy the API key.</b>'
]
},
{
@@ -400,7 +410,7 @@ export const providers: ProvidersMap = {
placeholder: 'Enter API secret',
popover: [
'<b>How to get the API secret?</b>',
'Head to <b>Vonage dashboard and copy the API secret.</b>'
'Head to <b><a style="text-decoration:underline" href="https://www.vonage.com/?bypassgeoloc=true" target="_blank">Vonage</a> dashboard and copy the API secret.</b>'
]
},
{
@@ -5,8 +5,10 @@
InputEmail,
InputFile,
InputSwitch,
InputText
InputText,
InputPassword
} from '$lib/elements/forms';
import InputPhone from '$lib/elements/forms/inputPhone.svelte';
import { WizardStep } from '$lib/layout';
import { onMount } from 'svelte';
@@ -56,11 +58,22 @@
id={input.name}
label={input.label}
placeholder={input.placeholder}
isPopoverDefined={input.popover !== undefined}
bind:value={$providerParams[$provider][input.name]}>
<svelte:fragment slot="popover">
{@html input.popover?.join('<br/><br/>')}
</svelte:fragment>
</InputText>
{:else if input.type === 'password'}
<InputPassword
id={input.name}
label={input.label}
placeholder={input.placeholder}
bind:value={$providerParams[$provider][input.name]}>
<svelte:fragment slot="popover">
{@html input.popover?.join('<br/><br/>')}
</svelte:fragment>
</InputPassword>
{:else if input.type === 'email'}
<InputEmail
id={input.name}