@etsoo/materialui 1.4.77 → 1.4.79

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,9 +1,4 @@
1
- import {
2
- AddressUtils,
3
- ApiAuthorizationScheme,
4
- Culture,
5
- ExternalSettings
6
- } from "@etsoo/appscript";
1
+ import { AddressUtils, Culture } from "@etsoo/appscript";
7
2
  import { ReactApp } from "../src";
8
3
  import { DataTypes, DomUtils, IActionResult, Utils } from "@etsoo/shared";
9
4
  import React, { act } from "react";
@@ -28,49 +23,49 @@ const supportedCultures: DataTypes.CultureDefinition[] = [
28
23
  // Supported regions
29
24
  const supportedRegions = ["CN"];
30
25
 
31
- const settings = ExternalSettings.format({
32
- /**
33
- * Endpoint of the API service
34
- */
35
- endpoint: "http://{hostname}/com.etsoo.SmartERPApi/api/",
36
-
37
- /**
38
- * App root url
39
- */
40
- homepage: "/cms",
41
-
42
- /**
43
- * Web url of the cloud
44
- */
45
- webUrl: "http://localhost",
46
-
47
- // Authorization scheme
48
- authScheme: ApiAuthorizationScheme.Bearer,
49
-
50
- // Detected culture
51
- detectedCulture,
52
-
53
- // Supported cultures
54
- cultures: supportedCultures,
55
-
56
- // Supported regions
57
- regions: supportedRegions,
58
-
59
- // Browser's time zone
60
- timeZone: Utils.getTimeZone(),
61
-
62
- // Current country or region
63
- currentRegion: AddressUtils.getRegion(
64
- supportedRegions,
65
- detectedCountry,
66
- detectedCulture
67
- ),
68
-
69
- // Current culture
70
- currentCulture: DomUtils.getCulture(supportedCultures, detectedCulture)![0]
71
- });
72
-
73
- const app = new ReactApp(settings, "test");
26
+ const app = new ReactApp(
27
+ {
28
+ appId: 0,
29
+
30
+ /**
31
+ * Endpoint of the API service
32
+ */
33
+ endpoint: "http://{hostname}/com.etsoo.SmartERPApi/api/",
34
+
35
+ /**
36
+ * App root url
37
+ */
38
+ homepage: "/cms",
39
+
40
+ /**
41
+ * Web url of the cloud
42
+ */
43
+ webUrl: "http://localhost",
44
+
45
+ // Detected culture
46
+ detectedCulture,
47
+
48
+ // Supported cultures
49
+ cultures: supportedCultures,
50
+
51
+ // Supported regions
52
+ regions: supportedRegions,
53
+
54
+ // Browser's time zone
55
+ timeZone: Utils.getTimeZone(),
56
+
57
+ // Current country or region
58
+ currentRegion: AddressUtils.getRegion(
59
+ supportedRegions,
60
+ detectedCountry,
61
+ detectedCulture
62
+ ),
63
+
64
+ // Current culture
65
+ currentCulture: DomUtils.getCulture(supportedCultures, detectedCulture)![0]
66
+ },
67
+ "test"
68
+ );
74
69
 
75
70
  // Root
76
71
  const root = document.body;
@@ -220,8 +220,7 @@ class ReactApp extends appscript_1.CoreApp {
220
220
  }
221
221
  // Refresh token
222
222
  await this.refreshToken({
223
- showLoading: data?.showLoading,
224
- timeZone: this.getTimeZone()
223
+ showLoading: data?.showLoading
225
224
  }, (result) => {
226
225
  if (result === true) {
227
226
  onSuccess?.();
@@ -202,8 +202,7 @@ class ServiceApp extends ReactApp_1.ReactApp {
202
202
  // Call the core system API refresh token
203
203
  const data = await this.apiRefreshTokenData(this.coreApi, {
204
204
  token: coreTokenDecrypted,
205
- appId: this.settings.appId,
206
- timeZone: this.getTimeZone()
205
+ appId: this.settings.appId
207
206
  });
208
207
  if (data == null)
209
208
  return;
@@ -212,8 +212,7 @@ export class ReactApp extends CoreApp {
212
212
  }
213
213
  // Refresh token
214
214
  await this.refreshToken({
215
- showLoading: data?.showLoading,
216
- timeZone: this.getTimeZone()
215
+ showLoading: data?.showLoading
217
216
  }, (result) => {
218
217
  if (result === true) {
219
218
  onSuccess?.();
@@ -199,8 +199,7 @@ export class ServiceApp extends ReactApp {
199
199
  // Call the core system API refresh token
200
200
  const data = await this.apiRefreshTokenData(this.coreApi, {
201
201
  token: coreTokenDecrypted,
202
- appId: this.settings.appId,
203
- timeZone: this.getTimeZone()
202
+ appId: this.settings.appId
204
203
  });
205
204
  if (data == null)
206
205
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.4.77",
3
+ "version": "1.4.79",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -40,13 +40,13 @@
40
40
  "@dnd-kit/sortable": "^10.0.0",
41
41
  "@emotion/react": "^11.14.0",
42
42
  "@emotion/styled": "^11.14.0",
43
- "@etsoo/appscript": "^1.5.97",
43
+ "@etsoo/appscript": "^1.6.0",
44
44
  "@etsoo/notificationbase": "^1.1.58",
45
- "@etsoo/react": "^1.8.26",
46
- "@etsoo/shared": "^1.2.60",
47
- "@mui/icons-material": "^6.4.2",
48
- "@mui/material": "^6.4.2",
49
- "@mui/x-data-grid": "^7.24.1",
45
+ "@etsoo/react": "^1.8.29",
46
+ "@etsoo/shared": "^1.2.61",
47
+ "@mui/icons-material": "^6.4.4",
48
+ "@mui/material": "^6.4.4",
49
+ "@mui/x-data-grid": "^7.26.0",
50
50
  "chart.js": "^4.4.7",
51
51
  "chartjs-plugin-datalabels": "^2.2.0",
52
52
  "eventemitter3": "^5.0.1",
@@ -66,9 +66,9 @@
66
66
  },
67
67
  "devDependencies": {
68
68
  "@babel/cli": "^7.26.4",
69
- "@babel/core": "^7.26.7",
70
- "@babel/plugin-transform-runtime": "^7.25.9",
71
- "@babel/preset-env": "^7.26.7",
69
+ "@babel/core": "^7.26.8",
70
+ "@babel/plugin-transform-runtime": "^7.26.8",
71
+ "@babel/preset-env": "^7.26.8",
72
72
  "@babel/preset-react": "^7.26.3",
73
73
  "@babel/preset-typescript": "^7.26.0",
74
74
  "@babel/runtime-corejs3": "^7.26.7",
@@ -83,6 +83,6 @@
83
83
  "@vitejs/plugin-react": "^4.3.4",
84
84
  "jsdom": "^26.0.0",
85
85
  "typescript": "^5.7.3",
86
- "vitest": "^3.0.4"
86
+ "vitest": "^3.0.5"
87
87
  }
88
88
  }
@@ -372,8 +372,7 @@ export class ReactApp<S extends IAppSettings, D extends IUser>
372
372
  // Refresh token
373
373
  await this.refreshToken(
374
374
  {
375
- showLoading: data?.showLoading,
376
- timeZone: this.getTimeZone()
375
+ showLoading: data?.showLoading
377
376
  },
378
377
  (result) => {
379
378
  if (result === true) {
@@ -267,8 +267,7 @@ export class ServiceApp<
267
267
  // Call the core system API refresh token
268
268
  const data = await this.apiRefreshTokenData(this.coreApi, {
269
269
  token: coreTokenDecrypted,
270
- appId: this.settings.appId,
271
- timeZone: this.getTimeZone()
270
+ appId: this.settings.appId
272
271
  });
273
272
 
274
273
  if (data == null) return;