@akinon/app-shared 0.4.0 → 0.5.1
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/dist/events.d.ts +71 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +81 -11
- package/dist/sha256.d.ts +2 -1
- package/dist/sha256.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/events.d.ts
CHANGED
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
export declare const EVENTS: {
|
|
1
|
+
export declare const EVENTS: {
|
|
2
|
+
/**
|
|
3
|
+
* The event that is emitted when the AppShell sends
|
|
4
|
+
* the application ID to the client application.
|
|
5
|
+
*
|
|
6
|
+
* AppShell → AppClient
|
|
7
|
+
*/
|
|
8
|
+
SET_APP_ID: string;
|
|
9
|
+
/**
|
|
10
|
+
* The event that is emitted when client applications
|
|
11
|
+
* sends their configuration to the AppShell.
|
|
12
|
+
*
|
|
13
|
+
* AppClient → AppShell
|
|
14
|
+
*/
|
|
15
|
+
SET_CONFIG: string;
|
|
16
|
+
/**
|
|
17
|
+
* The event that is emitted when the AppShell sends
|
|
18
|
+
* data to the client application.
|
|
19
|
+
*
|
|
20
|
+
* AppShell → AppClient
|
|
21
|
+
*/
|
|
22
|
+
SET_DATA: string;
|
|
23
|
+
/**
|
|
24
|
+
* The event that is emitted when client applications
|
|
25
|
+
* loads and sends their css height information to the AppShell.
|
|
26
|
+
*
|
|
27
|
+
* AppClient → AppShell
|
|
28
|
+
*/
|
|
29
|
+
SET_HEIGHT: string;
|
|
30
|
+
/**
|
|
31
|
+
* The event that is emitted to client applications when params property
|
|
32
|
+
* passed to the PluginRenderer component is received or changed.
|
|
33
|
+
*
|
|
34
|
+
* AppShell → AppClient
|
|
35
|
+
*/
|
|
36
|
+
SET_PARAMS: string;
|
|
37
|
+
/**
|
|
38
|
+
* The event that is emitted when client applications trigger
|
|
39
|
+
* custom actions defined on the AppShell.
|
|
40
|
+
*
|
|
41
|
+
* AppClient → AppShell
|
|
42
|
+
*/
|
|
43
|
+
INVOKE_ACTION: string;
|
|
44
|
+
/**
|
|
45
|
+
* The event that is emitted when client applications trigger
|
|
46
|
+
* default actions defined on the AppShell.
|
|
47
|
+
*
|
|
48
|
+
* AppClient → AppShell
|
|
49
|
+
*/
|
|
50
|
+
INVOKE_DEFAULT_ACTION: string;
|
|
51
|
+
/**
|
|
52
|
+
* The event that is emitted when client applications trigger
|
|
53
|
+
* navigation for their shell application.
|
|
54
|
+
*
|
|
55
|
+
* AppClient → AppShell
|
|
56
|
+
*/
|
|
57
|
+
NAVIGATE: string;
|
|
58
|
+
/**
|
|
59
|
+
* The event that is emitted when shell applications trigger
|
|
60
|
+
* navigation for their child applications.
|
|
61
|
+
*
|
|
62
|
+
* AppShell → AppClient
|
|
63
|
+
*/
|
|
64
|
+
NAVIGATE_CHILD: string;
|
|
65
|
+
};
|
|
66
|
+
export declare const DEFAULT_ACTION_KEYS: {
|
|
67
|
+
showConfirmationDialog: string;
|
|
68
|
+
showModalDialog: string;
|
|
69
|
+
showToast: string;
|
|
70
|
+
showErrorMessage: string;
|
|
71
|
+
};
|
|
2
72
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;IACjB;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;CAEJ,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAK/B,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={SET_APP_ID:"SET_APP_ID",SET_CONFIG:"SET_CONFIG",SET_DATA:"SET_DATA",SET_HEIGHT:"SET_HEIGHT",SET_PARAMS:"SET_PARAMS",INVOKE_ACTION:"INVOKE_ACTION",INVOKE_DEFAULT_ACTION:"INVOKE_DEFAULT_ACTION",NAVIGATE:"NAVIGATE",NAVIGATE_CHILD:"NAVIGATE_CHILD"},A={showConfirmationDialog:"showConfirmationDialog",showModalDialog:"showModalDialog",showToast:"showToast",showErrorMessage:"showErrorMessage"},E=async o=>{const s=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(JSON.stringify(o))),e=[],T=new DataView(s);for(let t=0;t<T.byteLength;t+=4)e.push(("00000000"+T.getUint32(t).toString(16)).slice(-8));return e.join("")},n=async o=>(await E(o)).slice(0,7);exports.DEFAULT_ACTION_KEYS=A;exports.EVENTS=a;exports.getShortSha256=n;exports.hashValue=E;
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,84 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const A = {
|
|
2
|
+
/**
|
|
3
|
+
* The event that is emitted when the AppShell sends
|
|
4
|
+
* the application ID to the client application.
|
|
5
|
+
*
|
|
6
|
+
* AppShell → AppClient
|
|
7
|
+
*/
|
|
8
|
+
SET_APP_ID: "SET_APP_ID",
|
|
9
|
+
/**
|
|
10
|
+
* The event that is emitted when client applications
|
|
11
|
+
* sends their configuration to the AppShell.
|
|
12
|
+
*
|
|
13
|
+
* AppClient → AppShell
|
|
14
|
+
*/
|
|
15
|
+
SET_CONFIG: "SET_CONFIG",
|
|
16
|
+
/**
|
|
17
|
+
* The event that is emitted when the AppShell sends
|
|
18
|
+
* data to the client application.
|
|
19
|
+
*
|
|
20
|
+
* AppShell → AppClient
|
|
21
|
+
*/
|
|
22
|
+
SET_DATA: "SET_DATA",
|
|
23
|
+
/**
|
|
24
|
+
* The event that is emitted when client applications
|
|
25
|
+
* loads and sends their css height information to the AppShell.
|
|
26
|
+
*
|
|
27
|
+
* AppClient → AppShell
|
|
28
|
+
*/
|
|
29
|
+
SET_HEIGHT: "SET_HEIGHT",
|
|
30
|
+
/**
|
|
31
|
+
* The event that is emitted to client applications when params property
|
|
32
|
+
* passed to the PluginRenderer component is received or changed.
|
|
33
|
+
*
|
|
34
|
+
* AppShell → AppClient
|
|
35
|
+
*/
|
|
36
|
+
SET_PARAMS: "SET_PARAMS",
|
|
37
|
+
/**
|
|
38
|
+
* The event that is emitted when client applications trigger
|
|
39
|
+
* custom actions defined on the AppShell.
|
|
40
|
+
*
|
|
41
|
+
* AppClient → AppShell
|
|
42
|
+
*/
|
|
43
|
+
INVOKE_ACTION: "INVOKE_ACTION",
|
|
44
|
+
/**
|
|
45
|
+
* The event that is emitted when client applications trigger
|
|
46
|
+
* default actions defined on the AppShell.
|
|
47
|
+
*
|
|
48
|
+
* AppClient → AppShell
|
|
49
|
+
*/
|
|
50
|
+
INVOKE_DEFAULT_ACTION: "INVOKE_DEFAULT_ACTION",
|
|
51
|
+
/**
|
|
52
|
+
* The event that is emitted when client applications trigger
|
|
53
|
+
* navigation for their shell application.
|
|
54
|
+
*
|
|
55
|
+
* AppClient → AppShell
|
|
56
|
+
*/
|
|
57
|
+
NAVIGATE: "NAVIGATE",
|
|
58
|
+
/**
|
|
59
|
+
* The event that is emitted when shell applications trigger
|
|
60
|
+
* navigation for their child applications.
|
|
61
|
+
*
|
|
62
|
+
* AppShell → AppClient
|
|
63
|
+
*/
|
|
64
|
+
NAVIGATE_CHILD: "NAVIGATE_CHILD"
|
|
65
|
+
}, a = {
|
|
66
|
+
showConfirmationDialog: "showConfirmationDialog",
|
|
67
|
+
showModalDialog: "showModalDialog",
|
|
68
|
+
showToast: "showToast",
|
|
69
|
+
showErrorMessage: "showErrorMessage"
|
|
70
|
+
}, e = async (o) => {
|
|
71
|
+
const t = await crypto.subtle.digest(
|
|
3
72
|
"SHA-256",
|
|
4
|
-
new TextEncoder().encode(JSON.stringify(
|
|
5
|
-
),
|
|
6
|
-
for (let
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
},
|
|
73
|
+
new TextEncoder().encode(JSON.stringify(o))
|
|
74
|
+
), T = [], E = new DataView(t);
|
|
75
|
+
for (let s = 0; s < E.byteLength; s += 4)
|
|
76
|
+
T.push(("00000000" + E.getUint32(s).toString(16)).slice(-8));
|
|
77
|
+
return T.join("");
|
|
78
|
+
}, n = async (o) => (await e(o)).slice(0, 7);
|
|
10
79
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
80
|
+
a as DEFAULT_ACTION_KEYS,
|
|
81
|
+
A as EVENTS,
|
|
82
|
+
n as getShortSha256,
|
|
83
|
+
e as hashValue
|
|
14
84
|
};
|
package/dist/sha256.d.ts
CHANGED
package/dist/sha256.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../src/sha256.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sha256.d.ts","sourceRoot":"","sources":["../src/sha256.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,SAAS,QAAe,GAAG,oBAYvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAe,GAAG,oBAG5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/app-shared",
|
|
3
3
|
"description": "Shared utilities and helper functions for app-shell and app-client packages.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"clean-package": "2.2.0",
|
|
15
15
|
"@akinon/vite-config": "^0.1.1",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
16
|
+
"eslint-config-custom": "0.1.0",
|
|
17
|
+
"tsconfig": "0.0.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {},
|
|
20
20
|
"clean-package": "../../clean-package.config.json",
|