@etsoo/appscript 1.2.92 → 1.2.94
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 +5 -5
- package/lib/cjs/app/CoreApp.js +9 -9
- package/lib/cjs/app/IApp.d.ts +5 -5
- package/lib/mjs/app/CoreApp.d.ts +5 -5
- package/lib/mjs/app/CoreApp.js +9 -9
- package/lib/mjs/app/IApp.d.ts +5 -5
- package/package.json +1 -1
- package/src/app/CoreApp.ts +9 -10
- package/src/app/IApp.ts +6 -6
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -407,14 +407,14 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
407
407
|
*/
|
|
408
408
|
hasPermission(roles: number | UserRole | number[] | UserRole[]): boolean;
|
|
409
409
|
/**
|
|
410
|
-
*
|
|
410
|
+
* Navigate the Url
|
|
411
|
+
* @param url Url
|
|
411
412
|
*/
|
|
412
|
-
|
|
413
|
+
navigate(url: string): void;
|
|
413
414
|
/**
|
|
414
|
-
*
|
|
415
|
-
* @param url Url
|
|
415
|
+
* Callback where exit a page
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
pageExit(): void;
|
|
418
418
|
/**
|
|
419
419
|
* Refresh countdown
|
|
420
420
|
* @param seconds Seconds
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -978,6 +978,13 @@ class CoreApp {
|
|
|
978
978
|
return true;
|
|
979
979
|
return false;
|
|
980
980
|
}
|
|
981
|
+
/**
|
|
982
|
+
* Navigate the Url
|
|
983
|
+
* @param url Url
|
|
984
|
+
*/
|
|
985
|
+
navigate(url) {
|
|
986
|
+
globalThis.location.href = this.settings.homepage + url;
|
|
987
|
+
}
|
|
981
988
|
/**
|
|
982
989
|
* Callback where exit a page
|
|
983
990
|
*/
|
|
@@ -985,13 +992,6 @@ class CoreApp {
|
|
|
985
992
|
var _a;
|
|
986
993
|
(_a = this.lastWarning) === null || _a === void 0 ? void 0 : _a.dismiss();
|
|
987
994
|
}
|
|
988
|
-
/**
|
|
989
|
-
* Redirect to the Url
|
|
990
|
-
* @param url Url
|
|
991
|
-
*/
|
|
992
|
-
redirectTo(url) {
|
|
993
|
-
window.location.href = url;
|
|
994
|
-
}
|
|
995
995
|
/**
|
|
996
996
|
* Refresh countdown
|
|
997
997
|
* @param seconds Seconds
|
|
@@ -1089,8 +1089,8 @@ class CoreApp {
|
|
|
1089
1089
|
* @param tryLogin Try to login again
|
|
1090
1090
|
*/
|
|
1091
1091
|
toLoginPage(tryLogin) {
|
|
1092
|
-
const url =
|
|
1093
|
-
this.
|
|
1092
|
+
const url = '/' + (tryLogin ? '' : '?tryLogin=false');
|
|
1093
|
+
this.navigate(url);
|
|
1094
1094
|
}
|
|
1095
1095
|
/**
|
|
1096
1096
|
* Try login, returning false means is loading
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -335,6 +335,11 @@ export interface IApp {
|
|
|
335
335
|
* @param password Input password
|
|
336
336
|
*/
|
|
337
337
|
isValidPassword(password: string): boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Navigate the Url
|
|
340
|
+
* @param url Url
|
|
341
|
+
*/
|
|
342
|
+
navigate(url: string): void;
|
|
338
343
|
/**
|
|
339
344
|
* Callback where exit a page
|
|
340
345
|
*/
|
|
@@ -359,11 +364,6 @@ export interface IApp {
|
|
|
359
364
|
* Persist settings to source when application exit
|
|
360
365
|
*/
|
|
361
366
|
persist(): void;
|
|
362
|
-
/**
|
|
363
|
-
* Redirect to the Url
|
|
364
|
-
* @param url Url
|
|
365
|
-
*/
|
|
366
|
-
redirectTo(url: string): void;
|
|
367
367
|
/**
|
|
368
368
|
* Switch organization
|
|
369
369
|
* @param id Organization id
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -407,14 +407,14 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
407
407
|
*/
|
|
408
408
|
hasPermission(roles: number | UserRole | number[] | UserRole[]): boolean;
|
|
409
409
|
/**
|
|
410
|
-
*
|
|
410
|
+
* Navigate the Url
|
|
411
|
+
* @param url Url
|
|
411
412
|
*/
|
|
412
|
-
|
|
413
|
+
navigate(url: string): void;
|
|
413
414
|
/**
|
|
414
|
-
*
|
|
415
|
-
* @param url Url
|
|
415
|
+
* Callback where exit a page
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
pageExit(): void;
|
|
418
418
|
/**
|
|
419
419
|
* Refresh countdown
|
|
420
420
|
* @param seconds Seconds
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -975,6 +975,13 @@ export class CoreApp {
|
|
|
975
975
|
return true;
|
|
976
976
|
return false;
|
|
977
977
|
}
|
|
978
|
+
/**
|
|
979
|
+
* Navigate the Url
|
|
980
|
+
* @param url Url
|
|
981
|
+
*/
|
|
982
|
+
navigate(url) {
|
|
983
|
+
globalThis.location.href = this.settings.homepage + url;
|
|
984
|
+
}
|
|
978
985
|
/**
|
|
979
986
|
* Callback where exit a page
|
|
980
987
|
*/
|
|
@@ -982,13 +989,6 @@ export class CoreApp {
|
|
|
982
989
|
var _a;
|
|
983
990
|
(_a = this.lastWarning) === null || _a === void 0 ? void 0 : _a.dismiss();
|
|
984
991
|
}
|
|
985
|
-
/**
|
|
986
|
-
* Redirect to the Url
|
|
987
|
-
* @param url Url
|
|
988
|
-
*/
|
|
989
|
-
redirectTo(url) {
|
|
990
|
-
window.location.href = url;
|
|
991
|
-
}
|
|
992
992
|
/**
|
|
993
993
|
* Refresh countdown
|
|
994
994
|
* @param seconds Seconds
|
|
@@ -1086,8 +1086,8 @@ export class CoreApp {
|
|
|
1086
1086
|
* @param tryLogin Try to login again
|
|
1087
1087
|
*/
|
|
1088
1088
|
toLoginPage(tryLogin) {
|
|
1089
|
-
const url =
|
|
1090
|
-
this.
|
|
1089
|
+
const url = '/' + (tryLogin ? '' : '?tryLogin=false');
|
|
1090
|
+
this.navigate(url);
|
|
1091
1091
|
}
|
|
1092
1092
|
/**
|
|
1093
1093
|
* Try login, returning false means is loading
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -335,6 +335,11 @@ export interface IApp {
|
|
|
335
335
|
* @param password Input password
|
|
336
336
|
*/
|
|
337
337
|
isValidPassword(password: string): boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Navigate the Url
|
|
340
|
+
* @param url Url
|
|
341
|
+
*/
|
|
342
|
+
navigate(url: string): void;
|
|
338
343
|
/**
|
|
339
344
|
* Callback where exit a page
|
|
340
345
|
*/
|
|
@@ -359,11 +364,6 @@ export interface IApp {
|
|
|
359
364
|
* Persist settings to source when application exit
|
|
360
365
|
*/
|
|
361
366
|
persist(): void;
|
|
362
|
-
/**
|
|
363
|
-
* Redirect to the Url
|
|
364
|
-
* @param url Url
|
|
365
|
-
*/
|
|
366
|
-
redirectTo(url: string): void;
|
|
367
367
|
/**
|
|
368
368
|
* Switch organization
|
|
369
369
|
* @param id Organization id
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -1304,18 +1304,18 @@ export abstract class CoreApp<
|
|
|
1304
1304
|
}
|
|
1305
1305
|
|
|
1306
1306
|
/**
|
|
1307
|
-
*
|
|
1307
|
+
* Navigate the Url
|
|
1308
|
+
* @param url Url
|
|
1308
1309
|
*/
|
|
1309
|
-
|
|
1310
|
-
this.
|
|
1310
|
+
navigate(url: string): void {
|
|
1311
|
+
globalThis.location.href = this.settings.homepage + url;
|
|
1311
1312
|
}
|
|
1312
1313
|
|
|
1313
1314
|
/**
|
|
1314
|
-
*
|
|
1315
|
-
* @param url Url
|
|
1315
|
+
* Callback where exit a page
|
|
1316
1316
|
*/
|
|
1317
|
-
|
|
1318
|
-
|
|
1317
|
+
pageExit() {
|
|
1318
|
+
this.lastWarning?.dismiss();
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
1321
1321
|
/**
|
|
@@ -1437,9 +1437,8 @@ export abstract class CoreApp<
|
|
|
1437
1437
|
* @param tryLogin Try to login again
|
|
1438
1438
|
*/
|
|
1439
1439
|
toLoginPage(tryLogin?: boolean) {
|
|
1440
|
-
const url =
|
|
1441
|
-
|
|
1442
|
-
this.redirectTo(url);
|
|
1440
|
+
const url = '/' + (tryLogin ? '' : '?tryLogin=false');
|
|
1441
|
+
this.navigate(url);
|
|
1443
1442
|
}
|
|
1444
1443
|
|
|
1445
1444
|
/**
|
package/src/app/IApp.ts
CHANGED
|
@@ -437,6 +437,12 @@ export interface IApp {
|
|
|
437
437
|
*/
|
|
438
438
|
isValidPassword(password: string): boolean;
|
|
439
439
|
|
|
440
|
+
/**
|
|
441
|
+
* Navigate the Url
|
|
442
|
+
* @param url Url
|
|
443
|
+
*/
|
|
444
|
+
navigate(url: string): void;
|
|
445
|
+
|
|
440
446
|
/**
|
|
441
447
|
* Callback where exit a page
|
|
442
448
|
*/
|
|
@@ -471,12 +477,6 @@ export interface IApp {
|
|
|
471
477
|
*/
|
|
472
478
|
persist(): void;
|
|
473
479
|
|
|
474
|
-
/**
|
|
475
|
-
* Redirect to the Url
|
|
476
|
-
* @param url Url
|
|
477
|
-
*/
|
|
478
|
-
redirectTo(url: string): void;
|
|
479
|
-
|
|
480
480
|
/**
|
|
481
481
|
* Switch organization
|
|
482
482
|
* @param id Organization id
|