@sankhyalabs/ezui 1.1.96 → 1.1.99
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/{StringUtils-0ba09df4.js → AssetsUtils-69356e76.js} +22 -0
- package/dist/cjs/UnitMetadata-63c56042.js +1311 -0
- package/dist/cjs/{ez-calendar_14.cjs.entry.js → ez-calendar_16.cjs.entry.js} +227 -35
- package/dist/cjs/ez-grid.cjs.entry.js +38 -19
- package/dist/cjs/ez-modal_2.cjs.entry.js +3 -4
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-form/DataBinder.js +12 -0
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +2 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +4 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +2 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -2
- package/dist/collection/components/ez-icon/ez-icon.css +5 -0
- package/dist/custom-elements/index.js +219 -6314
- package/dist/esm/{StringUtils-cbf10229.js → AssetsUtils-0e207bec.js} +22 -1
- package/dist/esm/UnitMetadata-109880b0.js +1305 -0
- package/dist/esm/{ez-calendar_14.entry.js → ez-calendar_16.entry.js} +194 -4
- package/dist/esm/ez-grid.entry.js +23 -4
- package/dist/esm/ez-modal_2.entry.js +2 -3
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-6714a1b2.entry.js → p-18de871c.entry.js} +10 -10
- package/dist/ezui/p-9fab5606.js +1 -0
- package/dist/ezui/p-a30309ce.entry.js +1 -0
- package/dist/ezui/{p-2617733e.entry.js → p-afb820c1.entry.js} +1 -1
- package/dist/ezui/p-c3f30dff.entry.js +1 -0
- package/dist/ezui/p-ec7c1b86.js +1 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -0
- package/package.json +2 -2
- package/dist/cjs/AssetsUtils-4909c6de.js +0 -24
- package/dist/cjs/CSSVarsUtils-8fbdf2e0.js +0 -19
- package/dist/cjs/ez-icon.cjs.entry.js +0 -42
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
- package/dist/cjs/index-6164b259.js +0 -7460
- package/dist/esm/AssetsUtils-9b1329a3.js +0 -22
- package/dist/esm/CSSVarsUtils-667e0016.js +0 -17
- package/dist/esm/ez-icon.entry.js +0 -38
- package/dist/esm/ez-time-input.entry.js +0 -114
- package/dist/esm/index-74a9c220.js +0 -7452
- package/dist/ezui/p-2f84ba72.js +0 -1
- package/dist/ezui/p-38589c64.entry.js +0 -1
- package/dist/ezui/p-477bb703.js +0 -1
- package/dist/ezui/p-a943d501.entry.js +0 -1
- package/dist/ezui/p-b139372f.entry.js +0 -1
- package/dist/ezui/p-c6762896.js +0 -1
- package/dist/ezui/p-d54c157f.js +0 -1
- package/dist/ezui/p-ef393d36.entry.js +0 -1
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-88286449.js');
|
|
6
|
-
const index$1 = require('./index-6164b259.js');
|
|
7
|
-
const CSSVarsUtils = require('./CSSVarsUtils-8fbdf2e0.js');
|
|
8
|
-
const AssetsUtils = require('./AssetsUtils-4909c6de.js');
|
|
9
|
-
|
|
10
|
-
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";
|
|
11
|
-
|
|
12
|
-
let EzTimeInput = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
/**
|
|
16
|
-
* Deixa o campo disponível ou não para digitação.
|
|
17
|
-
*/
|
|
18
|
-
this.enabled = true;
|
|
19
|
-
/**
|
|
20
|
-
* Define se o componente irá ou não considerar os segundos
|
|
21
|
-
*/
|
|
22
|
-
this.showSeconds = false;
|
|
23
|
-
}
|
|
24
|
-
prepareMask() {
|
|
25
|
-
if (this.showSeconds) {
|
|
26
|
-
if (this._maskFormatter == undefined) {
|
|
27
|
-
this._maskFormatter = new index$1.MaskFormatter("##:##:##");
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this._maskFormatter.mask = "##:##:##";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
if (this._maskFormatter == undefined) {
|
|
35
|
-
this._maskFormatter = new index$1.MaskFormatter("##:##");
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this._maskFormatter.mask = "##:##";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
onValueChanged() {
|
|
43
|
-
if (this.value === NaN) {
|
|
44
|
-
this.value = undefined;
|
|
45
|
-
this.handleFocusout();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//---------------------------------------------
|
|
49
|
-
// Public methods
|
|
50
|
-
//---------------------------------------------
|
|
51
|
-
/**
|
|
52
|
-
* Faz o foco no componente de input
|
|
53
|
-
*/
|
|
54
|
-
async setFocus() {
|
|
55
|
-
this._inputElem.focus();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Remove o foco no componente de input
|
|
59
|
-
*/
|
|
60
|
-
async setBlur() {
|
|
61
|
-
this._inputElem.blur();
|
|
62
|
-
}
|
|
63
|
-
//---------------------------------------------
|
|
64
|
-
// Event handlers
|
|
65
|
-
//---------------------------------------------
|
|
66
|
-
handleFocusout() {
|
|
67
|
-
this.errorMessage = "";
|
|
68
|
-
this.prepareValue(this.viewValue);
|
|
69
|
-
if (!index$1.TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
70
|
-
this.clearField();
|
|
71
|
-
this.errorMessage = "Favor inserir um horário válido.";
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
prepareValue(value) {
|
|
75
|
-
try {
|
|
76
|
-
this.viewValue = index$1.TimeFormatter.prepareValue(value, this.showSeconds);
|
|
77
|
-
}
|
|
78
|
-
catch (e) {
|
|
79
|
-
this.clearField();
|
|
80
|
-
this.errorMessage = e.message;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
clearField() {
|
|
84
|
-
this.viewValue = this.value = undefined;
|
|
85
|
-
}
|
|
86
|
-
handleChange() {
|
|
87
|
-
this.viewValue = this._inputElem.value;
|
|
88
|
-
this.value = index$1.NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
89
|
-
}
|
|
90
|
-
//---------------------------------------------
|
|
91
|
-
// Lifecycle web component
|
|
92
|
-
//---------------------------------------------
|
|
93
|
-
componentDidLoad() {
|
|
94
|
-
this.onValueChanged();
|
|
95
|
-
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
96
|
-
}
|
|
97
|
-
componentWillLoad() {
|
|
98
|
-
this.prepareMask();
|
|
99
|
-
if (this.value) {
|
|
100
|
-
this.prepareValue(this.value.toString());
|
|
101
|
-
}
|
|
102
|
-
else if (this.viewValue) {
|
|
103
|
-
this.prepareValue(this.viewValue);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
render() {
|
|
107
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage }, index.h("ez-icon", { slot: "leftIcon", href: AssetsUtils.getSpritePath("timer-outline") }))));
|
|
108
|
-
}
|
|
109
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
110
|
-
get _elem() { return index.getElement(this); }
|
|
111
|
-
static get watchers() { return {
|
|
112
|
-
"showSeconds": ["prepareMask"],
|
|
113
|
-
"value": ["onValueChanged"]
|
|
114
|
-
}; }
|
|
115
|
-
};
|
|
116
|
-
EzTimeInput.style = ezTimeInputCss;
|
|
117
|
-
|
|
118
|
-
exports.ez_time_input = EzTimeInput;
|