@sankhyalabs/ezui 2.0.3 → 2.0.5
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-combo-box.cjs.entry.js +4 -3
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +26 -17
- package/dist/cjs/ez-grid.cjs.entry.js +1 -11
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +4 -3
- package/dist/collection/components/ez-dialog/ez-dialog.css +2 -2
- package/dist/collection/components/ez-form/ez-form.js +1 -1
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +25 -16
- package/dist/collection/components/ez-grid/ez-grid.js +2 -47
- package/dist/custom-elements/index.d.ts +0 -12
- package/dist/custom-elements/index.js +34 -482
- package/dist/esm/ez-combo-box.entry.js +4 -3
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +26 -17
- package/dist/esm/ez-grid.entry.js +1 -11
- 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-45d8634a.entry.js +1 -0
- package/dist/ezui/{p-e120b25a.entry.js → p-a7733cb4.entry.js} +1 -1
- package/dist/ezui/p-e0aa9cb1.entry.js +1 -0
- package/dist/ezui/p-f6afdc4d.entry.js +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +0 -4
- package/dist/types/components.d.ts +0 -39
- package/package.json +1 -1
- package/react/components.d.ts +0 -2
- package/react/components.js +0 -2
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-grid-config.cjs.entry.js +0 -436
- package/dist/cjs/ez-select-box.cjs.entry.js +0 -22
- package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.css +0 -166
- package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +0 -551
- package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.css +0 -9
- package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.js +0 -62
- package/dist/esm/ez-grid-config.entry.js +0 -432
- package/dist/esm/ez-select-box.entry.js +0 -18
- package/dist/ezui/p-2c6398b3.entry.js +0 -1
- package/dist/ezui/p-3987f8d8.entry.js +0 -1
- package/dist/ezui/p-6608b9a5.entry.js +0 -1
- package/dist/ezui/p-9b1700f7.entry.js +0 -1
- package/dist/ezui/p-9fc50d9a.entry.js +0 -1
- package/dist/types/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.d.ts +0 -38
- package/dist/types/components/ez-grid/subcomponents/ez-select-box/ez-select-box.d.ts +0 -7
|
@@ -163,7 +163,7 @@ let EzComboBox = class {
|
|
|
163
163
|
}
|
|
164
164
|
buildItem(opt, index$1) {
|
|
165
165
|
const widthValue = this.showOptionValue && this._maxWidthValue > 0 ? `${this._maxWidthValue}px` : '';
|
|
166
|
-
return index.h("li", { class: index$1 === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection =
|
|
166
|
+
return index.h("li", { class: index$1 === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = index$1 }, this.showOptionValue
|
|
167
167
|
? index.h("span", { class: "item__value", title: opt.value, style: { width: widthValue, minWidth: widthValue, maxWidth: widthValue } }, opt.value)
|
|
168
168
|
: undefined, index.h("span", { class: "item__label", title: opt.label }, opt.label));
|
|
169
169
|
}
|
|
@@ -176,6 +176,7 @@ let EzComboBox = class {
|
|
|
176
176
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
177
177
|
const top = (this.errorMessage || !this.canShowError || this.mode === "slim") ? "0px" : "-19px";
|
|
178
178
|
this._floatingID = core.FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, top });
|
|
179
|
+
this.setFocus();
|
|
179
180
|
window.requestAnimationFrame(() => {
|
|
180
181
|
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
181
182
|
});
|
|
@@ -209,10 +210,10 @@ let EzComboBox = class {
|
|
|
209
210
|
const parentRect = parent.getBoundingClientRect();
|
|
210
211
|
const itemRect = liElem.getBoundingClientRect();
|
|
211
212
|
if (down && itemRect.bottom > parentRect.bottom) {
|
|
212
|
-
parent.scrollTop = itemRect.
|
|
213
|
+
parent.scrollTop = itemRect.height * (this._preSelection - 3);
|
|
213
214
|
}
|
|
214
215
|
else if (!down && itemRect.top < parentRect.top) {
|
|
215
|
-
parent.scrollTop =
|
|
216
|
+
parent.scrollTop = itemRect.height * this._preSelection;
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
219
|
});
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-8646c40d.js');
|
|
6
6
|
const DialogType = require('./DialogType-aa435c52.js');
|
|
7
7
|
|
|
8
|
-
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__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--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__container--default{border-radius:6px 6px 6px 6px}.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)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--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{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0}.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__label--no-icon{padding-left:0}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.title-icon--success{background-color:var(--dialog__success--background-color)}.title-icon--warn{background-color:var(--dialog__warning--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)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--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
|
+
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, \"Roboto\");--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, \"Roboto\");--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__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--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__container--default{border-radius:6px 6px 6px 6px}.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)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--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{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0}.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__label--no-icon{padding-left:0}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.title-icon--success{background-color:var(--dialog__success--background-color)}.title-icon--warn{background-color:var(--dialog__warning--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)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--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%}}";
|
|
9
9
|
|
|
10
10
|
class Message {
|
|
11
11
|
constructor(title, message, dialogType, confirm, icon, labelCancel, labelConfirm, btnConfirmDanger, callBack) {
|
|
@@ -166,11 +166,17 @@ class FormMetadata {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
const buildFromDataUnit = (dataUnit) => {
|
|
169
|
-
var _a;
|
|
169
|
+
var _a, _b;
|
|
170
170
|
const unitMD = dataUnit.metadata;
|
|
171
171
|
const metadata = new FormMetadata();
|
|
172
172
|
if (unitMD) {
|
|
173
173
|
const visibleFields = (_a = unitMD.fields) === null || _a === void 0 ? void 0 : _a.filter(descriptor => descriptor.visible !== false);
|
|
174
|
+
const items = new Map();
|
|
175
|
+
(_b = unitMD === null || unitMD === void 0 ? void 0 : unitMD.fields) === null || _b === void 0 ? void 0 : _b.forEach((descriptor) => {
|
|
176
|
+
if (descriptor.visible !== false) {
|
|
177
|
+
resolveFieldGroup(items, null, descriptor);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
174
180
|
let defaultValues = {};
|
|
175
181
|
visibleFields
|
|
176
182
|
.filter(descriptor => descriptor.defaultValue)
|
|
@@ -178,7 +184,7 @@ const buildFromDataUnit = (dataUnit) => {
|
|
|
178
184
|
metadata.addSheet({
|
|
179
185
|
label: unitMD.label,
|
|
180
186
|
name: unitMD.name,
|
|
181
|
-
items:
|
|
187
|
+
items: Array.from(items.values()),
|
|
182
188
|
requiredFields: visibleFields
|
|
183
189
|
.filter(descriptor => descriptor.required)
|
|
184
190
|
.map(descriptor => descriptor.name),
|
|
@@ -197,6 +203,22 @@ function getTabConfig(tab, sheets) {
|
|
|
197
203
|
function sortTabs(a, b) {
|
|
198
204
|
return a[0].label == '__main' ? -1 : (a[0].order || 10000) - (b[0].order || 10000);
|
|
199
205
|
}
|
|
206
|
+
function resolveFieldGroup(items, field, descriptor) {
|
|
207
|
+
const fieldMD = { config: field, descriptor: descriptor };
|
|
208
|
+
let group = (field === null || field === void 0 ? void 0 : field.group) || descriptor.group;
|
|
209
|
+
if (group) {
|
|
210
|
+
const key = `group::${group}`;
|
|
211
|
+
if (!items.has(key)) {
|
|
212
|
+
items.set(key, { label: group, items: [fieldMD] });
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
items.get(key).items.push(fieldMD);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
items.set((field === null || field === void 0 ? void 0 : field.name) || descriptor.name, fieldMD);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
200
222
|
const buildFromConfig = (config, dataUnit) => {
|
|
201
223
|
var _a, _b;
|
|
202
224
|
const sheets = new Map();
|
|
@@ -234,20 +256,7 @@ const buildFromConfig = (config, dataUnit) => {
|
|
|
234
256
|
if (defaultValue) {
|
|
235
257
|
defaultValues[field.name] = field.defaultValue;
|
|
236
258
|
}
|
|
237
|
-
|
|
238
|
-
const group = field.group;
|
|
239
|
-
if (group) {
|
|
240
|
-
const key = `group::${group}`;
|
|
241
|
-
if (!tabItens.has(key)) {
|
|
242
|
-
tabItens.set(key, { label: group, items: [fieldMD] });
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
tabItens.get(key).items.push(fieldMD);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
tabItens.set(field.name, fieldMD);
|
|
250
|
-
}
|
|
259
|
+
resolveFieldGroup(tabItens, field, descriptor);
|
|
251
260
|
}
|
|
252
261
|
}
|
|
253
262
|
});
|
|
@@ -925,7 +934,7 @@ let EzForm = class {
|
|
|
925
934
|
}
|
|
926
935
|
processMetadata() {
|
|
927
936
|
if (!this.isStatic() && this.dataUnit) {
|
|
928
|
-
const metadata = this.config != undefined ? buildFromConfig(this.config, this.dataUnit) : buildFromDataUnit(this.dataUnit);
|
|
937
|
+
const metadata = this.config != undefined && Object.values(this.config).length > 0 ? buildFromConfig(this.config, this.dataUnit) : buildFromDataUnit(this.dataUnit);
|
|
929
938
|
this._store.dispatch(loadMetadata(metadata));
|
|
930
939
|
}
|
|
931
940
|
}
|
|
@@ -115220,7 +115220,6 @@ let EzGrid = class {
|
|
|
115220
115220
|
this.ezDoubleClick = index.createEvent(this, "ezDoubleClick", 7);
|
|
115221
115221
|
this.configChange = index.createEvent(this, "configChange", 7);
|
|
115222
115222
|
this._gridController = new AgGridController(false);
|
|
115223
|
-
this._popUpGridConfig = false;
|
|
115224
115223
|
}
|
|
115225
115224
|
/**
|
|
115226
115225
|
* Método responsável por receber a definição das colunas
|
|
@@ -115381,18 +115380,9 @@ let EzGrid = class {
|
|
|
115381
115380
|
}
|
|
115382
115381
|
observeConfig(config) {
|
|
115383
115382
|
this._gridController.setColumnsState(config.columns);
|
|
115384
|
-
this.closeGridConfig();
|
|
115385
|
-
}
|
|
115386
|
-
async closeGridConfig() {
|
|
115387
|
-
this._popUpGridConfig = false;
|
|
115388
|
-
}
|
|
115389
|
-
async openGridConfig() {
|
|
115390
|
-
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
115391
|
-
this._gridConfig.selectedTab = "Colunas";
|
|
115392
|
-
this._popUpGridConfig = true;
|
|
115393
115383
|
}
|
|
115394
115384
|
render() {
|
|
115395
|
-
return (index.h(index.Host, null, index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("div", { class: "grid-header__container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container" }, this.getPaginationControl())), index.h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), index.h("div", { class: "grid__footer" })
|
|
115385
|
+
return (index.h(index.Host, null, index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("div", { class: "grid-header__container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container" }, this.getPaginationControl())), index.h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), index.h("div", { class: "grid__footer" })));
|
|
115396
115386
|
}
|
|
115397
115387
|
static get assetsDirs() { return ["../assets"]; }
|
|
115398
115388
|
static get watchers() { return {
|
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-
|
|
18
|
+
return index.bootstrapLazy([["ez-actions-button.cjs",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]}]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[4],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box.cjs",[[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"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[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-
|
|
17
|
+
return index.bootstrapLazy([["ez-actions-button.cjs",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64]}]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[4],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-combo-box.cjs",[[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"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
"./components/ez-dialog/ez-dialog.js",
|
|
20
20
|
"./components/ez-filter-input/ez-filter-input.js",
|
|
21
21
|
"./components/ez-grid/ez-grid.js",
|
|
22
|
-
"./components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js",
|
|
23
|
-
"./components/ez-grid/subcomponents/ez-select-box/ez-select-box.js",
|
|
24
22
|
"./components/ez-icon/ez-icon.js",
|
|
25
23
|
"./components/ez-loading-bar/ez-loading-bar.js",
|
|
26
24
|
"./components/ez-modal/ez-modal.js",
|
|
@@ -151,7 +151,7 @@ export class EzComboBox {
|
|
|
151
151
|
}
|
|
152
152
|
buildItem(opt, index) {
|
|
153
153
|
const widthValue = this.showOptionValue && this._maxWidthValue > 0 ? `${this._maxWidthValue}px` : '';
|
|
154
|
-
return h("li", { class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection =
|
|
154
|
+
return h("li", { class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = index },
|
|
155
155
|
this.showOptionValue
|
|
156
156
|
? h("span", { class: "item__value", title: opt.value, style: { width: widthValue, minWidth: widthValue, maxWidth: widthValue } }, opt.value)
|
|
157
157
|
: undefined,
|
|
@@ -166,6 +166,7 @@ export class EzComboBox {
|
|
|
166
166
|
//porque não quis onerar o text input com essa funcionalidade...
|
|
167
167
|
const top = (this.errorMessage || !this.canShowError || this.mode === "slim") ? "0px" : "-19px";
|
|
168
168
|
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, top });
|
|
169
|
+
this.setFocus();
|
|
169
170
|
window.requestAnimationFrame(() => {
|
|
170
171
|
this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
171
172
|
});
|
|
@@ -199,10 +200,10 @@ export class EzComboBox {
|
|
|
199
200
|
const parentRect = parent.getBoundingClientRect();
|
|
200
201
|
const itemRect = liElem.getBoundingClientRect();
|
|
201
202
|
if (down && itemRect.bottom > parentRect.bottom) {
|
|
202
|
-
parent.scrollTop = itemRect.
|
|
203
|
+
parent.scrollTop = itemRect.height * (this._preSelection - 3);
|
|
203
204
|
}
|
|
204
205
|
else if (!down && itemRect.top < parentRect.top) {
|
|
205
|
-
parent.scrollTop =
|
|
206
|
+
parent.scrollTop = itemRect.height * this._preSelection;
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
});
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
/* Título */
|
|
16
16
|
/*@doc Define o estilo da mensagem exibida no título.*/
|
|
17
|
-
--dialog__title--font-pattern: var(--font-pattern, "
|
|
17
|
+
--dialog__title--font-pattern: var(--font-pattern, "Roboto");
|
|
18
18
|
/*@doc Define o espaçamento a esquerda do título.*/
|
|
19
19
|
--dialog__title--padding-left: var(--space--small, 6px);
|
|
20
20
|
/*@doc Define o espaçamento abaixo do container do título.*/
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
/* Corpo da Mensagem */
|
|
27
27
|
/*@doc Define o estilo do texto da mensagem.*/
|
|
28
|
-
--dialog__body--font-pattern: var(--font-pattern, "
|
|
28
|
+
--dialog__body--font-pattern: var(--font-pattern, "Roboto");
|
|
29
29
|
/*@doc Define a sombra do texto da mensagem.*/
|
|
30
30
|
--dialog__body--text-shadow: var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");
|
|
31
31
|
/*@doc Define o peso do texto da mensagem.*/
|
|
@@ -104,7 +104,7 @@ export class EzForm {
|
|
|
104
104
|
}
|
|
105
105
|
processMetadata() {
|
|
106
106
|
if (!this.isStatic() && this.dataUnit) {
|
|
107
|
-
const metadata = this.config != undefined ? buildFromConfig(this.config, this.dataUnit) : buildFromDataUnit(this.dataUnit);
|
|
107
|
+
const metadata = this.config != undefined && Object.values(this.config).length > 0 ? buildFromConfig(this.config, this.dataUnit) : buildFromDataUnit(this.dataUnit);
|
|
108
108
|
this._store.dispatch(loadMetadata(metadata));
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -28,11 +28,17 @@ export class FormMetadata {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
export const buildFromDataUnit = (dataUnit) => {
|
|
31
|
-
var _a;
|
|
31
|
+
var _a, _b;
|
|
32
32
|
const unitMD = dataUnit.metadata;
|
|
33
33
|
const metadata = new FormMetadata();
|
|
34
34
|
if (unitMD) {
|
|
35
35
|
const visibleFields = (_a = unitMD.fields) === null || _a === void 0 ? void 0 : _a.filter(descriptor => descriptor.visible !== false);
|
|
36
|
+
const items = new Map();
|
|
37
|
+
(_b = unitMD === null || unitMD === void 0 ? void 0 : unitMD.fields) === null || _b === void 0 ? void 0 : _b.forEach((descriptor) => {
|
|
38
|
+
if (descriptor.visible !== false) {
|
|
39
|
+
resolveFieldGroup(items, null, descriptor);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
let defaultValues = {};
|
|
37
43
|
visibleFields
|
|
38
44
|
.filter(descriptor => descriptor.defaultValue)
|
|
@@ -40,7 +46,7 @@ export const buildFromDataUnit = (dataUnit) => {
|
|
|
40
46
|
metadata.addSheet({
|
|
41
47
|
label: unitMD.label,
|
|
42
48
|
name: unitMD.name,
|
|
43
|
-
items:
|
|
49
|
+
items: Array.from(items.values()),
|
|
44
50
|
requiredFields: visibleFields
|
|
45
51
|
.filter(descriptor => descriptor.required)
|
|
46
52
|
.map(descriptor => descriptor.name),
|
|
@@ -59,6 +65,22 @@ function getTabConfig(tab, sheets) {
|
|
|
59
65
|
function sortTabs(a, b) {
|
|
60
66
|
return a[0].label == '__main' ? -1 : (a[0].order || 10000) - (b[0].order || 10000);
|
|
61
67
|
}
|
|
68
|
+
function resolveFieldGroup(items, field, descriptor) {
|
|
69
|
+
const fieldMD = { config: field, descriptor: descriptor };
|
|
70
|
+
let group = (field === null || field === void 0 ? void 0 : field.group) || descriptor.group;
|
|
71
|
+
if (group) {
|
|
72
|
+
const key = `group::${group}`;
|
|
73
|
+
if (!items.has(key)) {
|
|
74
|
+
items.set(key, { label: group, items: [fieldMD] });
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
items.get(key).items.push(fieldMD);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
items.set((field === null || field === void 0 ? void 0 : field.name) || descriptor.name, fieldMD);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
62
84
|
export const buildFromConfig = (config, dataUnit) => {
|
|
63
85
|
var _a, _b;
|
|
64
86
|
const sheets = new Map();
|
|
@@ -96,20 +118,7 @@ export const buildFromConfig = (config, dataUnit) => {
|
|
|
96
118
|
if (defaultValue) {
|
|
97
119
|
defaultValues[field.name] = field.defaultValue;
|
|
98
120
|
}
|
|
99
|
-
|
|
100
|
-
const group = field.group;
|
|
101
|
-
if (group) {
|
|
102
|
-
const key = `group::${group}`;
|
|
103
|
-
if (!tabItens.has(key)) {
|
|
104
|
-
tabItens.set(key, { label: group, items: [fieldMD] });
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
tabItens.get(key).items.push(fieldMD);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
tabItens.set(field.name, fieldMD);
|
|
112
|
-
}
|
|
121
|
+
resolveFieldGroup(tabItens, field, descriptor);
|
|
113
122
|
}
|
|
114
123
|
}
|
|
115
124
|
});
|
|
@@ -3,7 +3,6 @@ import AgGridController from "./controller/ag-grid/AgGridController";
|
|
|
3
3
|
export class EzGrid {
|
|
4
4
|
constructor() {
|
|
5
5
|
this._gridController = new AgGridController(false);
|
|
6
|
-
this._popUpGridConfig = false;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
9
8
|
* Método responsável por receber a definição das colunas
|
|
@@ -166,15 +165,6 @@ export class EzGrid {
|
|
|
166
165
|
}
|
|
167
166
|
observeConfig(config) {
|
|
168
167
|
this._gridController.setColumnsState(config.columns);
|
|
169
|
-
this.closeGridConfig();
|
|
170
|
-
}
|
|
171
|
-
async closeGridConfig() {
|
|
172
|
-
this._popUpGridConfig = false;
|
|
173
|
-
}
|
|
174
|
-
async openGridConfig() {
|
|
175
|
-
this._gridConfig.columns = this._gridController.getColumnsState().filter(c => c.name);
|
|
176
|
-
this._gridConfig.selectedTab = "Colunas";
|
|
177
|
-
this._popUpGridConfig = true;
|
|
178
168
|
}
|
|
179
169
|
render() {
|
|
180
170
|
return (h(Host, null,
|
|
@@ -183,9 +173,7 @@ export class EzGrid {
|
|
|
183
173
|
h("slot", { name: "leftButtons" })),
|
|
184
174
|
h("div", { class: "grid-header__container" }, this.getPaginationControl())),
|
|
185
175
|
h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }),
|
|
186
|
-
h("div", { class: "grid__footer" })
|
|
187
|
-
h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() },
|
|
188
|
-
h("ez-grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.observeConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeGridConfig() }))));
|
|
176
|
+
h("div", { class: "grid__footer" })));
|
|
189
177
|
}
|
|
190
178
|
static get is() { return "ez-grid"; }
|
|
191
179
|
static get encapsulation() { return "scoped"; }
|
|
@@ -293,8 +281,7 @@ export class EzGrid {
|
|
|
293
281
|
}
|
|
294
282
|
}; }
|
|
295
283
|
static get states() { return {
|
|
296
|
-
"_paginationInfo": {}
|
|
297
|
-
"_popUpGridConfig": {}
|
|
284
|
+
"_paginationInfo": {}
|
|
298
285
|
}; }
|
|
299
286
|
static get events() { return [{
|
|
300
287
|
"method": "ezColumnStateChange",
|
|
@@ -557,38 +544,6 @@ export class EzGrid {
|
|
|
557
544
|
"text": "M\u00E9todo para fazer um filtro r\u00E1pido na grid.",
|
|
558
545
|
"tags": []
|
|
559
546
|
}
|
|
560
|
-
},
|
|
561
|
-
"closeGridConfig": {
|
|
562
|
-
"complexType": {
|
|
563
|
-
"signature": "() => Promise<void>",
|
|
564
|
-
"parameters": [],
|
|
565
|
-
"references": {
|
|
566
|
-
"Promise": {
|
|
567
|
-
"location": "global"
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
"return": "Promise<void>"
|
|
571
|
-
},
|
|
572
|
-
"docs": {
|
|
573
|
-
"text": "",
|
|
574
|
-
"tags": []
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
"openGridConfig": {
|
|
578
|
-
"complexType": {
|
|
579
|
-
"signature": "() => Promise<void>",
|
|
580
|
-
"parameters": [],
|
|
581
|
-
"references": {
|
|
582
|
-
"Promise": {
|
|
583
|
-
"location": "global"
|
|
584
|
-
}
|
|
585
|
-
},
|
|
586
|
-
"return": "Promise<void>"
|
|
587
|
-
},
|
|
588
|
-
"docs": {
|
|
589
|
-
"text": "",
|
|
590
|
-
"tags": []
|
|
591
|
-
}
|
|
592
547
|
}
|
|
593
548
|
}; }
|
|
594
549
|
static get watchers() { return [{
|
|
@@ -92,12 +92,6 @@ export const EzGrid: {
|
|
|
92
92
|
new (): EzGrid;
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
interface EzGridConfig extends Components.EzGridConfig, HTMLElement {}
|
|
96
|
-
export const EzGridConfig: {
|
|
97
|
-
prototype: EzGridConfig;
|
|
98
|
-
new (): EzGridConfig;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
95
|
interface EzIcon extends Components.EzIcon, HTMLElement {}
|
|
102
96
|
export const EzIcon: {
|
|
103
97
|
prototype: EzIcon;
|
|
@@ -164,12 +158,6 @@ export const EzSearch: {
|
|
|
164
158
|
new (): EzSearch;
|
|
165
159
|
};
|
|
166
160
|
|
|
167
|
-
interface EzSelectBox extends Components.EzSelectBox, HTMLElement {}
|
|
168
|
-
export const EzSelectBox: {
|
|
169
|
-
prototype: EzSelectBox;
|
|
170
|
-
new (): EzSelectBox;
|
|
171
|
-
};
|
|
172
|
-
|
|
173
161
|
interface EzTabselector extends Components.EzTabselector, HTMLElement {}
|
|
174
162
|
export const EzTabselector: {
|
|
175
163
|
prototype: EzTabselector;
|