@etsoo/appscript 1.2.42 → 1.2.43
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 +10 -0
- package/lib/cjs/app/CoreApp.js +8 -1
- package/lib/mjs/app/CoreApp.d.ts +10 -0
- package/lib/mjs/app/CoreApp.js +8 -1
- package/package.json +1 -1
- package/src/app/CoreApp.ts +15 -1
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -312,6 +312,11 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
312
312
|
* Persist settings to source when application exit
|
|
313
313
|
*/
|
|
314
314
|
persist(): void;
|
|
315
|
+
/**
|
|
316
|
+
* Redirect to the Url
|
|
317
|
+
* @param url Url
|
|
318
|
+
*/
|
|
319
|
+
redirectTo(url: string): void;
|
|
315
320
|
/**
|
|
316
321
|
* Switch organization
|
|
317
322
|
* @param id Organization id
|
|
@@ -684,6 +689,11 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
684
689
|
* Callback where exit a page
|
|
685
690
|
*/
|
|
686
691
|
pageExit(): void;
|
|
692
|
+
/**
|
|
693
|
+
* Redirect to the Url
|
|
694
|
+
* @param url Url
|
|
695
|
+
*/
|
|
696
|
+
redirectTo(url: string): void;
|
|
687
697
|
/**
|
|
688
698
|
* Refresh countdown
|
|
689
699
|
* @param seconds Seconds
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -802,6 +802,13 @@ class CoreApp {
|
|
|
802
802
|
var _a;
|
|
803
803
|
(_a = this.lastWarning) === null || _a === void 0 ? void 0 : _a.dismiss();
|
|
804
804
|
}
|
|
805
|
+
/**
|
|
806
|
+
* Redirect to the Url
|
|
807
|
+
* @param url Url
|
|
808
|
+
*/
|
|
809
|
+
redirectTo(url) {
|
|
810
|
+
window.location.href = url;
|
|
811
|
+
}
|
|
805
812
|
/**
|
|
806
813
|
* Refresh countdown
|
|
807
814
|
* @param seconds Seconds
|
|
@@ -900,7 +907,7 @@ class CoreApp {
|
|
|
900
907
|
*/
|
|
901
908
|
toLoginPage(tryLogin) {
|
|
902
909
|
const url = this.transformUrl('/' + (tryLogin ? '' : '?tryLogin=false'));
|
|
903
|
-
|
|
910
|
+
this.redirectTo(url);
|
|
904
911
|
}
|
|
905
912
|
/**
|
|
906
913
|
* Transform URL
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -312,6 +312,11 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
312
312
|
* Persist settings to source when application exit
|
|
313
313
|
*/
|
|
314
314
|
persist(): void;
|
|
315
|
+
/**
|
|
316
|
+
* Redirect to the Url
|
|
317
|
+
* @param url Url
|
|
318
|
+
*/
|
|
319
|
+
redirectTo(url: string): void;
|
|
315
320
|
/**
|
|
316
321
|
* Switch organization
|
|
317
322
|
* @param id Organization id
|
|
@@ -684,6 +689,11 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
684
689
|
* Callback where exit a page
|
|
685
690
|
*/
|
|
686
691
|
pageExit(): void;
|
|
692
|
+
/**
|
|
693
|
+
* Redirect to the Url
|
|
694
|
+
* @param url Url
|
|
695
|
+
*/
|
|
696
|
+
redirectTo(url: string): void;
|
|
687
697
|
/**
|
|
688
698
|
* Refresh countdown
|
|
689
699
|
* @param seconds Seconds
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -799,6 +799,13 @@ export class CoreApp {
|
|
|
799
799
|
var _a;
|
|
800
800
|
(_a = this.lastWarning) === null || _a === void 0 ? void 0 : _a.dismiss();
|
|
801
801
|
}
|
|
802
|
+
/**
|
|
803
|
+
* Redirect to the Url
|
|
804
|
+
* @param url Url
|
|
805
|
+
*/
|
|
806
|
+
redirectTo(url) {
|
|
807
|
+
window.location.href = url;
|
|
808
|
+
}
|
|
802
809
|
/**
|
|
803
810
|
* Refresh countdown
|
|
804
811
|
* @param seconds Seconds
|
|
@@ -897,7 +904,7 @@ export class CoreApp {
|
|
|
897
904
|
*/
|
|
898
905
|
toLoginPage(tryLogin) {
|
|
899
906
|
const url = this.transformUrl('/' + (tryLogin ? '' : '?tryLogin=false'));
|
|
900
|
-
|
|
907
|
+
this.redirectTo(url);
|
|
901
908
|
}
|
|
902
909
|
/**
|
|
903
910
|
* Transform URL
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -428,6 +428,12 @@ export interface ICoreApp<
|
|
|
428
428
|
*/
|
|
429
429
|
persist(): void;
|
|
430
430
|
|
|
431
|
+
/**
|
|
432
|
+
* Redirect to the Url
|
|
433
|
+
* @param url Url
|
|
434
|
+
*/
|
|
435
|
+
redirectTo(url: string): void;
|
|
436
|
+
|
|
431
437
|
/**
|
|
432
438
|
* Switch organization
|
|
433
439
|
* @param id Organization id
|
|
@@ -1496,6 +1502,14 @@ export abstract class CoreApp<
|
|
|
1496
1502
|
this.lastWarning?.dismiss();
|
|
1497
1503
|
}
|
|
1498
1504
|
|
|
1505
|
+
/**
|
|
1506
|
+
* Redirect to the Url
|
|
1507
|
+
* @param url Url
|
|
1508
|
+
*/
|
|
1509
|
+
redirectTo(url: string): void {
|
|
1510
|
+
window.location.href = url;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1499
1513
|
/**
|
|
1500
1514
|
* Refresh countdown
|
|
1501
1515
|
* @param seconds Seconds
|
|
@@ -1618,7 +1632,7 @@ export abstract class CoreApp<
|
|
|
1618
1632
|
const url = this.transformUrl(
|
|
1619
1633
|
'/' + (tryLogin ? '' : '?tryLogin=false')
|
|
1620
1634
|
);
|
|
1621
|
-
|
|
1635
|
+
this.redirectTo(url);
|
|
1622
1636
|
}
|
|
1623
1637
|
|
|
1624
1638
|
/**
|