@sankhyalabs/ezui 1.1.160 → 1.1.161
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 +1 -1
- package/dist/cjs/{grid-config.cjs.entry.js → ez-grid-config.cjs.entry.js} +6 -6
- package/dist/cjs/ez-grid.cjs.entry.js +7 -3
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/{select-box.cjs.entry.js → ez-select-box.cjs.entry.js} +3 -3
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +10 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +6 -2
- package/dist/collection/components/ez-grid/ez-grid.css +4 -0
- package/dist/collection/components/ez-grid/ez-grid.js +7 -7
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.css → ez-grid-config/ez-grid-config.css} +46 -20
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.js → ez-grid-config/ez-grid-config.js} +12 -12
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.css → ez-select-box/ez-select-box.css} +3 -4
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.js → ez-select-box/ez-select-box.js} +3 -3
- package/dist/collection/components/ez-list/ez-list.css +84 -46
- package/dist/collection/components/ez-modal/ez-modal.css +2 -2
- package/dist/custom-elements/index.d.ts +12 -12
- package/dist/custom-elements/index.js +460 -456
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/{grid-config.entry.js → ez-grid-config.entry.js} +6 -6
- package/dist/esm/ez-grid.entry.js +7 -3
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/{select-box.entry.js → ez-select-box.entry.js} +3 -3
- 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-1fecaeb8.entry.js +1 -0
- package/dist/ezui/p-8c1b9fe0.entry.js +1 -0
- package/dist/ezui/{p-ae2fea4c.entry.js → p-8d73594f.entry.js} +1 -1
- package/dist/ezui/p-988ff301.entry.js +1 -0
- package/dist/ezui/p-cf56d3e8.entry.js +1 -0
- package/dist/ezui/{p-727a39e5.entry.js → p-fd6f3bf9.entry.js} +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +5 -5
- package/dist/types/components/ez-grid/subcomponents/{gridconfig/grid-config.d.ts → ez-grid-config/ez-grid-config.d.ts} +4 -4
- package/dist/types/components/ez-grid/subcomponents/{select-box/select-box.d.ts → ez-select-box/ez-select-box.d.ts} +0 -0
- package/dist/types/components.d.ts +41 -41
- package/package.json +1 -1
- package/react/components.d.ts +2 -2
- package/react/components.js +2 -2
- package/react/components.js.map +1 -1
- package/dist/ezui/p-ad6cc559.entry.js +0 -1
- package/dist/ezui/p-bea6f8a6.entry.js +0 -1
- package/dist/ezui/p-c2de757f.entry.js +0 -1
- package/dist/ezui/p-ecee9d8d.entry.js +0 -1
|
@@ -631,7 +631,7 @@ class CSSVarsUtils {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
|
|
634
|
-
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--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--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--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__list-scrollbar--background-color:var(--
|
|
634
|
+
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--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--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--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__list-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-combo-box__list-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-combo-box__list-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__list-scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.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, #2B3A54)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--ez-combo-box__list-scrollbar--background-color-primary) var(--ez-combo-box__list-scrollbar--background-color-secondary)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__list-scrollbar--background-color-primary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);width:var(--ez-combo-box__list-scrollbar--width);max-width:var(--ez-combo-box__list-scrollbar--width);min-width:var(--ez-combo-box__list-scrollbar--width)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary)}.item__value--hidden{visibility:hidden;position:absolute;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:calc(var(--ez-combo-box__list-height) * 1.5)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:16px;height:16px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
635
635
|
|
|
636
636
|
let EzComboBox$1 = class extends HTMLElement$1 {
|
|
637
637
|
constructor() {
|
|
@@ -112627,7 +112627,7 @@ class DataSource {
|
|
|
112627
112627
|
|
|
112628
112628
|
class AgGridController {
|
|
112629
112629
|
constructor(enterprise) {
|
|
112630
|
-
this.DEFAULT_ROW_HEIGHT =
|
|
112630
|
+
this.DEFAULT_ROW_HEIGHT = 30;
|
|
112631
112631
|
this.CHECK_BOX_COL_ID = "checkBoxColumn";
|
|
112632
112632
|
this.RECORD_ARCHIVE_COL_ID = "__RECORD_ARCHIVE__";
|
|
112633
112633
|
this.BLOCK_LOAD_DEBOUNCE = 400;
|
|
@@ -112690,7 +112690,7 @@ class AgGridController {
|
|
|
112690
112690
|
//dos blocos, então, quando removemos uma linha, a altura do bloco não é recalculada.
|
|
112691
112691
|
//Descobri que setando manualmente a altura das linhas, apesar do bloco ficar com
|
|
112692
112692
|
//tamanho errado, isso afeta menos o componente.
|
|
112693
|
-
|
|
112693
|
+
getRowHeight: this.getRowHeight.bind(this)
|
|
112694
112694
|
};
|
|
112695
112695
|
this.setOptionsEvents(this._gridOptions);
|
|
112696
112696
|
this.setOptionsPagination(this._gridOptions);
|
|
@@ -112704,8 +112704,12 @@ class AgGridController {
|
|
|
112704
112704
|
this._lastPageStatus = this.getPaginationStatus();
|
|
112705
112705
|
//Atualiza estado da seleção inicial
|
|
112706
112706
|
this.onSelectionChange();
|
|
112707
|
+
this._gridOptions.api.setHeaderHeight(this.getRowHeight());
|
|
112707
112708
|
}
|
|
112708
112709
|
}
|
|
112710
|
+
getRowHeight() {
|
|
112711
|
+
return this.DEFAULT_ROW_HEIGHT;
|
|
112712
|
+
}
|
|
112709
112713
|
setOptionsEvents(opt) {
|
|
112710
112714
|
opt.onSortChanged = e => this.onCallStateChange("sort", e);
|
|
112711
112715
|
opt.onColumnResized = e => this.onCallStateChange("columnResize", e);
|
|
@@ -113456,7 +113460,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
113456
113460
|
this._popUpGridConfig = false;
|
|
113457
113461
|
}
|
|
113458
113462
|
render() {
|
|
113459
|
-
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("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() }))));
|
|
113463
|
+
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container" }, this.getPaginationControl())), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, 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() }))));
|
|
113460
113464
|
}
|
|
113461
113465
|
static get assetsDirs() { return ["../assets"]; }
|
|
113462
113466
|
static get watchers() { return {
|
|
@@ -113465,6 +113469,434 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
113465
113469
|
static get style() { return ezGridCss; }
|
|
113466
113470
|
};
|
|
113467
113471
|
|
|
113472
|
+
const ezGridConfigCss = ".sc-ez-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid-config__group--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__group--font-size:var(--text--medium, 14px);--ez-grid-config__group--font-weight:var(--text-weight--large, 600);--ez-grid-config__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-ez-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-ez-grid-config{padding-right:var(--space--medium)}ez-list.sc-ez-grid-config{height:100%}.height-calc.sc-ez-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-ez-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--ez-grid-config__footer--padding-top)}.hidden.sc-ez-grid-config{display:none}.grid-config__main.sc-ez-grid-config{overflow-y:auto;padding-right:var(--ez-grid-config__main--padding-right)}.tabselector-container.sc-ez-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-ez-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-ez-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.subtitle.sc-ez-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-ez-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary);font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__scrollbar--background-color);border-radius:var(--ez-grid-config__scrollbar--border-radius)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-ez-grid-config{font-family:var(--ez-grid-config__group--font-family);font-size:var(--ez-grid-config__group--font-size);font-weight:var(--ez-grid-config__group--font-weight);padding-bottom:var(--ez-grid-config__group--padding-bottom)}";
|
|
113473
|
+
|
|
113474
|
+
let EzGridConfig$1 = class extends HTMLElement$1 {
|
|
113475
|
+
constructor() {
|
|
113476
|
+
super();
|
|
113477
|
+
this.__registerHost();
|
|
113478
|
+
this.configFinish = createEvent(this, "configFinish", 7);
|
|
113479
|
+
this.configCancel = createEvent(this, "configCancel", 7);
|
|
113480
|
+
this._orderListItems = [];
|
|
113481
|
+
this._orderPriorityList = [];
|
|
113482
|
+
this._columListItems = [];
|
|
113483
|
+
this._selectedIndex = -1;
|
|
113484
|
+
this._dataChanged = false;
|
|
113485
|
+
this._componenteInternalKey = Date.now();
|
|
113486
|
+
this.selectedTab = "Colunas";
|
|
113487
|
+
}
|
|
113488
|
+
/* Creation Methods */
|
|
113489
|
+
createOrderList() {
|
|
113490
|
+
let newList = [];
|
|
113491
|
+
this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
|
|
113492
|
+
var _a;
|
|
113493
|
+
let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
|
|
113494
|
+
let item = { name: column.name, label: column.label };
|
|
113495
|
+
if (configItem) {
|
|
113496
|
+
item['orderIndex'] = configItem.orderIndex;
|
|
113497
|
+
item['ascending'] = configItem.ascending;
|
|
113498
|
+
}
|
|
113499
|
+
if (!column.hidden) {
|
|
113500
|
+
newList.push(item);
|
|
113501
|
+
}
|
|
113502
|
+
});
|
|
113503
|
+
newList.sort((a, b) => {
|
|
113504
|
+
//OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
|
|
113505
|
+
if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
|
|
113506
|
+
if (a.ascending != undefined)
|
|
113507
|
+
return -1;
|
|
113508
|
+
if (b.ascending != undefined)
|
|
113509
|
+
return 1;
|
|
113510
|
+
return 0;
|
|
113511
|
+
//Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
|
|
113512
|
+
}
|
|
113513
|
+
else if (a.ascending != undefined && b.ascending != undefined) {
|
|
113514
|
+
return (a.orderIndex - b.orderIndex);
|
|
113515
|
+
//Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
|
|
113516
|
+
}
|
|
113517
|
+
else if (a.ascending != undefined || b.ascending != undefined) {
|
|
113518
|
+
if (a.ascending != undefined)
|
|
113519
|
+
return -1;
|
|
113520
|
+
if (b.ascending != undefined)
|
|
113521
|
+
return 1;
|
|
113522
|
+
return 0;
|
|
113523
|
+
}
|
|
113524
|
+
return (a.orderIndex - b.orderIndex);
|
|
113525
|
+
});
|
|
113526
|
+
this._orderListItems = newList;
|
|
113527
|
+
}
|
|
113528
|
+
createColumnList() {
|
|
113529
|
+
let visibleGroup = {
|
|
113530
|
+
group: 'Visíveis',
|
|
113531
|
+
items: [],
|
|
113532
|
+
};
|
|
113533
|
+
let hiddenGroup = {
|
|
113534
|
+
group: 'Ocultas',
|
|
113535
|
+
items: [],
|
|
113536
|
+
sort: 'ASC'
|
|
113537
|
+
};
|
|
113538
|
+
this.columns.forEach(column => {
|
|
113539
|
+
let item = { label: column.label };
|
|
113540
|
+
if (column.hidden) {
|
|
113541
|
+
hiddenGroup.items.push(item);
|
|
113542
|
+
}
|
|
113543
|
+
else {
|
|
113544
|
+
visibleGroup.items.push(item);
|
|
113545
|
+
}
|
|
113546
|
+
});
|
|
113547
|
+
this._columListItems = [visibleGroup, hiddenGroup];
|
|
113548
|
+
}
|
|
113549
|
+
buildColumnListSlot(item, group) {
|
|
113550
|
+
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
|
|
113551
|
+
}
|
|
113552
|
+
buildOrderListSlot(item) {
|
|
113553
|
+
let selectedOption = "na";
|
|
113554
|
+
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
113555
|
+
selectedOption = item.ascending == true ? 'asc' : 'desc';
|
|
113556
|
+
}
|
|
113557
|
+
return (h("div", null, h("ez-select-box", { selectedOption: selectedOption, key: 'ez-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
|
|
113558
|
+
}
|
|
113559
|
+
updateOrder(sortOrder, updatedItemLabel) {
|
|
113560
|
+
var _a;
|
|
113561
|
+
this._dataChanged = true;
|
|
113562
|
+
let newList = [...this.columns];
|
|
113563
|
+
let newItem = newList.find(item => item.label === updatedItemLabel);
|
|
113564
|
+
if (newItem) {
|
|
113565
|
+
newItem.sort = sortOrder.value === "na" ? undefined : sortOrder.value;
|
|
113566
|
+
}
|
|
113567
|
+
let orderArray;
|
|
113568
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113569
|
+
this._orderPriorityList.find(item => item.label === newItem.label).sort = sortOrder;
|
|
113570
|
+
this._orderPriorityList.filter(item => item.sort).map((item, index) => {
|
|
113571
|
+
if (item.label === newItem.label) {
|
|
113572
|
+
newItem.sortIndex = index;
|
|
113573
|
+
}
|
|
113574
|
+
});
|
|
113575
|
+
}
|
|
113576
|
+
else {
|
|
113577
|
+
orderArray = newList.filter(item => item.sort && item.hidden !== true).map((item, index) => {
|
|
113578
|
+
return { label: item.label, orderIndex: index };
|
|
113579
|
+
});
|
|
113580
|
+
orderArray.forEach(element => {
|
|
113581
|
+
newList.find(item => item.label === element.label).sortIndex = element.orderIndex;
|
|
113582
|
+
});
|
|
113583
|
+
}
|
|
113584
|
+
this.columns = newList;
|
|
113585
|
+
}
|
|
113586
|
+
/* Actions Methods */
|
|
113587
|
+
switchColumnGroup(ev, switchedItem) {
|
|
113588
|
+
ev.stopPropagation();
|
|
113589
|
+
let newList = [...this._columListItems];
|
|
113590
|
+
this._dataChanged = true;
|
|
113591
|
+
if (ev.detail === true) {
|
|
113592
|
+
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
113593
|
+
let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
113594
|
+
if (index >= 0) {
|
|
113595
|
+
hiddenGroup.items.splice(index, 1);
|
|
113596
|
+
}
|
|
113597
|
+
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
113598
|
+
visibleGroup.items.push(switchedItem);
|
|
113599
|
+
this._columListItems = newList;
|
|
113600
|
+
this.createOrderList();
|
|
113601
|
+
}
|
|
113602
|
+
else if (ev.detail === false) {
|
|
113603
|
+
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
113604
|
+
let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
113605
|
+
if (index >= 0) {
|
|
113606
|
+
visibleGroup.items.splice(index, 1);
|
|
113607
|
+
}
|
|
113608
|
+
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
113609
|
+
hiddenGroup.items.push(switchedItem);
|
|
113610
|
+
this._columListItems = newList;
|
|
113611
|
+
this.createOrderList();
|
|
113612
|
+
}
|
|
113613
|
+
}
|
|
113614
|
+
finish() {
|
|
113615
|
+
let newColumnList = [];
|
|
113616
|
+
this._columListItems.forEach(group => {
|
|
113617
|
+
group.items.forEach(item => {
|
|
113618
|
+
const baseColumn = this.columns.find(column => column.label === item.label);
|
|
113619
|
+
let newColumnItem = Object.assign({}, baseColumn);
|
|
113620
|
+
if (group.group === "Ocultas") {
|
|
113621
|
+
newColumnItem.hidden = true;
|
|
113622
|
+
}
|
|
113623
|
+
else {
|
|
113624
|
+
newColumnItem.hidden = false;
|
|
113625
|
+
}
|
|
113626
|
+
newColumnList.push(newColumnItem);
|
|
113627
|
+
});
|
|
113628
|
+
});
|
|
113629
|
+
this.columns = newColumnList;
|
|
113630
|
+
this._dataChanged = false;
|
|
113631
|
+
this.closeConfig();
|
|
113632
|
+
ApplicationUtils.info("As configurações foram salvas com sucesso!");
|
|
113633
|
+
this.save();
|
|
113634
|
+
}
|
|
113635
|
+
save() {
|
|
113636
|
+
var _a;
|
|
113637
|
+
let _newConfig;
|
|
113638
|
+
if (this.config) {
|
|
113639
|
+
_newConfig = this.config;
|
|
113640
|
+
}
|
|
113641
|
+
else {
|
|
113642
|
+
_newConfig = this.createConfigFromState(this.columns);
|
|
113643
|
+
}
|
|
113644
|
+
let _newColumnConfigList = [];
|
|
113645
|
+
let orderArray;
|
|
113646
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113647
|
+
orderArray = this.columns.filter(item => item.sort && item.hidden !== true).map((item) => {
|
|
113648
|
+
return { label: item.label, orderIndex: 0 };
|
|
113649
|
+
});
|
|
113650
|
+
let indexCount = 0;
|
|
113651
|
+
let newOrderArray = [];
|
|
113652
|
+
this._orderPriorityList.forEach((orderPriorityItem) => {
|
|
113653
|
+
let item = orderArray.find(column => column.label === orderPriorityItem.label);
|
|
113654
|
+
if (item) {
|
|
113655
|
+
item.orderIndex = indexCount;
|
|
113656
|
+
newOrderArray.push(item);
|
|
113657
|
+
indexCount++;
|
|
113658
|
+
}
|
|
113659
|
+
});
|
|
113660
|
+
if (newOrderArray.length > 0) {
|
|
113661
|
+
orderArray = newOrderArray;
|
|
113662
|
+
}
|
|
113663
|
+
}
|
|
113664
|
+
for (let i = 0; i < this.columns.length; i++) {
|
|
113665
|
+
const column = this.columns[i];
|
|
113666
|
+
let _newColumnConfig = _newConfig.columns.find(_newColumnConfig => column.name === _newColumnConfig.name);
|
|
113667
|
+
if (column.hidden === true && _newColumnConfig) {
|
|
113668
|
+
continue;
|
|
113669
|
+
}
|
|
113670
|
+
if (_newColumnConfig) {
|
|
113671
|
+
_newColumnConfig.width = column.width;
|
|
113672
|
+
}
|
|
113673
|
+
else if (column.hidden === false) {
|
|
113674
|
+
_newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
|
|
113675
|
+
}
|
|
113676
|
+
if (_newColumnConfig) {
|
|
113677
|
+
if (column.sort) {
|
|
113678
|
+
_newColumnConfig.ascending = column.sort.toUpperCase() === "ASC" ? true : false;
|
|
113679
|
+
if (orderArray) {
|
|
113680
|
+
adjustPriorityOrder(column, _newColumnConfig);
|
|
113681
|
+
}
|
|
113682
|
+
else {
|
|
113683
|
+
_newColumnConfig.orderIndex = column.sortIndex;
|
|
113684
|
+
}
|
|
113685
|
+
}
|
|
113686
|
+
else {
|
|
113687
|
+
delete _newColumnConfig.ascending;
|
|
113688
|
+
_newColumnConfig.orderIndex = 0;
|
|
113689
|
+
}
|
|
113690
|
+
_newColumnConfigList.push(_newColumnConfig);
|
|
113691
|
+
}
|
|
113692
|
+
}
|
|
113693
|
+
_newConfig.columns = _newColumnConfigList;
|
|
113694
|
+
this.configFinish.emit(_newConfig);
|
|
113695
|
+
this._orderList.clearHistory();
|
|
113696
|
+
function adjustPriorityOrder(column, _newColumnConfig) {
|
|
113697
|
+
if (orderArray) {
|
|
113698
|
+
let orderItem = orderArray.find(item => item.label === column.label);
|
|
113699
|
+
if (orderItem) {
|
|
113700
|
+
_newColumnConfig.orderIndex = orderItem.orderIndex;
|
|
113701
|
+
}
|
|
113702
|
+
}
|
|
113703
|
+
}
|
|
113704
|
+
}
|
|
113705
|
+
createConfigFromState(state) {
|
|
113706
|
+
let newConfig = { columns: [] };
|
|
113707
|
+
state.forEach(columnState => {
|
|
113708
|
+
if (!columnState.hidden) {
|
|
113709
|
+
let newConfigColumn = { name: columnState.name };
|
|
113710
|
+
if (columnState.width) {
|
|
113711
|
+
newConfigColumn['width'] = columnState.width;
|
|
113712
|
+
}
|
|
113713
|
+
if (columnState.sort) {
|
|
113714
|
+
newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
|
|
113715
|
+
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
|
113716
|
+
}
|
|
113717
|
+
else {
|
|
113718
|
+
newConfigColumn['orderIndex'] = 0;
|
|
113719
|
+
}
|
|
113720
|
+
if (newConfigColumn) {
|
|
113721
|
+
newConfig.columns.push(newConfigColumn);
|
|
113722
|
+
}
|
|
113723
|
+
}
|
|
113724
|
+
});
|
|
113725
|
+
return newConfig;
|
|
113726
|
+
}
|
|
113727
|
+
async locateColumn(evt, searchingText) {
|
|
113728
|
+
var _a;
|
|
113729
|
+
const hitEnter = evt.key === "Enter";
|
|
113730
|
+
if (!searchingText) {
|
|
113731
|
+
searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
113732
|
+
}
|
|
113733
|
+
let newSelected = -1;
|
|
113734
|
+
if (this.selectedTab === "Ordenação das linhas") {
|
|
113735
|
+
if (searchingText) {
|
|
113736
|
+
const matchedIndexes = [];
|
|
113737
|
+
let orderListDatasource;
|
|
113738
|
+
await this._orderList.getList().then(listGroup => {
|
|
113739
|
+
orderListDatasource = listGroup;
|
|
113740
|
+
orderListDatasource.forEach((column, index) => {
|
|
113741
|
+
if (this.compareWords(column, searchingText)) {
|
|
113742
|
+
matchedIndexes.push(index);
|
|
113743
|
+
}
|
|
113744
|
+
});
|
|
113745
|
+
});
|
|
113746
|
+
if (matchedIndexes.length > 0) {
|
|
113747
|
+
if (hitEnter) {
|
|
113748
|
+
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
113749
|
+
if (matchedIndexes[j] > this._selectedIndex) {
|
|
113750
|
+
newSelected = matchedIndexes[j];
|
|
113751
|
+
break;
|
|
113752
|
+
}
|
|
113753
|
+
}
|
|
113754
|
+
}
|
|
113755
|
+
if (newSelected === -1) {
|
|
113756
|
+
newSelected = matchedIndexes[0];
|
|
113757
|
+
}
|
|
113758
|
+
}
|
|
113759
|
+
this._selectedIndex = newSelected;
|
|
113760
|
+
let selectedColumn;
|
|
113761
|
+
selectedColumn = orderListDatasource[newSelected];
|
|
113762
|
+
if (selectedColumn) {
|
|
113763
|
+
this._orderList.setSelection({ label: selectedColumn.label }, true);
|
|
113764
|
+
}
|
|
113765
|
+
else {
|
|
113766
|
+
this._orderList.setSelection(undefined);
|
|
113767
|
+
}
|
|
113768
|
+
}
|
|
113769
|
+
else {
|
|
113770
|
+
this._orderList.setSelection(undefined);
|
|
113771
|
+
}
|
|
113772
|
+
}
|
|
113773
|
+
else {
|
|
113774
|
+
if (searchingText) {
|
|
113775
|
+
const matchedIndexes = [];
|
|
113776
|
+
this.columns.forEach((column, index) => {
|
|
113777
|
+
if (this.compareWords(column, searchingText)) {
|
|
113778
|
+
matchedIndexes.push(index);
|
|
113779
|
+
}
|
|
113780
|
+
});
|
|
113781
|
+
if (matchedIndexes.length > 0) {
|
|
113782
|
+
if (hitEnter) {
|
|
113783
|
+
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
113784
|
+
if (matchedIndexes[j] > this._selectedIndex) {
|
|
113785
|
+
newSelected = matchedIndexes[j];
|
|
113786
|
+
break;
|
|
113787
|
+
}
|
|
113788
|
+
}
|
|
113789
|
+
}
|
|
113790
|
+
if (newSelected === -1) {
|
|
113791
|
+
newSelected = matchedIndexes[0];
|
|
113792
|
+
}
|
|
113793
|
+
}
|
|
113794
|
+
this._selectedIndex = newSelected;
|
|
113795
|
+
let selectedColumn = this.columns[newSelected];
|
|
113796
|
+
if (selectedColumn) {
|
|
113797
|
+
this._columnList.setSelection({ label: selectedColumn.label }, true);
|
|
113798
|
+
}
|
|
113799
|
+
else {
|
|
113800
|
+
this._columnList.setSelection(undefined);
|
|
113801
|
+
}
|
|
113802
|
+
}
|
|
113803
|
+
else {
|
|
113804
|
+
this._columnList.setSelection(undefined);
|
|
113805
|
+
}
|
|
113806
|
+
}
|
|
113807
|
+
}
|
|
113808
|
+
compareWords(column, searchingText) {
|
|
113809
|
+
if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
113810
|
+
return true;
|
|
113811
|
+
}
|
|
113812
|
+
return false;
|
|
113813
|
+
}
|
|
113814
|
+
closeConfig() {
|
|
113815
|
+
this._orderList.scrollToTop();
|
|
113816
|
+
this._columnList.scrollToTop();
|
|
113817
|
+
this._searchElement.value = "";
|
|
113818
|
+
if (this._dataChanged) {
|
|
113819
|
+
let options = {
|
|
113820
|
+
canClose: false,
|
|
113821
|
+
labelCancel: "Descartar",
|
|
113822
|
+
labelConfirm: "Salvar",
|
|
113823
|
+
btnConfirmDanger: false
|
|
113824
|
+
};
|
|
113825
|
+
ApplicationUtils.confirm("Aviso", "As alterações realizadas serão descartadas. Gostaria de salvar antes de sair?", null, false, options)
|
|
113826
|
+
.then(response => {
|
|
113827
|
+
if (!response) {
|
|
113828
|
+
this._dataChanged = false;
|
|
113829
|
+
this.configCancel.emit();
|
|
113830
|
+
this._orderList.clearHistory();
|
|
113831
|
+
this._componenteInternalKey = Date.now();
|
|
113832
|
+
}
|
|
113833
|
+
else {
|
|
113834
|
+
this.finish();
|
|
113835
|
+
}
|
|
113836
|
+
});
|
|
113837
|
+
}
|
|
113838
|
+
else {
|
|
113839
|
+
this.configCancel.emit();
|
|
113840
|
+
this._orderList.clearHistory();
|
|
113841
|
+
}
|
|
113842
|
+
}
|
|
113843
|
+
/* Handlers */
|
|
113844
|
+
handleTabChange(ev) {
|
|
113845
|
+
var _a;
|
|
113846
|
+
if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
|
|
113847
|
+
if (this.selectedTab !== ev.target.selectedTab) {
|
|
113848
|
+
if (ev.target.selectedTab === "Colunas") {
|
|
113849
|
+
this._orderList.scrollToTop();
|
|
113850
|
+
}
|
|
113851
|
+
else if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
113852
|
+
this._columnList.scrollToTop();
|
|
113853
|
+
}
|
|
113854
|
+
this._searchElement.value = "";
|
|
113855
|
+
}
|
|
113856
|
+
if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
113857
|
+
this.createOrderList();
|
|
113858
|
+
}
|
|
113859
|
+
this.selectedTab = ev.target.selectedTab;
|
|
113860
|
+
}
|
|
113861
|
+
}
|
|
113862
|
+
handleColumnListChange(ev) {
|
|
113863
|
+
var _a;
|
|
113864
|
+
if (ev.detail) {
|
|
113865
|
+
let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
|
|
113866
|
+
if (visibleItems) {
|
|
113867
|
+
this._dataChanged = true;
|
|
113868
|
+
this._orderListItems = visibleItems;
|
|
113869
|
+
}
|
|
113870
|
+
}
|
|
113871
|
+
}
|
|
113872
|
+
handleOrderListChange(ev) {
|
|
113873
|
+
if (ev.detail) {
|
|
113874
|
+
let orderPriorityList = ev.detail;
|
|
113875
|
+
if (orderPriorityList) {
|
|
113876
|
+
this._dataChanged = true;
|
|
113877
|
+
this._orderPriorityList = orderPriorityList;
|
|
113878
|
+
}
|
|
113879
|
+
}
|
|
113880
|
+
}
|
|
113881
|
+
componentWillRender() {
|
|
113882
|
+
var _a;
|
|
113883
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113884
|
+
this.createColumnList();
|
|
113885
|
+
}
|
|
113886
|
+
}
|
|
113887
|
+
componentDidRender() {
|
|
113888
|
+
var _a;
|
|
113889
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
113890
|
+
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
|
113891
|
+
}
|
|
113892
|
+
}
|
|
113893
|
+
render() {
|
|
113894
|
+
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', iconName: "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", iconName: "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" ? "height-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: "ez-button--primary", onClick: () => this.finish() }))));
|
|
113895
|
+
}
|
|
113896
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
113897
|
+
static get style() { return ezGridConfigCss; }
|
|
113898
|
+
};
|
|
113899
|
+
|
|
113468
113900
|
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-account-outline:before{content:\"\\ea01\"}.ez-icon-account:before{content:\"\\ea02\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea03\"}.ez-icon-alert-circle:before{content:\"\\ea04\"}.ez-icon-alert-mail:before{content:\"\\ea05\"}.ez-icon-alert-outline:before{content:\"\\ea06\"}.ez-icon-alert-popup:before{content:\"\\ea07\"}.ez-icon-apps:before{content:\"\\ea08\"}.ez-icon-arrow_back:before{content:\"\\ea09\"}.ez-icon-bell-inverted:before{content:\"\\ea0a\"}.ez-icon-bell:before{content:\"\\ea0b\"}.ez-icon-business-center:before{content:\"\\ea0c\"}.ez-icon-calendar-text:before{content:\"\\ea0d\"}.ez-icon-calendar:before{content:\"\\ea0e\"}.ez-icon-check-circle-inverted:before{content:\"\\ea0f\"}.ez-icon-check-circle:before{content:\"\\ea10\"}.ez-icon-check:before{content:\"\\ea11\"}.ez-icon-chevron-down:before{content:\"\\ea12\"}.ez-icon-chevron-left:before{content:\"\\ea13\"}.ez-icon-chevron-right:before{content:\"\\ea14\"}.ez-icon-chevron-up:before{content:\"\\ea15\"}.ez-icon-circle--medium:before{content:\"\\ea16\"}.ez-icon-circle:before{content:\"\\ea17\"}.ez-icon-clipboard:before{content:\"\\ea18\"}.ez-icon-close-circle-inverted:before{content:\"\\ea19\"}.ez-icon-close-circle:before{content:\"\\ea1a\"}.ez-icon-close:before{content:\"\\ea1b\"}.ez-icon-comment-inverted:before{content:\"\\ea1c\"}.ez-icon-comment:before{content:\"\\ea1d\"}.ez-icon-configuration:before{content:\"\\ea1e\"}.ez-icon-copy:before{content:\"\\ea1f\"}.ez-icon-crop:before{content:\"\\ea20\"}.ez-icon-delete:before{content:\"\\ea21\"}.ez-icon-description:before{content:\"\\ea22\"}.ez-icon-dot-notification:before{content:\"\\ea23\"}.ez-icon-dots-horizontal:before{content:\"\\ea24\"}.ez-icon-dots-vertical:before{content:\"\\ea25\"}.ez-icon-drag-indicator:before{content:\"\\ea26\"}.ez-icon-edit-file:before{content:\"\\ea27\"}.ez-icon-edit-table:before{content:\"\\ea28\"}.ez-icon-edit-time:before{content:\"\\ea29\"}.ez-icon-edit:before{content:\"\\ea2a\"}.ez-icon-email-inverted:before{content:\"\\ea2b\"}.ez-icon-email:before{content:\"\\ea2c\"}.ez-icon-error-octagon:before{content:\"\\ea2d\"}.ez-icon-expand:before{content:\"\\ea2e\"}.ez-icon-eye-off:before{content:\"\\ea2f\"}.ez-icon-eye:before{content:\"\\ea30\"}.ez-icon-favorite:before{content:\"\\ea31\"}.ez-icon-file-download:before{content:\"\\ea32\"}.ez-icon-file-upload:before{content:\"\\ea33\"}.ez-icon-filter:before{content:\"\\ea34\"}.ez-icon-find-file:before{content:\"\\ea35\"}.ez-icon-find-page:before{content:\"\\ea36\"}.ez-icon-format-color-fill:before{content:\"\\ea37\"}.ez-icon-help-circle-outline:before{content:\"\\ea38\"}.ez-icon-help-inverted:before{content:\"\\ea39\"}.ez-icon-help:before{content:\"\\ea3a\"}.ez-icon-home:before{content:\"\\ea3b\"}.ez-icon-language:before{content:\"\\ea3c\"}.ez-icon-launch:before{content:\"\\ea3d\"}.ez-icon-lightbulb:before{content:\"\\ea3e\"}.ez-icon-list:before{content:\"\\ea3f\"}.ez-icon-loading:before{content:\"\\ea40\"}.ez-icon-lock-outline:before{content:\"\\ea41\"}.ez-icon-lock:before{content:\"\\ea42\"}.ez-icon-menu:before{content:\"\\ea43\"}.ez-icon-minus-circle-inverted:before{content:\"\\ea44\"}.ez-icon-minus:before{content:\"\\ea45\"}.ez-icon-money-off:before{content:\"\\ea46\"}.ez-icon-money:before{content:\"\\ea47\"}.ez-icon-north-west:before{content:\"\\ea48\"}.ez-icon-pause:before{content:\"\\ea49\"}.ez-icon-payments:before{content:\"\\ea4a\"}.ez-icon-play:before{content:\"\\ea4b\"}.ez-icon-plus-circle-inverted:before{content:\"\\ea4c\"}.ez-icon-plus-circle:before{content:\"\\ea4d\"}.ez-icon-plus:before{content:\"\\ea4e\"}.ez-icon-power:before{content:\"\\ea4f\"}.ez-icon-push-pin:before{content:\"\\ea50\"}.ez-icon-restore:before{content:\"\\ea51\"}.ez-icon-return:before{content:\"\\ea52\"}.ez-icon-rotate:before{content:\"\\ea53\"}.ez-icon-save:before{content:\"\\ea54\"}.ez-icon-search:before{content:\"\\ea55\"}.ez-icon-settings-inverted:before{content:\"\\ea56\"}.ez-icon-settings:before{content:\"\\ea57\"}.ez-icon-share:before{content:\"\\ea58\"}.ez-icon-shield:before{content:\"\\ea59\"}.ez-icon-south-east:before{content:\"\\ea5a\"}.ez-icon-success-circle:before{content:\"\\ea5b\"}.ez-icon-sync:before{content:\"\\ea5c\"}.ez-icon-table:before{content:\"\\ea5d\"}.ez-icon-timer-outline:before{content:\"\\ea5e\"}.ez-icon-user-circle:before{content:\"\\ea5f\"}.ez-icon-warning-minus:before{content:\"\\ea60\"}.ez-icon-warning-triangle:before{content:\"\\ea61\"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}";
|
|
113469
113901
|
|
|
113470
113902
|
let EzIcon$1 = class extends HTMLElement$1 {
|
|
@@ -113500,7 +113932,7 @@ let EzIcon$1 = class extends HTMLElement$1 {
|
|
|
113500
113932
|
static get style() { return ezIconCss; }
|
|
113501
113933
|
};
|
|
113502
113934
|
|
|
113503
|
-
const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-
|
|
113935
|
+
const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__group-container-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__group-container-scrollbar--width:var(--space--medium, 12px);--ez-list__group-container-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-list__group-container-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__draggable-scrollbar--width:var(--space--medium, 12px);--ez-list__draggable-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-list__draggable-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--ez-list__draggable-icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{display:flex;align-items:center;border-top:1px dashed #fff;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1;width:100%}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:flex-start;align-items:center;width:calc(100% - 41px)}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary)}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item--margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary)}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable-scrollbar--background-color-primary);border-radius:var(--ez-list__draggable-scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary);width:var(--ez-list__draggable-scrollbar--width);max-width:var(--ez-list__draggable-scrollbar--width);min-width:var(--ez-list__draggable-scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__group-container-scrollbar--background-color-primary) var(--ez-list__group-container-scrollbar--background-color-secondary)}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom);-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:var(--ez-list__group-container-scrollbar--background-color-secondary)}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container-scrollbar--background-color-primary);border-radius:var(--ez-list__group-container-scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:var(--ez-list__group-container-scrollbar--background-color-secondary);width:var(--ez-list__group-container-scrollbar--width);max-width:var(--ez-list__group-container-scrollbar--width);min-width:var(--ez-list__group-container-scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none;scrollbar-width:thin;scrollbar-color:var(--ez-list__draggable-scrollbar--background-color-primary) var(--ez-list__draggable-scrollbar--background-color-secondary)}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary)}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable-scrollbar--background-color-primary);border-radius:var(--ez-list__draggable-scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:var(--ez-list__draggable-scrollbar--background-color-secondary);width:var(--ez-list__draggable-scrollbar--width);max-width:var(--ez-list__draggable-scrollbar--width);min-width:var(--ez-list__draggable-scrollbar--width)}.group-overlay{font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
|
|
113504
113936
|
|
|
113505
113937
|
let EzList$1 = class extends HTMLElement$1 {
|
|
113506
113938
|
constructor() {
|
|
@@ -114036,7 +114468,7 @@ let EzLoadingBar$1 = class extends HTMLElement$1 {
|
|
|
114036
114468
|
static get style() { return ezLoadingBarCss; }
|
|
114037
114469
|
};
|
|
114038
114470
|
|
|
114039
|
-
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:
|
|
114471
|
+
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.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%}}";
|
|
114040
114472
|
|
|
114041
114473
|
let EzModal$1 = class extends HTMLElement$1 {
|
|
114042
114474
|
constructor() {
|
|
@@ -114509,6 +114941,23 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
114509
114941
|
static get style() { return ezSearchCss; }
|
|
114510
114942
|
};
|
|
114511
114943
|
|
|
114944
|
+
const ezSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
|
114945
|
+
|
|
114946
|
+
let SelectBox = class extends HTMLElement$1 {
|
|
114947
|
+
constructor() {
|
|
114948
|
+
super();
|
|
114949
|
+
this.__registerHost();
|
|
114950
|
+
this.__attachShadow();
|
|
114951
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
114952
|
+
this.selectedOption = { value: "na", label: "N/A" };
|
|
114953
|
+
}
|
|
114954
|
+
render() {
|
|
114955
|
+
return (h("ez-combo-box", { class: "grid-config-combo ez-input--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")));
|
|
114956
|
+
}
|
|
114957
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
114958
|
+
static get style() { return ezSelectBoxCss; }
|
|
114959
|
+
};
|
|
114960
|
+
|
|
114512
114961
|
const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--tabselector--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Sora, Algerian\");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}";
|
|
114513
114962
|
|
|
114514
114963
|
let EzTabselector$1 = class extends HTMLElement$1 {
|
|
@@ -115783,451 +116232,6 @@ let EzViewStack$1 = class extends HTMLElement$1 {
|
|
|
115783
116232
|
static get style() { return ezViewStackCss; }
|
|
115784
116233
|
};
|
|
115785
116234
|
|
|
115786
|
-
const gridConfigCss = ".sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, \"Sora\");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}";
|
|
115787
|
-
|
|
115788
|
-
let GridConfig$1 = class extends HTMLElement$1 {
|
|
115789
|
-
constructor() {
|
|
115790
|
-
super();
|
|
115791
|
-
this.__registerHost();
|
|
115792
|
-
this.configFinish = createEvent(this, "configFinish", 7);
|
|
115793
|
-
this.configCancel = createEvent(this, "configCancel", 7);
|
|
115794
|
-
this._orderListItems = [];
|
|
115795
|
-
this._orderPriorityList = [];
|
|
115796
|
-
this._columListItems = [];
|
|
115797
|
-
this._selectedIndex = -1;
|
|
115798
|
-
this._dataChanged = false;
|
|
115799
|
-
this._componenteInternalKey = Date.now();
|
|
115800
|
-
this.selectedTab = "Colunas";
|
|
115801
|
-
}
|
|
115802
|
-
/* Creation Methods */
|
|
115803
|
-
createOrderList() {
|
|
115804
|
-
let newList = [];
|
|
115805
|
-
this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
|
|
115806
|
-
var _a;
|
|
115807
|
-
let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
|
|
115808
|
-
let item = { name: column.name, label: column.label };
|
|
115809
|
-
if (configItem) {
|
|
115810
|
-
item['orderIndex'] = configItem.orderIndex;
|
|
115811
|
-
item['ascending'] = configItem.ascending;
|
|
115812
|
-
}
|
|
115813
|
-
if (!column.hidden) {
|
|
115814
|
-
newList.push(item);
|
|
115815
|
-
}
|
|
115816
|
-
});
|
|
115817
|
-
newList.sort((a, b) => {
|
|
115818
|
-
//OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
|
|
115819
|
-
if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
|
|
115820
|
-
if (a.ascending != undefined)
|
|
115821
|
-
return -1;
|
|
115822
|
-
if (b.ascending != undefined)
|
|
115823
|
-
return 1;
|
|
115824
|
-
return 0;
|
|
115825
|
-
//Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
|
|
115826
|
-
}
|
|
115827
|
-
else if (a.ascending != undefined && b.ascending != undefined) {
|
|
115828
|
-
return (a.orderIndex - b.orderIndex);
|
|
115829
|
-
//Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
|
|
115830
|
-
}
|
|
115831
|
-
else if (a.ascending != undefined || b.ascending != undefined) {
|
|
115832
|
-
if (a.ascending != undefined)
|
|
115833
|
-
return -1;
|
|
115834
|
-
if (b.ascending != undefined)
|
|
115835
|
-
return 1;
|
|
115836
|
-
return 0;
|
|
115837
|
-
}
|
|
115838
|
-
return (a.orderIndex - b.orderIndex);
|
|
115839
|
-
});
|
|
115840
|
-
this._orderListItems = newList;
|
|
115841
|
-
}
|
|
115842
|
-
createColumnList() {
|
|
115843
|
-
let visibleGroup = {
|
|
115844
|
-
group: 'Visíveis',
|
|
115845
|
-
items: [],
|
|
115846
|
-
};
|
|
115847
|
-
let hiddenGroup = {
|
|
115848
|
-
group: 'Ocultas',
|
|
115849
|
-
items: [],
|
|
115850
|
-
sort: 'ASC'
|
|
115851
|
-
};
|
|
115852
|
-
this.columns.forEach(column => {
|
|
115853
|
-
let item = { label: column.label };
|
|
115854
|
-
if (column.hidden) {
|
|
115855
|
-
hiddenGroup.items.push(item);
|
|
115856
|
-
}
|
|
115857
|
-
else {
|
|
115858
|
-
visibleGroup.items.push(item);
|
|
115859
|
-
}
|
|
115860
|
-
});
|
|
115861
|
-
this._columListItems = [visibleGroup, hiddenGroup];
|
|
115862
|
-
}
|
|
115863
|
-
buildColumnListSlot(item, group) {
|
|
115864
|
-
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
|
|
115865
|
-
}
|
|
115866
|
-
buildOrderListSlot(item) {
|
|
115867
|
-
let selectedOption = "na";
|
|
115868
|
-
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
115869
|
-
selectedOption = item.ascending == true ? 'asc' : 'desc';
|
|
115870
|
-
}
|
|
115871
|
-
return (h("div", null, h("select-box", { selectedOption: selectedOption, key: 'select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
|
|
115872
|
-
}
|
|
115873
|
-
updateOrder(sortOrder, updatedItemLabel) {
|
|
115874
|
-
var _a;
|
|
115875
|
-
this._dataChanged = true;
|
|
115876
|
-
let newList = [...this.columns];
|
|
115877
|
-
let newItem = newList.find(item => item.label === updatedItemLabel);
|
|
115878
|
-
if (newItem) {
|
|
115879
|
-
newItem.sort = sortOrder.value === "na" ? undefined : sortOrder.value;
|
|
115880
|
-
}
|
|
115881
|
-
let orderArray;
|
|
115882
|
-
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
115883
|
-
this._orderPriorityList.find(item => item.label === newItem.label).sort = sortOrder;
|
|
115884
|
-
this._orderPriorityList.filter(item => item.sort).map((item, index) => {
|
|
115885
|
-
if (item.label === newItem.label) {
|
|
115886
|
-
newItem.sortIndex = index;
|
|
115887
|
-
}
|
|
115888
|
-
});
|
|
115889
|
-
}
|
|
115890
|
-
else {
|
|
115891
|
-
orderArray = newList.filter(item => item.sort && item.hidden !== true).map((item, index) => {
|
|
115892
|
-
return { label: item.label, orderIndex: index };
|
|
115893
|
-
});
|
|
115894
|
-
orderArray.forEach(element => {
|
|
115895
|
-
newList.find(item => item.label === element.label).sortIndex = element.orderIndex;
|
|
115896
|
-
});
|
|
115897
|
-
}
|
|
115898
|
-
this.columns = newList;
|
|
115899
|
-
}
|
|
115900
|
-
/* Actions Methods */
|
|
115901
|
-
switchColumnGroup(ev, switchedItem) {
|
|
115902
|
-
ev.stopPropagation();
|
|
115903
|
-
let newList = [...this._columListItems];
|
|
115904
|
-
this._dataChanged = true;
|
|
115905
|
-
if (ev.detail === true) {
|
|
115906
|
-
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
115907
|
-
let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
115908
|
-
if (index >= 0) {
|
|
115909
|
-
hiddenGroup.items.splice(index, 1);
|
|
115910
|
-
}
|
|
115911
|
-
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
115912
|
-
visibleGroup.items.push(switchedItem);
|
|
115913
|
-
this._columListItems = newList;
|
|
115914
|
-
this.createOrderList();
|
|
115915
|
-
}
|
|
115916
|
-
else if (ev.detail === false) {
|
|
115917
|
-
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
115918
|
-
let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
115919
|
-
if (index >= 0) {
|
|
115920
|
-
visibleGroup.items.splice(index, 1);
|
|
115921
|
-
}
|
|
115922
|
-
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
115923
|
-
hiddenGroup.items.push(switchedItem);
|
|
115924
|
-
this._columListItems = newList;
|
|
115925
|
-
this.createOrderList();
|
|
115926
|
-
}
|
|
115927
|
-
}
|
|
115928
|
-
finish() {
|
|
115929
|
-
let newColumnList = [];
|
|
115930
|
-
this._columListItems.forEach(group => {
|
|
115931
|
-
group.items.forEach(item => {
|
|
115932
|
-
const baseColumn = this.columns.find(column => column.label === item.label);
|
|
115933
|
-
let newColumnItem = Object.assign({}, baseColumn);
|
|
115934
|
-
if (group.group === "Ocultas") {
|
|
115935
|
-
newColumnItem.hidden = true;
|
|
115936
|
-
}
|
|
115937
|
-
else {
|
|
115938
|
-
newColumnItem.hidden = false;
|
|
115939
|
-
}
|
|
115940
|
-
newColumnList.push(newColumnItem);
|
|
115941
|
-
});
|
|
115942
|
-
});
|
|
115943
|
-
this.columns = newColumnList;
|
|
115944
|
-
this._dataChanged = false;
|
|
115945
|
-
this.closeConfig();
|
|
115946
|
-
ApplicationUtils.info("As configurações foram salvas com sucesso!");
|
|
115947
|
-
this.save();
|
|
115948
|
-
}
|
|
115949
|
-
save() {
|
|
115950
|
-
var _a;
|
|
115951
|
-
let _newConfig;
|
|
115952
|
-
if (this.config) {
|
|
115953
|
-
_newConfig = this.config;
|
|
115954
|
-
}
|
|
115955
|
-
else {
|
|
115956
|
-
_newConfig = this.createConfigFromState(this.columns);
|
|
115957
|
-
}
|
|
115958
|
-
let _newColumnConfigList = [];
|
|
115959
|
-
let orderArray;
|
|
115960
|
-
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
115961
|
-
orderArray = this.columns.filter(item => item.sort && item.hidden !== true).map((item) => {
|
|
115962
|
-
return { label: item.label, orderIndex: 0 };
|
|
115963
|
-
});
|
|
115964
|
-
let indexCount = 0;
|
|
115965
|
-
let newOrderArray = [];
|
|
115966
|
-
this._orderPriorityList.forEach((orderPriorityItem) => {
|
|
115967
|
-
let item = orderArray.find(column => column.label === orderPriorityItem.label);
|
|
115968
|
-
if (item) {
|
|
115969
|
-
item.orderIndex = indexCount;
|
|
115970
|
-
newOrderArray.push(item);
|
|
115971
|
-
indexCount++;
|
|
115972
|
-
}
|
|
115973
|
-
});
|
|
115974
|
-
if (newOrderArray.length > 0) {
|
|
115975
|
-
orderArray = newOrderArray;
|
|
115976
|
-
}
|
|
115977
|
-
}
|
|
115978
|
-
for (let i = 0; i < this.columns.length; i++) {
|
|
115979
|
-
const column = this.columns[i];
|
|
115980
|
-
let _newColumnConfig = _newConfig.columns.find(_newColumnConfig => column.name === _newColumnConfig.name);
|
|
115981
|
-
if (column.hidden === true && _newColumnConfig) {
|
|
115982
|
-
continue;
|
|
115983
|
-
}
|
|
115984
|
-
if (_newColumnConfig) {
|
|
115985
|
-
_newColumnConfig.width = column.width;
|
|
115986
|
-
}
|
|
115987
|
-
else if (column.hidden === false) {
|
|
115988
|
-
_newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
|
|
115989
|
-
}
|
|
115990
|
-
if (_newColumnConfig) {
|
|
115991
|
-
if (column.sort) {
|
|
115992
|
-
_newColumnConfig.ascending = column.sort.toUpperCase() === "ASC" ? true : false;
|
|
115993
|
-
if (orderArray) {
|
|
115994
|
-
adjustPriorityOrder(column, _newColumnConfig);
|
|
115995
|
-
}
|
|
115996
|
-
else {
|
|
115997
|
-
_newColumnConfig.orderIndex = column.sortIndex;
|
|
115998
|
-
}
|
|
115999
|
-
}
|
|
116000
|
-
else {
|
|
116001
|
-
delete _newColumnConfig.ascending;
|
|
116002
|
-
_newColumnConfig.orderIndex = 0;
|
|
116003
|
-
}
|
|
116004
|
-
_newColumnConfigList.push(_newColumnConfig);
|
|
116005
|
-
}
|
|
116006
|
-
}
|
|
116007
|
-
_newConfig.columns = _newColumnConfigList;
|
|
116008
|
-
this.configFinish.emit(_newConfig);
|
|
116009
|
-
this._orderList.clearHistory();
|
|
116010
|
-
function adjustPriorityOrder(column, _newColumnConfig) {
|
|
116011
|
-
if (orderArray) {
|
|
116012
|
-
let orderItem = orderArray.find(item => item.label === column.label);
|
|
116013
|
-
if (orderItem) {
|
|
116014
|
-
_newColumnConfig.orderIndex = orderItem.orderIndex;
|
|
116015
|
-
}
|
|
116016
|
-
}
|
|
116017
|
-
}
|
|
116018
|
-
}
|
|
116019
|
-
createConfigFromState(state) {
|
|
116020
|
-
let newConfig = { columns: [] };
|
|
116021
|
-
state.forEach(columnState => {
|
|
116022
|
-
if (!columnState.hidden) {
|
|
116023
|
-
let newConfigColumn = { name: columnState.name };
|
|
116024
|
-
if (columnState.width) {
|
|
116025
|
-
newConfigColumn['width'] = columnState.width;
|
|
116026
|
-
}
|
|
116027
|
-
if (columnState.sort) {
|
|
116028
|
-
newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
|
|
116029
|
-
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
|
116030
|
-
}
|
|
116031
|
-
else {
|
|
116032
|
-
newConfigColumn['orderIndex'] = 0;
|
|
116033
|
-
}
|
|
116034
|
-
if (newConfigColumn) {
|
|
116035
|
-
newConfig.columns.push(newConfigColumn);
|
|
116036
|
-
}
|
|
116037
|
-
}
|
|
116038
|
-
});
|
|
116039
|
-
return newConfig;
|
|
116040
|
-
}
|
|
116041
|
-
async locateColumn(evt, searchingText) {
|
|
116042
|
-
var _a;
|
|
116043
|
-
const hitEnter = evt.key === "Enter";
|
|
116044
|
-
if (!searchingText) {
|
|
116045
|
-
searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
116046
|
-
}
|
|
116047
|
-
let newSelected = -1;
|
|
116048
|
-
if (this.selectedTab === "Ordenação das linhas") {
|
|
116049
|
-
if (searchingText) {
|
|
116050
|
-
const matchedIndexes = [];
|
|
116051
|
-
let orderListDatasource;
|
|
116052
|
-
await this._orderList.getList().then(listGroup => {
|
|
116053
|
-
orderListDatasource = listGroup;
|
|
116054
|
-
orderListDatasource.forEach((column, index) => {
|
|
116055
|
-
if (this.compareWords(column, searchingText)) {
|
|
116056
|
-
matchedIndexes.push(index);
|
|
116057
|
-
}
|
|
116058
|
-
});
|
|
116059
|
-
});
|
|
116060
|
-
if (matchedIndexes.length > 0) {
|
|
116061
|
-
if (hitEnter) {
|
|
116062
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
116063
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
|
116064
|
-
newSelected = matchedIndexes[j];
|
|
116065
|
-
break;
|
|
116066
|
-
}
|
|
116067
|
-
}
|
|
116068
|
-
}
|
|
116069
|
-
if (newSelected === -1) {
|
|
116070
|
-
newSelected = matchedIndexes[0];
|
|
116071
|
-
}
|
|
116072
|
-
}
|
|
116073
|
-
this._selectedIndex = newSelected;
|
|
116074
|
-
let selectedColumn;
|
|
116075
|
-
selectedColumn = orderListDatasource[newSelected];
|
|
116076
|
-
if (selectedColumn) {
|
|
116077
|
-
this._orderList.setSelection({ label: selectedColumn.label }, true);
|
|
116078
|
-
}
|
|
116079
|
-
else {
|
|
116080
|
-
this._orderList.setSelection(undefined);
|
|
116081
|
-
}
|
|
116082
|
-
}
|
|
116083
|
-
else {
|
|
116084
|
-
this._orderList.setSelection(undefined);
|
|
116085
|
-
}
|
|
116086
|
-
}
|
|
116087
|
-
else {
|
|
116088
|
-
if (searchingText) {
|
|
116089
|
-
const matchedIndexes = [];
|
|
116090
|
-
this.columns.forEach((column, index) => {
|
|
116091
|
-
if (this.compareWords(column, searchingText)) {
|
|
116092
|
-
matchedIndexes.push(index);
|
|
116093
|
-
}
|
|
116094
|
-
});
|
|
116095
|
-
if (matchedIndexes.length > 0) {
|
|
116096
|
-
if (hitEnter) {
|
|
116097
|
-
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
116098
|
-
if (matchedIndexes[j] > this._selectedIndex) {
|
|
116099
|
-
newSelected = matchedIndexes[j];
|
|
116100
|
-
break;
|
|
116101
|
-
}
|
|
116102
|
-
}
|
|
116103
|
-
}
|
|
116104
|
-
if (newSelected === -1) {
|
|
116105
|
-
newSelected = matchedIndexes[0];
|
|
116106
|
-
}
|
|
116107
|
-
}
|
|
116108
|
-
this._selectedIndex = newSelected;
|
|
116109
|
-
let selectedColumn = this.columns[newSelected];
|
|
116110
|
-
if (selectedColumn) {
|
|
116111
|
-
this._columnList.setSelection({ label: selectedColumn.label }, true);
|
|
116112
|
-
}
|
|
116113
|
-
else {
|
|
116114
|
-
this._columnList.setSelection(undefined);
|
|
116115
|
-
}
|
|
116116
|
-
}
|
|
116117
|
-
else {
|
|
116118
|
-
this._columnList.setSelection(undefined);
|
|
116119
|
-
}
|
|
116120
|
-
}
|
|
116121
|
-
}
|
|
116122
|
-
compareWords(column, searchingText) {
|
|
116123
|
-
if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
116124
|
-
return true;
|
|
116125
|
-
}
|
|
116126
|
-
return false;
|
|
116127
|
-
}
|
|
116128
|
-
closeConfig() {
|
|
116129
|
-
this._orderList.scrollToTop();
|
|
116130
|
-
this._columnList.scrollToTop();
|
|
116131
|
-
this._searchElement.value = "";
|
|
116132
|
-
if (this._dataChanged) {
|
|
116133
|
-
let options = {
|
|
116134
|
-
canClose: false,
|
|
116135
|
-
labelCancel: "Descartar",
|
|
116136
|
-
labelConfirm: "Salvar",
|
|
116137
|
-
btnConfirmDanger: false
|
|
116138
|
-
};
|
|
116139
|
-
ApplicationUtils.confirm("Aviso", "As alterações realizadas serão descartadas. Gostaria de salvar antes de sair?", null, false, options)
|
|
116140
|
-
.then(response => {
|
|
116141
|
-
if (!response) {
|
|
116142
|
-
this._dataChanged = false;
|
|
116143
|
-
this.configCancel.emit();
|
|
116144
|
-
this._orderList.clearHistory();
|
|
116145
|
-
this._componenteInternalKey = Date.now();
|
|
116146
|
-
}
|
|
116147
|
-
else {
|
|
116148
|
-
this.finish();
|
|
116149
|
-
}
|
|
116150
|
-
});
|
|
116151
|
-
}
|
|
116152
|
-
else {
|
|
116153
|
-
this.configCancel.emit();
|
|
116154
|
-
this._orderList.clearHistory();
|
|
116155
|
-
}
|
|
116156
|
-
}
|
|
116157
|
-
/* Handlers */
|
|
116158
|
-
handleTabChange(ev) {
|
|
116159
|
-
var _a;
|
|
116160
|
-
if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
|
|
116161
|
-
if (this.selectedTab !== ev.target.selectedTab) {
|
|
116162
|
-
if (ev.target.selectedTab === "Colunas") {
|
|
116163
|
-
this._orderList.scrollToTop();
|
|
116164
|
-
}
|
|
116165
|
-
else if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
116166
|
-
this._columnList.scrollToTop();
|
|
116167
|
-
}
|
|
116168
|
-
this._searchElement.value = "";
|
|
116169
|
-
}
|
|
116170
|
-
if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
116171
|
-
this.createOrderList();
|
|
116172
|
-
}
|
|
116173
|
-
this.selectedTab = ev.target.selectedTab;
|
|
116174
|
-
}
|
|
116175
|
-
}
|
|
116176
|
-
handleColumnListChange(ev) {
|
|
116177
|
-
var _a;
|
|
116178
|
-
if (ev.detail) {
|
|
116179
|
-
let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
|
|
116180
|
-
if (visibleItems) {
|
|
116181
|
-
this._dataChanged = true;
|
|
116182
|
-
this._orderListItems = visibleItems;
|
|
116183
|
-
}
|
|
116184
|
-
}
|
|
116185
|
-
}
|
|
116186
|
-
handleOrderListChange(ev) {
|
|
116187
|
-
if (ev.detail) {
|
|
116188
|
-
let orderPriorityList = ev.detail;
|
|
116189
|
-
if (orderPriorityList) {
|
|
116190
|
-
this._dataChanged = true;
|
|
116191
|
-
this._orderPriorityList = orderPriorityList;
|
|
116192
|
-
}
|
|
116193
|
-
}
|
|
116194
|
-
}
|
|
116195
|
-
componentWillRender() {
|
|
116196
|
-
var _a;
|
|
116197
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
116198
|
-
this.createColumnList();
|
|
116199
|
-
}
|
|
116200
|
-
}
|
|
116201
|
-
componentDidRender() {
|
|
116202
|
-
var _a;
|
|
116203
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
116204
|
-
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
|
116205
|
-
}
|
|
116206
|
-
}
|
|
116207
|
-
render() {
|
|
116208
|
-
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', iconName: "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", iconName: "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: "ez-button--primary", onClick: () => this.finish() }))));
|
|
116209
|
-
}
|
|
116210
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
116211
|
-
static get style() { return gridConfigCss; }
|
|
116212
|
-
};
|
|
116213
|
-
|
|
116214
|
-
const selectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
|
116215
|
-
|
|
116216
|
-
let SelectBox$1 = class extends HTMLElement$1 {
|
|
116217
|
-
constructor() {
|
|
116218
|
-
super();
|
|
116219
|
-
this.__registerHost();
|
|
116220
|
-
this.__attachShadow();
|
|
116221
|
-
this.ezChange = createEvent(this, "ezChange", 7);
|
|
116222
|
-
this.selectedOption = { value: "na", label: "N/A" };
|
|
116223
|
-
}
|
|
116224
|
-
render() {
|
|
116225
|
-
return (h("ez-combo-box", { class: "grid-config-combo ez-input--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")));
|
|
116226
|
-
}
|
|
116227
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
116228
|
-
static get style() { return selectBoxCss; }
|
|
116229
|
-
};
|
|
116230
|
-
|
|
116231
116235
|
const testDuCss = ":host{display:block}";
|
|
116232
116236
|
|
|
116233
116237
|
let TestDu$1 = class extends HTMLElement$1 {
|
|
@@ -116337,6 +116341,7 @@ const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"co
|
|
|
116337
116341
|
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]}]);
|
|
116338
116342
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [0,"ez-form",{"dataUnit":[1040],"config":[16]}]);
|
|
116339
116343
|
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],"_popUpGridConfig":[32]}]);
|
|
116344
|
+
const EzGridConfig = /*@__PURE__*/proxyCustomElement(EzGridConfig$1, [2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]);
|
|
116340
116345
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
116341
116346
|
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]}]);
|
|
116342
116347
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
@@ -116345,6 +116350,7 @@ const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-nu
|
|
|
116345
116350
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [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"]}]);
|
|
116346
116351
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]);
|
|
116347
116352
|
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [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]}]);
|
|
116353
|
+
const EzSelectBox = /*@__PURE__*/proxyCustomElement(SelectBox, [1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
116348
116354
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
|
|
116349
116355
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [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]}]);
|
|
116350
116356
|
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [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]}]);
|
|
@@ -116352,8 +116358,6 @@ const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-i
|
|
|
116352
116358
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
116353
116359
|
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]}]);
|
|
116354
116360
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
116355
|
-
const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]);
|
|
116356
|
-
const SelectBox = /*@__PURE__*/proxyCustomElement(SelectBox$1, [1,"select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
116357
116361
|
const TestDu = /*@__PURE__*/proxyCustomElement(TestDu$1, [0,"test-du",{"isDirty":[32]}]);
|
|
116358
116362
|
const defineCustomElements = (opts) => {
|
|
116359
116363
|
if (typeof customElements !== 'undefined') {
|
|
@@ -116372,6 +116376,7 @@ const defineCustomElements = (opts) => {
|
|
|
116372
116376
|
EzFilterInput,
|
|
116373
116377
|
EzForm,
|
|
116374
116378
|
EzGrid,
|
|
116379
|
+
EzGridConfig,
|
|
116375
116380
|
EzIcon,
|
|
116376
116381
|
EzList,
|
|
116377
116382
|
EzLoadingBar,
|
|
@@ -116380,6 +116385,7 @@ const defineCustomElements = (opts) => {
|
|
|
116380
116385
|
EzPopover,
|
|
116381
116386
|
EzPopup,
|
|
116382
116387
|
EzSearch,
|
|
116388
|
+
EzSelectBox,
|
|
116383
116389
|
EzTabselector,
|
|
116384
116390
|
EzTextArea,
|
|
116385
116391
|
EzTextInput,
|
|
@@ -116387,8 +116393,6 @@ const defineCustomElements = (opts) => {
|
|
|
116387
116393
|
EzToast,
|
|
116388
116394
|
EzUpload,
|
|
116389
116395
|
EzViewStack,
|
|
116390
|
-
GridConfig,
|
|
116391
|
-
SelectBox,
|
|
116392
116396
|
TestDu
|
|
116393
116397
|
].forEach(cmp => {
|
|
116394
116398
|
if (!customElements.get(cmp.is)) {
|
|
@@ -116398,4 +116402,4 @@ const defineCustomElements = (opts) => {
|
|
|
116398
116402
|
}
|
|
116399
116403
|
};
|
|
116400
116404
|
|
|
116401
|
-
export { EzApplication, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzLoadingBar, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack,
|
|
116405
|
+
export { EzApplication, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFilterInput, EzForm, EzGrid, EzGridConfig, EzIcon, EzList, EzLoadingBar, EzModal, EzNumberInput, EzPopover, EzPopup, EzSearch, EzSelectBox, EzTabselector, EzTextArea, EzTextInput, EzTimeInput, EzToast, EzUpload, EzViewStack, TestDu, defineCustomElements };
|