@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-75065.0 → 0.0.0-bugfix-dev-KB-83282.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.
- package/dist/cjs/ez-badge.cjs.entry.js +2 -14
- package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +387 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +58 -184
- package/dist/cjs/ez-grid.cjs.entry.js +58 -0
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +186 -0
- package/dist/cjs/{ez-multi-selection-list_2.cjs.entry.js → ez-popover-core_2.cjs.entry.js} +115 -196
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/ez-badge/ez-badge.css +1 -12
- package/dist/collection/components/ez-badge/ez-badge.js +1 -31
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +426 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -250
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +61 -194
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +3 -0
- package/dist/collection/components/ez-grid/ez-grid.js +56 -1
- package/dist/collection/components/ez-icon/ez-icon.css +4 -1
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.css +0 -64
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +47 -127
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +67 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +468 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +395 -219
- package/dist/esm/ez-badge.entry.js +2 -14
- package/dist/esm/ez-combo-box-list_3.entry.js +381 -0
- package/dist/esm/ez-combo-box.entry.js +59 -185
- package/dist/esm/ez-grid.entry.js +59 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +182 -0
- package/dist/esm/{ez-multi-selection-list_2.entry.js → ez-popover-core_2.entry.js} +116 -197
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-3a009184.entry.js +1 -0
- package/dist/ezui/{p-a5950a0d.entry.js → p-53116373.entry.js} +46 -46
- package/dist/ezui/p-56fe5341.entry.js +1 -0
- package/dist/ezui/p-650e4b6d.entry.js +1 -0
- package/dist/ezui/p-7bd15498.entry.js +1 -0
- package/dist/ezui/p-dc73e1fe.entry.js +1 -0
- package/dist/ezui/p-f5931caa.entry.js +1 -0
- package/dist/types/components/ez-badge/ez-badge.d.ts +0 -5
- package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +7 -16
- package/dist/types/components/ez-grid/ez-grid.d.ts +5 -0
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +6 -19
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +81 -0
- package/dist/types/components.d.ts +218 -11
- package/package.json +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -236
- package/dist/esm/ez-custom-form-input_2.entry.js +0 -231
- package/dist/ezui/p-0ca05a2f.entry.js +0 -1
- package/dist/ezui/p-64b461b3.entry.js +0 -1
- package/dist/ezui/p-cdac80f1.entry.js +0 -1
- package/dist/ezui/p-dc8b36c3.entry.js +0 -1
- package/dist/ezui/p-e75c7a23.entry.js +0 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
3
2
|
export class EzPopoverPlus {
|
|
4
3
|
constructor() {
|
|
5
|
-
this.TIME_DEBOUNCE = 500;
|
|
6
4
|
this.autoClose = true;
|
|
7
5
|
this.boxWidth = "fit-content";
|
|
8
6
|
this.opened = false;
|
|
@@ -10,167 +8,80 @@ export class EzPopoverPlus {
|
|
|
10
8
|
this.anchorElement = undefined;
|
|
11
9
|
this.options = { horizontalGap: 0, verticalGap: 0, fromRight: false };
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
this.hidePopover();
|
|
20
|
-
}
|
|
21
|
-
this.ezVisibilityChange.emit(newValue);
|
|
22
|
-
return;
|
|
11
|
+
listenerEzVisibilityChange({ detail }) {
|
|
12
|
+
this.ezVisibilityChange.emit(detail);
|
|
13
|
+
}
|
|
14
|
+
async observeOpened(newValue) {
|
|
15
|
+
if (newValue && !this._popOverCore) {
|
|
16
|
+
this.renderPopoverCore();
|
|
23
17
|
}
|
|
18
|
+
this._popOverCore.opened = newValue;
|
|
24
19
|
}
|
|
25
20
|
/**
|
|
26
21
|
* Atualiza a posição do popover.
|
|
27
22
|
*/
|
|
28
23
|
async updatePosition(top, left) {
|
|
29
|
-
|
|
30
|
-
await this.
|
|
24
|
+
var _a;
|
|
25
|
+
await ((_a = this._popOverCore) === null || _a === void 0 ? void 0 : _a.updatePosition(top, left));
|
|
31
26
|
}
|
|
32
27
|
/**
|
|
33
28
|
* Exibe o ez-popover.
|
|
34
29
|
*/
|
|
35
30
|
async show(top, left) {
|
|
36
|
-
this.
|
|
37
|
-
|
|
31
|
+
if (!this._popOverCore) {
|
|
32
|
+
this.renderPopoverCore();
|
|
33
|
+
}
|
|
34
|
+
await this._popOverCore.show(top, left);
|
|
38
35
|
}
|
|
39
36
|
/**
|
|
40
37
|
* Ancora a exibição do popOver a um elemento HTML.
|
|
41
38
|
*/
|
|
42
39
|
async showUnder(element, options) {
|
|
43
|
-
if (
|
|
44
|
-
this.
|
|
40
|
+
if (!this._popOverCore) {
|
|
41
|
+
this.renderPopoverCore();
|
|
45
42
|
}
|
|
46
|
-
this.
|
|
47
|
-
this.opened = true;
|
|
43
|
+
await this._popOverCore.showUnder(element, options);
|
|
48
44
|
}
|
|
49
45
|
/**
|
|
50
46
|
* Oculta o ez-popover.
|
|
51
47
|
*/
|
|
52
48
|
async hide() {
|
|
53
|
-
|
|
49
|
+
var _a;
|
|
50
|
+
await ((_a = this._popOverCore) === null || _a === void 0 ? void 0 : _a.hide());
|
|
54
51
|
}
|
|
55
52
|
/**
|
|
56
53
|
* Altera as opções.
|
|
57
54
|
*/
|
|
58
55
|
async setOptions(options) {
|
|
59
|
-
|
|
56
|
+
var _a;
|
|
57
|
+
await ((_a = this._popOverCore) === null || _a === void 0 ? void 0 : _a.setOptions(options));
|
|
60
58
|
}
|
|
61
59
|
/**
|
|
62
60
|
* Altera o elemento de ancoragem.
|
|
63
61
|
*/
|
|
64
62
|
async setAnchorElement(anchor) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
parseSizePixel(sizePixel, defaultValue) {
|
|
68
|
-
if (!sizePixel) {
|
|
69
|
-
return defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0;
|
|
70
|
-
}
|
|
71
|
-
if (typeof sizePixel === "string") {
|
|
72
|
-
return Number(sizePixel.replace("px", ""));
|
|
73
|
-
}
|
|
74
|
-
return sizePixel !== null && sizePixel !== void 0 ? sizePixel : 0;
|
|
75
|
-
}
|
|
76
|
-
updateOptionPosition(top, left) {
|
|
77
|
-
Object.assign(this.options, {
|
|
78
|
-
horizontalGap: this.parseSizePixel(left, this.options.horizontalGap),
|
|
79
|
-
verticalGap: this.parseSizePixel(top, this.options.verticalGap),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
async updatePositionPopover() {
|
|
83
|
-
if (!this._box || !this.opened) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (!this.anchorElement) {
|
|
87
|
-
this.anchorElement = this._host;
|
|
88
|
-
}
|
|
89
|
-
if (typeof this.anchorElement === 'string') {
|
|
90
|
-
this.anchorElement = document.getElementById(this.anchorElement);
|
|
91
|
-
}
|
|
92
|
-
await computePosition(this.anchorElement, this._box, {
|
|
93
|
-
placement: this.options.fromRight ? 'bottom-end' : 'bottom-start',
|
|
94
|
-
middleware: [flip(), shift({ padding: 5 })],
|
|
95
|
-
strategy: 'fixed',
|
|
96
|
-
}).then(({ x, y, placement }) => {
|
|
97
|
-
const newTop = placement.includes("bottom") ? y + this.options.verticalGap : y - this.options.verticalGap;
|
|
98
|
-
const newLeft = placement.includes("start") ? x + this.options.horizontalGap : x - this.options.horizontalGap;
|
|
99
|
-
Object.assign(this._box.style, {
|
|
100
|
-
top: `${newTop}px`,
|
|
101
|
-
left: `${newLeft}px`,
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
hidePopover() {
|
|
106
|
-
if (!this._box) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
this._box.style.display = '';
|
|
110
|
-
this.hideOverlay();
|
|
111
|
-
this.ezVisibilityChange.emit(false);
|
|
63
|
+
var _a;
|
|
64
|
+
await ((_a = this._popOverCore) === null || _a === void 0 ? void 0 : _a.setAnchorElement(anchor));
|
|
112
65
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
66
|
+
renderPopoverCore() {
|
|
67
|
+
this._popOverCore = document.createElement('ez-popover-core');
|
|
68
|
+
this._popOverCore.opened = this.opened;
|
|
69
|
+
this._popOverCore.anchorElement = this.anchorElement;
|
|
70
|
+
this._popOverCore.autoClose = this.autoClose;
|
|
71
|
+
this._popOverCore.boxWidth = this.boxWidth;
|
|
72
|
+
this._popOverCore.overlayType = this.overlayType;
|
|
73
|
+
this._popOverCore.options = this.options;
|
|
74
|
+
const firstChild = this._host.children.item(0);
|
|
75
|
+
if (firstChild) {
|
|
76
|
+
this._popOverCore.appendChild(firstChild);
|
|
116
77
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
await this.updatePositionPopover();
|
|
120
|
-
this.openOverlay();
|
|
121
|
-
this.ezVisibilityChange.emit(true);
|
|
122
|
-
this._box.style.visibility = 'visible';
|
|
123
|
-
}
|
|
124
|
-
openOverlay() {
|
|
125
|
-
if (!this._overlay || !this._overlayIsActive) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
this._overlay.style.display = 'block';
|
|
129
|
-
}
|
|
130
|
-
hideOverlay() {
|
|
131
|
-
if (!this._overlay) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
this._overlay.style.display = 'none';
|
|
135
|
-
}
|
|
136
|
-
checkStatusOverlay() {
|
|
137
|
-
if (this.overlayType !== "none") {
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
if (this.overlayType === "none" && this.autoClose) {
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
updatePositionDebounce() {
|
|
146
|
-
if (!this.opened) {
|
|
147
|
-
return;
|
|
78
|
+
else {
|
|
79
|
+
console.warn('O slot do popover está vazio. Adicione conteúdo ao slot para exibição correta.');
|
|
148
80
|
}
|
|
149
|
-
|
|
150
|
-
this._timeoutDebounce = setTimeout(() => {
|
|
151
|
-
this.updatePositionPopover();
|
|
152
|
-
}, this.TIME_DEBOUNCE);
|
|
153
|
-
}
|
|
154
|
-
componentWillLoad() {
|
|
155
|
-
window.addEventListener('scroll', this.updatePositionDebounce.bind(this), true);
|
|
156
|
-
window.addEventListener('resize', this.updatePositionDebounce.bind(this), true);
|
|
157
|
-
}
|
|
158
|
-
componentDidLoad() {
|
|
159
|
-
this._overlayIsActive = this.checkStatusOverlay();
|
|
160
|
-
this._resizeObserver = new ResizeObserver(this.updatePositionPopover.bind(this));
|
|
161
|
-
this._resizeObserver.observe(this._box);
|
|
162
|
-
}
|
|
163
|
-
disconnectedCallback() {
|
|
164
|
-
window.removeEventListener('scroll', this.updatePositionDebounce.bind(this), true);
|
|
165
|
-
window.removeEventListener('resize', this.updatePositionDebounce.bind(this), true);
|
|
166
|
-
this._resizeObserver.disconnect();
|
|
81
|
+
document.body.appendChild(this._popOverCore);
|
|
167
82
|
}
|
|
168
83
|
render() {
|
|
169
|
-
return (h(Host, null, h("
|
|
170
|
-
"popover__box": true,
|
|
171
|
-
"popover__box--fit-content": this.boxWidth === "fit-content",
|
|
172
|
-
"popover__box--full-width": this.boxWidth !== "fit-content",
|
|
173
|
-
} }, h("slot", null))));
|
|
84
|
+
return (h(Host, null, h("slot", null)));
|
|
174
85
|
}
|
|
175
86
|
static get is() { return "ez-popover-plus"; }
|
|
176
87
|
static get encapsulation() { return "shadow"; }
|
|
@@ -462,4 +373,13 @@ export class EzPopoverPlus {
|
|
|
462
373
|
"methodName": "observeOpened"
|
|
463
374
|
}];
|
|
464
375
|
}
|
|
376
|
+
static get listeners() {
|
|
377
|
+
return [{
|
|
378
|
+
"name": "ezVisibilityChange",
|
|
379
|
+
"method": "listenerEzVisibilityChange",
|
|
380
|
+
"target": undefined,
|
|
381
|
+
"capture": false,
|
|
382
|
+
"passive": false
|
|
383
|
+
}];
|
|
384
|
+
}
|
|
465
385
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
|
|
3
|
+
/* box */
|
|
4
|
+
/*@doc Define o raio da borda do popover.*/
|
|
5
|
+
--ez-popover__box--border-radius: var(--border--radius-medium, 12px);
|
|
6
|
+
/*@doc Define a sombra do popover.*/
|
|
7
|
+
--ez-popover__box--box-shadow: var(--shadow, 0px 0px 16px 0px #000);
|
|
8
|
+
/*@doc Define a cor de fundo do popover.*/
|
|
9
|
+
--ez-popover__box--background-color: var(--background--xlight, #fff);
|
|
10
|
+
/*@doc Define a camada de visibilidade do popover.*/
|
|
11
|
+
--ez-popover__box--z-index: var(--most-visible, 4);
|
|
12
|
+
|
|
13
|
+
/***************
|
|
14
|
+
host style
|
|
15
|
+
***************/
|
|
16
|
+
/*private*/
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
user-select: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.popover__overlay {
|
|
23
|
+
display: none;
|
|
24
|
+
position: fixed;
|
|
25
|
+
padding: 0;
|
|
26
|
+
top: 0px;
|
|
27
|
+
left: 0px;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100vh;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
z-index: var(--more-visible--2x, 3);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.popover__overlay--light {
|
|
35
|
+
background-color: rgba(var(--rgb-background--overlay), var(--opacity--bright));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.popover__overlay--medium {
|
|
39
|
+
background-color: rgba(var(--rgb-background--overlay), var(--opacity--soft));
|
|
40
|
+
backdrop-filter: blur(var(--background-blur--medium));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.popover__box {
|
|
44
|
+
/*private*/
|
|
45
|
+
display: none;
|
|
46
|
+
position: fixed;
|
|
47
|
+
top: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
|
|
50
|
+
z-index: var(--ez-popover__box--z-index);
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
|
|
53
|
+
height: fit-content;
|
|
54
|
+
|
|
55
|
+
/*public*/
|
|
56
|
+
background-color: var(--ez-popover__box--background-color);
|
|
57
|
+
border-radius: var(--ez-popover__box--border-radius);
|
|
58
|
+
box-shadow: var(--ez-popover__box--box-shadow);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.popover__box--fit-content {
|
|
62
|
+
width: fit-content;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.popover__box--full-width {
|
|
66
|
+
width: calc(100% - 10px);
|
|
67
|
+
}
|