domain0 0.1.0 → 0.2.1
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/dist/contracts.cjs +44 -6
- package/dist/contracts.cjs.map +1 -1
- package/dist/contracts.d.cts +1 -1
- package/dist/contracts.d.mts +1 -1
- package/dist/contracts.mjs +44 -6
- package/dist/contracts.mjs.map +1 -1
- package/dist/{index-CtQn01os.d.cts → index-ykRjPldc.d.cts} +1043 -61
- package/dist/{index-CtQn01os.d.mts → index-ykRjPldc.d.mts} +1043 -61
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{sdk-BKtsupNk.d.cts → sdk-08-Y2mib.d.mts} +2 -2
- package/dist/{sdk-BHIxsxUT.mjs → sdk-CL6dA6kV.mjs} +65 -6
- package/dist/sdk-CL6dA6kV.mjs.map +1 -0
- package/dist/{sdk-C0q5dV-6.cjs → sdk-CwOXzusx.cjs} +65 -6
- package/dist/sdk-CwOXzusx.cjs.map +1 -0
- package/dist/{sdk-7CglngBt.d.mts → sdk-DSOUE93-.d.cts} +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.cts +3 -2
- package/dist/ui.d.mts +3 -2
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/dist/sdk-BHIxsxUT.mjs.map +0 -1
- package/dist/sdk-C0q5dV-6.cjs.map +0 -1
|
@@ -378,6 +378,13 @@ const domain0Styles = `
|
|
|
378
378
|
border-color: var(--domain0-border);
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
+
.domain0-button--text {
|
|
382
|
+
min-height: 2.75rem;
|
|
383
|
+
border-color: transparent;
|
|
384
|
+
background: transparent;
|
|
385
|
+
color: var(--domain0-link);
|
|
386
|
+
}
|
|
387
|
+
|
|
381
388
|
/* Destructive actions read as a bordered choice rather than a filled slab, so
|
|
382
389
|
the primary action stays the loudest thing in the dialog. */
|
|
383
390
|
.domain0-button--danger {
|
|
@@ -411,6 +418,11 @@ const domain0Styles = `
|
|
|
411
418
|
background: color-mix(in srgb, var(--domain0-border) 16%, transparent);
|
|
412
419
|
}
|
|
413
420
|
|
|
421
|
+
.domain0-button--text:hover {
|
|
422
|
+
border-color: transparent;
|
|
423
|
+
background: color-mix(in srgb, var(--domain0-link) 8%, transparent);
|
|
424
|
+
}
|
|
425
|
+
|
|
414
426
|
.domain0-button--danger:hover {
|
|
415
427
|
background: color-mix(in srgb, var(--domain0-danger) 12%, transparent);
|
|
416
428
|
}
|
|
@@ -799,6 +811,7 @@ const spanishMessages = {
|
|
|
799
811
|
dkimOpenGuide: (provider) => `Abrir la guía oficial de configuración de DKIM de ${provider}`,
|
|
800
812
|
cancelledDescription: (domain) => `Se canceló la conexión de ${domain}. No se aplicarán más cambios de DNS.`,
|
|
801
813
|
selectedProvider: (provider, support) => `${provider} seleccionado. ${support}`,
|
|
814
|
+
connectAnotherWay: "Conectar de otra manera",
|
|
802
815
|
currentState: (state) => `Esta conexión está actualmente ${state}. Actualice para cargar su estado más reciente.`,
|
|
803
816
|
refreshConnection: "Actualizar conexión",
|
|
804
817
|
domainConnectHeading: "Conectar mediante Domain Connect",
|
|
@@ -1056,6 +1069,7 @@ const frenchMessages = {
|
|
|
1056
1069
|
dkimOpenGuide: (provider) => `Ouvrir le guide officiel de configuration DKIM de ${provider}`,
|
|
1057
1070
|
cancelledDescription: (domain) => `La connexion de ${domain} a été annulée. Aucune autre modification DNS ne sera appliquée.`,
|
|
1058
1071
|
selectedProvider: (provider, support) => `${provider} sélectionné. ${support}`,
|
|
1072
|
+
connectAnotherWay: "Se connecter autrement",
|
|
1059
1073
|
currentState: (state) => `Cette connexion est actuellement ${state}. Actualisez pour charger son état le plus récent.`,
|
|
1060
1074
|
refreshConnection: "Actualiser la connexion",
|
|
1061
1075
|
domainConnectHeading: "Se connecter avec Domain Connect",
|
|
@@ -1313,6 +1327,7 @@ const brazilianPortugueseMessages = {
|
|
|
1313
1327
|
dkimOpenGuide: (provider) => `Abrir o guia oficial de configuração do DKIM do ${provider}`,
|
|
1314
1328
|
cancelledDescription: (domain) => `A conexão de ${domain} foi cancelada. Nenhuma outra alteração de DNS será aplicada.`,
|
|
1315
1329
|
selectedProvider: (provider, support) => `${provider} selecionado. ${support}`,
|
|
1330
|
+
connectAnotherWay: "Conectar de outra forma",
|
|
1316
1331
|
currentState: (state) => `Esta conexão está ${state}. Atualize para carregar o estado mais recente.`,
|
|
1317
1332
|
refreshConnection: "Atualizar conexão",
|
|
1318
1333
|
domainConnectHeading: "Conectar pelo Domain Connect",
|
|
@@ -1688,6 +1703,7 @@ const englishMessages = {
|
|
|
1688
1703
|
dkimOpenGuide: (provider) => `Open the official ${provider} DKIM setup guide`,
|
|
1689
1704
|
cancelledDescription: (domain) => `The connection for ${domain} was cancelled. No further DNS changes will be applied.`,
|
|
1690
1705
|
selectedProvider: (provider, support) => `${provider} selected. ${support}`,
|
|
1706
|
+
connectAnotherWay: "Connect another way",
|
|
1691
1707
|
currentState: (state) => `This connection is currently ${state}. Refresh to load its latest state.`,
|
|
1692
1708
|
refreshConnection: "Refresh connection",
|
|
1693
1709
|
domainConnectHeading: "Connect through Domain Connect",
|
|
@@ -1943,6 +1959,7 @@ const germanMessages = {
|
|
|
1943
1959
|
dkimOpenGuide: (provider) => `Offizielle DKIM-Einrichtungsanleitung von ${provider} öffnen`,
|
|
1944
1960
|
cancelledDescription: (domain) => `Die Verbindung für ${domain} wurde abgebrochen. Es werden keine weiteren DNS-Änderungen angewendet.`,
|
|
1945
1961
|
selectedProvider: (provider, support) => `${provider} ausgewählt. ${support}`,
|
|
1962
|
+
connectAnotherWay: "Auf andere Weise verbinden",
|
|
1946
1963
|
currentState: (state) => `Diese Verbindung ist derzeit ${state}. Aktualisieren Sie, um den neuesten Status zu laden.`,
|
|
1947
1964
|
refreshConnection: "Verbindung aktualisieren",
|
|
1948
1965
|
domainConnectHeading: "Über Domain Connect verbinden",
|
|
@@ -2363,6 +2380,8 @@ function mountDomain0Connect(options) {
|
|
|
2363
2380
|
let connection;
|
|
2364
2381
|
let authorizationHandoff;
|
|
2365
2382
|
let domainConnectHandoffURL;
|
|
2383
|
+
let authorizationProviderId;
|
|
2384
|
+
let authorizationMethodIndex = 0;
|
|
2366
2385
|
let currentStep;
|
|
2367
2386
|
let lastConnectionRevision;
|
|
2368
2387
|
let successEmitted = false;
|
|
@@ -2422,6 +2441,8 @@ function mountDomain0Connect(options) {
|
|
|
2422
2441
|
dkimGuidance = void 0;
|
|
2423
2442
|
dkimGuidanceLoading = false;
|
|
2424
2443
|
dkimGuidanceUnavailable = false;
|
|
2444
|
+
authorizationProviderId = void 0;
|
|
2445
|
+
authorizationMethodIndex = 0;
|
|
2425
2446
|
if (presentation === "modal") returnFocusTo = currentFocusTarget();
|
|
2426
2447
|
showSurface();
|
|
2427
2448
|
if (presentation === "modal") heading.focus();
|
|
@@ -2732,8 +2753,6 @@ function mountDomain0Connect(options) {
|
|
|
2732
2753
|
switch (current.state) {
|
|
2733
2754
|
case "provider_selected":
|
|
2734
2755
|
renderAuthorizationChoices(provider);
|
|
2735
|
-
if (whiteLabel.customProperties.providerLogin.gotoManualLink.disable) renderManualSetupUnavailable();
|
|
2736
|
-
else renderManualStart();
|
|
2737
2756
|
return;
|
|
2738
2757
|
case "authorization_pending":
|
|
2739
2758
|
if (provider.availableAuthorizationMethods.includes("oauth2_pkce")) {
|
|
@@ -2819,9 +2838,49 @@ function mountDomain0Connect(options) {
|
|
|
2819
2838
|
target.focus();
|
|
2820
2839
|
}
|
|
2821
2840
|
function renderAuthorizationChoices(provider) {
|
|
2822
|
-
if (provider.
|
|
2823
|
-
|
|
2824
|
-
|
|
2841
|
+
if (authorizationProviderId !== provider.id) {
|
|
2842
|
+
authorizationProviderId = provider.id;
|
|
2843
|
+
authorizationMethodIndex = 0;
|
|
2844
|
+
}
|
|
2845
|
+
const methods = provider.availableAuthorizationMethods;
|
|
2846
|
+
const manualDisabled = whiteLabel.customProperties.providerLogin.gotoManualLink.disable;
|
|
2847
|
+
const selectedMethod = methods[authorizationMethodIndex];
|
|
2848
|
+
if (selectedMethod === void 0) {
|
|
2849
|
+
if (manualDisabled) renderManualSetupUnavailable();
|
|
2850
|
+
else renderManualStart();
|
|
2851
|
+
return;
|
|
2852
|
+
}
|
|
2853
|
+
if (selectedMethod === "manual") {
|
|
2854
|
+
if (manualDisabled) renderManualSetupUnavailable();
|
|
2855
|
+
else renderManualStart();
|
|
2856
|
+
return;
|
|
2857
|
+
}
|
|
2858
|
+
renderAuthorizationMethod(provider, selectedMethod);
|
|
2859
|
+
if (!(authorizationMethodIndex + 1 < methods.length) && manualDisabled) return;
|
|
2860
|
+
const alternative = actionButton(messages.connectAnotherWay, async (button) => {
|
|
2861
|
+
authorizationMethodIndex += 1;
|
|
2862
|
+
render();
|
|
2863
|
+
button.disabled = false;
|
|
2864
|
+
});
|
|
2865
|
+
alternative.classList.add("domain0-button--text");
|
|
2866
|
+
content.append(alternative);
|
|
2867
|
+
}
|
|
2868
|
+
function renderAuthorizationMethod(provider, method) {
|
|
2869
|
+
switch (method) {
|
|
2870
|
+
case "oauth2_pkce":
|
|
2871
|
+
renderOAuthAuthorization(provider);
|
|
2872
|
+
return;
|
|
2873
|
+
case "domain_connect":
|
|
2874
|
+
renderDomainConnect(provider);
|
|
2875
|
+
return;
|
|
2876
|
+
case "api_token":
|
|
2877
|
+
case "api_key":
|
|
2878
|
+
case "basic":
|
|
2879
|
+
case "session":
|
|
2880
|
+
renderCredentialAuthorization(provider);
|
|
2881
|
+
return;
|
|
2882
|
+
case "manual": renderManualStart();
|
|
2883
|
+
}
|
|
2825
2884
|
}
|
|
2826
2885
|
function renderDomainConnect(provider) {
|
|
2827
2886
|
const heading = element(document, "h3", "domain0-subheading");
|
|
@@ -4071,4 +4130,4 @@ Object.defineProperty(exports, "mountDomain0SharedFlow", {
|
|
|
4071
4130
|
}
|
|
4072
4131
|
});
|
|
4073
4132
|
|
|
4074
|
-
//# sourceMappingURL=sdk-
|
|
4133
|
+
//# sourceMappingURL=sdk-CwOXzusx.cjs.map
|