@etsoo/appscript 1.4.1 → 1.4.2

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.
@@ -221,7 +221,7 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
221
221
  * @param culture New culture definition
222
222
  * @param onReady On ready callback
223
223
  */
224
- changeCulture(culture: DataTypes.CultureDefinition, onReady?: () => void): void;
224
+ changeCulture(culture: DataTypes.CultureDefinition, onReady?: (resources: DataTypes.StringRecord) => void): void;
225
225
  /**
226
226
  * Update current region label
227
227
  */
@@ -545,13 +545,13 @@ class CoreApp {
545
545
  culture.resources = result;
546
546
  this.updateRegionLabel();
547
547
  if (onReady)
548
- onReady();
548
+ onReady(result);
549
549
  });
550
550
  }
551
551
  else {
552
552
  this.updateRegionLabel();
553
553
  if (onReady)
554
- onReady();
554
+ onReady(culture.resources);
555
555
  }
556
556
  }
557
557
  /**
@@ -161,7 +161,7 @@ export interface IApp {
161
161
  * @param culture New culture definition
162
162
  * @param onReady On ready callback
163
163
  */
164
- changeCulture(culture: DataTypes.CultureDefinition, onReady?: () => void): void;
164
+ changeCulture(culture: DataTypes.CultureDefinition, onReady?: (resources: DataTypes.StringRecord) => void): void;
165
165
  /**
166
166
  * Check the action result is about device invalid
167
167
  * @param result Action result
@@ -221,7 +221,7 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
221
221
  * @param culture New culture definition
222
222
  * @param onReady On ready callback
223
223
  */
224
- changeCulture(culture: DataTypes.CultureDefinition, onReady?: () => void): void;
224
+ changeCulture(culture: DataTypes.CultureDefinition, onReady?: (resources: DataTypes.StringRecord) => void): void;
225
225
  /**
226
226
  * Update current region label
227
227
  */
@@ -519,13 +519,13 @@ export class CoreApp {
519
519
  culture.resources = result;
520
520
  this.updateRegionLabel();
521
521
  if (onReady)
522
- onReady();
522
+ onReady(result);
523
523
  });
524
524
  }
525
525
  else {
526
526
  this.updateRegionLabel();
527
527
  if (onReady)
528
- onReady();
528
+ onReady(culture.resources);
529
529
  }
530
530
  }
531
531
  /**
@@ -161,7 +161,7 @@ export interface IApp {
161
161
  * @param culture New culture definition
162
162
  * @param onReady On ready callback
163
163
  */
164
- changeCulture(culture: DataTypes.CultureDefinition, onReady?: () => void): void;
164
+ changeCulture(culture: DataTypes.CultureDefinition, onReady?: (resources: DataTypes.StringRecord) => void): void;
165
165
  /**
166
166
  * Check the action result is about device invalid
167
167
  * @param result Action result
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -742,7 +742,10 @@ export abstract class CoreApp<
742
742
  * @param culture New culture definition
743
743
  * @param onReady On ready callback
744
744
  */
745
- changeCulture(culture: DataTypes.CultureDefinition, onReady?: () => void) {
745
+ changeCulture(
746
+ culture: DataTypes.CultureDefinition,
747
+ onReady?: (resources: DataTypes.StringRecord) => void
748
+ ) {
746
749
  // Name
747
750
  const { name } = culture;
748
751
 
@@ -766,11 +769,11 @@ export abstract class CoreApp<
766
769
  culture.resources().then((result) => {
767
770
  culture.resources = result;
768
771
  this.updateRegionLabel();
769
- if (onReady) onReady();
772
+ if (onReady) onReady(result);
770
773
  });
771
774
  } else {
772
775
  this.updateRegionLabel();
773
- if (onReady) onReady();
776
+ if (onReady) onReady(culture.resources);
774
777
  }
775
778
  }
776
779
 
package/src/app/IApp.ts CHANGED
@@ -218,7 +218,7 @@ export interface IApp {
218
218
  */
219
219
  changeCulture(
220
220
  culture: DataTypes.CultureDefinition,
221
- onReady?: () => void
221
+ onReady?: (resources: DataTypes.StringRecord) => void
222
222
  ): void;
223
223
 
224
224
  /**