@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.
- package/lib/cjs/app/CoreApp.d.ts +1 -1
- package/lib/cjs/app/CoreApp.js +2 -2
- package/lib/cjs/app/IApp.d.ts +1 -1
- package/lib/mjs/app/CoreApp.d.ts +1 -1
- package/lib/mjs/app/CoreApp.js +2 -2
- package/lib/mjs/app/IApp.d.ts +1 -1
- package/package.json +1 -1
- package/src/app/CoreApp.ts +6 -3
- package/src/app/IApp.ts +1 -1
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -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
|
*/
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -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
|
/**
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -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/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -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
|
*/
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -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
|
/**
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -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
package/src/app/CoreApp.ts
CHANGED
|
@@ -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(
|
|
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
|
|