@sankhyalabs/ezui 1.1.76 → 1.1.79
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/AssetsUtils-02db4f46.js +24 -0
- package/dist/cjs/CSSVarsUtils-66e86394.js +18 -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 +26 -0
- package/dist/cjs/ez-button_3.cjs.entry.js +520 -0
- package/dist/cjs/ez-calendar_13.cjs.entry.js +2417 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +133 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +110375 -0
- package/dist/cjs/ez-icon.cjs.entry.js +30 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal_2.cjs.entry.js +370 -0
- 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 +10 -28
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/{index-9431aeeb.js → index-2003dec4.js} +1 -15
- package/dist/cjs/index-a2266984.js +7417 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +8 -5
- package/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/collection/components/ez-application/ez-application.js +35 -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 +173 -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 +65 -54
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +5 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css +2 -2
- package/dist/collection/components/ez-date-input/ez-date-input.js +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +243 -0
- package/dist/collection/components/ez-form/DataBinder.js +44 -0
- package/dist/collection/components/ez-form/ez-form.css +1 -15
- package/dist/collection/components/ez-form/ez-form.js +109 -428
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +45 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +11 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.js +14 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/FileInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.js +13 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextArea.tpl.js +5 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextInput.tpl.js +5 -0
- package/dist/collection/components/ez-form/store/form.slice.js +38 -0
- package/dist/collection/components/ez-form/structure/FormItem.js +11 -0
- package/dist/collection/components/ez-form/structure/FormSheet.js +5 -0
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +86 -0
- 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 +1 -165
- package/dist/collection/components/ez-number-input/ez-number-input.js +53 -339
- 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-search/ez-search.js +6 -1
- 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 +87 -0
- package/dist/collection/servidor.js +94 -94
- package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
- package/dist/collection/utils/CSSVarsUtils.js +6 -6
- package/dist/custom-elements/index.d.ts +32 -14
- package/dist/custom-elements/index.js +119419 -3209
- package/dist/esm/AssetsUtils-76ca41e1.js +22 -0
- package/dist/esm/CSSVarsUtils-aeee9825.js +16 -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 +22 -0
- package/dist/esm/ez-button_3.entry.js +514 -0
- package/dist/esm/ez-calendar_13.entry.js +2401 -0
- package/dist/esm/ez-date-time-input.entry.js +129 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +110371 -0
- package/dist/esm/ez-icon.entry.js +26 -0
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-modal_2.entry.js +365 -0
- 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 +4 -22
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/{index-fd3c8023.js → index-077c7fcf.js} +1 -15
- package/dist/esm/index-afe19542.js +7410 -0
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-00b837e2.js +1 -0
- package/dist/ezui/{p-a0b6eee2.entry.js → p-0a2056d9.entry.js} +1 -1
- package/dist/ezui/p-0d8368fc.entry.js +1 -0
- package/dist/ezui/p-1e36e3ff.entry.js +1 -0
- package/dist/ezui/p-446ec85b.js +1 -0
- package/dist/ezui/p-5509ee41.entry.js +369 -0
- package/dist/ezui/{p-d443f020.entry.js → p-57ea4b84.entry.js} +1 -1
- package/dist/ezui/{p-66954a04.entry.js → p-6d157776.entry.js} +1 -1
- package/dist/ezui/p-7a1f2e0e.entry.js +1 -0
- package/dist/ezui/p-7de3c95d.js +1 -0
- package/dist/ezui/p-857ead8e.entry.js +1 -0
- package/dist/ezui/p-8b099482.js +1 -0
- package/dist/ezui/p-920bb8c9.entry.js +1 -0
- package/dist/ezui/p-9be02ecf.entry.js +1 -0
- package/dist/ezui/p-a4a39579.entry.js +1 -0
- package/dist/ezui/p-c89629eb.js +1 -0
- package/dist/ezui/p-d5699f29.entry.js +1 -0
- package/dist/ezui/p-d64a3939.entry.js +1 -0
- package/dist/ezui/{p-823ff0a0.entry.js → p-da31cd21.entry.js} +1 -1
- package/dist/types/components/ez-application/ez-application.d.ts +10 -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-combo-box/ez-combo-box.d.ts +1 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +10 -0
- package/dist/types/components/ez-form/ez-form.d.ts +24 -32
- package/dist/types/components/ez-form/fieldbuilder/FieldBuilder.d.ts +2 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/FileInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +8 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextArea.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-form/store/form.slice.d.ts +24 -0
- package/dist/types/components/ez-form/structure/FormItem.d.ts +9 -0
- package/dist/types/components/ez-form/structure/FormSheet.d.ts +9 -0
- package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +27 -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 +29 -63
- package/dist/types/components/ez-search/ez-search.d.ts +2 -0
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
- package/dist/types/components/test-du/test-du.d.ts +12 -0
- package/dist/types/components.d.ts +271 -175
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -1
- package/package.json +10 -8
- package/react/components.d.ts +6 -3
- package/react/components.js +6 -3
- package/react/components.js.map +1 -1
- package/dist/cjs/CSSVarsUtils-f8827674.js +0 -18
- 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/cjs/ez-number-input.cjs.entry.js +0 -250
- package/dist/collection/components/ez-form/assets/trash-can-outline.svg +0 -3
- package/dist/collection/components/ez-form/store/Form.actions.js +0 -132
- package/dist/collection/components/ez-form/store/Form.reducer.js +0 -194
- package/dist/collection/components/ez-form/store/Form.selectors.js +0 -44
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +0 -301
- package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +0 -8
- package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +0 -24
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +0 -227
- package/dist/collection/components/ez-form/subcomponents/place-holder.js +0 -14
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +0 -95
- package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +0 -27
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +0 -41
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +0 -37
- 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/CSSVarsUtils-e0128b01.js +0 -16
- 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/esm/ez-number-input.entry.js +0 -246
- package/dist/ezui/assets/trash-can-outline.svg +0 -3
- 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/ezui/p-d1889704.js +0 -1
- package/dist/ezui/p-e0ab3746.js +0 -1
- package/dist/types/components/ez-form/store/Form.actions.d.ts +0 -111
- package/dist/types/components/ez-form/store/Form.reducer.d.ts +0 -20
- package/dist/types/components/ez-form/store/Form.selectors.d.ts +0 -14
- package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +0 -91
- package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +0 -24
- package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +0 -16
- package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +0 -3
- package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +0 -11
- package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +0 -13
- package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +0 -14
- package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +0 -19
- package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-9431aeeb.js');
|
|
6
|
-
|
|
7
|
-
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}";
|
|
8
|
-
|
|
9
|
-
let EzList = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this._listItems = [];
|
|
13
|
-
/**
|
|
14
|
-
* Define a lista inicial do componente.
|
|
15
|
-
*/
|
|
16
|
-
this.initialList = [];
|
|
17
|
-
/**
|
|
18
|
-
* Define se o componente terá o comportamento de arrasto de linhas.
|
|
19
|
-
*/
|
|
20
|
-
this.draggable = true;
|
|
21
|
-
/**
|
|
22
|
-
* Define se é possível selecionar mais de um registro.
|
|
23
|
-
*/
|
|
24
|
-
this.isMultipleSelection = true;
|
|
25
|
-
}
|
|
26
|
-
createList() {
|
|
27
|
-
[...this.initialList]
|
|
28
|
-
.forEach((item, index) => {
|
|
29
|
-
const listItem = document.createElement('li');
|
|
30
|
-
listItem.setAttribute('data-index', index.toString());
|
|
31
|
-
if (!this.isMultipleSelection)
|
|
32
|
-
listItem.onclick = this.selectLine.bind(this);
|
|
33
|
-
listItem.innerHTML = `
|
|
34
|
-
<div class="draggable" ${this.draggable ? "draggable=true" : ""}>
|
|
35
|
-
|
|
36
|
-
${this.draggable ? '<span class="draggable-icon"></span>' : ""}
|
|
37
|
-
|
|
38
|
-
${this.isMultipleSelection ? `<ez-check class='checkbox' value=${item.checked}></ez-check>` : ''}
|
|
39
|
-
<p title="${item.value}" class="person-name text--ellipsis">${item.value}</p>
|
|
40
|
-
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
this._listItems.push(listItem);
|
|
44
|
-
this._draggableList.appendChild(listItem);
|
|
45
|
-
});
|
|
46
|
-
if (this.draggable) {
|
|
47
|
-
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, false);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
selectLine(e) {
|
|
51
|
-
var _a, _b, _c;
|
|
52
|
-
this._listItems.forEach(item => { item.classList.remove('draggable-selected'); });
|
|
53
|
-
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === 'SPAN') {
|
|
54
|
-
const span = e.target;
|
|
55
|
-
this._selectedItem = { value: span.parentElement.getElementsByTagName('p')[0].textContent };
|
|
56
|
-
span.parentElement.parentElement.classList.add('draggable-selected');
|
|
57
|
-
}
|
|
58
|
-
else if (((_b = e.target) === null || _b === void 0 ? void 0 : _b.tagName) === 'P') {
|
|
59
|
-
const paragraph = e.target;
|
|
60
|
-
this._selectedItem = { value: paragraph.textContent };
|
|
61
|
-
paragraph.parentElement.parentElement.classList.add('draggable-selected');
|
|
62
|
-
}
|
|
63
|
-
else if (((_c = e.target) === null || _c === void 0 ? void 0 : _c.tagName) === 'DIV') {
|
|
64
|
-
const draggable = e.target;
|
|
65
|
-
this._selectedItem = { value: draggable.getElementsByTagName('p')[0].textContent };
|
|
66
|
-
draggable.parentElement.classList.add('draggable-selected');
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
handleEventListeners(listItems, dragableList, hostElement, removeEvents) {
|
|
70
|
-
let _dragStartIndex;
|
|
71
|
-
let _isItemOut = false;
|
|
72
|
-
function dragStart(item) {
|
|
73
|
-
_dragStartIndex = item.parentElement.getAttribute('data-index');
|
|
74
|
-
}
|
|
75
|
-
function dragEnter(item) {
|
|
76
|
-
item.classList.add('over');
|
|
77
|
-
}
|
|
78
|
-
function dragLeave(item) {
|
|
79
|
-
item.classList.remove('over');
|
|
80
|
-
}
|
|
81
|
-
function dragOver(e) {
|
|
82
|
-
e.preventDefault();
|
|
83
|
-
}
|
|
84
|
-
function dragDrop(item) {
|
|
85
|
-
if (_isItemOut) {
|
|
86
|
-
let index = +item.getAttribute('data-index');
|
|
87
|
-
const itemRemoved = listItems[index].querySelector('.draggable');
|
|
88
|
-
listItems[index].removeChild(itemRemoved);
|
|
89
|
-
}
|
|
90
|
-
const dragEndIndex = +item.getAttribute('data-index');
|
|
91
|
-
swapItems(+_dragStartIndex, dragEndIndex);
|
|
92
|
-
item.classList.remove('over');
|
|
93
|
-
}
|
|
94
|
-
function swapItems(fromIndex, toIndex) {
|
|
95
|
-
const itemOne = listItems[fromIndex].querySelector('.draggable');
|
|
96
|
-
const itemTwo = listItems[toIndex].querySelector('.draggable');
|
|
97
|
-
listItems[fromIndex].appendChild(itemTwo);
|
|
98
|
-
listItems[toIndex].appendChild(itemOne);
|
|
99
|
-
return listItems;
|
|
100
|
-
}
|
|
101
|
-
if (!removeEvents) {
|
|
102
|
-
hostElement.addEventListener('dragenter', function () { _isItemOut = false; });
|
|
103
|
-
hostElement.addEventListener('dragleave', function () { _isItemOut = true; });
|
|
104
|
-
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
105
|
-
draggables.forEach(draggable => {
|
|
106
|
-
draggable.addEventListener('dragstart', function () { dragStart(draggable); });
|
|
107
|
-
});
|
|
108
|
-
listItems.forEach(item => {
|
|
109
|
-
item.addEventListener('dragover', function (event) { dragOver(event); });
|
|
110
|
-
item.addEventListener('drop', function () { dragDrop(item); });
|
|
111
|
-
item.addEventListener('dragenter', function () { dragEnter(item); });
|
|
112
|
-
item.addEventListener('dragleave', function () { dragLeave(item); });
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
hostElement.removeEventListener('dragenter', function () { _isItemOut = false; });
|
|
117
|
-
hostElement.removeEventListener('dragleave', function () { _isItemOut = true; });
|
|
118
|
-
const draggables = dragableList.querySelectorAll("div.draggable");
|
|
119
|
-
draggables.forEach(draggable => {
|
|
120
|
-
draggable.removeEventListener('dragstart', function () { dragStart(draggable); });
|
|
121
|
-
});
|
|
122
|
-
listItems.forEach(item => {
|
|
123
|
-
item.removeEventListener('dragover', function (event) { dragOver(event); });
|
|
124
|
-
item.removeEventListener('drop', function () { dragDrop(item); });
|
|
125
|
-
item.removeEventListener('dragenter', function () { dragEnter(item); });
|
|
126
|
-
item.removeEventListener('dragleave', function () { dragLeave(item); });
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Retorna uma promessa com o estado da atual lista composta por objetos do tipo {value: string, checked: boolean}.
|
|
132
|
-
*/
|
|
133
|
-
async getState() {
|
|
134
|
-
let emitionList = [];
|
|
135
|
-
this._listItems.forEach(item => {
|
|
136
|
-
let emitionItem = {
|
|
137
|
-
value: this.getValueItem(item),
|
|
138
|
-
checked: this.getChecked(item)
|
|
139
|
-
};
|
|
140
|
-
emitionList.push(emitionItem);
|
|
141
|
-
});
|
|
142
|
-
return emitionList;
|
|
143
|
-
}
|
|
144
|
-
getChecked(item) {
|
|
145
|
-
if (this.isMultipleSelection) {
|
|
146
|
-
return item.children[0].children[1].value;
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
if (!this._selectedItem)
|
|
150
|
-
return false;
|
|
151
|
-
return (item.children[0].children[1].textContent === this._selectedItem.value);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
getValueItem(item) {
|
|
155
|
-
if (this.isMultipleSelection) {
|
|
156
|
-
return item.children[0].children[2].textContent;
|
|
157
|
-
}
|
|
158
|
-
return item.children[0].children[1].textContent;
|
|
159
|
-
}
|
|
160
|
-
componentDidLoad() {
|
|
161
|
-
this.createList();
|
|
162
|
-
}
|
|
163
|
-
disconnectedCallback() {
|
|
164
|
-
if (this.draggable) {
|
|
165
|
-
this.handleEventListeners(this._listItems, this._draggableList, this._hostElement, true);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
render() {
|
|
169
|
-
return (index.h(index.Host, { ref: (el) => this._hostElement = el }, index.h("ul", { ref: (el) => this._draggableList = el, class: "draggable-list", id: "draggable-list" })));
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
EzList.style = ezListCss;
|
|
173
|
-
|
|
174
|
-
exports.ez_list = EzList;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-9431aeeb.js');
|
|
6
|
-
|
|
7
|
-
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%}}";
|
|
8
|
-
|
|
9
|
-
let EzModal = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.ezCloseModal = index.createEvent(this, "ezCloseModal", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Controle de exibição do Modal
|
|
15
|
-
*/
|
|
16
|
-
this.opened = true;
|
|
17
|
-
/**
|
|
18
|
-
* Define se o modal será fechado ao clicar ESC
|
|
19
|
-
*/
|
|
20
|
-
this.closeEsc = false;
|
|
21
|
-
/**
|
|
22
|
-
* Define se o modal será fechado ao clicar fora do conteúdo.
|
|
23
|
-
*/
|
|
24
|
-
this.closeOutsideClick = false;
|
|
25
|
-
this.handleKeyboardEvent = (ev) => {
|
|
26
|
-
if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
|
|
27
|
-
this.closeModal();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
handleopenedChange() {
|
|
32
|
-
if (this.opened) {
|
|
33
|
-
document.addEventListener("keydown", this.handleKeyboardEvent);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
document.removeEventListener("keydown", this.handleKeyboardEvent);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
closeModal() {
|
|
40
|
-
this.opened = false;
|
|
41
|
-
this.ezCloseModal.emit(this.opened);
|
|
42
|
-
}
|
|
43
|
-
componentDidLoad() {
|
|
44
|
-
this.handleopenedChange();
|
|
45
|
-
}
|
|
46
|
-
onMouseDownHandler(event) {
|
|
47
|
-
if (this.closeOutsideClick && event.target === this._overlay) {
|
|
48
|
-
this.closeModal();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
const positionSufix = this.align === "left" ? "left" : "right";
|
|
53
|
-
return (index.h(index.Host, null, this.opened
|
|
54
|
-
?
|
|
55
|
-
index.h("div", { class: "modal", onMouseDown: evt => this.onMouseDownHandler(evt) }, index.h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, index.h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalSize}` }, index.h("slot", null))))
|
|
56
|
-
:
|
|
57
|
-
undefined));
|
|
58
|
-
}
|
|
59
|
-
static get watchers() { return {
|
|
60
|
-
"opened": ["handleopenedChange"]
|
|
61
|
-
}; }
|
|
62
|
-
};
|
|
63
|
-
EzModal.style = ezModalCss;
|
|
64
|
-
|
|
65
|
-
exports.ez_modal = EzModal;
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-9431aeeb.js');
|
|
6
|
-
const RequestMetadata = require('./RequestMetadata-2cd01e8a.js');
|
|
7
|
-
|
|
8
|
-
const ezNumberInputCss = ":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}";
|
|
9
|
-
|
|
10
|
-
let NumberInput = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
14
|
-
/**
|
|
15
|
-
* Deixa o campo disponível ou não para digitação.
|
|
16
|
-
*/
|
|
17
|
-
this.enabled = true;
|
|
18
|
-
/**
|
|
19
|
-
* Deixa o campo disponível ou não para digitação.
|
|
20
|
-
*/
|
|
21
|
-
this.textleft = false;
|
|
22
|
-
/**
|
|
23
|
-
* Opção de configurar a transformação de string to number entre formatação pt-BR e en-US
|
|
24
|
-
* (formatação de ENTRADA e SAÍDA do componente: pt-BR="###.###,##" en-US="###,###.##"; Default: "pt-BR")
|
|
25
|
-
* Qualquer outro valor que não seja "en-US", adotará a formatação "pt-BR"
|
|
26
|
-
* Não é case sensitive
|
|
27
|
-
*/
|
|
28
|
-
this.formatnumber = "PT-BR";
|
|
29
|
-
//---------------------------------------------
|
|
30
|
-
// Private Methods
|
|
31
|
-
//---------------------------------------------
|
|
32
|
-
this.settingStrValueIntNumber = (strvalue) => {
|
|
33
|
-
if (this.precision === 0 && strvalue) {
|
|
34
|
-
return strvalue = strvalue.replace(/\./g, '').replace(/\,/g, '');
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return strvalue;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
this.checkNumberValidation = (valuePtBRorNumber) => {
|
|
41
|
-
try {
|
|
42
|
-
if (valuePtBRorNumber != "" && RequestMetadata.NumberUtils.format(valuePtBRorNumber, this.precision, this.prettyprecision) === "NaN") {
|
|
43
|
-
this.errorMessage = `Valor não é um número válido`;
|
|
44
|
-
this.value = undefined;
|
|
45
|
-
this.strvalue = undefined;
|
|
46
|
-
if (this._inputElem) {
|
|
47
|
-
this._inputElem.value = "";
|
|
48
|
-
}
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
catch (err) {
|
|
53
|
-
this.errorMessage = err.message;
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
return true;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
showError() {
|
|
60
|
-
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
61
|
-
if (this._inputElem) {
|
|
62
|
-
if (hasError) {
|
|
63
|
-
this._inputElem.classList.add('hasError');
|
|
64
|
-
this._messageBoxElem.classList.add('hasError');
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this._inputElem.classList.remove('hasError');
|
|
68
|
-
this._messageBoxElem.classList.remove('hasError');
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
onPrecisionChanged(newPrecision) {
|
|
73
|
-
if (isNaN(newPrecision)) {
|
|
74
|
-
this.precision = 0;
|
|
75
|
-
}
|
|
76
|
-
this.handleFocusout();
|
|
77
|
-
}
|
|
78
|
-
onPrettyPrecisionChanged(newPrettyPrecision) {
|
|
79
|
-
if (isNaN(newPrettyPrecision)) {
|
|
80
|
-
this.prettyprecision = 0;
|
|
81
|
-
}
|
|
82
|
-
this.handleFocusout();
|
|
83
|
-
}
|
|
84
|
-
onValueChanged(newValue) {
|
|
85
|
-
if (isNaN(newValue) && newValue !== undefined) {
|
|
86
|
-
this.value = undefined;
|
|
87
|
-
this.strvalue = "";
|
|
88
|
-
this.errorMessage = `Valor não é um número válido`;
|
|
89
|
-
this.adjustFloatingLabel();
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
this.settingComponent();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
adjustFloatingLabel() {
|
|
96
|
-
if (this._labelElem) {
|
|
97
|
-
if (this.label && this._inputElem.value && this._inputElem.value.toString().length > 0) {
|
|
98
|
-
if (!this._labelElem.classList.contains("input__label--floated")) {
|
|
99
|
-
this._labelElem.classList.add("input__label--floated");
|
|
100
|
-
}
|
|
101
|
-
if (!this._inputElem.classList.contains("input--with--label")) {
|
|
102
|
-
this._inputElem.classList.add("input--with--label");
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this._labelElem.classList.remove("input__label--floated");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
//---------------------------------------------
|
|
111
|
-
// Public methods
|
|
112
|
-
//---------------------------------------------
|
|
113
|
-
/**
|
|
114
|
-
* Faz o foco no componente de input
|
|
115
|
-
*/
|
|
116
|
-
async setFocus() {
|
|
117
|
-
this._inputElem.focus();
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Remove o foco no componente de input
|
|
121
|
-
*/
|
|
122
|
-
async setBlur() {
|
|
123
|
-
this._inputElem.blur();
|
|
124
|
-
}
|
|
125
|
-
//---------------------------------------------
|
|
126
|
-
// Event handlers
|
|
127
|
-
//---------------------------------------------
|
|
128
|
-
/**
|
|
129
|
-
* Promove a atualização do componente
|
|
130
|
-
*/
|
|
131
|
-
async handleFocusout() {
|
|
132
|
-
//Setting value and strvalue by stringinput
|
|
133
|
-
if (this._inputElem) {
|
|
134
|
-
this.errorMessage = "";
|
|
135
|
-
if (this._inputElem.value !== "") {
|
|
136
|
-
this._inputElem.value = this.settingStrValueIntNumber(this._inputElem.value);
|
|
137
|
-
const value = RequestMetadata.NumberUtils.keepOnlyDecimalSeparator(this._inputElem.value, this.formatnumber.toUpperCase());
|
|
138
|
-
if (!this.checkNumberValidation(value)) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (value) {
|
|
142
|
-
try {
|
|
143
|
-
this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision) : RequestMetadata.NumberUtils.changeFormat(RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision));
|
|
144
|
-
}
|
|
145
|
-
catch (e) {
|
|
146
|
-
this.errorMessage = e.message;
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
this.strvalue = this._inputElem.value;
|
|
151
|
-
this.value = RequestMetadata.NumberUtils.stringToNumber(value);
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
this.strvalue = undefined;
|
|
155
|
-
this.value = undefined;
|
|
156
|
-
}
|
|
157
|
-
this.adjustFloatingLabel();
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
handleChange() {
|
|
161
|
-
this._inputElem.value = this.settingStrValueIntNumber(this._inputElem.value);
|
|
162
|
-
}
|
|
163
|
-
handleSlotChange(ev) {
|
|
164
|
-
const slot = ev.target;
|
|
165
|
-
const content = slot.assignedElements()[0];
|
|
166
|
-
content.style.position = "absolute";
|
|
167
|
-
content.style.display = "flex";
|
|
168
|
-
content.style.alignItems = "center";
|
|
169
|
-
content.style.justifyContent = "center";
|
|
170
|
-
content.style.overflow = "hidden";
|
|
171
|
-
content.style.top = "0px";
|
|
172
|
-
content.style.width = "var(--ni__icon--width)";
|
|
173
|
-
content.style.height = "var(--ni--height)";
|
|
174
|
-
if (slot.name == "leftIcon") {
|
|
175
|
-
content.style.left = "0px";
|
|
176
|
-
content.style.borderRadius = "var(--ni--border-radius) 0 0 var(--ni--border-radius)";
|
|
177
|
-
this._inputElem.classList.add('icon--left');
|
|
178
|
-
if (this._labelElem) {
|
|
179
|
-
this._labelElem.classList.add("input__label--left");
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
else if (slot.name == "rightIcon") {
|
|
183
|
-
content.style.right = "0px";
|
|
184
|
-
content.style.borderRadius = "0 var(--ni--border-radius) var(--ni--border-radius) 0";
|
|
185
|
-
this._inputElem.classList.add('icon--right');
|
|
186
|
-
}
|
|
187
|
-
this.showError();
|
|
188
|
-
}
|
|
189
|
-
doFocus() {
|
|
190
|
-
if (this.label && this._labelElem) {
|
|
191
|
-
this._labelElem.classList.contains("input__label--floated") ? undefined : this._labelElem.classList.add("input__label--floated");
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
settingComponent() {
|
|
195
|
-
const value = '' + this.value;
|
|
196
|
-
if (this.value !== undefined) {
|
|
197
|
-
try {
|
|
198
|
-
this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision) : RequestMetadata.NumberUtils.changeFormat(RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision));
|
|
199
|
-
}
|
|
200
|
-
catch (e) {
|
|
201
|
-
this.errorMessage = e.message;
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
this.strvalue = this._inputElem.value;
|
|
205
|
-
}
|
|
206
|
-
this.ezChange.emit({ strValue: this.strvalue, value: this.value });
|
|
207
|
-
this.adjustFloatingLabel();
|
|
208
|
-
}
|
|
209
|
-
settingValue() {
|
|
210
|
-
//this.value: en-US format => Need to convert
|
|
211
|
-
const value = !isNaN(this.value) ? '' + this.value : 'NaN';
|
|
212
|
-
if (!this.checkNumberValidation(value)) {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
//output default from ".format": pt-BR
|
|
216
|
-
const tempStrValue = RequestMetadata.NumberUtils.format(value, this.precision, this.prettyprecision);
|
|
217
|
-
//output => depends to formatnumber
|
|
218
|
-
this.strvalue = this.formatnumber.toUpperCase() !== 'EN-US' ? tempStrValue : RequestMetadata.NumberUtils.changeFormat(tempStrValue);
|
|
219
|
-
RequestMetadata.NumberUtils.format(this.value.toString(), this.precision, this.prettyprecision);
|
|
220
|
-
}
|
|
221
|
-
//---------------------------------------------
|
|
222
|
-
// Lifecycle web component
|
|
223
|
-
//---------------------------------------------
|
|
224
|
-
componentDidLoad() {
|
|
225
|
-
if (!this.textleft) {
|
|
226
|
-
this._inputElem.classList.add('text--right');
|
|
227
|
-
}
|
|
228
|
-
this.showError();
|
|
229
|
-
this.adjustFloatingLabel();
|
|
230
|
-
}
|
|
231
|
-
componentWillLoad() {
|
|
232
|
-
this.onPrecisionChanged(this.precision);
|
|
233
|
-
this.onPrettyPrecisionChanged(this.prettyprecision);
|
|
234
|
-
this.settingValue();
|
|
235
|
-
}
|
|
236
|
-
render() {
|
|
237
|
-
const labelInput = this.label ? index.h("label", { onClick: () => this._inputElem.focus(), class: "input__label", ref: (el) => this._labelElem = el }, this.label) : null;
|
|
238
|
-
return (index.h(index.Host, null, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), labelInput, index.h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.strvalue, disabled: !this.enabled, onInput: this.handleChange.bind(this), onFocusout: this.handleFocusout.bind(this) }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
|
|
239
|
-
}
|
|
240
|
-
get el() { return index.getElement(this); }
|
|
241
|
-
static get watchers() { return {
|
|
242
|
-
"errorMessage": ["showError"],
|
|
243
|
-
"precision": ["onPrecisionChanged"],
|
|
244
|
-
"prettyprecision": ["onPrettyPrecisionChanged"],
|
|
245
|
-
"value": ["onValueChanged"]
|
|
246
|
-
}; }
|
|
247
|
-
};
|
|
248
|
-
NumberInput.style = ezNumberInputCss;
|
|
249
|
-
|
|
250
|
-
exports.ez_number_input = NumberInput;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="11" height="12" viewBox="0 0 11 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M3.333 0V0.667H0V2H0.667V10.667C0.667 11.0205 0.80744 11.3596 1.05743 11.6096C1.30741 11.8596 1.64647 12 2 12H8.667C9.02053 12 9.35959 11.8596 9.60957 11.6096C9.85956 11.3596 10 11.0205 10 10.667V2H10.667V0.667H7.333V0H3.333ZM2 2H8.667V10.667H2V2ZM3.333 3.333V9.333H4.667V3.333H3.333ZM6 3.333V9.333H7.333V3.333H6Z" fill="white"/>
|
|
3
|
-
</svg>
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
export function changeFieldValue(dataUnit, recordId, fieldName, value) {
|
|
2
|
-
return {
|
|
3
|
-
type: "FORM/CHANGEFIELD",
|
|
4
|
-
payload: { dataUnit, recordId, fieldName, value }
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export function changeTab(formId, index) {
|
|
8
|
-
return {
|
|
9
|
-
type: "FORM/CHANGETAB",
|
|
10
|
-
payload: { formId, index }
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export function clearEdition(dataUnit, recordsLimit) {
|
|
14
|
-
return {
|
|
15
|
-
type: "FORM/CLEAREDITION",
|
|
16
|
-
payload: {
|
|
17
|
-
dataUnit,
|
|
18
|
-
recordsLimit
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export function collapseExpandGroup(collapseId, collapsed) {
|
|
23
|
-
return {
|
|
24
|
-
type: "FORM/COLLAPSEGROUP",
|
|
25
|
-
payload: { collapseId, collapsed }
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export function previousRecord(dataUnit) {
|
|
29
|
-
return {
|
|
30
|
-
type: "FORM/NAVIGATE",
|
|
31
|
-
payload: {
|
|
32
|
-
dataUnit,
|
|
33
|
-
limit: 0,
|
|
34
|
-
backward: true
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export function nextRecord(dataUnit, limit) {
|
|
39
|
-
return {
|
|
40
|
-
type: "FORM/NAVIGATE",
|
|
41
|
-
payload: {
|
|
42
|
-
dataUnit,
|
|
43
|
-
limit,
|
|
44
|
-
backward: false
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
export function insertRecord(dataUnit, insertionIndex) {
|
|
49
|
-
return {
|
|
50
|
-
type: "FORM/INSERT",
|
|
51
|
-
payload: {
|
|
52
|
-
dataUnit,
|
|
53
|
-
insertionIndex
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
export function formLoad() {
|
|
58
|
-
return {
|
|
59
|
-
type: "FORM/LOAD"
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export function dataLoading(dataUnit) {
|
|
63
|
-
return {
|
|
64
|
-
type: "FORM/DATALOADING",
|
|
65
|
-
payload: {
|
|
66
|
-
dataUnit
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
export function savingChanges(dataUnit) {
|
|
71
|
-
return {
|
|
72
|
-
type: "FORM/SAVINGCHANGES",
|
|
73
|
-
payload: {
|
|
74
|
-
dataUnit
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
export function dataLoaded(dataUnit) {
|
|
79
|
-
return {
|
|
80
|
-
type: "FORM/DATALOADED",
|
|
81
|
-
payload: {
|
|
82
|
-
dataUnit
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
export function changesSaved(dataUnit) {
|
|
87
|
-
return {
|
|
88
|
-
type: "FORM/CHANGESSAVED",
|
|
89
|
-
payload: {
|
|
90
|
-
dataUnit
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
export function removingRecord(dataUnit) {
|
|
95
|
-
return {
|
|
96
|
-
type: "FORM/REMOVINGRECORD",
|
|
97
|
-
payload: {
|
|
98
|
-
dataUnit
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
export function recordRemoved(dataUnit) {
|
|
103
|
-
return {
|
|
104
|
-
type: "FORM/RECORDREMOVED",
|
|
105
|
-
payload: {
|
|
106
|
-
dataUnit
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
export function invalidField(tabController, tabIndex, dataUnit, recordIndex, recordId, fieldName, errorMessage) {
|
|
111
|
-
return {
|
|
112
|
-
type: "FORM/INVALIDFIELD",
|
|
113
|
-
payload: {
|
|
114
|
-
tabController,
|
|
115
|
-
tabIndex,
|
|
116
|
-
dataUnit,
|
|
117
|
-
recordId,
|
|
118
|
-
recordIndex,
|
|
119
|
-
fieldName,
|
|
120
|
-
errorMessage
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
export function showHideNavigationButtons(buttonName, status) {
|
|
125
|
-
return {
|
|
126
|
-
type: "FORM/SHOWHIDENAVBTN",
|
|
127
|
-
payload: {
|
|
128
|
-
buttonName,
|
|
129
|
-
status
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|