@sankhyalabs/ezui 2.10.1 → 2.11.0
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-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js +503 -0
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-sidebar-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/{index-8646c40d.js → index-fb179d74.js} +3 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.css +349 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +339 -0
- package/dist/collection/components/ez-dropdown/structure/DropdownItem.js +33 -0
- package/dist/collection/components/ez-dropdown/structure/SubmenuControl.js +241 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +501 -2
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js +499 -0
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-sidebar-button.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-edit.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/{index-7bc778b3.js → index-b77dcd0d.js} +3 -0
- package/dist/esm/loader.js +2 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-cfcc23e6.entry.js → p-07d07b75.entry.js} +1 -1
- package/dist/ezui/{p-7c227b86.entry.js → p-21782390.entry.js} +1 -1
- package/dist/ezui/{p-739d60d1.entry.js → p-22f06920.entry.js} +1 -1
- package/dist/ezui/{p-f6111077.entry.js → p-2686fa5b.entry.js} +1 -1
- package/dist/ezui/{p-b60fbad2.entry.js → p-297d4378.entry.js} +1 -1
- package/dist/ezui/p-42376b77.entry.js +1 -0
- package/dist/ezui/{p-f18f16e0.entry.js → p-42f85e36.entry.js} +1 -1
- package/dist/ezui/{p-171c3236.entry.js → p-46c3cd8e.entry.js} +1 -1
- package/dist/ezui/{p-32f9f83a.entry.js → p-4b93860c.entry.js} +1 -1
- package/dist/ezui/{p-7e496975.entry.js → p-52a18a6c.entry.js} +1 -1
- package/dist/ezui/{p-5dc3af60.entry.js → p-5d19cd0d.entry.js} +1 -1
- package/dist/ezui/{p-9def6fd0.entry.js → p-5e3079cb.entry.js} +1 -1
- package/dist/ezui/{p-ea877274.entry.js → p-620e71e2.entry.js} +1 -1
- package/dist/ezui/{p-04fab1e9.entry.js → p-6a53943d.entry.js} +1 -1
- package/dist/ezui/{p-1634c851.entry.js → p-6c43b275.entry.js} +1 -1
- package/dist/ezui/{p-3c7ea91b.js → p-6ccf5720.js} +1 -1
- package/dist/ezui/{p-123a2bd5.entry.js → p-6cdfe0db.entry.js} +1 -1
- package/dist/ezui/p-74a3f9d8.entry.js +1 -0
- package/dist/ezui/{p-a2e55b33.entry.js → p-7d8e693d.entry.js} +1 -1
- package/dist/ezui/{p-93bcc628.entry.js → p-7e9ab877.entry.js} +1 -1
- package/dist/ezui/{p-5c9ce8a7.entry.js → p-87dd65ba.entry.js} +1 -1
- package/dist/ezui/{p-f2627de5.entry.js → p-8c273b22.entry.js} +1 -1
- package/dist/ezui/{p-04a3b457.entry.js → p-9171043f.entry.js} +1 -1
- package/dist/ezui/{p-941e9792.entry.js → p-98c78c29.entry.js} +1 -1
- package/dist/ezui/{p-ddb1c350.entry.js → p-99e07a6b.entry.js} +1 -1
- package/dist/ezui/{p-6fd5e142.entry.js → p-a4405e80.entry.js} +1 -1
- package/dist/ezui/{p-f2c4e811.entry.js → p-a7380524.entry.js} +1 -1
- package/dist/ezui/{p-79e409c6.entry.js → p-a928ea8d.entry.js} +1 -1
- package/dist/ezui/{p-25e83e46.entry.js → p-b5efd273.entry.js} +1 -1
- package/dist/ezui/{p-9404f22b.entry.js → p-b7a8708e.entry.js} +1 -1
- package/dist/ezui/{p-46113d5a.entry.js → p-b9d91679.entry.js} +1 -1
- package/dist/ezui/{p-1a89d3ff.entry.js → p-ba7b2b8f.entry.js} +1 -1
- package/dist/ezui/{p-14a04845.entry.js → p-bdb5e325.entry.js} +1 -1
- package/dist/ezui/{p-50ae478a.entry.js → p-d04f3bb1.entry.js} +1 -1
- package/dist/ezui/{p-e613d9bf.entry.js → p-e3743d12.entry.js} +1 -1
- package/dist/ezui/{p-37335c51.entry.js → p-e628c8bd.entry.js} +1 -1
- package/dist/ezui/{p-ad5fe50b.entry.js → p-e881ec6d.entry.js} +1 -1
- package/dist/ezui/{p-3cfefc57.entry.js → p-e9b4b3bd.entry.js} +1 -1
- package/dist/ezui/{p-74c7f960.entry.js → p-f58201e8.entry.js} +1 -1
- package/dist/ezui/{p-a86d00b3.entry.js → p-f8f87959.entry.js} +1 -1
- package/dist/ezui/{p-9334a724.entry.js → p-fe1f0c92.entry.js} +1 -1
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +58 -0
- package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +28 -0
- package/dist/types/components/ez-dropdown/structure/SubmenuControl.d.ts +78 -0
- package/dist/types/components.d.ts +46 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-1cc11468.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { FloatingManager, ElementIDUtils, StringUtils as StringUtils$1, DateUtils as DateUtils$1, TimeFormatter, UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit,
|
|
3
|
+
import { FloatingManager, ElementIDUtils, StringUtils as StringUtils$1, DateUtils as DateUtils$1, TimeFormatter, ObjectUtils as ObjectUtils$1, UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, JSUtils, MaskFormatter } from '@sankhyalabs/core';
|
|
4
4
|
|
|
5
5
|
var DialogType;
|
|
6
6
|
(function (DialogType) {
|
|
@@ -2072,6 +2072,503 @@ let EzDialog$1 = class extends HTMLElement$1 {
|
|
|
2072
2072
|
static get style() { return ezDialogCss; }
|
|
2073
2073
|
};
|
|
2074
2074
|
|
|
2075
|
+
const DropdownItem = ({ item, hasIcon, hasChildren, isLockedLevels, onSubActionClick }) => {
|
|
2076
|
+
return (h("div", { class: "ez-dropdown__item-wrapper", title: item.label },
|
|
2077
|
+
getContentLeft(item, hasIcon),
|
|
2078
|
+
h("span", { class: "ez-dropdown__item-label" }, item.label),
|
|
2079
|
+
getContentRight(item, hasChildren, isLockedLevels, onSubActionClick)));
|
|
2080
|
+
};
|
|
2081
|
+
const getContentLeft = (item, hasIcon) => {
|
|
2082
|
+
if (item == undefined || !hasIcon) {
|
|
2083
|
+
return;
|
|
2084
|
+
}
|
|
2085
|
+
if (item.iconName) {
|
|
2086
|
+
return (h("ez-icon", Object.assign({ class: "ez-dropdown__icon-left", iconName: item.iconName, size: "medium" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${item.id}_ezDropdownItemIcon` })));
|
|
2087
|
+
}
|
|
2088
|
+
return (h("ez-icon", { class: "ez-dropdown__icon-left ez-dropdown__hidden", size: "medium" }));
|
|
2089
|
+
};
|
|
2090
|
+
const getContentRight = (item, hasChildren, isLockedLevels, onClick) => {
|
|
2091
|
+
var _a, _b;
|
|
2092
|
+
if (item == undefined) {
|
|
2093
|
+
return;
|
|
2094
|
+
}
|
|
2095
|
+
if (!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) && item.subAction != undefined && Object.keys(item.subAction).length > 0) {
|
|
2096
|
+
return (h("span", Object.assign({ onClick: () => onClick(item), title: item.subAction.label, class: `ez-dropdown__link ez-dropdown__link--${item.subAction.type || "primary"}` }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${item.subAction.id}_ezDropdownItemSubAction` }), item.subAction.label));
|
|
2097
|
+
}
|
|
2098
|
+
if (isLockedLevels || !hasChildren) {
|
|
2099
|
+
return;
|
|
2100
|
+
}
|
|
2101
|
+
if (((_b = item.children) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
2102
|
+
return (h("ez-icon", Object.assign({ class: "ez-dropdown__icon-right", iconName: "chevron-right", size: "medium" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${item.id}_ezDropdownIconOpenChildren` })));
|
|
2103
|
+
}
|
|
2104
|
+
return (h("ez-icon", { class: "ez-dropdown__icon-right ez-dropdown__hidden", size: "medium" }));
|
|
2105
|
+
};
|
|
2106
|
+
|
|
2107
|
+
class SubmenuControl {
|
|
2108
|
+
constructor() { }
|
|
2109
|
+
//---------------------------------------------
|
|
2110
|
+
// Public methods
|
|
2111
|
+
//---------------------------------------------
|
|
2112
|
+
/**
|
|
2113
|
+
* Método responsável por fechar submenus abertos e abrir o submenu desejado.
|
|
2114
|
+
* @param menu - Item de menu selecionado para abrir o submenu.
|
|
2115
|
+
*/
|
|
2116
|
+
show(menu) {
|
|
2117
|
+
const submenu = menu === null || menu === void 0 ? void 0 : menu.querySelector(".ez-dropdown__submenu");
|
|
2118
|
+
if (menu == undefined || submenu == undefined) {
|
|
2119
|
+
return;
|
|
2120
|
+
}
|
|
2121
|
+
submenu.classList.remove("ez-dropdown__submenu--hide");
|
|
2122
|
+
this.setPosition(menu);
|
|
2123
|
+
this.setScrollContainer(menu);
|
|
2124
|
+
this.setMaxHeight(submenu);
|
|
2125
|
+
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Método responsável por fechar um determinado submenu aberto.
|
|
2128
|
+
* @param menu - Item de menu selecionado com o submenu aberto.
|
|
2129
|
+
*/
|
|
2130
|
+
hide(menu) {
|
|
2131
|
+
if (menu == undefined) {
|
|
2132
|
+
return;
|
|
2133
|
+
}
|
|
2134
|
+
const submenuSelector = ".ez-dropdown__submenu:not(.ez-dropdown__submenu--hide)";
|
|
2135
|
+
const submenuElement = menu.querySelector(submenuSelector);
|
|
2136
|
+
this.reset(submenuElement);
|
|
2137
|
+
this.hideChild(submenuElement);
|
|
2138
|
+
}
|
|
2139
|
+
/**
|
|
2140
|
+
* Método responsável por fechar todos os submenus filhos de um determinado submenu.
|
|
2141
|
+
* @param submenu - Elemento HTML do submenu pai.
|
|
2142
|
+
*/
|
|
2143
|
+
hideChild(submenu) {
|
|
2144
|
+
if (submenu == undefined) {
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
submenu.querySelectorAll(".ez-dropdown__submenu")
|
|
2148
|
+
.forEach((child) => {
|
|
2149
|
+
this.reset(child);
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* Método responsável por posicionar o submenu na tela.
|
|
2154
|
+
* @param menu - Item da lista selecionado para abrir o submenu.
|
|
2155
|
+
*/
|
|
2156
|
+
setPosition(menu) {
|
|
2157
|
+
const submenu = menu === null || menu === void 0 ? void 0 : menu.querySelector(".ez-dropdown__submenu");
|
|
2158
|
+
const dropdown = menu === null || menu === void 0 ? void 0 : menu.closest(".ez-dropdown");
|
|
2159
|
+
if (submenu == undefined || dropdown == undefined) {
|
|
2160
|
+
return;
|
|
2161
|
+
}
|
|
2162
|
+
submenu.style.top = this.getPositionTop(menu);
|
|
2163
|
+
submenu.style.left = this.getPositionRight(dropdown);
|
|
2164
|
+
const bounding = submenu === null || submenu === void 0 ? void 0 : submenu.getBoundingClientRect();
|
|
2165
|
+
const docWidth = document.body.clientWidth;
|
|
2166
|
+
if ((bounding === null || bounding === void 0 ? void 0 : bounding.right) > docWidth) {
|
|
2167
|
+
this.updatePosition(dropdown, submenu);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
/**
|
|
2171
|
+
* Método responsável por controlar a altura máxima do dropdown.
|
|
2172
|
+
* @param element - Elemento HTML pai do dropdown que será renderizado.
|
|
2173
|
+
*/
|
|
2174
|
+
setMaxHeight(element) {
|
|
2175
|
+
var _a;
|
|
2176
|
+
const parentElement = (element === null || element === void 0 ? void 0 : element.shadowRoot) || element;
|
|
2177
|
+
const dropdown = parentElement === null || parentElement === void 0 ? void 0 : parentElement.querySelector(".ez-dropdown");
|
|
2178
|
+
const docHeight = document.body.clientHeight;
|
|
2179
|
+
let submenu;
|
|
2180
|
+
let bounding;
|
|
2181
|
+
if ((parentElement === null || parentElement === void 0 ? void 0 : parentElement["tagName"]) != undefined) {
|
|
2182
|
+
submenu = parentElement;
|
|
2183
|
+
bounding = submenu === null || submenu === void 0 ? void 0 : submenu.getBoundingClientRect();
|
|
2184
|
+
}
|
|
2185
|
+
else {
|
|
2186
|
+
bounding = dropdown === null || dropdown === void 0 ? void 0 : dropdown.getBoundingClientRect();
|
|
2187
|
+
}
|
|
2188
|
+
if (dropdown == undefined || bounding == undefined) {
|
|
2189
|
+
return;
|
|
2190
|
+
}
|
|
2191
|
+
/**
|
|
2192
|
+
* Menu aberto irá ultrapassar a altura da página?
|
|
2193
|
+
*/
|
|
2194
|
+
if ((bounding.y + bounding.height) > docHeight) {
|
|
2195
|
+
/**
|
|
2196
|
+
* Menu aberto é um submenu?
|
|
2197
|
+
* Sim: realiza o calculo com base na altura do menu pai
|
|
2198
|
+
* Não: recalcula a altura do menu para atualizar a barra de rolagem
|
|
2199
|
+
*/
|
|
2200
|
+
if (submenu != undefined) {
|
|
2201
|
+
const dropdownParent = submenu.closest(".ez-dropdown");
|
|
2202
|
+
const boundingParent = dropdownParent === null || dropdownParent === void 0 ? void 0 : dropdownParent.getBoundingClientRect();
|
|
2203
|
+
const marginTop = parseFloat(((_a = getComputedStyle(submenu)) === null || _a === void 0 ? void 0 : _a.marginTop) || "0");
|
|
2204
|
+
if (dropdownParent == undefined || boundingParent == undefined) {
|
|
2205
|
+
return;
|
|
2206
|
+
}
|
|
2207
|
+
/**
|
|
2208
|
+
* Submenu aberto ao ser reposicionado ficará acima da altura do menu pai?
|
|
2209
|
+
* Sim: posiciona o submenu na altura do menu pai e recalcula a sua altura para atualizar a barra de rolagem
|
|
2210
|
+
* Não: posiciona o submenu entre a altura do menu pai e o rodapé da página
|
|
2211
|
+
*/
|
|
2212
|
+
if ((boundingParent.y + bounding.height) > docHeight) {
|
|
2213
|
+
submenu.style.top = (boundingParent.y - marginTop) + "px";
|
|
2214
|
+
dropdown.style.maxHeight = (docHeight - boundingParent.y) + "px";
|
|
2215
|
+
}
|
|
2216
|
+
else {
|
|
2217
|
+
submenu.style.top = (docHeight - bounding.height - marginTop) + "px";
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
else {
|
|
2221
|
+
let maxHeight = docHeight - bounding.y;
|
|
2222
|
+
if (maxHeight < 0) {
|
|
2223
|
+
maxHeight = bounding.height - docHeight;
|
|
2224
|
+
}
|
|
2225
|
+
dropdown.style.maxHeight = maxHeight + "px";
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
this.setSpacerContainer(dropdown);
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
* Método responsável por atribuir a classe de espaçamento entre o conteúdo e o scroll.
|
|
2232
|
+
* @param dropdown - Elemento HTML pai do container que receberá a classe.
|
|
2233
|
+
*/
|
|
2234
|
+
setSpacerContainer(dropdown) {
|
|
2235
|
+
const container = dropdown === null || dropdown === void 0 ? void 0 : dropdown.querySelector(".ez-dropdown__container");
|
|
2236
|
+
if (container == undefined) {
|
|
2237
|
+
return;
|
|
2238
|
+
}
|
|
2239
|
+
if (container.scrollHeight > container.clientHeight) {
|
|
2240
|
+
container.classList.add("ez-dropdown__container--spacer");
|
|
2241
|
+
}
|
|
2242
|
+
else {
|
|
2243
|
+
container.classList.remove("ez-dropdown__container--spacer");
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
/**
|
|
2247
|
+
* Método responsável por resetar um determinado submenu aberto.
|
|
2248
|
+
* @param submenu - Elemento HTML do submenu que será resetado.
|
|
2249
|
+
*/
|
|
2250
|
+
reset(submenu) {
|
|
2251
|
+
if (submenu == undefined) {
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
submenu.classList.add("ez-dropdown__submenu--hide");
|
|
2255
|
+
submenu.style.left = "";
|
|
2256
|
+
submenu.style.top = "";
|
|
2257
|
+
const dropdown = submenu.querySelector(".ez-dropdown");
|
|
2258
|
+
this.resetDropdown(dropdown);
|
|
2259
|
+
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Método responsável por resetar um determinado dropdown renderizado.
|
|
2262
|
+
* @param dropdown - Elemento HTML do dropdown que será resetado.
|
|
2263
|
+
*/
|
|
2264
|
+
resetDropdown(dropdown) {
|
|
2265
|
+
if (dropdown == undefined) {
|
|
2266
|
+
return;
|
|
2267
|
+
}
|
|
2268
|
+
dropdown.style.maxHeight = "";
|
|
2269
|
+
this.setSpacerContainer(dropdown);
|
|
2270
|
+
}
|
|
2271
|
+
//---------------------------------------------
|
|
2272
|
+
// Private methods
|
|
2273
|
+
//---------------------------------------------
|
|
2274
|
+
/**
|
|
2275
|
+
* Método responsável por controlar o scroll do container do submenu aberto.
|
|
2276
|
+
* @param menu - Item da lista selecionado para abrir o submenu.
|
|
2277
|
+
*/
|
|
2278
|
+
setScrollContainer(menu) {
|
|
2279
|
+
const container = menu === null || menu === void 0 ? void 0 : menu.closest(".ez-dropdown__container");
|
|
2280
|
+
if (container == undefined) {
|
|
2281
|
+
return;
|
|
2282
|
+
}
|
|
2283
|
+
container.onscroll = this.onScrollContainer.bind(this);
|
|
2284
|
+
}
|
|
2285
|
+
/**
|
|
2286
|
+
* Método responsável por fechar os submenus filhos ao movimentar o scroll.
|
|
2287
|
+
* @param event - Evento de scroll disparado pelo Elemento HTML pai.
|
|
2288
|
+
*/
|
|
2289
|
+
onScrollContainer(event) {
|
|
2290
|
+
const target = event === null || event === void 0 ? void 0 : event.target;
|
|
2291
|
+
this.hideChild(target);
|
|
2292
|
+
}
|
|
2293
|
+
/**
|
|
2294
|
+
* Método responsável por retornar a posição superior (top) de um elemento HTML na tela.
|
|
2295
|
+
* @param hostElement - Elemento HTML que será capturado o valor de sua posição superior (top) na tela.
|
|
2296
|
+
* @returns Valor da posição superior (top) de um determinado elemento HTML.
|
|
2297
|
+
*/
|
|
2298
|
+
getPositionTop(hostElement) {
|
|
2299
|
+
const boundingHost = hostElement === null || hostElement === void 0 ? void 0 : hostElement.getBoundingClientRect();
|
|
2300
|
+
if (boundingHost == undefined) {
|
|
2301
|
+
return;
|
|
2302
|
+
}
|
|
2303
|
+
return boundingHost.y + "px";
|
|
2304
|
+
}
|
|
2305
|
+
/**
|
|
2306
|
+
* Método responsável por retornar a posição direita (right) de um elemento HTML na tela.
|
|
2307
|
+
* @param hostElement - Elemento HTML que será capturado o valor de sua posição direita (right) na tela.
|
|
2308
|
+
* @returns Valor da posição direita (right) de um determinado elemento HTML.
|
|
2309
|
+
*/
|
|
2310
|
+
getPositionRight(hostElement) {
|
|
2311
|
+
const boundingHost = hostElement === null || hostElement === void 0 ? void 0 : hostElement.getBoundingClientRect();
|
|
2312
|
+
if (boundingHost == undefined) {
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2315
|
+
return (boundingHost.x + boundingHost.width) + "px";
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* Método responsável por retornar a posição esquerda (left) de um elemento HTML desconsiderando a largura de outro elemento HTML.
|
|
2319
|
+
* @param hostElement - Elemento HTML que será capturado o valor de sua posição esquerda (left) na tela.
|
|
2320
|
+
* @param targetElement - Elemento HTML que será capturado o valor de sua largura (width).
|
|
2321
|
+
* @returns Valor da posição esquerda (left) de um determinado elemento HTML desconsiderando a largura de outro elemento HTML.
|
|
2322
|
+
*/
|
|
2323
|
+
getPositionLeft(hostElement, targetElement) {
|
|
2324
|
+
const boundingHost = hostElement === null || hostElement === void 0 ? void 0 : hostElement.getBoundingClientRect();
|
|
2325
|
+
const boundingTarget = targetElement === null || targetElement === void 0 ? void 0 : targetElement.getBoundingClientRect();
|
|
2326
|
+
if (boundingHost == undefined || boundingTarget == undefined) {
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2329
|
+
return (boundingHost.x - boundingTarget.width) + "px";
|
|
2330
|
+
}
|
|
2331
|
+
/**
|
|
2332
|
+
* Método responsável por atualizar a posição de um elemento HTML que renderizou fora da tela.
|
|
2333
|
+
* @param hostElement - Elemento HTML que será a referência de posição dentro da tela.
|
|
2334
|
+
* @param targetElement - Elemento HTML que será reposicionado na tela.
|
|
2335
|
+
*/
|
|
2336
|
+
updatePosition(hostElement, targetElement) {
|
|
2337
|
+
const boundingHost = hostElement === null || hostElement === void 0 ? void 0 : hostElement.getBoundingClientRect();
|
|
2338
|
+
const boundingTarget = targetElement === null || targetElement === void 0 ? void 0 : targetElement.getBoundingClientRect();
|
|
2339
|
+
if (boundingHost == undefined || boundingTarget == undefined) {
|
|
2340
|
+
return;
|
|
2341
|
+
}
|
|
2342
|
+
if (boundingHost.x < boundingTarget.right) {
|
|
2343
|
+
targetElement.style.left = this.getPositionLeft(hostElement, targetElement);
|
|
2344
|
+
this.updatePosition(hostElement, targetElement);
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
const ezDropdownCss = ":host{--ez-dropdown--z-index:var(--more-visible, 2);--ez-dropdown--padding:var(--space--small, 6px);--ez-dropdown--box-shadow:var(--shadow--medium, 0px 8px 24px rgba(0, 38, 111, 0.1));--ez-dropdown--border-radius:var(--border--radius-medium, 12px);--ez-dropdown--background-color:var(--background--xlight, #fff);--ez-dropdown--font-family:var(--font-pattern, 'Roboto');--ez-dropdown--max-width:320px;--ez-dropdown--max-height:440px;--ez-dropdown__item--padding:var(--space--small, 6px);--ez-dropdown__item--gap:var(--space--small, 6px);--ez-dropdown__item--border-radius:var(--border--radius-small, 6px);--ez-dropdown__item--color:var(--title--primary, #2b3a54);--ez-dropdown__item--font-weight:var(--text-weight--medium, 400);--ez-dropdown__item--font-size:var(--text--medium, 14px);--ez-dropdown__item--line-height:calc(var(--ez-dropdown__item--font-size) + 4px);--ez-dropdown__item--background-color:var(--background--medium, #f0f3f7);--ez-dropdown__item--transition:var(--transition, .2s linear);--ez-dropdown__item-label--margin-right:var(--space--medium, 12px);--ez-dropdown__icon--size:var(--icon--medium, 18px);--ez-dropdown__divider--background-color:var(--color--disable-secondary, #f2f5f8);--ez-dropdown__divider--margin:var(--space--extra-small, 3px) 0;--ez-dropdown__group-label--color:var(--text--secondary, #A2ABB9);--ez-dropdown__group-label--font-weight:var(--text-weight--large, 600);--ez-dropdown__group-label--font-size:var(--text--small, 12px);--ez-dropdown__group-label--line-height:var(--text--medium, 14px);--ez-dropdown__group-label--padding:var(--space--small, 6px);--ez-dropdown__submenu--z-index:var(--most-visible, 3);--ez-dropdown__link--font-weight:var(--text-weight--large, 600);--ez-dropdown__link--primary--color:var(--color--primary, #008561);--ez-dropdown__link--critical--color:var(--color-alert--error-800, #BD0025);--ez-dropdown__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-dropdown__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-dropdown__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-dropdown__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-dropdown__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-dropdown__scrollbar--width:var(--space--small, 6px);--ez-dropdown__scrollbar--padding-right:var(--space--extra-small, 3px);display:flex;flex-direction:column;height:fit-content;user-select:none;box-sizing:border-box;position:fixed;z-index:var(--ez-dropdown--z-index)}:host *{box-sizing:border-box}.ez-dropdown{display:flex;padding:var(--ez-dropdown--padding);box-shadow:var(--ez-dropdown--box-shadow);border-radius:var(--ez-dropdown--border-radius);background-color:var(--ez-dropdown--background-color);max-width:var(--ez-dropdown--max-width);max-height:var(--ez-dropdown--max-height)}.ez-dropdown *{font-family:var(--ez-dropdown--font-family)}.ez-dropdown__container{display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;flex:auto;scrollbar-color:var(--ez-dropdown__scrollbar--color-clicked) var(--ez-dropdown__scrollbar--color-background)}.ez-dropdown__container::-webkit-scrollbar{background-color:var(--ez-dropdown__scrollbar--color-background);width:var(--ez-dropdown__scrollbar--width);max-width:var(--ez-dropdown__scrollbar--width);min-width:var(--ez-dropdown__scrollbar--width)}.ez-dropdown__container::-webkit-scrollbar-track{background-color:var(--ez-dropdown__scrollbar--color-background);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb{background-color:var(--ez-dropdown__scrollbar--color-default);border-radius:var(--ez-dropdown__scrollbar--border-radius)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:hover,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-dropdown__scrollbar--color-hover)}.ez-dropdown__container::-webkit-scrollbar-thumb:vertical:active,.ez-dropdown__container::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-dropdown__scrollbar--color-clicked)}.ez-dropdown__container--spacer{padding-right:var(--ez-dropdown__scrollbar--padding-right)}.ez-dropdown__item{display:flex;align-items:center;background-color:transparent;border-radius:var(--ez-dropdown__item--border-radius);transition:var(--ez-dropdown__item--transition)}.ez-dropdown__item:hover{background-color:var(--ez-dropdown__item--background-color)}.ez-dropdown__item-wrapper{display:flex;align-items:center;position:relative;cursor:pointer;width:100%;margin:0;white-space:nowrap;gap:var(--ez-dropdown__item--gap);color:var(--ez-dropdown__item--color);font-weight:var(--ez-dropdown__item--font-weight);font-size:var(--ez-dropdown__item--font-size);line-height:var(--ez-dropdown__item--line-height);padding:var(--ez-dropdown__item--padding)}.ez-dropdown__item-wrapper ez-icon{display:flex;justify-content:center;align-items:center;width:var(--ez-dropdown__icon--size);height:var(--ez-dropdown__icon--size);min-width:var(--ez-dropdown__icon--size);min-height:var(--ez-dropdown__icon--size)}.ez-dropdown__item-content{display:flex;align-items:center;flex:auto;overflow:hidden;gap:var(--ez-dropdown__item--gap)}.ez-dropdown__item-label{text-align:left;text-overflow:ellipsis;overflow:hidden;flex:auto}.ez-dropdown__item-label:not(:last-child){margin-right:var(--ez-dropdown__item-label--margin-right)}.ez-dropdown__item-content+.ez-dropdown__link{margin-left:var(--ez-dropdown__item-label--margin-right);margin-right:var(--ez-dropdown__item--padding)}.ez-dropdown__item-builder{flex:auto}.ez-dropdown__divider{width:100%;height:2px;border-radius:1px;border:none;display:block;background-color:var(--ez-dropdown__divider--background-color);margin:var(--ez-dropdown__divider--margin)}.ez-dropdown__hidden{visibility:hidden}.ez-dropdown__group{display:flex;flex-direction:column}.ez-dropdown__group-label{display:block;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ez-dropdown__group-label--color);font-weight:var(--ez-dropdown__group-label--font-weight);font-size:var(--ez-dropdown__group-label--font-size);line-height:var(--ez-dropdown__group-label--line-height);padding:var(--ez-dropdown__group-label--padding)}.ez-dropdown__icon-right{margin-left:auto}.ez-dropdown__submenu{position:fixed;z-index:var(--ez-dropdown__submenu--z-index);margin-top:calc(var(--ez-dropdown__item--padding) * -1)}.ez-dropdown__submenu--hide{display:none}.ez-dropdown__link{display:block;margin-left:auto;cursor:pointer;text-overflow:ellipsis;overflow:hidden;font-weight:var(--ez-dropdown__link--font-weight);max-width:calc(var(--ez-dropdown--max-width) * 0.43)}.ez-dropdown__link--primary{color:var(--ez-dropdown__link--primary--color)}.ez-dropdown__link--critical{color:var(--ez-dropdown__link--critical--color)}.ez-dropdown__link:hover{text-decoration:underline}";
|
|
2350
|
+
|
|
2351
|
+
let EzDropdown$1 = class extends HTMLElement$1 {
|
|
2352
|
+
constructor() {
|
|
2353
|
+
super();
|
|
2354
|
+
this.__registerHost();
|
|
2355
|
+
this.__attachShadow();
|
|
2356
|
+
this.ezClick = createEvent(this, "ezClick", 7);
|
|
2357
|
+
this.ezSubActionClick = createEvent(this, "ezSubActionClick", 7);
|
|
2358
|
+
this._itemList = {};
|
|
2359
|
+
this._submenuList = [];
|
|
2360
|
+
this._openedMenuList = {};
|
|
2361
|
+
/**
|
|
2362
|
+
* Limitador de níveis de menu + submenu.
|
|
2363
|
+
* Valor 0, null ou undefined desativa o limitador.
|
|
2364
|
+
*/
|
|
2365
|
+
this._levelLimits = 3;
|
|
2366
|
+
/**
|
|
2367
|
+
* Lista de itens que vão ser apresentados no dropdown.
|
|
2368
|
+
*/
|
|
2369
|
+
this.items = [];
|
|
2370
|
+
}
|
|
2371
|
+
//---------------------------------------------
|
|
2372
|
+
// Private methods
|
|
2373
|
+
//---------------------------------------------
|
|
2374
|
+
defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren) {
|
|
2375
|
+
return (h(DropdownItem, { item: item, hasIcon: hasIcon, hasChildren: hasChildren, isLockedLevels: isLockedLevels, onSubActionClick: this.onSubActionClick.bind(this) }));
|
|
2376
|
+
}
|
|
2377
|
+
getMaxOrder(items) {
|
|
2378
|
+
if (items == undefined || items.length === 0) {
|
|
2379
|
+
return -1;
|
|
2380
|
+
}
|
|
2381
|
+
return Math.max(...items.map((item) => {
|
|
2382
|
+
var _a;
|
|
2383
|
+
const order = (_a = item.group) === null || _a === void 0 ? void 0 : _a["order"];
|
|
2384
|
+
return order != undefined && order >= 0 ? order : -1;
|
|
2385
|
+
}));
|
|
2386
|
+
}
|
|
2387
|
+
hasIcon(items) {
|
|
2388
|
+
return items === null || items === void 0 ? void 0 : items.some((item) => (item.iconName || "") !== "");
|
|
2389
|
+
}
|
|
2390
|
+
hasGroup(items) {
|
|
2391
|
+
return items === null || items === void 0 ? void 0 : items.some((item) => (item.group || "") !== "");
|
|
2392
|
+
}
|
|
2393
|
+
hasChildren(items) {
|
|
2394
|
+
return items === null || items === void 0 ? void 0 : items.some((item) => (item.children || []).length > 0);
|
|
2395
|
+
}
|
|
2396
|
+
isLockedLevels(level) {
|
|
2397
|
+
if (!this._levelLimits) {
|
|
2398
|
+
return false;
|
|
2399
|
+
}
|
|
2400
|
+
return level === (this._levelLimits + 1);
|
|
2401
|
+
}
|
|
2402
|
+
getItemsByGroup(items, level) {
|
|
2403
|
+
let itemsByGroup = {};
|
|
2404
|
+
const maxOrder = this.getMaxOrder(items);
|
|
2405
|
+
items.forEach((item) => {
|
|
2406
|
+
const label = item.group && item.group["label"] != undefined ? item.group["label"] || "noGroup" : item.group || "noGroup";
|
|
2407
|
+
const order = item.group && item.group["order"] != undefined ? item.group["order"] : item.group ? (maxOrder + 1) : (maxOrder + 2);
|
|
2408
|
+
let groupObj = itemsByGroup[label];
|
|
2409
|
+
if (groupObj == undefined) {
|
|
2410
|
+
groupObj = {
|
|
2411
|
+
items: [],
|
|
2412
|
+
order
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
this.validateItem(item, level);
|
|
2416
|
+
groupObj.items.push(item);
|
|
2417
|
+
itemsByGroup[label] = groupObj;
|
|
2418
|
+
});
|
|
2419
|
+
return ObjectUtils$1.sortByProperty(itemsByGroup, "order");
|
|
2420
|
+
}
|
|
2421
|
+
validateItem(item, level) {
|
|
2422
|
+
if (this._itemList == undefined) {
|
|
2423
|
+
this._itemList = {};
|
|
2424
|
+
}
|
|
2425
|
+
if (item.type == undefined) {
|
|
2426
|
+
item.type = "item";
|
|
2427
|
+
}
|
|
2428
|
+
if (item.id == undefined) {
|
|
2429
|
+
const itemId = `level_${level}_${item.type}`;
|
|
2430
|
+
const counter = Object.keys(this._itemList).filter((key) => key.includes(itemId)).length;
|
|
2431
|
+
item.id = `${itemId}_${counter + 1}`;
|
|
2432
|
+
}
|
|
2433
|
+
if (item.label == undefined) {
|
|
2434
|
+
item.label = "";
|
|
2435
|
+
}
|
|
2436
|
+
if (item.subAction != undefined) {
|
|
2437
|
+
if (item.subAction.id == undefined) {
|
|
2438
|
+
const subId = `subAction_${item.id}`;
|
|
2439
|
+
item.subAction.id = subId;
|
|
2440
|
+
}
|
|
2441
|
+
if (item.subAction.label == undefined) {
|
|
2442
|
+
item.subAction.label = "";
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
if (this._itemList[item.id] == undefined) {
|
|
2446
|
+
this._itemList[item.id] = {};
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
getItemsRender(groupItems, level, hasIcon, hasChildren) {
|
|
2450
|
+
if (groupItems == undefined) {
|
|
2451
|
+
return;
|
|
2452
|
+
}
|
|
2453
|
+
let counterLevel = level;
|
|
2454
|
+
let isLockedLevels = false;
|
|
2455
|
+
if (hasChildren) {
|
|
2456
|
+
counterLevel++;
|
|
2457
|
+
isLockedLevels = this.isLockedLevels(counterLevel);
|
|
2458
|
+
}
|
|
2459
|
+
return groupItems.map((item) => {
|
|
2460
|
+
var _a;
|
|
2461
|
+
return (item.type !== "divider"
|
|
2462
|
+
? h("div", Object.assign({ ref: (ref) => this._itemList[item.id] = ref, class: "ez-dropdown__item", "data-level": level }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${item.id}_ezDropdownItem`) }), h("div", { class: "ez-dropdown__item-content", onClick: (evt) => this.onItemClick(evt, item), onMouseOver: (evt) => this.onShowSubmenu(evt, item) }, this.itemBuilder
|
|
2463
|
+
? h("div", { class: "ez-dropdown__item-builder", innerHTML: this.itemBuilder(item, level) })
|
|
2464
|
+
: this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren)), ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
2465
|
+
!isLockedLevels &&
|
|
2466
|
+
hasChildren &&
|
|
2467
|
+
h("div", { ref: (ref) => this._submenuList.push(ref), class: "ez-dropdown__submenu ez-dropdown__submenu--hide" }, this.renderDropdown(item.children, counterLevel)))
|
|
2468
|
+
: h("hr", Object.assign({ class: "ez-dropdown__divider" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${item.id}_ezDropdownDivider` })));
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
renderDropdown(branchItems = this.items, level = 1) {
|
|
2472
|
+
if (branchItems == undefined || this.isLockedLevels(level)) {
|
|
2473
|
+
return;
|
|
2474
|
+
}
|
|
2475
|
+
const itemsByGroup = this.getItemsByGroup(branchItems, level);
|
|
2476
|
+
const hasGroup = this.hasGroup(branchItems);
|
|
2477
|
+
const hasIcon = this.hasIcon(branchItems);
|
|
2478
|
+
const hasChildren = this.hasChildren(branchItems);
|
|
2479
|
+
return (h("div", { class: "ez-dropdown", "data-level": level }, h("div", { class: "ez-dropdown__container" }, Object.keys(itemsByGroup)
|
|
2480
|
+
.map((groupLabel) => {
|
|
2481
|
+
return (h("div", Object.assign({ class: "ez-dropdown__group" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${groupLabel}_ezDropdownGroup`) }), groupLabel !== "noGroup" &&
|
|
2482
|
+
h("label", { class: "ez-dropdown__group-label", title: groupLabel }, groupLabel), hasGroup &&
|
|
2483
|
+
groupLabel === "noGroup" &&
|
|
2484
|
+
h("hr", { class: "ez-dropdown__divider" }), this.getItemsRender(itemsByGroup[groupLabel].items, level, hasIcon, hasChildren)));
|
|
2485
|
+
}))));
|
|
2486
|
+
}
|
|
2487
|
+
hasOpenedSubmenu(level) {
|
|
2488
|
+
const openedLevels = Object.keys(this._openedMenuList);
|
|
2489
|
+
return openedLevels.includes(level.toString())
|
|
2490
|
+
|| openedLevels.some((openedLevel) => Number(openedLevel) > level);
|
|
2491
|
+
}
|
|
2492
|
+
hasSubmenuOpened() {
|
|
2493
|
+
var _a;
|
|
2494
|
+
return (_a = this._submenuList) === null || _a === void 0 ? void 0 : _a.some((submenu) => !submenu.classList.contains("ez-dropdown__submenu--hide"));
|
|
2495
|
+
}
|
|
2496
|
+
setEvents() {
|
|
2497
|
+
document.removeEventListener('click', this.onHideAllSubmenu.bind(this));
|
|
2498
|
+
document.addEventListener('click', this.onHideAllSubmenu.bind(this));
|
|
2499
|
+
document.removeEventListener('scroll', this.onSubmenuReposition.bind(this));
|
|
2500
|
+
document.addEventListener('scroll', this.onSubmenuReposition.bind(this));
|
|
2501
|
+
}
|
|
2502
|
+
//---------------------------------------------
|
|
2503
|
+
// Event handlers
|
|
2504
|
+
//---------------------------------------------
|
|
2505
|
+
onShowSubmenu(evt, item) {
|
|
2506
|
+
var _a;
|
|
2507
|
+
if (evt == undefined) {
|
|
2508
|
+
return;
|
|
2509
|
+
}
|
|
2510
|
+
const menu = this._itemList[item.id];
|
|
2511
|
+
if (!(menu === null || menu === void 0 ? void 0 : menu.classList.contains("ez-dropdown__item"))) {
|
|
2512
|
+
return;
|
|
2513
|
+
}
|
|
2514
|
+
const level = Number(menu.dataset.level || "0");
|
|
2515
|
+
if (this.hasOpenedSubmenu(level)) {
|
|
2516
|
+
this._submenuControl.hide(this._openedMenuList[level]);
|
|
2517
|
+
delete this._openedMenuList[level];
|
|
2518
|
+
}
|
|
2519
|
+
if (!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
2520
|
+
return;
|
|
2521
|
+
}
|
|
2522
|
+
this._openedMenuList[menu.dataset.level] = menu;
|
|
2523
|
+
this._submenuControl.show(menu);
|
|
2524
|
+
}
|
|
2525
|
+
onItemClick(evt, item) {
|
|
2526
|
+
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
2527
|
+
if (target === null || target === void 0 ? void 0 : target.classList.contains("ez-dropdown__link")) {
|
|
2528
|
+
return;
|
|
2529
|
+
}
|
|
2530
|
+
this.value = item;
|
|
2531
|
+
this.ezClick.emit(item);
|
|
2532
|
+
}
|
|
2533
|
+
onSubActionClick(item) {
|
|
2534
|
+
this.ezSubActionClick.emit(item.subAction);
|
|
2535
|
+
}
|
|
2536
|
+
onHideAllSubmenu(evt = undefined) {
|
|
2537
|
+
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
2538
|
+
if (this.hasSubmenuOpened() && (target == undefined || (!target.closest(".ez-dropdown") && target.tagName !== "EZ-DROPDOWN"))) {
|
|
2539
|
+
this._openedMenuList = {};
|
|
2540
|
+
this._submenuList.forEach(this._submenuControl.reset.bind(this._submenuControl));
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
onSubmenuReposition() {
|
|
2544
|
+
if (this._openedMenuList != undefined) {
|
|
2545
|
+
Object.keys(this._openedMenuList).forEach((key) => {
|
|
2546
|
+
const menu = this._openedMenuList[key];
|
|
2547
|
+
this._submenuControl.setPosition(menu);
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
//---------------------------------------------
|
|
2552
|
+
// Lifecycle web component
|
|
2553
|
+
//---------------------------------------------
|
|
2554
|
+
componentDidLoad() {
|
|
2555
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
2556
|
+
this._submenuControl = new SubmenuControl();
|
|
2557
|
+
this._submenuControl.setMaxHeight(this._element);
|
|
2558
|
+
}
|
|
2559
|
+
componentDidUpdate() {
|
|
2560
|
+
this._submenuControl.setMaxHeight(this._element);
|
|
2561
|
+
}
|
|
2562
|
+
componentDidRender() {
|
|
2563
|
+
this.setEvents();
|
|
2564
|
+
}
|
|
2565
|
+
render() {
|
|
2566
|
+
return (h(Host, null, this.renderDropdown()));
|
|
2567
|
+
}
|
|
2568
|
+
get _element() { return this; }
|
|
2569
|
+
static get style() { return ezDropdownCss; }
|
|
2570
|
+
};
|
|
2571
|
+
|
|
2075
2572
|
const ezFileItemCss = ":host{display:flex;width:100%;--ez-file-item--height:42px;--ez-file-item--padding:9px;--ez-file-item--border-radius:var(--border--radius-medium, 12px);--ez-file-item--border-color:var(--color--strokes, #DCE0E8);--ez-file-item--border-style:var(--border--small, 1px solid);--ez-file-item--font-family:var(--font-pattern, Arial);--ez-file-item--font-size:var(--text--medium, 14px);--ez-file-item--font-weight:var(--text-weight--medium, 400);--ez-file-item--color:var(--title--primary, #2B3A54);--ez-file-item__file-size--font-weight:var(--text-weight--large, 600);--ez-file-item__file-size--color:var(--color--primary, #008561);--ez-file-item__background-progress--color:var(--color--primary-300, E2F4EF);--ez-file-item--icon-color:var(--title--primary, #2B3A54)}.box{display:flex;box-sizing:border-box;position:relative;align-items:center;justify-content:space-between;width:100%;padding:var(--ez-file-item--padding);border:var(--ez-file-item--border-color) var(--ez-file-item--border-style);border-radius:var(--ez-file-item--border-radius);height:var(--ez-file-item--height)}.box::before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;clip-path:inset(2px calc(var(--ez-file-item--upload-progress, 0%) + 2px) 2px 2px round calc(var(--ez-file-item--border-radius) - 4px));background-color:var(--ez-file-item__background-progress--color)}.content{display:flex;align-items:center;z-index:0;overflow:hidden}.file-name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item--font-weight);color:var(--ez-file-item--color)}.file-type-icon{flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color);padding-right:var(--ez-file-item--padding)}.file-size{padding-left:2px;overflow:hidden;flex-shrink:0;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item__file-size--font-weight);color:var(--ez-file-item__file-size--color)}.btn-remove{cursor:pointer;flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color)}";
|
|
2076
2573
|
|
|
2077
2574
|
let EzFileItem$1 = class extends HTMLElement$1 {
|
|
@@ -121962,6 +122459,7 @@ const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-bo
|
|
|
121962
122459
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513]}]);
|
|
121963
122460
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
|
|
121964
122461
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"]}]);
|
|
122462
|
+
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]}]);
|
|
121965
122463
|
const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]);
|
|
121966
122464
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513]}]);
|
|
121967
122465
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
|
|
@@ -122004,6 +122502,7 @@ const defineCustomElements = (opts) => {
|
|
|
122004
122502
|
EzDateInput,
|
|
122005
122503
|
EzDateTimeInput,
|
|
122006
122504
|
EzDialog,
|
|
122505
|
+
EzDropdown,
|
|
122007
122506
|
EzFileItem,
|
|
122008
122507
|
EzFilterInput,
|
|
122009
122508
|
EzForm,
|
|
@@ -122037,4 +122536,4 @@ const defineCustomElements = (opts) => {
|
|
|
122037
122536
|
}
|
|
122038
122537
|
};
|
|
122039
122538
|
|
|
122040
|
-
export { EzActionsButton, EzAlert, EzApplication, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzFileItem, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, defineCustomElements };
|
|
122539
|
+
export { EzActionsButton, EzAlert, EzApplication, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzGrid, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b77dcd0d.js';
|
|
2
2
|
import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import './ApplicationUtils-9fda4796.js';
|
|
4
4
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-b77dcd0d.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezAlertCss = ":host{--ez-alert-alert-container--padding-up-down:var(--space--small, 6px);--ez-alert-alert-container--padding-right-left:var(--space--medium, 12px);--ez-alert-alert-container--gap:var(--space--medium, 12px);--ez-alert-alert-container--border-radius:var(--border--radius-medium, 12px);--ez-alert-alert-container--font-color-warn:var(--color--alert-warning-900, #8C6B00);--ez-alert-alert-container--icon-warn:var(--color--alert-warning-900, #8C6B00);--ez-alert-alert-container--background-color-warn:var(--color--alert-warning-200, #FFF7D5);--ez-alert-alert-container--font-color-critical:var(--color--alert-error, #BD0025);--ez-alert-alert-container--icon-critical:var(--color--alert-error, #BD0025);--ez-alert-alert-container--background-color-critical:var(--color--alert-error-200, #F7E0E5);--ez-alert-alert-container--font-color-success:var(--color--alert-success, #157A00);--ez-alert-alert-container--icon-success:var(--color--alert-success, #157A00);--ez-alert-alert-container--background-color-success:var(--color--alert-success-200, #E7F6E0);font-size:var(--text--small, 12px);font-family:var(--font-pattern, \"Roboto\");width:100%;hyphens:auto;display:block}.alert-container{display:flex;align-items:center;gap:var(--ez-alert-alert-container--gap);padding:var(--ez-alert-alert-container--padding-up-down) var(--ez-alert-alert-container--padding-right-left);border-radius:var(--ez-alert-alert-container--border-radius)}.warn{background-color:var(--ez-alert-alert-container--background-color-warn);color:var(--ez-alert-alert-container--font-color-warn)}.critical{background-color:var(--ez-alert-alert-container--background-color-critical);color:var(--ez-alert-alert-container--font-color-critical)}.success{background-color:var(--ez-alert-alert-container--background-color-success);color:var(--ez-alert-alert-container--font-color-success)}ez-icon{--ez-icon--color:inherit}.alert-container__icon-warn{--ez-icon--color:var(--ez-alert-alert-container--icon-warn)}.alert-container__icon-critical{--ez-icon--color:var(--ez-alert-alert-container--icon-critical)}.alert-container__icon-success{--ez-icon--color:var(--ez-alert-alert-container--icon-success)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-b77dcd0d.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezBreadcrumbCss = ":host{--breadcrumb__item--label--color--title-primary:var(--color--title-primary, #2B3A54);--breadcrumb__item--label--color--active:var(--color--primary, '#008561');--breadcrumb__item--label--font-weight:var(--text-weight--large, 600);display:block;font-size:var(--text--medium, 14px);font-family:var(--font-pattern, \"Roboto\");font-weight:var(--text-weight--medium, 400)}.breadcrumb__list{list-style-type:none;display:inline-block;margin:0;padding:0}.breadcrumb__item{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb__item--label{color:var(--breadcrumb__item--label--color--title-primary);margin:0px}.breadcrumb__item--icon{padding-right:3px;color:var(--breadcrumb__item--label--color--title-primary)}.breadcrumb__item--chevron{padding:0px 6px;cursor:default}.active{color:var(--breadcrumb__item--label--color--active);font-weight:var(--breadcrumb__item--label--font-weight);cursor:default}.active-icon{--icon--color:var(--breadcrumb__item--label--color--active);cursor:default}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-b77dcd0d.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-b77dcd0d.js';
|
|
2
2
|
import { FloatingManager } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image: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>');--ez-calendar__nav-btn--next-image: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>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b77dcd0d.js';
|
|
2
2
|
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b77dcd0d.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CheckMode } from './CheckMode-bdb2ec19.js';
|
|
4
4
|
|