@sankhyalabs/ezui 1.1.124 → 1.1.127
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/{CSSVarsUtils-8fbdf2e0.js → CSSVarsUtils-1034b7b6.js} +2 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +22 -9
- package/dist/cjs/ez-combo-box.cjs.entry.js +7 -3
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +7 -4
- package/dist/cjs/ez-grid.cjs.entry.js +112 -22
- package/dist/cjs/ez-list.cjs.entry.js +6 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +13 -3
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/grid-config.cjs.entry.js +167 -31
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/select-box.cjs.entry.js +1 -1
- package/dist/collection/components/ez-check/ez-check.js +1 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +91 -83
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +49 -18
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +6 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +23 -1
- package/dist/collection/components/ez-form/ez-form.css +5 -0
- package/dist/collection/components/ez-form/structure/FormItem.js +1 -1
- package/dist/collection/components/ez-form/structure/FormSheet.js +1 -1
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +4 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +38 -18
- package/dist/collection/components/ez-grid/ez-grid.js +117 -7
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +190 -37
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +3 -3
- package/dist/collection/components/ez-list/ez-list.js +23 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +15 -4
- package/dist/collection/components/ez-text-input/ez-text-input.css +4 -0
- package/dist/collection/utils/CSSVarsUtils.js +2 -0
- package/dist/custom-elements/index.js +341 -77
- package/dist/esm/{CSSVarsUtils-667e0016.js → CSSVarsUtils-eb4c5af6.js} +2 -0
- package/dist/esm/ez-collapsible-box.entry.js +23 -10
- package/dist/esm/ez-combo-box.entry.js +7 -3
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +7 -4
- package/dist/esm/ez-grid.entry.js +112 -22
- package/dist/esm/ez-list.entry.js +6 -0
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +13 -3
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/grid-config.entry.js +167 -31
- package/dist/esm/loader.js +1 -1
- package/dist/esm/select-box.entry.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-4262a462.entry.js → p-248d8511.entry.js} +1 -1
- package/dist/ezui/p-35edc488.entry.js +1 -0
- package/dist/ezui/{p-2d894fed.entry.js → p-5821c335.entry.js} +1 -1
- package/dist/ezui/p-5a9ab4f7.entry.js +1 -0
- package/dist/ezui/{p-e62f5c77.entry.js → p-5f725a93.entry.js} +1 -1
- package/dist/ezui/p-7d5657c7.entry.js +1 -0
- package/dist/ezui/p-7d5b2ebf.entry.js +1 -0
- package/dist/ezui/p-7f87f762.entry.js +1 -0
- package/dist/ezui/p-933a7475.js +1 -0
- package/dist/ezui/p-b59ab2d5.entry.js +1 -0
- package/dist/ezui/{p-1db59c89.entry.js → p-c6b2b2e5.entry.js} +1 -1
- package/dist/ezui/{p-0927092b.entry.js → p-cbfb94cb.entry.js} +1 -1
- package/dist/ezui/p-cf8309fc.entry.js +1 -0
- package/dist/ezui/{p-5e989ecf.entry.js → p-ec205792.entry.js} +1 -1
- package/dist/ezui/{p-8543a1b3.entry.js → p-ed1e0331.entry.js} +1 -1
- package/dist/ezui/{p-28ce145e.entry.js → p-f65302bb.entry.js} +1 -1
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +12 -3
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +35 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +3 -3
- package/dist/types/components/ez-grid/ez-grid.d.ts +14 -3
- package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +10 -4
- package/dist/types/components/ez-list/ez-list.d.ts +5 -0
- package/dist/types/components.d.ts +44 -10
- package/package.json +3 -3
- package/dist/ezui/p-0965bcae.entry.js +0 -1
- package/dist/ezui/p-46d1340b.entry.js +0 -1
- package/dist/ezui/p-6745931a.entry.js +0 -1
- package/dist/ezui/p-91e51dc9.entry.js +0 -1
- package/dist/ezui/p-9a9b2936.entry.js +0 -1
- package/dist/ezui/p-a44dcc62.entry.js +0 -1
- package/dist/ezui/p-c621cab9.entry.js +0 -1
- package/dist/ezui/p-d54c157f.js +0 -1
|
@@ -407,7 +407,7 @@ let EzCheck$1 = class extends HTMLElement$1 {
|
|
|
407
407
|
static get style() { return ezCheckCss; }
|
|
408
408
|
};
|
|
409
409
|
|
|
410
|
-
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--
|
|
410
|
+
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;margin-bottom:var(--space--medium, 12px)}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition);--ez-icon--color:var(--ez-collapsible-box__icon--color, --ez-collapsible-box--color)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--stretched{width:100%;justify-content:space-between}.collapsible-box__content{display:flex;flex-wrap:wrap;overflow:hidden;width:100%;height:0px;max-height:0px;opacity:0;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
411
411
|
|
|
412
412
|
let EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
413
413
|
constructor() {
|
|
@@ -416,35 +416,48 @@ let EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
416
416
|
this.__attachShadow();
|
|
417
417
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
418
418
|
/**
|
|
419
|
-
* Valor externalizado que garante a exibição ou não do componente
|
|
419
|
+
* Valor externalizado que garante a exibição ou não do componente.
|
|
420
420
|
*/
|
|
421
421
|
this.value = false;
|
|
422
422
|
/**
|
|
423
423
|
* Define o tamanho do texto e do ícone do componente.
|
|
424
|
+
* Tamanhos suportados: "x-small", "small", "medium", "large" e "x-large".
|
|
424
425
|
*/
|
|
425
426
|
this.headerSize = "small";
|
|
426
427
|
/**
|
|
427
428
|
* Define o local onde o ícone será renderizado.
|
|
428
429
|
*/
|
|
429
430
|
this.iconPlacement = "left";
|
|
431
|
+
/**
|
|
432
|
+
* Define se o titulo irá ocupar toda a largura do componente.
|
|
433
|
+
*/
|
|
434
|
+
this.stretchTitle = false;
|
|
430
435
|
}
|
|
431
|
-
|
|
436
|
+
observeCollapsedValue() {
|
|
432
437
|
this.ezChange.emit(this.value);
|
|
433
438
|
}
|
|
434
439
|
/**
|
|
435
|
-
* Esconde ou revela o conteúdo do componente
|
|
440
|
+
* Esconde ou revela o conteúdo do componente.
|
|
436
441
|
*/
|
|
437
442
|
async showHide() {
|
|
438
443
|
this.value = !this.value;
|
|
439
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Retorna o tamanho configurado do texto e do ícone.
|
|
447
|
+
*/
|
|
448
|
+
getHeaderSize() {
|
|
449
|
+
const sizeAlias = ["xsmall", "xlarge"];
|
|
450
|
+
const sizeList = ["x-small", "small", "medium", "large", "x-large"];
|
|
451
|
+
const headerSize = sizeAlias.includes(this.headerSize) ? this.headerSize.replace('x', 'x-') : this.headerSize;
|
|
452
|
+
return sizeList.includes(headerSize) ? headerSize : "small";
|
|
453
|
+
}
|
|
440
454
|
render() {
|
|
441
|
-
return (h(
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
h("div", { class: "collapsible-box__title" }, h("button", { class: this.value ? "collapsible-box__btn collapsible-box__btn--collapsed " + "collapsible-box__btn--" + this.headerSize : "collapsible-box__btn " + "collapsible-box__btn--" + this.headerSize, onClick: () => this.showHide() }), h("label", { class: (this.iconPlacement == "right" ? "collapsible-box__label--icon-right " : "collapsible-box__label ") + (this.headerSize ? "font--" + this.headerSize : ""), onClick: () => this.showHide(), title: this.label }, this.label)), !this.value ? h("slot", null) : null));
|
|
455
|
+
return (h("div", { class: "collapsible-box" }, h("div", { class: "collapsible-box__header" }, h("button", { onClick: () => this.showHide(), class: "collapsible-box__title" +
|
|
456
|
+
(this.iconPlacement === "right" ? " collapsible-box__title--icon-right" : "") +
|
|
457
|
+
(this.stretchTitle ? " collapsible-box__title--stretched" : "") }, h("ez-icon", { slot: "icon", "icon-name": "chevron-right", size: this.getHeaderSize(), class: "collapsible-box__icon collapsible-box__icon--" + this.getHeaderSize() + (this.value ? " collapsible-box__icon--collapsed" : "") }), h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label }, this.label))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") }, h("slot", null))));
|
|
445
458
|
}
|
|
446
459
|
static get watchers() { return {
|
|
447
|
-
"value": ["
|
|
460
|
+
"value": ["observeCollapsedValue"]
|
|
448
461
|
}; }
|
|
449
462
|
static get style() { return ezCollapsibleBoxCss; }
|
|
450
463
|
};
|
|
@@ -455,6 +468,8 @@ class CSSVarsUtils {
|
|
|
455
468
|
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
456
469
|
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
457
470
|
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
471
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
|
|
472
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
|
|
458
473
|
}
|
|
459
474
|
}
|
|
460
475
|
static applyIfExists(host, element, varName) {
|
|
@@ -465,7 +480,7 @@ class CSSVarsUtils {
|
|
|
465
480
|
}
|
|
466
481
|
}
|
|
467
482
|
|
|
468
|
-
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn-search--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-search-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-search-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__btn-options--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-options-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-options-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box__drop-down-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--ez-combo-box__search-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"22px\" width=\"22px\"><path d=\"m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z\"/></svg>');--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn-open-options{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-options:disabled{cursor:unset}.btn-open-options::after{content:'';display:flex;background-color:var(--ez-combo-box__btn-options--background-color);width:16px;height:16px;-webkit-mask-image:var(--ez-combo-box__drop-down-image);mask-image:var(--ez-combo-box__drop-down-image)}.btn-open-options:disabled:after{background-color:var(--ez-combo-box__btn-options-disabled--background-color)}.btn-open-options:enabled:hover::after{background-color:var(--ez-combo-box__btn-options-hover--background-color)}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:'';display:flex;background-color:var(--ez-combo-box__btn-search--background-color);width:22px;height:22px;-webkit-mask-image:var(--ez-combo-box__search-image);mask-image:var(--ez-combo-box__search-image)}.btn-open-search:disabled:after{background-color:var(--ez-combo-box__btn-search-disabled--background-color)}.btn-open-search:enabled:hover::after{background-color:var(--ez-combo-box__btn-search-hover--background-color)}";
|
|
483
|
+
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn-search--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-search-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-search-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__btn-options--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-options-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-options-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box__drop-down-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"16px\"><path d=\"M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z\"/></svg>');--ez-combo-box__search-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"22px\" width=\"22px\"><path d=\"m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z\"/></svg>');--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #000)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn-open-options{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-options:disabled{cursor:unset}.btn-open-options::after{content:'';display:flex;background-color:var(--ez-combo-box__btn-options--background-color);width:16px;height:16px;-webkit-mask-image:var(--ez-combo-box__drop-down-image);mask-image:var(--ez-combo-box__drop-down-image)}.btn-open-options:disabled:after{background-color:var(--ez-combo-box__btn-options-disabled--background-color)}.btn-open-options:enabled:hover::after{background-color:var(--ez-combo-box__btn-options-hover--background-color)}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:'';display:flex;background-color:var(--ez-combo-box__btn-search--background-color);width:22px;height:22px;-webkit-mask-image:var(--ez-combo-box__search-image);mask-image:var(--ez-combo-box__search-image)}.btn-open-search:disabled:after{background-color:var(--ez-combo-box__btn-search-disabled--background-color)}.btn-open-search:enabled:hover::after{background-color:var(--ez-combo-box__btn-search-hover--background-color)}";
|
|
469
484
|
|
|
470
485
|
let EzComboBox$1 = class extends HTMLElement$1 {
|
|
471
486
|
constructor() {
|
|
@@ -485,6 +500,10 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
485
500
|
* Ajusta a opção de mostrar o "value" para cada opção. Por padrão não mostra
|
|
486
501
|
*/
|
|
487
502
|
this.showOptionValue = false;
|
|
503
|
+
/**
|
|
504
|
+
* Desabilita a digitação dentro do componente.
|
|
505
|
+
*/
|
|
506
|
+
this.suppressSearch = false;
|
|
488
507
|
/**
|
|
489
508
|
* Remove a opção vazia da lista de opções
|
|
490
509
|
*/
|
|
@@ -733,7 +752,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
733
752
|
this.cancelPreselection();
|
|
734
753
|
}
|
|
735
754
|
render() {
|
|
736
|
-
return (h(Host, null, h("ez-text-input", { ref: elem => this._inputElement = elem, enabled: this.enabled, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, this.searchMode ?
|
|
755
|
+
return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, this.searchMode ?
|
|
737
756
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-search", onClick: () => { this.loadOptions("ADVANCED"); }, slot: "leftIcon" })
|
|
738
757
|
:
|
|
739
758
|
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-options", slot: "rightIcon", onClick: () => this.showOptions() })), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
|
|
@@ -1257,7 +1276,7 @@ const buildField = (field) => {
|
|
|
1257
1276
|
const FormItem = ({ source }) => {
|
|
1258
1277
|
if ("items" in source) {
|
|
1259
1278
|
const fieldSet = source;
|
|
1260
|
-
return h("ez-collapsible-box", { label: source.label }, fieldSet.items.map(fi => buildField(fi)));
|
|
1279
|
+
return h("ez-collapsible-box", { label: source.label, "header-size": "large" }, fieldSet.items.map(fi => buildField(fi)));
|
|
1261
1280
|
}
|
|
1262
1281
|
else {
|
|
1263
1282
|
return buildField(source);
|
|
@@ -1265,7 +1284,7 @@ const FormItem = ({ source }) => {
|
|
|
1265
1284
|
};
|
|
1266
1285
|
|
|
1267
1286
|
const FormSheet = ({ store, source }) => {
|
|
1268
|
-
return (h("div", { class: "box__container" },
|
|
1287
|
+
return (h("div", { class: "dynamic-content box__container" },
|
|
1269
1288
|
h("div", { class: "row padding-vertical--small" }, source.items.map(item => h(FormItem, { store: store, source: item })))));
|
|
1270
1289
|
};
|
|
1271
1290
|
|
|
@@ -1317,6 +1336,9 @@ function getTabConfig(tab, sheets) {
|
|
|
1317
1336
|
const tabConfig = (typeof tab === "string" ? Array.from(sheets.keys()).find(t => t.label === tab) : tab);
|
|
1318
1337
|
return tabConfig || { label: tab, visible: true };
|
|
1319
1338
|
}
|
|
1339
|
+
function sortTabs(a, b) {
|
|
1340
|
+
return a[0].label == 'Geral' ? -1 : (a[0].order || 10000) - (b[0].order || 10000);
|
|
1341
|
+
}
|
|
1320
1342
|
const buildFromConfig = (fields, dataUnit) => {
|
|
1321
1343
|
const sheets = new Map();
|
|
1322
1344
|
const requiredFields = [];
|
|
@@ -1358,7 +1380,7 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
1358
1380
|
});
|
|
1359
1381
|
const metadata = new FormMetadata();
|
|
1360
1382
|
Array.from(sheets.entries())
|
|
1361
|
-
.sort(
|
|
1383
|
+
.sort(sortTabs)
|
|
1362
1384
|
.forEach(([key, value]) => {
|
|
1363
1385
|
metadata.addSheet({
|
|
1364
1386
|
label: key.label,
|
|
@@ -1882,7 +1904,7 @@ ApplicationUtils.defaultMessageOptions = {
|
|
|
1882
1904
|
btnConfirmDanger: false
|
|
1883
1905
|
};
|
|
1884
1906
|
|
|
1885
|
-
const ezFormCss = "ez-form{display:flex;flex-direction:column;width:100%}";
|
|
1907
|
+
const ezFormCss = "ez-form{display:flex;flex-direction:column;width:100%}.dynamic-content ez-collapsible-box{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";
|
|
1886
1908
|
|
|
1887
1909
|
let EzForm$1 = class extends HTMLElement$1 {
|
|
1888
1910
|
constructor() {
|
|
@@ -112107,6 +112129,7 @@ class AgGridController {
|
|
|
112107
112129
|
serverSideStoreType: "partial",
|
|
112108
112130
|
rowSelection: this._multipleSelection ? "multiple" : "single",
|
|
112109
112131
|
serverSideDatasource: this._dataSource,
|
|
112132
|
+
sortingOrder: ['desc', 'asc', null],
|
|
112110
112133
|
getRowNodeId: (params) => typeof params === "string" ? params : params[this._idAttribName],
|
|
112111
112134
|
getMainMenuItems: (params) => {
|
|
112112
112135
|
const column = params.column;
|
|
@@ -112146,6 +112169,7 @@ class AgGridController {
|
|
|
112146
112169
|
opt.onSelectionChanged = e => this.onSelectionChange(e);
|
|
112147
112170
|
opt.onPaginationChanged = () => this.onPaginationChange();
|
|
112148
112171
|
opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
|
|
112172
|
+
opt.onDragStopped = evt => this.onCallStateChange("columnMovedEnd", evt);
|
|
112149
112173
|
opt.onViewportChanged = () => {
|
|
112150
112174
|
if (this._dataUnit) {
|
|
112151
112175
|
this.selectRows(this._dataUnit.getSelection());
|
|
@@ -112233,6 +112257,7 @@ class AgGridController {
|
|
|
112233
112257
|
const colDefs = [];
|
|
112234
112258
|
if (showCheckSelection) {
|
|
112235
112259
|
colDefs.push({
|
|
112260
|
+
colId: "checkBoxColumn",
|
|
112236
112261
|
headerName: "",
|
|
112237
112262
|
checkboxSelection: true,
|
|
112238
112263
|
headerCheckboxSelection: false,
|
|
@@ -112270,13 +112295,24 @@ class AgGridController {
|
|
|
112270
112295
|
if (this._grid === undefined) {
|
|
112271
112296
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112272
112297
|
}
|
|
112273
|
-
|
|
112274
|
-
|
|
112275
|
-
|
|
112276
|
-
|
|
112277
|
-
|
|
112278
|
-
|
|
112279
|
-
|
|
112298
|
+
let columns = this.getColumnsDef();
|
|
112299
|
+
let visibleColumns = [];
|
|
112300
|
+
let sort = [];
|
|
112301
|
+
state.forEach((cfgColumn, index) => {
|
|
112302
|
+
this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + 1);
|
|
112303
|
+
this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, cfgColumn.width);
|
|
112304
|
+
visibleColumns.push(cfgColumn.name);
|
|
112305
|
+
if (cfgColumn.ascending !== undefined) {
|
|
112306
|
+
sort.push({ colId: cfgColumn.name, sort: cfgColumn.ascending !== true ? 'desc' : 'asc', sortIndex: cfgColumn.orderIndex });
|
|
112307
|
+
}
|
|
112308
|
+
});
|
|
112309
|
+
let invisibleColumns = columns.filter(column => !visibleColumns.includes(column.name)).map(column => column.name);
|
|
112310
|
+
this._gridOptions.columnApi.setColumnsVisible(visibleColumns, true);
|
|
112311
|
+
this._gridOptions.columnApi.setColumnsVisible(invisibleColumns, false);
|
|
112312
|
+
this._gridOptions.columnApi.applyColumnState({
|
|
112313
|
+
state: sort,
|
|
112314
|
+
defaultState: { sort: null },
|
|
112315
|
+
});
|
|
112280
112316
|
}
|
|
112281
112317
|
getColumnsState() {
|
|
112282
112318
|
if (this._grid === undefined) {
|
|
@@ -112369,22 +112405,28 @@ class AgGridController {
|
|
|
112369
112405
|
}
|
|
112370
112406
|
}
|
|
112371
112407
|
}
|
|
112372
|
-
buildColState(source) {
|
|
112373
|
-
return {
|
|
112374
|
-
colId: source.name,
|
|
112375
|
-
sort: source.sort,
|
|
112376
|
-
sortIndex: source.sortIndex,
|
|
112377
|
-
width: source.width,
|
|
112378
|
-
pinned: source.pinned ? "left" : null,
|
|
112379
|
-
hide: source.hidden
|
|
112380
|
-
};
|
|
112381
|
-
}
|
|
112382
112408
|
onCallStateChange(type, e) {
|
|
112383
112409
|
const finished = !("finished" in e) || e["finished"];
|
|
112384
112410
|
if (finished && this._columnStateChangeCallback) {
|
|
112385
|
-
|
|
112411
|
+
let info = {};
|
|
112412
|
+
let isUserChange = this.isUIEvent(e['source'], e['type']);
|
|
112413
|
+
if (type === 'columnResize') {
|
|
112414
|
+
info['column'] = { colId: e['column'].colId, actualWidth: e['column'].actualWidth };
|
|
112415
|
+
}
|
|
112416
|
+
info['isUserChange'] = isUserChange;
|
|
112417
|
+
this._columnStateChangeCallback(type, this.getColumnsState(), info);
|
|
112386
112418
|
}
|
|
112387
112419
|
}
|
|
112420
|
+
isUIEvent(source, type) {
|
|
112421
|
+
let optionsArr = ["uiColumnMoved", "uiColumnResized", "uiColumnDragged", "uiColumnExpanded", "uiColumnSorted"];
|
|
112422
|
+
if (type === 'dragStopped') {
|
|
112423
|
+
return true;
|
|
112424
|
+
}
|
|
112425
|
+
if (source) {
|
|
112426
|
+
return optionsArr.includes(source);
|
|
112427
|
+
}
|
|
112428
|
+
return false;
|
|
112429
|
+
}
|
|
112388
112430
|
onSelectionChange(e) {
|
|
112389
112431
|
if (this._selectionChangeCallback) {
|
|
112390
112432
|
this._selectionChangeCallback(e.api.getSelectedRows());
|
|
@@ -112482,6 +112524,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112482
112524
|
this.ezColumnStateChange = createEvent(this, "ezColumnStateChange", 7);
|
|
112483
112525
|
this.ezSelectionChange = createEvent(this, "ezSelectionChange", 7);
|
|
112484
112526
|
this.ezDoubleClick = createEvent(this, "ezDoubleClick", 7);
|
|
112527
|
+
this.configChange = createEvent(this, "configChange", 7);
|
|
112485
112528
|
this._gridController = new AgGridController(false);
|
|
112486
112529
|
this._popUpVisible = false;
|
|
112487
112530
|
/**
|
|
@@ -112551,9 +112594,72 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112551
112594
|
addEventListener("ezSelectionChange", (evt) => this.dataUnit.setSelection(evt.detail.map((r) => r.__record__id__)));
|
|
112552
112595
|
}
|
|
112553
112596
|
}
|
|
112597
|
+
onColumnStateChange(type, state, info) {
|
|
112598
|
+
var _a;
|
|
112599
|
+
this.ezColumnStateChange.emit({ type, state, isUserChange: info.isUserChange });
|
|
112600
|
+
if (info.isUserChange) {
|
|
112601
|
+
if (type === 'columnMovedEnd') {
|
|
112602
|
+
let newConfig;
|
|
112603
|
+
if (this.config) {
|
|
112604
|
+
newConfig = { columns: [] };
|
|
112605
|
+
state.forEach(columnState => {
|
|
112606
|
+
let newConfigColumn = this.config.columns.find(column => column.name === columnState.name);
|
|
112607
|
+
if (newConfigColumn) {
|
|
112608
|
+
newConfigColumn.width = columnState.width;
|
|
112609
|
+
newConfig.columns.push(newConfigColumn);
|
|
112610
|
+
}
|
|
112611
|
+
});
|
|
112612
|
+
}
|
|
112613
|
+
else {
|
|
112614
|
+
newConfig = this.createConfigFromState(state);
|
|
112615
|
+
}
|
|
112616
|
+
if (newConfig.columns.length > 0) {
|
|
112617
|
+
this.configChange.emit(newConfig);
|
|
112618
|
+
}
|
|
112619
|
+
}
|
|
112620
|
+
else if (type === 'columnResize') {
|
|
112621
|
+
if ((_a = info.column) === null || _a === void 0 ? void 0 : _a.colId) {
|
|
112622
|
+
let newConfig;
|
|
112623
|
+
if (this.config) {
|
|
112624
|
+
newConfig = Object.assign({}, this.config);
|
|
112625
|
+
}
|
|
112626
|
+
else {
|
|
112627
|
+
newConfig = this.createConfigFromState(state);
|
|
112628
|
+
}
|
|
112629
|
+
let newColumn = newConfig.columns.find(column => column.name === info.column.colId);
|
|
112630
|
+
if (newColumn) {
|
|
112631
|
+
newColumn.width = info.column.actualWidth;
|
|
112632
|
+
this.configChange.emit(newConfig);
|
|
112633
|
+
}
|
|
112634
|
+
}
|
|
112635
|
+
}
|
|
112636
|
+
}
|
|
112637
|
+
}
|
|
112638
|
+
createConfigFromState(state) {
|
|
112639
|
+
let newConfig = { columns: [] };
|
|
112640
|
+
state.forEach(columnState => {
|
|
112641
|
+
if (!columnState.hidden) {
|
|
112642
|
+
let newConfigColumn = { name: columnState.name };
|
|
112643
|
+
if (columnState.width) {
|
|
112644
|
+
newConfigColumn['width'] = columnState.width;
|
|
112645
|
+
}
|
|
112646
|
+
if (columnState.sort) {
|
|
112647
|
+
newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
|
|
112648
|
+
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
|
112649
|
+
}
|
|
112650
|
+
else {
|
|
112651
|
+
newConfigColumn['orderIndex'] = 0;
|
|
112652
|
+
}
|
|
112653
|
+
if (newConfigColumn) {
|
|
112654
|
+
newConfig.columns.push(newConfigColumn);
|
|
112655
|
+
}
|
|
112656
|
+
}
|
|
112657
|
+
});
|
|
112658
|
+
return newConfig;
|
|
112659
|
+
}
|
|
112554
112660
|
componentDidLoad() {
|
|
112555
112661
|
this._gridController.initDatagrid(this._container, {
|
|
112556
|
-
onColumnStateChange: (type, state) => this.
|
|
112662
|
+
onColumnStateChange: (type, state, info) => this.onColumnStateChange(type, state, info),
|
|
112557
112663
|
onSelectionChange: (selection) => this.ezSelectionChange.emit(selection),
|
|
112558
112664
|
onPaginationChange: (status) => {
|
|
112559
112665
|
this._navigationHasPrevious = status.hasPrevious;
|
|
@@ -112573,6 +112679,9 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112573
112679
|
if (this._dataUnitBridge) {
|
|
112574
112680
|
this._gridController.setColumnsDef(this._dataUnitBridge.buildColumnDefs(), true);
|
|
112575
112681
|
}
|
|
112682
|
+
if (this.config) {
|
|
112683
|
+
this.applyConfig(this.config);
|
|
112684
|
+
}
|
|
112576
112685
|
}
|
|
112577
112686
|
disconnectedCallback() {
|
|
112578
112687
|
if (this._dataUnitBridge) {
|
|
@@ -112589,8 +112698,8 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112589
112698
|
h("ez-button", { size: "small", iconName: "chevron-right", class: "margin-right--medium", mode: "icon", enabled: this._navigationHasNext, onClick: () => this._gridController.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })
|
|
112590
112699
|
];
|
|
112591
112700
|
}
|
|
112592
|
-
applyConfig(
|
|
112593
|
-
this._gridController.setColumnsState(
|
|
112701
|
+
applyConfig(config) {
|
|
112702
|
+
this._gridController.setColumnsState(config.columns);
|
|
112594
112703
|
this.closeConfig();
|
|
112595
112704
|
}
|
|
112596
112705
|
closeConfig() {
|
|
@@ -112602,9 +112711,12 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
112602
112711
|
this._popUpVisible = true;
|
|
112603
112712
|
}
|
|
112604
112713
|
render() {
|
|
112605
|
-
return (h(Host, null, h("div", { class: "box box--shadow padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl(), h("ez-button", { size: "small", iconName: "settings", class: "button--secondary", mode: "icon", onClick: () => { this.openConfig(); } }))), h("div", { class: "grid__container ag-sankhya-theme", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: true, closeOutsideClick: true, opened: this._popUpVisible, onEzCloseModal: () => this._popUpVisible = false }, h("grid-config", { ref: ref => this._gridConfig = ref, selectedTab: "Colunas", onConfigFinish: evt => this.applyConfig(evt.detail), onConfigCancel: _evt => this.closeConfig() }))));
|
|
112714
|
+
return (h(Host, null, h("div", { class: "box box--shadow padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl(), h("ez-button", { size: "small", iconName: "settings", class: "button--secondary", mode: "icon", onClick: () => { this.openConfig(); } }))), h("div", { class: "grid__container ag-sankhya-theme", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: true, closeOutsideClick: true, opened: this._popUpVisible, onEzCloseModal: () => this._popUpVisible = false }, h("grid-config", { ref: ref => this._gridConfig = ref, config: this.config, selectedTab: "Colunas", onConfigFinish: evt => { this.applyConfig(evt.detail); this.configChange.emit(evt.detail); }, onConfigCancel: _evt => this.closeConfig() }))));
|
|
112606
112715
|
}
|
|
112607
112716
|
static get assetsDirs() { return ["../assets"]; }
|
|
112717
|
+
static get watchers() { return {
|
|
112718
|
+
"config": ["applyConfig"]
|
|
112719
|
+
}; }
|
|
112608
112720
|
static get style() { return ezGridCss; }
|
|
112609
112721
|
};
|
|
112610
112722
|
|
|
@@ -112793,6 +112905,12 @@ let EzList$1 = class extends HTMLElement$1 {
|
|
|
112793
112905
|
}
|
|
112794
112906
|
}
|
|
112795
112907
|
/**
|
|
112908
|
+
* Responsável por limpar a lista de histórico do componente.
|
|
112909
|
+
*/
|
|
112910
|
+
async clearHistory() {
|
|
112911
|
+
this._listItemsHistory = [];
|
|
112912
|
+
}
|
|
112913
|
+
/**
|
|
112796
112914
|
* Recebe como argumento um ListItem {label: string} e um booleano que define se o componente deve fazer scroll para exibir o item específico (opcional).
|
|
112797
112915
|
*/
|
|
112798
112916
|
async setSelection(selectedItem, scrollToOption) {
|
|
@@ -113828,6 +113946,10 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
113828
113946
|
* Deixa o campo disponível ou não para digitação.
|
|
113829
113947
|
*/
|
|
113830
113948
|
this.enabled = true;
|
|
113949
|
+
/**
|
|
113950
|
+
* Ajusta o número de linhas e consequentemente o height do textarea. Valor default: 4
|
|
113951
|
+
*/
|
|
113952
|
+
this.rows = 4;
|
|
113831
113953
|
/**
|
|
113832
113954
|
* Permite exibir a mensagem de erro.
|
|
113833
113955
|
*/
|
|
@@ -113859,11 +113981,17 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
113859
113981
|
if (this._initialRows == undefined) {
|
|
113860
113982
|
this._initialRows = this.rows > 0 ? this.rows : undefined;
|
|
113861
113983
|
}
|
|
113862
|
-
|
|
113984
|
+
const rows = this._initialRows > 0 ? this._initialRows : this.mode != "slim" ? 4 : 2;
|
|
113985
|
+
if (rows !== this.rows) {
|
|
113986
|
+
this.rows = rows;
|
|
113987
|
+
}
|
|
113863
113988
|
}
|
|
113864
113989
|
adjustRowsValue() {
|
|
113865
|
-
|
|
113866
|
-
|
|
113990
|
+
const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
|
|
113991
|
+
if (rows !== this.rows) {
|
|
113992
|
+
this.rows = rows;
|
|
113993
|
+
this._initialRows = rows;
|
|
113994
|
+
}
|
|
113867
113995
|
}
|
|
113868
113996
|
adjustFloatingLabel() {
|
|
113869
113997
|
if (this.label && this._labelElem) {
|
|
@@ -113944,7 +114072,7 @@ let EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
113944
114072
|
static get style() { return ezTextAreaCss; }
|
|
113945
114073
|
};
|
|
113946
114074
|
|
|
113947
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}";
|
|
114075
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}";
|
|
113948
114076
|
|
|
113949
114077
|
let EzTextInput$1 = class extends HTMLElement$1 {
|
|
113950
114078
|
constructor() {
|
|
@@ -114726,30 +114854,50 @@ let GridConfig$1 = class extends HTMLElement$1 {
|
|
|
114726
114854
|
this.__registerHost();
|
|
114727
114855
|
this.configFinish = createEvent(this, "configFinish", 7);
|
|
114728
114856
|
this.configCancel = createEvent(this, "configCancel", 7);
|
|
114729
|
-
this._columnListHistory = [];
|
|
114730
114857
|
this._orderListItems = [];
|
|
114858
|
+
this._orderPriorityList = [];
|
|
114731
114859
|
this._columListItems = [];
|
|
114732
|
-
this.selectedTab = "Colunas";
|
|
114733
114860
|
this._selectedIndex = -1;
|
|
114861
|
+
this.selectedTab = "Colunas";
|
|
114734
114862
|
}
|
|
114735
114863
|
/* Creation Methods */
|
|
114736
114864
|
createOrderList() {
|
|
114737
|
-
var _a;
|
|
114738
114865
|
let newList = [];
|
|
114739
|
-
|
|
114740
|
-
|
|
114741
|
-
|
|
114866
|
+
this.columns.forEach(column => {
|
|
114867
|
+
var _a;
|
|
114868
|
+
let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
|
|
114869
|
+
let item = { name: column.name, label: column.label };
|
|
114870
|
+
if (configItem) {
|
|
114871
|
+
item['orderIndex'] = configItem.orderIndex;
|
|
114872
|
+
item['ascending'] = configItem.ascending;
|
|
114873
|
+
}
|
|
114874
|
+
if (!column.hidden) {
|
|
114742
114875
|
newList.push(item);
|
|
114743
|
-
}
|
|
114744
|
-
}
|
|
114745
|
-
|
|
114746
|
-
|
|
114747
|
-
|
|
114748
|
-
if (
|
|
114749
|
-
|
|
114750
|
-
|
|
114751
|
-
|
|
114752
|
-
|
|
114876
|
+
}
|
|
114877
|
+
});
|
|
114878
|
+
newList.sort((a, b) => {
|
|
114879
|
+
//OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
|
|
114880
|
+
if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
|
|
114881
|
+
if (a.ascending != undefined)
|
|
114882
|
+
return -1;
|
|
114883
|
+
if (b.ascending != undefined)
|
|
114884
|
+
return 1;
|
|
114885
|
+
return 0;
|
|
114886
|
+
//Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
|
|
114887
|
+
}
|
|
114888
|
+
else if (a.ascending != undefined && b.ascending != undefined) {
|
|
114889
|
+
return (a.orderIndex - b.orderIndex);
|
|
114890
|
+
//Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
|
|
114891
|
+
}
|
|
114892
|
+
else if (a.ascending != undefined || b.ascending != undefined) {
|
|
114893
|
+
if (a.ascending != undefined)
|
|
114894
|
+
return -1;
|
|
114895
|
+
if (b.ascending != undefined)
|
|
114896
|
+
return 1;
|
|
114897
|
+
return 0;
|
|
114898
|
+
}
|
|
114899
|
+
return (a.orderIndex - b.orderIndex);
|
|
114900
|
+
});
|
|
114753
114901
|
this._orderListItems = newList;
|
|
114754
114902
|
}
|
|
114755
114903
|
createColumnList() {
|
|
@@ -114771,22 +114919,41 @@ let GridConfig$1 = class extends HTMLElement$1 {
|
|
|
114771
114919
|
visibleGroup.items.push(item);
|
|
114772
114920
|
}
|
|
114773
114921
|
});
|
|
114774
|
-
|
|
114775
|
-
this._columListItems = [visibleGroup, hiddenGroup];
|
|
114776
|
-
}
|
|
114922
|
+
this._columListItems = [visibleGroup, hiddenGroup];
|
|
114777
114923
|
}
|
|
114778
114924
|
buildColumnListSlot(item, group) {
|
|
114779
114925
|
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
|
|
114780
114926
|
}
|
|
114781
114927
|
buildOrderListSlot(item) {
|
|
114782
|
-
let
|
|
114783
|
-
|
|
114928
|
+
let selectedOption = "na";
|
|
114929
|
+
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
114930
|
+
selectedOption = item.ascending == true ? 'asc' : 'desc';
|
|
114931
|
+
}
|
|
114932
|
+
return (h("div", null, h("select-box", { selectedOption: selectedOption, key: 'select-box' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
|
|
114784
114933
|
}
|
|
114785
|
-
updateOrder(sortOrder,
|
|
114934
|
+
updateOrder(sortOrder, updatedItemLabel) {
|
|
114935
|
+
var _a;
|
|
114786
114936
|
let newList = [...this.columns];
|
|
114787
|
-
let newItem = newList.find(item => item.label ===
|
|
114937
|
+
let newItem = newList.find(item => item.label === updatedItemLabel);
|
|
114788
114938
|
if (newItem) {
|
|
114789
|
-
newItem.sort = sortOrder.value;
|
|
114939
|
+
newItem.sort = sortOrder.value === "na" ? undefined : sortOrder.value;
|
|
114940
|
+
}
|
|
114941
|
+
let orderArray;
|
|
114942
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
114943
|
+
this._orderPriorityList.find(item => item.label === newItem.label).sort = sortOrder;
|
|
114944
|
+
this._orderPriorityList.filter(item => item.sort).map((item, index) => {
|
|
114945
|
+
if (item.label === newItem.label) {
|
|
114946
|
+
newItem.sortIndex = index;
|
|
114947
|
+
}
|
|
114948
|
+
});
|
|
114949
|
+
}
|
|
114950
|
+
else {
|
|
114951
|
+
orderArray = newList.filter(item => item.sort && item.hidden !== true).map((item, index) => {
|
|
114952
|
+
return { label: item.label, orderIndex: index };
|
|
114953
|
+
});
|
|
114954
|
+
orderArray.forEach(element => {
|
|
114955
|
+
newList.find(item => item.label === element.label).sortIndex = element.orderIndex;
|
|
114956
|
+
});
|
|
114790
114957
|
}
|
|
114791
114958
|
this.columns = newList;
|
|
114792
114959
|
}
|
|
@@ -114832,9 +114999,100 @@ let GridConfig$1 = class extends HTMLElement$1 {
|
|
|
114832
114999
|
newColumnList.push(newColumnItem);
|
|
114833
115000
|
});
|
|
114834
115001
|
});
|
|
114835
|
-
this._columnListHistory = [];
|
|
114836
115002
|
this.columns = newColumnList;
|
|
114837
|
-
this.
|
|
115003
|
+
this.save();
|
|
115004
|
+
}
|
|
115005
|
+
save() {
|
|
115006
|
+
var _a;
|
|
115007
|
+
let _newConfig;
|
|
115008
|
+
if (this.config) {
|
|
115009
|
+
_newConfig = this.config;
|
|
115010
|
+
}
|
|
115011
|
+
else {
|
|
115012
|
+
_newConfig = this.createConfigFromState(this.columns);
|
|
115013
|
+
}
|
|
115014
|
+
let _newColumnConfigList = [];
|
|
115015
|
+
let orderArray;
|
|
115016
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
115017
|
+
orderArray = this.columns.filter(item => item.sort && item.hidden !== true).map((item) => {
|
|
115018
|
+
return { label: item.label, orderIndex: 0 };
|
|
115019
|
+
});
|
|
115020
|
+
let indexCount = 0;
|
|
115021
|
+
let newOrderArray = [];
|
|
115022
|
+
this._orderPriorityList.forEach((orderPriorityItem) => {
|
|
115023
|
+
let item = orderArray.find(column => column.label === orderPriorityItem.label);
|
|
115024
|
+
if (item) {
|
|
115025
|
+
item.orderIndex = indexCount;
|
|
115026
|
+
newOrderArray.push(item);
|
|
115027
|
+
indexCount++;
|
|
115028
|
+
}
|
|
115029
|
+
});
|
|
115030
|
+
if (newOrderArray.length > 0) {
|
|
115031
|
+
orderArray = newOrderArray;
|
|
115032
|
+
}
|
|
115033
|
+
}
|
|
115034
|
+
for (let i = 0; i < this.columns.length; i++) {
|
|
115035
|
+
const column = this.columns[i];
|
|
115036
|
+
let _newColumnConfig = _newConfig.columns.find(_newColumnConfig => column.name === _newColumnConfig.name);
|
|
115037
|
+
if (column.hidden === true && _newColumnConfig) {
|
|
115038
|
+
continue;
|
|
115039
|
+
}
|
|
115040
|
+
if (_newColumnConfig) {
|
|
115041
|
+
_newColumnConfig.width = column.width;
|
|
115042
|
+
}
|
|
115043
|
+
else if (column.hidden === false) {
|
|
115044
|
+
_newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
|
|
115045
|
+
}
|
|
115046
|
+
if (_newColumnConfig) {
|
|
115047
|
+
if (column.sort) {
|
|
115048
|
+
_newColumnConfig.ascending = column.sort.toUpperCase() === "ASC" ? true : false;
|
|
115049
|
+
if (orderArray) {
|
|
115050
|
+
adjustPriorityOrder(column, _newColumnConfig);
|
|
115051
|
+
}
|
|
115052
|
+
else {
|
|
115053
|
+
_newColumnConfig.orderIndex = column.sortIndex;
|
|
115054
|
+
}
|
|
115055
|
+
}
|
|
115056
|
+
else {
|
|
115057
|
+
delete _newColumnConfig.ascending;
|
|
115058
|
+
_newColumnConfig.orderIndex = 0;
|
|
115059
|
+
}
|
|
115060
|
+
_newColumnConfigList.push(_newColumnConfig);
|
|
115061
|
+
}
|
|
115062
|
+
}
|
|
115063
|
+
_newConfig.columns = _newColumnConfigList;
|
|
115064
|
+
this.configFinish.emit(_newConfig);
|
|
115065
|
+
this._orderList.clearHistory();
|
|
115066
|
+
function adjustPriorityOrder(column, _newColumnConfig) {
|
|
115067
|
+
if (orderArray) {
|
|
115068
|
+
let orderItem = orderArray.find(item => item.label === column.label);
|
|
115069
|
+
if (orderItem) {
|
|
115070
|
+
_newColumnConfig.orderIndex = orderItem.orderIndex;
|
|
115071
|
+
}
|
|
115072
|
+
}
|
|
115073
|
+
}
|
|
115074
|
+
}
|
|
115075
|
+
createConfigFromState(state) {
|
|
115076
|
+
let newConfig = { columns: [] };
|
|
115077
|
+
state.forEach(columnState => {
|
|
115078
|
+
if (!columnState.hidden) {
|
|
115079
|
+
let newConfigColumn = { name: columnState.name };
|
|
115080
|
+
if (columnState.width) {
|
|
115081
|
+
newConfigColumn['width'] = columnState.width;
|
|
115082
|
+
}
|
|
115083
|
+
if (columnState.sort) {
|
|
115084
|
+
newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
|
|
115085
|
+
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
|
115086
|
+
}
|
|
115087
|
+
else {
|
|
115088
|
+
newConfigColumn['orderIndex'] = 0;
|
|
115089
|
+
}
|
|
115090
|
+
if (newConfigColumn) {
|
|
115091
|
+
newConfig.columns.push(newConfigColumn);
|
|
115092
|
+
}
|
|
115093
|
+
}
|
|
115094
|
+
});
|
|
115095
|
+
return newConfig;
|
|
114838
115096
|
}
|
|
114839
115097
|
async locateColumn(evt, searchingText) {
|
|
114840
115098
|
var _a;
|
|
@@ -114924,15 +115182,14 @@ let GridConfig$1 = class extends HTMLElement$1 {
|
|
|
114924
115182
|
return false;
|
|
114925
115183
|
}
|
|
114926
115184
|
closeConfig() {
|
|
114927
|
-
this._columnListHistory = [];
|
|
114928
115185
|
this.configCancel.emit();
|
|
115186
|
+
this._orderList.clearHistory();
|
|
114929
115187
|
}
|
|
114930
115188
|
/* Handlers */
|
|
114931
115189
|
handleTabChange(ev) {
|
|
114932
115190
|
var _a;
|
|
114933
115191
|
if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
|
|
114934
115192
|
if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
114935
|
-
this._columnListHistory = this._columnList.dataSource;
|
|
114936
115193
|
this.createOrderList();
|
|
114937
115194
|
}
|
|
114938
115195
|
this.selectedTab = ev.target.selectedTab;
|
|
@@ -114947,11 +115204,18 @@ let GridConfig$1 = class extends HTMLElement$1 {
|
|
|
114947
115204
|
}
|
|
114948
115205
|
}
|
|
114949
115206
|
}
|
|
115207
|
+
handleOrderListChange(ev) {
|
|
115208
|
+
if (ev.detail) {
|
|
115209
|
+
let orderPriorityList = ev.detail;
|
|
115210
|
+
if (orderPriorityList) {
|
|
115211
|
+
this._orderPriorityList = orderPriorityList;
|
|
115212
|
+
}
|
|
115213
|
+
}
|
|
115214
|
+
}
|
|
114950
115215
|
componentWillRender() {
|
|
114951
115216
|
var _a;
|
|
114952
115217
|
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
114953
115218
|
this.createColumnList();
|
|
114954
|
-
this.createOrderList();
|
|
114955
115219
|
}
|
|
114956
115220
|
}
|
|
114957
115221
|
componentDidRender() {
|
|
@@ -114961,7 +115225,7 @@ let GridConfig$1 = class extends HTMLElement$1 {
|
|
|
114961
115225
|
}
|
|
114962
115226
|
}
|
|
114963
115227
|
render() {
|
|
114964
|
-
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "heigth-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
|
|
115228
|
+
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "heigth-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
|
|
114965
115229
|
}
|
|
114966
115230
|
static get assetsDirs() { return ["../assets"]; }
|
|
114967
115231
|
static get style() { return gridConfigCss; }
|
|
@@ -114978,7 +115242,7 @@ let SelectBox$1 = class extends HTMLElement$1 {
|
|
|
114978
115242
|
this.selectedOption = { value: "na", label: "N/A" };
|
|
114979
115243
|
}
|
|
114980
115244
|
render() {
|
|
114981
|
-
return (h("ez-combo-box", { class: "grid-config-combo inverted", label: "", value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
|
|
115245
|
+
return (h("ez-combo-box", { class: "grid-config-combo inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
|
|
114982
115246
|
}
|
|
114983
115247
|
static get assetsDirs() { return ["../assets"]; }
|
|
114984
115248
|
static get style() { return selectBoxCss; }
|
|
@@ -115050,15 +115314,15 @@ const EzActionChip = /*@__PURE__*/proxyCustomElement(EzLabelChip$2, [1,"ez-actio
|
|
|
115050
115314
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
115051
115315
|
const EzButton = /*@__PURE__*/proxyCustomElement(EzButton$1, [1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}]);
|
|
115052
115316
|
const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"]}]);
|
|
115053
|
-
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[
|
|
115054
|
-
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"]}]);
|
|
115055
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [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],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32]}]);
|
|
115317
|
+
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513]}]);
|
|
115318
|
+
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"]}]);
|
|
115319
|
+
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [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]}]);
|
|
115056
115320
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513]}]);
|
|
115057
115321
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
|
|
115058
115322
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"]}]);
|
|
115059
115323
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513]}]);
|
|
115060
115324
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [0,"ez-form",{"dataUnit":[1040],"config":[16]}]);
|
|
115061
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32]}]);
|
|
115325
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32]}]);
|
|
115062
115326
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
115063
115327
|
const EzLabelChip = /*@__PURE__*/proxyCustomElement(EzLabelChip$1, [1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540]}]);
|
|
115064
115328
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
@@ -115073,7 +115337,7 @@ const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-i
|
|
|
115073
115337
|
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
|
|
115074
115338
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
115075
115339
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [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]}]);
|
|
115076
|
-
const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]);
|
|
115340
|
+
const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]);
|
|
115077
115341
|
const SelectBox = /*@__PURE__*/proxyCustomElement(SelectBox$1, [1,"select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
115078
115342
|
const TestDu = /*@__PURE__*/proxyCustomElement(TestDu$1, [0,"test-du",{"isDirty":[32]}]);
|
|
115079
115343
|
const defineCustomElements = (opts) => {
|