@sankhyalabs/ezui 3.0.3 → 3.1.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/{ApplicationUtils-350ac2ff.js → ApplicationUtils-1eef635f.js} +8 -4
- package/dist/cjs/constants-5a75e2f3.js +5 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +263 -9
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +95 -11
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input_4.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +3 -2
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid.cjs.entry.js +1 -1
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-edit.cjs.entry.js +2 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +11 -3
- package/dist/cjs/ez-upload.cjs.entry.js +2 -2
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/{index-892780f1.js → index-b54f47a1.js} +5 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css +10 -1
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js +291 -9
- package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js +31 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +93 -9
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
- package/dist/collection/components/ez-toast/ez-toast.css +1 -1
- package/dist/collection/components/ez-toast/ez-toast.js +9 -1
- package/dist/collection/utils/ApplicationUtils.js +8 -4
- package/dist/collection/utils/constants.js +1 -0
- package/dist/custom-elements/index.js +377 -26
- package/dist/esm/{ApplicationUtils-9fda4796.js → ApplicationUtils-79bf1d95.js} +8 -4
- package/dist/esm/constants-ca136201.js +3 -0
- package/dist/esm/ez-actions-button.entry.js +2 -2
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +264 -10
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +2 -2
- package/dist/esm/ez-combo-box.entry.js +95 -11
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input_4.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +3 -2
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid.entry.js +1 -1
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-edit.entry.js +2 -2
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +11 -3
- package/dist/esm/ez-upload.entry.js +2 -2
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/{index-de655f48.js → index-c27164d3.js} +5 -0
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-7ffd12e7.js → p-00ea9b50.js} +2 -2
- package/dist/ezui/{p-0c7e81fe.entry.js → p-044a3427.entry.js} +1 -1
- package/dist/ezui/{p-6818dd0a.entry.js → p-064e558f.entry.js} +1 -1
- package/dist/ezui/{p-c98e571a.entry.js → p-0f76448d.entry.js} +1 -1
- package/dist/ezui/{p-36f7ec68.entry.js → p-124859c3.entry.js} +1 -1
- package/dist/ezui/{p-9613fae6.entry.js → p-149442dd.entry.js} +1 -1
- package/dist/ezui/{p-493e2af4.entry.js → p-1806b3c6.entry.js} +1 -1
- package/dist/ezui/{p-37b4bf04.entry.js → p-1a1c2eda.entry.js} +1 -1
- package/dist/ezui/{p-eceb9382.entry.js → p-1cfae451.entry.js} +1 -1
- package/dist/ezui/{p-07b99b94.entry.js → p-216e1153.entry.js} +1 -1
- package/dist/ezui/{p-1b95836f.entry.js → p-2c5f1107.entry.js} +1 -1
- package/dist/ezui/{p-fcf6cf57.entry.js → p-2d16e8c2.entry.js} +1 -1
- package/dist/ezui/p-30afcb93.entry.js +1 -0
- package/dist/ezui/{p-a323b415.entry.js → p-330aef41.entry.js} +1 -1
- package/dist/ezui/p-3f4ae3a3.js +1 -0
- package/dist/ezui/p-51ecf138.entry.js +1 -0
- package/dist/ezui/{p-f670bd32.entry.js → p-52e5cc09.entry.js} +1 -1
- package/dist/ezui/{p-c0184982.entry.js → p-66dba09c.entry.js} +1 -1
- package/dist/ezui/p-68acdc61.entry.js +1 -0
- package/dist/ezui/{p-4bfed869.entry.js → p-74379544.entry.js} +1 -1
- package/dist/ezui/{p-b1e4ccf4.entry.js → p-74b3615b.entry.js} +1 -1
- package/dist/ezui/{p-db131605.entry.js → p-77d70bae.entry.js} +1 -1
- package/dist/ezui/{p-600f1732.entry.js → p-78b28632.entry.js} +1 -1
- package/dist/ezui/{p-a4b281ca.entry.js → p-7ff5d0cc.entry.js} +1 -1
- package/dist/ezui/{p-cc5cfcb7.entry.js → p-80f79b1c.entry.js} +1 -1
- package/dist/ezui/{p-06b3e801.entry.js → p-85c1e00f.entry.js} +1 -1
- package/dist/ezui/{p-c1300e84.entry.js → p-8f1a5e21.entry.js} +1 -1
- package/dist/ezui/p-90c3d4fd.entry.js +1 -0
- package/dist/ezui/{p-b941aeee.entry.js → p-936ae3ac.entry.js} +1 -1
- package/dist/ezui/{p-b3c7b243.entry.js → p-93c8bdc6.entry.js} +1 -1
- package/dist/ezui/p-a0e47238.entry.js +1 -0
- package/dist/ezui/{p-86d29565.entry.js → p-aaba630e.entry.js} +1 -1
- package/dist/ezui/{p-62481744.entry.js → p-bb011a51.entry.js} +1 -1
- package/dist/ezui/{p-fd87638e.entry.js → p-bb0607a6.entry.js} +1 -1
- package/dist/ezui/{p-b405d9b6.entry.js → p-bf442859.entry.js} +1 -1
- package/dist/ezui/{p-8ca4750d.entry.js → p-bfca509e.entry.js} +1 -1
- package/dist/ezui/{p-82db6de7.entry.js → p-cd1e0679.entry.js} +1 -1
- package/dist/ezui/{p-cc40fcb3.entry.js → p-ce1408dd.entry.js} +1 -1
- package/dist/ezui/{p-1581fece.entry.js → p-dd13d0e6.entry.js} +1 -1
- package/dist/ezui/{p-a67e056f.entry.js → p-e6cf82e8.entry.js} +1 -1
- package/dist/ezui/{p-695facd0.entry.js → p-e8271a0e.entry.js} +1 -1
- package/dist/ezui/p-efb43dd8.js +1 -0
- package/dist/types/components/ez-breadcrumb/ez-breadcrumb.d.ts +52 -2
- package/dist/types/components/ez-breadcrumb/subcomponents/breadcrumb-item.d.ts +13 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +10 -0
- package/dist/types/components/ez-toast/ez-toast.d.ts +1 -0
- package/dist/types/components.d.ts +25 -1
- package/dist/types/utils/ApplicationUtils.d.ts +4 -4
- package/dist/types/utils/constants.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ezui/p-69a913b8.js +0 -1
- package/dist/ezui/p-a8c7355e.entry.js +0 -1
- package/dist/ezui/p-ada6e6b0.entry.js +0 -1
- package/dist/ezui/p-d6dd32b2.entry.js +0 -1
- package/dist/ezui/p-e0d756d9.entry.js +0 -1
- package/dist/ezui/p-f18d39e6.entry.js +0 -1
|
@@ -1,27 +1,281 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent,
|
|
2
|
-
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, g as getElement } from './index-c27164d3.js';
|
|
2
|
+
import { ElementIDUtils, JSUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const BreadcrumbItem = (props) => {
|
|
5
|
+
const { items, selectedItem, itemsHidden, showDropdown, handleShowDropdown, collapseConfigPosition, ellipsesPositionedEnd } = props;
|
|
6
|
+
const formatDropdownItems = () => {
|
|
7
|
+
return itemsHidden.map((item) => ({
|
|
8
|
+
id: item.id,
|
|
9
|
+
label: item.label,
|
|
10
|
+
type: 'item',
|
|
11
|
+
children: null,
|
|
12
|
+
iconName: item.iconName || null,
|
|
13
|
+
subAction: null,
|
|
14
|
+
group: null
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
const onClickEllipsis = (evt) => {
|
|
18
|
+
evt.stopPropagation();
|
|
19
|
+
handleShowDropdown(!showDropdown);
|
|
20
|
+
};
|
|
21
|
+
const createEllipsis = (item) => {
|
|
22
|
+
return (h("li", Object.assign({ class: "breadcrumb__item", onClick: evt => onClickEllipsis(evt) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezBreadcrumbItem_ellipsis`) }),
|
|
23
|
+
ellipsesPositionedEnd && h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` })),
|
|
24
|
+
h("span", { class: "ellipses__item" }, "..."),
|
|
25
|
+
ellipsesPositionedEnd || h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` })),
|
|
26
|
+
showDropdown &&
|
|
27
|
+
h("ez-dropdown", Object.assign({ class: "dropdown-ellipsis", items: formatDropdownItems(), onEzClick: (evt) => {
|
|
28
|
+
const { id, label, iconName } = evt.detail;
|
|
29
|
+
selectedItem.emit({ id, label, iconName });
|
|
30
|
+
} }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("dropdown")}` }))));
|
|
31
|
+
};
|
|
32
|
+
return (h("div", { class: "breadcrumb__items" }, items.map((item, index) => {
|
|
33
|
+
const isLastItem = index === (items.length - 1);
|
|
34
|
+
return (h("div", { class: "breadcrumb__group" },
|
|
35
|
+
collapseConfigPosition === index && createEllipsis(item),
|
|
36
|
+
h("li", Object.assign({ class: "breadcrumb__item", id: item.id }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezBreadcrumb_item_${item.id}_${item.label}`) }),
|
|
37
|
+
item.iconName && h("ez-icon", Object.assign({ class: `breadcrumb__item--icon ${(isLastItem && !ellipsesPositionedEnd) ? 'active-icon' : ''}`, size: "small", iconName: item.iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconItem${item.id}`)}` })),
|
|
38
|
+
h("p", { class: `breadcrumb__item--label ${(isLastItem && !ellipsesPositionedEnd) ? 'active' : ''}`, onClick: (ellipsesPositionedEnd || !isLastItem) ? () => selectedItem.emit(item) : undefined }, item.label),
|
|
39
|
+
!isLastItem && h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` }))),
|
|
40
|
+
(collapseConfigPosition - 1 === index && ellipsesPositionedEnd) && createEllipsis(item)));
|
|
41
|
+
})));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const ezBreadcrumbCss = ":host{--breadcrumb__item--label--color--title-primary:var(--color--title-primary, #2B3A54);--breadcrumb__item--label--color--active:var(--color--primary, '#008561');--breadcrumb__item--label--font-weight:var(--text-weight--large, 600);display:block;font-size:var(--text--medium, 14px);font-family:var(--font-pattern, \"Roboto\");font-weight:var(--text-weight--medium, 400)}.breadcrumb__group{display:flex}.breadcrumb__list{list-style-type:none;display:inline-block;margin:0;padding:0;overflow:hidden;white-space:nowrap}.breadcrumb__item{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb__item--label{color:var(--breadcrumb__item--label--color--title-primary);margin:0px}.breadcrumb__item--icon{padding-right:3px;color:var(--breadcrumb__item--label--color--title-primary)}.breadcrumb__item--chevron{padding:0px 6px;cursor:default}.active{color:var(--breadcrumb__item--label--color--active);font-weight:var(--breadcrumb__item--label--font-weight);cursor:default}.active-icon{--icon--color:var(--breadcrumb__item--label--color--active);cursor:default}.breadcrumb__items{display:flex}";
|
|
5
45
|
|
|
6
46
|
const EzBreadcrumb = class {
|
|
7
47
|
constructor(hostRef) {
|
|
8
48
|
registerInstance(this, hostRef);
|
|
9
|
-
this.
|
|
49
|
+
this.selectedItem = createEvent(this, "selectedItem", 7);
|
|
50
|
+
this._ellipsesPositionedEnd = false;
|
|
51
|
+
this._renderSecond = false;
|
|
52
|
+
this.INDEX_ITEM_TO_REMOVE = 1; // sempre removemos o segundo item.
|
|
53
|
+
this.CHEVRON_SIZE = 28;
|
|
54
|
+
this.handleShowDropdown = (newState) => {
|
|
55
|
+
this.showDropdown = newState;
|
|
56
|
+
};
|
|
10
57
|
this.items = [];
|
|
58
|
+
this.fillMode = "auto";
|
|
59
|
+
this.maxItems = 4;
|
|
60
|
+
this.positionEllipsis = 1;
|
|
61
|
+
this.visibleItems = undefined;
|
|
62
|
+
this.hiddenItems = [];
|
|
63
|
+
this.showDropdown = false;
|
|
64
|
+
this.collapseConfigPosition = -1;
|
|
65
|
+
}
|
|
66
|
+
watchPropHandler() {
|
|
67
|
+
this.fillMode === "auto" && this.handleResize();
|
|
68
|
+
}
|
|
69
|
+
watchPropHiddenItems() {
|
|
70
|
+
if (this.fillMode === 'auto') {
|
|
71
|
+
this.collapseConfigPosition = this.hiddenItems.length > 0 ? 1 : -1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
componentDidUpdate() {
|
|
75
|
+
this.positionDropdown();
|
|
76
|
+
this.setEvents();
|
|
77
|
+
}
|
|
78
|
+
componentWillLoad() {
|
|
79
|
+
this.visibleItems = [...this.items];
|
|
80
|
+
if (this.fillMode === 'regular') {
|
|
81
|
+
this.configModeRegular();
|
|
82
|
+
}
|
|
83
|
+
else if (this.fillMode === 'auto') {
|
|
84
|
+
this.startResize();
|
|
85
|
+
}
|
|
86
|
+
this.setEvents();
|
|
87
|
+
}
|
|
88
|
+
closeDropdown(evt) {
|
|
89
|
+
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
90
|
+
if (target == undefined) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (target !== this._element.shadowRoot.querySelector(".ellipses__item")) {
|
|
94
|
+
this.showDropdown = false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
setEvents() {
|
|
98
|
+
document.removeEventListener("click", this.closeDropdown.bind(this));
|
|
99
|
+
document.addEventListener("click", this.closeDropdown.bind(this));
|
|
100
|
+
document.removeEventListener("scroll", this.positionDropdown.bind(this));
|
|
101
|
+
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
|
11
102
|
}
|
|
12
103
|
componentDidLoad() {
|
|
13
104
|
ElementIDUtils.addIDInfo(this._element);
|
|
14
105
|
}
|
|
15
|
-
|
|
16
|
-
this.
|
|
106
|
+
componentDidRender() {
|
|
107
|
+
if (this.fillMode === 'auto') {
|
|
108
|
+
this.configResize();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
configResize() {
|
|
112
|
+
if (this._resizeObserver != undefined) {
|
|
113
|
+
this._resizeObserver.unobserve(this._element.parentElement);
|
|
114
|
+
}
|
|
115
|
+
this._resizeObserver = new ResizeObserver(JSUtils.debounce(this.handleResize.bind(this), 200));
|
|
116
|
+
this._resizeObserver.observe(this._element.parentElement);
|
|
117
|
+
}
|
|
118
|
+
handleResize() {
|
|
119
|
+
const ELLIPSIS_SIZE = 39;
|
|
120
|
+
if (!this._renderSecond) {
|
|
121
|
+
this._renderSecond = true;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let { offsetWidth } = this._element.parentElement;
|
|
125
|
+
let sumVisibleItems = 0;
|
|
126
|
+
this.visibleItems.forEach(item => sumVisibleItems += item.width);
|
|
127
|
+
//Se existe o ellipsis, devemos cconsidera-lo no calculo
|
|
128
|
+
const offset = this.collapseConfigPosition > -1 ? ELLIPSIS_SIZE : 0;
|
|
129
|
+
if (offsetWidth < sumVisibleItems + offset) {
|
|
130
|
+
this.handleCollapse(offsetWidth, sumVisibleItems);
|
|
131
|
+
}
|
|
132
|
+
else if (offsetWidth >= sumVisibleItems + offset) {
|
|
133
|
+
this.handleExpand(offsetWidth);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
handleCollapse(containerWidth, itemsWidth) {
|
|
137
|
+
const MIN_VISIBLE_ITEMS = 2;
|
|
138
|
+
if (this.visibleItems.length <= MIN_VISIBLE_ITEMS) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
let tmpVisibleItems = [...this.visibleItems];
|
|
142
|
+
let tmpHiddenItems = [...this.hiddenItems];
|
|
143
|
+
let secondItem = tmpVisibleItems[this.INDEX_ITEM_TO_REMOVE];
|
|
144
|
+
let hasChange = false;
|
|
145
|
+
while (tmpVisibleItems.length > MIN_VISIBLE_ITEMS &&
|
|
146
|
+
secondItem != undefined &&
|
|
147
|
+
itemsWidth > containerWidth) {
|
|
148
|
+
hasChange = true;
|
|
149
|
+
tmpVisibleItems = tmpVisibleItems.filter((_, index) => index !== this.INDEX_ITEM_TO_REMOVE);
|
|
150
|
+
tmpHiddenItems = [...tmpHiddenItems, secondItem];
|
|
151
|
+
itemsWidth -= secondItem.width;
|
|
152
|
+
secondItem = tmpVisibleItems[this.INDEX_ITEM_TO_REMOVE];
|
|
153
|
+
}
|
|
154
|
+
if (hasChange) {
|
|
155
|
+
this.visibleItems = tmpVisibleItems;
|
|
156
|
+
this.hiddenItems = tmpHiddenItems;
|
|
157
|
+
this.showDropdown = false;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
handleExpand(containerWidth) {
|
|
161
|
+
if (!this.hiddenItems.length) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
let widthFreeZone = Math.abs(this._elBreadcrumbList.offsetWidth - containerWidth);
|
|
165
|
+
let tmpVisibleItems = [...this.visibleItems];
|
|
166
|
+
let tmpHiddenItems = [...this.hiddenItems];
|
|
167
|
+
let lastHiddenElement = tmpHiddenItems[tmpHiddenItems.length - 1];
|
|
168
|
+
let hasChange = false;
|
|
169
|
+
while (lastHiddenElement && widthFreeZone >= lastHiddenElement.width) {
|
|
170
|
+
widthFreeZone -= lastHiddenElement.width;
|
|
171
|
+
tmpHiddenItems.pop();
|
|
172
|
+
tmpVisibleItems.splice(this.INDEX_ITEM_TO_REMOVE, 0, lastHiddenElement);
|
|
173
|
+
lastHiddenElement = tmpHiddenItems[tmpHiddenItems.length - 1];
|
|
174
|
+
hasChange = true;
|
|
175
|
+
}
|
|
176
|
+
if (hasChange) {
|
|
177
|
+
this.visibleItems = tmpVisibleItems;
|
|
178
|
+
this.hiddenItems = tmpHiddenItems;
|
|
179
|
+
this.showDropdown = false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
configModeRegular() {
|
|
183
|
+
if (this.visibleItems.length > this.maxItems) {
|
|
184
|
+
const amountsItemsToHide = Math.abs(this.visibleItems.length - this.maxItems);
|
|
185
|
+
if (this.positionEllipsis === 0) {
|
|
186
|
+
const itemsToTransfer = this.visibleItems.slice(0, amountsItemsToHide);
|
|
187
|
+
this.hiddenItems.push(...itemsToTransfer);
|
|
188
|
+
this.visibleItems.splice(0, amountsItemsToHide);
|
|
189
|
+
}
|
|
190
|
+
else if (this.positionEllipsis >= this.maxItems) {
|
|
191
|
+
const itemsToTransfer = this.visibleItems.slice(this.maxItems);
|
|
192
|
+
this.hiddenItems.push(...itemsToTransfer);
|
|
193
|
+
this.visibleItems.splice(this.maxItems);
|
|
194
|
+
this._ellipsesPositionedEnd = true;
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
const removedItems = this.visibleItems.splice(this.positionEllipsis, amountsItemsToHide);
|
|
198
|
+
this.hiddenItems.push(...removedItems);
|
|
199
|
+
}
|
|
200
|
+
this.collapseConfigPosition = this.positionEllipsis;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
positionDropdown() {
|
|
204
|
+
var _a;
|
|
205
|
+
const bounding = (_a = this._element.shadowRoot.querySelector(".ellipses__item")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
206
|
+
const elDropdown = this._element.shadowRoot.querySelector(".dropdown-ellipsis");
|
|
207
|
+
if (bounding == undefined || elDropdown == undefined) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
elDropdown.style.top = (bounding.y + bounding.height + 5) + "px";
|
|
211
|
+
elDropdown.style.left = bounding.x + "px";
|
|
212
|
+
}
|
|
213
|
+
;
|
|
214
|
+
async startResize() {
|
|
215
|
+
const areaAvailable = this._element.parentElement.offsetWidth;
|
|
216
|
+
const ELLIPSIS_SIZE = 10;
|
|
217
|
+
const measureItemSize = async (item, index) => {
|
|
218
|
+
item.width = await this.measureSizeHTMLElement(item);
|
|
219
|
+
/*
|
|
220
|
+
Se é o ultimo item, desconsideramos o icone CHEVRON
|
|
221
|
+
*/
|
|
222
|
+
if (index === this.visibleItems.length - 1) {
|
|
223
|
+
item.width -= this.CHEVRON_SIZE;
|
|
224
|
+
}
|
|
225
|
+
return item;
|
|
226
|
+
};
|
|
227
|
+
const measuredItems = await Promise.all(this.visibleItems.map(measureItemSize));
|
|
228
|
+
const sizeBreadcrumb = measuredItems.reduce((total, item) => total + item.width, 0);
|
|
229
|
+
if (sizeBreadcrumb > areaAvailable) {
|
|
230
|
+
const tempItemsVisible = [];
|
|
231
|
+
const tempItemsHidden = [...measuredItems];
|
|
232
|
+
const firstItem = tempItemsHidden.shift();
|
|
233
|
+
const lastItem = tempItemsHidden.pop();
|
|
234
|
+
lastItem.width += ELLIPSIS_SIZE;
|
|
235
|
+
tempItemsVisible.push(firstItem, lastItem);
|
|
236
|
+
let sizeTempItemsHiddenResult = tempItemsVisible.reduce((total, item) => total + item.width, 0);
|
|
237
|
+
let newAreaAvailable = Math.abs(sizeTempItemsHiddenResult - areaAvailable);
|
|
238
|
+
tempItemsHidden.reverse().forEach((item) => {
|
|
239
|
+
if (item.width < newAreaAvailable) {
|
|
240
|
+
const firstItemForListHidden = tempItemsHidden.shift();
|
|
241
|
+
tempItemsVisible.splice(1, 0, firstItemForListHidden);
|
|
242
|
+
sizeTempItemsHiddenResult = tempItemsVisible.reduce((total, item) => total + item.width, 0);
|
|
243
|
+
newAreaAvailable = Math.abs(sizeTempItemsHiddenResult - areaAvailable);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
this.visibleItems = [...tempItemsVisible];
|
|
247
|
+
this.hiddenItems = [...tempItemsHidden.reverse()];
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
measureSizeHTMLElement(item) {
|
|
251
|
+
return new Promise((resolve) => {
|
|
252
|
+
const ICON_SIZE = 19;
|
|
253
|
+
this.waitFontLoad().then(() => {
|
|
254
|
+
if (this._textMesurement === undefined) {
|
|
255
|
+
this._textMesurement = this._element.shadowRoot.ownerDocument.createElement("canvas");
|
|
256
|
+
}
|
|
257
|
+
const context = this._textMesurement.getContext("2d");
|
|
258
|
+
context.font = "14px Roboto, Algerian";
|
|
259
|
+
resolve((item.iconName ? ICON_SIZE : 0) + this.CHEVRON_SIZE + context.measureText(item.label).width);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
waitFontLoad() {
|
|
264
|
+
return new Promise((resolve) => {
|
|
265
|
+
document.fonts.load("14px Roboto").then(() => resolve(), resolve());
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
getItemContent() {
|
|
269
|
+
return (h("nav", { class: "breadcrumb" }, h("ol", { class: "breadcrumb__list", ref: elem => this._elBreadcrumbList = elem }, h(BreadcrumbItem, { items: this.visibleItems, selectedItem: this.selectedItem, itemsHidden: this.hiddenItems, showDropdown: this.showDropdown, handleShowDropdown: this.handleShowDropdown, collapseConfigPosition: this.collapseConfigPosition, ellipsesPositionedEnd: this._ellipsesPositionedEnd }))));
|
|
17
270
|
}
|
|
18
271
|
render() {
|
|
19
|
-
return
|
|
20
|
-
const isLastItem = index === (this.items.length - 1);
|
|
21
|
-
return (h("li", Object.assign({ class: "breadcrumb__item", id: item.id }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezBreadcrumbItem_${item.id}`) }), item.iconName && h("ez-icon", Object.assign({ class: `breadcrumb__item--icon ${isLastItem ? 'active-icon' : ''}`, size: "small", iconName: item.iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconItem${item.id}`)}` })), h("p", { class: `breadcrumb__item--label ${isLastItem ? 'active' : ''}`, onClick: !isLastItem ? () => this.handleItemClick(item) : undefined }, item.label), !isLastItem && h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` }))));
|
|
22
|
-
}))));
|
|
272
|
+
return this.getItemContent();
|
|
23
273
|
}
|
|
24
274
|
get _element() { return getElement(this); }
|
|
275
|
+
static get watchers() { return {
|
|
276
|
+
"items": ["watchPropHandler"],
|
|
277
|
+
"hiddenItems": ["watchPropHiddenItems"]
|
|
278
|
+
}; }
|
|
25
279
|
};
|
|
26
280
|
EzBreadcrumb.style = ezBreadcrumbCss;
|
|
27
281
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-c27164d3.js';
|
|
2
2
|
import { FloatingManager } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CheckMode } from './CheckMode-bdb2ec19.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezChipCss = ":host{--ez-label-chip--height:30px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--medium, 400);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #2B3A54);--ez-label-chip__label--text--primary:var(--text--primary, #626e82);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:var(--color--primary-300);--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--active:var(--color--primary, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-300, #f2faf8);--ez-label-chip__label__container--default--color--hover:var(--color--primary, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__label__container--default--border-color--active:var(--color--primary)}.lbl{display:flex;white-space:nowrap;align-items:center;cursor:pointer;user-select:none;color:var(--ez-label-chip__label--title--primary);height:var(--ez-label-chip--height);font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size);font-weight:var(--ez-label-chip__label--font-weight)}.lbl--active{color:var(--ez-label-chip__label__container--default--color--hover)}.lbl--disabled{color:var(--ez-label-chip__label__container--text--disabled)}.label__container{cursor:pointer;width:max-content;display:flex;flex-wrap:wrap;align-items:center;background-color:#FFFFFF;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);border-color:var(--ez-label-chip__label__container--border-color-strokes);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);outline-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__content{display:flex;align-items:center;flex-wrap:wrap;--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--disabled{cursor:default;border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__container--active{border-color:var(--ez-label-chip__label__container--default--background-color--hover);background-color:var(--ez-label-chip__label__container--default--background-color--hover);color:var(--ez-label-chip__label__container--default--color--hover);fill:var(--ez-label-chip__label__container--default--color--hover);--ez-icon--color:var(--ez-label-chip__label__container--default--color--hover)}.label__container:hover{border-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__container:focus{outline:var(--border--medium) var(--ez-label-chip__label__container--default--border-color--active)}.label__container--disabled:hover{cursor:default;border:var(--ez-label-chip__label__container--border);border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__content__icon{display:flex;cursor:pointer;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--row-reverse{flex-direction:row-reverse}.label__container .btn-close{padding:0px 0px 0px 8px}.label__container--row-reverse .btn-close{padding:0px 8px 0px 0px}.cursor-disable{cursor:default}ez-icon{--ez-icon--color:inherit}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { A as ApplicationUtils } from './ApplicationUtils-
|
|
3
|
+
import { A as ApplicationUtils } from './ApplicationUtils-79bf1d95.js';
|
|
4
4
|
import './DialogType-54a62731.js';
|
|
5
5
|
import './CheckMode-bdb2ec19.js';
|
|
6
6
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { A as ApplicationUtils } from './ApplicationUtils-
|
|
3
|
+
import { A as ApplicationUtils } from './ApplicationUtils-79bf1d95.js';
|
|
4
4
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
5
5
|
import './DialogType-54a62731.js';
|
|
6
6
|
import './CheckMode-bdb2ec19.js';
|
|
7
|
+
import { R as REQUIRED_INFO } from './constants-ca136201.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--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{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;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%;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
|
|
|
@@ -17,6 +18,7 @@ const EzComboBox = class {
|
|
|
17
18
|
this._maxWidthValue = 0;
|
|
18
19
|
this._tabPressed = false;
|
|
19
20
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
21
|
+
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
20
22
|
this._preSelection = undefined;
|
|
21
23
|
this._visibleOptions = undefined;
|
|
22
24
|
this._startLoading = false;
|
|
@@ -46,15 +48,14 @@ const EzComboBox = class {
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
observeValue(newValue, oldValue) {
|
|
49
|
-
var _a, _b, _c, _d;
|
|
50
51
|
if (this._textInput && newValue != oldValue) {
|
|
51
52
|
const newValueSelected = this.getSelectedOption(newValue);
|
|
52
53
|
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
53
54
|
const currentValue = this.getSelectedOption(this.value);
|
|
54
|
-
if ((
|
|
55
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
55
56
|
this.value = newValueSelected;
|
|
56
57
|
}
|
|
57
|
-
if ((
|
|
58
|
+
if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
|
|
58
59
|
this.setInputValue();
|
|
59
60
|
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
60
61
|
this.ezChange.emit(valueEmitted);
|
|
@@ -83,12 +84,24 @@ const EzComboBox = class {
|
|
|
83
84
|
async isInvalid() {
|
|
84
85
|
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
85
86
|
}
|
|
87
|
+
isDifferentValues(firstValue, secondValue) {
|
|
88
|
+
return JSON.stringify(firstValue || {}) !== JSON.stringify(secondValue || {});
|
|
89
|
+
}
|
|
90
|
+
getFormattedText(currentValue) {
|
|
91
|
+
if (currentValue == undefined) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (!this.showSelectedValue || currentValue.value == undefined) {
|
|
95
|
+
return currentValue.label;
|
|
96
|
+
}
|
|
97
|
+
if (!currentValue.label) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
return `${currentValue.value} - ${currentValue.label}`;
|
|
101
|
+
}
|
|
86
102
|
getText() {
|
|
87
|
-
let text = "";
|
|
88
103
|
const currentValue = this.getSelectedOption(this.value);
|
|
89
|
-
|
|
90
|
-
text = this.showSelectedValue ? `${currentValue.value} - ${currentValue.label}` : currentValue.label;
|
|
91
|
-
}
|
|
104
|
+
const text = this.getFormattedText(currentValue);
|
|
92
105
|
if (text == undefined) {
|
|
93
106
|
return;
|
|
94
107
|
}
|
|
@@ -147,6 +160,7 @@ const EzComboBox = class {
|
|
|
147
160
|
}
|
|
148
161
|
buildItem(opt, index) {
|
|
149
162
|
const widthValue = this.showOptionValue && this._maxWidthValue > 0 ? `${this._maxWidthValue}px` : '';
|
|
163
|
+
opt.label = opt.label || (opt.value ? `<SEM ${this.getFieldLabel()}>` : "");
|
|
150
164
|
return h("li", { class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = index }, this.showOptionValue
|
|
151
165
|
? h("span", { class: "item__value", title: opt.value, style: { width: widthValue, minWidth: widthValue, maxWidth: widthValue } }, opt.value)
|
|
152
166
|
: undefined, h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
|
|
@@ -282,7 +296,7 @@ const EzComboBox = class {
|
|
|
282
296
|
if ((this._textInput.value || '') !== textValue) {
|
|
283
297
|
this._textInput.value = textValue;
|
|
284
298
|
if (clearError) {
|
|
285
|
-
this.errorMessage =
|
|
299
|
+
this.errorMessage = null;
|
|
286
300
|
}
|
|
287
301
|
}
|
|
288
302
|
}
|
|
@@ -309,6 +323,71 @@ const EzComboBox = class {
|
|
|
309
323
|
}
|
|
310
324
|
}
|
|
311
325
|
}
|
|
326
|
+
validateDescriptionValue() {
|
|
327
|
+
if (!this.searchMode || typeof this.value !== "object") {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const { label, value } = this.value || {};
|
|
331
|
+
if (label || value == undefined) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
this.loadDescriptionValue(value);
|
|
335
|
+
}
|
|
336
|
+
async loadDescriptionValue(argument) {
|
|
337
|
+
var _a, _b;
|
|
338
|
+
if (argument == undefined) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
342
|
+
this.loadOptionValue(argument);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const searchArgument = {
|
|
346
|
+
mode: SearchMode.PREDICTIVE,
|
|
347
|
+
argument
|
|
348
|
+
};
|
|
349
|
+
const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
|
|
350
|
+
if (source == undefined) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
if (source instanceof Promise) {
|
|
354
|
+
source.then((result) => {
|
|
355
|
+
this.setDescriptionValue(result);
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
this.setDescriptionValue(source);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
setDescriptionValue(source) {
|
|
363
|
+
const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
|
|
364
|
+
if (value == undefined || !Object.keys(value).length) {
|
|
365
|
+
this.showNoResultMessage();
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
if (!value.label) {
|
|
369
|
+
value.label = `<SEM ${this.getFieldLabel()}>`;
|
|
370
|
+
}
|
|
371
|
+
this.value = value;
|
|
372
|
+
}
|
|
373
|
+
loadOptionValue(argument) {
|
|
374
|
+
var _a;
|
|
375
|
+
const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
|
|
376
|
+
if (source != undefined) {
|
|
377
|
+
this.selectOption(source);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
this.showNoResultMessage();
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
async showNoResultMessage() {
|
|
384
|
+
this.clearSearch();
|
|
385
|
+
ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
|
|
386
|
+
}
|
|
387
|
+
getFieldLabel() {
|
|
388
|
+
var _a;
|
|
389
|
+
return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
|
|
390
|
+
}
|
|
312
391
|
//---------------------------------------------
|
|
313
392
|
// Lifecycle web component
|
|
314
393
|
//---------------------------------------------
|
|
@@ -348,6 +427,11 @@ const EzComboBox = class {
|
|
|
348
427
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
349
428
|
this.setInputValue(false);
|
|
350
429
|
}
|
|
430
|
+
componentShouldUpdate(newValue, oldValue) {
|
|
431
|
+
if (this.isDifferentValues(newValue, oldValue)) {
|
|
432
|
+
this.validateDescriptionValue();
|
|
433
|
+
}
|
|
434
|
+
}
|
|
351
435
|
//---------------------------------------------
|
|
352
436
|
// Event handlers
|
|
353
437
|
//---------------------------------------------
|
|
@@ -389,7 +473,7 @@ const EzComboBox = class {
|
|
|
389
473
|
clearDeboucingTimeout() {
|
|
390
474
|
if (this._changeDeboucingTimeout) {
|
|
391
475
|
window.clearTimeout(this._changeDeboucingTimeout);
|
|
392
|
-
this._changeDeboucingTimeout =
|
|
476
|
+
this._changeDeboucingTimeout = null;
|
|
393
477
|
}
|
|
394
478
|
}
|
|
395
479
|
onTextInputClickHandler() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { DateUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { DateUtils, TimeFormatter, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { D as DialogType } from './DialogType-54a62731.js';
|
|
3
3
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const DropdownItem = ({ item, hasIcon, hasChildren, isLockedLevels, onSubActionClick }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezFileItemCss = ":host{display:flex;width:100%;--ez-file-item--height:42px;--ez-file-item--padding:9px;--ez-file-item--border-radius:var(--border--radius-medium, 12px);--ez-file-item--border-color:var(--color--strokes, #DCE0E8);--ez-file-item--border-style:var(--border--small, 1px solid);--ez-file-item--font-family:var(--font-pattern, Arial);--ez-file-item--font-size:var(--text--medium, 14px);--ez-file-item--font-weight:var(--text-weight--medium, 400);--ez-file-item--color:var(--title--primary, #2B3A54);--ez-file-item__file-size--font-weight:var(--text-weight--large, 600);--ez-file-item__file-size--color:var(--color--primary, #008561);--ez-file-item__background-progress--color:var(--color--primary-300, E2F4EF);--ez-file-item--icon-color:var(--title--primary, #2B3A54)}.box{display:flex;box-sizing:border-box;position:relative;align-items:center;justify-content:space-between;width:100%;padding:var(--ez-file-item--padding);border:var(--ez-file-item--border-color) var(--ez-file-item--border-style);border-radius:var(--ez-file-item--border-radius);height:var(--ez-file-item--height)}.box::before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;clip-path:inset(2px calc(var(--ez-file-item--upload-progress, 0%) + 2px) 2px 2px round calc(var(--ez-file-item--border-radius) - 4px));background-color:var(--ez-file-item__background-progress--color)}.content{display:flex;align-items:center;z-index:0;overflow:hidden}.file-name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item--font-weight);color:var(--ez-file-item--color)}.file-type-icon{flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color);padding-right:var(--ez-file-item--padding)}.file-size{padding-left:2px;overflow:hidden;flex-shrink:0;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item__file-size--font-weight);color:var(--ez-file-item__file-size--color)}.btn-remove{cursor:pointer;flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host, f as forceUpdate } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host, f as forceUpdate } from './index-c27164d3.js';
|
|
2
2
|
import { ElementIDUtils, JSUtils, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
4
|
import { E as EzScrollDirection } from './EzScrollDirection-2df26c93.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { h, r as registerInstance, H as Host, g as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { UserInterface, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { R as REQUIRED_INFO } from './constants-ca136201.js';
|
|
3
4
|
import { C as CheckMode } from './CheckMode-bdb2ec19.js';
|
|
4
5
|
|
|
5
6
|
const buildSwitch = (field) => {
|
|
@@ -87,7 +88,7 @@ uiBuilders.set(UserInterface.SEARCH, buildSearch);
|
|
|
87
88
|
uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
|
|
88
89
|
const fieldBuilder = (field) => {
|
|
89
90
|
const builder = uiBuilders.get(field.userInterface) || buildTextInput;
|
|
90
|
-
const label = field.required ? `${field.label}
|
|
91
|
+
const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
|
|
91
92
|
return builder(Object.assign(Object.assign({}, field), { label }));
|
|
92
93
|
};
|
|
93
94
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, f as forceUpdate, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, f as forceUpdate, H as Host, g as getElement } from './index-c27164d3.js';
|
|
2
2
|
import { Action, WaitingChangeException, ApplicationContext, UserInterface, StringUtils, DataUnitAction, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { A as ApplicationUtils } from './ApplicationUtils-
|
|
3
|
+
import { A as ApplicationUtils } from './ApplicationUtils-79bf1d95.js';
|
|
4
4
|
import './DialogType-54a62731.js';
|
|
5
5
|
|
|
6
6
|
/**
|