bromcom-ui 2.11.1-rc.9-3 → 2.11.1-rc.9-4
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/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-3cdfd8eb.entry.js → p-082b9695.entry.js} +1 -1
- package/dist/bromcom-ui/{p-14ed8029.entry.js → p-0da8ad9f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7fd22a35.entry.js → p-0ef4f5ec.entry.js} +1 -1
- package/dist/bromcom-ui/p-15199f10.entry.js +5 -0
- package/dist/bromcom-ui/{p-0eacfbb2.entry.js → p-198cccb5.entry.js} +1 -1
- package/dist/bromcom-ui/p-222203a4.entry.js +16 -0
- package/dist/bromcom-ui/{p-adcb30bc.entry.js → p-2ab3e5cb.entry.js} +1 -1
- package/dist/bromcom-ui/p-2addde9e.js +5 -0
- package/dist/bromcom-ui/p-2b42d77e.entry.js +5 -0
- package/dist/bromcom-ui/{p-db15dca3.entry.js → p-2c9f9889.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a018f340.entry.js → p-42d09898.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6f37a4d7.entry.js → p-471c7f34.entry.js} +1 -1
- package/dist/bromcom-ui/{p-35c215f2.entry.js → p-4d0680e1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8b31581f.js → p-5cb99e9e.js} +1 -1
- package/dist/bromcom-ui/{p-9589f69c.entry.js → p-5d670fd7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e497cf5d.entry.js → p-5df2d3f1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-70253803.entry.js → p-5ee56cae.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e10780ed.entry.js → p-603efb90.entry.js} +1 -1
- package/dist/bromcom-ui/{p-178fa936.entry.js → p-64a8db1d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-61753299.js → p-6bea284a.js} +1 -1
- package/dist/bromcom-ui/{p-dc607ae4.entry.js → p-7230713c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fba1682e.entry.js → p-7d4f57be.entry.js} +1 -1
- package/dist/bromcom-ui/p-87e5fda5.entry.js +5 -0
- package/dist/bromcom-ui/{p-e93d6619.js → p-8f3ca5d9.js} +1 -1
- package/dist/bromcom-ui/p-9bbd341c.entry.js +5 -0
- package/dist/bromcom-ui/{p-bca0ff0a.entry.js → p-a292b41d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-90223f9f.entry.js → p-a933ac12.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5a22b74b.entry.js → p-adb21984.entry.js} +1 -1
- package/dist/bromcom-ui/p-aeb4be41.js +5 -0
- package/dist/bromcom-ui/p-b847cbea.js +5 -0
- package/dist/bromcom-ui/p-bbe8c777.entry.js +5 -0
- package/dist/bromcom-ui/{p-c10b07cc.entry.js → p-c157a7d4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ebeb9689.entry.js → p-c23d73fb.entry.js} +1 -1
- package/dist/bromcom-ui/p-c67a5e5f.entry.js +5 -0
- package/dist/bromcom-ui/p-c77541f4.js +10 -0
- package/dist/bromcom-ui/{p-abd2f9ff.entry.js → p-c89acfca.entry.js} +1 -1
- package/dist/bromcom-ui/p-d1298c40.js +5 -0
- package/dist/bromcom-ui/{p-5bf1657b.entry.js → p-e8bb9019.entry.js} +1 -1
- package/dist/bromcom-ui/{p-627c7769.entry.js → p-e9928d0c.entry.js} +1 -1
- package/dist/bromcom-ui/p-f478ad92.entry.js +5 -0
- package/dist/bromcom-ui/{p-5a391fcd.js → p-fcf70988.js} +1 -1
- package/dist/cjs/{bcm-accordion_46.cjs.entry.js → bcm-accordion_47.cjs.entry.js} +8764 -8633
- package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
- package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +6 -6
- package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/bcm-caption.cjs.entry.js +6 -6
- package/dist/cjs/bcm-card.cjs.entry.js +4 -4
- package/dist/cjs/bcm-checkbox-lite_8.cjs.entry.js +3 -3
- package/dist/cjs/bcm-chip-group.cjs.entry.js +6 -6
- package/dist/cjs/bcm-collapse.cjs.entry.js +3 -3
- package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-default.cjs.entry.js +3 -3
- package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
- package/dist/cjs/bcm-input-2.cjs.entry.js +153 -0
- package/dist/cjs/bcm-input-custom.cjs.entry.js +3 -3
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
- package/dist/cjs/bcm-number-input.cjs.entry.js +260 -72
- package/dist/cjs/bcm-overlay_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +6 -6
- package/dist/cjs/bcm-range.cjs.entry.js +3 -3
- package/dist/cjs/bcm-react-number.cjs.entry.js +1230 -0
- package/dist/cjs/bcm-skeleton.cjs.entry.js +6 -6
- package/dist/cjs/bcm-table.cjs.entry.js +6 -6
- package/dist/cjs/bcm-tag.cjs.entry.js +4 -4
- package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-toast.cjs.entry.js +3 -3
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{color-helper-c3a819ea.js → color-helper-dc98a2ca.js} +1 -1
- package/dist/cjs/{colors-078851ec.js → colors-250d0982.js} +13 -7
- package/dist/cjs/{generate-f73a098d.js → generate-2f15ee94.js} +2 -2
- package/dist/cjs/{global-baf04c81.js → global-da78178f.js} +1 -1
- package/dist/cjs/index-e05a7c6f.js +545 -0
- package/dist/cjs/input.style-b5676e6a.js +122 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{number-helper-0543a62e.js → number-helper-9b0b5976.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +4 -4
- package/dist/cjs/old-bcm-popover.cjs.entry.js +3 -3
- package/dist/cjs/{package-e717a31f.js → package-7b89373b.js} +1 -1
- package/dist/cjs/{validators-77768582.js → validators-082184cd.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/atoms/link/link.css +9 -3
- package/dist/collection/components/molecules/input/input.style.js +117 -0
- package/dist/collection/components/molecules/input/input2.js +918 -0
- package/dist/collection/components/molecules/number-input/number-input.js +776 -95
- package/dist/collection/components/molecules/number-input/react-input.js +96 -0
- package/dist/collection/components/molecules/radio/radio.js +1 -1
- package/dist/collection/components/organism/form/form.js +2 -2
- package/dist/collection/components/organism/form-2/bcm-form-components.js +2 -1
- package/dist/collection/components/organism/list/list.css +0 -1
- package/dist/collection/components/third-parts/rc-picker/date.js +1 -1
- package/dist/collection/components/third-parts/rc-picker/rc-picker.css +40 -5
- package/dist/collection/components/third-parts/rc-picker/rc-picker.js +11 -2
- package/dist/components/{raf.js → Overflow.js} +692 -69
- package/dist/components/bcm-date.js +1 -1
- package/dist/components/bcm-form-2.js +2 -1
- package/dist/components/bcm-input-2.d.ts +11 -0
- package/dist/components/bcm-input-2.js +225 -0
- package/dist/components/bcm-number-input.js +295 -79
- package/dist/components/bcm-react-number.d.ts +11 -0
- package/dist/components/bcm-react-number.js +10 -0
- package/dist/components/colors2.js +13 -7
- package/dist/components/form.js +2 -2
- package/dist/components/generate.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/input.style.js +120 -0
- package/dist/components/link.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/rc-overflow.js +1 -593
- package/dist/components/rc-picker.js +8620 -8025
- package/dist/components/react-input.js +1242 -0
- package/dist/esm/{bcm-accordion_46.entry.js → bcm-accordion_47.entry.js} +8656 -8526
- package/dist/esm/bcm-alert.entry.js +3 -3
- package/dist/esm/bcm-attendance-actions-comment.entry.js +6 -6
- package/dist/esm/bcm-attendance-actions-dropdown.entry.js +6 -6
- package/dist/esm/bcm-breadcrumb.entry.js +3 -3
- package/dist/esm/bcm-caption.entry.js +6 -6
- package/dist/esm/bcm-card.entry.js +4 -4
- package/dist/esm/bcm-checkbox-lite_8.entry.js +3 -3
- package/dist/esm/bcm-chip-group.entry.js +6 -6
- package/dist/esm/bcm-collapse.entry.js +3 -3
- package/dist/esm/bcm-date-picker.entry.js +3 -3
- package/dist/esm/bcm-datetime-picker.entry.js +3 -3
- package/dist/esm/bcm-default.entry.js +3 -3
- package/dist/esm/bcm-form-2.entry.js +5 -4
- package/dist/esm/bcm-input-2.entry.js +149 -0
- package/dist/esm/bcm-input-custom.entry.js +3 -3
- package/dist/esm/bcm-input-dropdown.entry.js +6 -6
- package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
- package/dist/esm/bcm-modal-2-header.entry.js +6 -6
- package/dist/esm/bcm-modal-2.entry.js +6 -6
- package/dist/esm/bcm-number-input.entry.js +259 -71
- package/dist/esm/bcm-overlay_2.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +6 -6
- package/dist/esm/bcm-range.entry.js +3 -3
- package/dist/esm/bcm-react-number.entry.js +1226 -0
- package/dist/esm/bcm-skeleton.entry.js +6 -6
- package/dist/esm/bcm-table.entry.js +6 -6
- package/dist/esm/bcm-tag.entry.js +4 -4
- package/dist/esm/bcm-time-picker.entry.js +3 -3
- package/dist/esm/bcm-toast.entry.js +3 -3
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{color-helper-3b528349.js → color-helper-74614f24.js} +1 -1
- package/dist/esm/{colors-c530a5b8.js → colors-dd598eea.js} +13 -7
- package/dist/esm/{generate-c2c0b02e.js → generate-df0f43b2.js} +2 -2
- package/dist/esm/{global-2473677b.js → global-72a67caf.js} +1 -1
- package/dist/esm/index-036974d7.js +541 -0
- package/dist/esm/input.style-e855c0f3.js +120 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{number-helper-75447fa6.js → number-helper-b012c05f.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +4 -4
- package/dist/esm/old-bcm-popover.entry.js +3 -3
- package/dist/esm/{package-28dc6847.js → package-40075eb9.js} +1 -1
- package/dist/esm/{validators-5a383988.js → validators-166e2a4e.js} +1 -1
- package/dist/types/components/molecules/input/input.style.d.ts +576 -0
- package/dist/types/components/molecules/input/input2.d.ts +64 -0
- package/dist/types/components/molecules/number-input/number-input.d.ts +66 -17
- package/dist/types/components/molecules/number-input/react-input.d.ts +16 -0
- package/dist/types/components.d.ts +203 -19
- package/package.json +4 -3
- package/dist/bromcom-ui/p-3361f6c9.entry.js +0 -5
- package/dist/bromcom-ui/p-350dbff0.entry.js +0 -5
- package/dist/bromcom-ui/p-3a43bf45.js +0 -5
- package/dist/bromcom-ui/p-64f21481.entry.js +0 -20
- package/dist/bromcom-ui/p-930f3618.js +0 -5
- package/dist/bromcom-ui/p-a4b675ef.entry.js +0 -5
- package/dist/bromcom-ui/p-bb46d881.entry.js +0 -5
- package/dist/bromcom-ui/p-c7030364.entry.js +0 -5
- package/dist/bromcom-ui/p-de0b0192.entry.js +0 -5
- package/dist/bromcom-ui/p-ede82918.js +0 -5
- package/dist/cjs/bcm-link.cjs.entry.js +0 -51
- package/dist/collection/components/molecules/number-input/number-input.css +0 -137
- package/dist/collection/components/molecules/number-input/number-input.style.js +0 -45
- package/dist/esm/bcm-link.entry.js +0 -47
- package/dist/types/components/molecules/number-input/number-input.style.d.ts +0 -200
|
@@ -2,55 +2,267 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import { Generate } from "@bcm/helpers";
|
|
6
|
-
import { Host, h } from "@stencil/core";
|
|
5
|
+
import { Generate, StringHelper } from "@bcm/helpers";
|
|
7
6
|
import { Bcm } from "@bcm/model";
|
|
8
7
|
import { CaptionTemplate } from "@bcm/template";
|
|
9
|
-
import {
|
|
8
|
+
import { delay } from "@bcm/utils";
|
|
9
|
+
import { Host, h } from "@stencil/core";
|
|
10
|
+
import cs from "classnames";
|
|
11
|
+
import { inputStyle } from "../input/input.style";
|
|
10
12
|
export class NumberInput {
|
|
11
13
|
constructor() {
|
|
12
|
-
this.
|
|
13
|
-
|
|
14
|
+
this.inValid = false;
|
|
15
|
+
this.onInput = () => {
|
|
16
|
+
var _a;
|
|
17
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.addEventListener("input", (e) => {
|
|
18
|
+
this.input.emit(e);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
this.onChange = () => {
|
|
22
|
+
var _a;
|
|
23
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.addEventListener("change", (e) => {
|
|
24
|
+
this.change.emit(e);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
this.onFocus = () => {
|
|
28
|
+
var _a;
|
|
29
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.addEventListener("focus", e => {
|
|
30
|
+
this.isFocus = true;
|
|
31
|
+
this.focus.emit(e);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
this.onBlur = () => {
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.addEventListener("blur", e => {
|
|
37
|
+
this.isFocus = false;
|
|
38
|
+
this.blur.emit(e);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
this.onKeydown = () => {
|
|
42
|
+
var _a;
|
|
43
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.addEventListener("keydown", (e) => {
|
|
44
|
+
if (e.key === "ArrowUp") {
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
this.up();
|
|
47
|
+
}
|
|
48
|
+
if (e.key === "ArrowDown") {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
this.down();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
this.listener = () => {
|
|
55
|
+
this.onInput();
|
|
56
|
+
this.onChange();
|
|
57
|
+
this.onFocus();
|
|
58
|
+
this.onBlur();
|
|
59
|
+
this.onKeydown();
|
|
14
60
|
};
|
|
15
61
|
this._id = Generate.UID();
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
62
|
+
this.value = "";
|
|
63
|
+
this.defaultValue = undefined;
|
|
64
|
+
this._prefix = undefined;
|
|
65
|
+
this._suffix = undefined;
|
|
66
|
+
this.size = "medium";
|
|
67
|
+
this.min = undefined;
|
|
68
|
+
this.max = undefined;
|
|
19
69
|
this.step = 1;
|
|
20
|
-
this.placeholder = undefined;
|
|
21
70
|
this.label = undefined;
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
71
|
+
this.name = undefined;
|
|
72
|
+
this.fullWidth = false;
|
|
73
|
+
this.clearable = false;
|
|
25
74
|
this.readonly = false;
|
|
75
|
+
this.disabled = false;
|
|
26
76
|
this.required = false;
|
|
27
|
-
this.
|
|
77
|
+
this.mode = "none";
|
|
78
|
+
this.placeholder = undefined;
|
|
79
|
+
this.thousandSeparator = false;
|
|
80
|
+
this.decimalSeparator = undefined;
|
|
81
|
+
this.decimalScale = undefined;
|
|
82
|
+
this.fixedDecimalScale = false;
|
|
83
|
+
this.allowNegative = false;
|
|
84
|
+
this.allowLeadingZeros = false;
|
|
85
|
+
this.unitPrefix = undefined;
|
|
86
|
+
this.unitSuffix = undefined;
|
|
28
87
|
this.caption = undefined;
|
|
29
88
|
this.noCaption = false;
|
|
30
89
|
this.captionType = Bcm.Status.default;
|
|
31
90
|
this.captionError = undefined;
|
|
32
91
|
this.customErrorMessage = undefined;
|
|
33
|
-
this.prefixIcon = undefined;
|
|
34
|
-
this.suffixIcon = undefined;
|
|
35
92
|
this.isFocus = false;
|
|
36
|
-
this.
|
|
93
|
+
this.captionCache = undefined;
|
|
94
|
+
this.captionTypeCache = undefined;
|
|
95
|
+
this.valueCache = "";
|
|
37
96
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
97
|
+
connectedCallback() {
|
|
98
|
+
if (this.defaultValue)
|
|
99
|
+
this.value = +this.defaultValue;
|
|
100
|
+
this.valueCache = this.value;
|
|
101
|
+
this.captionCache = this.caption;
|
|
102
|
+
this.captionTypeCache = this.captionType;
|
|
42
103
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
"$": ["number-input.scss"]
|
|
47
|
-
};
|
|
104
|
+
componentDidLoad() {
|
|
105
|
+
this.listener();
|
|
48
106
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
107
|
+
up() {
|
|
108
|
+
if (this.disabled)
|
|
109
|
+
return;
|
|
110
|
+
if (!this.value)
|
|
111
|
+
this.value = Number(0);
|
|
112
|
+
this.value = +this.value + +this.step;
|
|
113
|
+
if (this.mode === "strict") {
|
|
114
|
+
if (this.max && +this.value > +this.max) {
|
|
115
|
+
this.value = this.max;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
down() {
|
|
120
|
+
if (this.disabled)
|
|
121
|
+
return;
|
|
122
|
+
if (!this.value)
|
|
123
|
+
this.value = Number(0);
|
|
124
|
+
this.value = +this.value - +this.step;
|
|
125
|
+
if (this.mode === "strict") {
|
|
126
|
+
if (this.min && +this.value < +this.min) {
|
|
127
|
+
this.value = this.min;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
handleClear(e) {
|
|
132
|
+
if (this.disabled)
|
|
133
|
+
return;
|
|
134
|
+
const event = this.beforeClear.emit(e);
|
|
135
|
+
if (event.defaultPrevented)
|
|
136
|
+
return;
|
|
137
|
+
this.value = "";
|
|
138
|
+
this.clear.emit(e);
|
|
139
|
+
}
|
|
140
|
+
checkLength() {
|
|
141
|
+
const { min, max, value } = this;
|
|
142
|
+
const minLength = min;
|
|
143
|
+
const maxLength = max;
|
|
144
|
+
let valuePoint = value === null || value === void 0 ? void 0 : value.toString();
|
|
145
|
+
if (min && max) {
|
|
146
|
+
if (+valuePoint < +min || +valuePoint > +max) {
|
|
147
|
+
this.setCaption(StringHelper.getMessage("betweenlength", [minLength, maxLength]), "error");
|
|
148
|
+
this.inValid = true;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
this.setCaption();
|
|
152
|
+
this.inValid = false;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else if (minLength) {
|
|
156
|
+
if (+valuePoint < +minLength) {
|
|
157
|
+
this.setCaption(StringHelper.getMessage("minlength", [minLength]), "error");
|
|
158
|
+
this.inValid = true;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
this.setCaption();
|
|
162
|
+
this.inValid = false;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else if (maxLength) {
|
|
166
|
+
if (valuePoint > maxLength) {
|
|
167
|
+
this.setCaption(StringHelper.getMessage("maxlength", [maxLength]), "error");
|
|
168
|
+
this.inValid = true;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.setCaption();
|
|
172
|
+
this.inValid = false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
watchValue() {
|
|
177
|
+
this.checkLength();
|
|
178
|
+
}
|
|
179
|
+
async onBcmFocus() {
|
|
180
|
+
this.inputElement.focus();
|
|
181
|
+
}
|
|
182
|
+
async onBcmBlur() {
|
|
183
|
+
this.inputElement.blur();
|
|
184
|
+
}
|
|
185
|
+
async onBcmSelect() {
|
|
186
|
+
this.inputElement.select();
|
|
187
|
+
}
|
|
188
|
+
async set(data) {
|
|
189
|
+
await this.setValue(data);
|
|
190
|
+
}
|
|
191
|
+
async get() {
|
|
192
|
+
return this.value || null;
|
|
193
|
+
}
|
|
194
|
+
async setValue(value) {
|
|
195
|
+
this.value = value;
|
|
196
|
+
}
|
|
197
|
+
async setClear() {
|
|
198
|
+
this.value = null;
|
|
199
|
+
await delay(10);
|
|
200
|
+
return Promise.resolve();
|
|
201
|
+
}
|
|
202
|
+
async resetCaption() {
|
|
203
|
+
await delay(10);
|
|
204
|
+
this.caption = this.captionCache;
|
|
205
|
+
this.captionType = this.captionTypeCache;
|
|
206
|
+
this.captionError = null;
|
|
207
|
+
this.inValid = false;
|
|
208
|
+
await delay(10);
|
|
209
|
+
return Promise.resolve();
|
|
210
|
+
}
|
|
211
|
+
setCaption(caption = null, captionType = null) {
|
|
212
|
+
this.caption = caption || this.captionCache;
|
|
213
|
+
this.captionType = captionType || this.captionTypeCache;
|
|
214
|
+
this.captionError = captionType == "error" ? caption : null;
|
|
215
|
+
return Promise.resolve();
|
|
216
|
+
}
|
|
217
|
+
disconnectedCallback() {
|
|
218
|
+
var _a, _b, _c, _d, _e;
|
|
219
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.removeEventListener("input", this.onInput.bind(this));
|
|
220
|
+
(_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.removeEventListener("change", this.onChange.bind(this));
|
|
221
|
+
(_c = this.inputElement) === null || _c === void 0 ? void 0 : _c.removeEventListener("focus", this.onFocus.bind(this));
|
|
222
|
+
(_d = this.inputElement) === null || _d === void 0 ? void 0 : _d.removeEventListener("blur", this.onBlur.bind(this));
|
|
223
|
+
(_e = this.inputElement) === null || _e === void 0 ? void 0 : _e.removeEventListener("keydown", this.onKeydown.bind(this));
|
|
224
|
+
}
|
|
225
|
+
render() {
|
|
226
|
+
const { _prefix, _suffix, noCaption, captionType, captionError, caption, required, _id, label, size, fullWidth, clearable, value, placeholder, thousandSeparator, decimalSeparator, decimalScale, fixedDecimalScale, allowNegative, allowLeadingZeros, unitPrefix, unitSuffix, min, max, step, defaultValue, disabled, mode, } = this;
|
|
227
|
+
const isActiveClearable = (value === null || value === void 0 ? void 0 : value.toString().length) > 0 && clearable;
|
|
228
|
+
const isInvalid = this.captionType == "error" || this.inValid;
|
|
229
|
+
const { host, inputContainer, slotClass, clearButton, controls, controlsBtn, controlsBtnDown, controlsBtnUp, controlsDivider, input } = inputStyle({
|
|
230
|
+
size,
|
|
231
|
+
fullWidth,
|
|
232
|
+
clearable: isActiveClearable,
|
|
233
|
+
disabled,
|
|
234
|
+
invalid: isInvalid,
|
|
235
|
+
});
|
|
236
|
+
const numericProps = {
|
|
237
|
+
placeholder,
|
|
238
|
+
thousandSeparator,
|
|
239
|
+
decimalSeparator,
|
|
240
|
+
decimalScale,
|
|
241
|
+
fixedDecimalScale,
|
|
242
|
+
allowNegative,
|
|
243
|
+
allowLeadingZeros,
|
|
244
|
+
prefix: unitPrefix,
|
|
245
|
+
suffix: unitSuffix,
|
|
246
|
+
};
|
|
247
|
+
/* input props */
|
|
248
|
+
const inputProps = {
|
|
249
|
+
min,
|
|
250
|
+
max,
|
|
251
|
+
step,
|
|
252
|
+
value,
|
|
253
|
+
defaultValue,
|
|
52
254
|
};
|
|
255
|
+
const generalProps = Object.assign(Object.assign(Object.assign({ "id": _id + "-base-input", "name": this.name, disabled,
|
|
256
|
+
mode, "aria-label": label, "aria-labelledby": _id + "-label", "getInputRef": el => {
|
|
257
|
+
this.inputElement = el;
|
|
258
|
+
}, "className": input() }, numericProps), inputProps), { "onValueChange": (e) => {
|
|
259
|
+
const { floatValue } = e;
|
|
260
|
+
this.value = floatValue;
|
|
261
|
+
this._onChange.emit(e);
|
|
262
|
+
} });
|
|
263
|
+
return (h(Host, { class: host() }, label && h("bcm-label", { size: size, type: captionType, value: label, required: required, htmlFor: _id + "-base-input", id: _id + "-label" }), h("div", { class: inputContainer() }, h("div", { class: slotClass() }, h("slot", { name: "prefix" }, _prefix && _prefix.length > 0 && h("span", { innerHTML: _prefix }))), h("bcm-react-number", { disabled: disabled, class: "tw-flex-1", options: generalProps }), h("div", { class: slotClass() }, !disabled && isActiveClearable && (h("button", { class: clearButton(), onClick: event => this.handleClear(event) }, h("i", { class: "far fa-times" }))), h("slot", { name: "suffix" }, _suffix && _suffix.length > 0 && h("span", { innerHTML: _suffix })), h("div", { class: controls() }, h("button", { type: "button", disabled: disabled, class: cs(controlsBtn(), controlsBtnUp()), onClick: this.up.bind(this), "aria-label": "Increase value" }, h("i", { class: "fas fa-caret-up" })), h("div", { class: controlsDivider() }), h("button", { type: "button", disabled: disabled, class: cs(controlsBtn(), controlsBtnDown()), onClick: this.down.bind(this), "aria-label": "Decrease value" }, h("i", { class: "fas fa-caret-down" }))))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption, customErrorMessage: this.customErrorMessage })));
|
|
53
264
|
}
|
|
265
|
+
static get is() { return "bcm-number-input"; }
|
|
54
266
|
static get properties() {
|
|
55
267
|
return {
|
|
56
268
|
"_id": {
|
|
@@ -71,6 +283,75 @@ export class NumberInput {
|
|
|
71
283
|
"reflect": true,
|
|
72
284
|
"defaultValue": "Generate.UID()"
|
|
73
285
|
},
|
|
286
|
+
"value": {
|
|
287
|
+
"type": "any",
|
|
288
|
+
"mutable": true,
|
|
289
|
+
"complexType": {
|
|
290
|
+
"original": "number | string",
|
|
291
|
+
"resolved": "number | string",
|
|
292
|
+
"references": {}
|
|
293
|
+
},
|
|
294
|
+
"required": false,
|
|
295
|
+
"optional": true,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [],
|
|
298
|
+
"text": ""
|
|
299
|
+
},
|
|
300
|
+
"attribute": "value",
|
|
301
|
+
"reflect": false,
|
|
302
|
+
"defaultValue": "\"\""
|
|
303
|
+
},
|
|
304
|
+
"defaultValue": {
|
|
305
|
+
"type": "any",
|
|
306
|
+
"mutable": false,
|
|
307
|
+
"complexType": {
|
|
308
|
+
"original": "number | string",
|
|
309
|
+
"resolved": "number | string",
|
|
310
|
+
"references": {}
|
|
311
|
+
},
|
|
312
|
+
"required": false,
|
|
313
|
+
"optional": true,
|
|
314
|
+
"docs": {
|
|
315
|
+
"tags": [],
|
|
316
|
+
"text": ""
|
|
317
|
+
},
|
|
318
|
+
"attribute": "default-value",
|
|
319
|
+
"reflect": false
|
|
320
|
+
},
|
|
321
|
+
"_prefix": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"mutable": false,
|
|
324
|
+
"complexType": {
|
|
325
|
+
"original": "string",
|
|
326
|
+
"resolved": "string",
|
|
327
|
+
"references": {}
|
|
328
|
+
},
|
|
329
|
+
"required": false,
|
|
330
|
+
"optional": true,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": ""
|
|
334
|
+
},
|
|
335
|
+
"attribute": "prefix",
|
|
336
|
+
"reflect": false
|
|
337
|
+
},
|
|
338
|
+
"_suffix": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"mutable": false,
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "string",
|
|
343
|
+
"resolved": "string",
|
|
344
|
+
"references": {}
|
|
345
|
+
},
|
|
346
|
+
"required": false,
|
|
347
|
+
"optional": true,
|
|
348
|
+
"docs": {
|
|
349
|
+
"tags": [],
|
|
350
|
+
"text": ""
|
|
351
|
+
},
|
|
352
|
+
"attribute": "suffix",
|
|
353
|
+
"reflect": false
|
|
354
|
+
},
|
|
74
355
|
"size": {
|
|
75
356
|
"type": "string",
|
|
76
357
|
"mutable": false,
|
|
@@ -85,50 +366,48 @@ export class NumberInput {
|
|
|
85
366
|
}
|
|
86
367
|
},
|
|
87
368
|
"required": false,
|
|
88
|
-
"optional":
|
|
369
|
+
"optional": true,
|
|
89
370
|
"docs": {
|
|
90
371
|
"tags": [],
|
|
91
372
|
"text": ""
|
|
92
373
|
},
|
|
93
374
|
"attribute": "size",
|
|
94
375
|
"reflect": false,
|
|
95
|
-
"defaultValue": "
|
|
376
|
+
"defaultValue": "\"medium\""
|
|
96
377
|
},
|
|
97
378
|
"min": {
|
|
98
|
-
"type": "
|
|
379
|
+
"type": "any",
|
|
99
380
|
"mutable": false,
|
|
100
381
|
"complexType": {
|
|
101
|
-
"original": "number",
|
|
102
|
-
"resolved": "number",
|
|
382
|
+
"original": "number | string",
|
|
383
|
+
"resolved": "number | string",
|
|
103
384
|
"references": {}
|
|
104
385
|
},
|
|
105
386
|
"required": false,
|
|
106
|
-
"optional":
|
|
387
|
+
"optional": true,
|
|
107
388
|
"docs": {
|
|
108
389
|
"tags": [],
|
|
109
390
|
"text": ""
|
|
110
391
|
},
|
|
111
392
|
"attribute": "min",
|
|
112
|
-
"reflect": false
|
|
113
|
-
"defaultValue": "0"
|
|
393
|
+
"reflect": false
|
|
114
394
|
},
|
|
115
395
|
"max": {
|
|
116
|
-
"type": "
|
|
396
|
+
"type": "any",
|
|
117
397
|
"mutable": false,
|
|
118
398
|
"complexType": {
|
|
119
|
-
"original": "number",
|
|
120
|
-
"resolved": "number",
|
|
399
|
+
"original": "number | string",
|
|
400
|
+
"resolved": "number | string",
|
|
121
401
|
"references": {}
|
|
122
402
|
},
|
|
123
403
|
"required": false,
|
|
124
|
-
"optional":
|
|
404
|
+
"optional": true,
|
|
125
405
|
"docs": {
|
|
126
406
|
"tags": [],
|
|
127
407
|
"text": ""
|
|
128
408
|
},
|
|
129
409
|
"attribute": "max",
|
|
130
|
-
"reflect": false
|
|
131
|
-
"defaultValue": "100"
|
|
410
|
+
"reflect": false
|
|
132
411
|
},
|
|
133
412
|
"step": {
|
|
134
413
|
"type": "number",
|
|
@@ -139,7 +418,7 @@ export class NumberInput {
|
|
|
139
418
|
"references": {}
|
|
140
419
|
},
|
|
141
420
|
"required": false,
|
|
142
|
-
"optional":
|
|
421
|
+
"optional": true,
|
|
143
422
|
"docs": {
|
|
144
423
|
"tags": [],
|
|
145
424
|
"text": ""
|
|
@@ -148,7 +427,7 @@ export class NumberInput {
|
|
|
148
427
|
"reflect": false,
|
|
149
428
|
"defaultValue": "1"
|
|
150
429
|
},
|
|
151
|
-
"
|
|
430
|
+
"label": {
|
|
152
431
|
"type": "string",
|
|
153
432
|
"mutable": false,
|
|
154
433
|
"complexType": {
|
|
@@ -162,10 +441,10 @@ export class NumberInput {
|
|
|
162
441
|
"tags": [],
|
|
163
442
|
"text": ""
|
|
164
443
|
},
|
|
165
|
-
"attribute": "
|
|
444
|
+
"attribute": "label",
|
|
166
445
|
"reflect": false
|
|
167
446
|
},
|
|
168
|
-
"
|
|
447
|
+
"name": {
|
|
169
448
|
"type": "string",
|
|
170
449
|
"mutable": false,
|
|
171
450
|
"complexType": {
|
|
@@ -179,12 +458,120 @@ export class NumberInput {
|
|
|
179
458
|
"tags": [],
|
|
180
459
|
"text": ""
|
|
181
460
|
},
|
|
182
|
-
"attribute": "
|
|
461
|
+
"attribute": "name",
|
|
183
462
|
"reflect": false
|
|
184
463
|
},
|
|
185
|
-
"
|
|
464
|
+
"fullWidth": {
|
|
465
|
+
"type": "boolean",
|
|
466
|
+
"mutable": false,
|
|
467
|
+
"complexType": {
|
|
468
|
+
"original": "boolean",
|
|
469
|
+
"resolved": "boolean",
|
|
470
|
+
"references": {}
|
|
471
|
+
},
|
|
472
|
+
"required": false,
|
|
473
|
+
"optional": false,
|
|
474
|
+
"docs": {
|
|
475
|
+
"tags": [],
|
|
476
|
+
"text": ""
|
|
477
|
+
},
|
|
478
|
+
"attribute": "full-width",
|
|
479
|
+
"reflect": false,
|
|
480
|
+
"defaultValue": "false"
|
|
481
|
+
},
|
|
482
|
+
"clearable": {
|
|
483
|
+
"type": "boolean",
|
|
484
|
+
"mutable": false,
|
|
485
|
+
"complexType": {
|
|
486
|
+
"original": "boolean",
|
|
487
|
+
"resolved": "boolean",
|
|
488
|
+
"references": {}
|
|
489
|
+
},
|
|
490
|
+
"required": false,
|
|
491
|
+
"optional": false,
|
|
492
|
+
"docs": {
|
|
493
|
+
"tags": [],
|
|
494
|
+
"text": ""
|
|
495
|
+
},
|
|
496
|
+
"attribute": "clearable",
|
|
497
|
+
"reflect": false,
|
|
498
|
+
"defaultValue": "false"
|
|
499
|
+
},
|
|
500
|
+
"readonly": {
|
|
501
|
+
"type": "boolean",
|
|
502
|
+
"mutable": false,
|
|
503
|
+
"complexType": {
|
|
504
|
+
"original": "boolean",
|
|
505
|
+
"resolved": "boolean",
|
|
506
|
+
"references": {}
|
|
507
|
+
},
|
|
508
|
+
"required": false,
|
|
509
|
+
"optional": true,
|
|
510
|
+
"docs": {
|
|
511
|
+
"tags": [],
|
|
512
|
+
"text": "Input states"
|
|
513
|
+
},
|
|
514
|
+
"attribute": "readonly",
|
|
515
|
+
"reflect": false,
|
|
516
|
+
"defaultValue": "false"
|
|
517
|
+
},
|
|
518
|
+
"disabled": {
|
|
519
|
+
"type": "boolean",
|
|
520
|
+
"mutable": false,
|
|
521
|
+
"complexType": {
|
|
522
|
+
"original": "boolean",
|
|
523
|
+
"resolved": "boolean",
|
|
524
|
+
"references": {}
|
|
525
|
+
},
|
|
526
|
+
"required": false,
|
|
527
|
+
"optional": true,
|
|
528
|
+
"docs": {
|
|
529
|
+
"tags": [],
|
|
530
|
+
"text": ""
|
|
531
|
+
},
|
|
532
|
+
"attribute": "disabled",
|
|
533
|
+
"reflect": false,
|
|
534
|
+
"defaultValue": "false"
|
|
535
|
+
},
|
|
536
|
+
"required": {
|
|
537
|
+
"type": "boolean",
|
|
538
|
+
"mutable": false,
|
|
539
|
+
"complexType": {
|
|
540
|
+
"original": "boolean",
|
|
541
|
+
"resolved": "boolean",
|
|
542
|
+
"references": {}
|
|
543
|
+
},
|
|
544
|
+
"required": false,
|
|
545
|
+
"optional": true,
|
|
546
|
+
"docs": {
|
|
547
|
+
"tags": [],
|
|
548
|
+
"text": ""
|
|
549
|
+
},
|
|
550
|
+
"attribute": "required",
|
|
551
|
+
"reflect": false,
|
|
552
|
+
"defaultValue": "false"
|
|
553
|
+
},
|
|
554
|
+
"mode": {
|
|
186
555
|
"type": "string",
|
|
187
|
-
"mutable":
|
|
556
|
+
"mutable": false,
|
|
557
|
+
"complexType": {
|
|
558
|
+
"original": "\"strict\" | \"none\"",
|
|
559
|
+
"resolved": "\"none\" | \"strict\"",
|
|
560
|
+
"references": {}
|
|
561
|
+
},
|
|
562
|
+
"required": false,
|
|
563
|
+
"optional": false,
|
|
564
|
+
"docs": {
|
|
565
|
+
"tags": [],
|
|
566
|
+
"text": "Number Input Props"
|
|
567
|
+
},
|
|
568
|
+
"attribute": "mode",
|
|
569
|
+
"reflect": false,
|
|
570
|
+
"defaultValue": "\"none\""
|
|
571
|
+
},
|
|
572
|
+
"placeholder": {
|
|
573
|
+
"type": "string",
|
|
574
|
+
"mutable": false,
|
|
188
575
|
"complexType": {
|
|
189
576
|
"original": "string",
|
|
190
577
|
"resolved": "string",
|
|
@@ -196,28 +583,62 @@ export class NumberInput {
|
|
|
196
583
|
"tags": [],
|
|
197
584
|
"text": ""
|
|
198
585
|
},
|
|
199
|
-
"attribute": "
|
|
586
|
+
"attribute": "placeholder",
|
|
200
587
|
"reflect": false
|
|
201
588
|
},
|
|
202
|
-
"
|
|
589
|
+
"thousandSeparator": {
|
|
590
|
+
"type": "any",
|
|
591
|
+
"mutable": false,
|
|
592
|
+
"complexType": {
|
|
593
|
+
"original": "string | boolean",
|
|
594
|
+
"resolved": "boolean | string",
|
|
595
|
+
"references": {}
|
|
596
|
+
},
|
|
597
|
+
"required": false,
|
|
598
|
+
"optional": true,
|
|
599
|
+
"docs": {
|
|
600
|
+
"tags": [],
|
|
601
|
+
"text": ""
|
|
602
|
+
},
|
|
603
|
+
"attribute": "thousand-separator",
|
|
604
|
+
"reflect": false,
|
|
605
|
+
"defaultValue": "false"
|
|
606
|
+
},
|
|
607
|
+
"decimalSeparator": {
|
|
608
|
+
"type": "string",
|
|
609
|
+
"mutable": false,
|
|
610
|
+
"complexType": {
|
|
611
|
+
"original": "string",
|
|
612
|
+
"resolved": "string",
|
|
613
|
+
"references": {}
|
|
614
|
+
},
|
|
615
|
+
"required": false,
|
|
616
|
+
"optional": true,
|
|
617
|
+
"docs": {
|
|
618
|
+
"tags": [],
|
|
619
|
+
"text": ""
|
|
620
|
+
},
|
|
621
|
+
"attribute": "decimal-separator",
|
|
622
|
+
"reflect": false
|
|
623
|
+
},
|
|
624
|
+
"decimalScale": {
|
|
203
625
|
"type": "number",
|
|
204
|
-
"mutable":
|
|
626
|
+
"mutable": false,
|
|
205
627
|
"complexType": {
|
|
206
628
|
"original": "number",
|
|
207
629
|
"resolved": "number",
|
|
208
630
|
"references": {}
|
|
209
631
|
},
|
|
210
632
|
"required": false,
|
|
211
|
-
"optional":
|
|
633
|
+
"optional": true,
|
|
212
634
|
"docs": {
|
|
213
635
|
"tags": [],
|
|
214
636
|
"text": ""
|
|
215
637
|
},
|
|
216
|
-
"attribute": "
|
|
217
|
-
"reflect": false
|
|
218
|
-
"defaultValue": "0"
|
|
638
|
+
"attribute": "decimal-scale",
|
|
639
|
+
"reflect": false
|
|
219
640
|
},
|
|
220
|
-
"
|
|
641
|
+
"fixedDecimalScale": {
|
|
221
642
|
"type": "boolean",
|
|
222
643
|
"mutable": false,
|
|
223
644
|
"complexType": {
|
|
@@ -226,16 +647,16 @@ export class NumberInput {
|
|
|
226
647
|
"references": {}
|
|
227
648
|
},
|
|
228
649
|
"required": false,
|
|
229
|
-
"optional":
|
|
650
|
+
"optional": true,
|
|
230
651
|
"docs": {
|
|
231
652
|
"tags": [],
|
|
232
653
|
"text": ""
|
|
233
654
|
},
|
|
234
|
-
"attribute": "
|
|
655
|
+
"attribute": "fixed-decimal-scale",
|
|
235
656
|
"reflect": false,
|
|
236
657
|
"defaultValue": "false"
|
|
237
658
|
},
|
|
238
|
-
"
|
|
659
|
+
"allowNegative": {
|
|
239
660
|
"type": "boolean",
|
|
240
661
|
"mutable": false,
|
|
241
662
|
"complexType": {
|
|
@@ -244,16 +665,16 @@ export class NumberInput {
|
|
|
244
665
|
"references": {}
|
|
245
666
|
},
|
|
246
667
|
"required": false,
|
|
247
|
-
"optional":
|
|
668
|
+
"optional": true,
|
|
248
669
|
"docs": {
|
|
249
670
|
"tags": [],
|
|
250
671
|
"text": ""
|
|
251
672
|
},
|
|
252
|
-
"attribute": "
|
|
673
|
+
"attribute": "allow-negative",
|
|
253
674
|
"reflect": false,
|
|
254
675
|
"defaultValue": "false"
|
|
255
676
|
},
|
|
256
|
-
"
|
|
677
|
+
"allowLeadingZeros": {
|
|
257
678
|
"type": "boolean",
|
|
258
679
|
"mutable": false,
|
|
259
680
|
"complexType": {
|
|
@@ -262,30 +683,47 @@ export class NumberInput {
|
|
|
262
683
|
"references": {}
|
|
263
684
|
},
|
|
264
685
|
"required": false,
|
|
265
|
-
"optional":
|
|
686
|
+
"optional": true,
|
|
266
687
|
"docs": {
|
|
267
688
|
"tags": [],
|
|
268
689
|
"text": ""
|
|
269
690
|
},
|
|
270
|
-
"attribute": "
|
|
691
|
+
"attribute": "allow-leading-zeros",
|
|
271
692
|
"reflect": false,
|
|
272
693
|
"defaultValue": "false"
|
|
273
694
|
},
|
|
274
|
-
"
|
|
695
|
+
"unitPrefix": {
|
|
275
696
|
"type": "string",
|
|
276
|
-
"mutable":
|
|
697
|
+
"mutable": false,
|
|
277
698
|
"complexType": {
|
|
278
699
|
"original": "string",
|
|
279
700
|
"resolved": "string",
|
|
280
701
|
"references": {}
|
|
281
702
|
},
|
|
282
703
|
"required": false,
|
|
283
|
-
"optional":
|
|
704
|
+
"optional": true,
|
|
705
|
+
"docs": {
|
|
706
|
+
"tags": [],
|
|
707
|
+
"text": ""
|
|
708
|
+
},
|
|
709
|
+
"attribute": "unit-prefix",
|
|
710
|
+
"reflect": false
|
|
711
|
+
},
|
|
712
|
+
"unitSuffix": {
|
|
713
|
+
"type": "string",
|
|
714
|
+
"mutable": false,
|
|
715
|
+
"complexType": {
|
|
716
|
+
"original": "string",
|
|
717
|
+
"resolved": "string",
|
|
718
|
+
"references": {}
|
|
719
|
+
},
|
|
720
|
+
"required": false,
|
|
721
|
+
"optional": true,
|
|
284
722
|
"docs": {
|
|
285
723
|
"tags": [],
|
|
286
724
|
"text": ""
|
|
287
725
|
},
|
|
288
|
-
"attribute": "
|
|
726
|
+
"attribute": "unit-suffix",
|
|
289
727
|
"reflect": false
|
|
290
728
|
},
|
|
291
729
|
"caption": {
|
|
@@ -300,7 +738,7 @@ export class NumberInput {
|
|
|
300
738
|
"optional": false,
|
|
301
739
|
"docs": {
|
|
302
740
|
"tags": [],
|
|
303
|
-
"text": ""
|
|
741
|
+
"text": "Caption Props"
|
|
304
742
|
},
|
|
305
743
|
"attribute": "caption",
|
|
306
744
|
"reflect": false
|
|
@@ -379,47 +817,290 @@ export class NumberInput {
|
|
|
379
817
|
},
|
|
380
818
|
"attribute": "custom-error-message",
|
|
381
819
|
"reflect": false
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
}
|
|
823
|
+
static get states() {
|
|
824
|
+
return {
|
|
825
|
+
"isFocus": {},
|
|
826
|
+
"captionCache": {},
|
|
827
|
+
"captionTypeCache": {},
|
|
828
|
+
"valueCache": {}
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
static get events() {
|
|
832
|
+
return [{
|
|
833
|
+
"method": "focus",
|
|
834
|
+
"name": "bcm-focus",
|
|
835
|
+
"bubbles": false,
|
|
836
|
+
"cancelable": true,
|
|
837
|
+
"composed": true,
|
|
838
|
+
"docs": {
|
|
839
|
+
"tags": [],
|
|
840
|
+
"text": "Events *"
|
|
841
|
+
},
|
|
386
842
|
"complexType": {
|
|
387
|
-
"original": "
|
|
388
|
-
"resolved": "
|
|
843
|
+
"original": "any",
|
|
844
|
+
"resolved": "any",
|
|
389
845
|
"references": {}
|
|
846
|
+
}
|
|
847
|
+
}, {
|
|
848
|
+
"method": "blur",
|
|
849
|
+
"name": "bcm-blur",
|
|
850
|
+
"bubbles": false,
|
|
851
|
+
"cancelable": true,
|
|
852
|
+
"composed": true,
|
|
853
|
+
"docs": {
|
|
854
|
+
"tags": [],
|
|
855
|
+
"text": ""
|
|
390
856
|
},
|
|
391
|
-
"
|
|
392
|
-
|
|
857
|
+
"complexType": {
|
|
858
|
+
"original": "any",
|
|
859
|
+
"resolved": "any",
|
|
860
|
+
"references": {}
|
|
861
|
+
}
|
|
862
|
+
}, {
|
|
863
|
+
"method": "clear",
|
|
864
|
+
"name": "bcm-clear",
|
|
865
|
+
"bubbles": false,
|
|
866
|
+
"cancelable": true,
|
|
867
|
+
"composed": true,
|
|
393
868
|
"docs": {
|
|
394
869
|
"tags": [],
|
|
395
870
|
"text": ""
|
|
396
871
|
},
|
|
397
|
-
"attribute": "prefix-icon",
|
|
398
|
-
"reflect": false
|
|
399
|
-
},
|
|
400
|
-
"suffixIcon": {
|
|
401
|
-
"type": "string",
|
|
402
|
-
"mutable": true,
|
|
403
872
|
"complexType": {
|
|
404
|
-
"original": "
|
|
405
|
-
"resolved": "
|
|
873
|
+
"original": "any",
|
|
874
|
+
"resolved": "any",
|
|
406
875
|
"references": {}
|
|
876
|
+
}
|
|
877
|
+
}, {
|
|
878
|
+
"method": "change",
|
|
879
|
+
"name": "bcm-change",
|
|
880
|
+
"bubbles": true,
|
|
881
|
+
"cancelable": true,
|
|
882
|
+
"composed": true,
|
|
883
|
+
"docs": {
|
|
884
|
+
"tags": [],
|
|
885
|
+
"text": ""
|
|
407
886
|
},
|
|
408
|
-
"
|
|
409
|
-
|
|
887
|
+
"complexType": {
|
|
888
|
+
"original": "any",
|
|
889
|
+
"resolved": "any",
|
|
890
|
+
"references": {}
|
|
891
|
+
}
|
|
892
|
+
}, {
|
|
893
|
+
"method": "input",
|
|
894
|
+
"name": "bcm-input",
|
|
895
|
+
"bubbles": false,
|
|
896
|
+
"cancelable": true,
|
|
897
|
+
"composed": true,
|
|
410
898
|
"docs": {
|
|
411
899
|
"tags": [],
|
|
412
900
|
"text": ""
|
|
413
901
|
},
|
|
414
|
-
"
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
902
|
+
"complexType": {
|
|
903
|
+
"original": "any",
|
|
904
|
+
"resolved": "any",
|
|
905
|
+
"references": {}
|
|
906
|
+
}
|
|
907
|
+
}, {
|
|
908
|
+
"method": "beforeClear",
|
|
909
|
+
"name": "bcm-input-before-clear",
|
|
910
|
+
"bubbles": false,
|
|
911
|
+
"cancelable": true,
|
|
912
|
+
"composed": true,
|
|
913
|
+
"docs": {
|
|
914
|
+
"tags": [],
|
|
915
|
+
"text": ""
|
|
916
|
+
},
|
|
917
|
+
"complexType": {
|
|
918
|
+
"original": "any",
|
|
919
|
+
"resolved": "any",
|
|
920
|
+
"references": {}
|
|
921
|
+
}
|
|
922
|
+
}, {
|
|
923
|
+
"method": "_onChange",
|
|
924
|
+
"name": "bcm-onchange",
|
|
925
|
+
"bubbles": false,
|
|
926
|
+
"cancelable": true,
|
|
927
|
+
"composed": true,
|
|
928
|
+
"docs": {
|
|
929
|
+
"tags": [],
|
|
930
|
+
"text": ""
|
|
931
|
+
},
|
|
932
|
+
"complexType": {
|
|
933
|
+
"original": "any",
|
|
934
|
+
"resolved": "any",
|
|
935
|
+
"references": {}
|
|
936
|
+
}
|
|
937
|
+
}];
|
|
418
938
|
}
|
|
419
|
-
static get
|
|
939
|
+
static get methods() {
|
|
420
940
|
return {
|
|
421
|
-
"
|
|
422
|
-
|
|
941
|
+
"onBcmFocus": {
|
|
942
|
+
"complexType": {
|
|
943
|
+
"signature": "() => Promise<void>",
|
|
944
|
+
"parameters": [],
|
|
945
|
+
"references": {
|
|
946
|
+
"Promise": {
|
|
947
|
+
"location": "global"
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
"return": "Promise<void>"
|
|
951
|
+
},
|
|
952
|
+
"docs": {
|
|
953
|
+
"text": "",
|
|
954
|
+
"tags": []
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
"onBcmBlur": {
|
|
958
|
+
"complexType": {
|
|
959
|
+
"signature": "() => Promise<void>",
|
|
960
|
+
"parameters": [],
|
|
961
|
+
"references": {
|
|
962
|
+
"Promise": {
|
|
963
|
+
"location": "global"
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"return": "Promise<void>"
|
|
967
|
+
},
|
|
968
|
+
"docs": {
|
|
969
|
+
"text": "",
|
|
970
|
+
"tags": []
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
"onBcmSelect": {
|
|
974
|
+
"complexType": {
|
|
975
|
+
"signature": "() => Promise<void>",
|
|
976
|
+
"parameters": [],
|
|
977
|
+
"references": {
|
|
978
|
+
"Promise": {
|
|
979
|
+
"location": "global"
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"return": "Promise<void>"
|
|
983
|
+
},
|
|
984
|
+
"docs": {
|
|
985
|
+
"text": "",
|
|
986
|
+
"tags": []
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
"set": {
|
|
990
|
+
"complexType": {
|
|
991
|
+
"signature": "(data: any) => Promise<void>",
|
|
992
|
+
"parameters": [{
|
|
993
|
+
"tags": [],
|
|
994
|
+
"text": ""
|
|
995
|
+
}],
|
|
996
|
+
"references": {
|
|
997
|
+
"Promise": {
|
|
998
|
+
"location": "global"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"return": "Promise<void>"
|
|
1002
|
+
},
|
|
1003
|
+
"docs": {
|
|
1004
|
+
"text": "",
|
|
1005
|
+
"tags": []
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
"get": {
|
|
1009
|
+
"complexType": {
|
|
1010
|
+
"signature": "() => Promise<string | number>",
|
|
1011
|
+
"parameters": [],
|
|
1012
|
+
"references": {
|
|
1013
|
+
"Promise": {
|
|
1014
|
+
"location": "global"
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
"return": "Promise<string | number>"
|
|
1018
|
+
},
|
|
1019
|
+
"docs": {
|
|
1020
|
+
"text": "",
|
|
1021
|
+
"tags": []
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"setValue": {
|
|
1025
|
+
"complexType": {
|
|
1026
|
+
"signature": "(value: any) => Promise<void>",
|
|
1027
|
+
"parameters": [{
|
|
1028
|
+
"tags": [],
|
|
1029
|
+
"text": ""
|
|
1030
|
+
}],
|
|
1031
|
+
"references": {
|
|
1032
|
+
"Promise": {
|
|
1033
|
+
"location": "global"
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
"return": "Promise<void>"
|
|
1037
|
+
},
|
|
1038
|
+
"docs": {
|
|
1039
|
+
"text": "",
|
|
1040
|
+
"tags": []
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"setClear": {
|
|
1044
|
+
"complexType": {
|
|
1045
|
+
"signature": "() => Promise<void>",
|
|
1046
|
+
"parameters": [],
|
|
1047
|
+
"references": {
|
|
1048
|
+
"Promise": {
|
|
1049
|
+
"location": "global"
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
"return": "Promise<void>"
|
|
1053
|
+
},
|
|
1054
|
+
"docs": {
|
|
1055
|
+
"text": "",
|
|
1056
|
+
"tags": []
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
"resetCaption": {
|
|
1060
|
+
"complexType": {
|
|
1061
|
+
"signature": "() => Promise<void>",
|
|
1062
|
+
"parameters": [],
|
|
1063
|
+
"references": {
|
|
1064
|
+
"Promise": {
|
|
1065
|
+
"location": "global"
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"return": "Promise<void>"
|
|
1069
|
+
},
|
|
1070
|
+
"docs": {
|
|
1071
|
+
"text": "",
|
|
1072
|
+
"tags": []
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
"setCaption": {
|
|
1076
|
+
"complexType": {
|
|
1077
|
+
"signature": "(caption?: any, captionType?: any) => Promise<void>",
|
|
1078
|
+
"parameters": [{
|
|
1079
|
+
"tags": [],
|
|
1080
|
+
"text": ""
|
|
1081
|
+
}, {
|
|
1082
|
+
"tags": [],
|
|
1083
|
+
"text": ""
|
|
1084
|
+
}],
|
|
1085
|
+
"references": {
|
|
1086
|
+
"Promise": {
|
|
1087
|
+
"location": "global"
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
"return": "Promise<void>"
|
|
1091
|
+
},
|
|
1092
|
+
"docs": {
|
|
1093
|
+
"text": "",
|
|
1094
|
+
"tags": []
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
423
1097
|
};
|
|
424
1098
|
}
|
|
1099
|
+
static get elementRef() { return "el"; }
|
|
1100
|
+
static get watchers() {
|
|
1101
|
+
return [{
|
|
1102
|
+
"propName": "value",
|
|
1103
|
+
"methodName": "watchValue"
|
|
1104
|
+
}];
|
|
1105
|
+
}
|
|
425
1106
|
}
|