@sankhyalabs/ezui 1.1.76 → 1.1.77
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-d1c1db56.js +35 -0
- package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
- package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
- package/dist/cjs/DateUtils-716769e0.js +46 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +28 -0
- package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +212 -0
- package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +630 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +250 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +144 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +1838 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +61 -190
- package/dist/cjs/ez-popover.cjs.entry.js +3 -3
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +9 -27
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/form-metadata.cjs.entry.js +129 -0
- package/dist/cjs/index-262d703b.js +7442 -0
- package/dist/cjs/{index-9431aeeb.js → index-4e4bae01.js} +1 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +8 -3
- package/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/collection/components/ez-application/ez-application.js +37 -0
- package/dist/collection/components/ez-button/ez-button.css +16 -1
- package/dist/collection/components/ez-button/ez-button.js +27 -2
- package/dist/collection/components/ez-calendar/ez-calendar.css +70 -3
- package/dist/collection/components/ez-calendar/ez-calendar.js +168 -24
- package/dist/collection/components/ez-check/ez-check.css +78 -78
- package/dist/collection/components/ez-check/ez-check.js +3 -3
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +67 -51
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +49 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +254 -0
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +4 -4
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +2 -2
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
- package/dist/collection/components/ez-grid/ez-grid.css +15 -0
- package/dist/collection/components/ez-grid/ez-grid.js +414 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-list/ez-list.css +227 -44
- package/dist/collection/components/ez-list/ez-list.js +529 -149
- package/dist/collection/components/ez-modal/ez-modal.css +4 -4
- package/dist/collection/components/ez-modal/ez-modal.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +7 -162
- package/dist/collection/components/ez-number-input/ez-number-input.js +90 -281
- package/dist/collection/components/ez-popover/ez-popover.css +10 -6
- package/dist/collection/components/ez-popup/ez-popup.css +25 -27
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
- package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +1 -0
- package/dist/collection/components/ez-upload/ez-upload.js +3 -3
- package/dist/collection/components/test-du/test-du.css +3 -0
- package/dist/collection/components/test-du/test-du.js +45 -0
- package/dist/collection/servidor.js +94 -94
- package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
- package/dist/custom-elements/index.d.ts +36 -6
- package/dist/custom-elements/index.js +120975 -3013
- package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
- package/dist/esm/AssetsUtils-3803e935.js +22 -0
- package/dist/esm/DataUnit-1cd45202.js +464 -0
- package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +24 -0
- package/dist/esm/ez-button_11.entry.js +111757 -0
- package/dist/esm/ez-calendar.entry.js +208 -0
- package/dist/esm/ez-collapsible-box_6.entry.js +621 -0
- package/dist/esm/ez-combo-box.entry.js +246 -0
- package/dist/esm/ez-date-time-input.entry.js +140 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +1834 -0
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +61 -190
- package/dist/esm/ez-popover.entry.js +3 -3
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +3 -21
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/form-metadata.entry.js +125 -0
- package/dist/esm/{index-fd3c8023.js → index-1dacecd3.js} +1 -5
- package/dist/esm/index-cfd5e193.js +7433 -0
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-1ea8187e.entry.js +369 -0
- package/dist/ezui/p-37a611ea.js +1 -0
- package/dist/ezui/p-45689464.entry.js +1 -0
- package/dist/ezui/{p-a0b6eee2.entry.js → p-516d0e0f.entry.js} +1 -1
- package/dist/ezui/p-57291f97.entry.js +1 -0
- package/dist/ezui/{p-66954a04.entry.js → p-5a86e18a.entry.js} +1 -1
- package/dist/ezui/{p-823ff0a0.entry.js → p-5da66d3e.entry.js} +1 -1
- package/dist/ezui/p-69416bec.entry.js +1 -0
- package/dist/ezui/p-7107d7ef.js +1 -0
- package/dist/ezui/p-7ef97c5f.entry.js +1 -0
- package/dist/ezui/p-88f45a83.entry.js +1 -0
- package/dist/ezui/p-8c51a6aa.entry.js +1 -0
- package/dist/ezui/{p-e0ab3746.js → p-8f4851a6.js} +1 -1
- package/dist/ezui/p-9dfd537e.js +1 -0
- package/dist/ezui/{p-d443f020.entry.js → p-a18a2d7b.entry.js} +1 -1
- package/dist/ezui/p-a223eed8.entry.js +1 -0
- package/dist/ezui/p-b36308e7.js +1 -0
- package/dist/ezui/p-c0af195b.entry.js +1 -0
- package/dist/ezui/p-c6d469fc.entry.js +1 -0
- package/dist/ezui/p-c89629eb.js +1 -0
- package/dist/ezui/p-e7ee2836.entry.js +1 -0
- package/dist/ezui/p-f7b835cf.entry.js +1 -0
- package/dist/types/components/ez-application/ez-application.d.ts +12 -0
- package/dist/types/components/ez-button/ez-button.d.ts +5 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +21 -0
- package/dist/types/components/ez-check/ez-check.d.ts +1 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
- package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
- package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
- package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
- package/dist/types/components/ez-list/ez-list.d.ts +70 -17
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +33 -50
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
- package/dist/types/components/test-du/test-du.d.ts +6 -0
- package/dist/types/components.d.ts +283 -117
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
- package/package.json +10 -8
- package/react/components.d.ts +6 -1
- package/react/components.js +6 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
- package/dist/cjs/ez-button_16.cjs.entry.js +0 -4079
- package/dist/cjs/ez-list.cjs.entry.js +0 -174
- package/dist/cjs/ez-modal.cjs.entry.js +0 -65
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
- package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
- package/dist/esm/ez-button_16.entry.js +0 -4060
- package/dist/esm/ez-list.entry.js +0 -170
- package/dist/esm/ez-modal.entry.js +0 -61
- package/dist/ezui/p-11ae4ae7.entry.js +0 -1
- package/dist/ezui/p-47fa3d6c.entry.js +0 -1
- package/dist/ezui/p-8ab6168f.entry.js +0 -1
- package/dist/ezui/p-9c1fb51c.entry.js +0 -1
- package/dist/ezui/p-9d85125b.entry.js +0 -1
- package/dist/ezui/p-9dfccb16.js +0 -1
- package/dist/ezui/p-a7b546b2.entry.js +0 -1
- package/dist/ezui/p-c833c94f.entry.js +0 -1
- package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-fd3c8023.js';
|
|
2
|
-
|
|
3
|
-
const ezListCss = ":host{--list__host--border-radius:var(--border--radius-medium, 12px);--list__host--padding:var(--space--medium, 12px);--list__icon__padding:var(--space--small, 6px);--list__item__margin:0 var(--space--small, 6px);--list__item--color:var(--title--primary, #2b3a54);--list__item--border-bottom:var(--border--small, 1px solid);--list__item--border-color:var(--title--primary, #2b3a54);--list__item--font-family:var(--font-pattern, #2b3a54);--list__item--font-size:var(--text--medium, 14px);--list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 12,16 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 z\"/></svg>');border-radius:var(--list__host--border-radius);padding:var(--list__host--padding);max-height:100%;width:100%;background-color:#fff;display:flex}.draggable{cursor:pointer;display:flex;align-items:center;justify-content:flex-start;flex:1}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;overflow-y:auto}.draggable-list li{background-color:#fff;display:flex;margin:var(--list__item__margin);font-family:var(--list__item--font-family);font-size:var(--list__item--font-size);color:var(--list__item--color)}.draggable-list li:not(:last-of-type){border-bottom:var(--list__item--border-bottom)}.draggable-list li.over .draggable{background-color:var(--background--strong)}.draggable:hover{background-color:var(--background--medium)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--title--primary);border-radius:var(--space--extra-small)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;height:6px;max-height:6px;min-height:6px;width:6px;max-width:6px;min-width:6px}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--list__item--color);width:24px;height:24px;-webkit-mask-image:var(--list__draggable__icon--image);mask-image:var(--list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
|
|
4
|
-
|
|
5
|
-
let EzList = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this._listItems = [];
|
|
9
|
-
/**
|
|
10
|
-
* Define a lista inicial do componente.
|
|
11
|
-
*/
|
|
12
|
-
this.initialList = [];
|
|
13
|
-
/**
|
|
14
|
-
* Define se o componente terá o comportamento de arrasto de linhas.
|
|
15
|
-
*/
|
|
16
|
-
this.draggable = true;
|
|
17
|
-
/**
|
|
18
|
-
* Define se é possível selecionar mais de um registro.
|
|
19
|
-
*/
|
|
20
|
-
this.isMultipleSelection = true;
|
|
21
|
-
}
|
|
22
|
-
createList() {
|
|
23
|
-
[...this.initialList]
|
|
24
|
-
.forEach((item, index) => {
|
|
25
|
-
const listItem = document.createElement('li');
|
|
26
|
-
listItem.setAttribute('data-index', index.toString());
|
|
27
|
-
if (!this.isMultipleSelection)
|
|
28
|
-
listItem.onclick = this.selectLine.bind(this);
|
|
29
|
-
listItem.innerHTML = `
|
|
30
|
-
<div class="draggable" ${this.draggable ? "draggable=true" : ""}>
|
|
31
|
-
|
|
32
|
-
${this.draggable ? '<span class="draggable-icon"></span>' : ""}
|
|
33
|
-
|
|
34
|
-
${this.isMultipleSelection ? `<ez-check class='checkbox' value=${item.checked}></ez-check>` : ''}
|
|
35
|
-
<p title="${item.value}" class="person-name text--ellipsis">${item.value}</p>
|
|
36
|
-
|
|
37
|
-
</div>
|
|
38
|
-
`;
|
|
39
|
-
this._listItems.push(listItem);
|
|
40
|
-
this._draggableList.appendChild(listItem);
|
|
41
|
-
});
|
|
42
|
-
if (this.draggable) {
|
|
43
|
-
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, false);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
selectLine(e) {
|
|
47
|
-
var _a, _b, _c;
|
|
48
|
-
this._listItems.forEach(item => { item.classList.remove('draggable-selected'); });
|
|
49
|
-
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === 'SPAN') {
|
|
50
|
-
const span = e.target;
|
|
51
|
-
this._selectedItem = { value: span.parentElement.getElementsByTagName('p')[0].textContent };
|
|
52
|
-
span.parentElement.parentElement.classList.add('draggable-selected');
|
|
53
|
-
}
|
|
54
|
-
else if (((_b = e.target) === null || _b === void 0 ? void 0 : _b.tagName) === 'P') {
|
|
55
|
-
const paragraph = e.target;
|
|
56
|
-
this._selectedItem = { value: paragraph.textContent };
|
|
57
|
-
paragraph.parentElement.parentElement.classList.add('draggable-selected');
|
|
58
|
-
}
|
|
59
|
-
else if (((_c = e.target) === null || _c === void 0 ? void 0 : _c.tagName) === 'DIV') {
|
|
60
|
-
const draggable = e.target;
|
|
61
|
-
this._selectedItem = { value: draggable.getElementsByTagName('p')[0].textContent };
|
|
62
|
-
draggable.parentElement.classList.add('draggable-selected');
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
handleEventListeners(listItems, dragableList, hostElement, removeEvents) {
|
|
66
|
-
let _dragStartIndex;
|
|
67
|
-
let _isItemOut = false;
|
|
68
|
-
function dragStart(item) {
|
|
69
|
-
_dragStartIndex = item.parentElement.getAttribute('data-index');
|
|
70
|
-
}
|
|
71
|
-
function dragEnter(item) {
|
|
72
|
-
item.classList.add('over');
|
|
73
|
-
}
|
|
74
|
-
function dragLeave(item) {
|
|
75
|
-
item.classList.remove('over');
|
|
76
|
-
}
|
|
77
|
-
function dragOver(e) {
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
}
|
|
80
|
-
function dragDrop(item) {
|
|
81
|
-
if (_isItemOut) {
|
|
82
|
-
let index = +item.getAttribute('data-index');
|
|
83
|
-
const itemRemoved = listItems[index].querySelector('.draggable');
|
|
84
|
-
listItems[index].removeChild(itemRemoved);
|
|
85
|
-
}
|
|
86
|
-
const dragEndIndex = +item.getAttribute('data-index');
|
|
87
|
-
swapItems(+_dragStartIndex, dragEndIndex);
|
|
88
|
-
item.classList.remove('over');
|
|
89
|
-
}
|
|
90
|
-
function swapItems(fromIndex, toIndex) {
|
|
91
|
-
const itemOne = listItems[fromIndex].querySelector('.draggable');
|
|
92
|
-
const itemTwo = listItems[toIndex].querySelector('.draggable');
|
|
93
|
-
listItems[fromIndex].appendChild(itemTwo);
|
|
94
|
-
listItems[toIndex].appendChild(itemOne);
|
|
95
|
-
return listItems;
|
|
96
|
-
}
|
|
97
|
-
if (!removeEvents) {
|
|
98
|
-
hostElement.addEventListener('dragenter', function () { _isItemOut = false; });
|
|
99
|
-
hostElement.addEventListener('dragleave', function () { _isItemOut = true; });
|
|
100
|
-
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
101
|
-
draggables.forEach(draggable => {
|
|
102
|
-
draggable.addEventListener('dragstart', function () { dragStart(draggable); });
|
|
103
|
-
});
|
|
104
|
-
listItems.forEach(item => {
|
|
105
|
-
item.addEventListener('dragover', function (event) { dragOver(event); });
|
|
106
|
-
item.addEventListener('drop', function () { dragDrop(item); });
|
|
107
|
-
item.addEventListener('dragenter', function () { dragEnter(item); });
|
|
108
|
-
item.addEventListener('dragleave', function () { dragLeave(item); });
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
hostElement.removeEventListener('dragenter', function () { _isItemOut = false; });
|
|
113
|
-
hostElement.removeEventListener('dragleave', function () { _isItemOut = true; });
|
|
114
|
-
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
115
|
-
draggables.forEach(draggable => {
|
|
116
|
-
draggable.removeEventListener('dragstart', function () { dragStart(draggable); });
|
|
117
|
-
});
|
|
118
|
-
listItems.forEach(item => {
|
|
119
|
-
item.removeEventListener('dragover', function (event) { dragOver(event); });
|
|
120
|
-
item.removeEventListener('drop', function () { dragDrop(item); });
|
|
121
|
-
item.removeEventListener('dragenter', function () { dragEnter(item); });
|
|
122
|
-
item.removeEventListener('dragleave', function () { dragLeave(item); });
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Retorna uma promessa com o estado da atual lista composta por objetos do tipo {value: string, checked: boolean}.
|
|
128
|
-
*/
|
|
129
|
-
async getState() {
|
|
130
|
-
let emitionList = [];
|
|
131
|
-
this._listItems.forEach(item => {
|
|
132
|
-
let emitionItem = {
|
|
133
|
-
value: this.getValueItem(item),
|
|
134
|
-
checked: this.getChecked(item)
|
|
135
|
-
};
|
|
136
|
-
emitionList.push(emitionItem);
|
|
137
|
-
});
|
|
138
|
-
return emitionList;
|
|
139
|
-
}
|
|
140
|
-
getChecked(item) {
|
|
141
|
-
if (this.isMultipleSelection) {
|
|
142
|
-
return item.children[0].children[1].value;
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
if (!this._selectedItem)
|
|
146
|
-
return false;
|
|
147
|
-
return (item.children[0].children[1].textContent === this._selectedItem.value);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
getValueItem(item) {
|
|
151
|
-
if (this.isMultipleSelection) {
|
|
152
|
-
return item.children[0].children[2].textContent;
|
|
153
|
-
}
|
|
154
|
-
return item.children[0].children[1].textContent;
|
|
155
|
-
}
|
|
156
|
-
componentDidLoad() {
|
|
157
|
-
this.createList();
|
|
158
|
-
}
|
|
159
|
-
disconnectedCallback() {
|
|
160
|
-
if (this.draggable) {
|
|
161
|
-
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, true);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
render() {
|
|
165
|
-
return (h(Host, { ref: (el) => this._hostElement = el }, h("ul", { ref: (el) => this._draggableList = el, class: "draggable-list", id: "draggable-list" })));
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
EzList.style = ezListCss;
|
|
169
|
-
|
|
170
|
-
export { EzList as ez_list };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-fd3c8023.js';
|
|
2
|
-
|
|
3
|
-
const ezModalCss = ":host{--modal-z-index:var(--most-visible, 3);--modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
4
|
-
|
|
5
|
-
let EzModal = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.ezCloseModal = createEvent(this, "ezCloseModal", 7);
|
|
9
|
-
/**
|
|
10
|
-
* Controle de exibição do Modal
|
|
11
|
-
*/
|
|
12
|
-
this.opened = true;
|
|
13
|
-
/**
|
|
14
|
-
* Define se o modal será fechado ao clicar ESC
|
|
15
|
-
*/
|
|
16
|
-
this.closeEsc = false;
|
|
17
|
-
/**
|
|
18
|
-
* Define se o modal será fechado ao clicar fora do conteúdo.
|
|
19
|
-
*/
|
|
20
|
-
this.closeOutsideClick = false;
|
|
21
|
-
this.handleKeyboardEvent = (ev) => {
|
|
22
|
-
if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
|
|
23
|
-
this.closeModal();
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
handleopenedChange() {
|
|
28
|
-
if (this.opened) {
|
|
29
|
-
document.addEventListener("keydown", this.handleKeyboardEvent);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
document.removeEventListener("keydown", this.handleKeyboardEvent);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
closeModal() {
|
|
36
|
-
this.opened = false;
|
|
37
|
-
this.ezCloseModal.emit(this.opened);
|
|
38
|
-
}
|
|
39
|
-
componentDidLoad() {
|
|
40
|
-
this.handleopenedChange();
|
|
41
|
-
}
|
|
42
|
-
onMouseDownHandler(event) {
|
|
43
|
-
if (this.closeOutsideClick && event.target === this._overlay) {
|
|
44
|
-
this.closeModal();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
const positionSufix = this.align === "left" ? "left" : "right";
|
|
49
|
-
return (h(Host, null, this.opened
|
|
50
|
-
?
|
|
51
|
-
h("div", { class: "modal", onMouseDown: evt => this.onMouseDownHandler(evt) }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalSize}` }, h("slot", null))))
|
|
52
|
-
:
|
|
53
|
-
undefined));
|
|
54
|
-
}
|
|
55
|
-
static get watchers() { return {
|
|
56
|
-
"opened": ["handleopenedChange"]
|
|
57
|
-
}; }
|
|
58
|
-
};
|
|
59
|
-
EzModal.style = ezModalCss;
|
|
60
|
-
|
|
61
|
-
export { EzModal as ez_modal };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,c as t,h as i,H as o}from"./p-e0ab3746.js";let l=class{constructor(i){d(this,i),this.ezCloseModal=t(this,"ezCloseModal",7),this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.handleKeyboardEvent=d=>{"Escape"===(null==d?void 0:d.key)&&this.closeEsc&&this.closeModal()}}handleopenedChange(){this.opened?document.addEventListener("keydown",this.handleKeyboardEvent):document.removeEventListener("keydown",this.handleKeyboardEvent)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}componentDidLoad(){this.handleopenedChange()}onMouseDownHandler(d){this.closeOutsideClick&&d.target===this._overlay&&this.closeModal()}render(){const d="left"===this.align?"left":"right";return i(o,null,this.opened?i("div",{class:"modal",onMouseDown:d=>this.onMouseDownHandler(d)},i("div",{class:`modal__container modal__container--${d}`,ref:d=>this._overlay=d},i("div",{class:`modal__content modal__content--${d} ${this.modalSize}`},i("slot",null)))):void 0)}static get watchers(){return{opened:["handleopenedChange"]}}};l.style=":host{--modal-z-index:var(--most-visible, 3);--modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";export{l as ez_modal}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as i,H as l}from"./p-e0ab3746.js";let d=class{constructor(i){t(this,i),this.ezClosePopup=o(this,"ezClosePopup",7),this.sizeClasses={"x-small":"col--sd-3",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11"},this.size="medium",this.opened=!1,this.useHeader=!1}getGridSize(){return this.sizeClasses[this.size]||this.sizeClasses.medium}render(){return this.opened?i(l,null,i("div",{class:"overlay"},i("div",{class:"popup col "+this.getGridSize()},i("div",{class:"popup__container"},i("div",{class:"popup__content"},i("div",{class:"popup__header"},this.ezTitle?i("div",{class:"popup__title"},this.ezTitle):void 0,i("button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",onClick:()=>{this.opened=!1,this.ezClosePopup.emit()}})),i("div",{class:"popup__expandable-content"},i("slot",null))))))):null}};d.style=':host{display:flex;--popup-z-index:var(--most-visible, 3);--popup__container--color:var(--title--primary, #2b3a54);--popup__container--padding:var(--space--large, 24px);--popup__header--padding-bottom:var(--space--medium, 12px);--popup__title--font-family:var(--font-pattern, "\'Sora\', \'Algerian\'");--popup__title--font-size:var(--title--extra-large, 24px);--popup__title--color:var(--title--primary, #2b3a54);--popup__title--font-weight:var(--text-weight--large, 600);--popup__btn__close--icon-color:var(--title--primary, #2b3a54);--popup__btn__close--icon:url(\'data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>\')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:flex;flex-wrap:wrap}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;width:100%;display:flex;flex-wrap:wrap;max-height:80vh;content-visibility:auto}.popup__header{padding-bottom:var(--popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--popup__title--font-family);font-size:var(--popup__title--font-size);font-weight:var(--popup__title--font-weight);color:var(--popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--popup__btn__close--icon);mask-image:var(--popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{d as ez_popup}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as r,H as o,g as s}from"./p-e0ab3746.js";import{N as e}from"./p-9dfccb16.js";let n=class{constructor(r){i(this,r),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.textleft=!1,this.formatnumber="PT-BR",this.settingStrValueIntNumber=i=>0===this.precision&&i?i.replace(/\./g,"").replace(/\,/g,""):i,this.checkNumberValidation=i=>{try{if(""!=i&&"NaN"===e.format(i,this.precision,this.prettyprecision))return this.errorMessage="Valor não é um número válido",this.value=void 0,this.strvalue=void 0,this._inputElem&&(this._inputElem.value=""),!1}catch(i){return this.errorMessage=i.message,!1}return!0}}showError(){this._inputElem&&("string"==typeof this.errorMessage&&""!==this.errorMessage?(this._inputElem.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._inputElem.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError")))}onPrecisionChanged(i){isNaN(i)&&(this.precision=0),this.handleFocusout()}onPrettyPrecisionChanged(i){isNaN(i)&&(this.prettyprecision=0),this.handleFocusout()}onValueChanged(i){isNaN(i)&&void 0!==i?(this.value=void 0,this.strvalue="",this.errorMessage="Valor não é um número válido",this.adjustFloatingLabel()):this.settingComponent()}adjustFloatingLabel(){this._labelElem&&(this.label&&this._inputElem.value&&this._inputElem.value.toString().length>0?(this._labelElem.classList.contains("input__label--floated")||this._labelElem.classList.add("input__label--floated"),this._inputElem.classList.contains("input--with--label")||this._inputElem.classList.add("input--with--label")):this._labelElem.classList.remove("input__label--floated"))}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async handleFocusout(){if(this._inputElem){if(this.errorMessage="",""!==this._inputElem.value){this._inputElem.value=this.settingStrValueIntNumber(this._inputElem.value);const i=e.keepOnlyDecimalSeparator(this._inputElem.value,this.formatnumber.toUpperCase());if(!this.checkNumberValidation(i))return;if(i)try{this._inputElem.value="EN-US"!==this.formatnumber.toUpperCase()?e.format(i,this.precision,this.prettyprecision):e.changeFormat(e.format(i,this.precision,this.prettyprecision))}catch(i){return void(this.errorMessage=i.message)}this.strvalue=this._inputElem.value,this.value=e.stringToNumber(i)}else this.strvalue=void 0,this.value=void 0;this.adjustFloatingLabel()}}handleChange(){this._inputElem.value=this.settingStrValueIntNumber(this._inputElem.value)}handleSlotChange(i){const t=i.target,r=t.assignedElements()[0];r.style.position="absolute",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.overflow="hidden",r.style.top="0px",r.style.width="var(--ni__icon--width)",r.style.height="var(--ni--height)","leftIcon"==t.name?(r.style.left="0px",r.style.borderRadius="var(--ni--border-radius) 0 0 var(--ni--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left")):"rightIcon"==t.name&&(r.style.right="0px",r.style.borderRadius="0 var(--ni--border-radius) var(--ni--border-radius) 0",this._inputElem.classList.add("icon--right")),this.showError()}doFocus(){this.label&&this._labelElem&&(this._labelElem.classList.contains("input__label--floated")||this._labelElem.classList.add("input__label--floated"))}settingComponent(){const i=""+this.value;if(void 0!==this.value){try{this._inputElem.value="EN-US"!==this.formatnumber.toUpperCase()?e.format(i,this.precision,this.prettyprecision):e.changeFormat(e.format(i,this.precision,this.prettyprecision))}catch(i){return void(this.errorMessage=i.message)}this.strvalue=this._inputElem.value}this.ezChange.emit({strValue:this.strvalue,value:this.value}),this.adjustFloatingLabel()}settingValue(){const i=isNaN(this.value)?"NaN":""+this.value;if(!this.checkNumberValidation(i))return;const t=e.format(i,this.precision,this.prettyprecision);this.strvalue="EN-US"!==this.formatnumber.toUpperCase()?t:e.changeFormat(t),e.format(this.value.toString(),this.precision,this.prettyprecision)}componentDidLoad(){this.textleft||this._inputElem.classList.add("text--right"),this.showError(),this.adjustFloatingLabel()}componentWillLoad(){this.onPrecisionChanged(this.precision),this.onPrettyPrecisionChanged(this.prettyprecision),this.settingValue()}render(){const i=this.label?r("label",{onClick:()=>this._inputElem.focus(),class:"input__label",ref:i=>this._labelElem=i},this.label):null;return r(o,null,r("slot",{name:"leftIcon",onSlotchange:i=>{this.handleSlotChange(i)}}),i,r("input",{onFocus:()=>this.doFocus(),ref:i=>this._inputElem=i,type:"text",value:this.strvalue,disabled:!this.enabled,onInput:this.handleChange.bind(this),onFocusout:this.handleFocusout.bind(this)}),r("slot",{name:"rightIcon",onSlotchange:i=>{this.handleSlotChange(i)}}),r("span",{class:"message-box",ref:i=>this._messageBoxElem=i},this.errorMessage))}get el(){return s(this)}static get watchers(){return{errorMessage:["showError"],precision:["onPrecisionChanged"],prettyprecision:["onPrettyPrecisionChanged"],value:["onValueChanged"]}}};n.style=":host{--ni--height:42px;--ni--width:100%;--ni__icon--width:48px;--ni--border-radius:var(--border--radius-medium, 12px);--ni--font-size:var(--text--medium, 14px);--ni--font-family:var(--font-pattern, Arial);--ni__input--background-color:var(--background--medium, #e0e0e0);--ni__input--border:var(--border--medium, 2px solid);--ni__input--border-color:var(--ni__input--background-color);--ni__input--focus--border-color:var(--color--primary, #008561);--ni__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ni__input--disabled--color:var(--text--disable, #AFB6C0);--ni__input--error--border-color:#CC2936;--ni__placeholder--disabled--color:var(--text--disable, #AFB6C0);--ni__placeholder--color:var(--title--primary, #919191);--ni__placeholder--font-weight:var(--text-weight--large, 500);--ni__message_box--font-size:var(--text--small, 12px);--ni__message_box--info--color:var(--color--success, #22085d);--ni__message_box--error--color:var(--color--error, #FF0000);display:flex;flex-wrap:wrap;position:relative;width:var(--ni--width)}.invisible{visibility:hidden}input{width:100%;box-sizing:border-box;padding:var(--space--medium);height:var(--ni--height);border-radius:var(--ni--border-radius);font-family:var(--ni--font-family);font-size:var(--ni--font-size);border:var(--ni__input--border);border-color:var(--ni__input--border-color);background-color:var(--ni__input--background-color);font-weight:var(--text-weight--large)}input:disabled{background-color:var(--ni__input--disabled--background-color);color:var(--ni__input--disabled--color)}input:focus{outline:none;border-color:var(--ni__input--focus--border-color)}input.icon--left{padding-left:var(--ni__icon--width)}input.icon--right{padding-right:var(--ni__icon--width)}input::placeholder{color:var(--ni__placeholder--color);font-weight:var(--ni__placeholder--font-weight)}input:disabled::placeholder{color:var(--ni__placeholder--disabled--color)}input.hasError{color:inherit;border-color:var(--ni__input--error--border-color)}input.text--right{text-align:right}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;font-family:var(--ni--font-family);font-size:var(--ni__message_box--font-size);color:var(--ni__message_box--info--color)}.hasError{color:var(--ni__message_box--error--color)}.input__label{font-size:var(--text--medium);font-weight:var(--text-weight--large);left:var(--space--medium);position:absolute;color:var(--title--primary);top:var(--space--medium);font-family:var(--ni--font-family);-webkit-transition:font-size .3s, top .3s;transition:font-size .3s, top .3s;z-index:var(--visible)}.input__label--floated{font-family:var(--ni--font-family);font-size:var(--text--extra-small);top:var(--space--small);color:var(--text--primary)}.input__label--left{left:var(--ni__icon--width)}.input--with--label{padding-bottom:0}";export{n as ez_number_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as o,g as e}from"./p-e0ab3746.js";import"./p-9dfccb16.js";import{F as h}from"./p-ddd0ef12.js";let r=class{constructor(s){t(this,s),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content"}dispatchVisibilityChange(t,i){t!=i&&this.ezVisibilityChange.emit(t)}async updatePosition(t=this.top,i=this.left,s=this.bottom,o=this.right){h.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:s,right:o,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))})}async show(t=this.top,i=this.left,s=this.bottom,o=this.right){this._floatingID=h.float(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:s,right:o,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))}),this.opened=!0}async hide(){void 0!==this._floatingID&&(h.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return s(o,null,s("section",{ref:t=>this._container=t},s("div",{class:"box "+("fit-content"===this.boxWidth?"box--fit-content":"box--full-width"),ref:t=>this._box=t},s("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["dispatchVisibilityChange"]}}};r.style=":host{--popover__box--border-radius:var(--border--radius-medium, 12px);--popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--more-visible, 1);display:flex;flex-direction:column;height:fit-content;background-color:var(--background--xlight);border-radius:var(--popover__box--border-radius);box-shadow:var(--popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";export{r as ez_popover}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as a}from"./p-e0ab3746.js";let i=class{constructor(e){t(this,e),this._listItems=[],this.initialList=[],this.draggable=!0,this.isMultipleSelection=!0}createList(){[...this.initialList].forEach(((t,e)=>{const a=document.createElement("li");a.setAttribute("data-index",e.toString()),this.isMultipleSelection||(a.onclick=this.selectLine.bind(this)),a.innerHTML=`\n <div class="draggable" ${this.draggable?"draggable=true":""}>\n\n ${this.draggable?'<span class="draggable-icon"></span>':""}\n \n ${this.isMultipleSelection?`<ez-check class='checkbox' value=${t.checked}></ez-check>`:""}\n <p title="${t.value}" class="person-name text--ellipsis">${t.value}</p>\n \n </div>\n `,this._listItems.push(a),this._draggableList.appendChild(a)})),this.draggable&&this.handleEventListeners(this._listItems,this._draggableList,this._hostElement,!1)}selectLine(t){var e,a,i;if(this._listItems.forEach((t=>{t.classList.remove("draggable-selected")})),"SPAN"===(null===(e=t.target)||void 0===e?void 0:e.tagName)){const e=t.target;this._selectedItem={value:e.parentElement.getElementsByTagName("p")[0].textContent},e.parentElement.parentElement.classList.add("draggable-selected")}else if("P"===(null===(a=t.target)||void 0===a?void 0:a.tagName)){const e=t.target;this._selectedItem={value:e.textContent},e.parentElement.parentElement.classList.add("draggable-selected")}else if("DIV"===(null===(i=t.target)||void 0===i?void 0:i.tagName)){const e=t.target;this._selectedItem={value:e.getElementsByTagName("p")[0].textContent},e.parentElement.classList.add("draggable-selected")}}handleEventListeners(t,e,a,i){let r,o=!1;function l(t){r=t.parentElement.getAttribute("data-index")}function s(t){t.classList.add("over")}function n(t){t.classList.remove("over")}function d(t){t.preventDefault()}function g(e){if(o){let a=+e.getAttribute("data-index");const i=t[a].querySelector(".draggable");t[a].removeChild(i)}const a=+e.getAttribute("data-index");!function(e,a){const i=t[e].querySelector(".draggable"),r=t[a].querySelector(".draggable");t[e].appendChild(r),t[a].appendChild(i)}(+r,a),e.classList.remove("over")}i?(a.removeEventListener("dragenter",(function(){o=!1})),a.removeEventListener("dragleave",(function(){o=!0})),e.querySelectorAll("div.draggable").forEach((t=>{t.removeEventListener("dragstart",(function(){l(t)}))})),t.forEach((t=>{t.removeEventListener("dragover",(function(t){d(t)})),t.removeEventListener("drop",(function(){g(t)})),t.removeEventListener("dragenter",(function(){s(t)})),t.removeEventListener("dragleave",(function(){n(t)}))}))):(a.addEventListener("dragenter",(function(){o=!1})),a.addEventListener("dragleave",(function(){o=!0})),e.querySelectorAll("div.draggable").forEach((t=>{t.addEventListener("dragstart",(function(){l(t)}))})),t.forEach((t=>{t.addEventListener("dragover",(function(t){d(t)})),t.addEventListener("drop",(function(){g(t)})),t.addEventListener("dragenter",(function(){s(t)})),t.addEventListener("dragleave",(function(){n(t)}))})))}async getState(){let t=[];return this._listItems.forEach((e=>{let a={value:this.getValueItem(e),checked:this.getChecked(e)};t.push(a)})),t}getChecked(t){return this.isMultipleSelection?t.children[0].children[1].value:!!this._selectedItem&&t.children[0].children[1].textContent===this._selectedItem.value}getValueItem(t){return this.isMultipleSelection?t.children[0].children[2].textContent:t.children[0].children[1].textContent}componentDidLoad(){this.createList()}disconnectedCallback(){this.draggable&&this.handleEventListeners(this._listItems,this._draggableList,this._hostElement,!0)}render(){return e(a,{ref:t=>this._hostElement=t},e("ul",{ref:t=>this._draggableList=t,class:"draggable-list",id:"draggable-list"}))}};i.style=':host{--list__host--border-radius:var(--border--radius-medium, 12px);--list__host--padding:var(--space--medium, 12px);--list__icon__padding:var(--space--small, 6px);--list__item__margin:0 var(--space--small, 6px);--list__item--color:var(--title--primary, #2b3a54);--list__item--border-bottom:var(--border--small, 1px solid);--list__item--border-color:var(--title--primary, #2b3a54);--list__item--font-family:var(--font-pattern, #2b3a54);--list__item--font-size:var(--text--medium, 14px);--list__draggable__icon--image:url(\'data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m 12,16 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 m 0,-6 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 z"/></svg>\');border-radius:var(--list__host--border-radius);padding:var(--list__host--padding);max-height:100%;width:100%;background-color:#fff;display:flex}.draggable{cursor:pointer;display:flex;align-items:center;justify-content:flex-start;flex:1}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%;overflow-y:auto}.draggable-list li{background-color:#fff;display:flex;margin:var(--list__item__margin);font-family:var(--list__item--font-family);font-size:var(--list__item--font-size);color:var(--list__item--color)}.draggable-list li:not(:last-of-type){border-bottom:var(--list__item--border-bottom)}.draggable-list li.over .draggable{background-color:var(--background--strong)}.draggable:hover{background-color:var(--background--medium)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--title--primary);border-radius:var(--space--extra-small)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;height:6px;max-height:6px;min-height:6px;width:6px;max-width:6px;min-width:6px}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:\'\';display:flex;background-color:var(--list__item--color);width:24px;height:24px;-webkit-mask-image:var(--list__draggable__icon--image);mask-image:var(--list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}';export{i as ez_list}
|
package/dist/ezui/p-9dfccb16.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=/^([+-])?(\d+).?(\d*)[eE]([-+]?\d+)$/;class e{}e.stringToNumber=e=>{if(""===e||null==e)return NaN;if(e){var s="-"===(e=e.toString()).charAt(0);if(""===(e=t.test(e)?e.replace(/^-/g,""):e.replace(/[^\d.,]/g,"")))return Number(NaN);var r=e.indexOf(","),a=e.indexOf(".");a>r?e=e.replace(",",""):a<r&&(e=e.replace(/\./g,"@").replace(",",".").replace(/@/g,"")),s&&(e="-"+e)}return Number(e)},e.format=(t,s,r=NaN)=>{if(""===t||void 0===t||"NaN"===t)return NaN.toString();let a=e.stringToNumber(t);if(NaN===a)return NaN.toString();if(s<0||Math.abs(Math.round(1*s)/1)!==s)return e.changeFormat(a.toString());let i,h=0;h=NaN===r||Math.abs(Math.round(1*r)/1)!==r?s:r,i=(Math.round(a*Math.pow(10,s))/Math.pow(10,s)).toLocaleString("pt-br",{minimumFractionDigits:s});const n=s-h;if(n>0)for(let t=0;t<n;t++)"0"==i.substring(i.length-1)&&s>0&&(i=i.substring(0,i.length-1));return"."!=i.substring(i.length-1)&&","!=i.substring(i.length-1)||(i=i.substring(0,i.length-1)),i},e.keepOnlyDecimalSeparator=(t,e="pt-BR")=>(e=e.toUpperCase(),t.replace("EN-US"===e?/\,/g:/\./g,"")),e.changeFormat=t=>t.replace(/\./g,"_").replace(/\,/g,".").replace(/\_/g,",");class s{constructor(t){this._mask="",this._maskChars=new Array,this.placeholder=" ",this.mask=t}set mask(t){this._mask=t,this.updateInternalMask()}get mask(){return this._mask}format(t){let e="";const s=[0];let r=0;const a=this._maskChars.length;for(;r<a;)e=this._maskChars[r].append(e,t,s),r++;return e}updateInternalMask(){if(this._maskChars.length=0,null!=this.mask){let t=0;const e=this.mask.length;for(;t<e;){let r=this.mask.charAt(t);switch(r){case s.DIGIT_KEY:this._maskChars.push(new s.DigitMaskCharacter(this,r));break;case s.LITERAL_KEY:++t<e&&(r=this.mask.charAt(t),this._maskChars.push(new s.LiteralCharacter(this,r)));break;case s.UPPERCASE_KEY:this._maskChars.push(new s.UpperCaseCharacter(this,r));break;case s.LOWERCASE_KEY:this._maskChars.push(new s.LowerCaseCharacter(this,r));break;case s.ALPHA_NUMERIC_KEY:this._maskChars.push(new s.AlphaNumericCharacter(this,r));break;case s.CHARACTER_KEY:this._maskChars.push(new s.CharCharacter(this,r));break;case s.ANYTHING_KEY:this._maskChars.push(new s.MaskCharacter(this,r));break;default:this._maskChars.push(new s.LiteralCharacter(this,r))}t++}}}}s.DIGIT_KEY="#",s.LITERAL_KEY="'",s.UPPERCASE_KEY="U",s.LOWERCASE_KEY="L",s.ALPHA_NUMERIC_KEY="A",s.CHARACTER_KEY="?",s.ANYTHING_KEY="*",s.MaskCharacter=class{constructor(t,e){this.maskFormatter=t,this.type=e}isLiteral(){return!1}isValidCharacter(t){return this.isLiteral()?this.getChar(t)==t:(t=this.getChar(t),!0)}getChar(t){return t}append(t,e,s){const r=s[0]<e.length?e.charAt(s[0]):"";if(this.isLiteral()){const e=this.getChar(r);t+=e,e===r&&(s[0]=s[0]+1)}else if(s[0]>=e.length)t+=this.maskFormatter.placeholder,s[0]=s[0]+1;else{if(!this.isValidCharacter(r))throw new Error(`Valor inválido: "${r}". Na posição ${s[0]+1} espera-se ${this.getFormatMessage()}.`);t+=this.getChar(r),s[0]=s[0]+1}return t}getFormatMessage(){let t;switch(this.type){case s.UPPERCASE_KEY:case s.LOWERCASE_KEY:case s.CHARACTER_KEY:t="uma letra";break;case s.DIGIT_KEY:t="um número";break;case s.ALPHA_NUMERIC_KEY:t="uma letra ou um número";break;default:t=""}return t}},s.LiteralCharacter=class extends s.MaskCharacter{constructor(t,e){super(t,e),this._fixedChar=e}isLiteral(){return!0}getChar(t){return this._fixedChar}},s.DigitMaskCharacter=class extends s.MaskCharacter{isValidCharacter(t){return this.isDigit(t)&&super.isValidCharacter(t)}isDigit(t){return t>="0"&&t<="9"}},s.UpperCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toUpperCase()}},s.LowerCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toLocaleLowerCase()}},s.AlphaNumericCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z0-9]/i.test(t)&&super.isValidCharacter(t)}},s.CharCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}};class r{static prepareValue(t,e){if(t&&t.length>0&&"NaN"!=t){let s=t.replace(/:/g,"");if(e){if(this._maskFormatter.mask="##:##:##",s.length<6)for(;s.length<6;)s="0".concat(s)}else if(this._maskFormatter.mask="##:##",s.length<4)for(;s.length<4;)s="0".concat(s);if(this._maskFormatter)try{return this._maskFormatter.format(s)}catch(t){throw new Error(t.message)}}return""}static validateTime(t,e){let s=!0;if(t){let r=t.replace(/:/g,"");e?(["1","2","0"].includes(r[0])||(s=!1),["0","1","2","3","4","5"].includes(r[2])||(s=!1),["0","1","2","3","4","5"].includes(r[4])||(s=!1),"2"!=r[0]||["0","1","2","3"].includes(r[1])||(s=!1)):(["1","2","0"].includes(r[0])||(s=!1),["0","1","2","3","4","5"].includes(r[2])||(s=!1),"2"!=r[0]||["0","1","2","3"].includes(r[1])||(s=!1))}else s=!1;return s}}var a;r._maskFormatter=new s("##:##"),function(t){t[t.GET=0]="GET",t[t.PUT=1]="PUT",t[t.POST=2]="POST",t[t.DELETE=3]="DELETE"}(a||(a={}));export{s as M,e as N,r as T}
|