@shoper/phoenix_design_system 1.2.22 → 1.3.1
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/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js +45 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/{display_input.js.map → button_stepper.js.map} +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js +86 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js +89 -54
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +18 -10
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +8 -8
- package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.d.ts +9 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js +43 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/{stepper_action_button.js.map → button_stepper.js.map} +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.d.ts +15 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.js +84 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/{display_input.js.map → display_stepper.js.map} +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.d.ts +16 -12
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js +91 -56
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.d.ts +15 -8
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +16 -9
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_types.d.ts +1 -4
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_types.js +1 -2
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_types.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/button_stepper.d.ts +8 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/button_stepper.js +32 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/button_stepper.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/display_stepper.d.ts +10 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/display_stepper.js +42 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/display_stepper.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/input_stepper.d.ts +14 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/input_stepper.js +57 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper_2/input_stepper.js.map +1 -0
- package/build/esm/packages/phoenix/src/index.d.ts +2 -2
- package/build/esm/packages/phoenix/src/index.js +2 -2
- package/package.json +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_input.js +0 -60
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js +0 -39
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js.map +0 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_input.d.ts +0 -10
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_input.js +0 -58
- package/build/esm/packages/phoenix/src/components/form/input_stepper/stepper_action_button.d.ts +0 -8
- package/build/esm/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js +0 -37
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var decorators = require('lit/decorators');
|
|
7
|
+
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
|
+
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
|
+
var btn_controller = require('../../../controllers/btn_controller/btn_controller.js');
|
|
10
|
+
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
11
|
+
|
|
12
|
+
exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this._allowedEvents = {
|
|
16
|
+
increment: input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.increment,
|
|
17
|
+
decrement: input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement
|
|
18
|
+
};
|
|
19
|
+
this.type = '';
|
|
20
|
+
this._dispatchStepperEvent = (ev) => {
|
|
21
|
+
ev.stopImmediatePropagation();
|
|
22
|
+
if (!this.type)
|
|
23
|
+
throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
|
|
24
|
+
if (!this._allowedEvents[this.type])
|
|
25
|
+
throw new Error(`The type ${this.type} is not allowed. Allowed values: 'increment', 'decrement'`);
|
|
26
|
+
this.dispatchEvent(new CustomEvent(this._allowedEvents[this.type], {
|
|
27
|
+
bubbles: true
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
this._btnController = new btn_controller.BtnController(this, this._dispatchStepperEvent);
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
this.addEventListener(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
tslib_es6.__decorate([
|
|
38
|
+
decorators.property({ type: String }),
|
|
39
|
+
tslib_es6.__metadata("design:type", Object)
|
|
40
|
+
], exports.HButtonStepper.prototype, "type", void 0);
|
|
41
|
+
exports.HButtonStepper = tslib_es6.__decorate([
|
|
42
|
+
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.button),
|
|
43
|
+
tslib_es6.__metadata("design:paramtypes", [])
|
|
44
|
+
], exports.HButtonStepper);
|
|
45
|
+
//# sourceMappingURL=button_stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var lit = require('lit');
|
|
7
|
+
var decorators = require('lit/decorators');
|
|
8
|
+
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
|
+
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
10
|
+
var observer = require('../../../core/classes/observer/observer.js');
|
|
11
|
+
var context_consumer_controller = require('../../../core/context/context_consumer_controller.js');
|
|
12
|
+
var ref_js = require('lit-html/directives/ref.js');
|
|
13
|
+
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
14
|
+
|
|
15
|
+
exports.HDisplayStepper = class HDisplayStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this._controlId = '';
|
|
19
|
+
this._inputRef = ref_js.createRef();
|
|
20
|
+
this._dispatchToggleEvent = (ev) => {
|
|
21
|
+
const $input = ev.target;
|
|
22
|
+
const digitalNumberRegExp = /^[\d]*\.?[\d]*$/;
|
|
23
|
+
const value = digitalNumberRegExp.test($input.value) ? $input.value : '0';
|
|
24
|
+
this.dispatchEvent(new CustomEvent(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.changeValue, {
|
|
25
|
+
bubbles: true,
|
|
26
|
+
detail: {
|
|
27
|
+
value: Number(value)
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
async connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
this._setupProperties();
|
|
35
|
+
this._stepperContextConsumer = new context_consumer_controller.ContextConsumerController(this);
|
|
36
|
+
this._value$ = await this._stepperContextConsumer.consumeAsync(input_stepper_constants.INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES.stepperContext);
|
|
37
|
+
this._valueObserver = new observer.Observer((value) => {
|
|
38
|
+
if (this._inputRef.value)
|
|
39
|
+
this._inputRef.value.value = String(value);
|
|
40
|
+
});
|
|
41
|
+
this._value$.subscribe(this._valueObserver);
|
|
42
|
+
this.addEventListener(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.change, this._dispatchToggleEvent);
|
|
43
|
+
this._controlId && this._inputRef.value.setAttribute('id', this._controlId);
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
super.disconnectedCallback();
|
|
47
|
+
this._value$.unsubscribe(this._valueObserver);
|
|
48
|
+
this.removeEventListener(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.change, this._dispatchToggleEvent);
|
|
49
|
+
}
|
|
50
|
+
_setupProperties() {
|
|
51
|
+
const $closestInputStepper = this.closest(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.control);
|
|
52
|
+
if (!$closestInputStepper)
|
|
53
|
+
return;
|
|
54
|
+
this._controlId = $closestInputStepper.controlId;
|
|
55
|
+
}
|
|
56
|
+
_wholeTextSelection(ev) {
|
|
57
|
+
const $input = ev.target;
|
|
58
|
+
$input.select();
|
|
59
|
+
}
|
|
60
|
+
_preventLettersAndCommaSeparatorToBeAdded(ev) {
|
|
61
|
+
const digitsDotAndBackspaceAllowedRegExp = /^[\d\b.]$/i;
|
|
62
|
+
const isAllowed = digitsDotAndBackspaceAllowedRegExp.test(ev.key);
|
|
63
|
+
if (!isAllowed && !['Enter', 'Backspace', 'ArrowRight', 'ArrowLeft'].includes(ev.key)) {
|
|
64
|
+
ev.preventDefault();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return lit.html `<input
|
|
69
|
+
${ref_js.ref(this._inputRef)}
|
|
70
|
+
class="${input_stepper_constants.INPUT_STEPPER_CLASS_NAMES.displayInput}"
|
|
71
|
+
type="text"
|
|
72
|
+
@keydown=${this._preventLettersAndCommaSeparatorToBeAdded}
|
|
73
|
+
@focus="${this._wholeTextSelection}"
|
|
74
|
+
@change="${this._dispatchToggleEvent}"
|
|
75
|
+
inputmode="numeric"
|
|
76
|
+
/>`;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
tslib_es6.__decorate([
|
|
80
|
+
decorators.state(),
|
|
81
|
+
tslib_es6.__metadata("design:type", Object)
|
|
82
|
+
], exports.HDisplayStepper.prototype, "_controlId", void 0);
|
|
83
|
+
exports.HDisplayStepper = tslib_es6.__decorate([
|
|
84
|
+
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.input)
|
|
85
|
+
], exports.HDisplayStepper);
|
|
86
|
+
//# sourceMappingURL=display_stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -3,97 +3,132 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
-
require('lit');
|
|
7
6
|
var decorators = require('lit/decorators');
|
|
8
7
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
|
+
var behavior_subject = require('../../../core/classes/behavior_subject/behavior_subject.js');
|
|
10
|
+
var context_provider_controller = require('../../../core/context/context_provider_controller.js');
|
|
10
11
|
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
11
12
|
|
|
12
13
|
exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
15
|
-
this.
|
|
16
|
+
this.controlId = '';
|
|
17
|
+
this.allowedFractionDigits = null;
|
|
18
|
+
this.value = 0;
|
|
16
19
|
this.min = -Infinity;
|
|
17
20
|
this.max = Infinity;
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
(
|
|
21
|
+
this.step = 1;
|
|
22
|
+
this.increment = () => {
|
|
23
|
+
if (this.value === this.max) {
|
|
24
|
+
this.value = this.max;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.value += this.step;
|
|
28
|
+
this._dispatchChangedValue(this.value);
|
|
21
29
|
};
|
|
22
|
-
this.
|
|
23
|
-
if (
|
|
30
|
+
this.decrement = () => {
|
|
31
|
+
if (this.value === this.min) {
|
|
32
|
+
this.value = this.min;
|
|
24
33
|
return;
|
|
25
|
-
|
|
34
|
+
}
|
|
35
|
+
this.value -= this.step;
|
|
36
|
+
this._dispatchChangedValue(this.value);
|
|
37
|
+
};
|
|
38
|
+
this.changeValue = (ev) => {
|
|
39
|
+
const value = ev.detail.value;
|
|
40
|
+
if (value >= this.max) {
|
|
41
|
+
this.value = this.max;
|
|
42
|
+
}
|
|
43
|
+
else if (value <= this.min) {
|
|
44
|
+
this.value = this.min;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.value = value;
|
|
48
|
+
}
|
|
49
|
+
this._stepperState.notify(this.value);
|
|
50
|
+
this._dispatchChangedValue(this.value);
|
|
26
51
|
};
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
52
|
+
this._dispatchChangedValue = (value) => {
|
|
53
|
+
this.dispatchEvent(new CustomEvent(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.valueChanged, {
|
|
54
|
+
bubbles: true,
|
|
55
|
+
detail: {
|
|
56
|
+
value
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
29
59
|
};
|
|
30
60
|
}
|
|
31
61
|
connectedCallback() {
|
|
32
62
|
super.connectedCallback();
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
|
|
40
|
-
this._value = this.min;
|
|
41
|
-
}
|
|
42
|
-
this._setupEvents();
|
|
63
|
+
this.addEventListener(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.increment, this.increment);
|
|
64
|
+
this.addEventListener(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement, this.decrement);
|
|
65
|
+
this.addEventListener(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.changeValue, this.changeValue);
|
|
66
|
+
this._stepperState = new behavior_subject.BehaviorSubject(this.value);
|
|
67
|
+
this._stepperContext = new context_provider_controller.ContextProviderController(this);
|
|
68
|
+
this._stepperContext.provide(input_stepper_constants.INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES.stepperContext, this._stepperState);
|
|
69
|
+
this._checkSetupAndSetEdges();
|
|
43
70
|
}
|
|
44
71
|
disconnectedCallback() {
|
|
45
72
|
super.disconnectedCallback();
|
|
46
|
-
this.
|
|
73
|
+
this.removeEventListener(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.increment, this.increment);
|
|
74
|
+
this.removeEventListener(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement, this.decrement);
|
|
75
|
+
this.removeEventListener(input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.changeValue, this.changeValue);
|
|
47
76
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
this.
|
|
53
|
-
|
|
77
|
+
_checkSetupAndSetEdges() {
|
|
78
|
+
if (this.value < this.min)
|
|
79
|
+
this.value = this.min;
|
|
80
|
+
if (this.value > this.max)
|
|
81
|
+
this.value = this.max;
|
|
82
|
+
this._stepperState.notify(this.value);
|
|
54
83
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
84
|
+
_calculateFractionDigitsByStepSize(step) {
|
|
85
|
+
let zerosCount = 0;
|
|
86
|
+
const stepString = String(step);
|
|
87
|
+
if (stepString.includes('.'))
|
|
88
|
+
zerosCount = stepString.split('.')[1].length;
|
|
89
|
+
return zerosCount;
|
|
59
90
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this._value += this.step;
|
|
91
|
+
_roundToFractionDigits(fractionsDigits, number) {
|
|
92
|
+
const multiplier = Math.pow(10, fractionsDigits);
|
|
93
|
+
return Math.round(Number(number) * multiplier) / multiplier;
|
|
64
94
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return;
|
|
68
|
-
this._value -= this.step;
|
|
95
|
+
_outsideRangeEdges(number) {
|
|
96
|
+
return number > this.max || number < this.min;
|
|
69
97
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
this.dispatchEvent(valueChangeEvent);
|
|
98
|
+
updated() {
|
|
99
|
+
var _a;
|
|
100
|
+
if (this._outsideRangeEdges(this.value))
|
|
101
|
+
return;
|
|
102
|
+
const digits = (_a = this.allowedFractionDigits) !== null && _a !== void 0 ? _a : this._calculateFractionDigitsByStepSize(this.step);
|
|
103
|
+
this.value = this._roundToFractionDigits(digits, this.value);
|
|
104
|
+
this._stepperState.notify(this.value);
|
|
78
105
|
}
|
|
79
106
|
};
|
|
80
107
|
tslib_es6.__decorate([
|
|
81
|
-
decorators.property({ type:
|
|
108
|
+
decorators.property({ type: String, attribute: 'control-id' }),
|
|
109
|
+
tslib_es6.__metadata("design:type", String)
|
|
110
|
+
], exports.HInputStepper.prototype, "controlId", void 0);
|
|
111
|
+
tslib_es6.__decorate([
|
|
112
|
+
decorators.property({ type: Number, attribute: 'allowed-number-of-fraction-digits' }),
|
|
113
|
+
tslib_es6.__metadata("design:type", Object)
|
|
114
|
+
], exports.HInputStepper.prototype, "allowedFractionDigits", void 0);
|
|
115
|
+
tslib_es6.__decorate([
|
|
116
|
+
decorators.property({ type: Number, reflect: true }),
|
|
82
117
|
tslib_es6.__metadata("design:type", Number)
|
|
83
|
-
], exports.HInputStepper.prototype, "
|
|
118
|
+
], exports.HInputStepper.prototype, "value", void 0);
|
|
84
119
|
tslib_es6.__decorate([
|
|
85
|
-
decorators.property({ type: Number,
|
|
120
|
+
decorators.property({ type: Number, reflect: true }),
|
|
86
121
|
tslib_es6.__metadata("design:type", Number)
|
|
87
122
|
], exports.HInputStepper.prototype, "min", void 0);
|
|
88
123
|
tslib_es6.__decorate([
|
|
89
|
-
decorators.property({ type: Number,
|
|
124
|
+
decorators.property({ type: Number, reflect: true }),
|
|
90
125
|
tslib_es6.__metadata("design:type", Number)
|
|
91
126
|
], exports.HInputStepper.prototype, "max", void 0);
|
|
92
127
|
tslib_es6.__decorate([
|
|
93
|
-
decorators.
|
|
128
|
+
decorators.property({ type: Number, reflect: true }),
|
|
94
129
|
tslib_es6.__metadata("design:type", Number)
|
|
95
|
-
], exports.HInputStepper.prototype, "
|
|
130
|
+
], exports.HInputStepper.prototype, "step", void 0);
|
|
96
131
|
exports.HInputStepper = tslib_es6.__decorate([
|
|
97
|
-
phoenix_custom_element.phoenixCustomElement(
|
|
132
|
+
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.control)
|
|
98
133
|
], exports.HInputStepper);
|
|
99
134
|
//# sourceMappingURL=input_stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js
CHANGED
|
@@ -3,22 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const INPUT_STEPPER_EVENT_NAMES = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
click: 'click',
|
|
7
|
+
change: 'change'
|
|
8
8
|
};
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
decrement: 'decrement'
|
|
9
|
+
const INPUT_STEPPER_CUSTOM_EVENT_NAMES = {
|
|
10
|
+
valueChanged: 'inputStepper.valueChanged',
|
|
11
|
+
changeValue: 'inputStepper.changeValue',
|
|
12
|
+
increment: 'inputStepper.increment',
|
|
13
|
+
decrement: 'inputStepper.decrement'
|
|
15
14
|
};
|
|
16
15
|
const INPUT_STEPPER_CLASS_NAMES = {
|
|
17
16
|
displayInput: 'input-stepper__value_input'
|
|
17
|
+
};
|
|
18
|
+
const INPUT_STEPPER_COMPONENT_NAMES = {
|
|
19
|
+
control: 'h-input-stepper',
|
|
20
|
+
input: 'h-display-stepper',
|
|
21
|
+
button: 'h-button-stepper'
|
|
22
|
+
};
|
|
23
|
+
const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = {
|
|
24
|
+
stepperContext: 'stepperContext'
|
|
18
25
|
};
|
|
19
26
|
|
|
20
|
-
exports.DISPLAY_INPUT_EVENT_NAMES = DISPLAY_INPUT_EVENT_NAMES;
|
|
21
|
-
exports.INPUT_STEPPER_ACTION_TYPES = INPUT_STEPPER_ACTION_TYPES;
|
|
22
27
|
exports.INPUT_STEPPER_CLASS_NAMES = INPUT_STEPPER_CLASS_NAMES;
|
|
28
|
+
exports.INPUT_STEPPER_COMPONENT_NAMES = INPUT_STEPPER_COMPONENT_NAMES;
|
|
29
|
+
exports.INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES;
|
|
30
|
+
exports.INPUT_STEPPER_CUSTOM_EVENT_NAMES = INPUT_STEPPER_CUSTOM_EVENT_NAMES;
|
|
23
31
|
exports.INPUT_STEPPER_EVENT_NAMES = INPUT_STEPPER_EVENT_NAMES;
|
|
24
32
|
//# sourceMappingURL=input_stepper_constants.js.map
|
package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -87,9 +87,9 @@ var tooltip = require('./components/messages/tooltips/tooltip.js');
|
|
|
87
87
|
var tooltip_content = require('./components/messages/tooltips/tooltip_content.js');
|
|
88
88
|
var tag = require('./components/tag/tag.js');
|
|
89
89
|
var tag_remove_button = require('./components/tag/tag_remove_button.js');
|
|
90
|
-
var stepper_action_button = require('./components/form/input_stepper/stepper_action_button.js');
|
|
91
90
|
var input_stepper = require('./components/form/input_stepper/input_stepper.js');
|
|
92
|
-
var
|
|
91
|
+
var display_stepper = require('./components/form/input_stepper/display_stepper.js');
|
|
92
|
+
var button_stepper = require('./components/form/input_stepper/button_stepper.js');
|
|
93
93
|
var toggle_constants = require('./components/toggle/toggle_constants.js');
|
|
94
94
|
var toggle = require('./components/toggle/toggle.js');
|
|
95
95
|
var toggle_button$1 = require('./components/toggle/toggle_button.js');
|
|
@@ -516,22 +516,22 @@ Object.defineProperty(exports, 'HTagRemoveButton', {
|
|
|
516
516
|
return tag_remove_button.HTagRemoveButton;
|
|
517
517
|
}
|
|
518
518
|
});
|
|
519
|
-
Object.defineProperty(exports, '
|
|
519
|
+
Object.defineProperty(exports, 'HInputStepper', {
|
|
520
520
|
enumerable: true,
|
|
521
521
|
get: function () {
|
|
522
|
-
return
|
|
522
|
+
return input_stepper.HInputStepper;
|
|
523
523
|
}
|
|
524
524
|
});
|
|
525
|
-
Object.defineProperty(exports, '
|
|
525
|
+
Object.defineProperty(exports, 'HDisplayStepper', {
|
|
526
526
|
enumerable: true,
|
|
527
527
|
get: function () {
|
|
528
|
-
return
|
|
528
|
+
return display_stepper.HDisplayStepper;
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
|
-
Object.defineProperty(exports, '
|
|
531
|
+
Object.defineProperty(exports, 'HButtonStepper', {
|
|
532
532
|
enumerable: true,
|
|
533
533
|
get: function () {
|
|
534
|
-
return
|
|
534
|
+
return button_stepper.HButtonStepper;
|
|
535
535
|
}
|
|
536
536
|
});
|
|
537
537
|
exports.TOGGLE_ACTIONS = toggle_constants.TOGGLE_ACTIONS;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HButtonStepper extends PhoenixLightLitElement {
|
|
3
|
+
private _btnController;
|
|
4
|
+
private _allowedEvents;
|
|
5
|
+
type: string;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
private _dispatchStepperEvent;
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { property } from 'lit/decorators';
|
|
3
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
|
+
import { BtnController } from '../../../controllers/btn_controller/btn_controller.js';
|
|
6
|
+
import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
|
|
7
|
+
|
|
8
|
+
let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this._allowedEvents = {
|
|
12
|
+
increment: INPUT_STEPPER_CUSTOM_EVENT_NAMES.increment,
|
|
13
|
+
decrement: INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement
|
|
14
|
+
};
|
|
15
|
+
this.type = '';
|
|
16
|
+
this._dispatchStepperEvent = (ev) => {
|
|
17
|
+
ev.stopImmediatePropagation();
|
|
18
|
+
if (!this.type)
|
|
19
|
+
throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
|
|
20
|
+
if (!this._allowedEvents[this.type])
|
|
21
|
+
throw new Error(`The type ${this.type} is not allowed. Allowed values: 'increment', 'decrement'`);
|
|
22
|
+
this.dispatchEvent(new CustomEvent(this._allowedEvents[this.type], {
|
|
23
|
+
bubbles: true
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
this._btnController = new BtnController(this, this._dispatchStepperEvent);
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
super.connectedCallback();
|
|
30
|
+
this.addEventListener(INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__decorate([
|
|
34
|
+
property({ type: String }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], HButtonStepper.prototype, "type", void 0);
|
|
37
|
+
HButtonStepper = __decorate([
|
|
38
|
+
phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.button),
|
|
39
|
+
__metadata("design:paramtypes", [])
|
|
40
|
+
], HButtonStepper);
|
|
41
|
+
|
|
42
|
+
export { HButtonStepper };
|
|
43
|
+
//# sourceMappingURL=button_stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HDisplayStepper extends PhoenixLightLitElement {
|
|
3
|
+
private _controlId;
|
|
4
|
+
private _stepperContextConsumer;
|
|
5
|
+
private _value$;
|
|
6
|
+
private _valueObserver;
|
|
7
|
+
private _inputRef;
|
|
8
|
+
connectedCallback(): Promise<void>;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
private _dispatchToggleEvent;
|
|
11
|
+
private _setupProperties;
|
|
12
|
+
private _wholeTextSelection;
|
|
13
|
+
private _preventLettersAndCommaSeparatorToBeAdded;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { state } from 'lit/decorators';
|
|
4
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
|
+
import { Observer } from '../../../core/classes/observer/observer.js';
|
|
7
|
+
import { ContextConsumerController } from '../../../core/context/context_consumer_controller.js';
|
|
8
|
+
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
9
|
+
import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_COMPONENT_NAMES, INPUT_STEPPER_CLASS_NAMES } from './input_stepper_constants.js';
|
|
10
|
+
|
|
11
|
+
let HDisplayStepper = class HDisplayStepper extends PhoenixLightLitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this._controlId = '';
|
|
15
|
+
this._inputRef = createRef();
|
|
16
|
+
this._dispatchToggleEvent = (ev) => {
|
|
17
|
+
const $input = ev.target;
|
|
18
|
+
const digitalNumberRegExp = /^[\d]*\.?[\d]*$/;
|
|
19
|
+
const value = digitalNumberRegExp.test($input.value) ? $input.value : '0';
|
|
20
|
+
this.dispatchEvent(new CustomEvent(INPUT_STEPPER_CUSTOM_EVENT_NAMES.changeValue, {
|
|
21
|
+
bubbles: true,
|
|
22
|
+
detail: {
|
|
23
|
+
value: Number(value)
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
async connectedCallback() {
|
|
29
|
+
super.connectedCallback();
|
|
30
|
+
this._setupProperties();
|
|
31
|
+
this._stepperContextConsumer = new ContextConsumerController(this);
|
|
32
|
+
this._value$ = await this._stepperContextConsumer.consumeAsync(INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES.stepperContext);
|
|
33
|
+
this._valueObserver = new Observer((value) => {
|
|
34
|
+
if (this._inputRef.value)
|
|
35
|
+
this._inputRef.value.value = String(value);
|
|
36
|
+
});
|
|
37
|
+
this._value$.subscribe(this._valueObserver);
|
|
38
|
+
this.addEventListener(INPUT_STEPPER_EVENT_NAMES.change, this._dispatchToggleEvent);
|
|
39
|
+
this._controlId && this._inputRef.value.setAttribute('id', this._controlId);
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
super.disconnectedCallback();
|
|
43
|
+
this._value$.unsubscribe(this._valueObserver);
|
|
44
|
+
this.removeEventListener(INPUT_STEPPER_EVENT_NAMES.change, this._dispatchToggleEvent);
|
|
45
|
+
}
|
|
46
|
+
_setupProperties() {
|
|
47
|
+
const $closestInputStepper = this.closest(INPUT_STEPPER_COMPONENT_NAMES.control);
|
|
48
|
+
if (!$closestInputStepper)
|
|
49
|
+
return;
|
|
50
|
+
this._controlId = $closestInputStepper.controlId;
|
|
51
|
+
}
|
|
52
|
+
_wholeTextSelection(ev) {
|
|
53
|
+
const $input = ev.target;
|
|
54
|
+
$input.select();
|
|
55
|
+
}
|
|
56
|
+
_preventLettersAndCommaSeparatorToBeAdded(ev) {
|
|
57
|
+
const digitsDotAndBackspaceAllowedRegExp = /^[\d\b.]$/i;
|
|
58
|
+
const isAllowed = digitsDotAndBackspaceAllowedRegExp.test(ev.key);
|
|
59
|
+
if (!isAllowed && !['Enter', 'Backspace', 'ArrowRight', 'ArrowLeft'].includes(ev.key)) {
|
|
60
|
+
ev.preventDefault();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return html `<input
|
|
65
|
+
${ref(this._inputRef)}
|
|
66
|
+
class="${INPUT_STEPPER_CLASS_NAMES.displayInput}"
|
|
67
|
+
type="text"
|
|
68
|
+
@keydown=${this._preventLettersAndCommaSeparatorToBeAdded}
|
|
69
|
+
@focus="${this._wholeTextSelection}"
|
|
70
|
+
@change="${this._dispatchToggleEvent}"
|
|
71
|
+
inputmode="numeric"
|
|
72
|
+
/>`;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
__decorate([
|
|
76
|
+
state(),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], HDisplayStepper.prototype, "_controlId", void 0);
|
|
79
|
+
HDisplayStepper = __decorate([
|
|
80
|
+
phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.input)
|
|
81
|
+
], HDisplayStepper);
|
|
82
|
+
|
|
83
|
+
export { HDisplayStepper };
|
|
84
|
+
//# sourceMappingURL=display_stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
-
import {
|
|
2
|
+
import { TInputStepperChangeEvent } from './input_stepper_types';
|
|
3
3
|
export declare class HInputStepper extends PhoenixLightLitElement {
|
|
4
|
-
|
|
4
|
+
private _stepperState;
|
|
5
|
+
private _stepperContext;
|
|
6
|
+
controlId: string;
|
|
7
|
+
allowedFractionDigits: number | null;
|
|
8
|
+
value: number;
|
|
5
9
|
min: number;
|
|
6
10
|
max: number;
|
|
7
|
-
|
|
8
|
-
private _$inputElement;
|
|
11
|
+
step: number;
|
|
9
12
|
connectedCallback(): void;
|
|
10
13
|
disconnectedCallback(): void;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
14
|
+
increment: () => void;
|
|
15
|
+
decrement: () => void;
|
|
16
|
+
changeValue: (ev: CustomEvent<TInputStepperChangeEvent>) => void;
|
|
17
|
+
private _checkSetupAndSetEdges;
|
|
18
|
+
private _calculateFractionDigitsByStepSize;
|
|
19
|
+
private _roundToFractionDigits;
|
|
20
|
+
private _outsideRangeEdges;
|
|
21
|
+
private _dispatchChangedValue;
|
|
22
|
+
updated(): void;
|
|
19
23
|
}
|