@genesislcap/foundation-utils 14.310.2-alpha-64966a4.0 → 14.310.2-alpha-ac92b6e.0
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.
@@ -571,6 +571,21 @@
|
|
571
571
|
}
|
572
572
|
]
|
573
573
|
},
|
574
|
+
{
|
575
|
+
"kind": "javascript-module",
|
576
|
+
"path": "src/encoding/index.ts",
|
577
|
+
"declarations": [],
|
578
|
+
"exports": [
|
579
|
+
{
|
580
|
+
"kind": "js",
|
581
|
+
"name": "*",
|
582
|
+
"declaration": {
|
583
|
+
"name": "*",
|
584
|
+
"package": "./base64"
|
585
|
+
}
|
586
|
+
}
|
587
|
+
]
|
588
|
+
},
|
574
589
|
{
|
575
590
|
"kind": "javascript-module",
|
576
591
|
"path": "src/env/index.ts",
|
@@ -1029,21 +1044,6 @@
|
|
1029
1044
|
}
|
1030
1045
|
]
|
1031
1046
|
},
|
1032
|
-
{
|
1033
|
-
"kind": "javascript-module",
|
1034
|
-
"path": "src/encoding/index.ts",
|
1035
|
-
"declarations": [],
|
1036
|
-
"exports": [
|
1037
|
-
{
|
1038
|
-
"kind": "js",
|
1039
|
-
"name": "*",
|
1040
|
-
"declaration": {
|
1041
|
-
"name": "*",
|
1042
|
-
"package": "./base64"
|
1043
|
-
}
|
1044
|
-
}
|
1045
|
-
]
|
1046
|
-
},
|
1047
1047
|
{
|
1048
1048
|
"kind": "javascript-module",
|
1049
1049
|
"path": "src/error/errorMap.ts",
|
@@ -1740,10 +1740,10 @@
|
|
1740
1740
|
"kind": "field",
|
1741
1741
|
"name": "dialog",
|
1742
1742
|
"type": {
|
1743
|
-
"text": "InactivityDialog"
|
1743
|
+
"text": "InactivityDialog | null"
|
1744
1744
|
},
|
1745
1745
|
"privacy": "private",
|
1746
|
-
"default": "
|
1746
|
+
"default": "null"
|
1747
1747
|
},
|
1748
1748
|
{
|
1749
1749
|
"kind": "field",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"inactivity-manager.d.ts","sourceRoot":"","sources":["../../../src/inactivity/inactivity-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE3E,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"inactivity-manager.d.ts","sourceRoot":"","sources":["../../../src/inactivity/inactivity-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE3E,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,eAAe,CAAkB;gBAE7B,MAAM,EAAE,uBAAuB;IAS3C,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,aAAa;IAQd,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAKZ,KAAK,IAAI,IAAI;IAKb,OAAO,IAAI,IAAI;IAKf,UAAU,IAAI,iBAAiB;IAI/B,gBAAgB,IAAI,OAAO;CAGnC"}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { InactivityService } from './inactivity-service';
|
2
2
|
export class InactivityManager {
|
3
3
|
constructor(config) {
|
4
|
+
this.dialog = null;
|
4
5
|
this.isDialogVisible = false;
|
5
6
|
this.config = config;
|
6
7
|
this.service = new InactivityService({
|
7
8
|
timeoutMinutes: config.timeoutMinutes,
|
8
9
|
warningMinutes: config.warningMinutes,
|
9
10
|
});
|
10
|
-
this.dialog = document.createElement('inactivity-dialog');
|
11
11
|
this.setupEventListeners();
|
12
12
|
}
|
13
13
|
setupEventListeners() {
|
@@ -21,6 +21,11 @@ export class InactivityManager {
|
|
21
21
|
showWarningDialog(remainingSeconds) {
|
22
22
|
if (this.isDialogVisible)
|
23
23
|
return;
|
24
|
+
// Create dialog lazily if it doesn't exist
|
25
|
+
if (!this.dialog) {
|
26
|
+
this.dialog = document.createElement('inactivity-dialog');
|
27
|
+
console.log('Creating dialog', this.dialog);
|
28
|
+
}
|
24
29
|
// Add dialog to DOM if not already there
|
25
30
|
if (!this.dialog.isConnected) {
|
26
31
|
document.body.appendChild(this.dialog);
|
@@ -33,7 +38,7 @@ export class InactivityManager {
|
|
33
38
|
});
|
34
39
|
}
|
35
40
|
hideWarningDialog() {
|
36
|
-
if (!this.isDialogVisible)
|
41
|
+
if (!this.isDialogVisible || !this.dialog)
|
37
42
|
return;
|
38
43
|
this.isDialogVisible = false;
|
39
44
|
this.dialog.hide();
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genesislcap/foundation-utils",
|
3
3
|
"description": "Genesis Foundation Utils",
|
4
|
-
"version": "14.310.2-alpha-
|
4
|
+
"version": "14.310.2-alpha-ac92b6e.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -27,19 +27,19 @@
|
|
27
27
|
}
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
|
-
"@genesislcap/foundation-testing": "14.310.2-alpha-
|
31
|
-
"@genesislcap/genx": "14.310.2-alpha-
|
32
|
-
"@genesislcap/rollup-builder": "14.310.2-alpha-
|
33
|
-
"@genesislcap/ts-builder": "14.310.2-alpha-
|
34
|
-
"@genesislcap/uvu-playwright-builder": "14.310.2-alpha-
|
35
|
-
"@genesislcap/vite-builder": "14.310.2-alpha-
|
36
|
-
"@genesislcap/webpack-builder": "14.310.2-alpha-
|
30
|
+
"@genesislcap/foundation-testing": "14.310.2-alpha-ac92b6e.0",
|
31
|
+
"@genesislcap/genx": "14.310.2-alpha-ac92b6e.0",
|
32
|
+
"@genesislcap/rollup-builder": "14.310.2-alpha-ac92b6e.0",
|
33
|
+
"@genesislcap/ts-builder": "14.310.2-alpha-ac92b6e.0",
|
34
|
+
"@genesislcap/uvu-playwright-builder": "14.310.2-alpha-ac92b6e.0",
|
35
|
+
"@genesislcap/vite-builder": "14.310.2-alpha-ac92b6e.0",
|
36
|
+
"@genesislcap/webpack-builder": "14.310.2-alpha-ac92b6e.0",
|
37
37
|
"@types/json-schema": "^7.0.11"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@genesislcap/expression-builder": "14.310.2-alpha-
|
41
|
-
"@genesislcap/foundation-logger": "14.310.2-alpha-
|
42
|
-
"@genesislcap/web-core": "14.310.2-alpha-
|
40
|
+
"@genesislcap/expression-builder": "14.310.2-alpha-ac92b6e.0",
|
41
|
+
"@genesislcap/foundation-logger": "14.310.2-alpha-ac92b6e.0",
|
42
|
+
"@genesislcap/web-core": "14.310.2-alpha-ac92b6e.0",
|
43
43
|
"@microsoft/fast-components": "2.30.6",
|
44
44
|
"@microsoft/fast-element": "1.14.0",
|
45
45
|
"@microsoft/fast-foundation": "2.49.6",
|
@@ -56,5 +56,5 @@
|
|
56
56
|
"access": "public"
|
57
57
|
},
|
58
58
|
"customElements": "dist/custom-elements.json",
|
59
|
-
"gitHead": "
|
59
|
+
"gitHead": "4e9a8ce32b197409ab25d607cccab58f148f7358"
|
60
60
|
}
|