@thunderid/vue 0.10.1 → 0.11.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/cjs/index.cjs
CHANGED
|
@@ -5816,7 +5816,7 @@ const createAuthComponentFromFlow = (component, formValues, touchedFields, formE
|
|
|
5816
5816
|
approved: !isDeny,
|
|
5817
5817
|
name: e.name
|
|
5818
5818
|
})), ...p.optional.map((e) => ({
|
|
5819
|
-
approved: isDeny
|
|
5819
|
+
approved: !isDeny && formValues[getConsentOptionalKey(p.purposeId, e.name)] === "true",
|
|
5820
5820
|
name: e.name
|
|
5821
5821
|
}))],
|
|
5822
5822
|
purposeName: p.purposeName ?? ""
|
|
@@ -6503,7 +6503,7 @@ const handlePasskeyRegistration = async (challengeData) => {
|
|
|
6503
6503
|
return JSON.stringify(registrationResponse);
|
|
6504
6504
|
} catch (error) {
|
|
6505
6505
|
if (error instanceof __thunderid_browser.ThunderIDRuntimeError) throw error;
|
|
6506
|
-
if (error instanceof Error) throw new __thunderid_browser.ThunderIDRuntimeError(
|
|
6506
|
+
if (error instanceof Error) throw new __thunderid_browser.ThunderIDRuntimeError("Passkey registration failed. Please try again.", "browser-webauthn-registration-error", "browser", `WebAuthn registration failed with error: ${error.name}: ${error.message}`);
|
|
6507
6507
|
throw new __thunderid_browser.ThunderIDRuntimeError("Passkey registration failed due to an unexpected error.", "browser-webauthn-unexpected-error", "browser", "An unexpected error occurred during WebAuthn registration.");
|
|
6508
6508
|
}
|
|
6509
6509
|
};
|
|
@@ -6543,7 +6543,7 @@ const handlePasskeyAuthentication = async (challengeData) => {
|
|
|
6543
6543
|
return JSON.stringify(authenticationResponse);
|
|
6544
6544
|
} catch (error) {
|
|
6545
6545
|
if (error instanceof __thunderid_browser.ThunderIDRuntimeError) throw error;
|
|
6546
|
-
if (error instanceof Error) throw new __thunderid_browser.ThunderIDRuntimeError(
|
|
6546
|
+
if (error instanceof Error) throw new __thunderid_browser.ThunderIDRuntimeError("Passkey authentication failed. Please try again.", "browser-webauthn-authentication-error", "browser", `WebAuthn authentication failed with error: ${error.name}: ${error.message}`);
|
|
6547
6547
|
throw new __thunderid_browser.ThunderIDRuntimeError("Passkey authentication failed due to an unexpected error.", "browser-webauthn-unexpected-error", "browser", "An unexpected error occurred during WebAuthn authentication.");
|
|
6548
6548
|
}
|
|
6549
6549
|
};
|
|
@@ -9665,8 +9665,7 @@ var LanguageSwitcher_default = LanguageSwitcher;
|
|
|
9665
9665
|
*/
|
|
9666
9666
|
const buildThemeConfigFromFlowMeta = (flowMetaTheme, colorScheme) => {
|
|
9667
9667
|
const scheme = flowMetaTheme.colorSchemes?.[colorScheme];
|
|
9668
|
-
const
|
|
9669
|
-
const borderRadiusStr = borderRadius !== void 0 ? `${borderRadius}px` : void 0;
|
|
9668
|
+
const borderRadiusConfig = (0, __thunderid_browser.normalizeBorderRadius)(flowMetaTheme.shape?.borderRadius);
|
|
9670
9669
|
let colors;
|
|
9671
9670
|
if (scheme?.palette) {
|
|
9672
9671
|
colors = {};
|
|
@@ -9681,12 +9680,9 @@ const buildThemeConfigFromFlowMeta = (flowMetaTheme, colorScheme) => {
|
|
|
9681
9680
|
}
|
|
9682
9681
|
}
|
|
9683
9682
|
return {
|
|
9683
|
+
...flowMetaTheme,
|
|
9684
9684
|
...flowMetaTheme.direction ? { direction: flowMetaTheme.direction } : {},
|
|
9685
|
-
...
|
|
9686
|
-
large: borderRadiusStr,
|
|
9687
|
-
medium: borderRadiusStr,
|
|
9688
|
-
small: borderRadiusStr
|
|
9689
|
-
} } : {},
|
|
9685
|
+
...borderRadiusConfig ? { borderRadius: borderRadiusConfig } : {},
|
|
9690
9686
|
...colors && Object.keys(colors).length > 0 ? { colors } : {},
|
|
9691
9687
|
...flowMetaTheme.typography?.fontFamily ? { typography: { fontFamily: flowMetaTheme.typography.fontFamily } } : {}
|
|
9692
9688
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_THEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowComponentType as EmbeddedFlowComponentType$1, EmbeddedFlowEventType, EmbeddedFlowEventType as EmbeddedFlowEventType$1, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowStatus as EmbeddedSignInFlowStatus$1, EmbeddedSignInFlowType, EmbeddedSignInFlowType as EmbeddedSignInFlowType$1, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowStatus as EmbeddedSignUpFlowStatus$1, EmbeddedSignUpFlowType, FetchHttpClient, FieldType, FieldType as FieldType$1, FlowMetaType, ThunderIDBrowserClient, ThunderIDError, ThunderIDRuntimeError, ThunderIDRuntimeError as ThunderIDRuntimeError$1, TranslationBundleConstants, arrayBufferToBase64url, base64urlToArrayBuffer, createClassObserver, createClassObserver as createClassObserver$1, createMediaQueryListener, createMediaQueryListener as createMediaQueryListener$1, createPackageComponentLogger, createPackageLogger, createTheme, deepMerge, detectThemeMode, detectThemeMode as detectThemeMode$1, executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow, extractEmojiFromUri, extractUserClaimsFromIdToken, generateFlattenedUserProfile, get, getActiveTheme, getDefaultI18nBundles, getFlowMeta, getUsersMe, getVendorPrefix, handleWebAuthnAuthentication, hasAuthParamsInUrl, hasAuthParamsInUrl as hasAuthParamsInUrl$1, hasCalledForThisInstanceInUrl, http, isEmojiUri, isEmpty, navigate, navigate as navigate$1, normalizeTranslations, resolveFlowTemplateLiterals, resolveLogoUri, updateMeProfile, withVendorCSSClassPrefix } from "@thunderid/browser";
|
|
1
|
+
import { DEFAULT_THEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowComponentType as EmbeddedFlowComponentType$1, EmbeddedFlowEventType, EmbeddedFlowEventType as EmbeddedFlowEventType$1, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowStatus as EmbeddedSignInFlowStatus$1, EmbeddedSignInFlowType, EmbeddedSignInFlowType as EmbeddedSignInFlowType$1, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowStatus as EmbeddedSignUpFlowStatus$1, EmbeddedSignUpFlowType, FetchHttpClient, FieldType, FieldType as FieldType$1, FlowMetaType, ThunderIDBrowserClient, ThunderIDError, ThunderIDRuntimeError, ThunderIDRuntimeError as ThunderIDRuntimeError$1, TranslationBundleConstants, arrayBufferToBase64url, base64urlToArrayBuffer, createClassObserver, createClassObserver as createClassObserver$1, createMediaQueryListener, createMediaQueryListener as createMediaQueryListener$1, createPackageComponentLogger, createPackageLogger, createTheme, deepMerge, detectThemeMode, detectThemeMode as detectThemeMode$1, executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow, extractEmojiFromUri, extractUserClaimsFromIdToken, generateFlattenedUserProfile, get, getActiveTheme, getDefaultI18nBundles, getFlowMeta, getUsersMe, getVendorPrefix, handleWebAuthnAuthentication, hasAuthParamsInUrl, hasAuthParamsInUrl as hasAuthParamsInUrl$1, hasCalledForThisInstanceInUrl, http, isEmojiUri, isEmpty, navigate, navigate as navigate$1, normalizeBorderRadius, normalizeTranslations, resolveFlowTemplateLiterals, resolveLogoUri, updateMeProfile, withVendorCSSClassPrefix } from "@thunderid/browser";
|
|
2
2
|
import { Fragment, computed, defineComponent, h, inject, nextTick, onBeforeUnmount, onMounted, onUnmounted, provide, readonly, ref, shallowReadonly, shallowRef, watch } from "vue";
|
|
3
3
|
import DOMPurify from "dompurify";
|
|
4
4
|
|
|
@@ -5790,7 +5790,7 @@ const createAuthComponentFromFlow = (component, formValues, touchedFields, formE
|
|
|
5790
5790
|
approved: !isDeny,
|
|
5791
5791
|
name: e.name
|
|
5792
5792
|
})), ...p.optional.map((e) => ({
|
|
5793
|
-
approved: isDeny
|
|
5793
|
+
approved: !isDeny && formValues[getConsentOptionalKey(p.purposeId, e.name)] === "true",
|
|
5794
5794
|
name: e.name
|
|
5795
5795
|
}))],
|
|
5796
5796
|
purposeName: p.purposeName ?? ""
|
|
@@ -6477,7 +6477,7 @@ const handlePasskeyRegistration = async (challengeData) => {
|
|
|
6477
6477
|
return JSON.stringify(registrationResponse);
|
|
6478
6478
|
} catch (error) {
|
|
6479
6479
|
if (error instanceof ThunderIDRuntimeError$1) throw error;
|
|
6480
|
-
if (error instanceof Error) throw new ThunderIDRuntimeError$1(
|
|
6480
|
+
if (error instanceof Error) throw new ThunderIDRuntimeError$1("Passkey registration failed. Please try again.", "browser-webauthn-registration-error", "browser", `WebAuthn registration failed with error: ${error.name}: ${error.message}`);
|
|
6481
6481
|
throw new ThunderIDRuntimeError$1("Passkey registration failed due to an unexpected error.", "browser-webauthn-unexpected-error", "browser", "An unexpected error occurred during WebAuthn registration.");
|
|
6482
6482
|
}
|
|
6483
6483
|
};
|
|
@@ -6517,7 +6517,7 @@ const handlePasskeyAuthentication = async (challengeData) => {
|
|
|
6517
6517
|
return JSON.stringify(authenticationResponse);
|
|
6518
6518
|
} catch (error) {
|
|
6519
6519
|
if (error instanceof ThunderIDRuntimeError$1) throw error;
|
|
6520
|
-
if (error instanceof Error) throw new ThunderIDRuntimeError$1(
|
|
6520
|
+
if (error instanceof Error) throw new ThunderIDRuntimeError$1("Passkey authentication failed. Please try again.", "browser-webauthn-authentication-error", "browser", `WebAuthn authentication failed with error: ${error.name}: ${error.message}`);
|
|
6521
6521
|
throw new ThunderIDRuntimeError$1("Passkey authentication failed due to an unexpected error.", "browser-webauthn-unexpected-error", "browser", "An unexpected error occurred during WebAuthn authentication.");
|
|
6522
6522
|
}
|
|
6523
6523
|
};
|
|
@@ -9639,8 +9639,7 @@ var LanguageSwitcher_default = LanguageSwitcher;
|
|
|
9639
9639
|
*/
|
|
9640
9640
|
const buildThemeConfigFromFlowMeta = (flowMetaTheme, colorScheme) => {
|
|
9641
9641
|
const scheme = flowMetaTheme.colorSchemes?.[colorScheme];
|
|
9642
|
-
const
|
|
9643
|
-
const borderRadiusStr = borderRadius !== void 0 ? `${borderRadius}px` : void 0;
|
|
9642
|
+
const borderRadiusConfig = normalizeBorderRadius(flowMetaTheme.shape?.borderRadius);
|
|
9644
9643
|
let colors;
|
|
9645
9644
|
if (scheme?.palette) {
|
|
9646
9645
|
colors = {};
|
|
@@ -9655,12 +9654,9 @@ const buildThemeConfigFromFlowMeta = (flowMetaTheme, colorScheme) => {
|
|
|
9655
9654
|
}
|
|
9656
9655
|
}
|
|
9657
9656
|
return {
|
|
9657
|
+
...flowMetaTheme,
|
|
9658
9658
|
...flowMetaTheme.direction ? { direction: flowMetaTheme.direction } : {},
|
|
9659
|
-
...
|
|
9660
|
-
large: borderRadiusStr,
|
|
9661
|
-
medium: borderRadiusStr,
|
|
9662
|
-
small: borderRadiusStr
|
|
9663
|
-
} } : {},
|
|
9659
|
+
...borderRadiusConfig ? { borderRadius: borderRadiusConfig } : {},
|
|
9664
9660
|
...colors && Object.keys(colors).length > 0 ? { colors } : {},
|
|
9665
9661
|
...flowMetaTheme.typography?.fontFamily ? { typography: { fontFamily: flowMetaTheme.typography.fontFamily } } : {}
|
|
9666
9662
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildThemeConfigFromFlowMeta.d.ts","sourceRoot":"","sources":["../../src/utils/buildThemeConfigFromFlowMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"buildThemeConfigFromFlowMeta.d.ts","sourceRoot":"","sources":["../../src/utils/buildThemeConfigFromFlowMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,aAAa,EAEb,gBAAgB,EAChB,WAAW,EAEZ,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AACH,QAAA,MAAM,4BAA4B,GAChC,eAAe,aAAa,EAC5B,aAAa,OAAO,GAAG,MAAM,KAC5B,gBAAgB,CAAC,WAAW,CA0C9B,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thunderid/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Vue SDK for ThunderID",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"thunderid",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"dompurify": "3.4.11",
|
|
60
60
|
"tslib": "2.8.1",
|
|
61
|
-
"@thunderid/browser": "^0.
|
|
61
|
+
"@thunderid/browser": "^0.11.1"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|