@etsoo/appscript 1.6.5 → 1.6.7
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 +6 -0
- package/lib/cjs/app/CoreApp.js +19 -0
- package/lib/cjs/app/IApp.d.ts +6 -0
- package/lib/cjs/i18n/en.json +1 -0
- package/lib/cjs/i18n/zh-Hans.json +1 -0
- package/lib/cjs/i18n/zh-Hant.json +1 -0
- package/lib/mjs/app/CoreApp.d.ts +6 -0
- package/lib/mjs/app/CoreApp.js +19 -0
- package/lib/mjs/app/IApp.d.ts +6 -0
- package/lib/mjs/i18n/en.json +1 -0
- package/lib/mjs/i18n/zh-Hans.json +1 -0
- package/lib/mjs/i18n/zh-Hant.json +1 -0
- package/package.json +1 -1
- package/src/app/CoreApp.ts +18 -0
- package/src/app/IApp.ts +7 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/zh-Hans.json +1 -0
- package/src/i18n/zh-Hant.json +1 -0
package/lib/cjs/app/CoreApp.d.ts
CHANGED
|
@@ -595,6 +595,12 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
595
595
|
* @returns Result
|
|
596
596
|
*/
|
|
597
597
|
isManagerUser(): boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Load URL
|
|
600
|
+
* @param url URL
|
|
601
|
+
* @param targetOrigin Target origin
|
|
602
|
+
*/
|
|
603
|
+
loadUrl(url: string, targetOrigin?: string): void;
|
|
598
604
|
/**
|
|
599
605
|
* Navigate to Url or delta
|
|
600
606
|
* @param url Url or delta
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -1396,6 +1396,25 @@ class CoreApp {
|
|
|
1396
1396
|
isManagerUser() {
|
|
1397
1397
|
return this.hasMinPermission(UserRole_1.UserRole.Manager);
|
|
1398
1398
|
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Load URL
|
|
1401
|
+
* @param url URL
|
|
1402
|
+
* @param targetOrigin Target origin
|
|
1403
|
+
*/
|
|
1404
|
+
loadUrl(url, targetOrigin) {
|
|
1405
|
+
// Is it embeded?
|
|
1406
|
+
if (this.embedded && targetOrigin) {
|
|
1407
|
+
globalThis.parent.postMessage([this.coreName + "Url", url], targetOrigin);
|
|
1408
|
+
}
|
|
1409
|
+
else {
|
|
1410
|
+
if (BridgeUtils_1.BridgeUtils.host == null) {
|
|
1411
|
+
globalThis.location.href = url;
|
|
1412
|
+
}
|
|
1413
|
+
else {
|
|
1414
|
+
BridgeUtils_1.BridgeUtils.host.loadApp(this.coreName, url);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1399
1418
|
/**
|
|
1400
1419
|
* Navigate to Url or delta
|
|
1401
1420
|
* @param url Url or delta
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -542,6 +542,12 @@ export interface IApp {
|
|
|
542
542
|
* @param password Input password
|
|
543
543
|
*/
|
|
544
544
|
isValidPassword(password: string): boolean;
|
|
545
|
+
/**
|
|
546
|
+
* Load URL
|
|
547
|
+
* @param url URL
|
|
548
|
+
* @param targetOrigin Target origin
|
|
549
|
+
*/
|
|
550
|
+
loadUrl(url: string, targetOrigin?: string): void;
|
|
545
551
|
/**
|
|
546
552
|
* Navigate to Url or delta
|
|
547
553
|
* @param url Url or delta
|
package/lib/cjs/i18n/en.json
CHANGED
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"name": "Name",
|
|
122
122
|
"nameB": "Name",
|
|
123
123
|
"networkError": "The local network is faulty and cannot connect to the remote server",
|
|
124
|
+
"networkFailure": "Network connection failed, please try again!",
|
|
124
125
|
"newPassword": "New password",
|
|
125
126
|
"newPasswordRequired": "Please enter your new password",
|
|
126
127
|
"newPasswordTip": "New password should be different",
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -595,6 +595,12 @@ export declare abstract class CoreApp<U extends IUser, S extends IAppSettings, N
|
|
|
595
595
|
* @returns Result
|
|
596
596
|
*/
|
|
597
597
|
isManagerUser(): boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Load URL
|
|
600
|
+
* @param url URL
|
|
601
|
+
* @param targetOrigin Target origin
|
|
602
|
+
*/
|
|
603
|
+
loadUrl(url: string, targetOrigin?: string): void;
|
|
598
604
|
/**
|
|
599
605
|
* Navigate to Url or delta
|
|
600
606
|
* @param url Url or delta
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -1393,6 +1393,25 @@ export class CoreApp {
|
|
|
1393
1393
|
isManagerUser() {
|
|
1394
1394
|
return this.hasMinPermission(UserRole.Manager);
|
|
1395
1395
|
}
|
|
1396
|
+
/**
|
|
1397
|
+
* Load URL
|
|
1398
|
+
* @param url URL
|
|
1399
|
+
* @param targetOrigin Target origin
|
|
1400
|
+
*/
|
|
1401
|
+
loadUrl(url, targetOrigin) {
|
|
1402
|
+
// Is it embeded?
|
|
1403
|
+
if (this.embedded && targetOrigin) {
|
|
1404
|
+
globalThis.parent.postMessage([this.coreName + "Url", url], targetOrigin);
|
|
1405
|
+
}
|
|
1406
|
+
else {
|
|
1407
|
+
if (BridgeUtils.host == null) {
|
|
1408
|
+
globalThis.location.href = url;
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
BridgeUtils.host.loadApp(this.coreName, url);
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1396
1415
|
/**
|
|
1397
1416
|
* Navigate to Url or delta
|
|
1398
1417
|
* @param url Url or delta
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -542,6 +542,12 @@ export interface IApp {
|
|
|
542
542
|
* @param password Input password
|
|
543
543
|
*/
|
|
544
544
|
isValidPassword(password: string): boolean;
|
|
545
|
+
/**
|
|
546
|
+
* Load URL
|
|
547
|
+
* @param url URL
|
|
548
|
+
* @param targetOrigin Target origin
|
|
549
|
+
*/
|
|
550
|
+
loadUrl(url: string, targetOrigin?: string): void;
|
|
545
551
|
/**
|
|
546
552
|
* Navigate to Url or delta
|
|
547
553
|
* @param url Url or delta
|
package/lib/mjs/i18n/en.json
CHANGED
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"name": "Name",
|
|
122
122
|
"nameB": "Name",
|
|
123
123
|
"networkError": "The local network is faulty and cannot connect to the remote server",
|
|
124
|
+
"networkFailure": "Network connection failed, please try again!",
|
|
124
125
|
"newPassword": "New password",
|
|
125
126
|
"newPasswordRequired": "Please enter your new password",
|
|
126
127
|
"newPasswordTip": "New password should be different",
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -1913,6 +1913,24 @@ export abstract class CoreApp<
|
|
|
1913
1913
|
return this.hasMinPermission(UserRole.Manager);
|
|
1914
1914
|
}
|
|
1915
1915
|
|
|
1916
|
+
/**
|
|
1917
|
+
* Load URL
|
|
1918
|
+
* @param url URL
|
|
1919
|
+
* @param targetOrigin Target origin
|
|
1920
|
+
*/
|
|
1921
|
+
loadUrl(url: string, targetOrigin?: string) {
|
|
1922
|
+
// Is it embeded?
|
|
1923
|
+
if (this.embedded && targetOrigin) {
|
|
1924
|
+
globalThis.parent.postMessage([this.coreName + "Url", url], targetOrigin);
|
|
1925
|
+
} else {
|
|
1926
|
+
if (BridgeUtils.host == null) {
|
|
1927
|
+
globalThis.location.href = url;
|
|
1928
|
+
} else {
|
|
1929
|
+
BridgeUtils.host.loadApp(this.coreName, url);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1916
1934
|
/**
|
|
1917
1935
|
* Navigate to Url or delta
|
|
1918
1936
|
* @param url Url or delta
|
package/src/app/IApp.ts
CHANGED
|
@@ -715,6 +715,13 @@ export interface IApp {
|
|
|
715
715
|
*/
|
|
716
716
|
isValidPassword(password: string): boolean;
|
|
717
717
|
|
|
718
|
+
/**
|
|
719
|
+
* Load URL
|
|
720
|
+
* @param url URL
|
|
721
|
+
* @param targetOrigin Target origin
|
|
722
|
+
*/
|
|
723
|
+
loadUrl(url: string, targetOrigin?: string): void;
|
|
724
|
+
|
|
718
725
|
/**
|
|
719
726
|
* Navigate to Url or delta
|
|
720
727
|
* @param url Url or delta
|
package/src/i18n/en.json
CHANGED
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"name": "Name",
|
|
122
122
|
"nameB": "Name",
|
|
123
123
|
"networkError": "The local network is faulty and cannot connect to the remote server",
|
|
124
|
+
"networkFailure": "Network connection failed, please try again!",
|
|
124
125
|
"newPassword": "New password",
|
|
125
126
|
"newPasswordRequired": "Please enter your new password",
|
|
126
127
|
"newPasswordTip": "New password should be different",
|
package/src/i18n/zh-Hans.json
CHANGED
package/src/i18n/zh-Hant.json
CHANGED