@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-76362.0 → 0.0.0-bugfix-dev-KB-75609.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-card-item_3.cjs.entry.js +4 -17
- package/dist/cjs/ez-list.cjs.entry.js +151 -100
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +2 -9
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +60 -4
- package/dist/cjs/ez-text-input.cjs.entry.js +2 -3
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-card-item/ez-card-item.css +14 -5
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +0 -11
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +2 -63
- package/dist/collection/components/ez-list/ez-list.css +5 -5
- package/dist/collection/components/ez-list/ez-list.js +152 -170
- package/dist/collection/components/ez-popover/ez-popover.css +3 -10
- package/dist/collection/components/ez-popup/ez-popup.css +2 -6
- package/dist/collection/components/ez-popup/ez-popup.js +3 -10
- package/dist/collection/components/ez-search/ez-search.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +1 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +49 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js +78 -2
- package/dist/collection/components/ez-text-input/ez-text-input.css +13 -15
- package/dist/collection/components/ez-text-input/ez-text-input.js +1 -2
- package/dist/custom-elements/index.js +224 -138
- package/dist/esm/ez-card-item_3.entry.js +4 -17
- package/dist/esm/ez-list.entry.js +152 -101
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +2 -9
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +60 -4
- package/dist/esm/ez-text-input.entry.js +2 -3
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0f3b2e67.entry.js +1 -0
- package/dist/ezui/p-37219d42.entry.js +1 -0
- package/dist/ezui/p-a80b1287.entry.js +1 -0
- package/dist/ezui/p-b54e17d2.entry.js +1 -0
- package/dist/ezui/p-bfad39eb.entry.js +1 -0
- package/dist/ezui/p-c25f0e92.entry.js +1 -0
- package/dist/ezui/p-f0e2ce9d.entry.js +1 -0
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +0 -12
- package/dist/types/components/ez-list/ez-list.d.ts +3 -26
- package/dist/types/components/ez-popup/ez-popup.d.ts +2 -2
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +13 -0
- package/dist/types/components.d.ts +10 -38
- package/package.json +1 -1
- package/dist/ezui/p-188f1c4c.entry.js +0 -1
- package/dist/ezui/p-25ac5376.entry.js +0 -1
- package/dist/ezui/p-86b6aa01.entry.js +0 -1
- package/dist/ezui/p-b3b94f72.entry.js +0 -1
- package/dist/ezui/p-bcd47eda.entry.js +0 -1
- package/dist/ezui/p-dc4ada32.entry.js +0 -1
- package/dist/ezui/p-f80ac647.entry.js +0 -1
|
@@ -6,7 +6,7 @@ const index = require('./index-a7b0c73d.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
|
|
8
8
|
|
|
9
|
-
const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-
|
|
9
|
+
const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: var(--opacity--soft);\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--medium);\n padding-bottom: 0px;\n padding-right: 0px;\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
|
|
10
10
|
|
|
11
11
|
const EzCardItem = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -60,7 +60,7 @@ const EzCardItem = class {
|
|
|
60
60
|
};
|
|
61
61
|
EzCardItem.style = ezCardItemCss;
|
|
62
62
|
|
|
63
|
-
const ezFilterInputCss = ":host{
|
|
63
|
+
const ezFilterInputCss = ":host{display:block;width:100%}";
|
|
64
64
|
|
|
65
65
|
const EzFilterInput = class {
|
|
66
66
|
constructor(hostRef) {
|
|
@@ -68,19 +68,15 @@ const EzFilterInput = class {
|
|
|
68
68
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
69
69
|
this.ezSearching = index.createEvent(this, "ezSearching", 7);
|
|
70
70
|
this.ezFocusIn = index.createEvent(this, "ezFocusIn", 7);
|
|
71
|
-
this.ezIconClick = index.createEvent(this, "ezIconClick", 7);
|
|
72
71
|
this._searchingText = "";
|
|
73
72
|
this.handleFocus = () => {
|
|
74
|
-
this.ezFocusIn.emit();
|
|
75
|
-
if (!this.asyncSearch) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
73
|
if (this._searchingText === "") {
|
|
79
74
|
this._textInput.value = "";
|
|
80
75
|
}
|
|
81
76
|
else {
|
|
82
77
|
this._textInput.value = this._searchingText;
|
|
83
78
|
}
|
|
79
|
+
this.ezFocusIn.emit();
|
|
84
80
|
};
|
|
85
81
|
this.label = undefined;
|
|
86
82
|
this.value = undefined;
|
|
@@ -90,7 +86,6 @@ const EzFilterInput = class {
|
|
|
90
86
|
this.mode = "regular";
|
|
91
87
|
this.asyncSearch = false;
|
|
92
88
|
this.canShowError = true;
|
|
93
|
-
this.enabledIconClick = false;
|
|
94
89
|
}
|
|
95
90
|
observeLabel() {
|
|
96
91
|
if (this._textInput) {
|
|
@@ -152,14 +147,6 @@ const EzFilterInput = class {
|
|
|
152
147
|
this._textInput.value = this.value;
|
|
153
148
|
}
|
|
154
149
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Método usado para emitir o evento de clique no ícone
|
|
157
|
-
*/
|
|
158
|
-
async handleIconClick() {
|
|
159
|
-
if (this.enabledIconClick) {
|
|
160
|
-
this.ezIconClick.emit(true);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
150
|
handleChange(evt) {
|
|
164
151
|
const newValue = evt.detail;
|
|
165
152
|
this.errorMessage = "";
|
|
@@ -176,7 +163,7 @@ const EzFilterInput = class {
|
|
|
176
163
|
}
|
|
177
164
|
render() {
|
|
178
165
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
179
|
-
return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "search"
|
|
166
|
+
return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
180
167
|
}
|
|
181
168
|
get _elem() { return index.getElement(this); }
|
|
182
169
|
static get watchers() { return {
|
|
@@ -5,20 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezListCss = ".sc-ez-list-h{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon--padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item--margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:none;--ez-list__item--border-bottom-color:none;--ez-list__item--font-family:var(--font-pattern, \"Roboto\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__item--white-space:var(--ez-list__item--white-space, nowrap);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Roboto\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group-overlay--font-family:var(--font-pattern, \"Roboto\");--ez-list__group-overlay--font-size:var(--text--medium, 14px);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable-list--padding-bottom:var(--space--small, 6px);--ez-list__draggable-icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');--ez-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-list__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-list__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-list__scrollbar--width:var(--space--medium, 12px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p.sc-ez-list{margin:0}.draggable.sc-ez-list{width:100%;display:grid;grid-template-columns:minmax(0px, auto) minmax(0px, auto);place-items:center;border-top:1px solid #fff;justify-content:space-between;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size)}.dragging.sc-ez-list{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable.sc-ez-list{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container.sc-ez-list{margin:0px !important}.hover-feedback.sc-ez-list:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.item-content.sc-ez-list{display:flex;align-items:center;overflow:hidden;justify-content:flex-start;width:100%}.draggable-list.sc-ez-list{padding:0;margin:0;width:100%;max-height:100%;scrollbar-width:thin;color:var(--text-color);scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.draggable-list.sc-ez-list li.sc-ez-list{display:flex;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);border-bottom:var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color)}.draggable-list.sc-ez-list li.sc-ez-list>div.sc-ez-list{padding:var(--space--2xs, 8px) var(--space--3xs, 4px);margin:var(--ez-list__item--margin)}.over.sc-ez-list{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space.sc-ez-list{height:var(--ez-list__last-droppable-space--height)}.draggable-selected.sc-ez-list{background-color:var(--background--strong) !important}.draggable-selected.sc-ez-list div.sc-ez-list:hover{background-color:var(--background--strong) !important}.draggable-list.sc-ez-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.draggable-list.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.draggable-icon.sc-ez-list{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon.sc-ez-list::after{content:'';display:flex;width:18px;height:18px;background-color:var(--ez-list__icon--color);-webkit-mask-image:var(--ez-list__draggable-icon--image);mask-image:var(--ez-list__draggable-icon--image)}*.sc-ez-list{box-sizing:border-box}.checkbox.sc-ez-list{width:fit-content}.text--ellipsis.sc-ez-list{overflow:hidden;text-overflow:ellipsis;white-space:var(--ez-list__item--white-space)}.group-container.sc-ez-list{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%;scrollbar-width:thin;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-name.sc-ez-list{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--title--primary);font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom)}.group.sc-ez-list{display:flex;flex-direction:column}.group-container.sc-ez-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.group-container.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.section-container.sc-ez-list{display:flex;position:relative;height:100%}.items-container.sc-ez-list{width:100%;max-height:100%;outline:none;scrollbar-width:thin;overflow:auto;scrollbar-color:var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background)}.group-items-container.sc-ez-list{width:100%;max-height:100%;height:100%;outline:none}.items-container.sc-ez-list::-webkit-scrollbar{background-color:var(--ez-list__scrollbar--color-background);width:var(--ez-list__scrollbar--width);max-width:var(--ez-list__scrollbar--width);min-width:var(--ez-list__scrollbar--width)}.items-container.sc-ez-list::-webkit-scrollbar-track{background-color:var(--ez-list__scrollbar--color-background);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container.sc-ez-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__scrollbar--color-default);border-radius:var(--ez-list__scrollbar--border-radius)}.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover,.items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-list__scrollbar--color-hover)}.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active,.items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-list__scrollbar--color-clicked)}.group-overlay.sc-ez-list{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer;font-family:var(--ez-list__group-overlay--font-family);font-size:var(--ez-list__group-overlay--font-size)}.presetedHeight.sc-ez-list{min-height:100px}.overlay-text.sc-ez-list{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item.sc-ez-list{background:var(--ez-list__selected-item--background-color);border-radius:var(--ez-list__selected-item--border-radius)}.slot-item.sc-ez-list{align-items:flex-end}.overGroup.sc-ez-list{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
|
|
8
|
+
const ezListCss = ".sc-ez-list-h {\n \n --ez-list__host--z-index: var(--visible, 1);\n\n \n --ez-list__host--border-radius: var(--border--radius-medium, 12px);\n\n \n --ez-list__host--padding: var(--space--medium, 12px);\n\n \n --ez-list__icon--padding: var(--space--small, 6px);\n\n \n --ez-list__icon--color: #AFB6C0;\n\n \n --ez-list__item--margin: 0 var(--space--small, 6px);\n\n \n --ez-list__item--color: var(--title--primary, #2b3a54);\n\n \n --ez-list__item--border-bottom;\n\n \n --ez-list__item--border-bottom-color;\n\n \n --ez-list__item--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__item--font-size: var(--text--medium, 14px);\n \n \n --ez-list__item--white-space: var(--ez-list__item--white-space, nowrap);\n\n \n --ez-list__selectable--padding-right: var(--space--small, 6px);\n \n \n --ez-list__selectable--padding-left: var(--space--small, 6px);\n\n \n --ez-list__selected-item--border-radius: var(--border--radius-small, 6px);\n \n \n --ez-list__selected-item--background-color: var(--color--primary-300, #E2F4EF);\n\n \n --ez-list__group--font-family: var(--font-pattern, \"Roboto\");\n \n \n --ez-list__group--font-size: var(--text--medium, 14px);\n \n \n --ez-list__group--font-weight: var(--text-weight--large, 600);\n \n \n --ez-list__group--padding-bottom: var(--space-small, 6px);\n\n \n --ez-list__group-overlay--font-family: var(--font-pattern, \"Roboto\");\n\n \n --ez-list__group-overlay--font-size: var(--text--medium, 14px);\n \n \n --ez-list__over--border--color: var(--color--primary, #008561);\n\n \n --ez-list__last-droppable-space--height: var(--space--small, 6px);\n \n \n --ez-list__draggable-list--padding-bottom: var(--space--small, 6px);\n\n \n --ez-list__draggable-icon--image: url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');\n\n \n \n --ez-list__scrollbar--color-default: var(--scrollbar--default, #626e82);\n \n --ez-list__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);\n \n --ez-list__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);\n \n --ez-list__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);\n \n --ez-list__scrollbar--border-radius: var(--border--radius-small, 6px);\n \n --ez-list__scrollbar--width: var(--space--medium, 12px);\n\n max-height: 100%;\n width: 100%;\n background-color: #fff;\n display: flex;\n\n \n z-index: var(--ez-list__host--z-index);\n}\n\np.sc-ez-list {\n margin: 0;\n}\n\n.draggable.sc-ez-list {\n \n width: 100%;\n display: grid;\n grid-template-columns: minmax(0px, auto) minmax(0px, auto);\n place-items: center;\n border-top: 1px dashed #fff;\n justify-content: space-between;\n\n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n}\n\n.dragging.sc-ez-list {\n background: #FFFFFF;\n \n\n border: 1px solid #008561;\n box-sizing: border-box;\n box-shadow: 0px 0px 16px rgba(0, 38, 111, 0.122);\n border-radius: 6px;\n}\n\n.selectable.sc-ez-list {\n cursor: pointer;\n\n \n padding-right: var(--ez-list__selectable--padding-right);\n padding-left: var(--ez-list__selectable--padding-left);\n}\n\n.selectable-container.sc-ez-list {\n margin: 0px !important;\n}\n\n.hover-feedback.sc-ez-list:hover {\n background-color: var(--background--medium);\n border-radius: var(--border--radius-regular);\n}\n\n.item-content.sc-ez-list {\n display: flex;\n align-items: center;\n overflow: hidden;\n justify-content: flex-start;\n width: 100%;\n}\n\n.draggable-list.sc-ez-list {\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 100%;\n scrollbar-width: thin;\n \n \n color: var(--text-color);\n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list {\n display: flex;\n \n \n font-family: var(--ez-list__item--font-family);\n font-size: var(--ez-list__item--font-size);\n color: var(--ez-list__item--color);\n border-bottom: var(--ez-list__item--border-bottom, none) var(--ez-list__item--border-bottom-color);\n}\n\n.draggable-list.sc-ez-list li.sc-ez-list > div.sc-ez-list {\n \n padding: var(--space--3xs, 4px) var(--space--3xs, 4px);\n margin: var(--ez-list__item--margin);\n}\n\n.over.sc-ez-list {\n \n border-top: 1px dashed var(--ez-list__over--border--color);\n}\n\n.last-droppable-space.sc-ez-list {\n \n height: var(--ez-list__last-droppable-space--height);\n}\n\n.draggable-selected.sc-ez-list {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-selected.sc-ez-list div.sc-ez-list:hover {\n \n background-color: var(--background--strong) !important;\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.draggable-list.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .draggable-list.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.draggable-icon.sc-ez-list {\n align-items: flex-start;\n display: flex;\n outline: none;\n border: none;\n background-color: unset;\n}\n\n.draggable-icon.sc-ez-list::after {\n content: '';\n display: flex;\n width: 18px;\n height: 18px;\n\n \n background-color: var(--ez-list__icon--color);\n -webkit-mask-image: var(--ez-list__draggable-icon--image);\n mask-image: var(--ez-list__draggable-icon--image);\n}\n\n*.sc-ez-list {\n box-sizing: border-box;\n}\n\n.checkbox.sc-ez-list {\n width: fit-content;\n}\n\n.text--ellipsis.sc-ez-list {\n overflow: hidden;\n text-overflow: ellipsis;\n \n \n white-space: var(--ez-list__item--white-space);\n}\n\n.group-container.sc-ez-list {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n overflow-y: auto;\n outline: none;\n width: 100%;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-name.sc-ez-list {\n -webkit-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n \n color: var(--title--primary);\n font-family: var(--ez-list__group--font-family);\n font-size: var(--ez-list__group--font-size);\n font-weight: var(--ez-list__group--font-weight);\n padding-bottom: var(--ez-list__group--padding-bottom);\n}\n\n.group.sc-ez-list {\n display: flex;\n flex-direction: column;\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.group-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .group-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.section-container.sc-ez-list {\n display: flex;\n position: relative;\n height: 100%;\n}\n\n.items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n outline: none;\n scrollbar-width: thin;\n\n \n scrollbar-color: var(--ez-list__scrollbar--color-clicked) var(--ez-list__scrollbar--color-background);\n}\n\n.group-items-container.sc-ez-list {\n width: 100%;\n max-height: 100%;\n height: 100%;\n outline: none;\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar {\n \n background-color: var(--ez-list__scrollbar--color-background);\n width: var(--ez-list__scrollbar--width);\n max-width: var(--ez-list__scrollbar--width);\n min-width: var(--ez-list__scrollbar--width);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-track {\n \n background-color: var(--ez-list__scrollbar--color-background);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb {\n \n background-color: var(--ez-list__scrollbar--color-default);\n border-radius: var(--ez-list__scrollbar--border-radius);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:hover, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:hover {\n \n background-color: var(--ez-list__scrollbar--color-hover);\n}\n\n.items-container.sc-ez-list::-webkit-scrollbar-thumb:vertical:active, .items-container.sc-ez-list::-webkit-scrollbar-thumb:horizontal:active {\n \n background-color: var(--ez-list__scrollbar--color-clicked);\n}\n\n.group-overlay.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n border-radius: 8px;\n position: absolute;\n display: none;\n place-items: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 2;\n margin: 0;\n cursor: pointer;\n\n \n font-family: var(--ez-list__group-overlay--font-family);\n font-size: var(--ez-list__group-overlay--font-size);\n}\n\n.presetedHeight.sc-ez-list {\n min-height: 100px;\n}\n\n.overlay-text.sc-ez-list {\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 50px;\n color: white;\n transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n}\n\n.selected-item.sc-ez-list {\n \n background: var(--ez-list__selected-item--background-color);\n border-radius: var(--ez-list__selected-item--border-radius);\n}\n\n.slot-item.sc-ez-list {\n align-items: flex-end;\n}\n\n.overGroup.sc-ez-list {\n background: rgba(226, 244, 239, 0.8);\n border: 1px solid #008561;\n box-sizing: border-box;\n border-radius: 8px;\n padding-top: 6px;\n}";
|
|
9
9
|
|
|
10
10
|
const EzList = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
14
|
this.ezSelectItem = index.createEvent(this, "ezSelectItem", 7);
|
|
15
|
-
this.ezClickItem = index.createEvent(this, "ezClickItem", 7);
|
|
16
15
|
this.ezCheckChange = index.createEvent(this, "ezCheckChange", 7);
|
|
17
16
|
this.ezDoubleClick = index.createEvent(this, "ezDoubleClick", 7);
|
|
18
17
|
this._listItemsHistory = [];
|
|
19
18
|
this._listItems = [];
|
|
20
19
|
this._listGroupItems = [];
|
|
21
|
-
this._selectedItem = undefined;
|
|
22
20
|
this.dataSource = [];
|
|
23
21
|
this.listMode = 'regular';
|
|
24
22
|
this.useGroups = false;
|
|
@@ -27,19 +25,6 @@ const EzList = class {
|
|
|
27
25
|
this.itemSlotBuilder = undefined;
|
|
28
26
|
this.itemLeftSlotBuilder = undefined;
|
|
29
27
|
this.hoverFeedback = false;
|
|
30
|
-
this.disableShortcuts = false;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Seleciona o próximo item.
|
|
34
|
-
*/
|
|
35
|
-
async selectNextItem() {
|
|
36
|
-
this.nextOption();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Seleciona o item anterior.
|
|
40
|
-
*/
|
|
41
|
-
async selectPreviousItem() {
|
|
42
|
-
this.previousOption();
|
|
43
28
|
}
|
|
44
29
|
/**
|
|
45
30
|
* Limpa o histórico da lista.
|
|
@@ -63,8 +48,23 @@ const EzList = class {
|
|
|
63
48
|
*/
|
|
64
49
|
async setSelection(selectedItem, scrollToOption) {
|
|
65
50
|
if (selectedItem && this.ezSelectable) {
|
|
66
|
-
this._selectedItem = Object.assign({}, selectedItem);
|
|
67
51
|
this.ezSelectItem.emit(selectedItem);
|
|
52
|
+
if (this.useGroups) {
|
|
53
|
+
let newList = [...this._listGroupItems];
|
|
54
|
+
newList.forEach(groupItem => {
|
|
55
|
+
groupItem.items.forEach(item => {
|
|
56
|
+
item.selected = item.id === selectedItem.id;
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
this._listGroupItems = newList;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
let newList = [...this._listItems];
|
|
63
|
+
newList.forEach(item => {
|
|
64
|
+
item.selected = item.id === selectedItem.id;
|
|
65
|
+
});
|
|
66
|
+
this._listItems = newList;
|
|
67
|
+
}
|
|
68
68
|
if (scrollToOption) {
|
|
69
69
|
let liElem = this.useGroups
|
|
70
70
|
? this._groupContainer.querySelector('li#item_' + selectedItem.id)
|
|
@@ -82,7 +82,21 @@ const EzList = class {
|
|
|
82
82
|
* Obtém o item selecionado.
|
|
83
83
|
*/
|
|
84
84
|
async getSelection() {
|
|
85
|
-
|
|
85
|
+
let selectedItem;
|
|
86
|
+
if (this.useGroups) {
|
|
87
|
+
this._listGroupItems.every(group => {
|
|
88
|
+
let item = group.items.find(item => item.selected == true);
|
|
89
|
+
if (item) {
|
|
90
|
+
selectedItem = item;
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
selectedItem = this._listItems.find(item => item.selected == true);
|
|
98
|
+
}
|
|
99
|
+
return selectedItem;
|
|
86
100
|
}
|
|
87
101
|
/**
|
|
88
102
|
* Obtém a lista de items ou grupos.
|
|
@@ -97,7 +111,22 @@ const EzList = class {
|
|
|
97
111
|
* Limpa a seleção atual
|
|
98
112
|
*/
|
|
99
113
|
async removeSelection() {
|
|
100
|
-
this.
|
|
114
|
+
if (this.useGroups) {
|
|
115
|
+
let newList = [...this._listGroupItems];
|
|
116
|
+
newList.forEach(groupItem => {
|
|
117
|
+
groupItem.items.forEach(item => {
|
|
118
|
+
item.selected = false;
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
this._listGroupItems = newList;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
let newList = [...this._listItems];
|
|
125
|
+
newList.forEach(item => {
|
|
126
|
+
item.selected = false;
|
|
127
|
+
});
|
|
128
|
+
this._listItems = newList;
|
|
129
|
+
}
|
|
101
130
|
}
|
|
102
131
|
applyUUID(item) {
|
|
103
132
|
if (!item.id) {
|
|
@@ -157,10 +186,6 @@ const EzList = class {
|
|
|
157
186
|
}
|
|
158
187
|
componentDidLoad() {
|
|
159
188
|
core.ElementIDUtils.addIDInfo(this._element);
|
|
160
|
-
this.bindKeyboardManager();
|
|
161
|
-
}
|
|
162
|
-
disconnectCallback() {
|
|
163
|
-
this.unbindKeyboardManager();
|
|
164
189
|
}
|
|
165
190
|
onDrop(ev, dragEndItem) {
|
|
166
191
|
this.removeOverClass();
|
|
@@ -353,58 +378,92 @@ const EzList = class {
|
|
|
353
378
|
if (this.useGroups) {
|
|
354
379
|
this.setSelection(this._listGroupItems[0].items[0]);
|
|
355
380
|
}
|
|
356
|
-
|
|
381
|
+
{
|
|
357
382
|
this.setSelection(this._listItems[0]);
|
|
358
383
|
}
|
|
359
384
|
}
|
|
360
|
-
|
|
385
|
+
nextOption(selectedItem) {
|
|
386
|
+
let nextItem = undefined;
|
|
361
387
|
if (this.useGroups) {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
388
|
+
this._listGroupItems.every((group, groupIndex, listGroupItems) => {
|
|
389
|
+
let item = undefined;
|
|
390
|
+
let itemIndex = group.items.findIndex(item => item.id == selectedItem.id);
|
|
391
|
+
if (itemIndex != undefined && itemIndex != -1) {
|
|
392
|
+
if (itemIndex === group.items.length - 1) {
|
|
393
|
+
if (groupIndex + 1 <= listGroupItems.length - 1) {
|
|
394
|
+
item = { label: listGroupItems[groupIndex + 1].items[0].label };
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
item = { label: group.items[itemIndex + 1].label };
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
if (item != undefined) {
|
|
402
|
+
nextItem = item;
|
|
403
|
+
return false;
|
|
404
|
+
}
|
|
405
|
+
return true;
|
|
406
|
+
});
|
|
375
407
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
408
|
+
else {
|
|
409
|
+
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
410
|
+
if (itemIndex >= 0 && itemIndex < this._listItems.length) {
|
|
411
|
+
nextItem = this._listItems[itemIndex + 1];
|
|
412
|
+
}
|
|
381
413
|
}
|
|
414
|
+
this.setSelection(nextItem, true);
|
|
382
415
|
}
|
|
383
|
-
previousOption() {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
416
|
+
previousOption(selectedItem) {
|
|
417
|
+
let previousItem = undefined;
|
|
418
|
+
if (this.useGroups) {
|
|
419
|
+
this._listGroupItems.every((group, groupIndex, listGroupItems) => {
|
|
420
|
+
let item = undefined;
|
|
421
|
+
let itemIndex = group.items.findIndex(item => item.id === selectedItem.id);
|
|
422
|
+
if (itemIndex != undefined && itemIndex != -1) {
|
|
423
|
+
if (itemIndex === 0) {
|
|
424
|
+
if (groupIndex - 1 >= 0) {
|
|
425
|
+
item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
else {
|
|
429
|
+
item = { label: group.items[itemIndex - 1].label };
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
if (item != undefined) {
|
|
433
|
+
previousItem = item;
|
|
434
|
+
return false;
|
|
435
|
+
}
|
|
436
|
+
return true;
|
|
437
|
+
});
|
|
389
438
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
439
|
+
else {
|
|
440
|
+
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
441
|
+
if (itemIndex > 0 && itemIndex < this._listItems.length) {
|
|
442
|
+
previousItem = this._listItems[itemIndex - 1];
|
|
443
|
+
}
|
|
395
444
|
}
|
|
396
|
-
this.
|
|
397
|
-
.bind("ArrowDown", () => this.nextOption())
|
|
398
|
-
.bind("ArrowUp", () => this.previousOption())
|
|
399
|
-
.bind("shift+Tab", () => this.previousOption())
|
|
400
|
-
.bind("Tab", () => this.nextOption());
|
|
445
|
+
this.setSelection(previousItem, true);
|
|
401
446
|
}
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
447
|
+
keyDownHandler(event) {
|
|
448
|
+
if (!event.ctrlKey) {
|
|
449
|
+
event.preventDefault();
|
|
450
|
+
}
|
|
451
|
+
this.getSelection().then(selectedItem => {
|
|
452
|
+
if (selectedItem) {
|
|
453
|
+
switch (event.key) {
|
|
454
|
+
case 'ArrowDown':
|
|
455
|
+
this.nextOption(selectedItem);
|
|
456
|
+
break;
|
|
457
|
+
case 'ArrowUp':
|
|
458
|
+
this.previousOption(selectedItem);
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
this.selectFirstItem();
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
event.stopPropagation();
|
|
408
467
|
}
|
|
409
468
|
getDivGroupId(groupName) {
|
|
410
469
|
if (groupName) {
|
|
@@ -469,46 +528,38 @@ const EzList = class {
|
|
|
469
528
|
doubleClickItem(item) {
|
|
470
529
|
this.ezDoubleClick.emit(item);
|
|
471
530
|
}
|
|
472
|
-
onClickItem(item) {
|
|
473
|
-
this.setSelection(item);
|
|
474
|
-
this.ezClickItem.emit(item);
|
|
475
|
-
}
|
|
476
531
|
render() {
|
|
477
|
-
return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? (index.h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
'selectable-container': this.ezSelectable,
|
|
482
|
-
'hover-feedback': this.hoverFeedback,
|
|
483
|
-
}, key: 'item_' + item.id }, {
|
|
484
|
-
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`),
|
|
485
|
-
}), index.h("div", { class: 'draggable' + (((_a = this._selectedItem) === null || _a === void 0 ? void 0 : _a.id) === item.id ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
|
|
486
|
-
this.doubleClickItem(item);
|
|
487
|
-
}, onClick: () => {
|
|
488
|
-
this.onClickItem(item);
|
|
489
|
-
}, onDragLeave: () => {
|
|
490
|
-
group.sort ? undefined : this.removeOverClass();
|
|
491
|
-
}, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: event => {
|
|
492
|
-
group.sort ? undefined : this.onDragOverItem(event);
|
|
493
|
-
}, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item'))));
|
|
494
|
-
})), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
495
|
-
this.onDragOverLastIndex(event);
|
|
496
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (index.h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
|
|
497
|
-
}))) : (index.h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0 }, index.h("ul", { class: "draggable-list" }, this._listItems.map((item, index$1) => {
|
|
498
|
-
var _a, _b;
|
|
499
|
-
return (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
532
|
+
return (index.h(index.Host, { ref: el => (this._element = el) }, this.useGroups ? (index.h("div", { class: "group-container", ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
533
|
+
this.keyDownHandler(event);
|
|
534
|
+
} }, this._listGroupItems.map(group => {
|
|
535
|
+
return (index.h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, index.h("label", { draggable: false, class: "group-name", title: group.group }, group.group), index.h("section", { class: "section-container", onDragOver: ev => ev.preventDefault() }, index.h("div", { class: "group-items-container" }, index.h("div", { class: "draggable-list" }, group.items.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
500
536
|
'selectable-container': this.ezSelectable,
|
|
501
|
-
'
|
|
502
|
-
|
|
503
|
-
|
|
537
|
+
'hover-feedback': this.hoverFeedback,
|
|
538
|
+
}, key: 'item_' + item.id }, {
|
|
539
|
+
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`),
|
|
540
|
+
}), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
|
|
504
541
|
this.doubleClickItem(item);
|
|
505
542
|
}, onClick: () => {
|
|
506
|
-
this.
|
|
507
|
-
}, onDragLeave: () =>
|
|
508
|
-
|
|
509
|
-
|
|
543
|
+
this.setSelection(item);
|
|
544
|
+
}, onDragLeave: () => {
|
|
545
|
+
group.sort ? undefined : this.removeOverClass();
|
|
546
|
+
}, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: event => {
|
|
547
|
+
group.sort ? undefined : this.onDragOverItem(event);
|
|
548
|
+
}, onDrop: event => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, this.listMode === 'regular' ? (index.h(index.Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
510
549
|
this.onDragOverLastIndex(event);
|
|
511
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
|
|
550
|
+
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (index.h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
|
|
551
|
+
}))) : (index.h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
552
|
+
this.keyDownHandler(event);
|
|
553
|
+
} }, index.h("div", { class: "draggable-list" }, this._listItems.map((item, index$1) => (index.h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
554
|
+
'selectable-container': this.ezSelectable,
|
|
555
|
+
'hover-feedback': this.hoverFeedback,
|
|
556
|
+
}, key: 'item_' + item.id }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(`ezListItem__${core.StringUtils.replaceAccentuatedChars(item.label)}`) }), index.h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onDblClick: () => {
|
|
557
|
+
this.doubleClickItem(item);
|
|
558
|
+
}, onClick: () => {
|
|
559
|
+
this.setSelection(item);
|
|
560
|
+
}, onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.listMode === 'regular' ? (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (index.h(index.Fragment, null, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
561
|
+
this.onDragOverLastIndex(event);
|
|
562
|
+
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
|
|
512
563
|
}
|
|
513
564
|
};
|
|
514
565
|
EzList.style = ezListCss;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezPopoverCss = ":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)
|
|
8
|
+
const ezPopoverCss = ":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%}";
|
|
9
9
|
|
|
10
10
|
const EzPopover = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-
|
|
8
|
+
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
9
9
|
|
|
10
10
|
const EzPopup = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -72,14 +72,7 @@ const EzPopup = class {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
getGridSize() {
|
|
75
|
-
|
|
76
|
-
return this._sizeClasses["medium"];
|
|
77
|
-
}
|
|
78
|
-
if (!this._sizeClasses[this.size]) {
|
|
79
|
-
this._element.style.setProperty("--ez-popup__container--width", this.size);
|
|
80
|
-
return "";
|
|
81
|
-
}
|
|
82
|
-
return this._sizeClasses[this.size];
|
|
75
|
+
return this._sizeClasses[this.size] || this._sizeClasses["medium"];
|
|
83
76
|
}
|
|
84
77
|
handlePopupHeight() {
|
|
85
78
|
return this.heightMode === 'auto' ? 'popup__container--auto' : '';
|
|
@@ -384,7 +384,7 @@ const EzSearch = class {
|
|
|
384
384
|
replaceHighlight(value) {
|
|
385
385
|
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
386
386
|
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
387
|
-
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
387
|
+
return String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
388
388
|
}
|
|
389
389
|
selectOption(newOption) {
|
|
390
390
|
var _a, _b;
|