@sankhyalabs/ezui 4.17.0 → 4.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-grid.cjs.entry.js +85 -21
- package/dist/cjs/ez-popover.cjs.entry.js +4 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +72 -12
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +11 -7
- package/dist/collection/components/ez-grid/ez-grid.js +10 -4
- package/dist/collection/components/ez-popover/ez-popover.js +4 -6
- package/dist/custom-elements/index.js +89 -27
- package/dist/esm/ez-grid.entry.js +85 -21
- package/dist/esm/ez-popover.entry.js +4 -6
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-6ede8b63.entry.js +1 -0
- package/dist/ezui/{p-37b4aa8b.entry.js → p-9334e296.entry.js} +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +1 -1
- package/dist/types/components.d.ts +3 -3
- package/package.json +1 -1
- package/dist/ezui/p-62ebbd06.entry.js +0 -1
|
@@ -119096,8 +119096,8 @@ class EzGridCustomHeader {
|
|
|
119096
119096
|
</div>
|
|
119097
119097
|
<div id='ez-header-container' class='ez-flex ez-flex--justify-between ag-header-cell-text'>
|
|
119098
119098
|
<span class='ag-header-cell-text'>${this.params.displayName}</span>
|
|
119099
|
-
<i id='ez-grid-sort-icon-
|
|
119100
|
-
<i id='ez-grid-sort-icon-
|
|
119099
|
+
<i id='ez-grid-sort-icon-down' class='ez-icon-arrow_downward' style='display: none;margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
|
|
119100
|
+
<i id='ez-grid-sort-icon-up' class='ez-icon-arrow_downward' style='display: none; transform: rotate(180deg);margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
|
|
119101
119101
|
</div>
|
|
119102
119102
|
`;
|
|
119103
119103
|
this.configMenuClick();
|
|
@@ -119108,6 +119108,7 @@ class EzGridCustomHeader {
|
|
|
119108
119108
|
refresh(agParams) {
|
|
119109
119109
|
this.params = agParams;
|
|
119110
119110
|
this.configFilterButton();
|
|
119111
|
+
this.configSortIcon();
|
|
119111
119112
|
}
|
|
119112
119113
|
configFilterButton() {
|
|
119113
119114
|
this.filterButton = this.element.querySelector('#ez-grid-filter-icon');
|
|
@@ -119115,7 +119116,7 @@ class EzGridCustomHeader {
|
|
|
119115
119116
|
this.onFilterButtonClickListener = this.params.showColumnFilter.bind(this);
|
|
119116
119117
|
this.filterButton.addEventListener('click', this.onFilterButtonClickListener);
|
|
119117
119118
|
}
|
|
119118
|
-
|
|
119119
|
+
configSortIcon() {
|
|
119119
119120
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
119120
119121
|
this.sortUpIcon.style.display = this.params.column.isSortAscending() ? 'flex' : 'none';
|
|
119121
119122
|
}
|
|
@@ -119123,17 +119124,20 @@ class EzGridCustomHeader {
|
|
|
119123
119124
|
if (this.params.enableSorting) {
|
|
119124
119125
|
this.sortUpIcon = this.element.querySelector('#ez-grid-sort-icon-up');
|
|
119125
119126
|
this.sortDownIcon = this.element.querySelector('#ez-grid-sort-icon-down');
|
|
119126
|
-
this.onSortChangedListener = this.
|
|
119127
|
+
this.onSortChangedListener = this.configSortIcon.bind(this);
|
|
119127
119128
|
this.params.column.addEventListener('sortChanged', this.onSortChangedListener);
|
|
119129
|
+
this.configSortIcon();
|
|
119128
119130
|
}
|
|
119129
119131
|
}
|
|
119130
119132
|
onSortClick(event) {
|
|
119131
119133
|
this.params.progressSort(event.shiftKey);
|
|
119132
119134
|
}
|
|
119133
119135
|
configSortClick() {
|
|
119134
|
-
|
|
119135
|
-
|
|
119136
|
-
|
|
119136
|
+
if (this.params.column.getColDef().sortable) {
|
|
119137
|
+
this.headerContainer = this.element.querySelector('#ez-header-container');
|
|
119138
|
+
this.onSortClickListener = this.onSortClick.bind(this);
|
|
119139
|
+
this.headerContainer.addEventListener('click', this.onSortClickListener);
|
|
119140
|
+
}
|
|
119137
119141
|
}
|
|
119138
119142
|
onMenuClick() {
|
|
119139
119143
|
this.params.showColumnMenu(this.menuButton);
|
|
@@ -119214,15 +119218,7 @@ class AgGridController {
|
|
|
119214
119218
|
blockLoadDebounceMillis: this.BLOCK_LOAD_DEBOUNCE,
|
|
119215
119219
|
navigateToNextCell: this.navigateToNextCell.bind(this),
|
|
119216
119220
|
getRowNodeId: this._dataUnit ? (params) => typeof params === "string" ? params : params[this._idAttribName] : undefined,
|
|
119217
|
-
getMainMenuItems: (params) =>
|
|
119218
|
-
const column = params.column;
|
|
119219
|
-
const items = [column.isPinned() ? "clearPinned" : "pinLeft", "separator"];
|
|
119220
|
-
this._menuItems.forEach(m => items.push({
|
|
119221
|
-
name: m.label,
|
|
119222
|
-
action: () => m.action(column.getColId(), m.name)
|
|
119223
|
-
}));
|
|
119224
|
-
return items;
|
|
119225
|
-
},
|
|
119221
|
+
getMainMenuItems: (params) => this.buildMenuItemOptions(params),
|
|
119226
119222
|
getRowHeight: this.getRowHeight.bind(this),
|
|
119227
119223
|
defaultColDef: {
|
|
119228
119224
|
headerClass: "ez-grid__cell-header",
|
|
@@ -119256,6 +119252,69 @@ class AgGridController {
|
|
|
119256
119252
|
this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
|
|
119257
119253
|
}
|
|
119258
119254
|
}
|
|
119255
|
+
buildMenuItemOptions(params) {
|
|
119256
|
+
const col = params.column;
|
|
119257
|
+
const items = [];
|
|
119258
|
+
if (col.getColDef().sortable) {
|
|
119259
|
+
items.push(this.buildMenuItemOptionSort(params, 'asc'));
|
|
119260
|
+
items.push(this.buildMenuItemOptionSort(params, 'desc'));
|
|
119261
|
+
}
|
|
119262
|
+
/*
|
|
119263
|
+
TODO: Adicionar quando filtro de colunar estiver finalizado.
|
|
119264
|
+
items.push(this.buildMenuItemFilterColumn(params));
|
|
119265
|
+
*/
|
|
119266
|
+
this._menuItems.forEach(m => items.push({
|
|
119267
|
+
icon: m.icon,
|
|
119268
|
+
name: m.label,
|
|
119269
|
+
action: () => m.action(params),
|
|
119270
|
+
}));
|
|
119271
|
+
items.push(this.buildMenuItemOptionPin(params));
|
|
119272
|
+
return items;
|
|
119273
|
+
}
|
|
119274
|
+
buildMenuItemOptionSort(params, sortOrder) {
|
|
119275
|
+
return {
|
|
119276
|
+
icon: `<div style="${sortOrder === "asc" ? 'transform: rotate(180deg); position: relative; top: -4px;' : ''}"><i class='ez-icon-arrow_downward'></i></div>`,
|
|
119277
|
+
name: sortOrder === "asc" ? "Ordenar Ascendente" : "Ordenar Descendente",
|
|
119278
|
+
action: () => this.sortDataByColumn(params, sortOrder)
|
|
119279
|
+
};
|
|
119280
|
+
}
|
|
119281
|
+
/*
|
|
119282
|
+
TODO: Voltar função quando for implementado o filtro de coluna
|
|
119283
|
+
private buildMenuItemFilterColumn( _params: GetMainMenuItemsParams): MenuItemDef{
|
|
119284
|
+
return {
|
|
119285
|
+
icon: `<i class='ez-icon-filter'></i>`,
|
|
119286
|
+
name: "Filtrar",
|
|
119287
|
+
action: () => window.alert("Abrir popover de filtro")
|
|
119288
|
+
}
|
|
119289
|
+
}*/
|
|
119290
|
+
buildMenuItemOptionPin(params) {
|
|
119291
|
+
const { column, columnApi } = params;
|
|
119292
|
+
const isPinned = params.column.isPinned();
|
|
119293
|
+
return {
|
|
119294
|
+
icon: `<i class='ez-icon-${isPinned ? 'un-pin' : 'push-pin'}'></i>`,
|
|
119295
|
+
name: isPinned ? "Desafixar coluna" : "Fixar coluna",
|
|
119296
|
+
action: () => {
|
|
119297
|
+
columnApi.applyColumnState({
|
|
119298
|
+
state: [{ colId: column.getColId(), pinned: column.isPinned() ? null : 'left' }],
|
|
119299
|
+
});
|
|
119300
|
+
}
|
|
119301
|
+
};
|
|
119302
|
+
}
|
|
119303
|
+
sortDataByColumn(params, order) {
|
|
119304
|
+
const col = params.column;
|
|
119305
|
+
const colApi = params.columnApi;
|
|
119306
|
+
if (col.getSort() === order) {
|
|
119307
|
+
colApi.applyColumnState({
|
|
119308
|
+
defaultState: { sort: null },
|
|
119309
|
+
});
|
|
119310
|
+
}
|
|
119311
|
+
else {
|
|
119312
|
+
colApi.applyColumnState({
|
|
119313
|
+
state: [{ colId: col.getColId(), sort: order }],
|
|
119314
|
+
defaultState: { sort: null },
|
|
119315
|
+
});
|
|
119316
|
+
}
|
|
119317
|
+
}
|
|
119259
119318
|
getRowHeight() {
|
|
119260
119319
|
return this.DEFAULT_ROW_HEIGHT;
|
|
119261
119320
|
}
|
|
@@ -119576,7 +119635,10 @@ class AgGridController {
|
|
|
119576
119635
|
return this._gridOptions.api.getSelectedRows();
|
|
119577
119636
|
}
|
|
119578
119637
|
addColumnMenuItem(item) {
|
|
119579
|
-
this._menuItems.
|
|
119638
|
+
const itemsNames = this._menuItems.map(i => i.name);
|
|
119639
|
+
if (!itemsNames.includes(item.name)) {
|
|
119640
|
+
this._menuItems.push(item);
|
|
119641
|
+
}
|
|
119580
119642
|
}
|
|
119581
119643
|
quickFilter(term) {
|
|
119582
119644
|
if (term) {
|
|
@@ -119598,10 +119660,12 @@ class AgGridController {
|
|
|
119598
119660
|
(_a = this._gridOptions.api.getDisplayedRowAtIndex(index)) === null || _a === void 0 ? void 0 : _a.setSelected(true);
|
|
119599
119661
|
}
|
|
119600
119662
|
hasFilterColumn(_columnName) {
|
|
119601
|
-
return false;
|
|
119663
|
+
return false; //TODO: substituir pelo state dos filtros de colunas
|
|
119602
119664
|
}
|
|
119603
119665
|
showColumnFilter() {
|
|
119604
|
-
|
|
119666
|
+
/*
|
|
119667
|
+
TODO: Implementar chamada para apresentar filtro de coluna na grid
|
|
119668
|
+
*/
|
|
119605
119669
|
}
|
|
119606
119670
|
buildColDef(source) {
|
|
119607
119671
|
var _a, _b, _c;
|
|
@@ -119843,8 +119907,8 @@ const EzGrid = class {
|
|
|
119843
119907
|
/**
|
|
119844
119908
|
* Adiciona item de menu nas colunas.
|
|
119845
119909
|
*/
|
|
119846
|
-
async addColumnMenuItem(label, name, action) {
|
|
119847
|
-
this._gridController.addColumnMenuItem({ label, name, action });
|
|
119910
|
+
async addColumnMenuItem(label, name, action, icon) {
|
|
119911
|
+
this._gridController.addColumnMenuItem({ label, name, action, icon });
|
|
119848
119912
|
}
|
|
119849
119913
|
/**
|
|
119850
119914
|
* Aplica o estado das colunas.
|
|
@@ -21,9 +21,13 @@ const EzPopover = class {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
const eventPath = (eventOrigin === null || eventOrigin === void 0 ? void 0 : eventOrigin.composedPath()) || [];
|
|
24
25
|
for (var i = 0; i < innerContainers.length; i++) {
|
|
25
26
|
let _container = innerContainers[i];
|
|
26
27
|
if (_container != undefined) {
|
|
28
|
+
if (eventPath.includes(_container)) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
27
31
|
if (_container.contains(node)) {
|
|
28
32
|
return true;
|
|
29
33
|
}
|
|
@@ -37,12 +41,6 @@ const EzPopover = class {
|
|
|
37
41
|
if (!_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node)) {
|
|
38
42
|
return true;
|
|
39
43
|
}
|
|
40
|
-
const nodeShadowRoot = node.getRootNode();
|
|
41
|
-
if (nodeShadowRoot instanceof ShadowRoot) {
|
|
42
|
-
if (eventOrigin.composedPath().includes(nodeShadowRoot.host)) {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
return false;
|
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-bfc7b8ca.js";export{s as setNonce}from"./p-bfc7b8ca.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-2756003d",[[1,"ez-guide-navigator",{open:[1540],selectedId:[1537,"selected-id"],items:[16],tooltipResolver:[16],filterText:[32],disableItem:[64],enableItem:[64],updateItem:[64],getItem:[64],getCurrentPath:[64],selectGuide:[64],getParent:[64]}]]],["p-dc03c30f",[[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],isOpened:[64]}]]],["p-b01e05a1",[[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-816a3218",[[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]}]]],["p-
|
|
1
|
+
import{p as e,b as o}from"./p-bfc7b8ca.js";export{s as setNonce}from"./p-bfc7b8ca.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-2756003d",[[1,"ez-guide-navigator",{open:[1540],selectedId:[1537,"selected-id"],items:[16],tooltipResolver:[16],filterText:[32],disableItem:[64],enableItem:[64],updateItem:[64],getItem:[64],getCurrentPath:[64],selectGuide:[64],getParent:[64]}]]],["p-dc03c30f",[[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],isOpened:[64]}]]],["p-b01e05a1",[[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-816a3218",[[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]}]]],["p-9334e296",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],_paginationChangedByKeyboard:[32],_showSelectionCounter:[32],_isAllSelection:[32],_currentPageSelected:[32],_selectionCount:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["p-f71f0aa2",[[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-997b2df9",[[1,"ez-alert",{alertType:[513,"alert-type"]}]]],["p-6adf3791",[[1,"ez-badge",{size:[513],label:[513],iconLeft:[513,"icon-left"],iconRight:[513,"icon-right"],position:[1040],hasSlot:[32]}]]],["p-d892dc4f",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-2f80d68c",[[1,"ez-file-item",{canRemove:[4,"can-remove"],fileName:[1,"file-name"],iconName:[1,"icon-name"],fileSize:[2,"file-size"],progress:[2]}]]],["p-b2056805",[[1,"ez-list",{dataSource:[1040],listMode:[1,"list-mode"],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],hoverFeedback:[1028,"hover-feedback"],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-e8e7ec07",[[0,"ez-application"]]],["p-848bc350",[[1,"ez-card-item",{item:[16]}]]],["p-1ac06223",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-5110b212",[[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-6ede8b63",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],overlayType:[513,"overlay-type"],updatePosition:[64],show:[64],hide:[64]}]]],["p-04a52868",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[516,"use-header"],heightMode:[513,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-6e453307",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-672c1fba",[[0,"ez-skeleton",{count:[2],variant:[1],width:[1],height:[1],marginBottom:[1,"margin-bottom"],animation:[1]}]]],["p-0c2187a1",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-6d794472",[[0,"ez-view-stack",{show:[64],getSelectedIndex:[64]}]]],["p-41e82662",[[1,"ez-dropdown",{items:[1040],value:[1040],itemBuilder:[16]}]]],["p-fc71f135",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32]}]]],["p-c00e734a",[[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"],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-64fcb7e7",[[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-5a01fb34",[[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"],setFocus:[64],setBlur:[64],isInvalid:[64],clearValue:[64]}]]],["p-3173d988",[[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]}]]],["p-7cce14cd",[[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]}]]],["p-d96793f1",[[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-c0f7917c",[[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]}]]],["p-6f11ddf8",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],errorMessage:[1537,"error-message"],rows:[1538],canShowError:[516,"can-show-error"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-10370913",[[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-a4907f2a",[[1,"ez-text-edit",{value:[1],styled:[16],_newValue:[32],applyFocusSelect:[64]}]]],["p-afea6e50",[[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressSearch:[4,"suppress-search"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],mode:[513],_preSelection:[32],_visibleOptions:[32],_startLoading:[32],_showLoading:[32],_criteria:[32],setFocus:[64],setBlur:[64],isInvalid:[64],clearValue:[64]}]]],["p-b945133d",[[1,"ez-check",{label:[513],value:[1540],enabled:[1540],indeterminate:[1540],mode:[513],compact:[4],getMode:[64],setFocus:[64]}]]],["p-967758ac",[[2,"ez-form-view",{fields:[16],showUp:[64]}]]],["p-4ebb1d15",[[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]}],[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-994c4934",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-1a902d0e",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-9518ef88",[[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-6629e5c5",[[2,"ez-form",{dataUnit:[1040],config:[16],recordsValidator:[16],validate:[64]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as o,H as s,g as e}from"./p-bfc7b8ca.js";import{FloatingManager as r}from"@sankhyalabs/core";const h=class{constructor(o){t(this,o),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this._bodyOverflow="",this.innerClickTest=(t,i,o)=>{const s=[t];this.innerElement&&("string"==typeof this.innerElement?s.push(document.querySelector(`#${this.innerElement}`)):this.innerElement.forEach((t=>{s.push(document.querySelector(`#${t}`))})));const e=(null==o?void 0:o.composedPath())||[];for(var r=0;r<s.length;r++){let t=s[r];if(null!=t){if(e.includes(t))return!0;if(t.contains(i))return!0;if(o&&"nodeType"in(null==o?void 0:o.target)&&t.contains(o.target))return!0;if(t.shadowRoot&&t.shadowRoot.contains(i))return!0;if(t=this._host,t.lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))return!0}}return!1},this.backClickListener=()=>{this.ezVisibilityChange.emit(!1)},this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content",this.opened=void 0,this.innerElement=void 0,this.overlayType="light"}observeOpened(t,i){t!=i&&(i?this.hide():this.show(),this.ezVisibilityChange.emit(t))}observeConfig(){this.manageOverflow()}manageOverflow(){this.opened&&(this._bodyOverflow=window.document.body.style.overflow),window.document.body.style.overflow=this.opened?"hidden":this._bodyOverflow}async updatePosition(t=this.top,i=this.left,o=this.bottom,s=this.right){r.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:this.innerClickTest,backClickListener:this.backClickListener})}async show(t=this.top,i=this.left,o=this.bottom,s=this.right){const e="none"!==this.overlayType,h=`ez-scrim ez-scrim--${this.overlayType}`;let n={autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:this.innerClickTest,backClickListener:this.backClickListener};e&&(n=Object.assign(Object.assign({},n),{autoClose:!0,useOverlay:e,overlayClassName:h})),this._floatingID=r.float(this._box,this._container,n),this.opened=!0}async hide(){void 0!==this._floatingID&&(r.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return o(s,null,o("section",{ref:t=>this._container=t},o("div",{class:"popover__box "+("fit-content"===this.boxWidth?"popover__box--fit-content":"popover__box--full-width"),ref:t=>this._box=t},o("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["observeOpened","observeConfig"]}}};h.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--most-visible, 3);position:relative;display:flex;user-select:none}.popover__box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:100%}";export{h as ez_popover}
|