@etsoo/appscript 1.1.86 → 1.1.87
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 +8 -0
- package/lib/cjs/app/CoreApp.js +11 -2
- package/lib/mjs/app/CoreApp.d.ts +8 -0
- package/lib/mjs/app/CoreApp.js +11 -2
- package/package.json +1 -1
- package/src/app/CoreApp.ts +19 -5
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -119,6 +119,10 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
119
119
|
* @param culture New culture definition
|
|
120
120
|
*/
|
|
121
121
|
changeCulture(culture: DataTypes.CultureDefinition): void;
|
|
122
|
+
/**
|
|
123
|
+
* Clear cache data
|
|
124
|
+
*/
|
|
125
|
+
clearCacheData(): void;
|
|
122
126
|
/**
|
|
123
127
|
* Clear cached token
|
|
124
128
|
*/
|
|
@@ -490,6 +494,10 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
490
494
|
* @param culture New culture definition
|
|
491
495
|
*/
|
|
492
496
|
changeCulture(culture: DataTypes.CultureDefinition): void;
|
|
497
|
+
/**
|
|
498
|
+
* Clear cache data
|
|
499
|
+
*/
|
|
500
|
+
clearCacheData(): void;
|
|
493
501
|
/**
|
|
494
502
|
* Clear cached token
|
|
495
503
|
*/
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -257,8 +257,8 @@ class CoreApp {
|
|
|
257
257
|
// Update
|
|
258
258
|
const fields = this.initCallUpdateFields();
|
|
259
259
|
for (const field of fields) {
|
|
260
|
-
const currentValue = shared_1.StorageUtils.getLocalData(field
|
|
261
|
-
if (currentValue === '')
|
|
260
|
+
const currentValue = shared_1.StorageUtils.getLocalData(field);
|
|
261
|
+
if (currentValue == null || currentValue === '')
|
|
262
262
|
continue;
|
|
263
263
|
const enhanced = currentValue.indexOf('!') >= 8;
|
|
264
264
|
let newValueSource = null;
|
|
@@ -374,6 +374,15 @@ class CoreApp {
|
|
|
374
374
|
region.name = AddressUtils_1.AddressUtils.getRegionLabel(id, this.labelDelegate);
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Clear cache data
|
|
379
|
+
*/
|
|
380
|
+
clearCacheData() {
|
|
381
|
+
shared_1.StorageUtils.setLocalData(this.serversideDeviceIdField, undefined);
|
|
382
|
+
shared_1.StorageUtils.setLocalData(this.deviceIdField, undefined);
|
|
383
|
+
shared_1.StorageUtils.setLocalData(this.deviceIdUpdateTimeField, undefined);
|
|
384
|
+
shared_1.StorageUtils.setLocalData(this.headerTokenField, undefined);
|
|
385
|
+
}
|
|
377
386
|
/**
|
|
378
387
|
* Clear cached token
|
|
379
388
|
*/
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -119,6 +119,10 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
119
119
|
* @param culture New culture definition
|
|
120
120
|
*/
|
|
121
121
|
changeCulture(culture: DataTypes.CultureDefinition): void;
|
|
122
|
+
/**
|
|
123
|
+
* Clear cache data
|
|
124
|
+
*/
|
|
125
|
+
clearCacheData(): void;
|
|
122
126
|
/**
|
|
123
127
|
* Clear cached token
|
|
124
128
|
*/
|
|
@@ -490,6 +494,10 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
490
494
|
* @param culture New culture definition
|
|
491
495
|
*/
|
|
492
496
|
changeCulture(culture: DataTypes.CultureDefinition): void;
|
|
497
|
+
/**
|
|
498
|
+
* Clear cache data
|
|
499
|
+
*/
|
|
500
|
+
clearCacheData(): void;
|
|
493
501
|
/**
|
|
494
502
|
* Clear cached token
|
|
495
503
|
*/
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -254,8 +254,8 @@ export class CoreApp {
|
|
|
254
254
|
// Update
|
|
255
255
|
const fields = this.initCallUpdateFields();
|
|
256
256
|
for (const field of fields) {
|
|
257
|
-
const currentValue = StorageUtils.getLocalData(field
|
|
258
|
-
if (currentValue === '')
|
|
257
|
+
const currentValue = StorageUtils.getLocalData(field);
|
|
258
|
+
if (currentValue == null || currentValue === '')
|
|
259
259
|
continue;
|
|
260
260
|
const enhanced = currentValue.indexOf('!') >= 8;
|
|
261
261
|
let newValueSource = null;
|
|
@@ -371,6 +371,15 @@ export class CoreApp {
|
|
|
371
371
|
region.name = AddressUtils.getRegionLabel(id, this.labelDelegate);
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* Clear cache data
|
|
376
|
+
*/
|
|
377
|
+
clearCacheData() {
|
|
378
|
+
StorageUtils.setLocalData(this.serversideDeviceIdField, undefined);
|
|
379
|
+
StorageUtils.setLocalData(this.deviceIdField, undefined);
|
|
380
|
+
StorageUtils.setLocalData(this.deviceIdUpdateTimeField, undefined);
|
|
381
|
+
StorageUtils.setLocalData(this.headerTokenField, undefined);
|
|
382
|
+
}
|
|
374
383
|
/**
|
|
375
384
|
* Clear cached token
|
|
376
385
|
*/
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -178,6 +178,11 @@ export interface ICoreApp<
|
|
|
178
178
|
*/
|
|
179
179
|
changeCulture(culture: DataTypes.CultureDefinition): void;
|
|
180
180
|
|
|
181
|
+
/**
|
|
182
|
+
* Clear cache data
|
|
183
|
+
*/
|
|
184
|
+
clearCacheData(): void;
|
|
185
|
+
|
|
181
186
|
/**
|
|
182
187
|
* Clear cached token
|
|
183
188
|
*/
|
|
@@ -791,11 +796,8 @@ export abstract class CoreApp<
|
|
|
791
796
|
// Update
|
|
792
797
|
const fields = this.initCallUpdateFields();
|
|
793
798
|
for (const field of fields) {
|
|
794
|
-
const currentValue = StorageUtils.getLocalData<string>(
|
|
795
|
-
|
|
796
|
-
''
|
|
797
|
-
);
|
|
798
|
-
if (currentValue === '') continue;
|
|
799
|
+
const currentValue = StorageUtils.getLocalData<string>(field);
|
|
800
|
+
if (currentValue == null || currentValue === '') continue;
|
|
799
801
|
|
|
800
802
|
const enhanced = currentValue.indexOf('!') >= 8;
|
|
801
803
|
let newValueSource = null;
|
|
@@ -936,6 +938,18 @@ export abstract class CoreApp<
|
|
|
936
938
|
});
|
|
937
939
|
}
|
|
938
940
|
|
|
941
|
+
/**
|
|
942
|
+
* Clear cache data
|
|
943
|
+
*/
|
|
944
|
+
clearCacheData() {
|
|
945
|
+
StorageUtils.setLocalData(this.serversideDeviceIdField, undefined);
|
|
946
|
+
|
|
947
|
+
StorageUtils.setLocalData(this.deviceIdField, undefined);
|
|
948
|
+
StorageUtils.setLocalData(this.deviceIdUpdateTimeField, undefined);
|
|
949
|
+
|
|
950
|
+
StorageUtils.setLocalData(this.headerTokenField, undefined);
|
|
951
|
+
}
|
|
952
|
+
|
|
939
953
|
/**
|
|
940
954
|
* Clear cached token
|
|
941
955
|
*/
|