@sankhyalabs/ezui 5.20.0-dev.2 → 5.20.0-dev.4
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/README.md +4 -5
- package/dist/cjs/ez-alert-list.cjs.entry.js +33 -28
- package/dist/cjs/ez-card-item.cjs.entry.js +52 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +155 -11
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +4 -2
- package/dist/cjs/ez-grid.cjs.entry.js +3 -3
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +31 -611
- package/dist/cjs/ez-split-panel.cjs.entry.js +3 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +6 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +33 -28
- package/dist/collection/components/ez-card-item/ez-card-item.css +0 -16
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +173 -12
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
- package/dist/collection/components/ez-grid/ez-grid.css +1 -0
- package/dist/collection/components/ez-grid/ez-grid.js +2 -2
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-search/ez-search.css +0 -330
- package/dist/collection/components/ez-search/ez-search.js +55 -689
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +7 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +19 -1
- package/dist/custom-elements/index.js +240 -665
- package/dist/esm/ez-alert-list.entry.js +33 -28
- package/dist/esm/ez-card-item.entry.js +48 -0
- package/dist/esm/ez-combo-box.entry.js +156 -12
- package/dist/esm/ez-filter-input_2.entry.js +132 -0
- package/dist/esm/ez-form-view.entry.js +4 -2
- package/dist/esm/ez-grid.entry.js +3 -3
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +33 -613
- package/dist/esm/ez-split-panel.entry.js +3 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +6 -2
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-05f5a778.entry.js +1 -0
- package/dist/ezui/p-13dbad96.entry.js +1 -0
- package/dist/ezui/p-5613fe63.entry.js +1 -0
- package/dist/ezui/p-60848ef6.entry.js +1 -0
- package/dist/ezui/{p-6e2f8e6b.entry.js → p-844ee673.entry.js} +1 -1
- package/dist/ezui/{p-f56dd1da.entry.js → p-93c3df4f.entry.js} +1 -1
- package/dist/ezui/p-940ed30b.entry.js +1 -0
- package/dist/ezui/p-a32aaac6.entry.js +1 -0
- package/dist/ezui/p-a5ac7151.entry.js +1 -0
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -0
- package/dist/types/components/ez-search/ez-search.d.ts +10 -100
- package/dist/types/components.d.ts +22 -23
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +1 -2
- package/package.json +16 -8
- package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -182
- package/dist/esm/ez-card-item_3.entry.js +0 -176
- package/dist/ezui/p-133fae4a.entry.js +0 -1
- package/dist/ezui/p-43b03119.entry.js +0 -1
- package/dist/ezui/p-4a7f113d.entry.js +0 -1
- package/dist/ezui/p-76ba9d67.entry.js +0 -1
- package/dist/ezui/p-796c1a88.entry.js +0 -1
- package/dist/ezui/p-ba875f37.entry.js +0 -1
|
@@ -57,11 +57,13 @@ const EzAlertList = class {
|
|
|
57
57
|
/**
|
|
58
58
|
* Gerencia a exibição do overlay usando FloatingManager do Core.
|
|
59
59
|
*/
|
|
60
|
-
|
|
61
|
-
if (this.opened) {
|
|
60
|
+
manageOverlay() {
|
|
61
|
+
if (this.opened && this._container) {
|
|
62
62
|
this._overlayId = FloatingManager.float(this._container, this._overlayRef, this.getFloatOptions());
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
+
if (this._overlayId === undefined)
|
|
66
|
+
return;
|
|
65
67
|
FloatingManager.close(this._overlayId);
|
|
66
68
|
this._overlayId = undefined;
|
|
67
69
|
}
|
|
@@ -70,8 +72,10 @@ const EzAlertList = class {
|
|
|
70
72
|
* Atualiza a posição da lista.
|
|
71
73
|
*/
|
|
72
74
|
updatePosition(right, bottom) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
if (this.opened) {
|
|
76
|
+
FloatingManager.updateFloatPosition(this._container, this._overlayRef, Object.assign(Object.assign({}, this.getFloatOptions()), { right,
|
|
77
|
+
bottom }));
|
|
78
|
+
}
|
|
75
79
|
}
|
|
76
80
|
;
|
|
77
81
|
/**
|
|
@@ -80,7 +84,7 @@ const EzAlertList = class {
|
|
|
80
84
|
getFloatOptions() {
|
|
81
85
|
return {
|
|
82
86
|
autoClose: false,
|
|
83
|
-
isFixed:
|
|
87
|
+
isFixed: true,
|
|
84
88
|
bottom: '10px',
|
|
85
89
|
right: '10px',
|
|
86
90
|
};
|
|
@@ -102,9 +106,9 @@ const EzAlertList = class {
|
|
|
102
106
|
const boxHeight = this._container.getBoundingClientRect().height;
|
|
103
107
|
return ((docHeight - boxHeight) / 2) + 'px';
|
|
104
108
|
}
|
|
105
|
-
|
|
109
|
+
componentDidLoad() {
|
|
106
110
|
this.manageOverlay();
|
|
107
|
-
if (this.opened) {
|
|
111
|
+
if (this.opened && this._container) {
|
|
108
112
|
this._container.focus();
|
|
109
113
|
}
|
|
110
114
|
}
|
|
@@ -112,27 +116,28 @@ const EzAlertList = class {
|
|
|
112
116
|
this.dataElementId = ElementIDUtils.addIDInfo(this._element, 'EzAlertList');
|
|
113
117
|
}
|
|
114
118
|
render() {
|
|
115
|
-
return (h(Host, Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: this.dataElementId }),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
119
|
+
return (h(Host, Object.assign({}, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: this.dataElementId }), this.opened ?
|
|
120
|
+
(h("div", { ref: elem => (this._overlayRef = elem) }, h("div", { class: `alert-list__container ${this.expanded ? 'expanded' : ''}`, ref: elem => (this._container = elem) }, h("div", { class: "alert-list__content" }, h("div", { class: "alert-list__header" }, h("div", { class: "alert-list__title" }, `Avisos (${this.alerts.length})`), h("div", { class: "alert-list__header__buttons" }, this.enableExpand && (h("ez-button", { mode: "icon", size: "small", iconName: "expand", onClick: () => this.toggleExpandContainer(), "data-element-id": ElementIDUtils.getInternalIDInfo('expandButton'), title: this.expanded ? 'Resumir' : 'Expandir' })), h("ez-button", { mode: "icon", size: "small", iconName: "close", "data-element-id": ElementIDUtils.getInternalIDInfo('closeButton'), onClick: () => {
|
|
121
|
+
this.opened = false;
|
|
122
|
+
}, title: 'Fechar' }))), h("div", { class: "alert-list__expandable-content" }, h("ez-list", { itemSlotBuilder: this.itemRightSlotBuilder, hoverFeedback: true, itemLeftSlotBuilder: item => {
|
|
123
|
+
return (h("a", { href: "#", style: {
|
|
124
|
+
fontFamily: "var(--font-pattern, 'Roboto')",
|
|
125
|
+
fontSize: 'var(--text--medium, 14px)',
|
|
126
|
+
fontWeight: 'var(--text-weight--medium, 400)',
|
|
127
|
+
color: 'var(--color--primary, #008561)',
|
|
128
|
+
marginRight: '4px',
|
|
129
|
+
cursor: 'pointer',
|
|
130
|
+
display: 'flex',
|
|
131
|
+
width: 'max-content',
|
|
132
|
+
textDecoration: 'none'
|
|
133
|
+
} }, this.getTitleText(item)));
|
|
134
|
+
}, dataSource: this.alerts.map((alert, index) => {
|
|
135
|
+
var _a;
|
|
136
|
+
return {
|
|
137
|
+
id: this.alertId(alert.title, index),
|
|
138
|
+
label: (_a = alert.detail) !== null && _a !== void 0 ? _a : "",
|
|
139
|
+
};
|
|
140
|
+
}) })))))) : null));
|
|
136
141
|
}
|
|
137
142
|
get _element() { return getElement(this); }
|
|
138
143
|
static get watchers() { return {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
|
+
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
|
|
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;line-break:anywhere;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)}";
|
|
5
|
+
|
|
6
|
+
const EzCardItem = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.ezClick = createEvent(this, "ezClick", 7);
|
|
10
|
+
this.item = undefined;
|
|
11
|
+
}
|
|
12
|
+
componentWillRender() {
|
|
13
|
+
this.createDetailList();
|
|
14
|
+
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const dataInfo = { id: StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
|
|
18
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
19
|
+
}
|
|
20
|
+
createDetailList() {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
this._details = { detailsLeft: [], detailsRight: [] };
|
|
23
|
+
let cont = 0;
|
|
24
|
+
if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
|
|
25
|
+
for (const attribute in this.item.details) {
|
|
26
|
+
cont < 3 ?
|
|
27
|
+
this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
|
|
28
|
+
this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
|
|
29
|
+
cont++;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
buildDetailContent(detail) {
|
|
34
|
+
return h("div", { class: "card-item__detail" }, h("label", { class: "card-item__detail-label" }, detail.label), ": ", h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (h(Host, null, this.item &&
|
|
38
|
+
h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, h("label", { class: "card-item__title" }, h("span", { class: "card-item__key", innerHTML: this.item.key }), h("span", { innerHTML: this.item.title })), h("div", { class: "card-item__details" }, h("div", { class: "card-item__details-left" }, this._details.detailsLeft.map(detail => {
|
|
39
|
+
return this.buildDetailContent(detail);
|
|
40
|
+
})), h("div", { class: "card-item__details-right" }, this._details.detailsRight.map(detail => {
|
|
41
|
+
return this.buildDetailContent(detail);
|
|
42
|
+
}))))));
|
|
43
|
+
}
|
|
44
|
+
get _element() { return getElement(this); }
|
|
45
|
+
};
|
|
46
|
+
EzCardItem.style = ezCardItemCss;
|
|
47
|
+
|
|
48
|
+
export { EzCardItem as ez_card_item };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
|
-
import { ObjectUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import './ApplicationUtils-eaf91331.js';
|
|
2
|
+
import { ObjectUtils, FloatingManager, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
|
|
4
4
|
import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
|
|
5
5
|
import './DialogType-54a62731.js';
|
|
6
6
|
import './CheckMode-bdb2ec19.js';
|
|
7
|
+
import { R as REQUIRED_INFO } from './constants-4e0d35b7.js';
|
|
7
8
|
|
|
8
9
|
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box__list-min-width:64px;--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-combo-box__list-min-width);position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
9
10
|
|
|
@@ -16,6 +17,7 @@ const EzComboBox = class {
|
|
|
16
17
|
this._maxWidthValue = 0;
|
|
17
18
|
this._tabPressed = false;
|
|
18
19
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
20
|
+
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
19
21
|
this._lookupMode = false;
|
|
20
22
|
this._preSelection = undefined;
|
|
21
23
|
this._visibleOptions = undefined;
|
|
@@ -28,6 +30,7 @@ const EzComboBox = class {
|
|
|
28
30
|
this.enabled = true;
|
|
29
31
|
this.options = undefined;
|
|
30
32
|
this.errorMessage = undefined;
|
|
33
|
+
this.searchMode = undefined;
|
|
31
34
|
this.showSelectedValue = false;
|
|
32
35
|
this.showOptionValue = false;
|
|
33
36
|
this.suppressSearch = false;
|
|
@@ -51,7 +54,7 @@ const EzComboBox = class {
|
|
|
51
54
|
observeValue(newValue, oldValue) {
|
|
52
55
|
if (this._textInput && newValue != oldValue) {
|
|
53
56
|
try {
|
|
54
|
-
if (typeof newValue === "string") {
|
|
57
|
+
if (this.searchMode && typeof newValue === "string") {
|
|
55
58
|
this.setInputValue();
|
|
56
59
|
return;
|
|
57
60
|
}
|
|
@@ -214,7 +217,7 @@ const EzComboBox = class {
|
|
|
214
217
|
}
|
|
215
218
|
updateVisibleOptions() {
|
|
216
219
|
let opts = this._source || [];
|
|
217
|
-
if (this._criteria) {
|
|
220
|
+
if (!this.searchMode && this._criteria) {
|
|
218
221
|
const upperCriteria = this._criteria.toUpperCase();
|
|
219
222
|
opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
|
|
220
223
|
}
|
|
@@ -289,7 +292,7 @@ const EzComboBox = class {
|
|
|
289
292
|
return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
|
|
290
293
|
}
|
|
291
294
|
nextOption() {
|
|
292
|
-
if (!this.isOptionsVisible()) {
|
|
295
|
+
if (this.searchMode && !this.isOptionsVisible()) {
|
|
293
296
|
return;
|
|
294
297
|
}
|
|
295
298
|
this.showOptions();
|
|
@@ -312,6 +315,9 @@ const EzComboBox = class {
|
|
|
312
315
|
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
313
316
|
this._preSelection = undefined;
|
|
314
317
|
}
|
|
318
|
+
else {
|
|
319
|
+
this.controlListWithOnlyOne();
|
|
320
|
+
}
|
|
315
321
|
}
|
|
316
322
|
updateSource(source) {
|
|
317
323
|
this._startLoading = false;
|
|
@@ -330,6 +336,7 @@ const EzComboBox = class {
|
|
|
330
336
|
this.updateVisibleOptions();
|
|
331
337
|
if (this._tabPressed) {
|
|
332
338
|
this._tabPressed = false;
|
|
339
|
+
this.controlEmptySearch();
|
|
333
340
|
}
|
|
334
341
|
}
|
|
335
342
|
else {
|
|
@@ -337,6 +344,10 @@ const EzComboBox = class {
|
|
|
337
344
|
}
|
|
338
345
|
}
|
|
339
346
|
}
|
|
347
|
+
clearSource() {
|
|
348
|
+
this._source = [];
|
|
349
|
+
this.updateVisibleOptions();
|
|
350
|
+
}
|
|
340
351
|
selectOption(newOption) {
|
|
341
352
|
var _a, _b;
|
|
342
353
|
const currentValue = this.getSelectedOption(this.value);
|
|
@@ -348,6 +359,10 @@ const EzComboBox = class {
|
|
|
348
359
|
else {
|
|
349
360
|
this.resetOptions();
|
|
350
361
|
}
|
|
362
|
+
if (this.searchMode) {
|
|
363
|
+
this._visibleOptions = [];
|
|
364
|
+
this.clearSource();
|
|
365
|
+
}
|
|
351
366
|
}
|
|
352
367
|
loadOptions(mode, argument = "") {
|
|
353
368
|
this._criteria = argument;
|
|
@@ -383,6 +398,93 @@ const EzComboBox = class {
|
|
|
383
398
|
clearSearch() {
|
|
384
399
|
this.value = null;
|
|
385
400
|
}
|
|
401
|
+
controlListWithOnlyOne() {
|
|
402
|
+
var _a;
|
|
403
|
+
if (this.searchMode) {
|
|
404
|
+
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
405
|
+
if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
|
|
406
|
+
this.selectOption(source[0]);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
controlEmptySearch() {
|
|
411
|
+
var _a;
|
|
412
|
+
if (this.searchMode) {
|
|
413
|
+
if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
414
|
+
this.clearSearch();
|
|
415
|
+
ApplicationUtils.info(this._textEmptyList);
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
this.controlListWithOnlyOne();
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
validateDescriptionValue() {
|
|
423
|
+
if (!this.searchMode || StringUtils.isEmpty(this.value)) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
let value = this.value;
|
|
427
|
+
if (typeof value === "object") {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
if (StringUtils.isEmpty(value)) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
this.loadDescriptionValue(value);
|
|
434
|
+
}
|
|
435
|
+
async loadDescriptionValue(argument) {
|
|
436
|
+
var _a, _b;
|
|
437
|
+
if (argument == undefined) {
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
441
|
+
this.loadOptionValue(argument);
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
const searchArgument = {
|
|
445
|
+
mode: SearchMode.PREDICTIVE,
|
|
446
|
+
argument
|
|
447
|
+
};
|
|
448
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
449
|
+
if (source == undefined) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
if (source instanceof Promise) {
|
|
453
|
+
source.then((result) => {
|
|
454
|
+
this.setDescriptionValue(result);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
this.setDescriptionValue(source);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
setDescriptionValue(source) {
|
|
462
|
+
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
463
|
+
if (value == undefined || !Object.keys(value).length) {
|
|
464
|
+
this.showNoResultMessage();
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
this._lookupMode = true;
|
|
468
|
+
this.value = value;
|
|
469
|
+
}
|
|
470
|
+
loadOptionValue(argument) {
|
|
471
|
+
var _a;
|
|
472
|
+
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
473
|
+
if (source != undefined) {
|
|
474
|
+
this.selectOption(source);
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
this.showNoResultMessage();
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
async showNoResultMessage() {
|
|
481
|
+
this.clearSearch();
|
|
482
|
+
ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
|
|
483
|
+
}
|
|
484
|
+
getFieldLabel() {
|
|
485
|
+
var _a;
|
|
486
|
+
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
|
|
487
|
+
}
|
|
386
488
|
resetOptions() {
|
|
387
489
|
this.hideOptions();
|
|
388
490
|
this._criteria = undefined;
|
|
@@ -408,7 +510,12 @@ const EzComboBox = class {
|
|
|
408
510
|
});
|
|
409
511
|
}
|
|
410
512
|
}
|
|
411
|
-
this.
|
|
513
|
+
if (this.searchMode) {
|
|
514
|
+
this.updateSource([]);
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
this.loadOptions(SearchMode.PRELOAD);
|
|
518
|
+
}
|
|
412
519
|
}
|
|
413
520
|
componentDidRender() {
|
|
414
521
|
var _a;
|
|
@@ -418,6 +525,7 @@ const EzComboBox = class {
|
|
|
418
525
|
(_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
|
|
419
526
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
|
|
420
527
|
});
|
|
528
|
+
this.validateDescriptionValue();
|
|
421
529
|
}
|
|
422
530
|
componentDidLoad() {
|
|
423
531
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
@@ -437,7 +545,13 @@ const EzComboBox = class {
|
|
|
437
545
|
// Event handlers
|
|
438
546
|
//---------------------------------------------
|
|
439
547
|
handlerIconClick() {
|
|
440
|
-
this.showOptions();
|
|
548
|
+
this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
|
|
549
|
+
}
|
|
550
|
+
buildNumberArgument(argument) {
|
|
551
|
+
if (this.isTextSearch) {
|
|
552
|
+
return NaN;
|
|
553
|
+
}
|
|
554
|
+
return Number(argument || undefined);
|
|
441
555
|
}
|
|
442
556
|
onTextInputChangeHandler(event) {
|
|
443
557
|
var _a;
|
|
@@ -454,12 +568,36 @@ const EzComboBox = class {
|
|
|
454
568
|
}
|
|
455
569
|
this._criteria = argument;
|
|
456
570
|
if (argument) {
|
|
457
|
-
this.
|
|
458
|
-
|
|
571
|
+
if (this.searchMode) {
|
|
572
|
+
this._showLoading = false;
|
|
573
|
+
this.clearSource();
|
|
574
|
+
const enoughChars = argument.length >= this.limitCharsToSearch;
|
|
575
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
576
|
+
if (enoughChars || !isNaN(argumentNumber)) {
|
|
577
|
+
this._showLoading = true;
|
|
578
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
579
|
+
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
580
|
+
}, this._deboucingTime);
|
|
581
|
+
this.showOptions();
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
this.hideOptions();
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
else {
|
|
588
|
+
this.updateVisibleOptions();
|
|
589
|
+
this.showOptions();
|
|
590
|
+
}
|
|
459
591
|
}
|
|
460
592
|
else {
|
|
461
593
|
this.hideOptions();
|
|
462
|
-
this.
|
|
594
|
+
if (this.searchMode) {
|
|
595
|
+
this._showLoading = false;
|
|
596
|
+
this.clearSource();
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
599
|
+
this.updateVisibleOptions();
|
|
600
|
+
}
|
|
463
601
|
}
|
|
464
602
|
}
|
|
465
603
|
clearDeboucingTimeout() {
|
|
@@ -469,7 +607,9 @@ const EzComboBox = class {
|
|
|
469
607
|
}
|
|
470
608
|
}
|
|
471
609
|
onTextInputClickHandler() {
|
|
472
|
-
this.
|
|
610
|
+
if (!this.searchMode) {
|
|
611
|
+
this.showOptions();
|
|
612
|
+
}
|
|
473
613
|
}
|
|
474
614
|
keyDownHandler(event) {
|
|
475
615
|
this._tabPressed = false;
|
|
@@ -501,6 +641,7 @@ const EzComboBox = class {
|
|
|
501
641
|
break;
|
|
502
642
|
case "Tab":
|
|
503
643
|
this._tabPressed = true;
|
|
644
|
+
this.controlListWithOnlyOne();
|
|
504
645
|
break;
|
|
505
646
|
}
|
|
506
647
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -517,8 +658,11 @@ const EzComboBox = class {
|
|
|
517
658
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
518
659
|
}
|
|
519
660
|
render() {
|
|
661
|
+
var _a;
|
|
520
662
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
521
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName:
|
|
663
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
664
|
+
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
665
|
+
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
522
666
|
&& this._visibleOptions.length === 0
|
|
523
667
|
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
524
668
|
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
|
|
4
|
+
|
|
5
|
+
const ezFilterInputCss = ":host{display:block;width:100%}";
|
|
6
|
+
|
|
7
|
+
const EzFilterInput = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
11
|
+
this.ezSearching = createEvent(this, "ezSearching", 7);
|
|
12
|
+
this.ezFocusIn = createEvent(this, "ezFocusIn", 7);
|
|
13
|
+
this._searchingText = "";
|
|
14
|
+
this.handleFocus = () => {
|
|
15
|
+
if (this._searchingText === "") {
|
|
16
|
+
this._textInput.value = "";
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this._textInput.value = this._searchingText;
|
|
20
|
+
}
|
|
21
|
+
this.ezFocusIn.emit();
|
|
22
|
+
};
|
|
23
|
+
this.label = undefined;
|
|
24
|
+
this.value = undefined;
|
|
25
|
+
this.enabled = true;
|
|
26
|
+
this.errorMessage = undefined;
|
|
27
|
+
this.restrict = undefined;
|
|
28
|
+
this.mode = "regular";
|
|
29
|
+
this.asyncSearch = false;
|
|
30
|
+
this.canShowError = true;
|
|
31
|
+
}
|
|
32
|
+
observeLabel() {
|
|
33
|
+
if (this._textInput) {
|
|
34
|
+
this._textInput.label = this.label;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
observeErrorMessage() {
|
|
38
|
+
if (this._textInput) {
|
|
39
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
observeValue(newValue, oldValue) {
|
|
43
|
+
if (this._textInput && newValue != oldValue) {
|
|
44
|
+
this._textInput.value = newValue;
|
|
45
|
+
this.ezChange.emit(newValue);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Aplica o foco no campo.
|
|
50
|
+
*/
|
|
51
|
+
async setFocus() {
|
|
52
|
+
this._textInput.setFocus();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Remove o foco do campo.
|
|
56
|
+
*/
|
|
57
|
+
async setBlur() {
|
|
58
|
+
this._textInput.setBlur();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Retorna se o conteúdo é inválido.
|
|
62
|
+
*/
|
|
63
|
+
async isInvalid() {
|
|
64
|
+
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Método responsável por setar um novo valor ao campo.
|
|
68
|
+
*/
|
|
69
|
+
async setValue(newValue) {
|
|
70
|
+
if (!this.asyncSearch || this._textInput == undefined) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (newValue !== this.value) {
|
|
74
|
+
this.value = newValue;
|
|
75
|
+
this._searchingText = "";
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this._textInput.value = newValue;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Método responsável por resetar o valor do campo para o ultimo valor inputado.
|
|
83
|
+
*/
|
|
84
|
+
async endSearch() {
|
|
85
|
+
if (!this.asyncSearch || this._textInput == undefined) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (this._textInput.value !== this.value) {
|
|
89
|
+
this._textInput.value = this.value;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
handleChange(evt) {
|
|
93
|
+
const newValue = evt.detail;
|
|
94
|
+
this.errorMessage = "";
|
|
95
|
+
if (this.asyncSearch) {
|
|
96
|
+
this._searchingText = newValue;
|
|
97
|
+
this.ezSearching.emit(newValue);
|
|
98
|
+
}
|
|
99
|
+
else if (newValue !== this.value) {
|
|
100
|
+
this.value = newValue;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
componentDidLoad() {
|
|
104
|
+
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
108
|
+
return (h("ez-text-input", { "data-element-id": 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 }, h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
109
|
+
}
|
|
110
|
+
get _elem() { return getElement(this); }
|
|
111
|
+
static get watchers() { return {
|
|
112
|
+
"label": ["observeLabel"],
|
|
113
|
+
"errorMessage": ["observeErrorMessage"],
|
|
114
|
+
"value": ["observeValue"]
|
|
115
|
+
}; }
|
|
116
|
+
};
|
|
117
|
+
EzFilterInput.style = ezFilterInputCss;
|
|
118
|
+
|
|
119
|
+
const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
|
|
120
|
+
|
|
121
|
+
const MultiSelectionBoxMessage = class {
|
|
122
|
+
constructor(hostRef) {
|
|
123
|
+
registerInstance(this, hostRef);
|
|
124
|
+
this.message = undefined;
|
|
125
|
+
}
|
|
126
|
+
render() {
|
|
127
|
+
return (h("div", { class: "multi-selection__message" }, h("span", { class: "multi-selection__text-message" }, this.message)));
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
MultiSelectionBoxMessage.style = multiSelectionBoxMessageCss;
|
|
131
|
+
|
|
132
|
+
export { EzFilterInput as ez_filter_input, MultiSelectionBoxMessage as multi_selection_box_message };
|
|
@@ -44,9 +44,11 @@ const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) =>
|
|
|
44
44
|
const buildFile = ({ name, label, readOnly, contextName, props }) => {
|
|
45
45
|
const uploadProps = ObjectUtils.removeEmptyValues({
|
|
46
46
|
subTitle: props.subTitle,
|
|
47
|
-
requestHeaders: props.STORAGESTRATEGY
|
|
47
|
+
requestHeaders: Object.assign(Object.assign({}, (props.STORAGESTRATEGY && {
|
|
48
48
|
STORAGESTRATEGY: props.STORAGESTRATEGY
|
|
49
|
-
}
|
|
49
|
+
})), (props.INTERNAL_FILENAME && {
|
|
50
|
+
INTERNAL_FILENAME: props.INTERNAL_FILENAME
|
|
51
|
+
})),
|
|
50
52
|
});
|
|
51
53
|
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
52
54
|
h("ez-upload", Object.assign({ enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name }, uploadProps))));
|
|
@@ -120627,13 +120627,13 @@ class InMemoryFilterColumnDataSource {
|
|
|
120627
120627
|
}
|
|
120628
120628
|
}
|
|
120629
120629
|
|
|
120630
|
-
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100
|
|
120630
|
+
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;min-height:300px;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}";
|
|
120631
120631
|
|
|
120632
120632
|
const windowInstace = window;
|
|
120633
120633
|
const matches = (text, filter) => {
|
|
120634
|
-
const normalizedText = StringUtils$1.replaceAccentuatedCharsLower(text.toLocaleLowerCase());
|
|
120634
|
+
const normalizedText = StringUtils$1.replaceAccentuatedCharsLower(text === null || text === void 0 ? void 0 : text.toLocaleLowerCase());
|
|
120635
120635
|
const normalizedFilter = StringUtils$1.replaceAccentuatedCharsLower(filter.toLocaleLowerCase());
|
|
120636
|
-
return normalizedText.includes(normalizedFilter);
|
|
120636
|
+
return normalizedText === null || normalizedText === void 0 ? void 0 : normalizedText.includes(normalizedFilter);
|
|
120637
120637
|
};
|
|
120638
120638
|
const EzGrid = class {
|
|
120639
120639
|
constructor(hostRef) {
|