easy-component-ui 3.0.12 → 3.0.14
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/package.json +308 -304
- package/dist/assets/icon.css +0 -1
- package/dist/components/Base.js +0 -873
- package/dist/components/ea-alert.js +0 -196
- package/dist/components/ea-avatar.js +0 -159
- package/dist/components/ea-backtop.js +0 -136
- package/dist/components/ea-badge.js +0 -144
- package/dist/components/ea-breadcrumb.js +0 -148
- package/dist/components/ea-button.js +0 -265
- package/dist/components/ea-calendar.js +0 -10
- package/dist/components/ea-calendar2.js +0 -671
- package/dist/components/ea-card.js +0 -85
- package/dist/components/ea-carousel.js +0 -415
- package/dist/components/ea-checkbox.js +0 -446
- package/dist/components/ea-collapse.js +0 -313
- package/dist/components/ea-color-picker.js +0 -891
- package/dist/components/ea-container.js +0 -177
- package/dist/components/ea-countdown.js +0 -142
- package/dist/components/ea-date-picker.js +0 -649
- package/dist/components/ea-descriptions.js +0 -474
- package/dist/components/ea-dialog.js +0 -249
- package/dist/components/ea-drawer.js +0 -211
- package/dist/components/ea-dropdown.js +0 -228
- package/dist/components/ea-empty.js +0 -93
- package/dist/components/ea-icon.js +0 -68
- package/dist/components/ea-image-preview.js +0 -488
- package/dist/components/ea-image.js +0 -302
- package/dist/components/ea-infinite-scroll.js +0 -109
- package/dist/components/ea-input-number.js +0 -367
- package/dist/components/ea-input.js +0 -588
- package/dist/components/ea-layout.js +0 -125
- package/dist/components/ea-link.js +0 -101
- package/dist/components/ea-loading.js +0 -151
- package/dist/components/ea-menu.js +0 -433
- package/dist/components/ea-message-box.js +0 -624
- package/dist/components/ea-message.js +0 -251
- package/dist/components/ea-notification.js +0 -331
- package/dist/components/ea-overlay.js +0 -167
- package/dist/components/ea-page-header.js +0 -108
- package/dist/components/ea-pagination.js +0 -481
- package/dist/components/ea-popconfirm.js +0 -275
- package/dist/components/ea-popover.js +0 -123
- package/dist/components/ea-popper.js +0 -203
- package/dist/components/ea-progress.js +0 -286
- package/dist/components/ea-radio.js +0 -364
- package/dist/components/ea-rate.js +0 -241
- package/dist/components/ea-result.js +0 -100
- package/dist/components/ea-scrollbar.js +0 -235
- package/dist/components/ea-segmented.js +0 -215
- package/dist/components/ea-select.js +0 -609
- package/dist/components/ea-skeleton.js +0 -263
- package/dist/components/ea-slider.js +0 -421
- package/dist/components/ea-space.js +0 -123
- package/dist/components/ea-splitter.js +0 -217
- package/dist/components/ea-statistic.js +0 -74
- package/dist/components/ea-steps.js +0 -346
- package/dist/components/ea-switch.js +0 -271
- package/dist/components/ea-table.js +0 -1124
- package/dist/components/ea-tabs.js +0 -501
- package/dist/components/ea-tag.js +0 -228
- package/dist/components/ea-text.js +0 -113
- package/dist/components/ea-time-picker.js +0 -514
- package/dist/components/ea-timeline.js +0 -185
- package/dist/components/ea-tooltip.js +0 -121
- package/dist/components/ea-tour.js +0 -544
- package/dist/components/ea-transfer.js +0 -949
- package/dist/components/ea-tree.js +0 -1125
- package/dist/components/index.js +0 -61
- package/dist/core/FormBase.js +0 -238
- package/dist/css/ea-alert.style.js +0 -4
- package/dist/css/ea-aside.style.js +0 -4
- package/dist/css/ea-avatar.style.js +0 -4
- package/dist/css/ea-backtop.style.js +0 -4
- package/dist/css/ea-badge.style.js +0 -4
- package/dist/css/ea-breadcrumb-item.style.js +0 -4
- package/dist/css/ea-breadcrumb.style.js +0 -4
- package/dist/css/ea-button-group.style.js +0 -4
- package/dist/css/ea-button.style.js +0 -4
- package/dist/css/ea-calendar.style.js +0 -4
- package/dist/css/ea-card.style.js +0 -4
- package/dist/css/ea-carousel-item.style.js +0 -4
- package/dist/css/ea-carousel.style.js +0 -4
- package/dist/css/ea-check-tag.style.js +0 -4
- package/dist/css/ea-checkbox-group.style.js +0 -4
- package/dist/css/ea-checkbox.style.js +0 -4
- package/dist/css/ea-col.style.js +0 -4
- package/dist/css/ea-collapse-item.style.js +0 -4
- package/dist/css/ea-collapse.style.js +0 -4
- package/dist/css/ea-color-picker-panel.style.js +0 -4
- package/dist/css/ea-color-picker.style.js +0 -4
- package/dist/css/ea-container.style.js +0 -4
- package/dist/css/ea-date-picker.style.js +0 -4
- package/dist/css/ea-descriptions-item.style.js +0 -4
- package/dist/css/ea-descriptions.style.js +0 -4
- package/dist/css/ea-dialog.style.js +0 -4
- package/dist/css/ea-drawer.style.js +0 -4
- package/dist/css/ea-dropdown-item.style.js +0 -4
- package/dist/css/ea-dropdown-menu.style.js +0 -4
- package/dist/css/ea-dropdown.style.js +0 -4
- package/dist/css/ea-empty.style.js +0 -4
- package/dist/css/ea-footer.style.js +0 -4
- package/dist/css/ea-header.style.js +0 -4
- package/dist/css/ea-icon.style.js +0 -4
- package/dist/css/ea-image-preview.style.js +0 -4
- package/dist/css/ea-image.style.js +0 -4
- package/dist/css/ea-infinite-scroll.style.js +0 -4
- package/dist/css/ea-input-number.style.js +0 -4
- package/dist/css/ea-input.style.js +0 -4
- package/dist/css/ea-link.style.js +0 -4
- package/dist/css/ea-main.style.js +0 -4
- package/dist/css/ea-menu-item-group.style.js +0 -4
- package/dist/css/ea-menu-item.style.js +0 -4
- package/dist/css/ea-menu.style.js +0 -4
- package/dist/css/ea-message-box.style.js +0 -4
- package/dist/css/ea-message.style.js +0 -4
- package/dist/css/ea-notification.style.js +0 -4
- package/dist/css/ea-option-gropu.style.js +0 -4
- package/dist/css/ea-option.style.js +0 -4
- package/dist/css/ea-overlay.style.js +0 -4
- package/dist/css/ea-page-header.style.js +0 -4
- package/dist/css/ea-pagination.style.js +0 -4
- package/dist/css/ea-popconfirm.style.js +0 -4
- package/dist/css/ea-popover.style.js +0 -4
- package/dist/css/ea-popper.style.js +0 -4
- package/dist/css/ea-progress.style.js +0 -4
- package/dist/css/ea-radio-group.style.js +0 -4
- package/dist/css/ea-radio.style.js +0 -4
- package/dist/css/ea-rate.style.js +0 -4
- package/dist/css/ea-result.style.js +0 -4
- package/dist/css/ea-row.style.js +0 -4
- package/dist/css/ea-scrollbar.style.js +0 -4
- package/dist/css/ea-segmented.style.js +0 -4
- package/dist/css/ea-select.style.js +0 -4
- package/dist/css/ea-skeleton-item.style.js +0 -4
- package/dist/css/ea-skeleton.style.js +0 -4
- package/dist/css/ea-slider.style.js +0 -4
- package/dist/css/ea-space.style.js +0 -4
- package/dist/css/ea-splitter-bar.style.js +0 -4
- package/dist/css/ea-splitter-panel.style.js +0 -4
- package/dist/css/ea-splitter.style.js +0 -4
- package/dist/css/ea-statistic.style.js +0 -4
- package/dist/css/ea-step.style.js +0 -4
- package/dist/css/ea-steps.style.js +0 -4
- package/dist/css/ea-sub-menu.style.js +0 -4
- package/dist/css/ea-switch.style.js +0 -4
- package/dist/css/ea-tab-panel.style.js +0 -4
- package/dist/css/ea-tab.style.js +0 -4
- package/dist/css/ea-table-column.style.js +0 -4
- package/dist/css/ea-table.style.js +0 -4
- package/dist/css/ea-tabs.style.js +0 -4
- package/dist/css/ea-tag.style.js +0 -4
- package/dist/css/ea-text.style.js +0 -4
- package/dist/css/ea-time-picker.style.js +0 -4
- package/dist/css/ea-timeline-item.style.js +0 -4
- package/dist/css/ea-timeline.style.js +0 -4
- package/dist/css/ea-tooltip.style.js +0 -4
- package/dist/css/ea-tour-step.style.js +0 -4
- package/dist/css/ea-tour.style.js +0 -4
- package/dist/css/ea-transfer.style.js +0 -5
- package/dist/css/ea-tree.style.js +0 -6
- package/dist/css/ea-ui-component.style.js +0 -4
- package/dist/favicon.ico +0 -0
- package/dist/utils/Color.js +0 -439
- package/dist/utils/I18nManager.js +0 -218
- package/dist/utils/Utils.js +0 -65
- package/dist/utils/Variables.js +0 -12
- package/dist/utils/parseTime.js +0 -73
- package/dist/utils/timeout.js +0 -9
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
var _ = Object.defineProperty;
|
|
2
|
-
var C = (s) => {
|
|
3
|
-
throw TypeError(s);
|
|
4
|
-
};
|
|
5
|
-
var E = (s, i, e) => i in s ? _(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
|
|
6
|
-
var p = (s, i, e) => E(s, typeof i != "symbol" ? i + "" : i, e), N = (s, i, e) => i.has(s) || C("Cannot " + e);
|
|
7
|
-
var t = (s, i, e) => (N(s, i, "read from private field"), e ? e.call(s) : i.get(s)), n = (s, i, e) => i.has(s) ? C("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), l = (s, i, e, a) => (N(s, i, "write to private field"), a ? a.call(s, e) : i.set(s, e), e);
|
|
8
|
-
import { F as A } from "../core/FormBase.js";
|
|
9
|
-
import { s as F } from "../css/ea-input-number.style.js";
|
|
10
|
-
class S extends Event {
|
|
11
|
-
constructor(i) {
|
|
12
|
-
super("ea-change", { bubbles: !0, cancelable: !0, composed: !0 }), this.detail = i;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
var c, r, d, b, m, o, u, f, v, y;
|
|
16
|
-
class M extends A {
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
/** @type {HTMLElement} */
|
|
20
|
-
n(this, c);
|
|
21
|
-
/** @type {HTMLInputElement} */
|
|
22
|
-
n(this, r);
|
|
23
|
-
/** @type {HTMLElement} */
|
|
24
|
-
n(this, d);
|
|
25
|
-
/** @type {HTMLElement} */
|
|
26
|
-
n(this, b);
|
|
27
|
-
/** @type {HTMLLabelElement} */
|
|
28
|
-
n(this, m);
|
|
29
|
-
/** @type {AbortController} */
|
|
30
|
-
n(this, o, new AbortController());
|
|
31
|
-
p(this, "state", this.properties({
|
|
32
|
-
label: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "",
|
|
35
|
-
observer: async (e) => {
|
|
36
|
-
t(this, m).textContent = e;
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
value: {
|
|
40
|
-
type: Number,
|
|
41
|
-
default: 0,
|
|
42
|
-
/** @param {number} newVal */
|
|
43
|
-
observer: (e, a) => {
|
|
44
|
-
e = Number(e).toFixed(this.precision), a = Number(a).toFixed(this.precision), t(this, r).value = e, this.setValue(e), e >= this.max ? this.isMax = !0 : this.isMax = !1, e <= this.min ? this.isMin = !0 : this.isMin = !1, this.dispatchEvent(
|
|
45
|
-
new S({
|
|
46
|
-
currentValue: Number(e),
|
|
47
|
-
oldValue: Number(a)
|
|
48
|
-
})
|
|
49
|
-
), this.updateContainerClasslist();
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
min: {
|
|
53
|
-
type: Number,
|
|
54
|
-
default: Number.MIN_SAFE_INTEGER,
|
|
55
|
-
observer: (e) => {
|
|
56
|
-
t(this, r) && (t(this, r).min = e);
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
max: {
|
|
60
|
-
type: Number,
|
|
61
|
-
default: Number.MAX_SAFE_INTEGER,
|
|
62
|
-
observer: (e) => {
|
|
63
|
-
t(this, r) && (t(this, r).max = e);
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
required: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: !1,
|
|
69
|
-
observer: (e) => {
|
|
70
|
-
t(this, r) && (t(this, r).required = e);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
step: {
|
|
74
|
-
type: Number,
|
|
75
|
-
default: 1,
|
|
76
|
-
observer: () => {
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"step-strictly": {
|
|
80
|
-
type: Boolean,
|
|
81
|
-
default: !1,
|
|
82
|
-
observer: () => {
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
precision: {
|
|
86
|
-
type: Number,
|
|
87
|
-
default: 0,
|
|
88
|
-
observer: () => {
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
size: {
|
|
92
|
-
type: ["large", "default", "small"],
|
|
93
|
-
default: "",
|
|
94
|
-
observer: () => {
|
|
95
|
-
this.updateContainerClasslist();
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
readonly: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: !1,
|
|
101
|
-
observer: (e) => {
|
|
102
|
-
t(this, r).readOnly = e;
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
disabled: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: !1,
|
|
108
|
-
observer: () => {
|
|
109
|
-
this.updateContainerClasslist();
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
controls: {
|
|
113
|
-
type: Boolean,
|
|
114
|
-
default: !0,
|
|
115
|
-
observer: () => {
|
|
116
|
-
this.updateContainerClasslist();
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"value-on-clear": {
|
|
120
|
-
type: Number,
|
|
121
|
-
default: "",
|
|
122
|
-
observer: () => {
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
align: {
|
|
126
|
-
type: ["left", "center", "right"],
|
|
127
|
-
default: "center",
|
|
128
|
-
observer: () => {
|
|
129
|
-
this.updateContainerClasslist();
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
name: {
|
|
133
|
-
type: String,
|
|
134
|
-
default: "",
|
|
135
|
-
observer: (e) => {
|
|
136
|
-
t(this, r).setAttribute("name", e), t(this, r).setAttribute("id", e);
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
placeholder: {
|
|
140
|
-
type: String,
|
|
141
|
-
default: "",
|
|
142
|
-
observer: (e) => {
|
|
143
|
-
t(this, r).setAttribute("placeholder", e);
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
inputmode: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: "",
|
|
149
|
-
observer: (e) => {
|
|
150
|
-
t(this, r).setAttribute("inputmode", e);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}));
|
|
154
|
-
p(this, "componentStatusState", this.properties({
|
|
155
|
-
defaultValue: {
|
|
156
|
-
props: !0,
|
|
157
|
-
type: Number,
|
|
158
|
-
default: this.getAttrNumber("value", 0).toFixed(this.precision),
|
|
159
|
-
observer: () => {
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
isFocus: {
|
|
163
|
-
props: !0,
|
|
164
|
-
type: Boolean,
|
|
165
|
-
default: !1,
|
|
166
|
-
observer: () => {
|
|
167
|
-
this.updateContainerClasslist();
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
isMin: {
|
|
171
|
-
props: !0,
|
|
172
|
-
type: Boolean,
|
|
173
|
-
default: !1,
|
|
174
|
-
observer: () => {
|
|
175
|
-
this.updateContainerClasslist();
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
isMax: {
|
|
179
|
-
props: !0,
|
|
180
|
-
type: Boolean,
|
|
181
|
-
default: !1,
|
|
182
|
-
observer: () => {
|
|
183
|
-
this.updateContainerClasslist();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}));
|
|
187
|
-
/**
|
|
188
|
-
* 获取焦点
|
|
189
|
-
*/
|
|
190
|
-
p(this, "focus", () => {
|
|
191
|
-
t(this, r).focus();
|
|
192
|
-
});
|
|
193
|
-
/**
|
|
194
|
-
* 失去焦点
|
|
195
|
-
*/
|
|
196
|
-
p(this, "blur", () => {
|
|
197
|
-
t(this, r).blur();
|
|
198
|
-
});
|
|
199
|
-
/**
|
|
200
|
-
* 处理数值的安全边界
|
|
201
|
-
* @param {Number} value
|
|
202
|
-
* @param {Object} param1
|
|
203
|
-
* @param {Number} [param1.precision]
|
|
204
|
-
* @param {Number} [param1.min]
|
|
205
|
-
* @param {Number} [param1.max]
|
|
206
|
-
* @param {Number | String} [param1.defaultValue]
|
|
207
|
-
*/
|
|
208
|
-
n(this, u, (e = this.value, { precision: a, min: h, max: x, defaultValue: g }) => (e = Number(e), isNaN(e) || !Number.isFinite(e) ? (g == null ? void 0 : g.toFixed(a)) || "" : (e < h ? e = h : e > x && (e = x), e.toFixed(a))));
|
|
209
|
-
/**
|
|
210
|
-
* 加
|
|
211
|
-
*/
|
|
212
|
-
n(this, f, () => {
|
|
213
|
-
this.setAttribute(
|
|
214
|
-
"value",
|
|
215
|
-
t(this, u).call(this, this.value - this.step, {
|
|
216
|
-
precision: this.precision,
|
|
217
|
-
min: this.min,
|
|
218
|
-
max: this.max,
|
|
219
|
-
defaultValue: this.defaultValue
|
|
220
|
-
})
|
|
221
|
-
);
|
|
222
|
-
});
|
|
223
|
-
/**
|
|
224
|
-
* 减
|
|
225
|
-
*/
|
|
226
|
-
n(this, v, () => {
|
|
227
|
-
this.setAttribute(
|
|
228
|
-
"value",
|
|
229
|
-
t(this, u).call(this, this.value + this.step, {
|
|
230
|
-
precision: this.precision,
|
|
231
|
-
min: this.min,
|
|
232
|
-
max: this.max,
|
|
233
|
-
defaultValue: this.defaultValue
|
|
234
|
-
})
|
|
235
|
-
);
|
|
236
|
-
});
|
|
237
|
-
/**
|
|
238
|
-
* 当用户可能进行过手动输入时,进行输入框值校验
|
|
239
|
-
*/
|
|
240
|
-
n(this, y, (e) => {
|
|
241
|
-
let a = t(this, u).call(this, e.target.value, {
|
|
242
|
-
precision: this.precision,
|
|
243
|
-
min: this.min,
|
|
244
|
-
max: this.max,
|
|
245
|
-
defaultValue: this.defaultValue
|
|
246
|
-
});
|
|
247
|
-
this["step-strictly"] && Number(a) % this.step !== 0 && (a = t(this, u).call(this, Number(a) + a % this.step, {
|
|
248
|
-
precision: this.precision,
|
|
249
|
-
min: this.min,
|
|
250
|
-
max: this.max,
|
|
251
|
-
defaultValue: this.defaultValue
|
|
252
|
-
})), this.setAttribute("value", a), a !== e.target.value && (e.target.value = a), this.isFocus = !1;
|
|
253
|
-
});
|
|
254
|
-
this.stylesheet = F, this.$render();
|
|
255
|
-
}
|
|
256
|
-
static get observedAttributes() {
|
|
257
|
-
return [
|
|
258
|
-
...super.observedAttributes,
|
|
259
|
-
"value",
|
|
260
|
-
"label",
|
|
261
|
-
"value-on-clear",
|
|
262
|
-
"min",
|
|
263
|
-
"max",
|
|
264
|
-
"required",
|
|
265
|
-
"step",
|
|
266
|
-
"step-strictly",
|
|
267
|
-
"precision",
|
|
268
|
-
"size",
|
|
269
|
-
"name",
|
|
270
|
-
"align",
|
|
271
|
-
"placeholder",
|
|
272
|
-
"inputmode",
|
|
273
|
-
"readonly",
|
|
274
|
-
"disabled",
|
|
275
|
-
"controls"
|
|
276
|
-
];
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* 获取验证目标元素
|
|
280
|
-
* @returns {HTMLElement}
|
|
281
|
-
*/
|
|
282
|
-
get validationTarget() {
|
|
283
|
-
return t(this, r);
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* 表单重置回调,处理表单重置事件
|
|
287
|
-
*/
|
|
288
|
-
formResetCallback() {
|
|
289
|
-
this.value = this.min, this.internals.setValidity({});
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* 获取 classlist 列表
|
|
293
|
-
* @return {string} 属性值
|
|
294
|
-
*/
|
|
295
|
-
updateContainerClasslist() {
|
|
296
|
-
const e = this.computedClasslist(
|
|
297
|
-
"ea-input-number",
|
|
298
|
-
{
|
|
299
|
-
["--" + this.align]: this.align,
|
|
300
|
-
["--" + this.size]: this.size
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
focus: this.isFocus,
|
|
304
|
-
min: this.isMin,
|
|
305
|
-
max: this.isMax,
|
|
306
|
-
disabled: this.disabled,
|
|
307
|
-
"no-controls": !this.controls
|
|
308
|
-
}
|
|
309
|
-
);
|
|
310
|
-
return t(this, c).className = e, e;
|
|
311
|
-
}
|
|
312
|
-
$render() {
|
|
313
|
-
this.shadowRoot.innerHTML = `
|
|
314
|
-
<label class="ea-input-number" part="container">
|
|
315
|
-
<span class="ea-input-number__form-label" part="label"></span>
|
|
316
|
-
<section class="ea-input-number__region" part="region">
|
|
317
|
-
<ea-icon class="ea-input-number__operator decrease" part="decrease" icon="icon-minus"></ea-icon>
|
|
318
|
-
<span class="ea-input-number__prefix" part="prefix">
|
|
319
|
-
<slot name="prefix"></slot>
|
|
320
|
-
</span>
|
|
321
|
-
<input class="ea-input-number__inner" part="input" type="number" />
|
|
322
|
-
<span class="ea-input-number__suffix" part="suffix">
|
|
323
|
-
<slot name="suffix"></slot>
|
|
324
|
-
</span>
|
|
325
|
-
<ea-icon class="ea-input-number__operator increase" part="increase" icon="icon-plus"></ea-icon>
|
|
326
|
-
</section>
|
|
327
|
-
</label>
|
|
328
|
-
`, l(this, c, this.shadowRoot.querySelector(".ea-input-number")), l(this, m, this.shadowRoot.querySelector(".ea-input-number__form-label")), l(this, r, this.shadowRoot.querySelector(".ea-input-number__inner")), l(this, d, this.shadowRoot.querySelector(
|
|
329
|
-
".ea-input-number__operator.decrease"
|
|
330
|
-
)), l(this, b, this.shadowRoot.querySelector(
|
|
331
|
-
".ea-input-number__operator.increase"
|
|
332
|
-
)), this.updateContainerClasslist();
|
|
333
|
-
}
|
|
334
|
-
connectedCallback() {
|
|
335
|
-
var h;
|
|
336
|
-
super.connectedCallback(), this.value = this.getAttrNumber("value", 0).toFixed(this.precision), this.name || this.setAttribute("name", Math.random().toString(36).substring(2, 15)), (h = t(this, o)) == null || h.abort(), l(this, o, new AbortController());
|
|
337
|
-
const e = () => {
|
|
338
|
-
this.disabled || !this.controls || t(this, f).call(this);
|
|
339
|
-
}, a = () => {
|
|
340
|
-
this.disabled || !this.controls || t(this, v).call(this);
|
|
341
|
-
};
|
|
342
|
-
t(this, d).addEventListener("click", e, {
|
|
343
|
-
signal: t(this, o).signal
|
|
344
|
-
}), t(this, b).addEventListener("click", a, {
|
|
345
|
-
signal: t(this, o).signal
|
|
346
|
-
}), t(this, r).addEventListener("blur", t(this, y), {
|
|
347
|
-
signal: t(this, o).signal
|
|
348
|
-
}), t(this, r).addEventListener(
|
|
349
|
-
"focus",
|
|
350
|
-
() => {
|
|
351
|
-
this.isFocus = !0;
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
signal: t(this, o).signal
|
|
355
|
-
}
|
|
356
|
-
);
|
|
357
|
-
}
|
|
358
|
-
$beforeUnmounted() {
|
|
359
|
-
var e;
|
|
360
|
-
(e = t(this, o)) == null || e.abort();
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
c = new WeakMap(), r = new WeakMap(), d = new WeakMap(), b = new WeakMap(), m = new WeakMap(), o = new WeakMap(), u = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap();
|
|
364
|
-
window.customElements.get("ea-input-number") || window.customElements.define("ea-input-number", M);
|
|
365
|
-
export {
|
|
366
|
-
M as EaInputNumber
|
|
367
|
-
};
|