@sankhyalabs/ezui 1.1.90 → 1.1.91

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.
@@ -111136,12 +111136,10 @@ let EzTabselector = class {
111136
111136
  this.ezChange = index.createEvent(this, "ezChange", 7);
111137
111137
  this.setFocusedParam = (ev) => {
111138
111138
  if (ev.key === "Enter") {
111139
- this.selectedIndex = this.focusedIndex;
111140
- this.focusedIndex = undefined;
111141
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
111142
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
111139
+ const selectedTab = this._processedTabs[this._focusedIndex];
111140
+ this.handleTabClick(selectedTab);
111143
111141
  ev.preventDefault();
111144
- this.setFocusedTab(this.selectedIndex);
111142
+ this.setFocusedTab(selectedTab.index);
111145
111143
  }
111146
111144
  else if (ev.key === "ArrowLeft" || ev.key === "ArrowRight") {
111147
111145
  let operator = undefined;
@@ -111154,48 +111152,46 @@ let EzTabselector = class {
111154
111152
  else {
111155
111153
  return;
111156
111154
  }
111157
- if (this.focusedIndex === undefined) {
111155
+ if (this._focusedIndex === undefined) {
111158
111156
  if (operator === false) {
111159
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) - 1).toString() : undefined;
111157
+ this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex - 1 : undefined;
111160
111158
  }
111161
111159
  else {
111162
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) + 1).toString() : undefined;
111160
+ this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex + 1 : undefined;
111163
111161
  }
111164
111162
  }
111165
111163
  else {
111166
111164
  if (operator === false) {
111167
- this.focusedIndex = (parseInt(this.focusedIndex) - 1).toString();
111165
+ this._focusedIndex = this._focusedIndex - 1;
111168
111166
  }
111169
111167
  else {
111170
- this.focusedIndex = (parseInt(this.focusedIndex) + 1).toString();
111168
+ this._focusedIndex = this._focusedIndex + 1;
111171
111169
  }
111172
111170
  }
111173
- if (parseInt(this.focusedIndex) < 0) {
111174
- this.focusedIndex = "0";
111171
+ if (this._focusedIndex < 0) {
111172
+ this._focusedIndex = 0;
111175
111173
  }
111176
- else if (parseInt(this.focusedIndex) > this._processedTabs.length - 1) {
111177
- this.focusedIndex = (this._processedTabs.length - 1).toString();
111174
+ else if (this._focusedIndex > this._processedTabs.length - 1) {
111175
+ this._focusedIndex = this._processedTabs.length - 1;
111178
111176
  }
111179
- this.setFocusedBtn(true, this.focusedIndex);
111180
- this.setFocusedTab(this.focusedIndex);
111181
- this.ezChange.emit(this.selectedTab);
111177
+ this.setFocusedBtn(true, this._focusedIndex);
111178
+ this.setFocusedTab(this._focusedIndex);
111182
111179
  }
111183
111180
  else if (ev.key === "Tab" || ev.key === "Escape") {
111184
- this.focusedIndex = undefined;
111185
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
111186
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
111181
+ const currentTab = this._processedTabs[this.selectedIndex];
111182
+ this._focusedIndex = undefined;
111183
+ this.handleTabClick(currentTab);
111187
111184
  ev.preventDefault();
111188
111185
  this.setFocusedTab(this.selectedIndex);
111189
111186
  }
111190
- // this.setFocusedTab();
111191
111187
  };
111192
111188
  }
111193
- handleTabClick(tab, index) {
111194
- this.selectedIndex = index.toString();
111195
- this.focusedIndex = undefined;
111196
- this.selectedTab = tab;
111197
- this.ezChange.emit(this.selectedTab);
111198
- this.setFocusedBtn(false, this.selectedIndex);
111189
+ handleTabClick(tab) {
111190
+ this.selectedIndex = tab.index;
111191
+ this._focusedIndex = undefined;
111192
+ this.selectedTab = tab.tabKey;
111193
+ this.ezChange.emit(tab);
111194
+ this.setFocusedBtn(false, tab.index);
111199
111195
  }
111200
111196
  componentWillRender() {
111201
111197
  if (!this._processedTabs) {
@@ -111203,16 +111199,16 @@ let EzTabselector = class {
111203
111199
  if (this.tabs) {
111204
111200
  this.tabs.split(",").forEach((label) => {
111205
111201
  label = label.trim();
111206
- this._processedTabs.push(new Tab(label, label));
111202
+ this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
111207
111203
  });
111208
111204
  }
111209
111205
  this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
111210
111206
  const tabKey = elem.getAttribute("tabKey");
111211
111207
  const label = elem.getAttribute("label");
111212
- const t = new Tab(label, tabKey);
111208
+ const t = { label, tabKey, index: this._processedTabs.length };
111213
111209
  const content = elem.firstChild;
111214
111210
  if (content) {
111215
- content.setAttribute("slot", "tab" + this._processedTabs.length);
111211
+ content.setAttribute("slot", "tab" + t.index);
111216
111212
  this._hostElem.appendChild(content);
111217
111213
  }
111218
111214
  this._processedTabs.push(t);
@@ -111311,22 +111307,16 @@ let EzTabselector = class {
111311
111307
  return (index.h(index.Host, null, index.h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), index.h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index$1) => {
111312
111308
  const labelStyle = { "min-width": this.getTextWidth(tab.label) };
111313
111309
  const tabId = "tab" + index$1;
111314
- const isSelected = index$1 === parseInt(this.selectedIndex) || (this.selectedTab && tab.tabKey === this.selectedTab);
111310
+ const isSelected = index$1 === this.selectedIndex || (this.selectedTab && tab.tabKey === this.selectedTab);
111315
111311
  if (isSelected) {
111316
111312
  this.selectedTab = tab.tabKey;
111317
- this.selectedIndex = index$1.toString();
111313
+ this.selectedIndex = index$1;
111318
111314
  }
111319
- return index.h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab.tabKey, index$1), style: labelStyle }, index.h("span", { class: "tab-label", title: tab.label }, tab.label), index.h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
111315
+ return index.h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle }, index.h("span", { class: "tab-label", title: tab.label }, tab.label), index.h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
111320
111316
  })), index.h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
111321
111317
  }
111322
111318
  get _hostElem() { return index.getElement(this); }
111323
111319
  };
111324
- class Tab {
111325
- constructor(label, tabKey) {
111326
- this.label = label;
111327
- this.tabKey = tabKey;
111328
- }
111329
- }
111330
111320
  EzTabselector.style = ezTabselectorCss;
111331
111321
 
111332
111322
  const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--large, 500);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--alert-cold-800, #042EFF);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{display:flex;min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";
@@ -111759,7 +111749,7 @@ let GridConfig = class {
111759
111749
  }
111760
111750
  }
111761
111751
  render() {
111762
- return (index.h(index.Host, null, index.h("div", { class: "grid-config__header" }, index.h("div", { class: "title-container" }, index.h("div", { class: "" }, index.h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), index.h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), index.h("div", { class: "button-close" }, index.h("ez-button", { mode: 'icon', image: AssetsUtils.getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "tabselector-container" }, index.h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: '0', onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })), index.h("div", null, index.h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, index.h("ez-icon", { slot: "leftIcon", size: "medium", href: AssetsUtils.getSpritePath("search") })))), index.h("div", { class: "grid-config__main" }, index.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 }), index.h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação" ? "" : "hidden", dataSource: this._orderListItems, ezSelectable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), index.h("div", { class: "grid-config__footer" }, index.h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), index.h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
111752
+ return (index.h(index.Host, null, index.h("div", { class: "grid-config__header" }, index.h("div", { class: "title-container" }, index.h("div", { class: "" }, index.h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), index.h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), index.h("div", { class: "button-close" }, index.h("ez-button", { mode: 'icon', image: AssetsUtils.getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "tabselector-container" }, index.h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })), index.h("div", null, index.h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, index.h("ez-icon", { slot: "leftIcon", size: "medium", href: AssetsUtils.getSpritePath("search") })))), index.h("div", { class: "grid-config__main" }, index.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 }), index.h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação" ? "" : "hidden", dataSource: this._orderListItems, ezSelectable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), index.h("div", { class: "grid-config__footer" }, index.h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), index.h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
111763
111753
  }
111764
111754
  static get assetsDirs() { return ["../assets"]; }
111765
111755
  };
@@ -566,7 +566,7 @@ function loadMetadata(formMetadata) {
566
566
  function changeTab(currentSheet) {
567
567
  return {
568
568
  type: FormActions.CHANGE_TAB,
569
- payload: currentSheet
569
+ payload: currentSheet.tabKey
570
570
  };
571
571
  }
572
572
  /////////////////////////////// SELECTORS ///////////////////////////////
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-button_11.cjs",[[0,"test-du"],[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}],[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}]]],["ez-collapsible-box_7.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[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"]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64]}]]]], options);
18
+ return index.bootstrapLazy([["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-button_11.cjs",[[0,"test-du"],[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}],[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}]]],["ez-collapsible-box_7.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[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"]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64]}]]]], options);
19
19
  });
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-button_11.cjs",[[0,"test-du"],[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}],[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}]]],["ez-collapsible-box_7.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[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"]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64]}]]]], options);
17
+ return index.bootstrapLazy([["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-button_11.cjs",[[0,"test-du"],[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}],[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}]]],["ez-collapsible-box_7.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[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"]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "entries": [
3
3
  "./components/ez-combo-box/ez-combo-box.js",
4
+ "./components/ez-tabselector/ez-tabselector.js",
4
5
  "./components/ez-form/ez-form.js",
5
6
  "./components/ez-list/ez-list.js",
6
7
  "./components/ez-upload/ez-upload.js",
@@ -23,7 +24,6 @@
23
24
  "./components/ez-popover/ez-popover.js",
24
25
  "./components/ez-popup/ez-popup.js",
25
26
  "./components/ez-search/ez-search.js",
26
- "./components/ez-tabselector/ez-tabselector.js",
27
27
  "./components/ez-text-area/ez-text-area.js",
28
28
  "./components/ez-text-input/ez-text-input.js",
29
29
  "./components/ez-time-input/ez-time-input.js",
@@ -20,7 +20,7 @@ export function loadMetadata(formMetadata) {
20
20
  export function changeTab(currentSheet) {
21
21
  return {
22
22
  type: FormActions.CHANGE_TAB,
23
- payload: currentSheet
23
+ payload: currentSheet.tabKey
24
24
  };
25
25
  }
26
26
  /////////////////////////////// SELECTORS ///////////////////////////////
@@ -249,7 +249,7 @@ export class GridConfig {
249
249
  h("div", { class: "button-close" },
250
250
  h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))),
251
251
  h("div", { class: "tabselector-container" },
252
- h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: '0', onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })),
252
+ h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })),
253
253
  h("div", null,
254
254
  h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) },
255
255
  h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))),
@@ -3,12 +3,10 @@ export class EzTabselector {
3
3
  constructor() {
4
4
  this.setFocusedParam = (ev) => {
5
5
  if (ev.key === "Enter") {
6
- this.selectedIndex = this.focusedIndex;
7
- this.focusedIndex = undefined;
8
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
9
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
6
+ const selectedTab = this._processedTabs[this._focusedIndex];
7
+ this.handleTabClick(selectedTab);
10
8
  ev.preventDefault();
11
- this.setFocusedTab(this.selectedIndex);
9
+ this.setFocusedTab(selectedTab.index);
12
10
  }
13
11
  else if (ev.key === "ArrowLeft" || ev.key === "ArrowRight") {
14
12
  let operator = undefined;
@@ -21,48 +19,46 @@ export class EzTabselector {
21
19
  else {
22
20
  return;
23
21
  }
24
- if (this.focusedIndex === undefined) {
22
+ if (this._focusedIndex === undefined) {
25
23
  if (operator === false) {
26
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) - 1).toString() : undefined;
24
+ this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex - 1 : undefined;
27
25
  }
28
26
  else {
29
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) + 1).toString() : undefined;
27
+ this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex + 1 : undefined;
30
28
  }
31
29
  }
32
30
  else {
33
31
  if (operator === false) {
34
- this.focusedIndex = (parseInt(this.focusedIndex) - 1).toString();
32
+ this._focusedIndex = this._focusedIndex - 1;
35
33
  }
36
34
  else {
37
- this.focusedIndex = (parseInt(this.focusedIndex) + 1).toString();
35
+ this._focusedIndex = this._focusedIndex + 1;
38
36
  }
39
37
  }
40
- if (parseInt(this.focusedIndex) < 0) {
41
- this.focusedIndex = "0";
38
+ if (this._focusedIndex < 0) {
39
+ this._focusedIndex = 0;
42
40
  }
43
- else if (parseInt(this.focusedIndex) > this._processedTabs.length - 1) {
44
- this.focusedIndex = (this._processedTabs.length - 1).toString();
41
+ else if (this._focusedIndex > this._processedTabs.length - 1) {
42
+ this._focusedIndex = this._processedTabs.length - 1;
45
43
  }
46
- this.setFocusedBtn(true, this.focusedIndex);
47
- this.setFocusedTab(this.focusedIndex);
48
- this.ezChange.emit(this.selectedTab);
44
+ this.setFocusedBtn(true, this._focusedIndex);
45
+ this.setFocusedTab(this._focusedIndex);
49
46
  }
50
47
  else if (ev.key === "Tab" || ev.key === "Escape") {
51
- this.focusedIndex = undefined;
52
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
53
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
48
+ const currentTab = this._processedTabs[this.selectedIndex];
49
+ this._focusedIndex = undefined;
50
+ this.handleTabClick(currentTab);
54
51
  ev.preventDefault();
55
52
  this.setFocusedTab(this.selectedIndex);
56
53
  }
57
- // this.setFocusedTab();
58
54
  };
59
55
  }
60
- handleTabClick(tab, index) {
61
- this.selectedIndex = index.toString();
62
- this.focusedIndex = undefined;
63
- this.selectedTab = tab;
64
- this.ezChange.emit(this.selectedTab);
65
- this.setFocusedBtn(false, this.selectedIndex);
56
+ handleTabClick(tab) {
57
+ this.selectedIndex = tab.index;
58
+ this._focusedIndex = undefined;
59
+ this.selectedTab = tab.tabKey;
60
+ this.ezChange.emit(tab);
61
+ this.setFocusedBtn(false, tab.index);
66
62
  }
67
63
  componentWillRender() {
68
64
  if (!this._processedTabs) {
@@ -70,16 +66,16 @@ export class EzTabselector {
70
66
  if (this.tabs) {
71
67
  this.tabs.split(",").forEach((label) => {
72
68
  label = label.trim();
73
- this._processedTabs.push(new Tab(label, label));
69
+ this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
74
70
  });
75
71
  }
76
72
  this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
77
73
  const tabKey = elem.getAttribute("tabKey");
78
74
  const label = elem.getAttribute("label");
79
- const t = new Tab(label, tabKey);
75
+ const t = { label, tabKey, index: this._processedTabs.length };
80
76
  const content = elem.firstChild;
81
77
  if (content) {
82
- content.setAttribute("slot", "tab" + this._processedTabs.length);
78
+ content.setAttribute("slot", "tab" + t.index);
83
79
  this._hostElem.appendChild(content);
84
80
  }
85
81
  this._processedTabs.push(t);
@@ -181,12 +177,12 @@ export class EzTabselector {
181
177
  h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index) => {
182
178
  const labelStyle = { "min-width": this.getTextWidth(tab.label) };
183
179
  const tabId = "tab" + index;
184
- const isSelected = index === parseInt(this.selectedIndex) || (this.selectedTab && tab.tabKey === this.selectedTab);
180
+ const isSelected = index === this.selectedIndex || (this.selectedTab && tab.tabKey === this.selectedTab);
185
181
  if (isSelected) {
186
182
  this.selectedTab = tab.tabKey;
187
- this.selectedIndex = index.toString();
183
+ this.selectedIndex = index;
188
184
  }
189
- return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab.tabKey, index), style: labelStyle },
185
+ return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle },
190
186
  h("span", { class: "tab-label", title: tab.label }, tab.label),
191
187
  h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
192
188
  })),
@@ -202,11 +198,11 @@ export class EzTabselector {
202
198
  }; }
203
199
  static get properties() { return {
204
200
  "selectedIndex": {
205
- "type": "string",
201
+ "type": "number",
206
202
  "mutable": true,
207
203
  "complexType": {
208
- "original": "string",
209
- "resolved": "string",
204
+ "original": "number",
205
+ "resolved": "number",
210
206
  "references": {}
211
207
  },
212
208
  "required": false,
@@ -261,19 +257,17 @@ export class EzTabselector {
261
257
  "composed": true,
262
258
  "docs": {
263
259
  "tags": [],
264
- "text": "Evento emitido ao clicar para abrir o popup (ezChange)."
260
+ "text": "Evento emitido ao clicar para abrir o popup (ezChange).\nO detail desse evento carrega tanto o tabKey quanto o index da aba\nselecionada."
265
261
  },
266
262
  "complexType": {
267
- "original": "string",
268
- "resolved": "string",
269
- "references": {}
263
+ "original": "Tab",
264
+ "resolved": "Tab",
265
+ "references": {
266
+ "Tab": {
267
+ "location": "local"
268
+ }
269
+ }
270
270
  }
271
271
  }]; }
272
272
  static get elementRef() { return "_hostElem"; }
273
273
  }
274
- class Tab {
275
- constructor(label, tabKey) {
276
- this.label = label;
277
- this.tabKey = tabKey;
278
- }
279
- }
@@ -9214,7 +9214,7 @@ function loadMetadata(formMetadata) {
9214
9214
  function changeTab(currentSheet) {
9215
9215
  return {
9216
9216
  type: FormActions.CHANGE_TAB,
9217
- payload: currentSheet
9217
+ payload: currentSheet.tabKey
9218
9218
  };
9219
9219
  }
9220
9220
  /////////////////////////////// SELECTORS ///////////////////////////////
@@ -120759,12 +120759,10 @@ let EzTabselector$1 = class extends HTMLElement$1 {
120759
120759
  this.ezChange = createEvent(this, "ezChange", 7);
120760
120760
  this.setFocusedParam = (ev) => {
120761
120761
  if (ev.key === "Enter") {
120762
- this.selectedIndex = this.focusedIndex;
120763
- this.focusedIndex = undefined;
120764
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
120765
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
120762
+ const selectedTab = this._processedTabs[this._focusedIndex];
120763
+ this.handleTabClick(selectedTab);
120766
120764
  ev.preventDefault();
120767
- this.setFocusedTab(this.selectedIndex);
120765
+ this.setFocusedTab(selectedTab.index);
120768
120766
  }
120769
120767
  else if (ev.key === "ArrowLeft" || ev.key === "ArrowRight") {
120770
120768
  let operator = undefined;
@@ -120777,48 +120775,46 @@ let EzTabselector$1 = class extends HTMLElement$1 {
120777
120775
  else {
120778
120776
  return;
120779
120777
  }
120780
- if (this.focusedIndex === undefined) {
120778
+ if (this._focusedIndex === undefined) {
120781
120779
  if (operator === false) {
120782
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) - 1).toString() : undefined;
120780
+ this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex - 1 : undefined;
120783
120781
  }
120784
120782
  else {
120785
- this.focusedIndex = this.selectedIndex !== undefined ? (parseInt(this.selectedIndex) + 1).toString() : undefined;
120783
+ this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex + 1 : undefined;
120786
120784
  }
120787
120785
  }
120788
120786
  else {
120789
120787
  if (operator === false) {
120790
- this.focusedIndex = (parseInt(this.focusedIndex) - 1).toString();
120788
+ this._focusedIndex = this._focusedIndex - 1;
120791
120789
  }
120792
120790
  else {
120793
- this.focusedIndex = (parseInt(this.focusedIndex) + 1).toString();
120791
+ this._focusedIndex = this._focusedIndex + 1;
120794
120792
  }
120795
120793
  }
120796
- if (parseInt(this.focusedIndex) < 0) {
120797
- this.focusedIndex = "0";
120794
+ if (this._focusedIndex < 0) {
120795
+ this._focusedIndex = 0;
120798
120796
  }
120799
- else if (parseInt(this.focusedIndex) > this._processedTabs.length - 1) {
120800
- this.focusedIndex = (this._processedTabs.length - 1).toString();
120797
+ else if (this._focusedIndex > this._processedTabs.length - 1) {
120798
+ this._focusedIndex = this._processedTabs.length - 1;
120801
120799
  }
120802
- this.setFocusedBtn(true, this.focusedIndex);
120803
- this.setFocusedTab(this.focusedIndex);
120804
- this.ezChange.emit(this.selectedTab);
120800
+ this.setFocusedBtn(true, this._focusedIndex);
120801
+ this.setFocusedTab(this._focusedIndex);
120805
120802
  }
120806
120803
  else if (ev.key === "Tab" || ev.key === "Escape") {
120807
- this.focusedIndex = undefined;
120808
- this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
120809
- this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
120804
+ const currentTab = this._processedTabs[this.selectedIndex];
120805
+ this._focusedIndex = undefined;
120806
+ this.handleTabClick(currentTab);
120810
120807
  ev.preventDefault();
120811
120808
  this.setFocusedTab(this.selectedIndex);
120812
120809
  }
120813
- // this.setFocusedTab();
120814
120810
  };
120815
120811
  }
120816
- handleTabClick(tab, index) {
120817
- this.selectedIndex = index.toString();
120818
- this.focusedIndex = undefined;
120819
- this.selectedTab = tab;
120820
- this.ezChange.emit(this.selectedTab);
120821
- this.setFocusedBtn(false, this.selectedIndex);
120812
+ handleTabClick(tab) {
120813
+ this.selectedIndex = tab.index;
120814
+ this._focusedIndex = undefined;
120815
+ this.selectedTab = tab.tabKey;
120816
+ this.ezChange.emit(tab);
120817
+ this.setFocusedBtn(false, tab.index);
120822
120818
  }
120823
120819
  componentWillRender() {
120824
120820
  if (!this._processedTabs) {
@@ -120826,16 +120822,16 @@ let EzTabselector$1 = class extends HTMLElement$1 {
120826
120822
  if (this.tabs) {
120827
120823
  this.tabs.split(",").forEach((label) => {
120828
120824
  label = label.trim();
120829
- this._processedTabs.push(new Tab(label, label));
120825
+ this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
120830
120826
  });
120831
120827
  }
120832
120828
  this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
120833
120829
  const tabKey = elem.getAttribute("tabKey");
120834
120830
  const label = elem.getAttribute("label");
120835
- const t = new Tab(label, tabKey);
120831
+ const t = { label, tabKey, index: this._processedTabs.length };
120836
120832
  const content = elem.firstChild;
120837
120833
  if (content) {
120838
- content.setAttribute("slot", "tab" + this._processedTabs.length);
120834
+ content.setAttribute("slot", "tab" + t.index);
120839
120835
  this._hostElem.appendChild(content);
120840
120836
  }
120841
120837
  this._processedTabs.push(t);
@@ -120934,23 +120930,17 @@ let EzTabselector$1 = class extends HTMLElement$1 {
120934
120930
  return (h(Host, null, h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index) => {
120935
120931
  const labelStyle = { "min-width": this.getTextWidth(tab.label) };
120936
120932
  const tabId = "tab" + index;
120937
- const isSelected = index === parseInt(this.selectedIndex) || (this.selectedTab && tab.tabKey === this.selectedTab);
120933
+ const isSelected = index === this.selectedIndex || (this.selectedTab && tab.tabKey === this.selectedTab);
120938
120934
  if (isSelected) {
120939
120935
  this.selectedTab = tab.tabKey;
120940
- this.selectedIndex = index.toString();
120936
+ this.selectedIndex = index;
120941
120937
  }
120942
- return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab.tabKey, index), style: labelStyle }, h("span", { class: "tab-label", title: tab.label }, tab.label), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
120938
+ return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle }, h("span", { class: "tab-label", title: tab.label }, tab.label), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
120943
120939
  })), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
120944
120940
  }
120945
120941
  get _hostElem() { return this; }
120946
120942
  static get style() { return ezTabselectorCss; }
120947
120943
  };
120948
- class Tab {
120949
- constructor(label, tabKey) {
120950
- this.label = label;
120951
- this.tabKey = tabKey;
120952
- }
120953
- }
120954
120944
 
120955
120945
  const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";
120956
120946
 
@@ -121996,7 +121986,7 @@ let GridConfig$1 = class extends HTMLElement$1 {
121996
121986
  }
121997
121987
  }
121998
121988
  render() {
121999
- return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: '0', onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação" ? "" : "hidden", dataSource: this._orderListItems, ezSelectable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
121989
+ return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação" ? "" : "hidden", dataSource: this._orderListItems, ezSelectable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
122000
121990
  }
122001
121991
  static get assetsDirs() { return ["../assets"]; }
122002
121992
  static get style() { return gridConfigCss; }
@@ -122113,7 +122103,7 @@ const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-nu
122113
122103
  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]}]);
122114
122104
  const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]);
122115
122105
  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"]}]);
122116
- const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
122106
+ const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
122117
122107
  const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538]}]);
122118
122108
  const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1]}]);
122119
122109
  const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}]);