@etsoo/appscript 1.2.33 → 1.2.38
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 +4 -2
- package/lib/cjs/app/CoreApp.js +3 -1
- package/lib/cjs/app/ExternalSettings.js +5 -1
- package/lib/cjs/i18n/en-US.json +2 -0
- package/lib/cjs/i18n/zh-CN.json +2 -0
- package/lib/cjs/i18n/zh-HK.json +2 -0
- package/lib/mjs/app/CoreApp.d.ts +4 -2
- package/lib/mjs/app/CoreApp.js +3 -1
- package/lib/mjs/app/ExternalSettings.js +5 -1
- package/lib/mjs/i18n/en-US.json +2 -0
- package/lib/mjs/i18n/zh-CN.json +2 -0
- package/lib/mjs/i18n/zh-HK.json +2 -0
- package/package.json +9 -9
- package/src/app/CoreApp.ts +7 -2
- package/src/app/ExternalSettings.ts +6 -1
- package/src/i18n/en-US.json +2 -0
- package/src/i18n/zh-CN.json +2 -0
- package/src/i18n/zh-HK.json +2 -0
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -320,8 +320,9 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
320
320
|
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
321
321
|
/**
|
|
322
322
|
* Go to the login page
|
|
323
|
+
* @param tryLogin Try to login again
|
|
323
324
|
*/
|
|
324
|
-
toLoginPage(): void;
|
|
325
|
+
toLoginPage(tryLogin?: boolean): void;
|
|
325
326
|
/**
|
|
326
327
|
* Transform URL
|
|
327
328
|
* @param url URL
|
|
@@ -723,8 +724,9 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
723
724
|
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
724
725
|
/**
|
|
725
726
|
* Go to the login page
|
|
727
|
+
* @param tryLogin Try to login again
|
|
726
728
|
*/
|
|
727
|
-
toLoginPage(): void;
|
|
729
|
+
toLoginPage(tryLogin?: boolean): void;
|
|
728
730
|
/**
|
|
729
731
|
* Transform URL
|
|
730
732
|
* @param url URL
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -896,8 +896,10 @@ class CoreApp {
|
|
|
896
896
|
}
|
|
897
897
|
/**
|
|
898
898
|
* Go to the login page
|
|
899
|
+
* @param tryLogin Try to login again
|
|
899
900
|
*/
|
|
900
|
-
toLoginPage() {
|
|
901
|
+
toLoginPage(tryLogin) {
|
|
902
|
+
const url = this.transformUrl('/' + (tryLogin ? '' : '?tryLogin=false'));
|
|
901
903
|
window.location.replace(this.transformUrl('/'));
|
|
902
904
|
}
|
|
903
905
|
/**
|
|
@@ -14,7 +14,11 @@ var ExternalSettings;
|
|
|
14
14
|
const settings = Reflect.get(globalThis, 'settings');
|
|
15
15
|
if (typeof settings === 'object') {
|
|
16
16
|
if (typeof window !== 'undefined') {
|
|
17
|
-
|
|
17
|
+
// Host name
|
|
18
|
+
let hostname = window.location.hostname;
|
|
19
|
+
// Empty string returned under Electron
|
|
20
|
+
if (hostname === '')
|
|
21
|
+
hostname = 'localhost';
|
|
18
22
|
// replace {hostname}
|
|
19
23
|
for (const key in settings) {
|
|
20
24
|
const value = settings[key];
|
package/lib/cjs/i18n/en-US.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "Email",
|
|
37
37
|
"emailAddresses": "Email addresses",
|
|
38
38
|
"enabled": "Enabled",
|
|
39
|
+
"entityStatus": "Status",
|
|
39
40
|
"etsoo": "ETSOO",
|
|
40
41
|
"expiry": "Expiry",
|
|
41
42
|
"failed": "Operation failed",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "No",
|
|
57
58
|
"noChanges": "No changes yet",
|
|
58
59
|
"noData": "No valid data",
|
|
60
|
+
"none": "None yet",
|
|
59
61
|
"noOptions": "No options",
|
|
60
62
|
"ok": "OK",
|
|
61
63
|
"oldValue": "Old value",
|
package/lib/cjs/i18n/zh-CN.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "电子邮箱",
|
|
37
37
|
"emailAddresses": "电子邮箱",
|
|
38
38
|
"enabled": "已启用",
|
|
39
|
+
"entityStatus": "状态",
|
|
39
40
|
"etsoo": "亿速思维",
|
|
40
41
|
"expiry": "到期时间",
|
|
41
42
|
"failed": "操作失败",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "否",
|
|
57
58
|
"noChanges": "还没有任何修改",
|
|
58
59
|
"noData": "没有有效数据",
|
|
60
|
+
"none": "暂时没有",
|
|
59
61
|
"noOptions": "没有选项",
|
|
60
62
|
"ok": "确定",
|
|
61
63
|
"oldValue": "旧值",
|
package/lib/cjs/i18n/zh-HK.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "電子郵箱",
|
|
37
37
|
"emailAddresses": "電子郵箱",
|
|
38
38
|
"enabled": "已啟用",
|
|
39
|
+
"entityStatus": "狀態",
|
|
39
40
|
"etsoo": "億速思維",
|
|
40
41
|
"expiry": "到期時間",
|
|
41
42
|
"failed": "操作失敗",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "否",
|
|
57
58
|
"noChanges": "還沒有任何修改",
|
|
58
59
|
"noData": "沒有有效數據",
|
|
60
|
+
"none": "暫時沒有",
|
|
59
61
|
"noOptions": "沒有選項",
|
|
60
62
|
"ok": "確定",
|
|
61
63
|
"oldValue": "舊值",
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -320,8 +320,9 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
320
320
|
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
321
321
|
/**
|
|
322
322
|
* Go to the login page
|
|
323
|
+
* @param tryLogin Try to login again
|
|
323
324
|
*/
|
|
324
|
-
toLoginPage(): void;
|
|
325
|
+
toLoginPage(tryLogin?: boolean): void;
|
|
325
326
|
/**
|
|
326
327
|
* Transform URL
|
|
327
328
|
* @param url URL
|
|
@@ -723,8 +724,9 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
723
724
|
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
724
725
|
/**
|
|
725
726
|
* Go to the login page
|
|
727
|
+
* @param tryLogin Try to login again
|
|
726
728
|
*/
|
|
727
|
-
toLoginPage(): void;
|
|
729
|
+
toLoginPage(tryLogin?: boolean): void;
|
|
728
730
|
/**
|
|
729
731
|
* Transform URL
|
|
730
732
|
* @param url URL
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -893,8 +893,10 @@ export class CoreApp {
|
|
|
893
893
|
}
|
|
894
894
|
/**
|
|
895
895
|
* Go to the login page
|
|
896
|
+
* @param tryLogin Try to login again
|
|
896
897
|
*/
|
|
897
|
-
toLoginPage() {
|
|
898
|
+
toLoginPage(tryLogin) {
|
|
899
|
+
const url = this.transformUrl('/' + (tryLogin ? '' : '?tryLogin=false'));
|
|
898
900
|
window.location.replace(this.transformUrl('/'));
|
|
899
901
|
}
|
|
900
902
|
/**
|
|
@@ -11,7 +11,11 @@ export var ExternalSettings;
|
|
|
11
11
|
const settings = Reflect.get(globalThis, 'settings');
|
|
12
12
|
if (typeof settings === 'object') {
|
|
13
13
|
if (typeof window !== 'undefined') {
|
|
14
|
-
|
|
14
|
+
// Host name
|
|
15
|
+
let hostname = window.location.hostname;
|
|
16
|
+
// Empty string returned under Electron
|
|
17
|
+
if (hostname === '')
|
|
18
|
+
hostname = 'localhost';
|
|
15
19
|
// replace {hostname}
|
|
16
20
|
for (const key in settings) {
|
|
17
21
|
const value = settings[key];
|
package/lib/mjs/i18n/en-US.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "Email",
|
|
37
37
|
"emailAddresses": "Email addresses",
|
|
38
38
|
"enabled": "Enabled",
|
|
39
|
+
"entityStatus": "Status",
|
|
39
40
|
"etsoo": "ETSOO",
|
|
40
41
|
"expiry": "Expiry",
|
|
41
42
|
"failed": "Operation failed",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "No",
|
|
57
58
|
"noChanges": "No changes yet",
|
|
58
59
|
"noData": "No valid data",
|
|
60
|
+
"none": "None yet",
|
|
59
61
|
"noOptions": "No options",
|
|
60
62
|
"ok": "OK",
|
|
61
63
|
"oldValue": "Old value",
|
package/lib/mjs/i18n/zh-CN.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "电子邮箱",
|
|
37
37
|
"emailAddresses": "电子邮箱",
|
|
38
38
|
"enabled": "已启用",
|
|
39
|
+
"entityStatus": "状态",
|
|
39
40
|
"etsoo": "亿速思维",
|
|
40
41
|
"expiry": "到期时间",
|
|
41
42
|
"failed": "操作失败",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "否",
|
|
57
58
|
"noChanges": "还没有任何修改",
|
|
58
59
|
"noData": "没有有效数据",
|
|
60
|
+
"none": "暂时没有",
|
|
59
61
|
"noOptions": "没有选项",
|
|
60
62
|
"ok": "确定",
|
|
61
63
|
"oldValue": "旧值",
|
package/lib/mjs/i18n/zh-HK.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "電子郵箱",
|
|
37
37
|
"emailAddresses": "電子郵箱",
|
|
38
38
|
"enabled": "已啟用",
|
|
39
|
+
"entityStatus": "狀態",
|
|
39
40
|
"etsoo": "億速思維",
|
|
40
41
|
"expiry": "到期時間",
|
|
41
42
|
"failed": "操作失敗",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "否",
|
|
57
58
|
"noChanges": "還沒有任何修改",
|
|
58
59
|
"noData": "沒有有效數據",
|
|
60
|
+
"none": "暫時沒有",
|
|
59
61
|
"noOptions": "沒有選項",
|
|
60
62
|
"ok": "確定",
|
|
61
63
|
"oldValue": "舊值",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.38",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,23 +54,23 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.1",
|
|
56
56
|
"@etsoo/restclient": "^1.0.64",
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
57
|
+
"@etsoo/shared": "^1.1.10",
|
|
58
58
|
"@types/crypto-js": "^4.1.0",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@babel/cli": "^7.
|
|
63
|
-
"@babel/core": "^7.
|
|
64
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
62
|
+
"@babel/cli": "^7.17.0",
|
|
63
|
+
"@babel/core": "^7.17.0",
|
|
64
|
+
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
65
65
|
"@babel/preset-env": "^7.16.11",
|
|
66
|
-
"@babel/runtime-corejs3": "^7.
|
|
66
|
+
"@babel/runtime-corejs3": "^7.17.0",
|
|
67
67
|
"@types/jest": "^27.4.0",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
69
|
-
"@typescript-eslint/parser": "^5.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.11.0",
|
|
70
70
|
"eslint": "^8.8.0",
|
|
71
71
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
72
72
|
"eslint-plugin-import": "^2.25.4",
|
|
73
|
-
"jest": "^27.
|
|
73
|
+
"jest": "^27.5.0",
|
|
74
74
|
"ts-jest": "^27.1.3",
|
|
75
75
|
"typescript": "^4.5.5"
|
|
76
76
|
}
|
package/src/app/CoreApp.ts
CHANGED
|
@@ -437,8 +437,9 @@ export interface ICoreApp<
|
|
|
437
437
|
|
|
438
438
|
/**
|
|
439
439
|
* Go to the login page
|
|
440
|
+
* @param tryLogin Try to login again
|
|
440
441
|
*/
|
|
441
|
-
toLoginPage(): void;
|
|
442
|
+
toLoginPage(tryLogin?: boolean): void;
|
|
442
443
|
|
|
443
444
|
/**
|
|
444
445
|
* Transform URL
|
|
@@ -1611,8 +1612,12 @@ export abstract class CoreApp<
|
|
|
1611
1612
|
|
|
1612
1613
|
/**
|
|
1613
1614
|
* Go to the login page
|
|
1615
|
+
* @param tryLogin Try to login again
|
|
1614
1616
|
*/
|
|
1615
|
-
toLoginPage() {
|
|
1617
|
+
toLoginPage(tryLogin?: boolean) {
|
|
1618
|
+
const url = this.transformUrl(
|
|
1619
|
+
'/' + (tryLogin ? '' : '?tryLogin=false')
|
|
1620
|
+
);
|
|
1616
1621
|
window.location.replace(this.transformUrl('/'));
|
|
1617
1622
|
}
|
|
1618
1623
|
|
|
@@ -40,7 +40,12 @@ export namespace ExternalSettings {
|
|
|
40
40
|
const settings = Reflect.get(globalThis, 'settings');
|
|
41
41
|
if (typeof settings === 'object') {
|
|
42
42
|
if (typeof window !== 'undefined') {
|
|
43
|
-
|
|
43
|
+
// Host name
|
|
44
|
+
let hostname = window.location.hostname;
|
|
45
|
+
|
|
46
|
+
// Empty string returned under Electron
|
|
47
|
+
if (hostname === '') hostname = 'localhost';
|
|
48
|
+
|
|
44
49
|
// replace {hostname}
|
|
45
50
|
for (const key in settings) {
|
|
46
51
|
const value = settings[key];
|
package/src/i18n/en-US.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "Email",
|
|
37
37
|
"emailAddresses": "Email addresses",
|
|
38
38
|
"enabled": "Enabled",
|
|
39
|
+
"entityStatus": "Status",
|
|
39
40
|
"etsoo": "ETSOO",
|
|
40
41
|
"expiry": "Expiry",
|
|
41
42
|
"failed": "Operation failed",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "No",
|
|
57
58
|
"noChanges": "No changes yet",
|
|
58
59
|
"noData": "No valid data",
|
|
60
|
+
"none": "None yet",
|
|
59
61
|
"noOptions": "No options",
|
|
60
62
|
"ok": "OK",
|
|
61
63
|
"oldValue": "Old value",
|
package/src/i18n/zh-CN.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "电子邮箱",
|
|
37
37
|
"emailAddresses": "电子邮箱",
|
|
38
38
|
"enabled": "已启用",
|
|
39
|
+
"entityStatus": "状态",
|
|
39
40
|
"etsoo": "亿速思维",
|
|
40
41
|
"expiry": "到期时间",
|
|
41
42
|
"failed": "操作失败",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "否",
|
|
57
58
|
"noChanges": "还没有任何修改",
|
|
58
59
|
"noData": "没有有效数据",
|
|
60
|
+
"none": "暂时没有",
|
|
59
61
|
"noOptions": "没有选项",
|
|
60
62
|
"ok": "确定",
|
|
61
63
|
"oldValue": "旧值",
|
package/src/i18n/zh-HK.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"email": "電子郵箱",
|
|
37
37
|
"emailAddresses": "電子郵箱",
|
|
38
38
|
"enabled": "已啟用",
|
|
39
|
+
"entityStatus": "狀態",
|
|
39
40
|
"etsoo": "億速思維",
|
|
40
41
|
"expiry": "到期時間",
|
|
41
42
|
"failed": "操作失敗",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"no": "否",
|
|
57
58
|
"noChanges": "還沒有任何修改",
|
|
58
59
|
"noData": "沒有有效數據",
|
|
60
|
+
"none": "暫時沒有",
|
|
59
61
|
"noOptions": "沒有選項",
|
|
60
62
|
"ok": "確定",
|
|
61
63
|
"oldValue": "舊值",
|