@sankhyalabs/ezui 1.1.30 → 1.1.34
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-action-chip.cjs.entry.js +2 -2
- package/dist/cjs/ez-button_16.cjs.entry.js +96 -63
- package/dist/cjs/ez-dialog.cjs.entry.js +46 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +2 -2
- package/dist/cjs/ez-modal.cjs.entry.js +22 -12
- package/dist/cjs/ez-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-popover.cjs.entry.js +2 -2
- package/dist/cjs/ez-popup.cjs.entry.js +37 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/{index-f08ae9d8.js → index-0f668cc5.js} +70 -61
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +6 -4
- package/dist/collection/components/ez-calendar/ez-calendar.js +3 -5
- package/dist/collection/components/ez-check/ez-check.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +75 -44
- package/dist/collection/components/ez-dialog/ez-dialog.css +442 -0
- package/dist/collection/components/ez-dialog/ez-dialog.js +198 -0
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +2 -1
- package/dist/collection/components/ez-modal/ez-modal.js +33 -26
- package/dist/collection/components/ez-popup/ez-popup.css +387 -0
- package/dist/collection/components/ez-popup/ez-popup.js +131 -0
- package/dist/collection/components/ez-search/ez-search.js +45 -1
- package/dist/collection/components/ez-upload/ez-upload.js +9 -10
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +224 -104
- package/dist/esm/ez-action-chip.entry.js +2 -2
- package/dist/esm/ez-button_16.entry.js +96 -63
- package/dist/esm/ez-dialog.entry.js +42 -0
- package/dist/esm/ez-label-chip.entry.js +2 -2
- package/dist/esm/ez-modal.entry.js +22 -12
- package/dist/esm/ez-number-input.entry.js +2 -2
- package/dist/esm/ez-popover.entry.js +2 -2
- package/dist/esm/ez-popup.entry.js +33 -0
- package/dist/esm/ez-time-input.entry.js +2 -2
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/{index-3e5d5166.js → index-89fc9bfd.js} +70 -61
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-06c7c4e3.entry.js +1 -0
- package/dist/ezui/p-171bdc12.entry.js +1 -0
- package/dist/ezui/p-40fe4f51.entry.js +1 -0
- package/dist/ezui/p-55c5b134.entry.js +1 -0
- package/dist/ezui/p-762ac7a0.js +1 -0
- package/dist/ezui/p-7f528c19.entry.js +1 -0
- package/dist/ezui/p-b81916dd.entry.js +1 -0
- package/dist/ezui/p-c2368320.entry.js +1 -0
- package/dist/ezui/p-caa50ec5.entry.js +1 -0
- package/dist/ezui/p-d8a47f23.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -4
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +33 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +4 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +24 -0
- package/dist/types/components/ez-search/ez-search.d.ts +8 -0
- package/dist/types/components.d.ts +143 -4
- package/loader/index.d.ts +0 -1
- package/package.json +7 -6
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-106dafe7.entry.js +0 -1
- package/dist/ezui/p-534472a3.entry.js +0 -1
- package/dist/ezui/p-5d398030.entry.js +0 -1
- package/dist/ezui/p-7509be4f.entry.js +0 -1
- package/dist/ezui/p-c6987a1b.entry.js +0 -1
- package/dist/ezui/p-f3a62790.entry.js +0 -1
- package/dist/ezui/p-f918e4da.js +0 -1
- package/dist/ezui/p-fc46887a.entry.js +0 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { Component, h, Prop, Method, Event } from '@stencil/core';
|
|
2
|
+
export class EzDialog {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Define se o componente será utilizado no modo de confirmação.
|
|
6
|
+
*/
|
|
7
|
+
this.confirm = false;
|
|
8
|
+
/**
|
|
9
|
+
* Define se o componente terá o visual de erro ou de aviso
|
|
10
|
+
*/
|
|
11
|
+
this.critical = false;
|
|
12
|
+
/**
|
|
13
|
+
* Controla a exibição do componente
|
|
14
|
+
*/
|
|
15
|
+
this.oppened = false;
|
|
16
|
+
}
|
|
17
|
+
handleButtonClick(selectedOption) {
|
|
18
|
+
this.oppened = false;
|
|
19
|
+
this.ezChange.emit(selectedOption);
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
if (this.oppened) {
|
|
23
|
+
return (h("div", { class: "overlay" },
|
|
24
|
+
h("div", { class: "dialog" },
|
|
25
|
+
h("div", { class: this.critical === true ? "dialog__critical--indicator" : "dialog__warning--indicator" }),
|
|
26
|
+
h("div", { class: "dialog__container" },
|
|
27
|
+
h("div", { class: "title__container" },
|
|
28
|
+
h("div", { class: "title__box" },
|
|
29
|
+
this.personalizedIconPath ?
|
|
30
|
+
h("svg", { class: "iconePersonalizado", role: "img" },
|
|
31
|
+
h("use", { xlinkHref: this.personalizedIconPath }))
|
|
32
|
+
:
|
|
33
|
+
h("div", { class: this.critical ? "title-icon title-icon--critical" : "title-icon" }),
|
|
34
|
+
h("div", { class: "title title--label" },
|
|
35
|
+
h("h2", null, this.title))),
|
|
36
|
+
h("button", { class: "btn-close", onClick: () => { this.oppened = false; this.ezChange.emit("CANCEL"); } })),
|
|
37
|
+
h("div", { class: "text text--primary text--medium message" }, this.message),
|
|
38
|
+
this.confirm ?
|
|
39
|
+
h("div", { class: "button-yes-no__container" },
|
|
40
|
+
h("ez-button", { class: "button__no", mode: "link", label: "N\u00E3o", onClick: () => this.handleButtonClick("N") }),
|
|
41
|
+
h("ez-button", { label: "Ok", onClick: () => this.handleButtonClick("S") }))
|
|
42
|
+
: undefined,
|
|
43
|
+
!this.confirm ?
|
|
44
|
+
h("div", { class: "button__ok--container" },
|
|
45
|
+
h("ez-button", { label: "Ok", onClick: () => this.handleButtonClick("S") }))
|
|
46
|
+
: undefined))));
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
static get is() { return "ez-dialog"; }
|
|
51
|
+
static get encapsulation() { return "shadow"; }
|
|
52
|
+
static get originalStyleUrls() { return {
|
|
53
|
+
"$": ["ez-dialog.css"]
|
|
54
|
+
}; }
|
|
55
|
+
static get styleUrls() { return {
|
|
56
|
+
"$": ["ez-dialog.css"]
|
|
57
|
+
}; }
|
|
58
|
+
static get properties() { return {
|
|
59
|
+
"confirm": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"mutable": true,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "boolean",
|
|
64
|
+
"resolved": "boolean",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": "Define se o componente ser\u00E1 utilizado no modo de confirma\u00E7\u00E3o."
|
|
72
|
+
},
|
|
73
|
+
"attribute": "confirm",
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"defaultValue": "false"
|
|
76
|
+
},
|
|
77
|
+
"critical": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"mutable": true,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "boolean",
|
|
82
|
+
"resolved": "boolean",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": "Define se o componente ter\u00E1 o visual de erro ou de aviso"
|
|
90
|
+
},
|
|
91
|
+
"attribute": "critical",
|
|
92
|
+
"reflect": false,
|
|
93
|
+
"defaultValue": "false"
|
|
94
|
+
},
|
|
95
|
+
"message": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": true,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "string",
|
|
100
|
+
"resolved": "string",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "Menssagem exibida dentro do Dialog"
|
|
108
|
+
},
|
|
109
|
+
"attribute": "message",
|
|
110
|
+
"reflect": false
|
|
111
|
+
},
|
|
112
|
+
"oppened": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"mutable": true,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "boolean",
|
|
117
|
+
"resolved": "boolean",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": false,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": "Controla a exibi\u00E7\u00E3o do componente"
|
|
125
|
+
},
|
|
126
|
+
"attribute": "oppened",
|
|
127
|
+
"reflect": true,
|
|
128
|
+
"defaultValue": "false"
|
|
129
|
+
},
|
|
130
|
+
"personalizedIconPath": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"mutable": true,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "string",
|
|
135
|
+
"resolved": "string",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "Define o \u00EDcone a ser exibido ao lado do t\u00EDtulo do"
|
|
143
|
+
},
|
|
144
|
+
"attribute": "personalized-icon-path",
|
|
145
|
+
"reflect": false
|
|
146
|
+
},
|
|
147
|
+
"title": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": true,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "string",
|
|
152
|
+
"resolved": "string",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": false,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "Define o t\u00EDtulo do componente."
|
|
160
|
+
},
|
|
161
|
+
"attribute": "title",
|
|
162
|
+
"reflect": false
|
|
163
|
+
}
|
|
164
|
+
}; }
|
|
165
|
+
static get events() { return [{
|
|
166
|
+
"method": "ezChange",
|
|
167
|
+
"name": "ezChange",
|
|
168
|
+
"bubbles": true,
|
|
169
|
+
"cancelable": true,
|
|
170
|
+
"composed": true,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Evento disparado ao clicar em algum dos bot\u00F5es de confirma\u00E7\u00E3o."
|
|
174
|
+
},
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "string",
|
|
177
|
+
"resolved": "string",
|
|
178
|
+
"references": {}
|
|
179
|
+
}
|
|
180
|
+
}]; }
|
|
181
|
+
static get methods() { return {
|
|
182
|
+
"handleButtonClick": {
|
|
183
|
+
"complexType": {
|
|
184
|
+
"signature": "(selectedOption: any) => Promise<void>",
|
|
185
|
+
"parameters": [{
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": ""
|
|
188
|
+
}],
|
|
189
|
+
"references": {},
|
|
190
|
+
"return": "Promise<void>"
|
|
191
|
+
},
|
|
192
|
+
"docs": {
|
|
193
|
+
"text": "",
|
|
194
|
+
"tags": []
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}; }
|
|
198
|
+
}
|
|
@@ -64,8 +64,9 @@ export const Field = ({ dataUnit, field, forceScroll }) => {
|
|
|
64
64
|
}, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
65
65
|
case 'FILE':
|
|
66
66
|
var target = properties.find(prop => prop.name === 'URL').value;
|
|
67
|
+
const token = localStorage.getItem('token');
|
|
67
68
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
68
|
-
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target })));
|
|
69
|
+
h("ez-upload", { onEzChange: (event) => changeFieldHandler(event.target['value']), target: target, headers: { 'Authorization': token } })));
|
|
69
70
|
case 'DATE':
|
|
70
71
|
return h("div", { class: "col col--sd-12 col--tb-3 padding--small" }, loadingData ? h("place-holder", null) :
|
|
71
72
|
h("ez-date-input", { value: !value ? null : DateUtils.clearTime(value), label: formattedLabel, enabled: !readOnly, onEzChange: (event) => changeFieldHandler(event.target['value']), errormessage: errorMessage, ref: elem => scrollToView(forceScroll, elem), key: key }));
|
|
@@ -15,8 +15,7 @@ export class EzModal {
|
|
|
15
15
|
this.closeoutsideclick = false;
|
|
16
16
|
this.handleKeyboardEvent = (ev) => {
|
|
17
17
|
if ((ev === null || ev === void 0 ? void 0 : ev.key) === 'Escape' && this.closeesc) {
|
|
18
|
-
this.
|
|
19
|
-
this.ezChange.emit(this.oppened);
|
|
18
|
+
this.closeModal();
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
}
|
|
@@ -35,6 +34,10 @@ export class EzModal {
|
|
|
35
34
|
document.removeEventListener('keydown', this.handleKeyboardEvent);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
37
|
+
closeModal() {
|
|
38
|
+
this.oppened = false;
|
|
39
|
+
this.ezChange.emit(this.oppened);
|
|
40
|
+
}
|
|
38
41
|
///////
|
|
39
42
|
// trapTabKey(e) {
|
|
40
43
|
// // Check for TAB key press
|
|
@@ -83,22 +86,26 @@ export class EzModal {
|
|
|
83
86
|
componentDidLoad() {
|
|
84
87
|
this.handleOppenedChange();
|
|
85
88
|
}
|
|
89
|
+
onMouseDownHandler(event) {
|
|
90
|
+
if (this.closeoutsideclick && event.target === this._overlay) {
|
|
91
|
+
this.closeModal();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
onWeelHandler(event) {
|
|
95
|
+
event.stopPropagation();
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
}
|
|
86
98
|
//Ainda teremos ajustes visuais
|
|
87
99
|
render() {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
h("div", { class: "modal__container modal__container--right" },
|
|
98
|
-
h("div", { class: "modal__content modal__content--right " + this.modalsize },
|
|
99
|
-
h("slot", null)))
|
|
100
|
-
: undefined)
|
|
101
|
-
: undefined));
|
|
100
|
+
const positionSufix = this.align === "left" ? "left" : "right";
|
|
101
|
+
return (h(Host, null, this.oppened
|
|
102
|
+
?
|
|
103
|
+
h("div", { class: 'modal', onMouseDown: evt => this.onMouseDownHandler(evt), onWheel: evt => this.onWeelHandler(evt) },
|
|
104
|
+
h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref },
|
|
105
|
+
h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalsize}` },
|
|
106
|
+
h("slot", null))))
|
|
107
|
+
:
|
|
108
|
+
undefined));
|
|
102
109
|
}
|
|
103
110
|
static get is() { return "ez-modal"; }
|
|
104
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -111,7 +118,7 @@ export class EzModal {
|
|
|
111
118
|
static get properties() { return {
|
|
112
119
|
"modalsize": {
|
|
113
120
|
"type": "string",
|
|
114
|
-
"mutable":
|
|
121
|
+
"mutable": false,
|
|
115
122
|
"complexType": {
|
|
116
123
|
"original": "string",
|
|
117
124
|
"resolved": "string",
|
|
@@ -124,11 +131,11 @@ export class EzModal {
|
|
|
124
131
|
"text": "Define o tamanho do modal devem ser utilizados os tamanhos definidos de colunas como \"col-sd-3\""
|
|
125
132
|
},
|
|
126
133
|
"attribute": "modalsize",
|
|
127
|
-
"reflect":
|
|
134
|
+
"reflect": false
|
|
128
135
|
},
|
|
129
136
|
"align": {
|
|
130
137
|
"type": "string",
|
|
131
|
-
"mutable":
|
|
138
|
+
"mutable": false,
|
|
132
139
|
"complexType": {
|
|
133
140
|
"original": "string",
|
|
134
141
|
"resolved": "string",
|
|
@@ -141,11 +148,11 @@ export class EzModal {
|
|
|
141
148
|
"text": "Define o alinhamento do modal, seus valores podem ser 'right' ou 'left'"
|
|
142
149
|
},
|
|
143
150
|
"attribute": "align",
|
|
144
|
-
"reflect":
|
|
151
|
+
"reflect": false
|
|
145
152
|
},
|
|
146
153
|
"oppened": {
|
|
147
154
|
"type": "boolean",
|
|
148
|
-
"mutable":
|
|
155
|
+
"mutable": false,
|
|
149
156
|
"complexType": {
|
|
150
157
|
"original": "boolean",
|
|
151
158
|
"resolved": "boolean",
|
|
@@ -158,12 +165,12 @@ export class EzModal {
|
|
|
158
165
|
"text": "Controle de exibi\u00E7\u00E3o do Modal"
|
|
159
166
|
},
|
|
160
167
|
"attribute": "oppened",
|
|
161
|
-
"reflect":
|
|
168
|
+
"reflect": false,
|
|
162
169
|
"defaultValue": "true"
|
|
163
170
|
},
|
|
164
171
|
"closeesc": {
|
|
165
172
|
"type": "boolean",
|
|
166
|
-
"mutable":
|
|
173
|
+
"mutable": false,
|
|
167
174
|
"complexType": {
|
|
168
175
|
"original": "boolean",
|
|
169
176
|
"resolved": "boolean",
|
|
@@ -176,12 +183,12 @@ export class EzModal {
|
|
|
176
183
|
"text": "Define se o modal ser\u00E1 fechado ao digitar ESC"
|
|
177
184
|
},
|
|
178
185
|
"attribute": "closeesc",
|
|
179
|
-
"reflect":
|
|
186
|
+
"reflect": false,
|
|
180
187
|
"defaultValue": "false"
|
|
181
188
|
},
|
|
182
189
|
"closeoutsideclick": {
|
|
183
190
|
"type": "boolean",
|
|
184
|
-
"mutable":
|
|
191
|
+
"mutable": false,
|
|
185
192
|
"complexType": {
|
|
186
193
|
"original": "boolean",
|
|
187
194
|
"resolved": "boolean",
|
|
@@ -194,7 +201,7 @@ export class EzModal {
|
|
|
194
201
|
"text": "Define se o modal ser\u00E1 fechado ao clicar fora do conte\u00FAdo."
|
|
195
202
|
},
|
|
196
203
|
"attribute": "closeoutsideclick",
|
|
197
|
-
"reflect":
|
|
204
|
+
"reflect": false,
|
|
198
205
|
"defaultValue": "false"
|
|
199
206
|
}
|
|
200
207
|
}; }
|