@sankhyalabs/ezui 1.1.67 → 1.1.70
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 +1 -1
- package/dist/cjs/ez-button_16.cjs.entry.js +133 -144
- package/dist/cjs/ez-dialog.cjs.entry.js +7 -1
- package/dist/cjs/ez-modal.cjs.entry.js +16 -69
- package/dist/cjs/ez-number-input.cjs.entry.js +9 -9
- package/dist/cjs/ez-popover.cjs.entry.js +13 -18
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +6 -6
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-action-chip/ez-action-chip.css +2 -1
- package/dist/collection/components/ez-action-chip/ez-action-chip.js +1 -1
- package/dist/collection/components/ez-button/ez-button.css +48 -45
- package/dist/collection/components/ez-button/ez-button.js +5 -5
- package/dist/collection/components/ez-calendar/ez-calendar.css +2 -2
- package/dist/collection/components/ez-check/ez-check.css +78 -78
- package/dist/collection/components/ez-check/ez-check.js +7 -7
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +46 -44
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +38 -39
- package/dist/collection/components/ez-date-input/ez-date-input.js +9 -9
- package/dist/collection/components/ez-dialog/ez-dialog.css +43 -43
- package/dist/collection/components/ez-dialog/ez-dialog.js +10 -4
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +6 -6
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.css +3 -1
- package/dist/collection/components/ez-icon/ez-icon.js +5 -3
- package/dist/collection/components/ez-label-chip/ez-label-chip.css +2 -1
- package/dist/collection/components/ez-label-chip/ez-label-chip.js +1 -1
- package/dist/collection/components/ez-modal/ez-modal.css +1 -1
- package/dist/collection/components/ez-modal/ez-modal.js +30 -83
- package/dist/collection/components/ez-number-input/ez-number-input.js +11 -11
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +1 -1
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +9 -9
- package/dist/collection/components/ez-popover/ez-popover.css +4 -5
- package/dist/collection/components/ez-popover/ez-popover.js +25 -30
- package/dist/collection/components/ez-popup/ez-popup.css +7 -7
- package/dist/collection/components/ez-popup/ez-popup.js +4 -4
- package/dist/collection/components/ez-search/ez-search.js +5 -5
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +7 -10
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +68 -70
- package/dist/collection/components/ez-text-area/ez-text-area.css +6 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js +9 -9
- package/dist/collection/components/ez-text-input/ez-text-input.css +68 -60
- package/dist/collection/components/ez-text-input/ez-text-input.js +14 -38
- package/dist/collection/components/ez-time-input/ez-time-input.css +8 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +9 -9
- package/dist/collection/components/ez-toast/ez-toast.css +2 -2
- package/dist/collection/components/ez-upload/ez-upload.css +4 -1
- package/dist/collection/components/ez-upload/ez-upload.js +3 -3
- package/dist/custom-elements/index.js +198 -261
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-button_16.entry.js +133 -144
- package/dist/esm/ez-dialog.entry.js +7 -1
- package/dist/esm/ez-modal.entry.js +16 -69
- package/dist/esm/ez-number-input.entry.js +9 -9
- package/dist/esm/ez-popover.entry.js +13 -18
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +6 -6
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-1bc9ddad.entry.js +1 -0
- package/dist/ezui/{p-4f4b8aae.entry.js → p-1c33a56d.entry.js} +1 -1
- package/dist/ezui/{p-d8a47f23.entry.js → p-74e4415e.entry.js} +1 -1
- package/dist/ezui/p-a7e23f65.entry.js +1 -0
- package/dist/ezui/p-a88ee12f.entry.js +1 -0
- package/dist/ezui/p-b692a0ab.entry.js +1 -0
- package/dist/ezui/p-b6e0fd3e.entry.js +1 -0
- package/dist/ezui/{p-7f528c19.entry.js → p-f7d7fb7f.entry.js} +1 -1
- package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +1 -1
- package/dist/types/components/ez-button/ez-button.d.ts +1 -1
- package/dist/types/components/ez-check/ez-check.d.ts +3 -3
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +8 -8
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +2 -2
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +8 -2
- package/dist/types/components/ez-icon/ez-icon.d.ts +6 -0
- package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +1 -1
- package/dist/types/components/ez-modal/ez-modal.d.ts +9 -9
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +1 -1
- package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +3 -3
- package/dist/types/components/ez-popover/ez-popover.d.ts +4 -5
- package/dist/types/components/ez-popup/ez-popup.d.ts +3 -3
- package/dist/types/components/ez-search/ez-search.d.ts +3 -3
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +19 -10
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -4
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -8
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -2
- package/dist/types/components/ez-upload/ez-upload.d.ts +3 -3
- package/dist/types/components.d.ts +142 -114
- package/package.json +2 -1
- package/dist/ezui/p-7c7dbfcb.entry.js +0 -1
- package/dist/ezui/p-8c8f1c00.entry.js +0 -1
- package/dist/ezui/p-afc553a4.entry.js +0 -1
- package/dist/ezui/p-d185d7e8.entry.js +0 -1
- package/dist/ezui/p-ee5058c1.entry.js +0 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0f668cc5.js');
|
|
6
6
|
|
|
7
|
-
const ezDialogCss = ":host{--
|
|
7
|
+
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{width:15px;height:15px}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:'';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__no{padding-right:var(--dialog__btn__no--padding-right)}.button__ok--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
8
8
|
|
|
9
9
|
class Message {
|
|
10
10
|
constructor(title, message, critical, confirm, icon, callBack) {
|
|
@@ -35,6 +35,9 @@ let EzDialog = class {
|
|
|
35
35
|
this.opened = false;
|
|
36
36
|
this._messageQueue = [];
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Lida com o clique nos botões de dentro do componente.
|
|
40
|
+
*/
|
|
38
41
|
async handleButtonClick(selectedOption) {
|
|
39
42
|
this.opened = this._messageQueue.length > 0;
|
|
40
43
|
if (this._currentMessage.callBack) {
|
|
@@ -46,6 +49,9 @@ let EzDialog = class {
|
|
|
46
49
|
this._currentMessage = this._messageQueue.shift();
|
|
47
50
|
index.forceUpdate(this);
|
|
48
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Faz com que o componente seja exibido.
|
|
54
|
+
*/
|
|
49
55
|
async show(title, message, critical, confirm, icon) {
|
|
50
56
|
this.opened = true;
|
|
51
57
|
return new Promise(resolve => {
|
|
@@ -13,104 +13,51 @@ let EzModal = class {
|
|
|
13
13
|
/**
|
|
14
14
|
* Controle de exibição do Modal
|
|
15
15
|
*/
|
|
16
|
-
this.
|
|
16
|
+
this.opened = true;
|
|
17
17
|
/**
|
|
18
|
-
* Define se o modal será fechado ao
|
|
18
|
+
* Define se o modal será fechado ao clicar ESC
|
|
19
19
|
*/
|
|
20
|
-
this.
|
|
20
|
+
this.closeEsc = false;
|
|
21
21
|
/**
|
|
22
22
|
* Define se o modal será fechado ao clicar fora do conteúdo.
|
|
23
23
|
*/
|
|
24
|
-
this.
|
|
24
|
+
this.closeOutsideClick = false;
|
|
25
25
|
this.handleKeyboardEvent = (ev) => {
|
|
26
|
-
if ((ev === null || ev === void 0 ? void 0 : ev.key) ===
|
|
26
|
+
if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
|
|
27
27
|
this.closeModal();
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// this.oppened = false;
|
|
35
|
-
// this.ezChange.emit(this.oppened);
|
|
36
|
-
// }
|
|
37
|
-
// }
|
|
38
|
-
handleOppenedChange() {
|
|
39
|
-
if (this.oppened) {
|
|
40
|
-
document.addEventListener('keydown', this.handleKeyboardEvent);
|
|
31
|
+
handleopenedChange() {
|
|
32
|
+
if (this.opened) {
|
|
33
|
+
document.addEventListener("keydown", this.handleKeyboardEvent);
|
|
41
34
|
}
|
|
42
35
|
else {
|
|
43
|
-
document.removeEventListener(
|
|
36
|
+
document.removeEventListener("keydown", this.handleKeyboardEvent);
|
|
44
37
|
}
|
|
45
38
|
}
|
|
46
39
|
closeModal() {
|
|
47
|
-
this.
|
|
48
|
-
this.ezCloseModal.emit(this.
|
|
40
|
+
this.opened = false;
|
|
41
|
+
this.ezCloseModal.emit(this.opened);
|
|
49
42
|
}
|
|
50
|
-
///////
|
|
51
|
-
// trapTabKey(e) {
|
|
52
|
-
// // Check for TAB key press
|
|
53
|
-
// if (e.keyCode === 9) {
|
|
54
|
-
// // SHIFT + TAB
|
|
55
|
-
// if (e.shiftKey) {
|
|
56
|
-
// if (document.activeElement === this._firstTabStop) {
|
|
57
|
-
// e.preventDefault();
|
|
58
|
-
// this._lastTabStop.focus();
|
|
59
|
-
// }
|
|
60
|
-
// // TAB
|
|
61
|
-
// } else {
|
|
62
|
-
// if (document.activeElement === this._lastTabStop) {
|
|
63
|
-
// e.preventDefault();
|
|
64
|
-
// this._firstTabStop.focus();
|
|
65
|
-
// }
|
|
66
|
-
// }
|
|
67
|
-
// }
|
|
68
|
-
// if (e.keyCode === 27) {
|
|
69
|
-
// this.closeModal();
|
|
70
|
-
// }
|
|
71
|
-
// }
|
|
72
|
-
// closeModal() {
|
|
73
|
-
// this.oppened = false;
|
|
74
|
-
// this._focusedElementBeforeModal.focus();
|
|
75
|
-
// }
|
|
76
|
-
// componentDidLoad() {
|
|
77
|
-
// this._overlay.addEventListener('keydown', (ev) => { this.trapTabKey(ev) });
|
|
78
|
-
// // Save current focus
|
|
79
|
-
// this._focusedElementBeforeModal = document.activeElement;
|
|
80
|
-
// // Find all focusable children
|
|
81
|
-
// var focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]';
|
|
82
|
-
// var focusableElements = this._modalContainer.querySelectorAll(focusableElementsString);
|
|
83
|
-
// // Convert NodeList to Array
|
|
84
|
-
// focusableElements = Array.prototype.slice.call(focusableElements);
|
|
85
|
-
// this._firstTabStop = focusableElements[0];
|
|
86
|
-
// this._lastTabStop = focusableElements[focusableElements.length - 1];
|
|
87
|
-
// // Focus first child
|
|
88
|
-
// this._firstTabStop.focus();
|
|
89
|
-
// }
|
|
90
|
-
// componentDidUpdate() {
|
|
91
|
-
// var focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]';
|
|
92
|
-
// var focusableElements = this._modalContainer.querySelectorAll(focusableElementsString);
|
|
93
|
-
// }
|
|
94
|
-
/////
|
|
95
43
|
componentDidLoad() {
|
|
96
|
-
this.
|
|
44
|
+
this.handleopenedChange();
|
|
97
45
|
}
|
|
98
46
|
onMouseDownHandler(event) {
|
|
99
|
-
if (this.
|
|
47
|
+
if (this.closeOutsideClick && event.target === this._overlay) {
|
|
100
48
|
this.closeModal();
|
|
101
49
|
}
|
|
102
50
|
}
|
|
103
|
-
//Ainda teremos ajustes visuais
|
|
104
51
|
render() {
|
|
105
52
|
const positionSufix = this.align === "left" ? "left" : "right";
|
|
106
|
-
return (index.h(index.Host, null, this.
|
|
53
|
+
return (index.h(index.Host, null, this.opened
|
|
107
54
|
?
|
|
108
|
-
index.h("div", { class:
|
|
55
|
+
index.h("div", { class: "modal", onMouseDown: evt => this.onMouseDownHandler(evt) }, index.h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, index.h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalSize}` }, index.h("slot", null))))
|
|
109
56
|
:
|
|
110
57
|
undefined));
|
|
111
58
|
}
|
|
112
59
|
static get watchers() { return {
|
|
113
|
-
"
|
|
60
|
+
"opened": ["handleopenedChange"]
|
|
114
61
|
}; }
|
|
115
62
|
};
|
|
116
63
|
EzModal.style = ezModalCss;
|
|
@@ -40,7 +40,7 @@ let NumberInput = class {
|
|
|
40
40
|
this.checkNumberValidation = (valuePtBRorNumber) => {
|
|
41
41
|
try {
|
|
42
42
|
if (valuePtBRorNumber != "" && RequestMetadata.NumberUtils.format(valuePtBRorNumber, this.precision, this.prettyprecision) === "NaN") {
|
|
43
|
-
this.
|
|
43
|
+
this.errorMessage = `Valor não é um número válido`;
|
|
44
44
|
this.value = undefined;
|
|
45
45
|
this.strvalue = undefined;
|
|
46
46
|
if (this._inputElem) {
|
|
@@ -50,14 +50,14 @@ let NumberInput = class {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
catch (err) {
|
|
53
|
-
this.
|
|
53
|
+
this.errorMessage = err.message;
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
return true;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
showError() {
|
|
60
|
-
const hasError = typeof this.
|
|
60
|
+
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
61
61
|
if (this._inputElem) {
|
|
62
62
|
if (hasError) {
|
|
63
63
|
this._inputElem.classList.add('hasError');
|
|
@@ -85,7 +85,7 @@ let NumberInput = class {
|
|
|
85
85
|
if (isNaN(newValue) && newValue !== undefined) {
|
|
86
86
|
this.value = undefined;
|
|
87
87
|
this.strvalue = "";
|
|
88
|
-
this.
|
|
88
|
+
this.errorMessage = `Valor não é um número válido`;
|
|
89
89
|
this.adjustFloatingLabel();
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
@@ -131,7 +131,7 @@ let NumberInput = class {
|
|
|
131
131
|
async handleFocusout() {
|
|
132
132
|
//Setting value and strvalue by stringinput
|
|
133
133
|
if (this._inputElem) {
|
|
134
|
-
this.
|
|
134
|
+
this.errorMessage = "";
|
|
135
135
|
if (this._inputElem.value !== "") {
|
|
136
136
|
this._inputElem.value = this.settingStrValueIntNumber(this._inputElem.value);
|
|
137
137
|
const value = RequestMetadata.NumberUtils.keepOnlyDecimalSeparator(this._inputElem.value, this.formatnumber.toUpperCase());
|
|
@@ -143,7 +143,7 @@ let NumberInput = class {
|
|
|
143
143
|
this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision) : RequestMetadata.NumberUtils.changeFormat(RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision));
|
|
144
144
|
}
|
|
145
145
|
catch (e) {
|
|
146
|
-
this.
|
|
146
|
+
this.errorMessage = e.message;
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -198,7 +198,7 @@ let NumberInput = class {
|
|
|
198
198
|
this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision) : RequestMetadata.NumberUtils.changeFormat(RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision));
|
|
199
199
|
}
|
|
200
200
|
catch (e) {
|
|
201
|
-
this.
|
|
201
|
+
this.errorMessage = e.message;
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
this.strvalue = this._inputElem.value;
|
|
@@ -235,11 +235,11 @@ let NumberInput = class {
|
|
|
235
235
|
}
|
|
236
236
|
render() {
|
|
237
237
|
const labelInput = this.label ? index.h("label", { onClick: () => this._inputElem.focus(), class: "input__label", ref: (el) => this._labelElem = el }, this.label) : null;
|
|
238
|
-
return (index.h(index.Host, null, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), labelInput, index.h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.strvalue, disabled: !this.enabled, onInput: this.handleChange.bind(this), onFocusout: this.handleFocusout.bind(this) }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.
|
|
238
|
+
return (index.h(index.Host, null, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), labelInput, index.h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.strvalue, disabled: !this.enabled, onInput: this.handleChange.bind(this), onFocusout: this.handleFocusout.bind(this) }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
|
|
239
239
|
}
|
|
240
240
|
get el() { return index.getElement(this); }
|
|
241
241
|
static get watchers() { return {
|
|
242
|
-
"
|
|
242
|
+
"errorMessage": ["showError"],
|
|
243
243
|
"precision": ["onPrecisionChanged"],
|
|
244
244
|
"prettyprecision": ["onPrettyPrecisionChanged"],
|
|
245
245
|
"value": ["onValueChanged"]
|
|
@@ -6,7 +6,7 @@ const index = require('./index-0f668cc5.js');
|
|
|
6
6
|
require('./RequestMetadata-2cd01e8a.js');
|
|
7
7
|
const FloatingManager = require('./FloatingManager-6cfeb947.js');
|
|
8
8
|
|
|
9
|
-
const ezPopoverCss = ":host{--
|
|
9
|
+
const ezPopoverCss = ":host{--popover__box--border-radius:var(--border--radius-medium, 12px);--popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--more-visible, 1);display:flex;flex-direction:column;height:fit-content;background-color:var(--background--xlight);border-radius:var(--popover__box--border-radius);box-shadow:var(--popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";
|
|
10
10
|
|
|
11
11
|
let EzPopover = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -17,28 +17,28 @@ let EzPopover = class {
|
|
|
17
17
|
* No modo floating = false o popover só se tornará visível
|
|
18
18
|
* quando o método show() for acionado.
|
|
19
19
|
*/
|
|
20
|
-
this.
|
|
20
|
+
this.autoClose = true;
|
|
21
21
|
/**
|
|
22
22
|
* Offset top do popover em relação ao componente pai
|
|
23
23
|
*/
|
|
24
|
-
this.top =
|
|
24
|
+
this.top = "0px";
|
|
25
25
|
/**
|
|
26
26
|
* Offset left do popover em relação ao componente pai
|
|
27
27
|
*/
|
|
28
|
-
this.left =
|
|
28
|
+
this.left = "0px";
|
|
29
29
|
/**
|
|
30
30
|
* Offset bottom do popover em relação ao componente pai
|
|
31
31
|
*/
|
|
32
|
-
this.bottom =
|
|
32
|
+
this.bottom = "0px";
|
|
33
33
|
/**
|
|
34
34
|
* Offset right do popover em relação ao componente pai
|
|
35
35
|
*/
|
|
36
|
-
this.right =
|
|
36
|
+
this.right = "0px";
|
|
37
37
|
/**
|
|
38
38
|
* Ajusta o comportamento da largura do popover.
|
|
39
39
|
* Opções: "100% e "fit-content" (default)
|
|
40
40
|
*/
|
|
41
|
-
this.
|
|
41
|
+
this.boxWidth = "fit-content";
|
|
42
42
|
}
|
|
43
43
|
dispatchVisibilityChange(newValue, oldValue) {
|
|
44
44
|
if (newValue != oldValue) {
|
|
@@ -50,7 +50,7 @@ let EzPopover = class {
|
|
|
50
50
|
*/
|
|
51
51
|
async updatePosition(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
|
|
52
52
|
const floatingOptions = {
|
|
53
|
-
autoClose: this.
|
|
53
|
+
autoClose: this.autoClose,
|
|
54
54
|
top,
|
|
55
55
|
left,
|
|
56
56
|
bottom,
|
|
@@ -62,8 +62,6 @@ let EzPopover = class {
|
|
|
62
62
|
if (_container.shadowRoot && _container.shadowRoot.contains(node)) {
|
|
63
63
|
return true;
|
|
64
64
|
}
|
|
65
|
-
//Here: we pass this._box as parameter but we need to change to _host
|
|
66
|
-
//because we need to get the lasChild (inner content to put in slot)
|
|
67
65
|
_container = this._host;
|
|
68
66
|
return !_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node);
|
|
69
67
|
}
|
|
@@ -72,11 +70,10 @@ let EzPopover = class {
|
|
|
72
70
|
}
|
|
73
71
|
/**
|
|
74
72
|
* Faz com que o popover seja renderizado na DOM.
|
|
75
|
-
*
|
|
76
73
|
*/
|
|
77
74
|
async show(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
|
|
78
75
|
const floatingOptions = {
|
|
79
|
-
autoClose: this.
|
|
76
|
+
autoClose: this.autoClose,
|
|
80
77
|
top,
|
|
81
78
|
left,
|
|
82
79
|
bottom,
|
|
@@ -88,14 +85,12 @@ let EzPopover = class {
|
|
|
88
85
|
if (_container.shadowRoot && _container.shadowRoot.contains(node)) {
|
|
89
86
|
return true;
|
|
90
87
|
}
|
|
91
|
-
// Here: we pass this._box as parameter but we need to change to _host
|
|
92
|
-
// because we need to get the lasChild (inner content to put in slot)
|
|
93
88
|
_container = this._host;
|
|
94
89
|
return !_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node);
|
|
95
90
|
}
|
|
96
91
|
};
|
|
97
92
|
this._floatingID = FloatingManager.FloatingManager.float(this._box, this._container, floatingOptions);
|
|
98
|
-
this.
|
|
93
|
+
this.opened = true;
|
|
99
94
|
}
|
|
100
95
|
/**
|
|
101
96
|
* Usado no modo floating. Faz com que o componente seja ocultado.
|
|
@@ -104,7 +99,7 @@ let EzPopover = class {
|
|
|
104
99
|
if (this._floatingID !== undefined) {
|
|
105
100
|
FloatingManager.FloatingManager.close(this._floatingID);
|
|
106
101
|
this._floatingID = undefined;
|
|
107
|
-
this.
|
|
102
|
+
this.opened = false;
|
|
108
103
|
}
|
|
109
104
|
}
|
|
110
105
|
componentDidRender() {
|
|
@@ -114,11 +109,11 @@ let EzPopover = class {
|
|
|
114
109
|
}
|
|
115
110
|
}
|
|
116
111
|
render() {
|
|
117
|
-
return (index.h(index.Host, null, index.h("section", { ref: el => this._container = el }, index.h("div", { class: `box ${this.
|
|
112
|
+
return (index.h(index.Host, null, index.h("section", { ref: el => this._container = el }, index.h("div", { class: `box ${this.boxWidth === "fit-content" ? "box--fit-content" : "box--full-width"}`, ref: el => this._box = el }, index.h("slot", null)))));
|
|
118
113
|
}
|
|
119
114
|
get _host() { return index.getElement(this); }
|
|
120
115
|
static get watchers() { return {
|
|
121
|
-
"
|
|
116
|
+
"opened": ["dispatchVisibilityChange"]
|
|
122
117
|
}; }
|
|
123
118
|
};
|
|
124
119
|
EzPopover.style = ezPopoverCss;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0f668cc5.js');
|
|
6
6
|
|
|
7
|
-
const ezPopupCss = ":host{display:flex;--popup-z-index:var(--most-visible, 3);--popup__container--color:var(--title--primary, #2b3a54);--popup__container--padding:var(--space--large, 24px);--popup__header--padding-bottom:var(--space--medium, 12px);--popup__title--font-family:var(--font-pattern, \"'Sora', 'Algerian'\");--popup__title--font-size:var(--title--extra-large, 24px);--popup__title--color:var(--title--primary, #2b3a54);--popup__title--font-weight:var(--text-weight--large, 600);--popup__btn__close--
|
|
7
|
+
const ezPopupCss = ":host{display:flex;--popup-z-index:var(--most-visible, 3);--popup__container--color:var(--title--primary, #2b3a54);--popup__container--padding:var(--space--large, 24px);--popup__header--padding-bottom:var(--space--medium, 12px);--popup__title--font-family:var(--font-pattern, \"'Sora', 'Algerian'\");--popup__title--font-size:var(--title--extra-large, 24px);--popup__title--color:var(--title--primary, #2b3a54);--popup__title--font-weight:var(--text-weight--large, 600);--popup__btn__close--icon-color:var(--title--primary, #2b3a54);--popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:80vh;content-visibility:auto}.popup__header{padding-bottom:var(--popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--popup__title--font-family);font-size:var(--popup__title--font-size);font-weight:var(--popup__title--font-weight);color:var(--popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--popup__btn__close--icon);mask-image:var(--popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
8
8
|
|
|
9
9
|
let EzPopup = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -27,7 +27,7 @@ let EzPopup = class {
|
|
|
27
27
|
*/
|
|
28
28
|
this.opened = false;
|
|
29
29
|
/**
|
|
30
|
-
* Define o componente utilizará um cabeçalho com botão de fechamento.
|
|
30
|
+
* Define se o componente utilizará um cabeçalho com botão de fechamento.
|
|
31
31
|
*/
|
|
32
32
|
this.useHeader = false;
|
|
33
33
|
}
|
|
@@ -20,7 +20,7 @@ let EzTimeInput = class {
|
|
|
20
20
|
this.showSeconds = false;
|
|
21
21
|
}
|
|
22
22
|
showError() {
|
|
23
|
-
const hasError = typeof this.
|
|
23
|
+
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
24
24
|
if (hasError) {
|
|
25
25
|
this._inputElem.classList.add('hasError');
|
|
26
26
|
this._messageBoxElem.classList.add('hasError');
|
|
@@ -96,11 +96,11 @@ let EzTimeInput = class {
|
|
|
96
96
|
// Event handlers
|
|
97
97
|
//---------------------------------------------
|
|
98
98
|
handleFocusout() {
|
|
99
|
-
this.
|
|
99
|
+
this.errorMessage = "";
|
|
100
100
|
this.prepareValue(this.viewValue);
|
|
101
101
|
if (!RequestMetadata.TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
102
102
|
this.clearField();
|
|
103
|
-
this.
|
|
103
|
+
this.errorMessage = "Favor inserir um horário válido.";
|
|
104
104
|
}
|
|
105
105
|
this.adjustFloatingLabel();
|
|
106
106
|
}
|
|
@@ -110,7 +110,7 @@ let EzTimeInput = class {
|
|
|
110
110
|
}
|
|
111
111
|
catch (e) {
|
|
112
112
|
this.clearField();
|
|
113
|
-
this.
|
|
113
|
+
this.errorMessage = e.message;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
clearField() {
|
|
@@ -167,10 +167,10 @@ let EzTimeInput = class {
|
|
|
167
167
|
render() {
|
|
168
168
|
return (index.h(index.Host, null, index.h("ez-icon", { ref: (el) => this._iconElement = el, href: "/themes/default/images/icons/actions-sprite.svg#timer-outline" }), this.label ?
|
|
169
169
|
index.h("label", { onClick: () => this._inputElem.focus(), class: this.value ? "input__label input__label--floated" : "input__label", ref: (el) => this._labelElem = el, title: this.label }, this.label)
|
|
170
|
-
: null, index.h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.viewValue, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.
|
|
170
|
+
: null, index.h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.viewValue, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
|
|
171
171
|
}
|
|
172
172
|
static get watchers() { return {
|
|
173
|
-
"
|
|
173
|
+
"errorMessage": ["showError"],
|
|
174
174
|
"showSeconds": ["prepareMask"],
|
|
175
175
|
"value": ["onValueChanged"]
|
|
176
176
|
}; }
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"
|
|
18
|
+
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[4],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errorMessage":[1537,"error-message"],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"enabled":[4],"loading":[1540],"validate":[64],"getChanges":[64],"changeFieldValue":[64]}],[1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionloader":[16],"showselectedvalue":[4],"showoptionvalue":[4]}],[1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errorMessage":[1537,"error-message"],"precision":[8],"prettyprecision":[8]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headersize":[513],"iconplacement":[513],"showHide":[64]}],[1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxfilesize":[2],"maxfiles":[2],"requestheaders":[8],"urlupload":[1],"urldelete":[1],"value":[1040],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"show":[64],"fitVertical":[64],"hide":[64]}],[1,"ez-icon",{"size":[513],"href":[513]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"
|
|
17
|
+
return index.bootstrapLazy([["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[4],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"strvalue":[1025],"value":[1026],"label":[513],"enabled":[516],"errorMessage":[1537,"error-message"],"precision":[1538],"prettyprecision":[1538],"textleft":[516],"formatnumber":[513],"setFocus":[64],"setBlur":[64],"handleFocusout":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-button_16.cjs",[[0,"ez-form",{"metadataexecutor":[1],"loadexecutor":[1],"saveexecutor":[1],"removeexecutor":[1],"fieldsearchexecutor":[1],"ignoresavevalidation":[4],"metadata":[16],"slavemode":[4],"enabled":[4],"loading":[1540],"validate":[64],"getChanges":[64],"changeFieldValue":[64]}],[1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionloader":[16],"showselectedvalue":[4],"showoptionvalue":[4]}],[1,"ez-numeric-input",{"label":[513],"value":[1538],"enabled":[516],"errorMessage":[1537,"error-message"],"precision":[8],"prettyprecision":[8]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headersize":[513],"iconplacement":[513],"showHide":[64]}],[1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxfilesize":[2],"maxfiles":[2],"requestheaders":[8],"urlupload":[1],"urldelete":[1],"value":[1040],"addFiles":[64]}],[1,"place-holder"],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513]}],[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"show":[64],"fitVertical":[64],"hide":[64]}],[1,"ez-icon",{"size":[513],"href":[513]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
background-color: #FFFFFF;
|
|
39
39
|
align-items: center;
|
|
40
40
|
align-self: center;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
/*public*/
|
|
41
43
|
color: var(--ac__label--title--primary);
|
|
42
44
|
fill: var(--ac__label--title--primary);
|
|
43
45
|
border: var(--ac__border);
|
|
@@ -45,7 +47,6 @@
|
|
|
45
47
|
border-color: var(--ac__border-color-strokes);
|
|
46
48
|
padding-right: var(--space--medium, 12px);
|
|
47
49
|
padding-left: var(--space--medium, 12px);
|
|
48
|
-
cursor: pointer;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
.label__container:hover {
|