@zanichelli/albe-web-components 2.33.3 → 2.33.4
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/cjs/z-alert_66.cjs.entry.js +8 -9
- package/dist/collection/components/z-popover/index.js +8 -9
- package/dist/esm/z-alert_66.entry.js +8 -9
- package/dist/types/components/z-popover/index.d.ts +1 -1
- package/dist/web-components-library/{p-6719b8e1.entry.js → p-57ceab75.entry.js} +2 -2
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-002ed333.js +1 -0
- package/www/build/{p-6719b8e1.entry.js → p-57ceab75.entry.js} +2 -2
- package/www/build/p-ea943cbd.css +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/CHANGELOG.md +0 -1214
- package/src-react/index.ts +0 -1
- package/www/build/p-97a11655.css +0 -789
- package/www/build/p-b9f0c115.js +0 -122
|
@@ -2551,9 +2551,11 @@ const ZPopover = class {
|
|
|
2551
2551
|
/** [optional] Sets padding for Popover container */
|
|
2552
2552
|
this.padding = "8px";
|
|
2553
2553
|
this.isVisible = false;
|
|
2554
|
-
this.defaultPosition = this.position;
|
|
2555
2554
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
2556
2555
|
}
|
|
2556
|
+
componentDidLoad() {
|
|
2557
|
+
this.checkSpaceAvailable();
|
|
2558
|
+
}
|
|
2557
2559
|
closePopover() {
|
|
2558
2560
|
this.isVisible = false;
|
|
2559
2561
|
}
|
|
@@ -2581,16 +2583,13 @@ const ZPopover = class {
|
|
|
2581
2583
|
}
|
|
2582
2584
|
}
|
|
2583
2585
|
checkSpaceAvailable() {
|
|
2584
|
-
if (!this.isVisible) {
|
|
2585
|
-
this.position = this.defaultPosition;
|
|
2586
|
-
return;
|
|
2587
|
-
}
|
|
2588
2586
|
const width = document.body.clientWidth;
|
|
2589
2587
|
const height = window.innerHeight;
|
|
2590
|
-
const
|
|
2591
|
-
const
|
|
2592
|
-
const
|
|
2593
|
-
const
|
|
2588
|
+
const rect = this.popoverElem.getBoundingClientRect();
|
|
2589
|
+
const l = rect.left;
|
|
2590
|
+
const r = rect.right;
|
|
2591
|
+
const t = rect.top;
|
|
2592
|
+
const b = rect.bottom;
|
|
2594
2593
|
let firstSide = this.position.split("-")[0];
|
|
2595
2594
|
let secondSide = this.position.split("-")[1];
|
|
2596
2595
|
// If top is outside viewport
|
|
@@ -20,9 +20,11 @@ export class ZPopover {
|
|
|
20
20
|
/** [optional] Sets padding for Popover container */
|
|
21
21
|
this.padding = "8px";
|
|
22
22
|
this.isVisible = false;
|
|
23
|
-
this.defaultPosition = this.position;
|
|
24
23
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
25
24
|
}
|
|
25
|
+
componentDidLoad() {
|
|
26
|
+
this.checkSpaceAvailable();
|
|
27
|
+
}
|
|
26
28
|
closePopover() {
|
|
27
29
|
this.isVisible = false;
|
|
28
30
|
}
|
|
@@ -50,16 +52,13 @@ export class ZPopover {
|
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
checkSpaceAvailable() {
|
|
53
|
-
if (!this.isVisible) {
|
|
54
|
-
this.position = this.defaultPosition;
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
55
|
const width = document.body.clientWidth;
|
|
58
56
|
const height = window.innerHeight;
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
57
|
+
const rect = this.popoverElem.getBoundingClientRect();
|
|
58
|
+
const l = rect.left;
|
|
59
|
+
const r = rect.right;
|
|
60
|
+
const t = rect.top;
|
|
61
|
+
const b = rect.bottom;
|
|
63
62
|
let firstSide = this.position.split("-")[0];
|
|
64
63
|
let secondSide = this.position.split("-")[1];
|
|
65
64
|
// If top is outside viewport
|
|
@@ -2547,9 +2547,11 @@ const ZPopover = class {
|
|
|
2547
2547
|
/** [optional] Sets padding for Popover container */
|
|
2548
2548
|
this.padding = "8px";
|
|
2549
2549
|
this.isVisible = false;
|
|
2550
|
-
this.defaultPosition = this.position;
|
|
2551
2550
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
2552
2551
|
}
|
|
2552
|
+
componentDidLoad() {
|
|
2553
|
+
this.checkSpaceAvailable();
|
|
2554
|
+
}
|
|
2553
2555
|
closePopover() {
|
|
2554
2556
|
this.isVisible = false;
|
|
2555
2557
|
}
|
|
@@ -2577,16 +2579,13 @@ const ZPopover = class {
|
|
|
2577
2579
|
}
|
|
2578
2580
|
}
|
|
2579
2581
|
checkSpaceAvailable() {
|
|
2580
|
-
if (!this.isVisible) {
|
|
2581
|
-
this.position = this.defaultPosition;
|
|
2582
|
-
return;
|
|
2583
|
-
}
|
|
2584
2582
|
const width = document.body.clientWidth;
|
|
2585
2583
|
const height = window.innerHeight;
|
|
2586
|
-
const
|
|
2587
|
-
const
|
|
2588
|
-
const
|
|
2589
|
-
const
|
|
2584
|
+
const rect = this.popoverElem.getBoundingClientRect();
|
|
2585
|
+
const l = rect.left;
|
|
2586
|
+
const r = rect.right;
|
|
2587
|
+
const t = rect.top;
|
|
2588
|
+
const b = rect.bottom;
|
|
2590
2589
|
let firstSide = this.position.split("-")[0];
|
|
2591
2590
|
let secondSide = this.position.split("-")[1];
|
|
2592
2591
|
// If top is outside viewport
|
|
@@ -14,11 +14,11 @@ export declare class ZPopover {
|
|
|
14
14
|
padding?: string;
|
|
15
15
|
isVisible: boolean;
|
|
16
16
|
private popoverElem;
|
|
17
|
-
private defaultPosition;
|
|
18
17
|
/**
|
|
19
18
|
* Constructor.
|
|
20
19
|
*/
|
|
21
20
|
constructor();
|
|
21
|
+
componentDidLoad(): void;
|
|
22
22
|
closePopover(): void;
|
|
23
23
|
closePopoverWithKeyboard(e: any): void;
|
|
24
24
|
handleClick(event: any): void;
|