@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.
Files changed (164) hide show
  1. package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
  2. package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
  3. package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
  4. package/dist/cjs/DateUtils-716769e0.js +46 -0
  5. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-application.cjs.entry.js +28 -0
  7. package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
  8. package/dist/cjs/ez-calendar.cjs.entry.js +212 -0
  9. package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +630 -0
  10. package/dist/cjs/ez-combo-box.cjs.entry.js +250 -0
  11. package/dist/cjs/ez-date-time-input.cjs.entry.js +144 -0
  12. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-form.cjs.entry.js +1838 -0
  14. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-number-input.cjs.entry.js +61 -190
  16. package/dist/cjs/ez-popover.cjs.entry.js +3 -3
  17. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  18. package/dist/cjs/ez-time-input.cjs.entry.js +9 -27
  19. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  20. package/dist/cjs/ezui.cjs.js +3 -3
  21. package/dist/cjs/form-metadata.cjs.entry.js +129 -0
  22. package/dist/cjs/index-262d703b.js +7442 -0
  23. package/dist/cjs/{index-9431aeeb.js → index-4e4bae01.js} +1 -5
  24. package/dist/cjs/loader.cjs.js +3 -3
  25. package/dist/collection/collection-manifest.json +8 -3
  26. package/dist/collection/components/ez-application/ez-application.css +3 -0
  27. package/dist/collection/components/ez-application/ez-application.js +37 -0
  28. package/dist/collection/components/ez-button/ez-button.css +16 -1
  29. package/dist/collection/components/ez-button/ez-button.js +27 -2
  30. package/dist/collection/components/ez-calendar/ez-calendar.css +70 -3
  31. package/dist/collection/components/ez-calendar/ez-calendar.js +168 -24
  32. package/dist/collection/components/ez-check/ez-check.css +78 -78
  33. package/dist/collection/components/ez-check/ez-check.js +3 -3
  34. package/dist/collection/components/ez-combo-box/ez-combo-box.css +67 -51
  35. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -0
  36. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +49 -0
  37. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +254 -0
  38. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +4 -4
  39. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
  40. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +2 -2
  41. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
  42. package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
  43. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
  44. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
  45. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
  46. package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
  47. package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
  48. package/dist/collection/components/ez-grid/ez-grid.css +15 -0
  49. package/dist/collection/components/ez-grid/ez-grid.js +414 -0
  50. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
  51. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
  52. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
  53. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
  54. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  55. package/dist/collection/components/ez-list/ez-list.css +227 -44
  56. package/dist/collection/components/ez-list/ez-list.js +529 -149
  57. package/dist/collection/components/ez-modal/ez-modal.css +4 -4
  58. package/dist/collection/components/ez-modal/ez-modal.js +1 -1
  59. package/dist/collection/components/ez-number-input/ez-number-input.css +7 -162
  60. package/dist/collection/components/ez-number-input/ez-number-input.js +90 -281
  61. package/dist/collection/components/ez-popover/ez-popover.css +10 -6
  62. package/dist/collection/components/ez-popup/ez-popup.css +25 -27
  63. package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
  64. package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
  65. package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
  66. package/dist/collection/components/ez-text-input/ez-text-input.js +1 -0
  67. package/dist/collection/components/ez-upload/ez-upload.js +3 -3
  68. package/dist/collection/components/test-du/test-du.css +3 -0
  69. package/dist/collection/components/test-du/test-du.js +45 -0
  70. package/dist/collection/servidor.js +94 -94
  71. package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
  72. package/dist/custom-elements/index.d.ts +36 -6
  73. package/dist/custom-elements/index.js +120975 -3013
  74. package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
  75. package/dist/esm/AssetsUtils-3803e935.js +22 -0
  76. package/dist/esm/DataUnit-1cd45202.js +464 -0
  77. package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
  78. package/dist/esm/ez-action-chip.entry.js +1 -1
  79. package/dist/esm/ez-application.entry.js +24 -0
  80. package/dist/esm/ez-button_11.entry.js +111757 -0
  81. package/dist/esm/ez-calendar.entry.js +208 -0
  82. package/dist/esm/ez-collapsible-box_6.entry.js +621 -0
  83. package/dist/esm/ez-combo-box.entry.js +246 -0
  84. package/dist/esm/ez-date-time-input.entry.js +140 -0
  85. package/dist/esm/ez-dialog.entry.js +1 -1
  86. package/dist/esm/ez-form.entry.js +1834 -0
  87. package/dist/esm/ez-label-chip.entry.js +1 -1
  88. package/dist/esm/ez-number-input.entry.js +61 -190
  89. package/dist/esm/ez-popover.entry.js +3 -3
  90. package/dist/esm/ez-popup.entry.js +2 -2
  91. package/dist/esm/ez-time-input.entry.js +3 -21
  92. package/dist/esm/ez-toast.entry.js +1 -1
  93. package/dist/esm/ezui.js +3 -3
  94. package/dist/esm/form-metadata.entry.js +125 -0
  95. package/dist/esm/{index-fd3c8023.js → index-1dacecd3.js} +1 -5
  96. package/dist/esm/index-cfd5e193.js +7433 -0
  97. package/dist/esm/loader.js +3 -3
  98. package/dist/ezui/ezui.esm.js +1 -1
  99. package/dist/ezui/p-1ea8187e.entry.js +369 -0
  100. package/dist/ezui/p-37a611ea.js +1 -0
  101. package/dist/ezui/p-45689464.entry.js +1 -0
  102. package/dist/ezui/{p-a0b6eee2.entry.js → p-516d0e0f.entry.js} +1 -1
  103. package/dist/ezui/p-57291f97.entry.js +1 -0
  104. package/dist/ezui/{p-66954a04.entry.js → p-5a86e18a.entry.js} +1 -1
  105. package/dist/ezui/{p-823ff0a0.entry.js → p-5da66d3e.entry.js} +1 -1
  106. package/dist/ezui/p-69416bec.entry.js +1 -0
  107. package/dist/ezui/p-7107d7ef.js +1 -0
  108. package/dist/ezui/p-7ef97c5f.entry.js +1 -0
  109. package/dist/ezui/p-88f45a83.entry.js +1 -0
  110. package/dist/ezui/p-8c51a6aa.entry.js +1 -0
  111. package/dist/ezui/{p-e0ab3746.js → p-8f4851a6.js} +1 -1
  112. package/dist/ezui/p-9dfd537e.js +1 -0
  113. package/dist/ezui/{p-d443f020.entry.js → p-a18a2d7b.entry.js} +1 -1
  114. package/dist/ezui/p-a223eed8.entry.js +1 -0
  115. package/dist/ezui/p-b36308e7.js +1 -0
  116. package/dist/ezui/p-c0af195b.entry.js +1 -0
  117. package/dist/ezui/p-c6d469fc.entry.js +1 -0
  118. package/dist/ezui/p-c89629eb.js +1 -0
  119. package/dist/ezui/p-e7ee2836.entry.js +1 -0
  120. package/dist/ezui/p-f7b835cf.entry.js +1 -0
  121. package/dist/types/components/ez-application/ez-application.d.ts +12 -0
  122. package/dist/types/components/ez-button/ez-button.d.ts +5 -0
  123. package/dist/types/components/ez-calendar/ez-calendar.d.ts +21 -0
  124. package/dist/types/components/ez-check/ez-check.d.ts +1 -1
  125. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
  126. package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
  127. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
  128. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
  129. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
  130. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
  131. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
  132. package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
  133. package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
  134. package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
  135. package/dist/types/components/ez-list/ez-list.d.ts +70 -17
  136. package/dist/types/components/ez-number-input/ez-number-input.d.ts +33 -50
  137. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
  138. package/dist/types/components/test-du/test-du.d.ts +6 -0
  139. package/dist/types/components.d.ts +283 -117
  140. package/dist/types/stencil-public-runtime.d.ts +6 -4
  141. package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
  142. package/package.json +10 -8
  143. package/react/components.d.ts +6 -1
  144. package/react/components.js +6 -1
  145. package/react/components.js.map +1 -1
  146. package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
  147. package/dist/cjs/ez-button_16.cjs.entry.js +0 -4079
  148. package/dist/cjs/ez-list.cjs.entry.js +0 -174
  149. package/dist/cjs/ez-modal.cjs.entry.js +0 -65
  150. package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
  151. package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
  152. package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
  153. package/dist/esm/ez-button_16.entry.js +0 -4060
  154. package/dist/esm/ez-list.entry.js +0 -170
  155. package/dist/esm/ez-modal.entry.js +0 -61
  156. package/dist/ezui/p-11ae4ae7.entry.js +0 -1
  157. package/dist/ezui/p-47fa3d6c.entry.js +0 -1
  158. package/dist/ezui/p-8ab6168f.entry.js +0 -1
  159. package/dist/ezui/p-9c1fb51c.entry.js +0 -1
  160. package/dist/ezui/p-9d85125b.entry.js +0 -1
  161. package/dist/ezui/p-9dfccb16.js +0 -1
  162. package/dist/ezui/p-a7b546b2.entry.js +0 -1
  163. package/dist/ezui/p-c833c94f.entry.js +0 -1
  164. package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
@@ -1,13 +1,13 @@
1
- import { Component, h, Host, Prop, Watch, Method, Element, Event } from '@stencil/core';
2
- import { NumberUtils } from '@sankhyalabs/core';
3
- export class NumberInput {
1
+ import { NumberUtils } from "@sankhyalabs/core";
2
+ import { Component, h, Event, Prop, Watch, State, Host } from "@stencil/core";
3
+ export class EzNumberInput {
4
4
  constructor() {
5
5
  /**
6
- * Deixa o campo disponível ou não para digitação.
6
+ * Deixa o campo disponível ou não para uso.
7
7
  */
8
8
  this.enabled = true;
9
9
  /**
10
- * Deixa o campo disponível ou não para digitação.
10
+ * Configura o alinhamento do texto.
11
11
  */
12
12
  this.textleft = false;
13
13
  /**
@@ -16,222 +16,92 @@ export class NumberInput {
16
16
  * Qualquer outro valor que não seja "en-US", adotará a formatação "pt-BR"
17
17
  * Não é case sensitive
18
18
  */
19
- this.formatnumber = "PT-BR";
20
- //---------------------------------------------
21
- // Private Methods
22
- //---------------------------------------------
23
- this.settingStrValueIntNumber = (strvalue) => {
24
- if (this.precision === 0 && strvalue) {
25
- return strvalue = strvalue.replace(/\./g, '').replace(/\,/g, '');
26
- }
27
- else {
28
- return strvalue;
29
- }
30
- };
31
- this.checkNumberValidation = (valuePtBRorNumber) => {
32
- try {
33
- if (valuePtBRorNumber != "" && NumberUtils.format(valuePtBRorNumber, this.precision, this.prettyprecision) === "NaN") {
34
- this.errorMessage = `Valor não é um número válido`;
35
- this.value = undefined;
36
- this.strvalue = undefined;
37
- if (this._inputElem) {
38
- this._inputElem.value = "";
39
- }
40
- return false;
41
- }
42
- }
43
- catch (err) {
44
- this.errorMessage = err.message;
45
- return false;
46
- }
47
- return true;
48
- };
19
+ this.formatNumber = "PT-BR";
49
20
  }
50
- showError() {
51
- const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
52
- if (this._inputElem) {
53
- if (hasError) {
54
- this._inputElem.classList.add('hasError');
55
- this._messageBoxElem.classList.add('hasError');
56
- }
57
- else {
58
- this._inputElem.classList.remove('hasError');
59
- this._messageBoxElem.classList.remove('hasError');
60
- }
21
+ setLabel() {
22
+ this._textInput.label = this.label;
23
+ }
24
+ setErrorMessage() {
25
+ this._textInput.errorMessage = this.errorMessage;
26
+ }
27
+ applyValueToInput() {
28
+ if (this._textInput) {
29
+ this._textInput.value = this.getTextValue(this.value);
61
30
  }
62
31
  }
63
32
  onPrecisionChanged(newPrecision) {
64
33
  if (isNaN(newPrecision)) {
65
34
  this.precision = 0;
66
35
  }
67
- this.handleFocusout();
68
36
  }
69
37
  onPrettyPrecisionChanged(newPrettyPrecision) {
70
38
  if (isNaN(newPrettyPrecision)) {
71
- this.prettyprecision = 0;
39
+ this.prettyPrecision = 0;
72
40
  }
73
- this.handleFocusout();
74
41
  }
75
- onValueChanged(newValue) {
76
- if (isNaN(newValue) && newValue !== undefined) {
77
- this.value = undefined;
78
- this.strvalue = "";
79
- this.errorMessage = `Valor não é um número válido`;
80
- this.adjustFloatingLabel();
81
- }
82
- else {
83
- this.settingComponent();
42
+ changeValue(newValue) {
43
+ this.errorMessage = "";
44
+ if (newValue && newValue !== this.value) {
45
+ this.value = newValue;
46
+ this._textInput.value = this.getTextValue(newValue);
47
+ this.ezChange.emit();
84
48
  }
85
49
  }
86
- adjustFloatingLabel() {
87
- if (this._labelElem) {
88
- if (this.label && this._inputElem.value && this._inputElem.value.toString().length > 0) {
89
- if (!this._labelElem.classList.contains("input__label--floated")) {
90
- this._labelElem.classList.add("input__label--floated");
91
- }
92
- if (!this._inputElem.classList.contains("input--with--label")) {
93
- this._inputElem.classList.add("input--with--label");
94
- }
95
- }
96
- else {
97
- this._labelElem.classList.remove("input__label--floated");
98
- }
50
+ parseNumber() {
51
+ const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : null;
52
+ if (parsedNumber != null && isNaN(parsedNumber)) {
53
+ this.errorMessage = "O valor digitado não é um número válido";
99
54
  }
100
- }
101
- //---------------------------------------------
102
- // Public methods
103
- //---------------------------------------------
104
- /**
105
- * Faz o foco no componente de input
106
- */
107
- async setFocus() {
108
- this._inputElem.focus();
109
- }
110
- /**
111
- * Remove o foco no componente de input
112
- */
113
- async setBlur() {
114
- this._inputElem.blur();
115
- }
116
- //---------------------------------------------
117
- // Event handlers
118
- //---------------------------------------------
119
- /**
120
- * Promove a atualização do componente
121
- */
122
- async handleFocusout() {
123
- //Setting value and strvalue by stringinput
124
- if (this._inputElem) {
125
- this.errorMessage = "";
126
- if (this._inputElem.value !== "") {
127
- this._inputElem.value = this.settingStrValueIntNumber(this._inputElem.value);
128
- const value = NumberUtils.keepOnlyDecimalSeparator(this._inputElem.value, this.formatnumber.toUpperCase());
129
- if (!this.checkNumberValidation(value)) {
130
- return;
131
- }
132
- if (value) {
133
- try {
134
- this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? NumberUtils.format(value, this.precision, this.prettyprecision) : NumberUtils.changeFormat(NumberUtils.format(value, this.precision, this.prettyprecision));
135
- }
136
- catch (e) {
137
- this.errorMessage = e.message;
138
- return;
139
- }
140
- }
141
- this.strvalue = this._inputElem.value;
142
- this.value = NumberUtils.stringToNumber(value);
143
- }
144
- else {
145
- this.strvalue = undefined;
146
- this.value = undefined;
147
- }
148
- this.adjustFloatingLabel();
149
- }
150
- }
151
- handleChange() {
152
- this._inputElem.value = this.settingStrValueIntNumber(this._inputElem.value);
153
- }
154
- handleSlotChange(ev) {
155
- const slot = ev.target;
156
- const content = slot.assignedElements()[0];
157
- content.style.position = "absolute";
158
- content.style.display = "flex";
159
- content.style.alignItems = "center";
160
- content.style.justifyContent = "center";
161
- content.style.overflow = "hidden";
162
- content.style.top = "0px";
163
- content.style.width = "var(--ni__icon--width)";
164
- content.style.height = "var(--ni--height)";
165
- if (slot.name == "leftIcon") {
166
- content.style.left = "0px";
167
- content.style.borderRadius = "var(--ni--border-radius) 0 0 var(--ni--border-radius)";
168
- this._inputElem.classList.add('icon--left');
169
- if (this._labelElem) {
170
- this._labelElem.classList.add("input__label--left");
171
- }
172
- }
173
- else if (slot.name == "rightIcon") {
174
- content.style.right = "0px";
175
- content.style.borderRadius = "0 var(--ni--border-radius) var(--ni--border-radius) 0";
176
- this._inputElem.classList.add('icon--right');
177
- }
178
- this.showError();
179
- }
180
- doFocus() {
181
- if (this.label && this._labelElem) {
182
- this._labelElem.classList.contains("input__label--floated") ? undefined : this._labelElem.classList.add("input__label--floated");
183
- }
184
- }
185
- settingComponent() {
186
- const value = '' + this.value;
187
- if (this.value !== undefined) {
55
+ else {
188
56
  try {
189
- this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? NumberUtils.format(value, this.precision, this.prettyprecision) : NumberUtils.changeFormat(NumberUtils.format(value, this.precision, this.prettyprecision));
57
+ this.changeValue(parsedNumber);
190
58
  }
191
59
  catch (e) {
192
60
  this.errorMessage = e.message;
193
61
  return;
194
62
  }
195
- this.strvalue = this._inputElem.value;
196
63
  }
197
- this.ezChange.emit({ strValue: this.strvalue, value: this.value });
198
- this.adjustFloatingLabel();
199
64
  }
200
- settingValue() {
201
- //this.value: en-US format => Need to convert
202
- const value = !isNaN(this.value) ? '' + this.value : 'NaN';
203
- if (!this.checkNumberValidation(value)) {
204
- return;
65
+ getTextValue(value) {
66
+ const parsedNumber = value ? NumberUtils.stringToNumber(value) : null;
67
+ if (parsedNumber != null && isNaN(parsedNumber)) {
68
+ this.errorMessage = "O valor digitado não é um número válido";
205
69
  }
206
- //output default from ".format": pt-BR
207
- const tempStrValue = NumberUtils.format(value, this.precision, this.prettyprecision);
208
- //output => depends to formatnumber
209
- this.strvalue = this.formatnumber.toUpperCase() !== 'EN-US' ? tempStrValue : NumberUtils.changeFormat(tempStrValue);
210
- NumberUtils.format(this.value.toString(), this.precision, this.prettyprecision);
70
+ else {
71
+ return this.formatNumber.toUpperCase() !== "EN-US" ? NumberUtils.format(value.toString(), this.precision, this.prettyPrecision) : NumberUtils.changeFormat(NumberUtils.format(value.toString(), this.precision, this.prettyPrecision));
72
+ }
73
+ return "";
211
74
  }
212
- //---------------------------------------------
213
- // Lifecycle web component
214
- //---------------------------------------------
215
75
  componentDidLoad() {
216
76
  if (!this.textleft) {
217
- this._inputElem.classList.add('text--right');
77
+ this._textInput.shadowRoot.querySelector('input').classList.add('text--right');
78
+ }
79
+ let rightItem;
80
+ let letfItem;
81
+ for (const key in this._hostElement.children) {
82
+ if (Object.prototype.hasOwnProperty.call(this._hostElement.children, key)) {
83
+ const element = this._hostElement.children[key];
84
+ if (element.getAttribute('slot') === 'rightIcon') {
85
+ rightItem = element;
86
+ }
87
+ else if (element.getAttribute('slot') === 'leftIcon') {
88
+ letfItem = element;
89
+ }
90
+ }
218
91
  }
219
- this.showError();
220
- this.adjustFloatingLabel();
92
+ this._leftSlotItem = letfItem;
93
+ this._rightSlotItem = rightItem;
94
+ this.slotElement;
221
95
  }
222
96
  componentWillLoad() {
223
97
  this.onPrecisionChanged(this.precision);
224
- this.onPrettyPrecisionChanged(this.prettyprecision);
225
- this.settingValue();
98
+ this.onPrettyPrecisionChanged(this.prettyPrecision);
226
99
  }
227
100
  render() {
228
- const labelInput = this.label ? h("label", { onClick: () => this._inputElem.focus(), class: "input__label", ref: (el) => this._labelElem = el }, this.label) : null;
229
- return (h(Host, null,
230
- h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
231
- labelInput,
232
- 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) }),
233
- h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
234
- h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
101
+ return (h(Host, { ref: elem => this._hostElement = elem },
102
+ h("ez-text-input", { class: "text-input", ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789-,.", enabled: this.enabled, errorMessage: this.errorMessage },
103
+ this._rightSlotItem ? h("slot", { name: "rightIcon", slot: "rightIcon" }) : undefined,
104
+ this._leftSlotItem ? h("slot", { name: "leftIcon", slot: "leftIcon" }) : undefined)));
235
105
  }
236
106
  static get is() { return "ez-number-input"; }
237
107
  static get encapsulation() { return "shadow"; }
@@ -242,9 +112,9 @@ export class NumberInput {
242
112
  "$": ["ez-number-input.css"]
243
113
  }; }
244
114
  static get properties() { return {
245
- "strvalue": {
115
+ "label": {
246
116
  "type": "string",
247
- "mutable": true,
117
+ "mutable": false,
248
118
  "complexType": {
249
119
  "original": "string",
250
120
  "resolved": "string",
@@ -254,43 +124,26 @@ export class NumberInput {
254
124
  "optional": false,
255
125
  "docs": {
256
126
  "tags": [],
257
- "text": "Valor digitado pelo usu\u00E1rio. Este valor \u00E9 o que fica vis\u00EDvel no campo."
127
+ "text": "T\u00EDtulo do campo"
258
128
  },
259
- "attribute": "strvalue",
260
- "reflect": false
129
+ "attribute": "label",
130
+ "reflect": true
261
131
  },
262
132
  "value": {
263
- "type": "number",
133
+ "type": "any",
264
134
  "mutable": true,
265
135
  "complexType": {
266
- "original": "number",
267
- "resolved": "number",
136
+ "original": "string | number",
137
+ "resolved": "number | string",
268
138
  "references": {}
269
139
  },
270
140
  "required": false,
271
141
  "optional": false,
272
142
  "docs": {
273
143
  "tags": [],
274
- "text": "Valor guardado pelo componente. Este valor \u00E9 o que ira ser utilizado para alimentar o backend.\nEsta vari\u00E1vel pode ser setada para alimentar o componente."
144
+ "text": "O valor informado pelo usu\u00E1rio"
275
145
  },
276
146
  "attribute": "value",
277
- "reflect": false
278
- },
279
- "label": {
280
- "type": "string",
281
- "mutable": false,
282
- "complexType": {
283
- "original": "string",
284
- "resolved": "string",
285
- "references": {}
286
- },
287
- "required": false,
288
- "optional": false,
289
- "docs": {
290
- "tags": [],
291
- "text": "Label \u00E9 o t\u00EDtulo do campo"
292
- },
293
- "attribute": "label",
294
147
  "reflect": true
295
148
  },
296
149
  "enabled": {
@@ -305,7 +158,7 @@ export class NumberInput {
305
158
  "optional": false,
306
159
  "docs": {
307
160
  "tags": [],
308
- "text": "Deixa o campo dispon\u00EDvel ou n\u00E3o para digita\u00E7\u00E3o."
161
+ "text": "Deixa o campo dispon\u00EDvel ou n\u00E3o para uso."
309
162
  },
310
163
  "attribute": "enabled",
311
164
  "reflect": true,
@@ -340,12 +193,12 @@ export class NumberInput {
340
193
  "optional": false,
341
194
  "docs": {
342
195
  "tags": [],
343
- "text": "Precis\u00E3o de arredondamento do n\u00FAmero"
196
+ "text": "Precis\u00E3o decimal, ou seja, quantas casas decimais podem ser exibidas. Caso a\nquantidade de casas decimais do valor seja maior que precision, haver\u00E1 arredondamento"
344
197
  },
345
198
  "attribute": "precision",
346
199
  "reflect": true
347
200
  },
348
- "prettyprecision": {
201
+ "prettyPrecision": {
349
202
  "type": "number",
350
203
  "mutable": true,
351
204
  "complexType": {
@@ -357,9 +210,9 @@ export class NumberInput {
357
210
  "optional": false,
358
211
  "docs": {
359
212
  "tags": [],
360
- "text": "N\u00FAmeros de zeros retirados ap\u00F3s arredondamento"
213
+ "text": "Esse atributo determina qual \u00E9 o n\u00FAmero m\u00EDnimo de casas depois da v\u00EDrgula.\nExemplo: Digamos que a precision seja igual a 4, assim qualquer n\u00FAmero ser\u00E1 \nrepresentado com 4 casas decimais mesmo que iguais a zero: 1,0100.\nSe prettiprecision igual a 2, como n\u00E3o h\u00E1 necessidade de mais de duas casas decimais\no valor exibido ser\u00E1 1,01. Por outro lado, at\u00E9 a quarta casa n\u00E3o haver\u00E1 arredondamento\n(1,1234 = 1,1234) mas a partir da quinta casa sim (1,12345 = 1,1235)."
361
214
  },
362
- "attribute": "prettyprecision",
215
+ "attribute": "pretty-precision",
363
216
  "reflect": true
364
217
  },
365
218
  "textleft": {
@@ -374,13 +227,13 @@ export class NumberInput {
374
227
  "optional": false,
375
228
  "docs": {
376
229
  "tags": [],
377
- "text": "Deixa o campo dispon\u00EDvel ou n\u00E3o para digita\u00E7\u00E3o."
230
+ "text": "Configura o alinhamento do texto."
378
231
  },
379
232
  "attribute": "textleft",
380
233
  "reflect": true,
381
234
  "defaultValue": "false"
382
235
  },
383
- "formatnumber": {
236
+ "formatNumber": {
384
237
  "type": "string",
385
238
  "mutable": false,
386
239
  "complexType": {
@@ -394,11 +247,15 @@ export class NumberInput {
394
247
  "tags": [],
395
248
  "text": "Op\u00E7\u00E3o de configurar a transforma\u00E7\u00E3o de string to number entre formata\u00E7\u00E3o pt-BR e en-US\n(formata\u00E7\u00E3o de ENTRADA e SA\u00CDDA do componente: pt-BR=\"###.###,##\" en-US=\"###,###.##\"; Default: \"pt-BR\")\nQualquer outro valor que n\u00E3o seja \"en-US\", adotar\u00E1 a formata\u00E7\u00E3o \"pt-BR\"\nN\u00E3o \u00E9 case sensitive"
396
249
  },
397
- "attribute": "formatnumber",
250
+ "attribute": "format-number",
398
251
  "reflect": true,
399
252
  "defaultValue": "\"PT-BR\""
400
253
  }
401
254
  }; }
255
+ static get states() { return {
256
+ "_leftSlotItem": {},
257
+ "_rightSlotItem": {}
258
+ }; }
402
259
  static get events() { return [{
403
260
  "method": "ezChange",
404
261
  "name": "ezChange",
@@ -407,76 +264,28 @@ export class NumberInput {
407
264
  "composed": true,
408
265
  "docs": {
409
266
  "tags": [],
410
- "text": "Um evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
267
+ "text": "Evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
411
268
  },
412
269
  "complexType": {
413
- "original": "{ strValue: string, value: number }",
414
- "resolved": "{ strValue: string; value: number; }",
270
+ "original": "string",
271
+ "resolved": "string",
415
272
  "references": {}
416
273
  }
417
274
  }]; }
418
- static get methods() { return {
419
- "setFocus": {
420
- "complexType": {
421
- "signature": "() => Promise<void>",
422
- "parameters": [],
423
- "references": {
424
- "Promise": {
425
- "location": "global"
426
- }
427
- },
428
- "return": "Promise<void>"
429
- },
430
- "docs": {
431
- "text": "Faz o foco no componente de input",
432
- "tags": []
433
- }
434
- },
435
- "setBlur": {
436
- "complexType": {
437
- "signature": "() => Promise<void>",
438
- "parameters": [],
439
- "references": {
440
- "Promise": {
441
- "location": "global"
442
- }
443
- },
444
- "return": "Promise<void>"
445
- },
446
- "docs": {
447
- "text": "Remove o foco no componente de input",
448
- "tags": []
449
- }
450
- },
451
- "handleFocusout": {
452
- "complexType": {
453
- "signature": "() => Promise<void>",
454
- "parameters": [],
455
- "references": {
456
- "Promise": {
457
- "location": "global"
458
- }
459
- },
460
- "return": "Promise<void>"
461
- },
462
- "docs": {
463
- "text": "Promove a atualiza\u00E7\u00E3o do componente",
464
- "tags": []
465
- }
466
- }
467
- }; }
468
- static get elementRef() { return "el"; }
469
275
  static get watchers() { return [{
276
+ "propName": "label",
277
+ "methodName": "setLabel"
278
+ }, {
470
279
  "propName": "errorMessage",
471
- "methodName": "showError"
280
+ "methodName": "setErrorMessage"
281
+ }, {
282
+ "propName": "value",
283
+ "methodName": "applyValueToInput"
472
284
  }, {
473
285
  "propName": "precision",
474
286
  "methodName": "onPrecisionChanged"
475
287
  }, {
476
- "propName": "prettyprecision",
288
+ "propName": "prettyPrecision",
477
289
  "methodName": "onPrettyPrecisionChanged"
478
- }, {
479
- "propName": "value",
480
- "methodName": "onValueChanged"
481
290
  }]; }
482
291
  }
@@ -2,9 +2,13 @@
2
2
 
3
3
  /* box */
4
4
  /*@doc Define o raio da borda do popover.*/
5
- --popover__box--border-radius: var(--border--radius-medium, 12px);
5
+ --ez-popover__box--border-radius: var(--border--radius-medium, 12px);
6
6
  /*@doc Define a sombra do popover.*/
7
- --popover__box--box-shadow: var(--shadow, 0px 0px 16px 0px #000);
7
+ --ez-popover__box--box-shadow: var(--shadow, 0px 0px 16px 0px #000);
8
+ /*@doc Define a cor de fundo do popover.*/
9
+ --ez-popover__box--background-color: var(--background--xlight, #fff);
10
+ /*@doc Define a camada de visibilidade do popover.*/
11
+ --ez-popover__box--z-index: var(--more-visible, 1);
8
12
 
9
13
  /***************
10
14
  host style
@@ -19,16 +23,16 @@
19
23
 
20
24
  .box {
21
25
  /*private*/
22
- z-index: var(--more-visible, 1);
26
+ z-index: var(--ez-popover__box--z-index);
23
27
  display: flex;
24
28
  flex-direction: column;
25
29
 
26
30
  height: fit-content;
27
31
 
28
32
  /*public*/
29
- background-color: var(--background--xlight);
30
- border-radius: var(--popover__box--border-radius);
31
- box-shadow: var(--popover__box--box-shadow);
33
+ background-color: var(--ez-popover__box--background-color);
34
+ border-radius: var(--ez-popover__box--border-radius);
35
+ box-shadow: var(--ez-popover__box--box-shadow);
32
36
  }
33
37
 
34
38
  .box--fit-content {