@shoper/phoenix_design_system 1.18.10-0 → 1.18.10-2
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.js +28 -6
- package/build/cjs/packages/phoenix/src/components/accordion/accordion.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_constants.js +5 -0
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js +151 -2
- 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 +171 -47
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_toggler.js +57 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_toggler.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +6 -5
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/cjs/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js +26 -0
- package/build/cjs/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js.map +1 -0
- package/build/cjs/packages/utilities/build/esm/packages/utilities/src/json_utils.js +25 -0
- package/build/cjs/packages/utilities/build/esm/packages/utilities/src/json_utils.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/accordion/accordion.d.ts +6 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion.js +29 -7
- package/build/esm/packages/phoenix/src/components/accordion/accordion.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_constants.d.ts +4 -0
- package/build/esm/packages/phoenix/src/components/accordion/accordion_constants.js +5 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.d.ts +24 -0
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js +151 -2
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.d.ts +17 -3
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js +172 -48
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.d.ts +9 -0
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.js +57 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_types.d.ts +10 -0
- package/build/esm/packages/phoenix/src/index.js +2 -2
- package/build/esm/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js +22 -0
- package/build/esm/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js.map +1 -0
- package/build/esm/packages/utilities/build/esm/packages/utilities/src/json_utils.js +21 -0
- package/build/esm/packages/utilities/build/esm/packages/utilities/src/json_utils.js.map +1 -0
- package/package.json +2 -2
|
@@ -6,16 +6,23 @@ var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
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');
|
|
9
11
|
var accordion_constants = require('./accordion_constants.js');
|
|
12
|
+
var feature_flag_utils = require('../../../../utilities/build/esm/packages/utilities/src/feature_flag_utils.js');
|
|
10
13
|
|
|
11
14
|
exports.HAccordion = class HAccordion extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
12
15
|
constructor() {
|
|
13
|
-
super(
|
|
16
|
+
super();
|
|
14
17
|
this.disabled = false;
|
|
15
18
|
this.mode = accordion_constants.ACCORDION_MODE.multi;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
this._isDevAccordionOptimizationFlagEnabled = feature_flag_utils.FeatureFlagUtils.isEnabled('dev_accordion_optimization');
|
|
20
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
21
|
+
this._accordionSubject = new behavior_subject.BehaviorSubject(this._getProps());
|
|
22
|
+
this._accordionContext = new context_provider_controller.ContextProviderController(this);
|
|
23
|
+
this._accordionContext.provide(accordion_constants.ACCORDION_CONTEXTS.accordionProps, this._accordionSubject);
|
|
24
|
+
this.setAttribute('role', 'none');
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
enable() {
|
|
21
28
|
this.disabled = false;
|
|
@@ -23,8 +30,22 @@ exports.HAccordion = class HAccordion extends phoenix_light_lit_element.PhoenixL
|
|
|
23
30
|
disable() {
|
|
24
31
|
this.disabled = true;
|
|
25
32
|
}
|
|
33
|
+
updated() {
|
|
34
|
+
this.notify();
|
|
35
|
+
}
|
|
26
36
|
notify() {
|
|
27
|
-
|
|
37
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
38
|
+
this.dispatchEvent(new Event(accordion_constants.ACCORDION_EVENTS.update));
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this._accordionSubject.notify(this._getProps());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
_getProps() {
|
|
45
|
+
return {
|
|
46
|
+
disabled: this.disabled,
|
|
47
|
+
mode: this.mode
|
|
48
|
+
};
|
|
28
49
|
}
|
|
29
50
|
};
|
|
30
51
|
tslib_es6.__decorate([
|
|
@@ -36,6 +57,7 @@ tslib_es6.__decorate([
|
|
|
36
57
|
tslib_es6.__metadata("design:type", String)
|
|
37
58
|
], exports.HAccordion.prototype, "mode", void 0);
|
|
38
59
|
exports.HAccordion = tslib_es6.__decorate([
|
|
39
|
-
phoenix_custom_element.phoenixCustomElement('h-accordion')
|
|
60
|
+
phoenix_custom_element.phoenixCustomElement('h-accordion'),
|
|
61
|
+
tslib_es6.__metadata("design:paramtypes", [])
|
|
40
62
|
], exports.HAccordion);
|
|
41
63
|
//# sourceMappingURL=accordion.js.map
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -6,6 +6,10 @@ const ACCORDION_EVENTS = {
|
|
|
6
6
|
toggle: 'toggle',
|
|
7
7
|
update: 'updateAccordion'
|
|
8
8
|
};
|
|
9
|
+
const ACCORDION_CONTEXTS = {
|
|
10
|
+
accordionProps: 'accordionPropsSubject',
|
|
11
|
+
accordionGroupProps: 'accordionGroupPropsSubject'
|
|
12
|
+
};
|
|
9
13
|
const ACCORDION_CSS_CLASSES = {
|
|
10
14
|
open: 'accordion__details_open'
|
|
11
15
|
};
|
|
@@ -16,6 +20,7 @@ const ACCORDION_MODE = {
|
|
|
16
20
|
const ACCORDION_ANIMATION_DURATION = 400;
|
|
17
21
|
|
|
18
22
|
exports.ACCORDION_ANIMATION_DURATION = ACCORDION_ANIMATION_DURATION;
|
|
23
|
+
exports.ACCORDION_CONTEXTS = ACCORDION_CONTEXTS;
|
|
19
24
|
exports.ACCORDION_CSS_CLASSES = ACCORDION_CSS_CLASSES;
|
|
20
25
|
exports.ACCORDION_EVENTS = ACCORDION_EVENTS;
|
|
21
26
|
exports.ACCORDION_MODE = ACCORDION_MODE;
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -3,19 +3,168 @@
|
|
|
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
|
+
var decorators = require('lit/decorators');
|
|
8
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
6
9
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
7
10
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
11
|
+
var observer = require('../../core/classes/observer/observer.js');
|
|
12
|
+
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
13
|
+
var accordion_constants = require('./accordion_constants.js');
|
|
14
|
+
var feature_flag_utils = require('../../../../utilities/build/esm/packages/utilities/src/feature_flag_utils.js');
|
|
15
|
+
var accordion = require('./accordion.js');
|
|
16
|
+
var transition_controller = require('../../controllers/transition_controller/transition_controller.js');
|
|
8
17
|
|
|
18
|
+
const RESIZE_DEBOUNCE_MS = 150;
|
|
19
|
+
const MUTATION_DEBOUNCE_MS = 100;
|
|
9
20
|
exports.HAccordionContent = class HAccordionContent extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
10
21
|
constructor() {
|
|
11
22
|
super();
|
|
12
|
-
this.
|
|
23
|
+
this.transitionName = 'accordion-toggle';
|
|
24
|
+
this._resizeDebounceTimer = null;
|
|
25
|
+
this._mutationDebounceTimer = null;
|
|
26
|
+
this._mutationObserver = null;
|
|
27
|
+
this._handleResize = () => {
|
|
28
|
+
if (this._resizeDebounceTimer !== null) {
|
|
29
|
+
window.cancelAnimationFrame(this._resizeDebounceTimer);
|
|
30
|
+
}
|
|
31
|
+
this._resizeDebounceTimer = window.requestAnimationFrame(() => {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
this._setStylingOptions();
|
|
34
|
+
}, RESIZE_DEBOUNCE_MS);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
this._setStylingOptions = () => {
|
|
38
|
+
requestAnimationFrame(() => {
|
|
39
|
+
const previousDisplay = this.style.display;
|
|
40
|
+
this.style.setProperty('display', 'block', 'important');
|
|
41
|
+
this.style.height = 'auto';
|
|
42
|
+
requestAnimationFrame(() => {
|
|
43
|
+
this._setOriginalHeightValue();
|
|
44
|
+
this.style.display = previousDisplay;
|
|
45
|
+
this.style.height = this.hidden ? '0px' : this._originalHeight;
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
this._handleMutation = () => {
|
|
50
|
+
if (this._mutationDebounceTimer !== null) {
|
|
51
|
+
window.clearTimeout(this._mutationDebounceTimer);
|
|
52
|
+
}
|
|
53
|
+
this._mutationDebounceTimer = window.setTimeout(() => {
|
|
54
|
+
requestAnimationFrame(() => {
|
|
55
|
+
this.style.height = 'auto';
|
|
56
|
+
requestAnimationFrame(() => {
|
|
57
|
+
this._setOriginalHeightValue();
|
|
58
|
+
if (this.hidden) {
|
|
59
|
+
this.style.height = '0px';
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
this.style.height = this._originalHeight;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
}, MUTATION_DEBOUNCE_MS);
|
|
67
|
+
};
|
|
68
|
+
this._setOriginalHeightValue = () => {
|
|
69
|
+
const newHeight = this.getBoundingClientRect().height;
|
|
70
|
+
if (newHeight !== 0 || this.children.length === 0) {
|
|
71
|
+
this._originalHeight = `${newHeight}px`;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
this._expand = () => {
|
|
75
|
+
this._setHeight(this._originalHeight);
|
|
76
|
+
};
|
|
77
|
+
this._handleTransitionEnd = (e) => {
|
|
78
|
+
if (this._isDevAccordionOptimizationFlagEnabled)
|
|
79
|
+
return;
|
|
80
|
+
if (e.propertyName !== 'height' || e.target !== this) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (!this.hidden && this.style.height !== '0px') {
|
|
84
|
+
this.style.height = 'auto';
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
this._collapse = () => {
|
|
88
|
+
const currentHeight = this.getBoundingClientRect().height;
|
|
89
|
+
this._setHeight(`${currentHeight}px`);
|
|
90
|
+
requestAnimationFrame(() => {
|
|
91
|
+
requestAnimationFrame(() => {
|
|
92
|
+
this._setHeight('0px');
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
this._isDevAccordionOptimizationFlagEnabled = feature_flag_utils.FeatureFlagUtils.isEnabled('dev_accordion_optimization');
|
|
97
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
98
|
+
if (this.parentElement instanceof accordion.HAccordion) {
|
|
99
|
+
this.slot = this.hasAttribute('slot') ? this.slot : 'content';
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const contentToSlot = utilities.UiDomUtils.findParentByCondition(this, ($el) => $el.parentElement instanceof accordion.HAccordion);
|
|
103
|
+
contentToSlot === null || contentToSlot === void 0 ? void 0 : contentToSlot.setAttribute('slot', 'content');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.setAttribute('role', 'region');
|
|
108
|
+
this._boundHandleTransitionEnd = this._handleTransitionEnd.bind(this);
|
|
109
|
+
}
|
|
13
110
|
}
|
|
14
111
|
connectedCallback() {
|
|
15
112
|
super.connectedCallback();
|
|
16
|
-
this.
|
|
113
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
114
|
+
this._contextConsumer = new context_consumer_controller.ContextConsumerController(this);
|
|
115
|
+
this._transitionController = new transition_controller.TransitionController(this, this.transitionName);
|
|
116
|
+
this._subscribeObserver();
|
|
117
|
+
window.addEventListener('resize', this._handleResize, { passive: true });
|
|
118
|
+
this.addEventListener('transitionend', this._boundHandleTransitionEnd);
|
|
119
|
+
}
|
|
120
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
121
|
+
this.classList.add('accordion-content');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
firstUpdated(props) {
|
|
125
|
+
super.firstUpdated(props);
|
|
126
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
127
|
+
this._setStylingOptions();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async _subscribeObserver() {
|
|
131
|
+
this._accordionGroupProps = await this._contextConsumer.consumeAsync(accordion_constants.ACCORDION_CONTEXTS.accordionGroupProps);
|
|
132
|
+
this._accordionGroupPropsObserver = new observer.Observer((accordionProps) => {
|
|
133
|
+
this._setAttributes(accordionProps);
|
|
134
|
+
accordionProps.opened ? this._transitionController.show(this._expand) : this._transitionController.hide(this._collapse);
|
|
135
|
+
});
|
|
136
|
+
this._accordionGroupProps.subscribe(this._accordionGroupPropsObserver);
|
|
137
|
+
this._mutationObserver = new MutationObserver(this._handleMutation);
|
|
138
|
+
this._mutationObserver.observe(this, { childList: true, subtree: true });
|
|
139
|
+
}
|
|
140
|
+
_setHeight(height) {
|
|
141
|
+
this.style.height = height;
|
|
142
|
+
}
|
|
143
|
+
_setAttributes({ regionId, controlsId }) {
|
|
144
|
+
this.setAttribute('id', controlsId);
|
|
145
|
+
this.setAttribute('labelledby', regionId);
|
|
146
|
+
}
|
|
147
|
+
disconnectedCallback() {
|
|
148
|
+
var _a, _b;
|
|
149
|
+
super.disconnectedCallback();
|
|
150
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
151
|
+
(_a = this._accordionGroupProps) === null || _a === void 0 ? void 0 : _a.unsubscribe(this._accordionGroupPropsObserver);
|
|
152
|
+
(_b = this._mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
153
|
+
window.removeEventListener('resize', this._handleResize);
|
|
154
|
+
this.removeEventListener('transitionend', this._boundHandleTransitionEnd);
|
|
155
|
+
if (this._resizeDebounceTimer !== null) {
|
|
156
|
+
window.cancelAnimationFrame(this._resizeDebounceTimer);
|
|
157
|
+
}
|
|
158
|
+
if (this._mutationDebounceTimer !== null) {
|
|
159
|
+
window.clearTimeout(this._mutationDebounceTimer);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
17
162
|
}
|
|
18
163
|
};
|
|
164
|
+
tslib_es6.__decorate([
|
|
165
|
+
decorators.property(),
|
|
166
|
+
tslib_es6.__metadata("design:type", Object)
|
|
167
|
+
], exports.HAccordionContent.prototype, "transitionName", void 0);
|
|
19
168
|
exports.HAccordionContent = tslib_es6.__decorate([
|
|
20
169
|
phoenix_custom_element.phoenixCustomElement('h-accordion-content'),
|
|
21
170
|
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;"}
|
|
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;"}
|
|
@@ -7,15 +7,23 @@ var lit = require('lit');
|
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
8
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
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 behavior_subject = require('../../core/classes/behavior_subject/behavior_subject.js');
|
|
13
|
+
var context_provider_controller = require('../../core/context/context_provider_controller.js');
|
|
10
14
|
var v4 = require('../../../../../external/uuid/dist/esm-browser/v4.js');
|
|
11
15
|
var accordion_constants = require('./accordion_constants.js');
|
|
16
|
+
var feature_flag_utils = require('../../../../utilities/build/esm/packages/utilities/src/feature_flag_utils.js');
|
|
12
17
|
var ref = require('lit/directives/ref');
|
|
18
|
+
var when = require('lit/directives/when');
|
|
13
19
|
|
|
14
20
|
exports.HAccordionGroup = class HAccordionGroup extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
15
21
|
constructor() {
|
|
16
|
-
super(
|
|
22
|
+
super();
|
|
17
23
|
this.opened = false;
|
|
18
24
|
this._isDisabled = false;
|
|
25
|
+
this._regionId = typeof self.crypto.randomUUID === 'function' ? self.crypto.randomUUID() : (Math.random() + 1).toString(36).substring(3);
|
|
26
|
+
this._controlsId = typeof self.crypto.randomUUID === 'function' ? self.crypto.randomUUID() : (Math.random() + 1).toString(36).substring(3);
|
|
19
27
|
this._mode = accordion_constants.ACCORDION_MODE.multi;
|
|
20
28
|
this._$parentAccordion = null;
|
|
21
29
|
this._detailsRef = ref.createRef();
|
|
@@ -40,83 +48,190 @@ exports.HAccordionGroup = class HAccordionGroup extends phoenix_light_lit_elemen
|
|
|
40
48
|
$accordionGroup.hide();
|
|
41
49
|
});
|
|
42
50
|
};
|
|
51
|
+
this._accordionToggle = () => {
|
|
52
|
+
this.toggle();
|
|
53
|
+
};
|
|
43
54
|
this._summaryClickHandler = (ev) => {
|
|
44
55
|
ev.preventDefault();
|
|
45
56
|
if (!this._isDisabled)
|
|
46
57
|
this.toggle();
|
|
47
58
|
};
|
|
59
|
+
this._isDevAccordionOptimizationFlagEnabled = feature_flag_utils.FeatureFlagUtils.isEnabled('dev_accordion_optimization');
|
|
60
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
61
|
+
this._accordionGroupPropsSubject = new behavior_subject.BehaviorSubject(this._getProps());
|
|
62
|
+
this._accordionGroupContext = new context_provider_controller.ContextProviderController(this);
|
|
63
|
+
this._accordionGroupContext.provide(accordion_constants.ACCORDION_CONTEXTS.accordionGroupProps, this._accordionGroupPropsSubject);
|
|
64
|
+
this.setAttribute('role', 'none');
|
|
65
|
+
}
|
|
48
66
|
}
|
|
49
67
|
connectedCallback() {
|
|
50
68
|
var _a;
|
|
51
69
|
super.connectedCallback();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
71
|
+
this._$parentAccordion = this.closest('h-accordion');
|
|
72
|
+
(_a = this._$parentAccordion) === null || _a === void 0 ? void 0 : _a.addEventListener(accordion_constants.ACCORDION_EVENTS.update, this._syncWithParentAccordion);
|
|
73
|
+
this._syncWithParentAccordion();
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this._accordionContextConsumer = new context_consumer_controller.ContextConsumerController(this);
|
|
77
|
+
this._subscribeObserver();
|
|
78
|
+
this.addEventListener(accordion_constants.ACCORDION_EVENTS.toggle, this._accordionToggle);
|
|
79
|
+
}
|
|
55
80
|
}
|
|
56
81
|
firstUpdated(props) {
|
|
57
82
|
super.firstUpdated(props);
|
|
58
|
-
if (this.opened)
|
|
83
|
+
if (this.opened && this._isDevAccordionOptimizationFlagEnabled)
|
|
59
84
|
this.show();
|
|
60
85
|
}
|
|
86
|
+
async _subscribeObserver() {
|
|
87
|
+
this._accordionProps = await this._accordionContextConsumer.consumeAsync(accordion_constants.ACCORDION_CONTEXTS.accordionProps);
|
|
88
|
+
this._accordionPropsObserver = new observer.Observer((accordionProps) => {
|
|
89
|
+
this._mode = accordionProps.mode;
|
|
90
|
+
const hasAccordionBeenDisabled = accordionProps.disabled;
|
|
91
|
+
if (hasAccordionBeenDisabled) {
|
|
92
|
+
this.disable();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const hasAccordionBeenEnabled = accordionProps.disabled === false;
|
|
96
|
+
if (hasAccordionBeenEnabled) {
|
|
97
|
+
this.enable();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
this._accordionProps.subscribe(this._accordionPropsObserver);
|
|
102
|
+
}
|
|
61
103
|
disconnectedCallback() {
|
|
62
104
|
var _a;
|
|
63
105
|
super.disconnectedCallback();
|
|
64
|
-
(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
106
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
107
|
+
(_a = this._$parentAccordion) === null || _a === void 0 ? void 0 : _a.removeEventListener(accordion_constants.ACCORDION_EVENTS.update, this._syncWithParentAccordion);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this._accordionProps.unsubscribe(this._accordionPropsObserver);
|
|
111
|
+
this.removeEventListener(accordion_constants.ACCORDION_EVENTS.toggle, this._accordionToggle);
|
|
69
112
|
}
|
|
70
|
-
}
|
|
71
|
-
toggle() {
|
|
72
|
-
this._handleSingleModeConstraint();
|
|
73
|
-
const $details = this._detailsRef.value;
|
|
74
|
-
if (!$details)
|
|
75
|
-
return;
|
|
76
|
-
const isOpen = $details.hasAttribute('open');
|
|
77
|
-
isOpen ? this.hide() : this.show();
|
|
78
113
|
}
|
|
79
114
|
show() {
|
|
80
|
-
this.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
116
|
+
this._handleSingleModeConstraint();
|
|
117
|
+
const $details = this._detailsRef.value;
|
|
118
|
+
if (!$details)
|
|
119
|
+
return;
|
|
120
|
+
$details.setAttribute('open', '');
|
|
121
|
+
requestAnimationFrame(() => {
|
|
122
|
+
$details.classList.add(accordion_constants.ACCORDION_CSS_CLASSES.open);
|
|
123
|
+
});
|
|
124
|
+
this._dispatchToggleEvent($details, true);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
if (this._mode === accordion_constants.ACCORDION_MODE.single)
|
|
128
|
+
this._closeOtherAccordionGroups();
|
|
129
|
+
this.opened = true;
|
|
130
|
+
}
|
|
89
131
|
}
|
|
90
132
|
hide() {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
133
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
134
|
+
const $details = this._detailsRef.value;
|
|
135
|
+
if (!$details)
|
|
136
|
+
return;
|
|
137
|
+
$details.classList.remove(accordion_constants.ACCORDION_CSS_CLASSES.open);
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
$details.removeAttribute('open');
|
|
140
|
+
}, accordion_constants.ACCORDION_ANIMATION_DURATION);
|
|
141
|
+
this._dispatchToggleEvent($details, false);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.opened = false;
|
|
145
|
+
}
|
|
99
146
|
}
|
|
100
147
|
_dispatchToggleEvent($details, open) {
|
|
101
148
|
this.emitCustomEvent(accordion_constants.ACCORDION_EVENTS.toggle, {
|
|
102
149
|
detail: { open, target: $details }
|
|
103
150
|
});
|
|
104
151
|
}
|
|
152
|
+
toggle() {
|
|
153
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
154
|
+
this._handleSingleModeConstraint();
|
|
155
|
+
const $details = this._detailsRef.value;
|
|
156
|
+
if (!$details)
|
|
157
|
+
return;
|
|
158
|
+
const isOpen = $details.hasAttribute('open');
|
|
159
|
+
isOpen ? this.hide() : this.show();
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
if (this._mode === accordion_constants.ACCORDION_MODE.single)
|
|
163
|
+
this._closeOtherAccordionGroups();
|
|
164
|
+
this.opened = !this.opened;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
_handleSingleModeConstraint() {
|
|
168
|
+
if (this._mode === accordion_constants.ACCORDION_MODE.single) {
|
|
169
|
+
this._hideOtherDetailsGroups();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
105
172
|
enable() {
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
173
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
174
|
+
if (!this._isDisabled)
|
|
175
|
+
return;
|
|
176
|
+
this._isDisabled = false;
|
|
177
|
+
this.hide();
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
if (this._isDisabled) {
|
|
181
|
+
this.addEventListener(accordion_constants.ACCORDION_EVENTS.toggle, this._accordionToggle);
|
|
182
|
+
this.hide();
|
|
183
|
+
this._isDisabled = false;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
110
186
|
}
|
|
111
187
|
disable() {
|
|
112
|
-
if (this.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
188
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
189
|
+
if (this._isDisabled)
|
|
190
|
+
return;
|
|
191
|
+
this._isDisabled = true;
|
|
192
|
+
this.show();
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
if (!this._isDisabled) {
|
|
196
|
+
this.removeEventListener(accordion_constants.ACCORDION_EVENTS.toggle, this._accordionToggle);
|
|
197
|
+
this.show();
|
|
198
|
+
this._isDisabled = true;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
_closeOtherAccordionGroups() {
|
|
203
|
+
if (!this._isDisabled) {
|
|
204
|
+
const $accordion = this.closest('h-accordion');
|
|
205
|
+
const $accordionGroups = [...$accordion.querySelectorAll('h-accordion-group')];
|
|
206
|
+
const $otherAccordionGroupsWithinAccordion = $accordionGroups.filter(($accordionGroup) => $accordionGroup !== this);
|
|
207
|
+
$otherAccordionGroupsWithinAccordion.forEach(($accordionGroup) => $accordionGroup.hide());
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
notify() {
|
|
211
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
212
|
+
this._accordionGroupPropsSubject.notify(this._getProps());
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
updated(_changedProperties) {
|
|
216
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
217
|
+
if (_changedProperties.has('opened') ||
|
|
218
|
+
_changedProperties.has('_isDisabled') ||
|
|
219
|
+
_changedProperties.has('_regionId') ||
|
|
220
|
+
_changedProperties.has('_controlsId')) {
|
|
221
|
+
this.notify();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
_getProps() {
|
|
226
|
+
return {
|
|
227
|
+
opened: this.opened,
|
|
228
|
+
disabled: this._isDisabled,
|
|
229
|
+
regionId: this._regionId,
|
|
230
|
+
controlsId: this._controlsId
|
|
231
|
+
};
|
|
116
232
|
}
|
|
117
|
-
notify() { }
|
|
118
233
|
render() {
|
|
119
|
-
return lit.html `
|
|
234
|
+
return when.when(this._isDevAccordionOptimizationFlagEnabled, () => lit.html `
|
|
120
235
|
<details
|
|
121
236
|
${ref.ref(this._detailsRef)}
|
|
122
237
|
class="accordion__details ${this._isDisabled ? 'accordion__details_disabled' : ''}"
|
|
@@ -133,7 +248,7 @@ exports.HAccordionGroup = class HAccordionGroup extends phoenix_light_lit_elemen
|
|
|
133
248
|
|
|
134
249
|
${this.getSlot('content')}
|
|
135
250
|
</details>
|
|
136
|
-
|
|
251
|
+
`);
|
|
137
252
|
}
|
|
138
253
|
};
|
|
139
254
|
tslib_es6.__decorate([
|
|
@@ -144,11 +259,20 @@ tslib_es6.__decorate([
|
|
|
144
259
|
decorators.state(),
|
|
145
260
|
tslib_es6.__metadata("design:type", Object)
|
|
146
261
|
], exports.HAccordionGroup.prototype, "_isDisabled", void 0);
|
|
262
|
+
tslib_es6.__decorate([
|
|
263
|
+
decorators.state(),
|
|
264
|
+
tslib_es6.__metadata("design:type", Object)
|
|
265
|
+
], exports.HAccordionGroup.prototype, "_regionId", void 0);
|
|
266
|
+
tslib_es6.__decorate([
|
|
267
|
+
decorators.state(),
|
|
268
|
+
tslib_es6.__metadata("design:type", Object)
|
|
269
|
+
], exports.HAccordionGroup.prototype, "_controlsId", void 0);
|
|
147
270
|
tslib_es6.__decorate([
|
|
148
271
|
decorators.state(),
|
|
149
272
|
tslib_es6.__metadata("design:type", String)
|
|
150
273
|
], exports.HAccordionGroup.prototype, "_mode", void 0);
|
|
151
274
|
exports.HAccordionGroup = tslib_es6.__decorate([
|
|
152
|
-
phoenix_custom_element.phoenixCustomElement('h-accordion-group')
|
|
275
|
+
phoenix_custom_element.phoenixCustomElement('h-accordion-group'),
|
|
276
|
+
tslib_es6.__metadata("design:paramtypes", [])
|
|
153
277
|
], exports.HAccordionGroup);
|
|
154
278
|
//# sourceMappingURL=accordion_group.js.map
|
|
@@ -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,iBAAiB,qDAAyD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB,qDAAyD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,13 +3,69 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
6
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
7
8
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
9
|
+
var observer = require('../../core/classes/observer/observer.js');
|
|
10
|
+
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
11
|
+
var accordion_constants = require('./accordion_constants.js');
|
|
12
|
+
var accordion = require('./accordion.js');
|
|
8
13
|
|
|
9
14
|
exports.HAccordionToggler = class HAccordionToggler extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
10
15
|
constructor() {
|
|
11
16
|
super();
|
|
12
|
-
this.
|
|
17
|
+
this._emitTogglerClickedWithKeyboard = (ev) => {
|
|
18
|
+
if (ev.key !== ' ' && ev.key !== 'Enter')
|
|
19
|
+
return;
|
|
20
|
+
if (this.getAttribute('aria-disabled') === 'true')
|
|
21
|
+
return;
|
|
22
|
+
this._emitTogglerClicked();
|
|
23
|
+
};
|
|
24
|
+
this._emitTogglerClicked = () => {
|
|
25
|
+
this.emitCustomEvent(accordion_constants.ACCORDION_EVENTS.toggle);
|
|
26
|
+
};
|
|
27
|
+
this._isDevAccordionOptimizationFlagEnabled = utilities.FeatureFlagUtils.isEnabled('dev_accordion_optimization');
|
|
28
|
+
if (this._isDevAccordionOptimizationFlagEnabled) {
|
|
29
|
+
if (this.parentElement instanceof accordion.HAccordion) {
|
|
30
|
+
this.slot = this.hasAttribute('slot') ? this.slot : 'content';
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const contentToSlot = utilities.UiDomUtils.findParentByCondition(this, ($el) => $el.parentElement instanceof accordion.HAccordion);
|
|
34
|
+
contentToSlot === null || contentToSlot === void 0 ? void 0 : contentToSlot.setAttribute('slot', 'content');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this._contextConsumer = new context_consumer_controller.ContextConsumerController(this);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async connectedCallback() {
|
|
42
|
+
super.connectedCallback();
|
|
43
|
+
if (!this._isDevAccordionOptimizationFlagEnabled) {
|
|
44
|
+
this._accordionGroupProps = await this._contextConsumer.consumeAsync(accordion_constants.ACCORDION_CONTEXTS.accordionGroupProps);
|
|
45
|
+
this._accordionGroupPropsObserver = new observer.Observer((accordionProps) => this._setAttributes(accordionProps));
|
|
46
|
+
this._accordionGroupProps.subscribe(this._accordionGroupPropsObserver);
|
|
47
|
+
this.addEventListener('click', this._emitTogglerClicked);
|
|
48
|
+
this.addEventListener('keydown', this._emitTogglerClickedWithKeyboard);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
_setAttributes({ regionId, opened, controlsId, disabled }) {
|
|
52
|
+
this.setAttribute('id', regionId);
|
|
53
|
+
this.setAttribute('aria-expanded', opened ? 'true' : 'false');
|
|
54
|
+
this.setAttribute('aria-controls', controlsId);
|
|
55
|
+
this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
|
|
56
|
+
if (disabled) {
|
|
57
|
+
this.removeAttribute('role');
|
|
58
|
+
this.setAttribute('tabindex', '-1');
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.setAttribute('role', 'button');
|
|
62
|
+
this.setAttribute('tabindex', '0');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
disconnectedCallback() {
|
|
66
|
+
if (this._accordionGroupProps && !this._isDevAccordionOptimizationFlagEnabled) {
|
|
67
|
+
this._accordionGroupProps.unsubscribe(this._accordionGroupPropsObserver);
|
|
68
|
+
}
|
|
13
69
|
}
|
|
14
70
|
};
|
|
15
71
|
exports.HAccordionToggler = tslib_es6.__decorate([
|
|
@@ -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;"}
|
|
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;"}
|