@genesislcap/foundation-utils 14.310.2-alpha-d0e9836.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.
@@ -375,59 +375,6 @@
|
|
375
375
|
}
|
376
376
|
]
|
377
377
|
},
|
378
|
-
{
|
379
|
-
"kind": "javascript-module",
|
380
|
-
"path": "src/decorators/index.ts",
|
381
|
-
"declarations": [],
|
382
|
-
"exports": [
|
383
|
-
{
|
384
|
-
"kind": "js",
|
385
|
-
"name": "*",
|
386
|
-
"declaration": {
|
387
|
-
"name": "*",
|
388
|
-
"package": "./renderOnChange"
|
389
|
-
}
|
390
|
-
}
|
391
|
-
]
|
392
|
-
},
|
393
|
-
{
|
394
|
-
"kind": "javascript-module",
|
395
|
-
"path": "src/decorators/renderOnChange.ts",
|
396
|
-
"declarations": [
|
397
|
-
{
|
398
|
-
"kind": "function",
|
399
|
-
"name": "renderOnChange",
|
400
|
-
"parameters": [
|
401
|
-
{
|
402
|
-
"name": "target",
|
403
|
-
"type": {
|
404
|
-
"text": "FASTElement & { render(): void }"
|
405
|
-
},
|
406
|
-
"description": "The target to define the property change handler on."
|
407
|
-
},
|
408
|
-
{
|
409
|
-
"name": "name",
|
410
|
-
"type": {
|
411
|
-
"text": "string"
|
412
|
-
},
|
413
|
-
"description": "The property name."
|
414
|
-
}
|
415
|
-
],
|
416
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
417
|
-
"privacy": "public"
|
418
|
-
}
|
419
|
-
],
|
420
|
-
"exports": [
|
421
|
-
{
|
422
|
-
"kind": "js",
|
423
|
-
"name": "renderOnChange",
|
424
|
-
"declaration": {
|
425
|
-
"name": "renderOnChange",
|
426
|
-
"module": "src/decorators/renderOnChange.ts"
|
427
|
-
}
|
428
|
-
}
|
429
|
-
]
|
430
|
-
},
|
431
378
|
{
|
432
379
|
"kind": "javascript-module",
|
433
380
|
"path": "src/design-system/design-system.ts",
|
@@ -548,6 +495,59 @@
|
|
548
495
|
}
|
549
496
|
]
|
550
497
|
},
|
498
|
+
{
|
499
|
+
"kind": "javascript-module",
|
500
|
+
"path": "src/decorators/index.ts",
|
501
|
+
"declarations": [],
|
502
|
+
"exports": [
|
503
|
+
{
|
504
|
+
"kind": "js",
|
505
|
+
"name": "*",
|
506
|
+
"declaration": {
|
507
|
+
"name": "*",
|
508
|
+
"package": "./renderOnChange"
|
509
|
+
}
|
510
|
+
}
|
511
|
+
]
|
512
|
+
},
|
513
|
+
{
|
514
|
+
"kind": "javascript-module",
|
515
|
+
"path": "src/decorators/renderOnChange.ts",
|
516
|
+
"declarations": [
|
517
|
+
{
|
518
|
+
"kind": "function",
|
519
|
+
"name": "renderOnChange",
|
520
|
+
"parameters": [
|
521
|
+
{
|
522
|
+
"name": "target",
|
523
|
+
"type": {
|
524
|
+
"text": "FASTElement & { render(): void }"
|
525
|
+
},
|
526
|
+
"description": "The target to define the property change handler on."
|
527
|
+
},
|
528
|
+
{
|
529
|
+
"name": "name",
|
530
|
+
"type": {
|
531
|
+
"text": "string"
|
532
|
+
},
|
533
|
+
"description": "The property name."
|
534
|
+
}
|
535
|
+
],
|
536
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
537
|
+
"privacy": "public"
|
538
|
+
}
|
539
|
+
],
|
540
|
+
"exports": [
|
541
|
+
{
|
542
|
+
"kind": "js",
|
543
|
+
"name": "renderOnChange",
|
544
|
+
"declaration": {
|
545
|
+
"name": "renderOnChange",
|
546
|
+
"module": "src/decorators/renderOnChange.ts"
|
547
|
+
}
|
548
|
+
}
|
549
|
+
]
|
550
|
+
},
|
551
551
|
{
|
552
552
|
"kind": "javascript-module",
|
553
553
|
"path": "src/directives/index.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,14 +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
|
-
console.log('Creating dialog', this.dialog);
|
12
11
|
this.setupEventListeners();
|
13
12
|
}
|
14
13
|
setupEventListeners() {
|
@@ -22,6 +21,11 @@ export class InactivityManager {
|
|
22
21
|
showWarningDialog(remainingSeconds) {
|
23
22
|
if (this.isDialogVisible)
|
24
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
|
+
}
|
25
29
|
// Add dialog to DOM if not already there
|
26
30
|
if (!this.dialog.isConnected) {
|
27
31
|
document.body.appendChild(this.dialog);
|
@@ -34,7 +38,7 @@ export class InactivityManager {
|
|
34
38
|
});
|
35
39
|
}
|
36
40
|
hideWarningDialog() {
|
37
|
-
if (!this.isDialogVisible)
|
41
|
+
if (!this.isDialogVisible || !this.dialog)
|
38
42
|
return;
|
39
43
|
this.isDialogVisible = false;
|
40
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
|
}
|