@sankhyalabs/ezui 5.20.5 → 5.20.6

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.
@@ -67,9 +67,13 @@ const EzTabselector = class {
67
67
  this.selectedTab = undefined;
68
68
  this.tabs = undefined;
69
69
  }
70
- observeTabs(newValue) {
70
+ observeTabs(newValue, oldValue) {
71
71
  if (newValue && typeof newValue !== "string") {
72
72
  this._processedTabs = newValue;
73
+ return;
74
+ }
75
+ if (newValue !== oldValue) {
76
+ this.processesTabs();
73
77
  }
74
78
  }
75
79
  handleTabClick(tab) {
@@ -79,36 +83,37 @@ const EzTabselector = class {
79
83
  this.ezChange.emit(tab);
80
84
  this.setFocusedBtn(false, tab.index);
81
85
  }
82
- componentWillRender() {
83
- if (!this._processedTabs) {
84
- if (this.tabs) {
85
- if (Array.isArray(this.tabs)) {
86
- this._processedTabs = [...this.tabs];
87
- }
88
- else {
89
- this._processedTabs = [];
90
- this.tabs.split(",").forEach((label) => {
91
- label = label.trim();
92
- this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
93
- this.buildElementIdTab(this._processedTabs);
94
- });
95
- }
86
+ componentWillLoad() {
87
+ this.processesTabs();
88
+ }
89
+ processesTabs() {
90
+ if (this.tabs) {
91
+ if (Array.isArray(this.tabs)) {
92
+ this._processedTabs = [...this.tabs];
93
+ }
94
+ else {
95
+ this._processedTabs = [];
96
+ this.tabs.split(",").forEach((label) => {
97
+ label = label.trim();
98
+ this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
99
+ this.buildElementIdTab(this._processedTabs);
100
+ });
96
101
  }
97
- this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
98
- const tabKey = elem.getAttribute("tabKey");
99
- const label = elem.getAttribute("label");
100
- const leftIcon = elem.getAttribute("leftIcon");
101
- const rightIcon = elem.getAttribute("rightIcon");
102
- const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
103
- const content = elem.firstChild;
104
- if (content) {
105
- content.setAttribute("slot", "tab" + tab.index);
106
- this._hostElem.appendChild(content);
107
- }
108
- this._processedTabs.push(tab);
109
- this.buildElementIdTab(this._processedTabs);
110
- });
111
102
  }
103
+ this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
104
+ const tabKey = elem.getAttribute("tabKey");
105
+ const label = elem.getAttribute("label");
106
+ const leftIcon = elem.getAttribute("leftIcon");
107
+ const rightIcon = elem.getAttribute("rightIcon");
108
+ const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
109
+ const content = elem.firstChild;
110
+ if (content) {
111
+ content.setAttribute("slot", "tab" + tab.index);
112
+ this._hostElem.appendChild(content);
113
+ }
114
+ this._processedTabs.push(tab);
115
+ this.buildElementIdTab(this._processedTabs);
116
+ });
112
117
  }
113
118
  componentDidRender() {
114
119
  this.updateScroll();
@@ -58,9 +58,13 @@ export class EzTabselector {
58
58
  this.selectedTab = undefined;
59
59
  this.tabs = undefined;
60
60
  }
61
- observeTabs(newValue) {
61
+ observeTabs(newValue, oldValue) {
62
62
  if (newValue && typeof newValue !== "string") {
63
63
  this._processedTabs = newValue;
64
+ return;
65
+ }
66
+ if (newValue !== oldValue) {
67
+ this.processesTabs();
64
68
  }
65
69
  }
66
70
  handleTabClick(tab) {
@@ -70,36 +74,37 @@ export class EzTabselector {
70
74
  this.ezChange.emit(tab);
71
75
  this.setFocusedBtn(false, tab.index);
72
76
  }
73
- componentWillRender() {
74
- if (!this._processedTabs) {
75
- if (this.tabs) {
76
- if (Array.isArray(this.tabs)) {
77
- this._processedTabs = [...this.tabs];
78
- }
79
- else {
80
- this._processedTabs = [];
81
- this.tabs.split(",").forEach((label) => {
82
- label = label.trim();
83
- this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
84
- this.buildElementIdTab(this._processedTabs);
85
- });
86
- }
77
+ componentWillLoad() {
78
+ this.processesTabs();
79
+ }
80
+ processesTabs() {
81
+ if (this.tabs) {
82
+ if (Array.isArray(this.tabs)) {
83
+ this._processedTabs = [...this.tabs];
84
+ }
85
+ else {
86
+ this._processedTabs = [];
87
+ this.tabs.split(",").forEach((label) => {
88
+ label = label.trim();
89
+ this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
90
+ this.buildElementIdTab(this._processedTabs);
91
+ });
87
92
  }
88
- this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
89
- const tabKey = elem.getAttribute("tabKey");
90
- const label = elem.getAttribute("label");
91
- const leftIcon = elem.getAttribute("leftIcon");
92
- const rightIcon = elem.getAttribute("rightIcon");
93
- const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
94
- const content = elem.firstChild;
95
- if (content) {
96
- content.setAttribute("slot", "tab" + tab.index);
97
- this._hostElem.appendChild(content);
98
- }
99
- this._processedTabs.push(tab);
100
- this.buildElementIdTab(this._processedTabs);
101
- });
102
93
  }
94
+ this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
95
+ const tabKey = elem.getAttribute("tabKey");
96
+ const label = elem.getAttribute("label");
97
+ const leftIcon = elem.getAttribute("leftIcon");
98
+ const rightIcon = elem.getAttribute("rightIcon");
99
+ const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
100
+ const content = elem.firstChild;
101
+ if (content) {
102
+ content.setAttribute("slot", "tab" + tab.index);
103
+ this._hostElem.appendChild(content);
104
+ }
105
+ this._processedTabs.push(tab);
106
+ this.buildElementIdTab(this._processedTabs);
107
+ });
103
108
  }
104
109
  componentDidRender() {
105
110
  this.updateScroll();
@@ -128671,9 +128671,13 @@ const EzTabselector$1 = class extends HTMLElement$1 {
128671
128671
  this.selectedTab = undefined;
128672
128672
  this.tabs = undefined;
128673
128673
  }
128674
- observeTabs(newValue) {
128674
+ observeTabs(newValue, oldValue) {
128675
128675
  if (newValue && typeof newValue !== "string") {
128676
128676
  this._processedTabs = newValue;
128677
+ return;
128678
+ }
128679
+ if (newValue !== oldValue) {
128680
+ this.processesTabs();
128677
128681
  }
128678
128682
  }
128679
128683
  handleTabClick(tab) {
@@ -128683,36 +128687,37 @@ const EzTabselector$1 = class extends HTMLElement$1 {
128683
128687
  this.ezChange.emit(tab);
128684
128688
  this.setFocusedBtn(false, tab.index);
128685
128689
  }
128686
- componentWillRender() {
128687
- if (!this._processedTabs) {
128688
- if (this.tabs) {
128689
- if (Array.isArray(this.tabs)) {
128690
- this._processedTabs = [...this.tabs];
128691
- }
128692
- else {
128693
- this._processedTabs = [];
128694
- this.tabs.split(",").forEach((label) => {
128695
- label = label.trim();
128696
- this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
128697
- this.buildElementIdTab(this._processedTabs);
128698
- });
128699
- }
128690
+ componentWillLoad() {
128691
+ this.processesTabs();
128692
+ }
128693
+ processesTabs() {
128694
+ if (this.tabs) {
128695
+ if (Array.isArray(this.tabs)) {
128696
+ this._processedTabs = [...this.tabs];
128697
+ }
128698
+ else {
128699
+ this._processedTabs = [];
128700
+ this.tabs.split(",").forEach((label) => {
128701
+ label = label.trim();
128702
+ this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
128703
+ this.buildElementIdTab(this._processedTabs);
128704
+ });
128700
128705
  }
128701
- this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
128702
- const tabKey = elem.getAttribute("tabKey");
128703
- const label = elem.getAttribute("label");
128704
- const leftIcon = elem.getAttribute("leftIcon");
128705
- const rightIcon = elem.getAttribute("rightIcon");
128706
- const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
128707
- const content = elem.firstChild;
128708
- if (content) {
128709
- content.setAttribute("slot", "tab" + tab.index);
128710
- this._hostElem.appendChild(content);
128711
- }
128712
- this._processedTabs.push(tab);
128713
- this.buildElementIdTab(this._processedTabs);
128714
- });
128715
128706
  }
128707
+ this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
128708
+ const tabKey = elem.getAttribute("tabKey");
128709
+ const label = elem.getAttribute("label");
128710
+ const leftIcon = elem.getAttribute("leftIcon");
128711
+ const rightIcon = elem.getAttribute("rightIcon");
128712
+ const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
128713
+ const content = elem.firstChild;
128714
+ if (content) {
128715
+ content.setAttribute("slot", "tab" + tab.index);
128716
+ this._hostElem.appendChild(content);
128717
+ }
128718
+ this._processedTabs.push(tab);
128719
+ this.buildElementIdTab(this._processedTabs);
128720
+ });
128716
128721
  }
128717
128722
  componentDidRender() {
128718
128723
  this.updateScroll();
@@ -63,9 +63,13 @@ const EzTabselector = class {
63
63
  this.selectedTab = undefined;
64
64
  this.tabs = undefined;
65
65
  }
66
- observeTabs(newValue) {
66
+ observeTabs(newValue, oldValue) {
67
67
  if (newValue && typeof newValue !== "string") {
68
68
  this._processedTabs = newValue;
69
+ return;
70
+ }
71
+ if (newValue !== oldValue) {
72
+ this.processesTabs();
69
73
  }
70
74
  }
71
75
  handleTabClick(tab) {
@@ -75,36 +79,37 @@ const EzTabselector = class {
75
79
  this.ezChange.emit(tab);
76
80
  this.setFocusedBtn(false, tab.index);
77
81
  }
78
- componentWillRender() {
79
- if (!this._processedTabs) {
80
- if (this.tabs) {
81
- if (Array.isArray(this.tabs)) {
82
- this._processedTabs = [...this.tabs];
83
- }
84
- else {
85
- this._processedTabs = [];
86
- this.tabs.split(",").forEach((label) => {
87
- label = label.trim();
88
- this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
89
- this.buildElementIdTab(this._processedTabs);
90
- });
91
- }
82
+ componentWillLoad() {
83
+ this.processesTabs();
84
+ }
85
+ processesTabs() {
86
+ if (this.tabs) {
87
+ if (Array.isArray(this.tabs)) {
88
+ this._processedTabs = [...this.tabs];
89
+ }
90
+ else {
91
+ this._processedTabs = [];
92
+ this.tabs.split(",").forEach((label) => {
93
+ label = label.trim();
94
+ this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
95
+ this.buildElementIdTab(this._processedTabs);
96
+ });
92
97
  }
93
- this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
94
- const tabKey = elem.getAttribute("tabKey");
95
- const label = elem.getAttribute("label");
96
- const leftIcon = elem.getAttribute("leftIcon");
97
- const rightIcon = elem.getAttribute("rightIcon");
98
- const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
99
- const content = elem.firstChild;
100
- if (content) {
101
- content.setAttribute("slot", "tab" + tab.index);
102
- this._hostElem.appendChild(content);
103
- }
104
- this._processedTabs.push(tab);
105
- this.buildElementIdTab(this._processedTabs);
106
- });
107
98
  }
99
+ this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
100
+ const tabKey = elem.getAttribute("tabKey");
101
+ const label = elem.getAttribute("label");
102
+ const leftIcon = elem.getAttribute("leftIcon");
103
+ const rightIcon = elem.getAttribute("rightIcon");
104
+ const tab = { label, tabKey, leftIcon, rightIcon, index: this._processedTabs.length };
105
+ const content = elem.firstChild;
106
+ if (content) {
107
+ content.setAttribute("slot", "tab" + tab.index);
108
+ this._hostElem.appendChild(content);
109
+ }
110
+ this._processedTabs.push(tab);
111
+ this.buildElementIdTab(this._processedTabs);
112
+ });
108
113
  }
109
114
  componentDidRender() {
110
115
  this.updateScroll();
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-e318d280.js";export{s as setNonce}from"./p-e318d280.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o(JSON.parse('[["p-e7f41f63",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"setFocus":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["p-f55d75e7",[[1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32],"disableItem":[64],"openGuideNavidator":[64],"enableItem":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"selectGuide":[64],"getParent":[64]}]]],["p-59bcb27c",[[1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540]}]]],["p-3e7cc8a4",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"showActions":[64],"isOpened":[64]}]]],["p-cd19a6f8",[[1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]]],["p-7319c253",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040],"show":[64]},[[8,"keydown","handleKeyDown"]]]]],["p-a01068e1",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["p-60ba28ea",[[1,"ez-alert",{"alertType":[513,"alert-type"]}]]],["p-c49dbf23",[[1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"hasSlot":[32]}]]],["p-f4208819",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"],"setFocus":[64],"setBlur":[64]}]]],["p-ccb4ccd9",[[1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]]],["p-d51aa09b",[[0,"ez-application"]]],["p-47afb974",[[1,"ez-card-item",{"item":[16]}]]],["p-7525e604",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["p-62304715",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]]],["p-99692afa",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["p-b11f035c",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["p-5d6f2550",[[0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]]],["p-76d16a24",[[0,"ez-split-item"]]],["p-d20ed286",[[0,"ez-split-panel",{"direction":[1]}]]],["p-fbca293f",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["p-9b347f04",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["p-74049254",[[1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]}]]],["p-83885b21",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["p-81cd05c8",[[2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32],"clearFilteredOptions":[64]}]]],["p-871c1a07",[[1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["p-5cef0264",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"fitHorizontal":[64],"hide":[64]},[[11,"scroll","scrollListener"]]]]],["p-52dd8b4c",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-fb21d72f",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-e8f88361",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-028f264f",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-12526044",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-7fd54841",[[2,"ez-form-view",{"fields":[16],"showUp":[64]}]]],["p-2da09f70",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64]}]]],["p-391de0e4",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"appendTextToSelection":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-0b902469",[[1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["p-245a44ed",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["p-d81917fd",[[1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32],"selectItem":[64],"openItem":[64],"disableItem":[64],"enableItem":[64],"addChild":[64],"applyFilter":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"getParent":[64]},[[2,"keydown","onKeyDownListener"]]],[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]],[1,"ez-sidebar-button"]]],["p-d3b5228e",[[1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64],"removeSelection":[64]}]]],["p-af285e68",[[1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]},[[11,"scroll","scrollListener"]]]]],["p-f8653522",[[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],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64],"getValueAsync":[64]}]]],["p-87e85160",[[0,"multi-selection-box-message",{"message":[1]}],[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"setValue":[64],"endSearch":[64]}]]],["p-95426f93",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4],"getMode":[64],"setFocus":[64]}]]],["p-b6867f19",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["p-32b4163f",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]},[[2,"click","clickListener"]]]]],["p-8252d9b5",[[2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"validate":[64]}]]],["p-a42fe2ce",[[0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32],"hide":[64],"show":[64]}]]]]'),e)));
1
+ import{p as e,b as o}from"./p-e318d280.js";export{s as setNonce}from"./p-e318d280.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o(JSON.parse('[["p-e7f41f63",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"setFocus":[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["p-f55d75e7",[[1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32],"disableItem":[64],"openGuideNavidator":[64],"enableItem":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"selectGuide":[64],"getParent":[64]}]]],["p-59bcb27c",[[1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540]}]]],["p-3e7cc8a4",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"showActions":[64],"isOpened":[64]}]]],["p-cd19a6f8",[[1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]]],["p-7319c253",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040],"show":[64]},[[8,"keydown","handleKeyDown"]]]]],["p-a01068e1",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["p-60ba28ea",[[1,"ez-alert",{"alertType":[513,"alert-type"]}]]],["p-c49dbf23",[[1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"hasSlot":[32]}]]],["p-f4208819",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"],"setFocus":[64],"setBlur":[64]}]]],["p-ccb4ccd9",[[1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]]],["p-d51aa09b",[[0,"ez-application"]]],["p-47afb974",[[1,"ez-card-item",{"item":[16]}]]],["p-7525e604",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["p-62304715",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]]],["p-99692afa",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["p-b11f035c",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["p-5d6f2550",[[0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]]],["p-76d16a24",[[0,"ez-split-item"]]],["p-d20ed286",[[0,"ez-split-panel",{"direction":[1]}]]],["p-fbca293f",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["p-9b347f04",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["p-74049254",[[1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]}]]],["p-e95ba8d8",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["p-81cd05c8",[[2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32],"clearFilteredOptions":[64]}]]],["p-871c1a07",[[1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["p-5cef0264",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"fitHorizontal":[64],"hide":[64]},[[11,"scroll","scrollListener"]]]]],["p-52dd8b4c",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-fb21d72f",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-e8f88361",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-028f264f",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-12526044",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-7fd54841",[[2,"ez-form-view",{"fields":[16],"showUp":[64]}]]],["p-2da09f70",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64]}]]],["p-391de0e4",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"appendTextToSelection":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-0b902469",[[1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["p-245a44ed",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["p-d81917fd",[[1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32],"selectItem":[64],"openItem":[64],"disableItem":[64],"enableItem":[64],"addChild":[64],"applyFilter":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"getParent":[64]},[[2,"keydown","onKeyDownListener"]]],[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]],[1,"ez-sidebar-button"]]],["p-d3b5228e",[[1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64],"removeSelection":[64]}]]],["p-af285e68",[[1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]},[[11,"scroll","scrollListener"]]]]],["p-f8653522",[[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],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64],"getValueAsync":[64]}]]],["p-87e85160",[[0,"multi-selection-box-message",{"message":[1]}],[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"setValue":[64],"endSearch":[64]}]]],["p-95426f93",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4],"getMode":[64],"setFocus":[64]}]]],["p-b6867f19",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["p-32b4163f",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]},[[2,"click","clickListener"]]]]],["p-8252d9b5",[[2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"validate":[64]}]]],["p-a42fe2ce",[[0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32],"hide":[64],"show":[64]}]]]]'),e)));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e,g as a}from"./p-e318d280.js";import{ElementIDUtils as o,StringUtils as r}from"@sankhyalabs/core";const n=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}},this._processedTabs=void 0,this.selectedIndex=void 0,this.selectedTab=void 0,this.tabs=void 0}observeTabs(t,i){t&&"string"!=typeof t?this._processedTabs=t:t!==i&&this.processesTabs()}handleTabClick(t){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillLoad(){this.processesTabs()}processesTabs(){this.tabs&&(Array.isArray(this.tabs)?this._processedTabs=[...this.tabs]:(this._processedTabs=[],this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length}),this.buildElementIdTab(this._processedTabs)})))),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,leftIcon:t.getAttribute("leftIcon"),rightIcon:t.getAttribute("rightIcon"),index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s),this.buildElementIdTab(this._processedTabs)}))}componentDidRender(){this.updateScroll()}componentDidLoad(){o.addIDInfo(this._hostElem,"itemsSelector"),this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((t=>{var i;const s=null===(i=t.querySelector("span.tab-label"))||void 0===i?void 0:i.innerText,e={id:`${r.toCamelCase(s)}`};o.addIDInfo(t,"itemSelector",e)}))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","middle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}buildElementIdTab(t){t.forEach((t=>{if(!t.hasOwnProperty(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)){const i=`${this._hostElem.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_${r.toCamelCase(t.tabKey)}`;t[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=i}}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e="tab"+i,a=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return a&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:e,name:"tab-button",class:"tab"+(a?" is-active":""),onClick:()=>this.handleTabClick(t)},t.leftIcon&&s("ez-icon",{iconName:t.leftIcon,class:"left-icon"}),s("span",{class:"tab-label",title:t.label},t.label),t.rightIcon&&s("ez-icon",{iconName:t.rightIcon,class:"right-icon"}),s("slot",{name:e,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}static get watchers(){return{tabs:["observeTabs"]}}};n.style='@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;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Roboto");font-size:var(--title--small, 14px);flex-shrink:0}.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}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}';export{n as ez_tabselector}
@@ -26,9 +26,10 @@ export declare class EzTabselector {
26
26
  * Emitido quando acontece a alteração de valor do componente.
27
27
  */
28
28
  ezChange: EventEmitter<Tab>;
29
- observeTabs(newValue: any): void;
29
+ observeTabs(newValue: string | Array<Tab>, oldValue: string | Array<Tab>): void;
30
30
  handleTabClick(tab: Tab): void;
31
- componentWillRender(): void;
31
+ componentWillLoad(): void;
32
+ private processesTabs;
32
33
  componentDidRender(): void;
33
34
  componentDidLoad(): void;
34
35
  handleSlotChange(ev: Event): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "5.20.5",
3
+ "version": "5.20.6",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s,H as e,g as a}from"./p-e318d280.js";import{ElementIDUtils as o,StringUtils as r}from"@sankhyalabs/core";const n=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}},this._processedTabs=void 0,this.selectedIndex=void 0,this.selectedTab=void 0,this.tabs=void 0}observeTabs(t){t&&"string"!=typeof t&&(this._processedTabs=t)}handleTabClick(t){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillRender(){this._processedTabs||(this.tabs&&(Array.isArray(this.tabs)?this._processedTabs=[...this.tabs]:(this._processedTabs=[],this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length}),this.buildElementIdTab(this._processedTabs)})))),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,leftIcon:t.getAttribute("leftIcon"),rightIcon:t.getAttribute("rightIcon"),index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s),this.buildElementIdTab(this._processedTabs)})))}componentDidRender(){this.updateScroll()}componentDidLoad(){o.addIDInfo(this._hostElem,"itemsSelector"),this._hostElem.shadowRoot.querySelectorAll('button[name="tab-button"]').forEach((t=>{var i;const s=null===(i=t.querySelector("span.tab-label"))||void 0===i?void 0:i.innerText,e={id:`${r.toCamelCase(s)}`};o.addIDInfo(t,"itemSelector",e)}))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","middle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}buildElementIdTab(t){t.forEach((t=>{if(!t.hasOwnProperty(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)){const i=`${this._hostElem.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_${r.toCamelCase(t.tabKey)}`;t[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=i}}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e="tab"+i,a=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return a&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:e,name:"tab-button",class:"tab"+(a?" is-active":""),onClick:()=>this.handleTabClick(t)},t.leftIcon&&s("ez-icon",{iconName:t.leftIcon,class:"left-icon"}),s("span",{class:"tab-label",title:t.label},t.label),t.rightIcon&&s("ez-icon",{iconName:t.rightIcon,class:"right-icon"}),s("slot",{name:e,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}static get watchers(){return{tabs:["observeTabs"]}}};n.style='@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;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Roboto");font-size:var(--title--small, 14px);flex-shrink:0}.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}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}';export{n as ez_tabselector}