@shoper/phoenix_design_system 1.18.39 → 1.18.41-0
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/accordion/accordion_content.js +45 -15
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js +3 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js +17 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/button_stepper.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js +11 -2
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_stepper.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js +24 -3
- 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 +6 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +1 -5
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/slider/slider.js +11 -50
- package/build/cjs/packages/phoenix/src/components/slider/slider.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.d.ts +3 -0
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js +45 -15
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js +3 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/controllers/props_synchronizing/control_props_sync_controller_types.d.ts +2 -2
- package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.d.ts +3 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js +17 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/button_stepper.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.d.ts +2 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.js +12 -3
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_stepper.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.d.ts +4 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js +25 -4
- 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 +4 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +6 -2
- 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/radio/radio.js +1 -5
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/slider/slider.d.ts +0 -3
- package/build/esm/packages/phoenix/src/components/slider/slider.js +11 -50
- package/build/esm/packages/phoenix/src/components/slider/slider.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,10 +19,12 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
|
|
|
19
19
|
super();
|
|
20
20
|
this.transitionName = 'accordion-toggle';
|
|
21
21
|
this.isDevAccordionOptimizationFlagEnabled = false;
|
|
22
|
+
this.isDevAccordionSafariFlashFixEnabled = false;
|
|
22
23
|
this._resizeObserver = null;
|
|
23
24
|
this._isTransitioning = false;
|
|
24
25
|
this._resizeDebounceTimer = null;
|
|
25
26
|
this._mutationDebounceTimer = null;
|
|
27
|
+
this._lastViewportWidth = window.innerWidth;
|
|
26
28
|
this._mutationObserver = null;
|
|
27
29
|
this._handleResizeObserver = () => {
|
|
28
30
|
if (this._isTransitioning || this.hidden || this.style.height === '0px')
|
|
@@ -36,26 +38,47 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
|
|
|
36
38
|
this.style.display = previousDisplay;
|
|
37
39
|
};
|
|
38
40
|
this._handleResize = () => {
|
|
41
|
+
if (this.isDevAccordionSafariFlashFixEnabled) {
|
|
42
|
+
if (this._isIosViewportHeightOnlyResize())
|
|
43
|
+
return;
|
|
44
|
+
this._lastViewportWidth = window.innerWidth;
|
|
45
|
+
}
|
|
39
46
|
if (this._resizeDebounceTimer !== null) {
|
|
40
|
-
|
|
47
|
+
const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
|
|
48
|
+
clearMethod(this._resizeDebounceTimer);
|
|
49
|
+
}
|
|
50
|
+
if (this.isDevAccordionSafariFlashFixEnabled) {
|
|
51
|
+
this._resizeDebounceTimer = window.setTimeout(this._setStylingOptions, RESIZE_DEBOUNCE_MS);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this._resizeDebounceTimer = requestAnimationFrame(() => {
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
this._setStylingOptions();
|
|
57
|
+
}, RESIZE_DEBOUNCE_MS);
|
|
58
|
+
});
|
|
41
59
|
}
|
|
42
|
-
this._resizeDebounceTimer = window.requestAnimationFrame(() => {
|
|
43
|
-
setTimeout(() => {
|
|
44
|
-
this._setStylingOptions();
|
|
45
|
-
}, RESIZE_DEBOUNCE_MS);
|
|
46
|
-
});
|
|
47
60
|
};
|
|
48
61
|
this._setStylingOptions = () => {
|
|
49
|
-
|
|
62
|
+
if (this.isDevAccordionSafariFlashFixEnabled) {
|
|
50
63
|
const previousDisplay = this.style.display;
|
|
51
64
|
this.style.setProperty('display', 'block', 'important');
|
|
52
65
|
this.style.height = 'auto';
|
|
66
|
+
this._setOriginalHeightValue(this.getBoundingClientRect().height);
|
|
67
|
+
this.style.display = previousDisplay;
|
|
68
|
+
this.style.height = this.hidden ? '0px' : this._originalHeight;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
53
71
|
requestAnimationFrame(() => {
|
|
54
|
-
this.
|
|
55
|
-
this.style.display
|
|
56
|
-
this.style.height =
|
|
72
|
+
const previousDisplay = this.style.display;
|
|
73
|
+
this.style.setProperty('display', 'block', 'important');
|
|
74
|
+
this.style.height = 'auto';
|
|
75
|
+
requestAnimationFrame(() => {
|
|
76
|
+
this._setOriginalHeightValue(this.getBoundingClientRect().height);
|
|
77
|
+
this.style.display = previousDisplay;
|
|
78
|
+
this.style.height = this.hidden ? '0px' : this._originalHeight;
|
|
79
|
+
});
|
|
57
80
|
});
|
|
58
|
-
}
|
|
81
|
+
}
|
|
59
82
|
};
|
|
60
83
|
this._setOriginalHeightValue = (height) => {
|
|
61
84
|
if (height !== 0 || this.children.length === 0) {
|
|
@@ -64,7 +87,7 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
|
|
|
64
87
|
};
|
|
65
88
|
this._handleMutation = () => {
|
|
66
89
|
if (this._mutationDebounceTimer !== null) {
|
|
67
|
-
|
|
90
|
+
clearTimeout(this._mutationDebounceTimer);
|
|
68
91
|
}
|
|
69
92
|
this._mutationDebounceTimer = window.setTimeout(() => {
|
|
70
93
|
requestAnimationFrame(() => {
|
|
@@ -148,6 +171,9 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
|
|
|
148
171
|
this._setStylingOptions();
|
|
149
172
|
}
|
|
150
173
|
}
|
|
174
|
+
_isIosViewportHeightOnlyResize() {
|
|
175
|
+
return window.innerWidth === this._lastViewportWidth;
|
|
176
|
+
}
|
|
151
177
|
_setupImageLoadListeners() {
|
|
152
178
|
const images = this.querySelectorAll('img');
|
|
153
179
|
images.forEach((img) => {
|
|
@@ -208,10 +234,11 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
|
|
|
208
234
|
(_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
209
235
|
window.removeEventListener('resize', this._handleResize);
|
|
210
236
|
if (this._resizeDebounceTimer !== null) {
|
|
211
|
-
|
|
237
|
+
const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
|
|
238
|
+
clearMethod(this._resizeDebounceTimer);
|
|
212
239
|
}
|
|
213
240
|
if (this._mutationDebounceTimer !== null) {
|
|
214
|
-
|
|
241
|
+
clearTimeout(this._mutationDebounceTimer);
|
|
215
242
|
}
|
|
216
243
|
}
|
|
217
244
|
const images = this.querySelectorAll('img');
|
|
@@ -219,7 +246,6 @@ exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_el
|
|
|
219
246
|
img.removeEventListener('load', this._boundHandleImageLoad);
|
|
220
247
|
img.removeEventListener('error', this._boundHandleImageLoad);
|
|
221
248
|
});
|
|
222
|
-
window.removeEventListener('resize', this._handleResize);
|
|
223
249
|
this.removeEventListener('transitionend', this._boundHandleTransitionEnd);
|
|
224
250
|
}
|
|
225
251
|
};
|
|
@@ -231,6 +257,10 @@ tslib_es6.__decorate([
|
|
|
231
257
|
decorators.property({ type: Boolean, attribute: 'is-dev-accordion-optimization-flag-enabled' }),
|
|
232
258
|
tslib_es6.__metadata("design:type", Boolean)
|
|
233
259
|
], exports.HAccordionContent.prototype, "isDevAccordionOptimizationFlagEnabled", void 0);
|
|
260
|
+
tslib_es6.__decorate([
|
|
261
|
+
decorators.property({ type: Boolean, attribute: 'is-dev-accordion-safari-flash-fix-enabled' }),
|
|
262
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
263
|
+
], exports.HAccordionContent.prototype, "isDevAccordionSafariFlashFixEnabled", void 0);
|
|
234
264
|
exports.HAccordionContent = tslib_es6.__decorate([
|
|
235
265
|
phoenix_custom_element.phoenixCustomElement('h-accordion-content'),
|
|
236
266
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -52,7 +52,9 @@ exports.HAccordionGroup = class HAccordionGroup extends phoenix_light_lit_elemen
|
|
|
52
52
|
this._accordionProps.subscribe(this._accordionPropsObserver);
|
|
53
53
|
}
|
|
54
54
|
disconnectedCallback() {
|
|
55
|
-
|
|
55
|
+
var _a;
|
|
56
|
+
super.disconnectedCallback();
|
|
57
|
+
(_a = this._accordionProps) === null || _a === void 0 ? void 0 : _a.unsubscribe(this._accordionPropsObserver);
|
|
56
58
|
this.removeEventListener(accordion_constants.ACCORDION_EVENTS.toggle, this._accordionToggle);
|
|
57
59
|
}
|
|
58
60
|
show() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,10 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
require('lit');
|
|
6
7
|
var decorators = require('lit/decorators');
|
|
8
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
7
9
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
10
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
11
|
var btn_controller = require('../../../controllers/btn_controller/btn_controller.js');
|
|
12
|
+
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
10
13
|
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
11
14
|
|
|
12
15
|
exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -17,8 +20,11 @@ exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.
|
|
|
17
20
|
decrement: input_stepper_constants.INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement
|
|
18
21
|
};
|
|
19
22
|
this.type = '';
|
|
23
|
+
this.disabled = false;
|
|
20
24
|
this._dispatchStepperEvent = (ev) => {
|
|
21
25
|
ev.stopImmediatePropagation();
|
|
26
|
+
if (this.disabled)
|
|
27
|
+
return;
|
|
22
28
|
if (!this.type)
|
|
23
29
|
throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
|
|
24
30
|
if (!this._allowedEvents[this.type])
|
|
@@ -26,16 +32,27 @@ exports.HButtonStepper = class HButtonStepper extends phoenix_light_lit_element.
|
|
|
26
32
|
this.emitCustomEvent(this._allowedEvents[this.type]);
|
|
27
33
|
};
|
|
28
34
|
this._btnController = new btn_controller.BtnController(this, this._dispatchStepperEvent);
|
|
35
|
+
new control_props_sync_consumer_controller.ControlPropsSyncConsumerController({ host: this });
|
|
29
36
|
}
|
|
30
37
|
connectedCallback() {
|
|
31
38
|
super.connectedCallback();
|
|
32
39
|
this.addEventListener(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
|
|
33
40
|
}
|
|
41
|
+
updated(changedProperties) {
|
|
42
|
+
if (!changedProperties.has('disabled'))
|
|
43
|
+
return;
|
|
44
|
+
this.setAttribute('aria-disabled', String(this.disabled));
|
|
45
|
+
this.disabled ? utilities.UiDomUtils.makeUnnavigable(this) : utilities.UiDomUtils.makeNavigable(this);
|
|
46
|
+
}
|
|
34
47
|
};
|
|
35
48
|
tslib_es6.__decorate([
|
|
36
49
|
decorators.property({ type: String }),
|
|
37
50
|
tslib_es6.__metadata("design:type", Object)
|
|
38
51
|
], exports.HButtonStepper.prototype, "type", void 0);
|
|
52
|
+
tslib_es6.__decorate([
|
|
53
|
+
decorators.property({ type: Boolean, reflect: true }),
|
|
54
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
55
|
+
], exports.HButtonStepper.prototype, "disabled", void 0);
|
|
39
56
|
exports.HButtonStepper = tslib_es6.__decorate([
|
|
40
57
|
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.button),
|
|
41
58
|
tslib_es6.__metadata("design:paramtypes", [])
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -10,12 +10,14 @@ var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_el
|
|
|
10
10
|
var observer = require('../../../core/classes/observer/observer.js');
|
|
11
11
|
var context_consumer_controller = require('../../../core/context/context_consumer_controller.js');
|
|
12
12
|
var ref_js = require('lit-html/directives/ref.js');
|
|
13
|
+
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
13
14
|
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
14
15
|
|
|
15
16
|
exports.HDisplayStepper = class HDisplayStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
16
17
|
constructor() {
|
|
17
|
-
super(
|
|
18
|
+
super();
|
|
18
19
|
this._controlId = '';
|
|
20
|
+
this.disabled = false;
|
|
19
21
|
this._inputRef = ref_js.createRef();
|
|
20
22
|
this._dispatchToggleEvent = (ev) => {
|
|
21
23
|
const $input = ev.target;
|
|
@@ -28,6 +30,7 @@ exports.HDisplayStepper = class HDisplayStepper extends phoenix_light_lit_elemen
|
|
|
28
30
|
}
|
|
29
31
|
});
|
|
30
32
|
};
|
|
33
|
+
new control_props_sync_consumer_controller.ControlPropsSyncConsumerController({ host: this });
|
|
31
34
|
}
|
|
32
35
|
async connectedCallback() {
|
|
33
36
|
super.connectedCallback();
|
|
@@ -75,6 +78,7 @@ exports.HDisplayStepper = class HDisplayStepper extends phoenix_light_lit_elemen
|
|
|
75
78
|
@change="${this._dispatchToggleEvent}"
|
|
76
79
|
inputmode="decimal"
|
|
77
80
|
aria-label="${this.ariaLabel}"
|
|
81
|
+
?disabled="${this.disabled}"
|
|
78
82
|
/>`;
|
|
79
83
|
}
|
|
80
84
|
};
|
|
@@ -82,7 +86,12 @@ tslib_es6.__decorate([
|
|
|
82
86
|
decorators.state(),
|
|
83
87
|
tslib_es6.__metadata("design:type", Object)
|
|
84
88
|
], exports.HDisplayStepper.prototype, "_controlId", void 0);
|
|
89
|
+
tslib_es6.__decorate([
|
|
90
|
+
decorators.property({ type: Boolean, reflect: true }),
|
|
91
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
92
|
+
], exports.HDisplayStepper.prototype, "disabled", void 0);
|
|
85
93
|
exports.HDisplayStepper = tslib_es6.__decorate([
|
|
86
|
-
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.input)
|
|
94
|
+
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.input),
|
|
95
|
+
tslib_es6.__metadata("design:paramtypes", [])
|
|
87
96
|
], exports.HDisplayStepper);
|
|
88
97
|
//# sourceMappingURL=display_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;"}
|
|
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;"}
|
|
@@ -3,16 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
require('lit');
|
|
6
7
|
var decorators = require('lit/decorators');
|
|
7
8
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
9
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
10
|
var behavior_subject = require('../../../core/classes/behavior_subject/behavior_subject.js');
|
|
10
11
|
var context_provider_controller = require('../../../core/context/context_provider_controller.js');
|
|
12
|
+
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
13
|
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
12
14
|
|
|
13
15
|
exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
14
16
|
constructor() {
|
|
15
|
-
super(
|
|
17
|
+
super();
|
|
16
18
|
this.controlId = '';
|
|
17
19
|
this.allowedFractionDigits = null;
|
|
18
20
|
this.roundTo = 0;
|
|
@@ -20,7 +22,10 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
|
|
|
20
22
|
this.min = -Infinity;
|
|
21
23
|
this.max = Infinity;
|
|
22
24
|
this.step = 1;
|
|
25
|
+
this.disabled = false;
|
|
23
26
|
this.increment = () => {
|
|
27
|
+
if (this.disabled)
|
|
28
|
+
return;
|
|
24
29
|
if (this.value === this.max) {
|
|
25
30
|
this.value = this.max;
|
|
26
31
|
return;
|
|
@@ -29,6 +34,8 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
|
|
|
29
34
|
this._dispatchChangedValue(this.value);
|
|
30
35
|
};
|
|
31
36
|
this.decrement = () => {
|
|
37
|
+
if (this.disabled)
|
|
38
|
+
return;
|
|
32
39
|
if (this.value === this.min) {
|
|
33
40
|
this.value = this.min;
|
|
34
41
|
return;
|
|
@@ -37,6 +44,8 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
|
|
|
37
44
|
this._dispatchChangedValue(this.value);
|
|
38
45
|
};
|
|
39
46
|
this.changeValue = (ev) => {
|
|
47
|
+
if (this.disabled)
|
|
48
|
+
return;
|
|
40
49
|
const value = ev.detail.value;
|
|
41
50
|
this.setValue(value);
|
|
42
51
|
this._dispatchChangedValue(this.value);
|
|
@@ -69,6 +78,10 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
|
|
|
69
78
|
detail: { value }
|
|
70
79
|
});
|
|
71
80
|
};
|
|
81
|
+
new control_props_sync_provider_controller.ControlPropsSyncProviderController({
|
|
82
|
+
host: this,
|
|
83
|
+
propsToSync: [input_stepper_constants.INPUT_STEPPER_PROPS_TO_SYNC.disabled]
|
|
84
|
+
});
|
|
72
85
|
}
|
|
73
86
|
connectedCallback() {
|
|
74
87
|
super.connectedCallback();
|
|
@@ -107,8 +120,11 @@ exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.Ph
|
|
|
107
120
|
_outsideRangeEdges(number) {
|
|
108
121
|
return number > this.max || number < this.min;
|
|
109
122
|
}
|
|
110
|
-
updated() {
|
|
123
|
+
updated(changedProperties) {
|
|
111
124
|
var _a;
|
|
125
|
+
if (changedProperties.has('disabled')) {
|
|
126
|
+
this.classList.toggle(input_stepper_constants.INPUT_STEPPER_CLASS_NAMES.inputStepperDisabled, this.disabled);
|
|
127
|
+
}
|
|
112
128
|
if (this._outsideRangeEdges(this.value))
|
|
113
129
|
return;
|
|
114
130
|
const digits = (_a = this.allowedFractionDigits) !== null && _a !== void 0 ? _a : this._calculateFractionDigitsByStepSize(this.step);
|
|
@@ -144,7 +160,12 @@ tslib_es6.__decorate([
|
|
|
144
160
|
decorators.property({ type: Number, reflect: true }),
|
|
145
161
|
tslib_es6.__metadata("design:type", Number)
|
|
146
162
|
], exports.HInputStepper.prototype, "step", void 0);
|
|
163
|
+
tslib_es6.__decorate([
|
|
164
|
+
decorators.property({ type: Boolean, reflect: true }),
|
|
165
|
+
tslib_es6.__metadata("design:type", Boolean)
|
|
166
|
+
], exports.HInputStepper.prototype, "disabled", void 0);
|
|
147
167
|
exports.HInputStepper = tslib_es6.__decorate([
|
|
148
|
-
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.control)
|
|
168
|
+
phoenix_custom_element.phoenixCustomElement(input_stepper_constants.INPUT_STEPPER_COMPONENT_NAMES.control),
|
|
169
|
+
tslib_es6.__metadata("design:paramtypes", [])
|
|
149
170
|
], exports.HInputStepper);
|
|
150
171
|
//# 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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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
|
@@ -13,7 +13,8 @@ const INPUT_STEPPER_CUSTOM_EVENT_NAMES = {
|
|
|
13
13
|
decrement: 'decrement'
|
|
14
14
|
};
|
|
15
15
|
const INPUT_STEPPER_CLASS_NAMES = {
|
|
16
|
-
displayInput: 'input-stepper__value_input'
|
|
16
|
+
displayInput: 'input-stepper__value_input',
|
|
17
|
+
inputStepperDisabled: 'input-stepper_disabled'
|
|
17
18
|
};
|
|
18
19
|
const INPUT_STEPPER_COMPONENT_NAMES = {
|
|
19
20
|
control: 'h-input-stepper',
|
|
@@ -22,6 +23,9 @@ const INPUT_STEPPER_COMPONENT_NAMES = {
|
|
|
22
23
|
};
|
|
23
24
|
const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = {
|
|
24
25
|
stepperContext: 'stepperContext'
|
|
26
|
+
};
|
|
27
|
+
const INPUT_STEPPER_PROPS_TO_SYNC = {
|
|
28
|
+
disabled: 'disabled'
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
exports.INPUT_STEPPER_CLASS_NAMES = INPUT_STEPPER_CLASS_NAMES;
|
|
@@ -29,4 +33,5 @@ exports.INPUT_STEPPER_COMPONENT_NAMES = INPUT_STEPPER_COMPONENT_NAMES;
|
|
|
29
33
|
exports.INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES;
|
|
30
34
|
exports.INPUT_STEPPER_CUSTOM_EVENT_NAMES = INPUT_STEPPER_CUSTOM_EVENT_NAMES;
|
|
31
35
|
exports.INPUT_STEPPER_EVENT_NAMES = INPUT_STEPPER_EVENT_NAMES;
|
|
36
|
+
exports.INPUT_STEPPER_PROPS_TO_SYNC = INPUT_STEPPER_PROPS_TO_SYNC;
|
|
32
37
|
//# 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;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;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -30,11 +30,7 @@ exports.HRadio = class HRadio extends phoenix_light_lit_element.PhoenixLightLitE
|
|
|
30
30
|
this._updateCssClassesBasedOnProps();
|
|
31
31
|
}
|
|
32
32
|
_updateCssClassesBasedOnProps() {
|
|
33
|
-
const classes = [
|
|
34
|
-
radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled,
|
|
35
|
-
radio_constants.RADIO_CONTROL_CSS_CLASSES.radioReadonly,
|
|
36
|
-
radio_constants.RADIO_CONTROL_CSS_CLASSES.radioError
|
|
37
|
-
];
|
|
33
|
+
const classes = [radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled, radio_constants.RADIO_CONTROL_CSS_CLASSES.radioReadonly, radio_constants.RADIO_CONTROL_CSS_CLASSES.radioError];
|
|
38
34
|
this.classList.remove(...classes);
|
|
39
35
|
const cssClasses = index['default']({
|
|
40
36
|
[radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled]: this.disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -15,7 +15,6 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.settings = '';
|
|
17
17
|
this.id = '';
|
|
18
|
-
this.isSliderOptimizationFlagEnabled = false;
|
|
19
18
|
this._settings = {
|
|
20
19
|
mountOnConnectedCallback: true,
|
|
21
20
|
type: 'loop',
|
|
@@ -36,35 +35,17 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
36
35
|
if ($focusableSlideChildren.length === 0)
|
|
37
36
|
return;
|
|
38
37
|
let updateFocusability;
|
|
39
|
-
|
|
40
|
-
updateFocusability = action === slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? utilities.UiDomUtils.showFocusableElement : utilities.UiDomUtils.hideFocusableElement;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
updateFocusability = action === slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? this._showFocusableElement : this._hideFocusableElement;
|
|
44
|
-
}
|
|
38
|
+
updateFocusability = action === slider_constants.SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? utilities.UiDomUtils.showFocusableElement : utilities.UiDomUtils.hideFocusableElement;
|
|
45
39
|
$focusableSlideChildren.forEach(($element) => updateFocusability($element));
|
|
46
40
|
};
|
|
47
41
|
this._scanMutationsForNewFocusableElements = (mutationList) => {
|
|
48
|
-
|
|
49
|
-
for (const
|
|
50
|
-
|
|
51
|
-
if (!(addedNode instanceof HTMLElement))
|
|
52
|
-
continue;
|
|
53
|
-
if (utilities.UiDomUtils.isFocusable(addedNode))
|
|
54
|
-
this._initializeFocusableElement(addedNode);
|
|
55
|
-
const $focusableChildren = [...addedNode.querySelectorAll(utilities.UiDomUtils.getFocusableSelector())];
|
|
56
|
-
$focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
for (const mutation of mutationList) {
|
|
62
|
-
if (mutation.type !== 'childList')
|
|
42
|
+
for (const mutation of mutationList) {
|
|
43
|
+
for (const addedNode of mutation.addedNodes) {
|
|
44
|
+
if (!(addedNode instanceof HTMLElement))
|
|
63
45
|
continue;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const $focusableChildren = [
|
|
67
|
-
isFocusable && this._initializeFocusableElement($target);
|
|
46
|
+
if (utilities.UiDomUtils.isFocusable(addedNode))
|
|
47
|
+
this._initializeFocusableElement(addedNode);
|
|
48
|
+
const $focusableChildren = [...addedNode.querySelectorAll(utilities.UiDomUtils.getFocusableSelector())];
|
|
68
49
|
$focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
|
|
69
50
|
}
|
|
70
51
|
}
|
|
@@ -96,22 +77,8 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
96
77
|
}
|
|
97
78
|
this._slider.on('visible', this._showFocusableNodes);
|
|
98
79
|
this._slider.on('hidden', this._hideFocusableNodes);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this._mutationObserver.observe(this, { childList: true, subtree: true });
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
const mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
|
|
105
|
-
mutationObserver.observe(this, { childList: true, subtree: true, attributes: true });
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
_showFocusableElement($element) {
|
|
109
|
-
$element.setAttribute('tabindex', '0');
|
|
110
|
-
$element.removeAttribute('aria-hidden');
|
|
111
|
-
}
|
|
112
|
-
_hideFocusableElement($element) {
|
|
113
|
-
$element.setAttribute('tabindex', '-1');
|
|
114
|
-
$element.setAttribute('aria-hidden', 'true');
|
|
80
|
+
this._mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
|
|
81
|
+
this._mutationObserver.observe(this, { childList: true, subtree: true });
|
|
115
82
|
}
|
|
116
83
|
getSlider() {
|
|
117
84
|
return this._slider;
|
|
@@ -121,10 +88,8 @@ exports.HSlider = class HSlider extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
121
88
|
super.disconnectedCallback();
|
|
122
89
|
(_a = this._slider) === null || _a === void 0 ? void 0 : _a.off('visible');
|
|
123
90
|
(_b = this._slider) === null || _b === void 0 ? void 0 : _b.off('hidden');
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this._mutationObserver = null;
|
|
127
|
-
}
|
|
91
|
+
(_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
92
|
+
this._mutationObserver = null;
|
|
128
93
|
}
|
|
129
94
|
};
|
|
130
95
|
tslib_es6.__decorate([
|
|
@@ -135,10 +100,6 @@ tslib_es6.__decorate([
|
|
|
135
100
|
decorators.property(),
|
|
136
101
|
tslib_es6.__metadata("design:type", String)
|
|
137
102
|
], exports.HSlider.prototype, "id", void 0);
|
|
138
|
-
tslib_es6.__decorate([
|
|
139
|
-
decorators.property({ attribute: 'is-slider-optimization-flag-enabled' }),
|
|
140
|
-
tslib_es6.__metadata("design:type", Boolean)
|
|
141
|
-
], exports.HSlider.prototype, "isSliderOptimizationFlagEnabled", void 0);
|
|
142
103
|
exports.HSlider = tslib_es6.__decorate([
|
|
143
104
|
phoenix_custom_element.phoenixCustomElement('h-slider')
|
|
144
105
|
], exports.HSlider);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA,yBAAyB,gEAAoE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACxE;AACA;AACA;AACA;AACA,yBAAyB,gEAAoE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,6 +3,7 @@ import { PropertyValues } from 'lit';
|
|
|
3
3
|
export declare class HAccordionContent extends PhoenixLightLitElement {
|
|
4
4
|
transitionName: string;
|
|
5
5
|
isDevAccordionOptimizationFlagEnabled: boolean;
|
|
6
|
+
isDevAccordionSafariFlashFixEnabled: boolean;
|
|
6
7
|
private _transitionController;
|
|
7
8
|
private _contextConsumer;
|
|
8
9
|
private _accordionGroupProps;
|
|
@@ -12,6 +13,7 @@ export declare class HAccordionContent extends PhoenixLightLitElement {
|
|
|
12
13
|
private _isTransitioning;
|
|
13
14
|
private _resizeDebounceTimer;
|
|
14
15
|
private _mutationDebounceTimer;
|
|
16
|
+
private _lastViewportWidth;
|
|
15
17
|
private _mutationObserver;
|
|
16
18
|
private _boundHandleTransitionEnd;
|
|
17
19
|
private _boundHandleImageLoad;
|
|
@@ -20,6 +22,7 @@ export declare class HAccordionContent extends PhoenixLightLitElement {
|
|
|
20
22
|
firstUpdated(props: PropertyValues): void;
|
|
21
23
|
private _handleResizeObserver;
|
|
22
24
|
private _updateOriginalHeight;
|
|
25
|
+
private _isIosViewportHeightOnlyResize;
|
|
23
26
|
private _handleResize;
|
|
24
27
|
private _setStylingOptions;
|
|
25
28
|
private _setOriginalHeightValue;
|
|
@@ -15,10 +15,12 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
|
|
|
15
15
|
super();
|
|
16
16
|
this.transitionName = 'accordion-toggle';
|
|
17
17
|
this.isDevAccordionOptimizationFlagEnabled = false;
|
|
18
|
+
this.isDevAccordionSafariFlashFixEnabled = false;
|
|
18
19
|
this._resizeObserver = null;
|
|
19
20
|
this._isTransitioning = false;
|
|
20
21
|
this._resizeDebounceTimer = null;
|
|
21
22
|
this._mutationDebounceTimer = null;
|
|
23
|
+
this._lastViewportWidth = window.innerWidth;
|
|
22
24
|
this._mutationObserver = null;
|
|
23
25
|
this._handleResizeObserver = () => {
|
|
24
26
|
if (this._isTransitioning || this.hidden || this.style.height === '0px')
|
|
@@ -32,26 +34,47 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
|
|
|
32
34
|
this.style.display = previousDisplay;
|
|
33
35
|
};
|
|
34
36
|
this._handleResize = () => {
|
|
37
|
+
if (this.isDevAccordionSafariFlashFixEnabled) {
|
|
38
|
+
if (this._isIosViewportHeightOnlyResize())
|
|
39
|
+
return;
|
|
40
|
+
this._lastViewportWidth = window.innerWidth;
|
|
41
|
+
}
|
|
35
42
|
if (this._resizeDebounceTimer !== null) {
|
|
36
|
-
|
|
43
|
+
const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
|
|
44
|
+
clearMethod(this._resizeDebounceTimer);
|
|
45
|
+
}
|
|
46
|
+
if (this.isDevAccordionSafariFlashFixEnabled) {
|
|
47
|
+
this._resizeDebounceTimer = window.setTimeout(this._setStylingOptions, RESIZE_DEBOUNCE_MS);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this._resizeDebounceTimer = requestAnimationFrame(() => {
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
this._setStylingOptions();
|
|
53
|
+
}, RESIZE_DEBOUNCE_MS);
|
|
54
|
+
});
|
|
37
55
|
}
|
|
38
|
-
this._resizeDebounceTimer = window.requestAnimationFrame(() => {
|
|
39
|
-
setTimeout(() => {
|
|
40
|
-
this._setStylingOptions();
|
|
41
|
-
}, RESIZE_DEBOUNCE_MS);
|
|
42
|
-
});
|
|
43
56
|
};
|
|
44
57
|
this._setStylingOptions = () => {
|
|
45
|
-
|
|
58
|
+
if (this.isDevAccordionSafariFlashFixEnabled) {
|
|
46
59
|
const previousDisplay = this.style.display;
|
|
47
60
|
this.style.setProperty('display', 'block', 'important');
|
|
48
61
|
this.style.height = 'auto';
|
|
62
|
+
this._setOriginalHeightValue(this.getBoundingClientRect().height);
|
|
63
|
+
this.style.display = previousDisplay;
|
|
64
|
+
this.style.height = this.hidden ? '0px' : this._originalHeight;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
49
67
|
requestAnimationFrame(() => {
|
|
50
|
-
this.
|
|
51
|
-
this.style.display
|
|
52
|
-
this.style.height =
|
|
68
|
+
const previousDisplay = this.style.display;
|
|
69
|
+
this.style.setProperty('display', 'block', 'important');
|
|
70
|
+
this.style.height = 'auto';
|
|
71
|
+
requestAnimationFrame(() => {
|
|
72
|
+
this._setOriginalHeightValue(this.getBoundingClientRect().height);
|
|
73
|
+
this.style.display = previousDisplay;
|
|
74
|
+
this.style.height = this.hidden ? '0px' : this._originalHeight;
|
|
75
|
+
});
|
|
53
76
|
});
|
|
54
|
-
}
|
|
77
|
+
}
|
|
55
78
|
};
|
|
56
79
|
this._setOriginalHeightValue = (height) => {
|
|
57
80
|
if (height !== 0 || this.children.length === 0) {
|
|
@@ -60,7 +83,7 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
|
|
|
60
83
|
};
|
|
61
84
|
this._handleMutation = () => {
|
|
62
85
|
if (this._mutationDebounceTimer !== null) {
|
|
63
|
-
|
|
86
|
+
clearTimeout(this._mutationDebounceTimer);
|
|
64
87
|
}
|
|
65
88
|
this._mutationDebounceTimer = window.setTimeout(() => {
|
|
66
89
|
requestAnimationFrame(() => {
|
|
@@ -144,6 +167,9 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
|
|
|
144
167
|
this._setStylingOptions();
|
|
145
168
|
}
|
|
146
169
|
}
|
|
170
|
+
_isIosViewportHeightOnlyResize() {
|
|
171
|
+
return window.innerWidth === this._lastViewportWidth;
|
|
172
|
+
}
|
|
147
173
|
_setupImageLoadListeners() {
|
|
148
174
|
const images = this.querySelectorAll('img');
|
|
149
175
|
images.forEach((img) => {
|
|
@@ -204,10 +230,11 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
|
|
|
204
230
|
(_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
205
231
|
window.removeEventListener('resize', this._handleResize);
|
|
206
232
|
if (this._resizeDebounceTimer !== null) {
|
|
207
|
-
|
|
233
|
+
const clearMethod = this.isDevAccordionSafariFlashFixEnabled ? clearTimeout : cancelAnimationFrame;
|
|
234
|
+
clearMethod(this._resizeDebounceTimer);
|
|
208
235
|
}
|
|
209
236
|
if (this._mutationDebounceTimer !== null) {
|
|
210
|
-
|
|
237
|
+
clearTimeout(this._mutationDebounceTimer);
|
|
211
238
|
}
|
|
212
239
|
}
|
|
213
240
|
const images = this.querySelectorAll('img');
|
|
@@ -215,7 +242,6 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
|
|
|
215
242
|
img.removeEventListener('load', this._boundHandleImageLoad);
|
|
216
243
|
img.removeEventListener('error', this._boundHandleImageLoad);
|
|
217
244
|
});
|
|
218
|
-
window.removeEventListener('resize', this._handleResize);
|
|
219
245
|
this.removeEventListener('transitionend', this._boundHandleTransitionEnd);
|
|
220
246
|
}
|
|
221
247
|
};
|
|
@@ -227,6 +253,10 @@ __decorate([
|
|
|
227
253
|
property({ type: Boolean, attribute: 'is-dev-accordion-optimization-flag-enabled' }),
|
|
228
254
|
__metadata("design:type", Boolean)
|
|
229
255
|
], HAccordionContent.prototype, "isDevAccordionOptimizationFlagEnabled", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
property({ type: Boolean, attribute: 'is-dev-accordion-safari-flash-fix-enabled' }),
|
|
258
|
+
__metadata("design:type", Boolean)
|
|
259
|
+
], HAccordionContent.prototype, "isDevAccordionSafariFlashFixEnabled", void 0);
|
|
230
260
|
HAccordionContent = __decorate([
|
|
231
261
|
phoenixCustomElement('h-accordion-content'),
|
|
232
262
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -48,7 +48,9 @@ let HAccordionGroup = class HAccordionGroup extends PhoenixLightLitElement {
|
|
|
48
48
|
this._accordionProps.subscribe(this._accordionPropsObserver);
|
|
49
49
|
}
|
|
50
50
|
disconnectedCallback() {
|
|
51
|
-
|
|
51
|
+
var _a;
|
|
52
|
+
super.disconnectedCallback();
|
|
53
|
+
(_a = this._accordionProps) === null || _a === void 0 ? void 0 : _a.unsubscribe(this._accordionPropsObserver);
|
|
52
54
|
this.removeEventListener(ACCORDION_EVENTS.toggle, this._accordionToggle);
|
|
53
55
|
}
|
|
54
56
|
show() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,11 +2,11 @@ import { ReactiveControllerHost } from 'lit';
|
|
|
2
2
|
export declare type TBaseFormControlProps = Partial<{
|
|
3
3
|
disabled: boolean;
|
|
4
4
|
required: boolean;
|
|
5
|
-
hidden: boolean;
|
|
5
|
+
hidden: boolean | HTMLElement['hidden'];
|
|
6
6
|
readonly: boolean;
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
|
-
value: string;
|
|
9
|
+
value: string | number;
|
|
10
10
|
}>;
|
|
11
11
|
export declare type TBaseFormControlPropsController = ReactiveControllerHost & TBaseFormControlProps & HTMLElement;
|
|
12
12
|
export declare type TOnPropsUpdatedListener = (props: TBaseFormControlProps) => void;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
import { PropertyValues } from 'lit';
|
|
2
3
|
export declare class HButtonStepper extends PhoenixLightLitElement {
|
|
3
4
|
private _btnController;
|
|
4
5
|
private _allowedEvents;
|
|
5
6
|
type: string;
|
|
7
|
+
disabled: boolean;
|
|
6
8
|
constructor();
|
|
7
9
|
connectedCallback(): void;
|
|
10
|
+
updated(changedProperties: PropertyValues): void;
|
|
8
11
|
private _dispatchStepperEvent;
|
|
9
12
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import 'lit';
|
|
2
3
|
import { property } from 'lit/decorators';
|
|
4
|
+
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
3
5
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
6
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
7
|
import { BtnController } from '../../../controllers/btn_controller/btn_controller.js';
|
|
8
|
+
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
6
9
|
import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
|
|
7
10
|
|
|
8
11
|
let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
|
|
@@ -13,8 +16,11 @@ let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
|
|
|
13
16
|
decrement: INPUT_STEPPER_CUSTOM_EVENT_NAMES.decrement
|
|
14
17
|
};
|
|
15
18
|
this.type = '';
|
|
19
|
+
this.disabled = false;
|
|
16
20
|
this._dispatchStepperEvent = (ev) => {
|
|
17
21
|
ev.stopImmediatePropagation();
|
|
22
|
+
if (this.disabled)
|
|
23
|
+
return;
|
|
18
24
|
if (!this.type)
|
|
19
25
|
throw new Error(`The type ${this.type} cannot be empty. Allowed values: 'increment', 'decrement'`);
|
|
20
26
|
if (!this._allowedEvents[this.type])
|
|
@@ -22,16 +28,27 @@ let HButtonStepper = class HButtonStepper extends PhoenixLightLitElement {
|
|
|
22
28
|
this.emitCustomEvent(this._allowedEvents[this.type]);
|
|
23
29
|
};
|
|
24
30
|
this._btnController = new BtnController(this, this._dispatchStepperEvent);
|
|
31
|
+
new ControlPropsSyncConsumerController({ host: this });
|
|
25
32
|
}
|
|
26
33
|
connectedCallback() {
|
|
27
34
|
super.connectedCallback();
|
|
28
35
|
this.addEventListener(INPUT_STEPPER_EVENT_NAMES.click, this._dispatchStepperEvent);
|
|
29
36
|
}
|
|
37
|
+
updated(changedProperties) {
|
|
38
|
+
if (!changedProperties.has('disabled'))
|
|
39
|
+
return;
|
|
40
|
+
this.setAttribute('aria-disabled', String(this.disabled));
|
|
41
|
+
this.disabled ? UiDomUtils.makeUnnavigable(this) : UiDomUtils.makeNavigable(this);
|
|
42
|
+
}
|
|
30
43
|
};
|
|
31
44
|
__decorate([
|
|
32
45
|
property({ type: String }),
|
|
33
46
|
__metadata("design:type", Object)
|
|
34
47
|
], HButtonStepper.prototype, "type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
property({ type: Boolean, reflect: true }),
|
|
50
|
+
__metadata("design:type", Boolean)
|
|
51
|
+
], HButtonStepper.prototype, "disabled", void 0);
|
|
35
52
|
HButtonStepper = __decorate([
|
|
36
53
|
phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.button),
|
|
37
54
|
__metadata("design:paramtypes", [])
|
|
@@ -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;"}
|
|
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,10 +1,12 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HDisplayStepper extends PhoenixLightLitElement {
|
|
3
3
|
private _controlId;
|
|
4
|
+
disabled: boolean;
|
|
4
5
|
private _stepperContextConsumer;
|
|
5
6
|
private _value$;
|
|
6
7
|
private _valueObserver;
|
|
7
8
|
private _inputRef;
|
|
9
|
+
constructor();
|
|
8
10
|
connectedCallback(): Promise<void>;
|
|
9
11
|
disconnectedCallback(): void;
|
|
10
12
|
private _dispatchToggleEvent;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
|
-
import { state } from 'lit/decorators';
|
|
3
|
+
import { state, property } from 'lit/decorators';
|
|
4
4
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
5
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
6
|
import { Observer } from '../../../core/classes/observer/observer.js';
|
|
7
7
|
import { ContextConsumerController } from '../../../core/context/context_consumer_controller.js';
|
|
8
8
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
9
|
+
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
9
10
|
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
|
|
|
11
12
|
let HDisplayStepper = class HDisplayStepper extends PhoenixLightLitElement {
|
|
12
13
|
constructor() {
|
|
13
|
-
super(
|
|
14
|
+
super();
|
|
14
15
|
this._controlId = '';
|
|
16
|
+
this.disabled = false;
|
|
15
17
|
this._inputRef = createRef();
|
|
16
18
|
this._dispatchToggleEvent = (ev) => {
|
|
17
19
|
const $input = ev.target;
|
|
@@ -24,6 +26,7 @@ let HDisplayStepper = class HDisplayStepper extends PhoenixLightLitElement {
|
|
|
24
26
|
}
|
|
25
27
|
});
|
|
26
28
|
};
|
|
29
|
+
new ControlPropsSyncConsumerController({ host: this });
|
|
27
30
|
}
|
|
28
31
|
async connectedCallback() {
|
|
29
32
|
super.connectedCallback();
|
|
@@ -71,6 +74,7 @@ let HDisplayStepper = class HDisplayStepper extends PhoenixLightLitElement {
|
|
|
71
74
|
@change="${this._dispatchToggleEvent}"
|
|
72
75
|
inputmode="decimal"
|
|
73
76
|
aria-label="${this.ariaLabel}"
|
|
77
|
+
?disabled="${this.disabled}"
|
|
74
78
|
/>`;
|
|
75
79
|
}
|
|
76
80
|
};
|
|
@@ -78,8 +82,13 @@ __decorate([
|
|
|
78
82
|
state(),
|
|
79
83
|
__metadata("design:type", Object)
|
|
80
84
|
], HDisplayStepper.prototype, "_controlId", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Boolean, reflect: true }),
|
|
87
|
+
__metadata("design:type", Boolean)
|
|
88
|
+
], HDisplayStepper.prototype, "disabled", void 0);
|
|
81
89
|
HDisplayStepper = __decorate([
|
|
82
|
-
phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.input)
|
|
90
|
+
phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.input),
|
|
91
|
+
__metadata("design:paramtypes", [])
|
|
83
92
|
], HDisplayStepper);
|
|
84
93
|
|
|
85
94
|
export { HDisplayStepper };
|
|
@@ -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;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
import { PropertyValues } from 'lit';
|
|
2
3
|
import { TInputStepperChangeEvent } from './input_stepper_types';
|
|
3
4
|
export declare class HInputStepper extends PhoenixLightLitElement {
|
|
4
5
|
private _stepperState;
|
|
@@ -10,6 +11,8 @@ export declare class HInputStepper extends PhoenixLightLitElement {
|
|
|
10
11
|
min: number;
|
|
11
12
|
max: number;
|
|
12
13
|
step: number;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
constructor();
|
|
13
16
|
connectedCallback(): void;
|
|
14
17
|
disconnectedCallback(): void;
|
|
15
18
|
increment: () => void;
|
|
@@ -21,5 +24,5 @@ export declare class HInputStepper extends PhoenixLightLitElement {
|
|
|
21
24
|
private _roundToFractionDigits;
|
|
22
25
|
private _outsideRangeEdges;
|
|
23
26
|
private _dispatchChangedValue;
|
|
24
|
-
updated(): void;
|
|
27
|
+
updated(changedProperties: PropertyValues): void;
|
|
25
28
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import 'lit';
|
|
2
3
|
import { property } from 'lit/decorators';
|
|
3
4
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
5
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
6
|
import { BehaviorSubject } from '../../../core/classes/behavior_subject/behavior_subject.js';
|
|
6
7
|
import { ContextProviderController } from '../../../core/context/context_provider_controller.js';
|
|
7
|
-
import {
|
|
8
|
+
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
9
|
+
import { INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_PROPS_TO_SYNC, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_CLASS_NAMES, INPUT_STEPPER_COMPONENT_NAMES } from './input_stepper_constants.js';
|
|
8
10
|
|
|
9
11
|
let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
|
|
10
12
|
constructor() {
|
|
11
|
-
super(
|
|
13
|
+
super();
|
|
12
14
|
this.controlId = '';
|
|
13
15
|
this.allowedFractionDigits = null;
|
|
14
16
|
this.roundTo = 0;
|
|
@@ -16,7 +18,10 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
|
|
|
16
18
|
this.min = -Infinity;
|
|
17
19
|
this.max = Infinity;
|
|
18
20
|
this.step = 1;
|
|
21
|
+
this.disabled = false;
|
|
19
22
|
this.increment = () => {
|
|
23
|
+
if (this.disabled)
|
|
24
|
+
return;
|
|
20
25
|
if (this.value === this.max) {
|
|
21
26
|
this.value = this.max;
|
|
22
27
|
return;
|
|
@@ -25,6 +30,8 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
|
|
|
25
30
|
this._dispatchChangedValue(this.value);
|
|
26
31
|
};
|
|
27
32
|
this.decrement = () => {
|
|
33
|
+
if (this.disabled)
|
|
34
|
+
return;
|
|
28
35
|
if (this.value === this.min) {
|
|
29
36
|
this.value = this.min;
|
|
30
37
|
return;
|
|
@@ -33,6 +40,8 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
|
|
|
33
40
|
this._dispatchChangedValue(this.value);
|
|
34
41
|
};
|
|
35
42
|
this.changeValue = (ev) => {
|
|
43
|
+
if (this.disabled)
|
|
44
|
+
return;
|
|
36
45
|
const value = ev.detail.value;
|
|
37
46
|
this.setValue(value);
|
|
38
47
|
this._dispatchChangedValue(this.value);
|
|
@@ -65,6 +74,10 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
|
|
|
65
74
|
detail: { value }
|
|
66
75
|
});
|
|
67
76
|
};
|
|
77
|
+
new ControlPropsSyncProviderController({
|
|
78
|
+
host: this,
|
|
79
|
+
propsToSync: [INPUT_STEPPER_PROPS_TO_SYNC.disabled]
|
|
80
|
+
});
|
|
68
81
|
}
|
|
69
82
|
connectedCallback() {
|
|
70
83
|
super.connectedCallback();
|
|
@@ -103,8 +116,11 @@ let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
|
|
|
103
116
|
_outsideRangeEdges(number) {
|
|
104
117
|
return number > this.max || number < this.min;
|
|
105
118
|
}
|
|
106
|
-
updated() {
|
|
119
|
+
updated(changedProperties) {
|
|
107
120
|
var _a;
|
|
121
|
+
if (changedProperties.has('disabled')) {
|
|
122
|
+
this.classList.toggle(INPUT_STEPPER_CLASS_NAMES.inputStepperDisabled, this.disabled);
|
|
123
|
+
}
|
|
108
124
|
if (this._outsideRangeEdges(this.value))
|
|
109
125
|
return;
|
|
110
126
|
const digits = (_a = this.allowedFractionDigits) !== null && _a !== void 0 ? _a : this._calculateFractionDigitsByStepSize(this.step);
|
|
@@ -140,8 +156,13 @@ __decorate([
|
|
|
140
156
|
property({ type: Number, reflect: true }),
|
|
141
157
|
__metadata("design:type", Number)
|
|
142
158
|
], HInputStepper.prototype, "step", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: Boolean, reflect: true }),
|
|
161
|
+
__metadata("design:type", Boolean)
|
|
162
|
+
], HInputStepper.prototype, "disabled", void 0);
|
|
143
163
|
HInputStepper = __decorate([
|
|
144
|
-
phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.control)
|
|
164
|
+
phoenixCustomElement(INPUT_STEPPER_COMPONENT_NAMES.control),
|
|
165
|
+
__metadata("design:paramtypes", [])
|
|
145
166
|
], HInputStepper);
|
|
146
167
|
|
|
147
168
|
export { HInputStepper };
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const INPUT_STEPPER_CUSTOM_EVENT_NAMES: {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const INPUT_STEPPER_CLASS_NAMES: {
|
|
12
12
|
readonly displayInput: "input-stepper__value_input";
|
|
13
|
+
readonly inputStepperDisabled: "input-stepper_disabled";
|
|
13
14
|
};
|
|
14
15
|
export declare const INPUT_STEPPER_COMPONENT_NAMES: {
|
|
15
16
|
readonly control: "h-input-stepper";
|
|
@@ -19,3 +20,6 @@ export declare const INPUT_STEPPER_COMPONENT_NAMES: {
|
|
|
19
20
|
export declare const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES: {
|
|
20
21
|
readonly stepperContext: "stepperContext";
|
|
21
22
|
};
|
|
23
|
+
export declare const INPUT_STEPPER_PROPS_TO_SYNC: {
|
|
24
|
+
readonly disabled: "disabled";
|
|
25
|
+
};
|
package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js
CHANGED
|
@@ -9,7 +9,8 @@ const INPUT_STEPPER_CUSTOM_EVENT_NAMES = {
|
|
|
9
9
|
decrement: 'decrement'
|
|
10
10
|
};
|
|
11
11
|
const INPUT_STEPPER_CLASS_NAMES = {
|
|
12
|
-
displayInput: 'input-stepper__value_input'
|
|
12
|
+
displayInput: 'input-stepper__value_input',
|
|
13
|
+
inputStepperDisabled: 'input-stepper_disabled'
|
|
13
14
|
};
|
|
14
15
|
const INPUT_STEPPER_COMPONENT_NAMES = {
|
|
15
16
|
control: 'h-input-stepper',
|
|
@@ -18,7 +19,10 @@ const INPUT_STEPPER_COMPONENT_NAMES = {
|
|
|
18
19
|
};
|
|
19
20
|
const INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES = {
|
|
20
21
|
stepperContext: 'stepperContext'
|
|
22
|
+
};
|
|
23
|
+
const INPUT_STEPPER_PROPS_TO_SYNC = {
|
|
24
|
+
disabled: 'disabled'
|
|
21
25
|
};
|
|
22
26
|
|
|
23
|
-
export { INPUT_STEPPER_CLASS_NAMES, INPUT_STEPPER_COMPONENT_NAMES, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES };
|
|
27
|
+
export { INPUT_STEPPER_CLASS_NAMES, INPUT_STEPPER_COMPONENT_NAMES, INPUT_STEPPER_CONTEXTS_VARIABLE_NAMES, INPUT_STEPPER_CUSTOM_EVENT_NAMES, INPUT_STEPPER_EVENT_NAMES, INPUT_STEPPER_PROPS_TO_SYNC };
|
|
24
28
|
//# sourceMappingURL=input_stepper_constants.js.map
|
package/build/esm/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;"}
|
|
@@ -26,11 +26,7 @@ let HRadio = class HRadio extends PhoenixLightLitElement {
|
|
|
26
26
|
this._updateCssClassesBasedOnProps();
|
|
27
27
|
}
|
|
28
28
|
_updateCssClassesBasedOnProps() {
|
|
29
|
-
const classes = [
|
|
30
|
-
RADIO_CONTROL_CSS_CLASSES.radioDisabled,
|
|
31
|
-
RADIO_CONTROL_CSS_CLASSES.radioReadonly,
|
|
32
|
-
RADIO_CONTROL_CSS_CLASSES.radioError
|
|
33
|
-
];
|
|
29
|
+
const classes = [RADIO_CONTROL_CSS_CLASSES.radioDisabled, RADIO_CONTROL_CSS_CLASSES.radioReadonly, RADIO_CONTROL_CSS_CLASSES.radioError];
|
|
34
30
|
this.classList.remove(...classes);
|
|
35
31
|
const cssClasses = classnames({
|
|
36
32
|
[RADIO_CONTROL_CSS_CLASSES.radioDisabled]: this.disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,gDAAoD;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;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,gDAAoD;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;"}
|
|
@@ -3,7 +3,6 @@ import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/pho
|
|
|
3
3
|
export declare class HSlider extends PhoenixLightLitElement {
|
|
4
4
|
settings: string;
|
|
5
5
|
id: string;
|
|
6
|
-
isSliderOptimizationFlagEnabled: boolean;
|
|
7
6
|
get sliderSettings(): ISliderOptions;
|
|
8
7
|
set sliderSettings(newSettingsObject: ISliderOptions);
|
|
9
8
|
private _settings;
|
|
@@ -14,8 +13,6 @@ export declare class HSlider extends PhoenixLightLitElement {
|
|
|
14
13
|
private _showFocusableNodes;
|
|
15
14
|
private _hideFocusableNodes;
|
|
16
15
|
private _handleFocusableNodes;
|
|
17
|
-
private _showFocusableElement;
|
|
18
|
-
private _hideFocusableElement;
|
|
19
16
|
private _scanMutationsForNewFocusableElements;
|
|
20
17
|
private _initializeFocusableElement;
|
|
21
18
|
getSlider(): ISlider | null;
|
|
@@ -11,7 +11,6 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.settings = '';
|
|
13
13
|
this.id = '';
|
|
14
|
-
this.isSliderOptimizationFlagEnabled = false;
|
|
15
14
|
this._settings = {
|
|
16
15
|
mountOnConnectedCallback: true,
|
|
17
16
|
type: 'loop',
|
|
@@ -32,35 +31,17 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
|
32
31
|
if ($focusableSlideChildren.length === 0)
|
|
33
32
|
return;
|
|
34
33
|
let updateFocusability;
|
|
35
|
-
|
|
36
|
-
updateFocusability = action === SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? UiDomUtils.showFocusableElement : UiDomUtils.hideFocusableElement;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
updateFocusability = action === SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? this._showFocusableElement : this._hideFocusableElement;
|
|
40
|
-
}
|
|
34
|
+
updateFocusability = action === SLIDER_HANDLE_FOCUSABLE_NODES_OPTIONS.show ? UiDomUtils.showFocusableElement : UiDomUtils.hideFocusableElement;
|
|
41
35
|
$focusableSlideChildren.forEach(($element) => updateFocusability($element));
|
|
42
36
|
};
|
|
43
37
|
this._scanMutationsForNewFocusableElements = (mutationList) => {
|
|
44
|
-
|
|
45
|
-
for (const
|
|
46
|
-
|
|
47
|
-
if (!(addedNode instanceof HTMLElement))
|
|
48
|
-
continue;
|
|
49
|
-
if (UiDomUtils.isFocusable(addedNode))
|
|
50
|
-
this._initializeFocusableElement(addedNode);
|
|
51
|
-
const $focusableChildren = [...addedNode.querySelectorAll(UiDomUtils.getFocusableSelector())];
|
|
52
|
-
$focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
for (const mutation of mutationList) {
|
|
58
|
-
if (mutation.type !== 'childList')
|
|
38
|
+
for (const mutation of mutationList) {
|
|
39
|
+
for (const addedNode of mutation.addedNodes) {
|
|
40
|
+
if (!(addedNode instanceof HTMLElement))
|
|
59
41
|
continue;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const $focusableChildren = [
|
|
63
|
-
isFocusable && this._initializeFocusableElement($target);
|
|
42
|
+
if (UiDomUtils.isFocusable(addedNode))
|
|
43
|
+
this._initializeFocusableElement(addedNode);
|
|
44
|
+
const $focusableChildren = [...addedNode.querySelectorAll(UiDomUtils.getFocusableSelector())];
|
|
64
45
|
$focusableChildren.forEach(($child) => this._initializeFocusableElement($child));
|
|
65
46
|
}
|
|
66
47
|
}
|
|
@@ -92,22 +73,8 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
|
92
73
|
}
|
|
93
74
|
this._slider.on('visible', this._showFocusableNodes);
|
|
94
75
|
this._slider.on('hidden', this._hideFocusableNodes);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this._mutationObserver.observe(this, { childList: true, subtree: true });
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
const mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
|
|
101
|
-
mutationObserver.observe(this, { childList: true, subtree: true, attributes: true });
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
_showFocusableElement($element) {
|
|
105
|
-
$element.setAttribute('tabindex', '0');
|
|
106
|
-
$element.removeAttribute('aria-hidden');
|
|
107
|
-
}
|
|
108
|
-
_hideFocusableElement($element) {
|
|
109
|
-
$element.setAttribute('tabindex', '-1');
|
|
110
|
-
$element.setAttribute('aria-hidden', 'true');
|
|
76
|
+
this._mutationObserver = new MutationObserver(this._scanMutationsForNewFocusableElements);
|
|
77
|
+
this._mutationObserver.observe(this, { childList: true, subtree: true });
|
|
111
78
|
}
|
|
112
79
|
getSlider() {
|
|
113
80
|
return this._slider;
|
|
@@ -117,10 +84,8 @@ let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
|
117
84
|
super.disconnectedCallback();
|
|
118
85
|
(_a = this._slider) === null || _a === void 0 ? void 0 : _a.off('visible');
|
|
119
86
|
(_b = this._slider) === null || _b === void 0 ? void 0 : _b.off('hidden');
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this._mutationObserver = null;
|
|
123
|
-
}
|
|
87
|
+
(_c = this._mutationObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
88
|
+
this._mutationObserver = null;
|
|
124
89
|
}
|
|
125
90
|
};
|
|
126
91
|
__decorate([
|
|
@@ -131,10 +96,6 @@ __decorate([
|
|
|
131
96
|
property(),
|
|
132
97
|
__metadata("design:type", String)
|
|
133
98
|
], HSlider.prototype, "id", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
property({ attribute: 'is-slider-optimization-flag-enabled' }),
|
|
136
|
-
__metadata("design:type", Boolean)
|
|
137
|
-
], HSlider.prototype, "isSliderOptimizationFlagEnabled", void 0);
|
|
138
99
|
HSlider = __decorate([
|
|
139
100
|
phoenixCustomElement('h-slider')
|
|
140
101
|
], HSlider);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,gEAAoE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,gEAAoE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|