@vc-shell/framework 1.0.298 → 1.0.301

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useExternalProvider.d.ts","sourceRoot":"","sources":["../../../../shared/components/sign-in/useExternalProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAwB,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE9F,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,GAAG,CAAC;QAAE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IACpD,MAAM,EAAE,CAAC,kBAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,OAAO,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,MAAM,OAAO,CAAC,0BAA0B,EAAE,GAAG,SAAS,CAAC,CAAC;CACvE;AAID,eAAO,MAAM,mBAAmB,QAAO,oBAgFtC,CAAC"}
1
+ {"version":3,"file":"useExternalProvider.d.ts","sourceRoot":"","sources":["../../../../shared/components/sign-in/useExternalProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAwB,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE9F,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,GAAG,CAAC;QAAE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IACpD,MAAM,EAAE,CAAC,kBAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,OAAO,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,MAAM,OAAO,CAAC,0BAA0B,EAAE,GAAG,SAAS,CAAC,CAAC;CACvE;AAID,eAAO,MAAM,mBAAmB,QAAO,oBAuFtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.298",
3
+ "version": "1.0.301",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -61,9 +61,9 @@
61
61
  "devDependencies": {
62
62
  "@types/dompurify": "^3.0.5",
63
63
  "@types/quill": "^2.0.14",
64
- "@vc-shell/api-client-generator": "^1.0.298",
65
- "@vc-shell/config-generator": "^1.0.298",
66
- "@vc-shell/ts-config": "^1.0.298",
64
+ "@vc-shell/api-client-generator": "^1.0.301",
65
+ "@vc-shell/config-generator": "^1.0.301",
66
+ "@vc-shell/ts-config": "^1.0.301",
67
67
  "@vitejs/plugin-vue": "5.0.3",
68
68
  "cypress-signalr-mock": "^1.5.0",
69
69
  "sass": "^1.69.6",
@@ -29,44 +29,51 @@ export const useExternalProvider = (): IUseExternalProvider => {
29
29
 
30
30
  async function externalSignIn(authenticationType: string, oidcUrl: string) {
31
31
  try {
32
- let url_ = window.location.origin + "/externalsignin?";
33
- const returnUrl = window.location.pathname ?? "/";
32
+ const origin = window.location.origin;
33
+ const finalReturnUrl = window.location.pathname ?? getReturnUrlValue() ?? "/";
34
+
35
+ if (!authenticationType) {
36
+ throw new Error("The parameter 'authenticationType' cannot be null or undefined.");
37
+ }
34
38
 
35
- const signInData = {
36
- providerType: authenticationType,
37
- };
39
+ // const oidcUrlObject = new URL(oidcUrl, origin);
40
+ // const callbackUrl = new URL("/auth/callback", origin);
41
+ const url = new URL("/externalsignin", origin);
38
42
 
39
- externalSignInStorage.value = signInData;
43
+ // Set query parameters
44
+ // callbackUrl.searchParams.set("returnUrl", finalReturnUrl);
45
+ url.searchParams.set("authenticationType", authenticationType);
46
+ // url.searchParams.set("callbackUrl", callbackUrl.href);
47
+ url.searchParams.set("returnUrl", finalReturnUrl);
40
48
 
41
- if (authenticationType === null) throw new Error("The parameter 'authenticationType' cannot be null.");
42
- else {
43
- if (authenticationType !== undefined)
44
- url_ += "authenticationType=" + encodeURIComponent("" + authenticationType) + "&";
45
- if (returnUrl !== undefined) url_ += "returnUrl=" + encodeURIComponent("" + returnUrl) + "&";
46
- }
47
- url_ = url_.replace(/[?&]$/, "");
49
+ // Store sign-in data
50
+ externalSignInStorage.value = { providerType: authenticationType };
48
51
 
49
- window.location.href = url_;
52
+ console.log("url", url);
53
+ // Redirect to the constructed URL
54
+ window.location.assign(url);
50
55
  } catch (e) {
51
56
  console.error(e);
52
-
53
57
  throw e;
54
58
  }
55
59
  }
56
60
 
57
61
  async function externalSignOut(authenticationType: string): Promise<void> {
58
62
  try {
59
- let url_ = window.location.origin + "/externalsignin/signout?";
63
+ const origin = window.location.origin;
64
+ const returnUrl = window.location.pathname ?? "/";
60
65
 
61
- if (authenticationType !== undefined)
62
- url_ += "authenticationType=" + encodeURIComponent("" + authenticationType) + "&";
63
- if (window.location.pathname !== undefined)
64
- url_ += "returnUrl=" + encodeURIComponent("" + window.location.pathname) + "&";
66
+ const url = new URL("/externalsignin/signout", origin);
65
67
 
66
- url_ = url_.replace(/[?&]$/, "");
67
- window.location.href = url_;
68
+ // Set query parameters
69
+ url.searchParams.set("authenticationType", authenticationType);
70
+ url.searchParams.set("returnUrl", returnUrl);
68
71
 
72
+ // Clear sign-in data
69
73
  externalSignInStorage.value = {};
74
+
75
+ // Redirect to the sign-out URL
76
+ window.location.assign(url);
70
77
  } catch (e) {
71
78
  console.error(e);
72
79
  throw e;
@@ -86,7 +86,7 @@ watch(isOutside, (outside) => {
86
86
  }
87
87
 
88
88
  &__content {
89
- @apply tw-absolute tw-z-50 tw-bg-[color:var(--tooltip-background-color)] tw-border tw-border-solid tw-border-[color:var(--tooltip-border-color)] tw-shadow-lg tw-rounded tw-text-[color:var(--tooltip-text-color)] tw-font-normal tw-py-1 tw-px-2;
89
+ @apply tw-absolute tw-z-[100] tw-bg-[color:var(--tooltip-background-color)] tw-border tw-border-solid tw-border-[color:var(--tooltip-border-color)] tw-shadow-lg tw-rounded tw-text-[color:var(--tooltip-text-color)] tw-font-normal tw-py-1 tw-px-2;
90
90
  }
91
91
  }
92
92
  </style>
@@ -245,7 +245,7 @@ const pagesToShow = computed(() => {
245
245
  }
246
246
 
247
247
  &__input {
248
- @apply tw-w-full;
248
+ @apply tw-w-full tw-bg-transparent;
249
249
  }
250
250
  }
251
251
  </style>
@@ -1,4 +0,0 @@
1
- import { b as f } from "./index-brymheD-.js";
2
- export {
3
- f as default
4
- };