@etsoo/materialui 1.3.71 → 1.3.72

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,4 +1,4 @@
1
- import { CoreApp, IApp, IAppSettings, ICoreApp, IUser } from "@etsoo/appscript";
1
+ import { CoreApp, FormatResultCustomCallback, IApp, IAppSettings, ICoreApp, IUser } from "@etsoo/appscript";
2
2
  import { INotifier, NotificationReturn } from "@etsoo/notificationbase";
3
3
  import { DataTypes, IActionResult } from "@etsoo/shared";
4
4
  import React from "react";
@@ -143,8 +143,9 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
143
143
  * Override alert action result
144
144
  * @param result Action result
145
145
  * @param callback Callback
146
+ * @param forceToLocal Force to local labels
146
147
  */
147
- alertResult(result: IActionResult | string, callback?: NotificationReturn<void>): void;
148
+ alertResult(result: IActionResult | string, callback?: NotificationReturn<void>, forceToLocal?: FormatResultCustomCallback): void;
148
149
  /**
149
150
  * Change culture
150
151
  * @param culture New culture definition
@@ -86,9 +86,12 @@ export class ReactApp extends CoreApp {
86
86
  * Override alert action result
87
87
  * @param result Action result
88
88
  * @param callback Callback
89
+ * @param forceToLocal Force to local labels
89
90
  */
90
- alertResult(result, callback) {
91
- const message = typeof result === "string" ? result : this.formatResult(result);
91
+ alertResult(result, callback, forceToLocal) {
92
+ const message = typeof result === "string"
93
+ ? result
94
+ : this.formatResult(result, forceToLocal);
92
95
  if (message.endsWith(")")) {
93
96
  const startPos = message.lastIndexOf("(");
94
97
  if (startPos > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.3.71",
3
+ "version": "1.3.72",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -2,6 +2,7 @@ import {
2
2
  BridgeUtils,
3
3
  CoreApp,
4
4
  createClient,
5
+ FormatResultCustomCallback,
5
6
  IApp,
6
7
  IAppSettings,
7
8
  ICoreApp,
@@ -278,13 +279,17 @@ export class ReactApp<
278
279
  * Override alert action result
279
280
  * @param result Action result
280
281
  * @param callback Callback
282
+ * @param forceToLocal Force to local labels
281
283
  */
282
284
  override alertResult(
283
285
  result: IActionResult | string,
284
- callback?: NotificationReturn<void>
286
+ callback?: NotificationReturn<void>,
287
+ forceToLocal?: FormatResultCustomCallback
285
288
  ) {
286
289
  const message =
287
- typeof result === "string" ? result : this.formatResult(result);
290
+ typeof result === "string"
291
+ ? result
292
+ : this.formatResult(result, forceToLocal);
288
293
  if (message.endsWith(")")) {
289
294
  const startPos = message.lastIndexOf("(");
290
295
  if (startPos > 0) {