@shoper/phoenix_design_system 1.2.11-6 → 1.2.12
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/color_swatches/color_item/color_item.js +0 -6
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js +19 -34
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +6 -32
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js +0 -4
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js +1 -2
- package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/select.js +8 -12
- package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +7 -9
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js +0 -6
- package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.d.ts +3 -5
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js +20 -35
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js +1 -1
- package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_types.d.ts +3 -4
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.d.ts +0 -6
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +8 -34
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.d.ts +0 -3
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js +1 -4
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js +1 -2
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/select.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/form/select/select.js +8 -12
- package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/slider/slider_types.d.ts +2 -5
- package/build/esm/packages/phoenix/src/components/slider/slider_types.js.map +1 -1
- package/build/esm/packages/phoenix/src/index.d.ts +0 -2
- package/build/esm/packages/phoenix/src/index.js +1 -2
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -33,8 +33,6 @@ exports.HColorItem = class HColorItem extends phoenix_light_lit_element.PhoenixL
|
|
|
33
33
|
this.setAttribute('aria-label', this.label ? this.label : this.color);
|
|
34
34
|
this.unclickable && this.removeAttribute('tabindex');
|
|
35
35
|
this.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorItem);
|
|
36
|
-
if (!this.value)
|
|
37
|
-
this.value = this.color;
|
|
38
36
|
this.small && this.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorItemSmall);
|
|
39
37
|
}
|
|
40
38
|
attributeChangedCallback(name, value, newValue) {
|
|
@@ -60,10 +58,6 @@ tslib_es6.__decorate([
|
|
|
60
58
|
decorators.property({ type: String }),
|
|
61
59
|
tslib_es6.__metadata("design:type", String)
|
|
62
60
|
], exports.HColorItem.prototype, "color", void 0);
|
|
63
|
-
tslib_es6.__decorate([
|
|
64
|
-
decorators.property({ type: String }),
|
|
65
|
-
tslib_es6.__metadata("design:type", String)
|
|
66
|
-
], exports.HColorItem.prototype, "value", void 0);
|
|
67
61
|
tslib_es6.__decorate([
|
|
68
62
|
decorators.property({ type: String }),
|
|
69
63
|
tslib_es6.__metadata("design:type", String)
|
package/build/cjs/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map
CHANGED
|
@@ -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;
|
|
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;"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
|
-
var utilities = require('@dreamcommerce/utilities');
|
|
8
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
8
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
10
9
|
var color_swatches_constants = require('./color_swatches_constants.js');
|
|
@@ -18,45 +17,24 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
18
17
|
this.selectedColors = [];
|
|
19
18
|
this._handleColorClicked = ({ target }) => {
|
|
20
19
|
const $colorItem = target;
|
|
21
|
-
this.
|
|
20
|
+
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
|
|
22
21
|
};
|
|
23
|
-
this.
|
|
24
|
-
const detail =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
}, {
|
|
30
|
-
colors: [],
|
|
31
|
-
values: []
|
|
32
|
-
});
|
|
33
|
-
this.dispatchEvent(new CustomEvent(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.change, {
|
|
22
|
+
this._dispatchColorSelectEvent = () => {
|
|
23
|
+
const detail = {
|
|
24
|
+
colors: this._setColorsDispatchValue(this.selectedColors)
|
|
25
|
+
};
|
|
26
|
+
this.dispatchEvent(new CustomEvent(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.selected, {
|
|
34
27
|
bubbles: true,
|
|
35
28
|
detail
|
|
36
29
|
}));
|
|
37
30
|
};
|
|
38
31
|
}
|
|
39
|
-
selectColors($colors) {
|
|
40
|
-
const colorsArr = utilities.ArrayUtils.makeAsArray($colors);
|
|
41
|
-
if (!colorsArr.length) {
|
|
42
|
-
this.clearAllColors();
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
colorsArr.forEach(($color) => this._toggleColorItem($color));
|
|
46
|
-
}
|
|
47
|
-
clearAllColors() {
|
|
48
|
-
[...this.selectedColors].forEach(($color) => {
|
|
49
|
-
this._toggleColorItem($color);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
32
|
connectedCallback() {
|
|
53
33
|
super.connectedCallback();
|
|
54
34
|
this._setupEvents();
|
|
55
35
|
this._addCssClasses();
|
|
56
36
|
this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
|
|
57
37
|
this._showAllItemsEvent();
|
|
58
|
-
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
|
|
59
|
-
this._$colors = [...this.querySelectorAll('h-color-item')];
|
|
60
38
|
}
|
|
61
39
|
_addCssClasses() {
|
|
62
40
|
this.querySelectorAll(color_swatches_constants.COLOR_ITEM_TAG_NAME).forEach(($colorItem) => $colorItem.classList.add(color_swatches_constants.COLOR_SWATCHES_CSS_CLASSES.colorSwatchesItem));
|
|
@@ -81,15 +59,12 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
81
59
|
_setupEvents() {
|
|
82
60
|
this.addEventListener(color_item_constants.COLOR_ITEM_EVENT_NAMES.selected, this._handleColorClicked);
|
|
83
61
|
}
|
|
84
|
-
_toggleColorItem($colorItem) {
|
|
85
|
-
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
|
|
86
|
-
}
|
|
87
62
|
_handleColorClickedForMultipleMode($colorItem) {
|
|
88
63
|
!this._isColorAlreadyExistInArray($colorItem)
|
|
89
64
|
? (this.selectedColors = [...this.selectedColors, $colorItem])
|
|
90
65
|
: this._removeExistingColorFromArray($colorItem);
|
|
91
66
|
this._toggleSelectedAttribute($colorItem);
|
|
92
|
-
this.
|
|
67
|
+
this._dispatchColorSelectEvent();
|
|
93
68
|
}
|
|
94
69
|
_handleColorClickedForSingleMode($colorItem) {
|
|
95
70
|
const $previouslySelected = this.selectedColors[0];
|
|
@@ -97,7 +72,7 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
97
72
|
if ($previouslySelected && $previouslySelected !== $colorItem)
|
|
98
73
|
$previouslySelected.removeAttribute(color_item_constants.COLOR_ITEM_SELECTED_ATTRIBUTE);
|
|
99
74
|
this.selectedColors = $previouslySelected === $colorItem ? [] : [$colorItem];
|
|
100
|
-
this.
|
|
75
|
+
this._dispatchColorSelectEvent();
|
|
101
76
|
}
|
|
102
77
|
_toggleSelectedAttribute($colorItem) {
|
|
103
78
|
$colorItem.hasAttribute(color_item_constants.COLOR_ITEM_SELECTED_ATTRIBUTE)
|
|
@@ -111,6 +86,16 @@ exports.HColorSwatches = class HColorSwatches extends phoenix_light_lit_element.
|
|
|
111
86
|
const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
|
|
112
87
|
this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
|
|
113
88
|
}
|
|
89
|
+
_setColorsDispatchValue(selectedColors) {
|
|
90
|
+
if (this.selectedColors.length > 1)
|
|
91
|
+
return this._getOnlyColorValues(selectedColors);
|
|
92
|
+
if (this.selectedColors.length === 1)
|
|
93
|
+
return selectedColors[0].color;
|
|
94
|
+
return '';
|
|
95
|
+
}
|
|
96
|
+
_getOnlyColorValues(selectedColors) {
|
|
97
|
+
return selectedColors.map((selectedColor) => selectedColor.color);
|
|
98
|
+
}
|
|
114
99
|
};
|
|
115
100
|
tslib_es6.__decorate([
|
|
116
101
|
decorators.property({ type: Boolean }),
|
|
@@ -121,7 +106,7 @@ tslib_es6.__decorate([
|
|
|
121
106
|
tslib_es6.__metadata("design:type", Number)
|
|
122
107
|
], exports.HColorSwatches.prototype, "numberOfVisibleColors", void 0);
|
|
123
108
|
tslib_es6.__decorate([
|
|
124
|
-
decorators.
|
|
109
|
+
decorators.state(),
|
|
125
110
|
tslib_es6.__metadata("design:type", Array)
|
|
126
111
|
], exports.HColorSwatches.prototype, "selectedColors", void 0);
|
|
127
112
|
exports.HColorSwatches = 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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
|
package/build/cjs/packages/phoenix/src/components/color_swatches/color_swatches_constants.js
CHANGED
|
@@ -12,7 +12,7 @@ const COLOR_SWATCHES_CSS_CLASSES = {
|
|
|
12
12
|
colorSwatchesItem: `${colorSwatchesBaseCssClass}__color-item`
|
|
13
13
|
};
|
|
14
14
|
const COLOR_SWATCHES_EVENT_NAMES = {
|
|
15
|
-
|
|
15
|
+
selected: 'colorSwatchesSelected',
|
|
16
16
|
markDisabledItems: 'markDisabledItems'
|
|
17
17
|
};
|
|
18
18
|
const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var lit = require('lit');
|
|
7
7
|
var decorators = require('lit/decorators');
|
|
8
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
8
9
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
10
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
10
11
|
var index = require('../../../../external/classnames/index.js');
|
|
@@ -17,18 +18,6 @@ exports.HColorSwatchesControl = class HColorSwatchesControl extends phoenix_ligh
|
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.selectedColors = [];
|
|
19
20
|
}
|
|
20
|
-
selectColors(values) {
|
|
21
|
-
if (!this._$colorSwatches)
|
|
22
|
-
return;
|
|
23
|
-
const $colors = values === null || values === void 0 ? void 0 : values.map((value) => this.querySelector(`h-color-item[value="${value}"]`)).filter(($color) => $color);
|
|
24
|
-
this._$colorSwatches.selectColors($colors);
|
|
25
|
-
this.requestUpdate();
|
|
26
|
-
}
|
|
27
|
-
clearAllColors() {
|
|
28
|
-
var _a;
|
|
29
|
-
(_a = this._$colorSwatches) === null || _a === void 0 ? void 0 : _a.clearAllColors();
|
|
30
|
-
this.requestUpdate();
|
|
31
|
-
}
|
|
32
21
|
connectedCallback() {
|
|
33
22
|
super.connectedCallback();
|
|
34
23
|
this._setupEvents();
|
|
@@ -37,28 +26,13 @@ exports.HColorSwatchesControl = class HColorSwatchesControl extends phoenix_ligh
|
|
|
37
26
|
[color_swatches_control_constants.COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlDisabled]: this.disabled,
|
|
38
27
|
[color_swatches_control_constants.COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlError]: this.error
|
|
39
28
|
});
|
|
40
|
-
this._$colorSwatches = this.querySelector('h-color-swatches');
|
|
41
29
|
if (cssClasses)
|
|
42
30
|
this.classList.add(cssClasses);
|
|
43
|
-
this._getSelectedColors();
|
|
44
|
-
}
|
|
45
|
-
_getSelectedColors() {
|
|
46
|
-
this.selectedColors = this._getSelectedColorItems().map((selectedColor) => { var _a; return (_a = selectedColor.value) !== null && _a !== void 0 ? _a : selectedColor.color; });
|
|
47
|
-
}
|
|
48
|
-
_getAllColorItems() {
|
|
49
|
-
return [...this.querySelectorAll('h-color-item[selected]')];
|
|
50
|
-
}
|
|
51
|
-
_getSelectedColorItems() {
|
|
52
|
-
return this._getAllColorItems().filter(($color) => $color.selected);
|
|
53
31
|
}
|
|
54
32
|
_setupEvents() {
|
|
55
|
-
this.addEventListener(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.
|
|
56
|
-
event.
|
|
57
|
-
this.selectedColors =
|
|
58
|
-
this.dispatchEvent(new CustomEvent(color_swatches_control_constants.COLOR_SWATCHES_CONTROL_EVENT_NAMES.change, {
|
|
59
|
-
bubbles: true,
|
|
60
|
-
detail: event.detail
|
|
61
|
-
}));
|
|
33
|
+
this.addEventListener(color_swatches_constants.COLOR_SWATCHES_EVENT_NAMES.selected, (event) => {
|
|
34
|
+
const eventValue = event.detail.colors;
|
|
35
|
+
this.selectedColors = eventValue ? utilities.ArrayUtils.makeAsArray(eventValue) : [];
|
|
62
36
|
});
|
|
63
37
|
}
|
|
64
38
|
render() {
|
|
@@ -74,7 +48,7 @@ tslib_es6.__decorate([
|
|
|
74
48
|
tslib_es6.__metadata("design:type", String)
|
|
75
49
|
], exports.HColorSwatchesControl.prototype, "controlId", void 0);
|
|
76
50
|
tslib_es6.__decorate([
|
|
77
|
-
decorators.property({ type: String
|
|
51
|
+
decorators.property({ type: String }),
|
|
78
52
|
tslib_es6.__metadata("design:type", String)
|
|
79
53
|
], exports.HColorSwatchesControl.prototype, "controlName", void 0);
|
|
80
54
|
tslib_es6.__decorate([
|
|
@@ -90,7 +64,7 @@ tslib_es6.__decorate([
|
|
|
90
64
|
tslib_es6.__metadata("design:type", Boolean)
|
|
91
65
|
], exports.HColorSwatchesControl.prototype, "error", void 0);
|
|
92
66
|
tslib_es6.__decorate([
|
|
93
|
-
decorators.
|
|
67
|
+
decorators.state(),
|
|
94
68
|
tslib_es6.__metadata("design:type", Array)
|
|
95
69
|
], exports.HColorSwatchesControl.prototype, "selectedColors", void 0);
|
|
96
70
|
exports.HColorSwatchesControl = tslib_es6.__decorate([
|
|
@@ -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,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,11 +7,7 @@ const COLOR_SWATCHES_CONTROL_CSS_CLASSES = {
|
|
|
7
7
|
colorSwatchesControl: baseColorSwatchesControlClass,
|
|
8
8
|
colorSwatchesControlDisabled: `${baseColorSwatchesControlClass}_disabled`,
|
|
9
9
|
colorSwatchesControlError: `${baseColorSwatchesControlClass}_error`
|
|
10
|
-
};
|
|
11
|
-
const COLOR_SWATCHES_CONTROL_EVENT_NAMES = {
|
|
12
|
-
change: 'colorSwatchesControl.change'
|
|
13
10
|
};
|
|
14
11
|
|
|
15
12
|
exports.COLOR_SWATCHES_CONTROL_CSS_CLASSES = COLOR_SWATCHES_CONTROL_CSS_CLASSES;
|
|
16
|
-
exports.COLOR_SWATCHES_CONTROL_EVENT_NAMES = COLOR_SWATCHES_CONTROL_EVENT_NAMES;
|
|
17
13
|
//# sourceMappingURL=color_swatches_control_constants.js.map
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -63,7 +63,6 @@ exports.HFilePicker = class HFilePicker extends phoenix_light_lit_element.Phoeni
|
|
|
63
63
|
super.connectedCallback();
|
|
64
64
|
this._addEventListeners();
|
|
65
65
|
const cssClasses = index['default']({
|
|
66
|
-
[file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePicker]: true,
|
|
67
66
|
[file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePickerDisabled]: this.disabled,
|
|
68
67
|
[file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePickerRequired]: this.required,
|
|
69
68
|
[file_picker_constants.FILE_PICKER_CONTROL_CSS_CLASSES.filePickerError]: this.error
|
|
@@ -96,7 +95,7 @@ exports.HFilePicker = class HFilePicker extends phoenix_light_lit_element.Phoeni
|
|
|
96
95
|
/>`
|
|
97
96
|
: lit.nothing}
|
|
98
97
|
${((_b = this._file) === null || _b === void 0 ? void 0 : _b.name)
|
|
99
|
-
? lit.html
|
|
98
|
+
? lit.html `<h-file
|
|
100
99
|
name="${this._file.name}"
|
|
101
100
|
id="${this._file.id}"
|
|
102
101
|
remove-button-text="${this.removeButtonText}"
|
|
@@ -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,oBAAoB,0CAA8C;AAClE;AACA,iBAAiB,wDAA4D;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB,0CAA8C;AAClE;AACA,iBAAiB,wDAA4D;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -75,7 +75,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
75
75
|
select_utils.SelectControlUtils.syncHTMLOptionWithModel(option, $option);
|
|
76
76
|
if (!selected)
|
|
77
77
|
return;
|
|
78
|
-
this.
|
|
78
|
+
$option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
81
|
this._handleOptionClicked = (event) => {
|
|
@@ -96,9 +96,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
96
96
|
this._dispatchChangeEvent();
|
|
97
97
|
};
|
|
98
98
|
this._dispatchChangeEvent = () => {
|
|
99
|
-
this.dispatchEvent(new Event('change'
|
|
100
|
-
bubbles: true
|
|
101
|
-
}));
|
|
99
|
+
this.dispatchEvent(new Event('change'));
|
|
102
100
|
};
|
|
103
101
|
this._handleResize = debounce['default'](() => {
|
|
104
102
|
this._closeSelect();
|
|
@@ -121,8 +119,11 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
121
119
|
}
|
|
122
120
|
set selectedIndex(index) {
|
|
123
121
|
const option = Object.values(this._$options)[index];
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
if (!option) {
|
|
123
|
+
this._selectController.deselectAll();
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
this._selectOption(option.value);
|
|
126
127
|
}
|
|
127
128
|
get selectedOptions() {
|
|
128
129
|
var _a;
|
|
@@ -209,15 +210,10 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
209
210
|
const { value, selected } = option;
|
|
210
211
|
const $option = select_utils.SelectControlUtils.createHTMLOption(option);
|
|
211
212
|
if (selected)
|
|
212
|
-
this.
|
|
213
|
+
$option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
|
|
213
214
|
this._$options[value] = $option;
|
|
214
215
|
select_utils.SelectControlUtils.appendHTMLOption($option, $list, position);
|
|
215
216
|
}
|
|
216
|
-
updateOptionAriaAttribute($option) {
|
|
217
|
-
!$option.selected
|
|
218
|
-
? $option.removeAttribute(this.multiple ? 'aria-checked' : 'aria-selected')
|
|
219
|
-
: $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
|
|
220
|
-
}
|
|
221
217
|
_removeHTMLOptions(optionsValues) {
|
|
222
218
|
this._$options = select_utils.SelectControlUtils.removeHTMLOptions(Object.values(this._$options), optionsValues);
|
|
223
219
|
}
|
|
@@ -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,uBAAuB,+CAAmD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uBAAuB,+CAAmD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -69,10 +69,9 @@ var toggle_button_group = require('./components/groups/toggle_button_group/toggl
|
|
|
69
69
|
var toggle_button = require('./components/groups/toggle_button_group/toggle_button.js');
|
|
70
70
|
var click_outside_controller_messages = require('./controllers/click_outside_controller/click_outside_controller_messages.js');
|
|
71
71
|
var backdrop = require('./components/backdrop/backdrop.js');
|
|
72
|
-
var
|
|
72
|
+
var color_swatches_control = require('./components/form/color_swatches_control/color_swatches_control.js');
|
|
73
73
|
var color_item = require('./components/color_swatches/color_item/color_item.js');
|
|
74
74
|
var color_swatches = require('./components/color_swatches/color_swatches.js');
|
|
75
|
-
var color_swatches_control = require('./components/form/color_swatches_control/color_swatches_control.js');
|
|
76
75
|
var show_more = require('./components/color_swatches/show-more/show_more.js');
|
|
77
76
|
var visibility_controller = require('./controllers/visibility_controller/visibility_controller.js');
|
|
78
77
|
var slider = require('./components/slider/slider.js');
|
|
@@ -422,23 +421,22 @@ Object.defineProperty(exports, 'HBackdrop', {
|
|
|
422
421
|
return backdrop.HBackdrop;
|
|
423
422
|
}
|
|
424
423
|
});
|
|
425
|
-
exports
|
|
426
|
-
Object.defineProperty(exports, 'HColorItem', {
|
|
424
|
+
Object.defineProperty(exports, 'HColorSwatchesControl', {
|
|
427
425
|
enumerable: true,
|
|
428
426
|
get: function () {
|
|
429
|
-
return
|
|
427
|
+
return color_swatches_control.HColorSwatchesControl;
|
|
430
428
|
}
|
|
431
429
|
});
|
|
432
|
-
Object.defineProperty(exports, '
|
|
430
|
+
Object.defineProperty(exports, 'HColorItem', {
|
|
433
431
|
enumerable: true,
|
|
434
432
|
get: function () {
|
|
435
|
-
return
|
|
433
|
+
return color_item.HColorItem;
|
|
436
434
|
}
|
|
437
435
|
});
|
|
438
|
-
Object.defineProperty(exports, '
|
|
436
|
+
Object.defineProperty(exports, 'HColorSwatches', {
|
|
439
437
|
enumerable: true,
|
|
440
438
|
get: function () {
|
|
441
|
-
return
|
|
439
|
+
return color_swatches.HColorSwatches;
|
|
442
440
|
}
|
|
443
441
|
});
|
|
444
442
|
Object.defineProperty(exports, 'HColorSwatchesShowMore', {
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,7 +1,6 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HColorItem extends PhoenixLightLitElement {
|
|
3
3
|
color: string;
|
|
4
|
-
value: string;
|
|
5
4
|
label?: string;
|
|
6
5
|
disabled: boolean;
|
|
7
6
|
selected: boolean;
|
|
@@ -29,8 +29,6 @@ let HColorItem = class HColorItem extends PhoenixLightLitElement {
|
|
|
29
29
|
this.setAttribute('aria-label', this.label ? this.label : this.color);
|
|
30
30
|
this.unclickable && this.removeAttribute('tabindex');
|
|
31
31
|
this.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorItem);
|
|
32
|
-
if (!this.value)
|
|
33
|
-
this.value = this.color;
|
|
34
32
|
this.small && this.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorItemSmall);
|
|
35
33
|
}
|
|
36
34
|
attributeChangedCallback(name, value, newValue) {
|
|
@@ -56,10 +54,6 @@ __decorate([
|
|
|
56
54
|
property({ type: String }),
|
|
57
55
|
__metadata("design:type", String)
|
|
58
56
|
], HColorItem.prototype, "color", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
property({ type: String }),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], HColorItem.prototype, "value", void 0);
|
|
63
57
|
__decorate([
|
|
64
58
|
property({ type: String }),
|
|
65
59
|
__metadata("design:type", String)
|
package/build/esm/packages/phoenix/src/components/color_swatches/color_item/color_item.js.map
CHANGED
|
@@ -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;
|
|
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;"}
|
|
@@ -4,20 +4,18 @@ export declare class HColorSwatches extends PhoenixLightLitElement {
|
|
|
4
4
|
multiple: boolean;
|
|
5
5
|
numberOfVisibleColors: number;
|
|
6
6
|
selectedColors: HColorItem[];
|
|
7
|
-
private _$colors;
|
|
8
|
-
selectColors($colors: HColorItem[] | HColorItem): void;
|
|
9
|
-
clearAllColors(): void;
|
|
10
7
|
connectedCallback(): void;
|
|
11
8
|
private _addCssClasses;
|
|
12
9
|
private _hideItems;
|
|
13
10
|
private _showAllItemsEvent;
|
|
14
11
|
private _setupEvents;
|
|
15
12
|
private _handleColorClicked;
|
|
16
|
-
private _toggleColorItem;
|
|
17
13
|
private _handleColorClickedForMultipleMode;
|
|
18
14
|
private _handleColorClickedForSingleMode;
|
|
19
15
|
private _toggleSelectedAttribute;
|
|
20
16
|
private _isColorAlreadyExistInArray;
|
|
21
17
|
private _removeExistingColorFromArray;
|
|
22
|
-
private
|
|
18
|
+
private _dispatchColorSelectEvent;
|
|
19
|
+
private _setColorsDispatchValue;
|
|
20
|
+
private _getOnlyColorValues;
|
|
23
21
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { property } from 'lit/decorators';
|
|
3
|
-
import { ArrayUtils } from '@dreamcommerce/utilities';
|
|
2
|
+
import { property, state } from 'lit/decorators';
|
|
4
3
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
4
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
5
|
import { COLOR_SWATCHES_EVENT_NAMES, COLOR_ITEM_TAG_NAME, COLOR_SWATCHES_CSS_CLASSES, COLOR_SWATCHES_HIDDEN_ATTRIBUTE } from './color_swatches_constants.js';
|
|
@@ -14,45 +13,24 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
14
13
|
this.selectedColors = [];
|
|
15
14
|
this._handleColorClicked = ({ target }) => {
|
|
16
15
|
const $colorItem = target;
|
|
17
|
-
this.
|
|
16
|
+
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
|
|
18
17
|
};
|
|
19
|
-
this.
|
|
20
|
-
const detail =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
}, {
|
|
26
|
-
colors: [],
|
|
27
|
-
values: []
|
|
28
|
-
});
|
|
29
|
-
this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_EVENT_NAMES.change, {
|
|
18
|
+
this._dispatchColorSelectEvent = () => {
|
|
19
|
+
const detail = {
|
|
20
|
+
colors: this._setColorsDispatchValue(this.selectedColors)
|
|
21
|
+
};
|
|
22
|
+
this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_EVENT_NAMES.selected, {
|
|
30
23
|
bubbles: true,
|
|
31
24
|
detail
|
|
32
25
|
}));
|
|
33
26
|
};
|
|
34
27
|
}
|
|
35
|
-
selectColors($colors) {
|
|
36
|
-
const colorsArr = ArrayUtils.makeAsArray($colors);
|
|
37
|
-
if (!colorsArr.length) {
|
|
38
|
-
this.clearAllColors();
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
colorsArr.forEach(($color) => this._toggleColorItem($color));
|
|
42
|
-
}
|
|
43
|
-
clearAllColors() {
|
|
44
|
-
[...this.selectedColors].forEach(($color) => {
|
|
45
|
-
this._toggleColorItem($color);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
28
|
connectedCallback() {
|
|
49
29
|
super.connectedCallback();
|
|
50
30
|
this._setupEvents();
|
|
51
31
|
this._addCssClasses();
|
|
52
32
|
this.numberOfVisibleColors && this._hideItems(this.numberOfVisibleColors);
|
|
53
33
|
this._showAllItemsEvent();
|
|
54
|
-
this.selectedColors = [...this.querySelectorAll('h-color-item[selected]')];
|
|
55
|
-
this._$colors = [...this.querySelectorAll('h-color-item')];
|
|
56
34
|
}
|
|
57
35
|
_addCssClasses() {
|
|
58
36
|
this.querySelectorAll(COLOR_ITEM_TAG_NAME).forEach(($colorItem) => $colorItem.classList.add(COLOR_SWATCHES_CSS_CLASSES.colorSwatchesItem));
|
|
@@ -77,15 +55,12 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
77
55
|
_setupEvents() {
|
|
78
56
|
this.addEventListener(COLOR_ITEM_EVENT_NAMES.selected, this._handleColorClicked);
|
|
79
57
|
}
|
|
80
|
-
_toggleColorItem($colorItem) {
|
|
81
|
-
this.multiple ? this._handleColorClickedForMultipleMode($colorItem) : this._handleColorClickedForSingleMode($colorItem);
|
|
82
|
-
}
|
|
83
58
|
_handleColorClickedForMultipleMode($colorItem) {
|
|
84
59
|
!this._isColorAlreadyExistInArray($colorItem)
|
|
85
60
|
? (this.selectedColors = [...this.selectedColors, $colorItem])
|
|
86
61
|
: this._removeExistingColorFromArray($colorItem);
|
|
87
62
|
this._toggleSelectedAttribute($colorItem);
|
|
88
|
-
this.
|
|
63
|
+
this._dispatchColorSelectEvent();
|
|
89
64
|
}
|
|
90
65
|
_handleColorClickedForSingleMode($colorItem) {
|
|
91
66
|
const $previouslySelected = this.selectedColors[0];
|
|
@@ -93,7 +68,7 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
93
68
|
if ($previouslySelected && $previouslySelected !== $colorItem)
|
|
94
69
|
$previouslySelected.removeAttribute(COLOR_ITEM_SELECTED_ATTRIBUTE);
|
|
95
70
|
this.selectedColors = $previouslySelected === $colorItem ? [] : [$colorItem];
|
|
96
|
-
this.
|
|
71
|
+
this._dispatchColorSelectEvent();
|
|
97
72
|
}
|
|
98
73
|
_toggleSelectedAttribute($colorItem) {
|
|
99
74
|
$colorItem.hasAttribute(COLOR_ITEM_SELECTED_ATTRIBUTE)
|
|
@@ -107,6 +82,16 @@ let HColorSwatches = class HColorSwatches extends PhoenixLightLitElement {
|
|
|
107
82
|
const indexOfAlreadyExistingColor = this.selectedColors.indexOf($colorItem);
|
|
108
83
|
this.selectedColors.splice(indexOfAlreadyExistingColor, 1);
|
|
109
84
|
}
|
|
85
|
+
_setColorsDispatchValue(selectedColors) {
|
|
86
|
+
if (this.selectedColors.length > 1)
|
|
87
|
+
return this._getOnlyColorValues(selectedColors);
|
|
88
|
+
if (this.selectedColors.length === 1)
|
|
89
|
+
return selectedColors[0].color;
|
|
90
|
+
return '';
|
|
91
|
+
}
|
|
92
|
+
_getOnlyColorValues(selectedColors) {
|
|
93
|
+
return selectedColors.map((selectedColor) => selectedColor.color);
|
|
94
|
+
}
|
|
110
95
|
};
|
|
111
96
|
__decorate([
|
|
112
97
|
property({ type: Boolean }),
|
|
@@ -117,7 +102,7 @@ __decorate([
|
|
|
117
102
|
__metadata("design:type", Number)
|
|
118
103
|
], HColorSwatches.prototype, "numberOfVisibleColors", void 0);
|
|
119
104
|
__decorate([
|
|
120
|
-
|
|
105
|
+
state(),
|
|
121
106
|
__metadata("design:type", Array)
|
|
122
107
|
], HColorSwatches.prototype, "selectedColors", void 0);
|
|
123
108
|
HColorSwatches = __decorate([
|
|
@@ -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;
|
|
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;"}
|
package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const COLOR_SWATCHES_CSS_CLASSES: {
|
|
|
6
6
|
readonly colorSwatchesItem: "color-swatches__color-item";
|
|
7
7
|
};
|
|
8
8
|
export declare const COLOR_SWATCHES_EVENT_NAMES: {
|
|
9
|
-
readonly
|
|
9
|
+
readonly selected: "colorSwatchesSelected";
|
|
10
10
|
readonly markDisabledItems: "markDisabledItems";
|
|
11
11
|
};
|
|
12
12
|
export declare const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = "hidden";
|
package/build/esm/packages/phoenix/src/components/color_swatches/color_swatches_constants.js
CHANGED
|
@@ -8,7 +8,7 @@ const COLOR_SWATCHES_CSS_CLASSES = {
|
|
|
8
8
|
colorSwatchesItem: `${colorSwatchesBaseCssClass}__color-item`
|
|
9
9
|
};
|
|
10
10
|
const COLOR_SWATCHES_EVENT_NAMES = {
|
|
11
|
-
|
|
11
|
+
selected: 'colorSwatchesSelected',
|
|
12
12
|
markDisabledItems: 'markDisabledItems'
|
|
13
13
|
};
|
|
14
14
|
const COLOR_SWATCHES_HIDDEN_ATTRIBUTE = 'hidden';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
colors: string[];
|
|
3
|
-
|
|
4
|
-
};
|
|
1
|
+
export interface IColorSelectValue {
|
|
2
|
+
colors: string | string[] | undefined;
|
|
3
|
+
}
|
|
@@ -7,13 +7,7 @@ export declare class HColorSwatchesControl extends PhoenixLightLitElement {
|
|
|
7
7
|
required: boolean;
|
|
8
8
|
error: boolean;
|
|
9
9
|
selectedColors: string[];
|
|
10
|
-
selectColors(values: string[]): void;
|
|
11
|
-
clearAllColors(): void;
|
|
12
|
-
private _$colorSwatches;
|
|
13
10
|
connectedCallback(): void;
|
|
14
|
-
private _getSelectedColors;
|
|
15
|
-
private _getAllColorItems;
|
|
16
|
-
private _getSelectedColorItems;
|
|
17
11
|
private _setupEvents;
|
|
18
12
|
protected render(): TemplateResult | void;
|
|
19
13
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
|
-
import { property } from 'lit/decorators';
|
|
3
|
+
import { property, state } from 'lit/decorators';
|
|
4
|
+
import { ArrayUtils } from '@dreamcommerce/utilities';
|
|
4
5
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
6
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
7
|
import classnames from '../../../../external/classnames/index.js';
|
|
7
8
|
import { INPUT_CONTROL_TYPES } from '../input/input_constants.js';
|
|
8
|
-
import { COLOR_SWATCHES_CONTROL_CSS_CLASSES
|
|
9
|
+
import { COLOR_SWATCHES_CONTROL_CSS_CLASSES } from './color_swatches_control_constants.js';
|
|
9
10
|
import { COLOR_SWATCHES_EVENT_NAMES } from '../../color_swatches/color_swatches_constants.js';
|
|
10
11
|
|
|
11
12
|
let HColorSwatchesControl = class HColorSwatchesControl extends PhoenixLightLitElement {
|
|
@@ -13,18 +14,6 @@ let HColorSwatchesControl = class HColorSwatchesControl extends PhoenixLightLitE
|
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.selectedColors = [];
|
|
15
16
|
}
|
|
16
|
-
selectColors(values) {
|
|
17
|
-
if (!this._$colorSwatches)
|
|
18
|
-
return;
|
|
19
|
-
const $colors = values === null || values === void 0 ? void 0 : values.map((value) => this.querySelector(`h-color-item[value="${value}"]`)).filter(($color) => $color);
|
|
20
|
-
this._$colorSwatches.selectColors($colors);
|
|
21
|
-
this.requestUpdate();
|
|
22
|
-
}
|
|
23
|
-
clearAllColors() {
|
|
24
|
-
var _a;
|
|
25
|
-
(_a = this._$colorSwatches) === null || _a === void 0 ? void 0 : _a.clearAllColors();
|
|
26
|
-
this.requestUpdate();
|
|
27
|
-
}
|
|
28
17
|
connectedCallback() {
|
|
29
18
|
super.connectedCallback();
|
|
30
19
|
this._setupEvents();
|
|
@@ -33,28 +22,13 @@ let HColorSwatchesControl = class HColorSwatchesControl extends PhoenixLightLitE
|
|
|
33
22
|
[COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlDisabled]: this.disabled,
|
|
34
23
|
[COLOR_SWATCHES_CONTROL_CSS_CLASSES.colorSwatchesControlError]: this.error
|
|
35
24
|
});
|
|
36
|
-
this._$colorSwatches = this.querySelector('h-color-swatches');
|
|
37
25
|
if (cssClasses)
|
|
38
26
|
this.classList.add(cssClasses);
|
|
39
|
-
this._getSelectedColors();
|
|
40
|
-
}
|
|
41
|
-
_getSelectedColors() {
|
|
42
|
-
this.selectedColors = this._getSelectedColorItems().map((selectedColor) => { var _a; return (_a = selectedColor.value) !== null && _a !== void 0 ? _a : selectedColor.color; });
|
|
43
|
-
}
|
|
44
|
-
_getAllColorItems() {
|
|
45
|
-
return [...this.querySelectorAll('h-color-item[selected]')];
|
|
46
|
-
}
|
|
47
|
-
_getSelectedColorItems() {
|
|
48
|
-
return this._getAllColorItems().filter(($color) => $color.selected);
|
|
49
27
|
}
|
|
50
28
|
_setupEvents() {
|
|
51
|
-
this.addEventListener(COLOR_SWATCHES_EVENT_NAMES.
|
|
52
|
-
event.
|
|
53
|
-
this.selectedColors =
|
|
54
|
-
this.dispatchEvent(new CustomEvent(COLOR_SWATCHES_CONTROL_EVENT_NAMES.change, {
|
|
55
|
-
bubbles: true,
|
|
56
|
-
detail: event.detail
|
|
57
|
-
}));
|
|
29
|
+
this.addEventListener(COLOR_SWATCHES_EVENT_NAMES.selected, (event) => {
|
|
30
|
+
const eventValue = event.detail.colors;
|
|
31
|
+
this.selectedColors = eventValue ? ArrayUtils.makeAsArray(eventValue) : [];
|
|
58
32
|
});
|
|
59
33
|
}
|
|
60
34
|
render() {
|
|
@@ -70,7 +44,7 @@ __decorate([
|
|
|
70
44
|
__metadata("design:type", String)
|
|
71
45
|
], HColorSwatchesControl.prototype, "controlId", void 0);
|
|
72
46
|
__decorate([
|
|
73
|
-
property({ type: String
|
|
47
|
+
property({ type: String }),
|
|
74
48
|
__metadata("design:type", String)
|
|
75
49
|
], HColorSwatchesControl.prototype, "controlName", void 0);
|
|
76
50
|
__decorate([
|
|
@@ -86,7 +60,7 @@ __decorate([
|
|
|
86
60
|
__metadata("design:type", Boolean)
|
|
87
61
|
], HColorSwatchesControl.prototype, "error", void 0);
|
|
88
62
|
__decorate([
|
|
89
|
-
|
|
63
|
+
state(),
|
|
90
64
|
__metadata("design:type", Array)
|
|
91
65
|
], HColorSwatchesControl.prototype, "selectedColors", void 0);
|
|
92
66
|
HColorSwatchesControl = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,3 @@ export declare const COLOR_SWATCHES_CONTROL_CSS_CLASSES: {
|
|
|
3
3
|
readonly colorSwatchesControlDisabled: "color-swatches-control_disabled";
|
|
4
4
|
readonly colorSwatchesControlError: "color-swatches-control_error";
|
|
5
5
|
};
|
|
6
|
-
export declare const COLOR_SWATCHES_CONTROL_EVENT_NAMES: {
|
|
7
|
-
readonly change: "colorSwatchesControl.change";
|
|
8
|
-
};
|
|
@@ -3,10 +3,7 @@ const COLOR_SWATCHES_CONTROL_CSS_CLASSES = {
|
|
|
3
3
|
colorSwatchesControl: baseColorSwatchesControlClass,
|
|
4
4
|
colorSwatchesControlDisabled: `${baseColorSwatchesControlClass}_disabled`,
|
|
5
5
|
colorSwatchesControlError: `${baseColorSwatchesControlClass}_error`
|
|
6
|
-
};
|
|
7
|
-
const COLOR_SWATCHES_CONTROL_EVENT_NAMES = {
|
|
8
|
-
change: 'colorSwatchesControl.change'
|
|
9
6
|
};
|
|
10
7
|
|
|
11
|
-
export { COLOR_SWATCHES_CONTROL_CSS_CLASSES
|
|
8
|
+
export { COLOR_SWATCHES_CONTROL_CSS_CLASSES };
|
|
12
9
|
//# sourceMappingURL=color_swatches_control_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;"}
|
|
@@ -59,7 +59,6 @@ let HFilePicker = class HFilePicker extends PhoenixLightLitElement {
|
|
|
59
59
|
super.connectedCallback();
|
|
60
60
|
this._addEventListeners();
|
|
61
61
|
const cssClasses = classnames({
|
|
62
|
-
[FILE_PICKER_CONTROL_CSS_CLASSES.filePicker]: true,
|
|
63
62
|
[FILE_PICKER_CONTROL_CSS_CLASSES.filePickerDisabled]: this.disabled,
|
|
64
63
|
[FILE_PICKER_CONTROL_CSS_CLASSES.filePickerRequired]: this.required,
|
|
65
64
|
[FILE_PICKER_CONTROL_CSS_CLASSES.filePickerError]: this.error
|
|
@@ -92,7 +91,7 @@ let HFilePicker = class HFilePicker extends PhoenixLightLitElement {
|
|
|
92
91
|
/>`
|
|
93
92
|
: nothing}
|
|
94
93
|
${((_b = this._file) === null || _b === void 0 ? void 0 : _b.name)
|
|
95
|
-
? html
|
|
94
|
+
? html `<h-file
|
|
96
95
|
name="${this._file.name}"
|
|
97
96
|
id="${this._file.id}"
|
|
98
97
|
remove-button-text="${this.removeButtonText}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA,eAAe,wDAA4D;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;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,uBAAuB,0CAA8C;AACrE;AACA,eAAe,wDAA4D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -42,7 +42,6 @@ export declare class HSelect extends PhoenixLightLitElement {
|
|
|
42
42
|
private _handleOptionDeselect;
|
|
43
43
|
private _updateOptionsView;
|
|
44
44
|
private _appendNewHTMLOption;
|
|
45
|
-
updateOptionAriaAttribute($option: HOption): void;
|
|
46
45
|
private _removeHTMLOptions;
|
|
47
46
|
private _handleOptionClicked;
|
|
48
47
|
private _selectOption;
|
|
@@ -71,7 +71,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
71
71
|
SelectControlUtils.syncHTMLOptionWithModel(option, $option);
|
|
72
72
|
if (!selected)
|
|
73
73
|
return;
|
|
74
|
-
this.
|
|
74
|
+
$option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
77
|
this._handleOptionClicked = (event) => {
|
|
@@ -92,9 +92,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
92
92
|
this._dispatchChangeEvent();
|
|
93
93
|
};
|
|
94
94
|
this._dispatchChangeEvent = () => {
|
|
95
|
-
this.dispatchEvent(new Event('change'
|
|
96
|
-
bubbles: true
|
|
97
|
-
}));
|
|
95
|
+
this.dispatchEvent(new Event('change'));
|
|
98
96
|
};
|
|
99
97
|
this._handleResize = debounce_1(() => {
|
|
100
98
|
this._closeSelect();
|
|
@@ -117,8 +115,11 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
117
115
|
}
|
|
118
116
|
set selectedIndex(index) {
|
|
119
117
|
const option = Object.values(this._$options)[index];
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
if (!option) {
|
|
119
|
+
this._selectController.deselectAll();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this._selectOption(option.value);
|
|
122
123
|
}
|
|
123
124
|
get selectedOptions() {
|
|
124
125
|
var _a;
|
|
@@ -205,15 +206,10 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
205
206
|
const { value, selected } = option;
|
|
206
207
|
const $option = SelectControlUtils.createHTMLOption(option);
|
|
207
208
|
if (selected)
|
|
208
|
-
this.
|
|
209
|
+
$option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
|
|
209
210
|
this._$options[value] = $option;
|
|
210
211
|
SelectControlUtils.appendHTMLOption($option, $list, position);
|
|
211
212
|
}
|
|
212
|
-
updateOptionAriaAttribute($option) {
|
|
213
|
-
!$option.selected
|
|
214
|
-
? $option.removeAttribute(this.multiple ? 'aria-checked' : 'aria-selected')
|
|
215
|
-
: $option.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', 'true');
|
|
216
|
-
}
|
|
217
213
|
_removeHTMLOptions(optionsValues) {
|
|
218
214
|
this._$options = SelectControlUtils.removeHTMLOptions(Object.values(this._$options), optionsValues);
|
|
219
215
|
}
|
|
@@ -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,uBAAuB,+CAAmD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uBAAuB,+CAAmD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,8 +1,5 @@
|
|
|
1
|
-
import { Options } from '@splidejs/splide';
|
|
2
|
-
export interface ISlider {
|
|
3
|
-
mount(): void;
|
|
4
|
-
sync(slider: ISlider): this;
|
|
5
|
-
go(control: number | string): this;
|
|
1
|
+
import { Options, Splide } from '@splidejs/splide';
|
|
2
|
+
export interface ISlider extends Splide {
|
|
6
3
|
}
|
|
7
4
|
export interface ISliderOptions extends Options {
|
|
8
5
|
mountOnConnectedCallback: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider_types.js","sourceRoot":"","sources":["../../../../../../../src/components/slider/slider_types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"slider_types.js","sourceRoot":"","sources":["../../../../../../../src/components/slider/slider_types.ts"],"names":[],"mappings":"AAAA,OAAgC,kBAAkB,CAAC"}
|
|
@@ -77,8 +77,6 @@ export { HColorSwatchesControl } from './components/form/color_swatches_control/
|
|
|
77
77
|
export { HColorSwatches } from './components/color_swatches/color_swatches';
|
|
78
78
|
export { HColorItem } from './components/color_swatches/color_item/color_item';
|
|
79
79
|
export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more';
|
|
80
|
-
export { TSelectedColorsObject } from "./components/color_swatches/color_swatches_types";
|
|
81
|
-
export { COLOR_SWATCHES_CONTROL_EVENT_NAMES } from "./components/form/color_swatches_control/color_swatches_control_constants";
|
|
82
80
|
export { VisibilityController } from './controllers/visibility_controller/visibility_controller';
|
|
83
81
|
export * from './controllers/visibility_controller/visibility_controller_types';
|
|
84
82
|
export { HSlider } from './components/slider/slider';
|
|
@@ -65,10 +65,9 @@ export { HToggleButtonGroup } from './components/groups/toggle_button_group/togg
|
|
|
65
65
|
export { HToggleButton } from './components/groups/toggle_button_group/toggle_button.js';
|
|
66
66
|
export { CLICK_OUTSIDE_CONTROLLER_MESSAGES } from './controllers/click_outside_controller/click_outside_controller_messages.js';
|
|
67
67
|
export { HBackdrop } from './components/backdrop/backdrop.js';
|
|
68
|
-
export {
|
|
68
|
+
export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control.js';
|
|
69
69
|
export { HColorItem } from './components/color_swatches/color_item/color_item.js';
|
|
70
70
|
export { HColorSwatches } from './components/color_swatches/color_swatches.js';
|
|
71
|
-
export { HColorSwatchesControl } from './components/form/color_swatches_control/color_swatches_control.js';
|
|
72
71
|
export { HColorSwatchesShowMore } from './components/color_swatches/show-more/show_more.js';
|
|
73
72
|
export { VisibilityController } from './controllers/visibility_controller/visibility_controller.js';
|
|
74
73
|
export { HSlider } from './components/slider/slider.js';
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|