@etsoo/materialui 1.3.79 → 1.3.81

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.
@@ -27,9 +27,10 @@ export declare class NotifierMU extends NotifierReact {
27
27
  /**
28
28
  * Create state and return provider
29
29
  * @param className Style class name
30
+ * @param debug Debug mode
30
31
  * @returns Provider
31
32
  */
32
- static setup(className?: string): React.FunctionComponent<React.PropsWithChildren<import("@etsoo/react").NotificationReactRenderProps>>;
33
+ static setup(className?: string, debug?: boolean): React.FunctionComponent<React.PropsWithChildren<import("@etsoo/react").NotificationReactRenderProps>>;
33
34
  private static getOrigin;
34
35
  /**
35
36
  * Create align container
package/lib/NotifierMU.js CHANGED
@@ -277,12 +277,15 @@ export class NotifierMU extends NotifierReact {
277
277
  /**
278
278
  * Create state and return provider
279
279
  * @param className Style class name
280
+ * @param debug Debug mode
280
281
  * @returns Provider
281
282
  */
282
- static setup(className = "notifier-mu") {
283
+ static setup(className, debug = false) {
284
+ className ?? (className = "notifier-mu");
283
285
  // Create an instance
284
286
  const instance = new NotifierMU();
285
- const provider = instance.createProvider(className);
287
+ instance.debug = debug;
288
+ const provider = instance.createProvider(className, debug);
286
289
  NotifierReact.updateInstance(instance);
287
290
  return provider;
288
291
  }
@@ -137,8 +137,9 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
137
137
  * Constructor
138
138
  * @param settings Settings
139
139
  * @param name Application name
140
+ * @param debug Debug mode
140
141
  */
141
- constructor(settings: S, name: string);
142
+ constructor(settings: S, name: string, debug?: boolean);
142
143
  /**
143
144
  * Override alert action result
144
145
  * @param result Action result
@@ -57,18 +57,19 @@ export class ReactApp extends CoreApp {
57
57
  static get notifierProvider() {
58
58
  return this._notifierProvider;
59
59
  }
60
- static createNotifier() {
60
+ static createNotifier(debug) {
61
61
  // Notifier
62
- ReactApp._notifierProvider = NotifierMU.setup();
62
+ ReactApp._notifierProvider = NotifierMU.setup(undefined, debug);
63
63
  return NotifierMU.instance;
64
64
  }
65
65
  /**
66
66
  * Constructor
67
67
  * @param settings Settings
68
68
  * @param name Application name
69
+ * @param debug Debug mode
69
70
  */
70
- constructor(settings, name) {
71
- super(settings, createClient(), ReactApp.createNotifier(), new WindowStorage(), name);
71
+ constructor(settings, name, debug = false) {
72
+ super(settings, createClient(), ReactApp.createNotifier(debug), new WindowStorage(), name, debug);
72
73
  /**
73
74
  * User state
74
75
  */
@@ -37,8 +37,9 @@ export declare class ServiceApp<U extends IServiceUser = IServiceUser, P extends
37
37
  * Constructor
38
38
  * @param settings Settings
39
39
  * @param name Application name
40
+ * @param debug Debug mode
40
41
  */
41
- constructor(settings: S, name: string);
42
+ constructor(settings: S, name: string, debug?: boolean);
42
43
  /**
43
44
  * Service application API login
44
45
  * @param appApi Service application API
@@ -22,9 +22,10 @@ export class ServiceApp extends ReactApp {
22
22
  * Constructor
23
23
  * @param settings Settings
24
24
  * @param name Application name
25
+ * @param debug Debug mode
25
26
  */
26
- constructor(settings, name) {
27
- super(settings, name);
27
+ constructor(settings, name, debug = false) {
28
+ super(settings, name, debug);
28
29
  /**
29
30
  * Service passphrase
30
31
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.3.79",
3
+ "version": "1.3.81",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,9 +50,9 @@
50
50
  "@emotion/css": "^11.13.0",
51
51
  "@emotion/react": "^11.13.0",
52
52
  "@emotion/styled": "^11.13.0",
53
- "@etsoo/appscript": "^1.5.1",
54
- "@etsoo/notificationbase": "^1.1.46",
55
- "@etsoo/react": "^1.7.60",
53
+ "@etsoo/appscript": "^1.5.5",
54
+ "@etsoo/notificationbase": "^1.1.47",
55
+ "@etsoo/react": "^1.7.62",
56
56
  "@etsoo/shared": "^1.2.44",
57
57
  "@mui/icons-material": "^5.16.6",
58
58
  "@mui/material": "^5.16.6",
@@ -87,8 +87,8 @@
87
87
  "@types/react-dom": "^18.3.0",
88
88
  "@types/react-input-mask": "^3.0.5",
89
89
  "@types/react-window": "^1.8.8",
90
- "@typescript-eslint/eslint-plugin": "^8.0.0",
91
- "@typescript-eslint/parser": "^8.0.0",
90
+ "@typescript-eslint/eslint-plugin": "^8.0.1",
91
+ "@typescript-eslint/parser": "^8.0.1",
92
92
  "jest": "^29.7.0",
93
93
  "jest-environment-jsdom": "^29.7.0",
94
94
  "typescript": "^5.5.4"
@@ -602,13 +602,19 @@ export class NotifierMU extends NotifierReact {
602
602
  /**
603
603
  * Create state and return provider
604
604
  * @param className Style class name
605
+ * @param debug Debug mode
605
606
  * @returns Provider
606
607
  */
607
- static setup(className = "notifier-mu") {
608
+ static setup(className?: string, debug: boolean = false) {
609
+ className ??= "notifier-mu";
610
+
608
611
  // Create an instance
609
612
  const instance = new NotifierMU();
610
- const provider = instance.createProvider(className);
613
+ instance.debug = debug;
614
+
615
+ const provider = instance.createProvider(className, debug);
611
616
  NotifierReact.updateInstance(instance);
617
+
612
618
  return provider;
613
619
  }
614
620
 
@@ -198,10 +198,9 @@ export class ReactApp<
198
198
  return this._notifierProvider;
199
199
  }
200
200
 
201
- private static createNotifier() {
201
+ private static createNotifier(debug: boolean) {
202
202
  // Notifier
203
- ReactApp._notifierProvider = NotifierMU.setup();
204
-
203
+ ReactApp._notifierProvider = NotifierMU.setup(undefined, debug);
205
204
  return NotifierMU.instance;
206
205
  }
207
206
 
@@ -249,14 +248,16 @@ export class ReactApp<
249
248
  * Constructor
250
249
  * @param settings Settings
251
250
  * @param name Application name
251
+ * @param debug Debug mode
252
252
  */
253
- constructor(settings: S, name: string) {
253
+ constructor(settings: S, name: string, debug: boolean = false) {
254
254
  super(
255
255
  settings,
256
256
  createClient(),
257
- ReactApp.createNotifier(),
257
+ ReactApp.createNotifier(debug),
258
258
  new WindowStorage(),
259
- name
259
+ name,
260
+ debug
260
261
  );
261
262
 
262
263
  if (BridgeUtils.host) {
@@ -64,9 +64,10 @@ export class ServiceApp<
64
64
  * Constructor
65
65
  * @param settings Settings
66
66
  * @param name Application name
67
+ * @param debug Debug mode
67
68
  */
68
- constructor(settings: S, name: string) {
69
- super(settings, name);
69
+ constructor(settings: S, name: string, debug: boolean = false) {
70
+ super(settings, name, debug);
70
71
 
71
72
  // Check
72
73
  if (settings.serviceId == null || settings.serviceEndpoint == null) {