@vc-shell/framework 1.0.129 → 1.0.131

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [1.0.131](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.130...v1.0.131) (2023-12-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **shell:** interceptor method name fix ([293ba14](https://github.com/VirtoCommerce/vc-shell/commit/293ba14952c779141b6be417653e317afd2e98e9))
7
+
8
+
9
+
10
+ ## [1.0.130](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.129...v1.0.130) (2023-12-27)
11
+
12
+
13
+
1
14
  ## [1.0.129](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.128...v1.0.129) (2023-12-27)
2
15
 
3
16
 
@@ -113,10 +113,11 @@ function useUserFn(): IUseUser {
113
113
  async function signOut(): Promise<void> {
114
114
  console.debug(`[@vc-shell/framework#useUser:signOut] - Entry point`);
115
115
 
116
+ user.value = undefined;
117
+
116
118
  if (externalSignInStorage.value?.providerType) {
117
119
  await externalSignOut(externalSignInStorage.value.providerType);
118
120
  } else {
119
- user.value = undefined;
120
121
  securityClient.logout();
121
122
  }
122
123
  }
@@ -236,7 +237,6 @@ function useUserFn(): IUseUser {
236
237
  loading: computed(() => loading.value),
237
238
  isAdministrator: computed(() => user.value?.isAdministrator),
238
239
  isAuthenticated,
239
- // getAccessToken,
240
240
  loadUser,
241
241
  signIn,
242
242
  signOut,
@@ -4,7 +4,7 @@ import { useUser } from "../composables/useUser";
4
4
  import { notification } from "../../shared";
5
5
 
6
6
  export function registerInterceptors(router: Router) {
7
- const { fetch } = window;
7
+ const { fetch: originalFetch } = window;
8
8
  const { signOut, isAuthenticated } = useUser();
9
9
 
10
10
  window.fetch = async (...args) => {
@@ -29,7 +29,7 @@ export function registerInterceptors(router: Router) {
29
29
  });
30
30
  } else if (args[0] === "/api/platform/security/currentuser") {
31
31
  notification.warning(
32
- "You are currently in DEMO mode until the first page refresh. \n All API calls are disabled. Please log out and add APP_PLATFORM_URL to your application's .env file to enable API calls.",
32
+ "You are currently in DEMO mode until the first page refresh. \n All API calls are disabled. Please add APP_PLATFORM_URL to your application's .env file to enable API calls.",
33
33
  {
34
34
  timeout: 10000,
35
35
  },
@@ -46,7 +46,7 @@ export function registerInterceptors(router: Router) {
46
46
  }
47
47
  });
48
48
  } else {
49
- const response = await fetch(...args);
49
+ const response = await originalFetch(...args);
50
50
 
51
51
  /**
52
52
  * If the response is unauthorized, logout the user
@@ -1,3 +1,3 @@
1
1
  import { Router } from "vue-router";
2
- export declare function registerInterceptors(router: Router): ((input: URL | RequestInfo, init?: RequestInit | undefined) => Promise<Response>) & typeof globalThis.fetch;
2
+ export declare function registerInterceptors(router: Router): ((input: URL | RequestInfo, init?: RequestInit | undefined) => Promise<Response>) & typeof fetch;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/interceptors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,+GAqElD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/interceptors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,oGAqElD"}
package/dist/framework.js CHANGED
@@ -45366,7 +45366,7 @@ function Qj() {
45366
45366
  }
45367
45367
  }
45368
45368
  async function c() {
45369
- console.debug("[@vc-shell/framework#useUser:signOut] - Entry point"), i.value?.providerType ? await v(i.value.providerType) : (ci.value = void 0, e.logout());
45369
+ console.debug("[@vc-shell/framework#useUser:signOut] - Entry point"), ci.value = void 0, i.value?.providerType ? await v(i.value.providerType) : e.logout();
45370
45370
  }
45371
45371
  async function l() {
45372
45372
  console.debug("[@vc-shell/framework#useUser:loadUser] - Entry point");
@@ -45447,7 +45447,6 @@ function Qj() {
45447
45447
  loading: me(() => n.value),
45448
45448
  isAdministrator: me(() => ci.value?.isAdministrator),
45449
45449
  isAuthenticated: o,
45450
- // getAccessToken,
45451
45450
  loadUser: l,
45452
45451
  signIn: m,
45453
45452
  signOut: c,
@@ -55781,7 +55780,7 @@ function fq(n) {
55781
55780
  text: async () => JSON.stringify({ succeeded: !0 })
55782
55781
  }) : i[0] === "/api/platform/security/currentuser" ? (hr.warning(
55783
55782
  `You are currently in DEMO mode until the first page refresh.
55784
- All API calls are disabled. Please log out and add APP_PLATFORM_URL to your application's .env file to enable API calls.`,
55783
+ All API calls are disabled. Please add APP_PLATFORM_URL to your application's .env file to enable API calls.`,
55785
55784
  {
55786
55785
  timeout: 1e4
55787
55786
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.129",
3
+ "version": "1.0.131",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "style": "./dist/index.css",
8
8
  "files": [
9
9
  "dist",
10
- "tailwind.config.js",
10
+ "tailwind.config.ts",
11
11
  "ui",
12
12
  "core",
13
13
  "shared"
@@ -18,7 +18,7 @@
18
18
  "types": "./dist/index.d.ts"
19
19
  },
20
20
  "./dist/index.css": "./dist/index.css",
21
- "./tailwind.config": "./tailwind.config.js",
21
+ "./tailwind.config": "./tailwind.config.ts",
22
22
  "./*": "./*"
23
23
  },
24
24
  "scripts": {
@@ -53,9 +53,9 @@
53
53
  "whatwg-fetch": "^3.6.19"
54
54
  },
55
55
  "devDependencies": {
56
- "@vc-shell/api-client-generator": "^1.0.129",
57
- "@vc-shell/config-generator": "^1.0.129",
58
- "@vc-shell/ts-config": "^1.0.129",
56
+ "@vc-shell/api-client-generator": "^1.0.131",
57
+ "@vc-shell/config-generator": "^1.0.131",
58
+ "@vc-shell/ts-config": "^1.0.131",
59
59
  "@vitejs/plugin-vue": "^4.5.1",
60
60
  "sass": "^1.69.5",
61
61
  "typescript": "5.3.3",
@@ -0,0 +1,50 @@
1
+ /** @type { import('tailwindcss').Config } */
2
+ export default {
3
+ prefix: "tw-",
4
+ content: ["./ui/components/**/*.{vue,js,ts,jsx,tsx}", "./shared/**/*.{vue,js,ts,jsx,tsx}"],
5
+ theme: {
6
+ fontFamily: {
7
+ roboto: ["Roboto", "sans-serif"],
8
+ },
9
+ fontSize: {
10
+ xs: ["11px", "14px"],
11
+ sm: ["12px", "16px"],
12
+ base: ["13px", "18px"],
13
+ lg: ["14px", "19px"],
14
+ xl: ["16px", "22px"],
15
+ "2xl": ["23px", "28px"],
16
+ },
17
+ lineHeight: {
18
+ xs: "14px",
19
+ sm: "16px",
20
+ base: "18px",
21
+ lg: "19px",
22
+ xl: "22px",
23
+ "2xl": "28px",
24
+ header: "28px",
25
+ },
26
+ extend: {
27
+ keyframes: {
28
+ loadingMarker: {
29
+ "50%": { transform: "translateX(96px)" },
30
+ },
31
+ loadingMarkers: {
32
+ "50%": { transform: "translateX(-31px)" },
33
+ },
34
+ loadingProgress: {
35
+ from: {
36
+ "background-position": "0 0, left",
37
+ },
38
+ to: {
39
+ "background-position": "30px 0, left",
40
+ },
41
+ },
42
+ },
43
+ animation: {
44
+ loadingMarker: "loadingMarker 3s infinite",
45
+ loadingMarkers: "loadingMarkers 3s infinite",
46
+ loadingProgress: "loadingProgress 1s linear infinite",
47
+ },
48
+ },
49
+ },
50
+ };