@coorpacademy/components 11.40.13 → 11.40.14-alpha.10
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/es/atom/checkbox-with-title/index.d.ts +24 -1
- package/es/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/es/atom/checkbox-with-title/index.js +16 -2
- package/es/atom/checkbox-with-title/index.js.map +1 -1
- package/es/atom/chip/index.d.ts.map +1 -1
- package/es/atom/chip/index.js +4 -4
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/input-switch/index.d.ts +24 -1
- package/es/atom/input-switch/index.d.ts.map +1 -1
- package/es/atom/input-switch/index.js +16 -2
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/range/index.d.ts +33 -3
- package/es/atom/range/index.d.ts.map +1 -1
- package/es/atom/range/index.js +88 -20
- package/es/atom/range/index.js.map +1 -1
- package/es/atom/range/style.css +38 -0
- package/es/molecule/multi-filter-panel/index.d.ts +41 -0
- package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/index.js +28 -13
- package/es/molecule/multi-filter-panel/index.js.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.d.ts +31 -5
- package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.js +4 -0
- package/es/molecule/multi-filter-panel/prop-types.js.map +1 -1
- package/es/molecule/questions/question-range/index.d.ts +4 -1
- package/es/molecule/quick-filters/index.js +3 -1
- package/es/molecule/quick-filters/index.js.map +1 -1
- package/es/molecule/quick-filters/style.css +2 -0
- package/es/organism/content-skill-modal/index.d.ts +20 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +20 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.d.ts +21 -0
- package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.js +13 -2
- package/es/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/es/organism/filter-chip/index.d.ts +21 -0
- package/es/organism/filter-chip/index.d.ts.map +1 -1
- package/es/organism/filter-chip/index.js +14 -2
- package/es/organism/filter-chip/index.js.map +1 -1
- package/es/organism/filter-range/index.d.ts +28 -0
- package/es/organism/filter-range/index.d.ts.map +1 -0
- package/es/organism/filter-range/index.js +92 -0
- package/es/organism/filter-range/index.js.map +1 -0
- package/es/organism/filter-range/prop-types.d.ts +38 -0
- package/es/organism/filter-range/prop-types.d.ts.map +1 -0
- package/es/organism/filter-range/prop-types.js +20 -0
- package/es/organism/filter-range/prop-types.js.map +1 -0
- package/es/organism/filter-range/style.css +15 -0
- package/es/organism/filter-switch/index.d.ts +22 -0
- package/es/organism/filter-switch/index.d.ts.map +1 -1
- package/es/organism/filter-switch/index.js +18 -3
- package/es/organism/filter-switch/index.js.map +1 -1
- package/es/organism/filter-switch/prop-types.d.ts +2 -0
- package/es/organism/filter-switch/prop-types.d.ts.map +1 -1
- package/es/organism/filter-switch/prop-types.js +2 -1
- package/es/organism/filter-switch/prop-types.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +20 -0
- package/es/template/common/search-page/index.d.ts +36 -0
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +45 -6
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/common/search-page/style.css +27 -1
- package/es/variables/colors.css +1 -0
- package/lib/atom/checkbox-with-title/index.d.ts +24 -1
- package/lib/atom/checkbox-with-title/index.d.ts.map +1 -1
- package/lib/atom/checkbox-with-title/index.js +16 -2
- package/lib/atom/checkbox-with-title/index.js.map +1 -1
- package/lib/atom/chip/index.d.ts.map +1 -1
- package/lib/atom/chip/index.js +4 -4
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/input-switch/index.d.ts +24 -1
- package/lib/atom/input-switch/index.d.ts.map +1 -1
- package/lib/atom/input-switch/index.js +16 -2
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/range/index.d.ts +33 -3
- package/lib/atom/range/index.d.ts.map +1 -1
- package/lib/atom/range/index.js +88 -20
- package/lib/atom/range/index.js.map +1 -1
- package/lib/atom/range/style.css +38 -0
- package/lib/molecule/multi-filter-panel/index.d.ts +41 -0
- package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/index.js +28 -13
- package/lib/molecule/multi-filter-panel/index.js.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.d.ts +31 -5
- package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.js +4 -0
- package/lib/molecule/multi-filter-panel/prop-types.js.map +1 -1
- package/lib/molecule/questions/question-range/index.d.ts +4 -1
- package/lib/molecule/quick-filters/index.js +3 -1
- package/lib/molecule/quick-filters/index.js.map +1 -1
- package/lib/molecule/quick-filters/style.css +2 -0
- package/lib/organism/content-skill-modal/index.d.ts +20 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +20 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.d.ts +21 -0
- package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.js +13 -2
- package/lib/organism/filter-checkbox-and-search/index.js.map +1 -1
- package/lib/organism/filter-chip/index.d.ts +21 -0
- package/lib/organism/filter-chip/index.d.ts.map +1 -1
- package/lib/organism/filter-chip/index.js +14 -2
- package/lib/organism/filter-chip/index.js.map +1 -1
- package/lib/organism/filter-range/index.d.ts +28 -0
- package/lib/organism/filter-range/index.d.ts.map +1 -0
- package/lib/organism/filter-range/index.js +99 -0
- package/lib/organism/filter-range/index.js.map +1 -0
- package/lib/organism/filter-range/prop-types.d.ts +38 -0
- package/lib/organism/filter-range/prop-types.d.ts.map +1 -0
- package/lib/organism/filter-range/prop-types.js +25 -0
- package/lib/organism/filter-range/prop-types.js.map +1 -0
- package/lib/organism/filter-range/style.css +15 -0
- package/lib/organism/filter-switch/index.d.ts +22 -0
- package/lib/organism/filter-switch/index.d.ts.map +1 -1
- package/lib/organism/filter-switch/index.js +18 -3
- package/lib/organism/filter-switch/index.js.map +1 -1
- package/lib/organism/filter-switch/prop-types.d.ts +2 -0
- package/lib/organism/filter-switch/prop-types.d.ts.map +1 -1
- package/lib/organism/filter-switch/prop-types.js +2 -1
- package/lib/organism/filter-switch/prop-types.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +20 -0
- package/lib/template/common/search-page/index.d.ts +36 -0
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +45 -6
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/common/search-page/style.css +27 -1
- package/lib/variables/colors.css +1 -0
- package/package.json +2 -2
package/lib/atom/range/style.css
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
@value dark from colors;
|
|
4
4
|
@value white from colors;
|
|
5
5
|
@value brand from colors;
|
|
6
|
+
@value surface_input_neutral_strong from colors;
|
|
6
7
|
|
|
7
8
|
.containerWrapper {
|
|
8
9
|
padding: 15px;
|
|
9
10
|
user-select: none;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: 18px;
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
.container {
|
|
@@ -55,3 +59,37 @@
|
|
|
55
59
|
transition-duration: 0.3s;
|
|
56
60
|
transition-timing-function: ease-out;
|
|
57
61
|
}
|
|
62
|
+
|
|
63
|
+
.inputsRow {
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
margin-top: 18px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.moocInput {
|
|
70
|
+
display: inline-flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
gap: 6px;
|
|
73
|
+
height: auto;
|
|
74
|
+
padding: 12px 16px;
|
|
75
|
+
border: none;
|
|
76
|
+
border-radius: 12px;
|
|
77
|
+
background-color: surface_input_neutral_strong;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
cursor: default;
|
|
80
|
+
user-select: none;
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.inputHint {
|
|
85
|
+
color: #999;
|
|
86
|
+
font-weight: 700;
|
|
87
|
+
font-size: 16px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.inputValue {
|
|
91
|
+
color: #000;
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
font-size: 16px;
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -63,12 +63,53 @@ declare const MultiFilterPanel: {
|
|
|
63
63
|
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
64
64
|
theme: import("prop-types").Validator<string>;
|
|
65
65
|
ariaLabel: import("prop-types").Validator<string>;
|
|
66
|
+
id: import("prop-types").Requireable<string>;
|
|
66
67
|
}> | null | undefined)[]>;
|
|
67
68
|
}>>;
|
|
69
|
+
}> | import("prop-types").InferProps<{
|
|
70
|
+
type: import("prop-types").Requireable<string>;
|
|
71
|
+
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
72
|
+
title: import("prop-types").Validator<string>;
|
|
73
|
+
titleAriaLabel: import("prop-types").Requireable<string>;
|
|
74
|
+
onClear: import("prop-types").Validator<(...args: any[]) => any>;
|
|
75
|
+
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
76
|
+
label: import("prop-types").Validator<string>;
|
|
77
|
+
min: import("prop-types").Validator<number>;
|
|
78
|
+
max: import("prop-types").Validator<number>;
|
|
79
|
+
step: import("prop-types").Requireable<number>;
|
|
80
|
+
value: import("prop-types").Requireable<(number | null | undefined)[]>;
|
|
81
|
+
minLabel: import("prop-types").Requireable<string>;
|
|
82
|
+
maxLabel: import("prop-types").Requireable<string>;
|
|
83
|
+
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
84
|
+
theme: import("prop-types").Requireable<string>;
|
|
85
|
+
selected: import("prop-types").Requireable<boolean>;
|
|
86
|
+
}>>;
|
|
87
|
+
}>>;
|
|
68
88
|
}> | null | undefined> | null | undefined)[]>;
|
|
69
89
|
};
|
|
70
90
|
contextTypes: {
|
|
71
91
|
translate: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
92
|
+
skin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
93
|
+
common: import("prop-types").Requireable<{
|
|
94
|
+
[x: string]: any;
|
|
95
|
+
}>;
|
|
96
|
+
images: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
97
|
+
'logo-mobile': import("prop-types").Requireable<any>;
|
|
98
|
+
logo: import("prop-types").Requireable<any>;
|
|
99
|
+
'logo-email': import("prop-types").Requireable<any>;
|
|
100
|
+
login: import("prop-types").Requireable<any>;
|
|
101
|
+
}>>;
|
|
102
|
+
icons: import("prop-types").Requireable<{
|
|
103
|
+
[x: string]: any;
|
|
104
|
+
}>;
|
|
105
|
+
mod: import("prop-types").Requireable<{
|
|
106
|
+
[x: string]: any;
|
|
107
|
+
}>;
|
|
108
|
+
courses: import("prop-types").Requireable<any[]>;
|
|
109
|
+
texts: import("prop-types").Requireable<{
|
|
110
|
+
[x: string]: any;
|
|
111
|
+
}>;
|
|
112
|
+
}>>;
|
|
72
113
|
};
|
|
73
114
|
};
|
|
74
115
|
export default MultiFilterPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAWjE,OAAkB,EAAC,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAyDlF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DhF,CAAC;AASF,eAAe,gBAAgB,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
+
var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
6
|
+
var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
|
|
5
7
|
var _toString2 = _interopRequireDefault(require("lodash/fp/toString"));
|
|
6
8
|
var _flatMap2 = _interopRequireDefault(require("lodash/fp/flatMap"));
|
|
7
9
|
var _filter2 = _interopRequireDefault(require("lodash/fp/filter"));
|
|
@@ -9,6 +11,7 @@ var _pipe2 = _interopRequireDefault(require("lodash/fp/pipe"));
|
|
|
9
11
|
var _size2 = _interopRequireDefault(require("lodash/fp/size"));
|
|
10
12
|
var _map2 = _interopRequireDefault(require("lodash/fp/map"));
|
|
11
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
+
var _cssColorFunction = require("css-color-function");
|
|
12
15
|
var _filterChip = _interopRequireDefault(require("../../organism/filter-chip"));
|
|
13
16
|
var _filterCheckboxAndSearch = _interopRequireDefault(require("../../organism/filter-checkbox-and-search"));
|
|
14
17
|
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
@@ -18,6 +21,7 @@ var _provider = _interopRequireWildcard(require("../../atom/provider"));
|
|
|
18
21
|
var _chip = _interopRequireDefault(require("../../atom/chip"));
|
|
19
22
|
var _colors = require("../../variables/colors");
|
|
20
23
|
var _filterSwitch = _interopRequireDefault(require("../../organism/filter-switch"));
|
|
24
|
+
var _filterRange = _interopRequireDefault(require("../../organism/filter-range"));
|
|
21
25
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
22
26
|
var _propTypes = _interopRequireDefault(require("./prop-types"));
|
|
23
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -27,10 +31,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
27
31
|
const uncappedMap = _map2.default.convert({
|
|
28
32
|
cap: false
|
|
29
33
|
});
|
|
30
|
-
const CLEAR_ALL_BUTTON_STYLE = {
|
|
31
|
-
fontWeight: 'normal',
|
|
32
|
-
padding: 0
|
|
33
|
-
};
|
|
34
34
|
const FilterSeparator = /*#__PURE__*/_react.default.createElement("div", {
|
|
35
35
|
className: _style.default.filterSeparator
|
|
36
36
|
});
|
|
@@ -46,6 +46,8 @@ const buildFilters = filterOptions => {
|
|
|
46
46
|
return /*#__PURE__*/_react.default.createElement(_filterCheckboxAndSearch.default, options);
|
|
47
47
|
case 'switch':
|
|
48
48
|
return /*#__PURE__*/_react.default.createElement(_filterSwitch.default, options);
|
|
49
|
+
case 'range':
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_filterRange.default, options);
|
|
49
51
|
default:
|
|
50
52
|
return null;
|
|
51
53
|
}
|
|
@@ -59,7 +61,7 @@ const buildAllSelectedFilterChips = (selectedFilters, onRemoveSelectedFilter) =>
|
|
|
59
61
|
label
|
|
60
62
|
} = filterItem;
|
|
61
63
|
function handleClick() {
|
|
62
|
-
return onRemoveSelectedFilter(
|
|
64
|
+
return onRemoveSelectedFilter(filterItem);
|
|
63
65
|
}
|
|
64
66
|
return /*#__PURE__*/_react.default.createElement(_chip.default, {
|
|
65
67
|
key: label,
|
|
@@ -76,11 +78,15 @@ const buildAllSelectedFilterChips = (selectedFilters, onRemoveSelectedFilter) =>
|
|
|
76
78
|
}));
|
|
77
79
|
};
|
|
78
80
|
const MultiFilterPanel = (props, context) => {
|
|
81
|
+
const {
|
|
82
|
+
skin
|
|
83
|
+
} = context;
|
|
84
|
+
const primaryColor = (0, _getOr2.default)(_colors.COLORS.cm_primary_blue, 'common.primary', skin);
|
|
79
85
|
const {
|
|
80
86
|
title,
|
|
81
87
|
onClearAll,
|
|
82
88
|
options,
|
|
83
|
-
onRemoveSelectedFilter =
|
|
89
|
+
onRemoveSelectedFilter = _noop2.default
|
|
84
90
|
} = props;
|
|
85
91
|
const translate = (0, _provider.GetTranslateFromContext)(context);
|
|
86
92
|
const allSelectedFilters = (0, _pipe2.default)((0, _map2.default)('options'), (0, _flatMap2.default)('options'), (0, _filter2.default)(filterOptions => filterOptions.selected || filterOptions.value === true))(options);
|
|
@@ -93,31 +99,40 @@ const MultiFilterPanel = (props, context) => {
|
|
|
93
99
|
}, options);
|
|
94
100
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
95
101
|
className: _style.default.header
|
|
96
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
+
}, hasSelectedFilters ? /*#__PURE__*/_react.default.createElement("div", {
|
|
97
103
|
className: _style.default.titleContainer
|
|
98
104
|
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
99
105
|
title: title,
|
|
100
106
|
type: "form-group",
|
|
101
107
|
titleSize: "standard-light-weight"
|
|
102
|
-
}),
|
|
108
|
+
}), /*#__PURE__*/_react.default.createElement(_tag.default, {
|
|
103
109
|
label: (0, _toString2.default)((0, _size2.default)(allSelectedFilters)),
|
|
104
110
|
type: "info",
|
|
105
|
-
size: "S"
|
|
106
|
-
|
|
111
|
+
size: "S",
|
|
112
|
+
customStyle: {
|
|
113
|
+
color: primaryColor,
|
|
114
|
+
backgroundColor: (0, _cssColorFunction.convert)(`color(${primaryColor} lightness(92%))`)
|
|
115
|
+
}
|
|
116
|
+
})) : null, hasSelectedFilters ? /*#__PURE__*/_react.default.createElement("div", {
|
|
107
117
|
className: _style.default.buttonContainer
|
|
108
118
|
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
109
|
-
customStyle:
|
|
119
|
+
customStyle: {
|
|
120
|
+
fontWeight: 'normal',
|
|
121
|
+
padding: 0,
|
|
122
|
+
color: primaryColor
|
|
123
|
+
},
|
|
110
124
|
label: translate('clear_all'),
|
|
111
125
|
type: "text",
|
|
112
126
|
"data-name": "filters-all-clear-button",
|
|
113
127
|
"aria-label": "filters all clear button",
|
|
114
128
|
onClick: onClearAll,
|
|
115
129
|
hoverColor: _colors.COLORS.primary_600
|
|
116
|
-
})) : null),
|
|
130
|
+
})) : null), hasSelectedFilters ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, buildAllSelectedFilterChips(allSelectedFilters, onRemoveSelectedFilter)), FilterSeparator) : null, filters);
|
|
117
131
|
};
|
|
118
132
|
MultiFilterPanel.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
|
|
119
133
|
MultiFilterPanel.contextTypes = {
|
|
120
|
-
translate: _provider.default.childContextTypes.translate
|
|
134
|
+
translate: _provider.default.childContextTypes.translate,
|
|
135
|
+
skin: _provider.default.childContextTypes.skin
|
|
121
136
|
};
|
|
122
137
|
var _default = exports.default = MultiFilterPanel;
|
|
123
138
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_filterChip","_filterCheckboxAndSearch","_title","_tag","_buttonLink","_provider","_interopRequireWildcard","_chip","_colors","_filterSwitch","_style","_propTypes","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","uncappedMap","_map2","convert","cap","CLEAR_ALL_BUTTON_STYLE","fontWeight","padding","FilterSeparator","createElement","className","style","filterSeparator","buildFilters","filterOptions","type","options","buildAllSelectedFilterChips","selectedFilters","onRemoveSelectedFilter","selectedFiltersContainer","map","filterItem","label","handleClick","key","onClick","text","textColor","COLORS","neutral_500","backgroundColor","cm_grey_150","customIcon","customStyle","height","MultiFilterPanel","props","context","title","onClearAll","translate","GetTranslateFromContext","allSelectedFilters","_pipe2","_flatMap2","_filter2","selected","value","hasSelectedFilters","_size2","filters","isLastItem","Fragment","header","titleContainer","titleSize","_toString2","size","buttonContainer","hoverColor","primary_600","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"sourcesContent":["import React from 'react';\nimport {map, size, pipe, filter, flatMap, toString} from 'lodash/fp';\nimport FilterChip from '../../organism/filter-chip';\nimport FilterCheckboxAndSearch from '../../organism/filter-checkbox-and-search';\nimport Title from '../../atom/title';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport Chip from '../../atom/chip';\nimport {COLORS} from '../../variables/colors';\nimport FilterSwitch from '../../organism/filter-switch';\nimport {FilterCheckboxAndSearchOptions} from '../../organism/filter-checkbox-and-search/props-types';\nimport {FilterChipOptionsProps} from '../../organism/filter-chip/prop-types';\nimport {FilterSwitchOptionsProps} from '../../organism/filter-switch/prop-types';\nimport style from './style.css';\nimport propTypes, {MultiFilterPanelProps, FilterOptionsProps} from './prop-types';\n\ntype SelectedFilter =\n | FilterChipOptionsProps\n | FilterSwitchOptionsProps\n | FilterCheckboxAndSearchOptions;\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst CLEAR_ALL_BUTTON_STYLE = {fontWeight: 'normal', padding: 0};\nconst FilterSeparator = <div className={style.filterSeparator} />;\n\nconst buildFilters = (filterOptions: FilterOptionsProps) => {\n const {type, options} = filterOptions;\n switch (type) {\n case 'chip':\n return <FilterChip {...options} />;\n case 'checkbox':\n return <FilterCheckboxAndSearch {...options} />;\n case 'switch':\n return <FilterSwitch {...options} />;\n default:\n return null;\n }\n};\n\nconst buildAllSelectedFilterChips = (\n selectedFilters: SelectedFilter[],\n onRemoveSelectedFilter: (label: string) => void\n) => {\n return (\n <div className={style.selectedFiltersContainer} data-testid=\"selected-filters-container\">\n {selectedFilters.map((filterItem: SelectedFilter) => {\n const {label} = filterItem;\n\n function handleClick() {\n return onRemoveSelectedFilter(label);\n }\n\n return (\n <Chip\n key={label}\n onClick={handleClick}\n text={label}\n textColor={COLORS.neutral_500}\n backgroundColor={COLORS.cm_grey_150}\n customIcon={'xmark'}\n customStyle={{height: '28px', padding: '4px 8px'}}\n />\n );\n })}\n </div>\n );\n};\n\nconst MultiFilterPanel = (props: MultiFilterPanelProps, context: WebContextValues) => {\n const {title, onClearAll, options, onRemoveSelectedFilter = false} = props;\n const translate = GetTranslateFromContext(context);\n const allSelectedFilters: SelectedFilter[] = pipe(\n map('options'),\n flatMap('options'),\n filter(filterOptions => filterOptions.selected || filterOptions.value === true)\n )(options);\n const hasSelectedFilters = size(allSelectedFilters) > 0;\n const filters = uncappedMap((filterOptions: FilterOptionsProps, i: number) => {\n const isLastItem = i + 1 === size(options);\n\n return (\n <div key={i}>\n {buildFilters(filterOptions)}\n {isLastItem ? null : FilterSeparator}\n </div>\n );\n }, options);\n return (\n <>\n <div className={style.header}>\n <div className={style.titleContainer}>\n <Title title={title} type=\"form-group\" titleSize=\"standard-light-weight\" />\n {hasSelectedFilters ? (\n <Tag label={toString(size(allSelectedFilters))} type=\"info\" size=\"S\" />\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={CLEAR_ALL_BUTTON_STYLE}\n label={translate('clear_all')}\n type=\"text\"\n data-name=\"filters-all-clear-button\"\n aria-label=\"filters all clear button\"\n onClick={onClearAll}\n hoverColor={COLORS.primary_600}\n />\n </div>\n ) : null}\n </div>\n {onRemoveSelectedFilter && hasSelectedFilters ? (\n <>\n <div>{buildAllSelectedFilterChips(allSelectedFilters, onRemoveSelectedFilter)}</div>\n {FilterSeparator}\n </>\n ) : null}\n {filters}\n </>\n );\n};\n\nMultiFilterPanel.propTypes = propTypes;\n\nMultiFilterPanel.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default MultiFilterPanel;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,wBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,IAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,WAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,IAAAM,SAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAX,sBAAA,CAAAC,OAAA;AAIA,IAAAW,MAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,UAAA,GAAAb,sBAAA,CAAAC,OAAA;AAAkF,SAAAa,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAA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","_filterChip","_filterCheckboxAndSearch","_title","_tag","_buttonLink","_provider","_interopRequireWildcard","_chip","_colors","_filterSwitch","_filterRange","_style","_propTypes","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","uncappedMap","_map2","convert","cap","FilterSeparator","createElement","className","style","filterSeparator","buildFilters","filterOptions","type","options","buildAllSelectedFilterChips","selectedFilters","onRemoveSelectedFilter","selectedFiltersContainer","map","filterItem","label","handleClick","key","onClick","text","textColor","COLORS","neutral_500","backgroundColor","cm_grey_150","customIcon","customStyle","height","padding","MultiFilterPanel","props","context","skin","primaryColor","_getOr2","cm_primary_blue","title","onClearAll","_noop2","translate","GetTranslateFromContext","allSelectedFilters","_pipe2","_flatMap2","_filter2","selected","value","hasSelectedFilters","_size2","filters","isLastItem","Fragment","header","titleContainer","titleSize","_toString2","size","color","buttonContainer","fontWeight","hoverColor","primary_600","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"sourcesContent":["import React from 'react';\nimport {map, size, pipe, filter, flatMap, toString, getOr, noop} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport FilterChip from '../../organism/filter-chip';\nimport FilterCheckboxAndSearch from '../../organism/filter-checkbox-and-search';\nimport Title from '../../atom/title';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport Chip from '../../atom/chip';\nimport {COLORS} from '../../variables/colors';\nimport FilterSwitch from '../../organism/filter-switch';\nimport FilterRange from '../../organism/filter-range';\nimport {FilterCheckboxAndSearchOptions} from '../../organism/filter-checkbox-and-search/props-types';\nimport {FilterChipOptionsProps} from '../../organism/filter-chip/prop-types';\nimport {FilterSwitchOptionsProps} from '../../organism/filter-switch/prop-types';\nimport {FilterRangeOptionsProps} from '../../organism/filter-range/prop-types';\nimport style from './style.css';\nimport propTypes, {MultiFilterPanelProps, FilterOptionsProps} from './prop-types';\n\ntype SelectedFilter =\n | FilterChipOptionsProps\n | FilterSwitchOptionsProps\n | FilterCheckboxAndSearchOptions\n | FilterRangeOptionsProps;\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst FilterSeparator = <div className={style.filterSeparator} />;\n\nconst buildFilters = (filterOptions: FilterOptionsProps) => {\n const {type, options} = filterOptions;\n switch (type) {\n case 'chip':\n return <FilterChip {...options} />;\n case 'checkbox':\n return <FilterCheckboxAndSearch {...options} />;\n case 'switch':\n return <FilterSwitch {...options} />;\n case 'range':\n return <FilterRange {...options} />;\n default:\n return null;\n }\n};\n\nconst buildAllSelectedFilterChips = (\n selectedFilters: SelectedFilter[],\n onRemoveSelectedFilter: (filterItem: SelectedFilter) => void\n) => {\n return (\n <div className={style.selectedFiltersContainer} data-testid=\"selected-filters-container\">\n {selectedFilters.map((filterItem: SelectedFilter) => {\n const {label} = filterItem;\n function handleClick() {\n return onRemoveSelectedFilter(filterItem);\n }\n\n return (\n <Chip\n key={label}\n onClick={handleClick}\n text={label}\n textColor={COLORS.neutral_500}\n backgroundColor={COLORS.cm_grey_150}\n customIcon={'xmark'}\n customStyle={{height: '28px', padding: '4px 8px'}}\n />\n );\n })}\n </div>\n );\n};\n\nconst MultiFilterPanel = (props: MultiFilterPanelProps, context: WebContextValues) => {\n const {skin} = context;\n const primaryColor = getOr(COLORS.cm_primary_blue, 'common.primary', skin);\n const {title, onClearAll, options, onRemoveSelectedFilter = noop} = props;\n const translate = GetTranslateFromContext(context);\n const allSelectedFilters: SelectedFilter[] = pipe(\n map('options'),\n flatMap('options'),\n filter(filterOptions => filterOptions.selected || filterOptions.value === true)\n )(options);\n const hasSelectedFilters = size(allSelectedFilters) > 0;\n const filters = uncappedMap((filterOptions: FilterOptionsProps, i: number) => {\n const isLastItem = i + 1 === size(options);\n\n return (\n <div key={i}>\n {buildFilters(filterOptions)}\n {isLastItem ? null : FilterSeparator}\n </div>\n );\n }, options);\n return (\n <>\n <div className={style.header}>\n {hasSelectedFilters ? (\n <div className={style.titleContainer}>\n <Title title={title} type=\"form-group\" titleSize=\"standard-light-weight\" />\n <Tag\n label={toString(size(allSelectedFilters))}\n type=\"info\"\n size=\"S\"\n customStyle={{\n color: primaryColor,\n backgroundColor: convert(`color(${primaryColor} lightness(92%))`)\n }}\n />\n </div>\n ) : null}\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={{fontWeight: 'normal', padding: 0, color: primaryColor}}\n label={translate('clear_all')}\n type=\"text\"\n data-name=\"filters-all-clear-button\"\n aria-label=\"filters all clear button\"\n onClick={onClearAll}\n hoverColor={COLORS.primary_600}\n />\n </div>\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <>\n <div>{buildAllSelectedFilterChips(allSelectedFilters, onRemoveSelectedFilter)}</div>\n {FilterSeparator}\n </>\n ) : null}\n {filters}\n </>\n );\n};\n\nMultiFilterPanel.propTypes = propTypes;\n\nMultiFilterPanel.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nexport default MultiFilterPanel;\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,wBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,IAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,WAAA,GAAAP,sBAAA,CAAAC,OAAA;AAEA,IAAAO,SAAA,GAAAC,uBAAA,CAAAR,OAAA;AACA,IAAAS,KAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,OAAA,GAAAV,O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I,EACPc,kBAAkB,gBACjBxF,MAAA,CAAAuB,OAAA,CAAAmB,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAACuD;EAAgB,gBACpCnG,MAAA,CAAAuB,OAAA,CAAAmB,aAAA,CAAClC,WAAA,CAAAe,OAAU;IACT4C,WAAW,EAAE;MAACiC,UAAU,EAAE,QAAQ;MAAE/B,OAAO,EAAE,CAAC;MAAE6B,KAAK,EAAExB;IAAY,CAAE;IACrElB,KAAK,EAAEwB,SAAS,CAAC,WAAW,CAAE;IAC9BhC,IAAI,EAAC,MAAM;IACX,aAAU,0BAA0B;IACpC,cAAW,0BAA0B;IACrCW,OAAO,EAAEmB,UAAW;IACpBuB,UAAU,EAAEvC,cAAM,CAACwC;EAAY,CAChC,CACE,CAAC,GACJ,IACD,CAAC,EACLd,kBAAkB,gBACjBxF,MAAA,CAAAuB,OAAA,CAAAmB,aAAA,CAAA1C,MAAA,CAAAuB,OAAA,CAAAqE,QAAA,qBACE5F,MAAA,CAAAuB,OAAA,CAAAmB,aAAA,cAAMQ,2BAA2B,CAACgC,kBAAkB,EAAE9B,sBAAsB,CAAO,CAAC,EACnFX,eACD,CAAC,GACD,IAAI,EACPiD,OACD,CAAC;AAEP,CAAC;AAEDpB,gBAAgB,CAACiC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,kBAAS;AAEtCjC,gBAAgB,CAACqC,YAAY,GAAG;EAC9B3B,SAAS,EAAE4B,iBAAQ,CAACC,iBAAiB,CAAC7B,SAAS;EAC/CP,IAAI,EAAEmC,iBAAQ,CAACC,iBAAiB,CAACpC;AACnC,CAAC;AAAC,IAAAqC,QAAA,GAAAC,OAAA,CAAAxF,OAAA,GAEa+C,gBAAgB","ignoreList":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { FilterChipProps } from '../../organism/filter-chip/prop-types';
|
|
3
|
-
import { FilterCheckboxAndSearchProps } from '../../organism/filter-checkbox-and-search/props-types';
|
|
4
|
-
import { FilterSwitchProps } from '../../organism/filter-switch/prop-types';
|
|
2
|
+
import { FilterChipOptionsProps, FilterChipProps } from '../../organism/filter-chip/prop-types';
|
|
3
|
+
import { FilterCheckboxAndSearchOptions, FilterCheckboxAndSearchProps } from '../../organism/filter-checkbox-and-search/props-types';
|
|
4
|
+
import { FilterSwitchOptionsProps, FilterSwitchProps } from '../../organism/filter-switch/prop-types';
|
|
5
|
+
import { FilterRangeProps, FilterRangeOptionsProps } from '../../organism/filter-range/prop-types';
|
|
5
6
|
declare const propTypes: {
|
|
6
7
|
title: PropTypes.Requireable<string>;
|
|
7
8
|
onClearAll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -62,8 +63,28 @@ declare const propTypes: {
|
|
|
62
63
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
63
64
|
theme: PropTypes.Validator<string>;
|
|
64
65
|
ariaLabel: PropTypes.Validator<string>;
|
|
66
|
+
id: PropTypes.Requireable<string>;
|
|
65
67
|
}> | null | undefined)[]>;
|
|
66
68
|
}>>;
|
|
69
|
+
}> | PropTypes.InferProps<{
|
|
70
|
+
type: PropTypes.Requireable<string>;
|
|
71
|
+
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
72
|
+
title: PropTypes.Validator<string>;
|
|
73
|
+
titleAriaLabel: PropTypes.Requireable<string>;
|
|
74
|
+
onClear: PropTypes.Validator<(...args: any[]) => any>;
|
|
75
|
+
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
76
|
+
label: PropTypes.Validator<string>;
|
|
77
|
+
min: PropTypes.Validator<number>;
|
|
78
|
+
max: PropTypes.Validator<number>;
|
|
79
|
+
step: PropTypes.Requireable<number>;
|
|
80
|
+
value: PropTypes.Requireable<(number | null | undefined)[]>;
|
|
81
|
+
minLabel: PropTypes.Requireable<string>;
|
|
82
|
+
maxLabel: PropTypes.Requireable<string>;
|
|
83
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
84
|
+
theme: PropTypes.Requireable<string>;
|
|
85
|
+
selected: PropTypes.Requireable<boolean>;
|
|
86
|
+
}>>;
|
|
87
|
+
}>>;
|
|
67
88
|
}> | null | undefined> | null | undefined)[]>;
|
|
68
89
|
};
|
|
69
90
|
export declare type OptionsChipProps = {
|
|
@@ -78,10 +99,15 @@ export declare type OptionsSwitchProps = {
|
|
|
78
99
|
type: 'switch';
|
|
79
100
|
options: FilterSwitchProps;
|
|
80
101
|
};
|
|
81
|
-
export declare type
|
|
102
|
+
export declare type OptionsRangeProps = {
|
|
103
|
+
type: 'range';
|
|
104
|
+
options: FilterRangeProps;
|
|
105
|
+
};
|
|
106
|
+
export declare type FilterOptionsProps = OptionsChipProps | OptionsCheckboxProps | OptionsSwitchProps | OptionsRangeProps;
|
|
107
|
+
export declare type SelectedFilter = FilterChipOptionsProps | FilterSwitchOptionsProps | FilterCheckboxAndSearchOptions | FilterRangeOptionsProps;
|
|
82
108
|
export declare type MultiFilterPanelProps = {
|
|
83
109
|
title: string;
|
|
84
|
-
onRemoveSelectedFilter?: (
|
|
110
|
+
onRemoveSelectedFilter?: (filterItem: SelectedFilter) => void;
|
|
85
111
|
onClearAll: () => void;
|
|
86
112
|
options: FilterOptionsProps[];
|
|
87
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAC1B,sBAAsB,EACtB,eAAe,EAChB,MAAM,uCAAuC,CAAC;AAC/C,OAAyC,EACvC,8BAA8B,EAC9B,4BAA4B,EAC7B,MAAM,uDAAuD,CAAC;AAC/D,OAA8B,EAAC,wBAAwB,EAAE,iBAAiB,EAAC,MAAM,yCAAyC,CAAC;AAC3H,OAA6B,EAAC,gBAAgB,EAAE,uBAAuB,EAAC,MAAM,wCAAwC,CAAC;AAEvH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBd,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,4BAA4B,CAAC;CACvC,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF,oBAAY,kBAAkB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAElH,oBAAY,cAAc,GACtB,sBAAsB,GACtB,wBAAwB,GACxB,8BAA8B,GAC9B,uBAAuB,CAAC;AAE5B,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9D,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -6,6 +6,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
6
6
|
var _propTypes2 = _interopRequireDefault(require("../../organism/filter-chip/prop-types"));
|
|
7
7
|
var _propsTypes = _interopRequireDefault(require("../../organism/filter-checkbox-and-search/props-types"));
|
|
8
8
|
var _propTypes3 = _interopRequireDefault(require("../../organism/filter-switch/prop-types"));
|
|
9
|
+
var _propTypes4 = _interopRequireDefault(require("../../organism/filter-range/prop-types"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
11
|
const propTypes = {
|
|
11
12
|
title: _propTypes.default.string,
|
|
@@ -20,6 +21,9 @@ const propTypes = {
|
|
|
20
21
|
}), _propTypes.default.shape({
|
|
21
22
|
type: _propTypes.default.oneOf(['switch']),
|
|
22
23
|
options: _propTypes.default.shape(_propTypes3.default)
|
|
24
|
+
}), _propTypes.default.shape({
|
|
25
|
+
type: _propTypes.default.oneOf(['range']),
|
|
26
|
+
options: _propTypes.default.shape(_propTypes4.default)
|
|
23
27
|
})]))
|
|
24
28
|
};
|
|
25
29
|
var _default = exports.default = propTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","_propTypes2","_propsTypes","_propTypes3","e","__esModule","default","propTypes","title","PropTypes","string","onClearAll","func","onRemoveSelectedFilter","options","arrayOf","oneOfType","shape","type","oneOf","filterChipProptypes","filterCheckboxAndSearchProptypes","filterSwitchProptypes","_default","exports"],"sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport filterChipProptypes, {FilterChipProps} from '../../organism/filter-chip/prop-types';\nimport filterCheckboxAndSearchProptypes, {\n FilterCheckboxAndSearchProps\n} from '../../organism/filter-checkbox-and-search/props-types';\nimport filterSwitchProptypes, {FilterSwitchProps} from '../../organism/filter-switch/prop-types';\n\nconst propTypes = {\n title: PropTypes.string,\n onClearAll: PropTypes.func,\n onRemoveSelectedFilter: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.oneOf(['chip']),\n options: PropTypes.shape(filterChipProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['checkbox']),\n options: PropTypes.shape(filterCheckboxAndSearchProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['switch']),\n options: PropTypes.shape(filterSwitchProptypes)\n })\n ])\n )\n};\n\nexport type OptionsChipProps = {\n type: 'chip';\n options: FilterChipProps;\n};\n\nexport type OptionsCheckboxProps = {\n type: 'checkbox';\n options: FilterCheckboxAndSearchProps;\n};\n\nexport type OptionsSwitchProps = {\n type: 'switch';\n options: FilterSwitchProps;\n};\n\nexport type FilterOptionsProps = OptionsChipProps | OptionsCheckboxProps | OptionsSwitchProps;\n\nexport type MultiFilterPanelProps = {\n title: string;\n onRemoveSelectedFilter?: (
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","_propTypes2","_propsTypes","_propTypes3","_propTypes4","e","__esModule","default","propTypes","title","PropTypes","string","onClearAll","func","onRemoveSelectedFilter","options","arrayOf","oneOfType","shape","type","oneOf","filterChipProptypes","filterCheckboxAndSearchProptypes","filterSwitchProptypes","filterRangeProptypes","_default","exports"],"sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport filterChipProptypes, {\n FilterChipOptionsProps,\n FilterChipProps\n} from '../../organism/filter-chip/prop-types';\nimport filterCheckboxAndSearchProptypes, {\n FilterCheckboxAndSearchOptions,\n FilterCheckboxAndSearchProps\n} from '../../organism/filter-checkbox-and-search/props-types';\nimport filterSwitchProptypes, {FilterSwitchOptionsProps, FilterSwitchProps} from '../../organism/filter-switch/prop-types';\nimport filterRangeProptypes, {FilterRangeProps, FilterRangeOptionsProps} from '../../organism/filter-range/prop-types';\n\nconst propTypes = {\n title: PropTypes.string,\n onClearAll: PropTypes.func,\n onRemoveSelectedFilter: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.oneOf(['chip']),\n options: PropTypes.shape(filterChipProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['checkbox']),\n options: PropTypes.shape(filterCheckboxAndSearchProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['switch']),\n options: PropTypes.shape(filterSwitchProptypes)\n }),\n PropTypes.shape({\n type: PropTypes.oneOf(['range']),\n options: PropTypes.shape(filterRangeProptypes)\n })\n ])\n )\n};\n\nexport type OptionsChipProps = {\n type: 'chip';\n options: FilterChipProps;\n};\n\nexport type OptionsCheckboxProps = {\n type: 'checkbox';\n options: FilterCheckboxAndSearchProps;\n};\n\nexport type OptionsSwitchProps = {\n type: 'switch';\n options: FilterSwitchProps;\n};\n\nexport type OptionsRangeProps = {\n type: 'range';\n options: FilterRangeProps;\n};\n\nexport type FilterOptionsProps = OptionsChipProps | OptionsCheckboxProps | OptionsSwitchProps | OptionsRangeProps;\n\nexport type SelectedFilter =\n | FilterChipOptionsProps\n | FilterSwitchOptionsProps\n | FilterCheckboxAndSearchOptions\n | FilterRangeOptionsProps;\n\nexport type MultiFilterPanelProps = {\n title: string;\n onRemoveSelectedFilter?: (filterItem: SelectedFilter) => void;\n onClearAll: () => void;\n options: FilterOptionsProps[];\n};\n\nexport default propTypes;\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AAIA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAuH,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvH,MAAMG,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAS,CAACC,MAAM;EACvBC,UAAU,EAAEF,kBAAS,CAACG,IAAI;EAC1BC,sBAAsB,EAAEJ,kBAAS,CAACG,IAAI;EACtCE,OAAO,EAAEL,kBAAS,CAACM,OAAO,CACxBN,kBAAS,CAACO,SAAS,CAAC,CAClBP,kBAAS,CAACQ,KAAK,CAAC;IACdC,IAAI,EAAET,kBAAS,CAACU,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/BL,OAAO,EAAEL,kBAAS,CAACQ,KAAK,CAACG,mBAAmB;EAC9C,CAAC,CAAC,EACFX,kBAAS,CAACQ,KAAK,CAAC;IACdC,IAAI,EAAET,kBAAS,CAACU,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;IACnCL,OAAO,EAAEL,kBAAS,CAACQ,KAAK,CAACI,mBAAgC;EAC3D,CAAC,CAAC,EACFZ,kBAAS,CAACQ,KAAK,CAAC;IACdC,IAAI,EAAET,kBAAS,CAACU,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjCL,OAAO,EAAEL,kBAAS,CAACQ,KAAK,CAACK,mBAAqB;EAChD,CAAC,CAAC,EACFb,kBAAS,CAACQ,KAAK,CAAC;IACdC,IAAI,EAAET,kBAAS,CAACU,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;IAChCL,OAAO,EAAEL,kBAAS,CAACQ,KAAK,CAACM,mBAAoB;EAC/C,CAAC,CAAC,CACH,CACH;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAnB,OAAA,GAqCaC,SAAS","ignoreList":[]}
|
|
@@ -32,6 +32,10 @@ declare namespace QuestionRange {
|
|
|
32
32
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
onChangeEnd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
34
|
multi: PropTypes.Requireable<boolean>;
|
|
35
|
+
theme: PropTypes.Requireable<string>;
|
|
36
|
+
min: PropTypes.Requireable<number>;
|
|
37
|
+
max: PropTypes.Requireable<number>;
|
|
38
|
+
step: PropTypes.Requireable<number>;
|
|
35
39
|
HammerForTestingMin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
36
40
|
on: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
41
|
destroy: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -42,7 +46,6 @@ declare namespace QuestionRange {
|
|
|
42
46
|
destroy: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
47
|
stop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
44
48
|
}>>;
|
|
45
|
-
value: PropTypes.Requireable<NonNullable<number | (number | null | undefined)[] | null | undefined>>;
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
51
|
import PropTypes from "prop-types";
|
|
@@ -183,7 +183,9 @@ const QuickFilters = ({
|
|
|
183
183
|
wrapperSize: 20
|
|
184
184
|
},
|
|
185
185
|
"aria-label": ariaLabel
|
|
186
|
-
}), /*#__PURE__*/_react.default.createElement("span",
|
|
186
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
187
|
+
className: _style.default.filterLabel
|
|
188
|
+
}, label), /*#__PURE__*/_react.default.createElement("div", {
|
|
187
189
|
className: _style.default.bar,
|
|
188
190
|
style: {
|
|
189
191
|
background: primarySkinColor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_icon","_colors","_buttonLink","_provider","_style","_types","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","SCROLL_RIGHT_SIZE","SCROLL_LEFT_SIZE","handleScroll","direction","listRef","current","scrollBy","left","behavior","exports","getFilterButton","filterButtonProps","primarySkinColor","tag","rest","createElement","className","style","filterButtonWrapper","borderColor","label","filterButton","icon","position","faIcon","name","size","color","COLORS","cm_grey_700","neutral_500","customStyle","backgroundColor","undefined","borderRadius","QuickFilters","primaryOption","filterOptions","filterOptionsAriaLabel","context","skin","GetSkinFromContext","_get2","defaultLabel","defaultIconName","defaultSelected","defaultAriaLabel","onDefaultClick","filtersListRef","React","useRef","rightBtnRef","leftBtnRef","handleScrollRight","useCallback","handleScrollLeft","useEffect","list","rightButton","leftButton","update","rightArrowWidth","offsetWidth","showingRightButton","scrollLeft","clientWidth","scrollWidth","showingLeftButton","visibility","opacity","addEventListener","window","removeEventListener","filtersMainContainer","leftArrowButton","ref","onClick","height","filtersList","classNames","defaultOption","filterSelected","iconName","faSize","wrapperSize","filterLabel","bar","background","filterSeparator","filtersContainer","map","filterOption","idx","selected","value","ariaLabel","key","borderBottomColor","rightArrowButton","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default"],"sources":["../../../src/molecule/quick-filters/index.tsx"],"sourcesContent":["import React, {useCallback, useRef, useEffect} from 'react';\nimport classNames from 'classnames';\nimport {get} from 'lodash/fp';\nimport FaIcon from '../../atom/icon';\nimport {COLORS} from '../../variables/colors';\nimport ButtonLink from '../../atom/button-link';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport style from './style.css';\nimport {QuickFiltersProps, propTypes} from './types';\n\nconst SCROLL_RIGHT_SIZE = 400;\nconst SCROLL_LEFT_SIZE = -400;\nexport const handleScroll = (direction: number, listRef: React.RefObject<HTMLDivElement>) => {\n if (listRef.current) {\n listRef.current.scrollBy({\n left: direction,\n behavior: 'smooth'\n });\n }\n};\n\nconst getFilterButton = (\n filterButtonProps: ButtonLinkProps | undefined,\n primarySkinColor: string\n) => {\n if (!filterButtonProps) return null;\n const {tag, ...rest} = filterButtonProps;\n return (\n <div\n className={style.filterButtonWrapper}\n style={{borderColor: tag?.label ? primarySkinColor : 'transparent'}}\n >\n <div className={style.filterButton}>\n <ButtonLink\n {...rest}\n icon={{\n position: 'left',\n faIcon: {\n name: 'sliders',\n size: 14,\n color: tag ? COLORS.cm_grey_700 : COLORS.neutral_500\n }\n }}\n tag={\n tag\n ? {\n label: tag.label,\n customStyle: {backgroundColor: primarySkinColor, color: '#FFFFFF'}\n }\n : undefined\n }\n className={style.filterButton}\n data-testid=\"open-filters-modal-button\"\n customStyle={{borderRadius: '12px'}}\n />\n </div>\n </div>\n );\n};\n\nconst QuickFilters = (\n {primaryOption, filterOptions, filterButton, filterOptionsAriaLabel}: QuickFiltersProps,\n context: WebContextValues\n) => {\n const skin = GetSkinFromContext(context);\n const primarySkinColor = get('common.primary', skin);\n const {defaultLabel, defaultIconName, defaultSelected, defaultAriaLabel, onDefaultClick} =\n primaryOption;\n const filtersListRef = React.useRef<HTMLDivElement>(null);\n const rightBtnRef = useRef<HTMLDivElement>(null);\n const leftBtnRef = useRef<HTMLDivElement>(null);\n\n const handleScrollRight = useCallback(() => {\n handleScroll(SCROLL_RIGHT_SIZE, filtersListRef);\n }, [filtersListRef]);\n const handleScrollLeft = useCallback(() => {\n handleScroll(SCROLL_LEFT_SIZE, filtersListRef);\n }, [filtersListRef]);\n useEffect(() => {\n const list = filtersListRef.current;\n const rightButton = rightBtnRef.current;\n const leftButton = leftBtnRef.current;\n /* istanbul ignore next */ // not testable without complex mocking useRef\n if (!list || !leftButton || !rightButton) return;\n\n const update = () => {\n const rightArrowWidth = rightButton.offsetWidth;\n const showingRightButton =\n list.scrollLeft + list.clientWidth < list.scrollWidth - rightArrowWidth;\n const showingLeftButton = list.scrollLeft > 0;\n rightButton.style.visibility = showingRightButton ? 'visible' : 'hidden';\n rightButton.style.opacity = showingRightButton ? '1' : '0';\n leftButton.style.visibility = showingLeftButton ? 'visible' : 'hidden';\n leftButton.style.opacity = showingLeftButton ? '1' : '0';\n };\n\n list.addEventListener('scroll', update);\n window.addEventListener('resize', update);\n update();\n return () => {\n list.removeEventListener('scroll', update);\n window.removeEventListener('resize', update);\n };\n }, [filterOptions]);\n\n return (\n <div className={style.filtersMainContainer} data-name=\"search\">\n <div className={style.leftArrowButton} ref={leftBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{position: 'left', faIcon: {name: 'arrow-left', size: 15}}}\n onClick={handleScrollLeft}\n className={style.leftArrowButton}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-left-button\"\n />\n </div>\n <div\n className={style.filtersList}\n ref={filtersListRef}\n data-testid=\"filters-options-list\"\n aria-label={filterOptionsAriaLabel}\n >\n <div\n data-testid=\"all-option\"\n className={classNames(style.defaultOption, defaultSelected && style.filterSelected)}\n onClick={onDefaultClick}\n >\n <FaIcon\n iconName={defaultIconName}\n size={{faSize: 20, wrapperSize: 20}}\n aria-label={defaultAriaLabel}\n />\n <span className={style.filterLabel}>{defaultLabel}</span>\n <div className={style.bar} style={{background: primarySkinColor}} />\n </div>\n <div className={style.filterSeparator} />\n <div className={style.filtersContainer}>\n {filterOptions.map((filterOption, idx) => {\n const {iconName, label, selected, value, onClick, ariaLabel} = filterOption;\n return (\n <div\n key={idx}\n className={classNames(style.filterOption, selected && style.filterSelected)}\n data-testid={`filter-${value}-${idx}`}\n style={{borderBottomColor: primarySkinColor}}\n onClick={onClick}\n >\n <FaIcon\n iconName={iconName}\n size={{faSize: 20, wrapperSize: 20}}\n aria-label={ariaLabel}\n />\n <span>{label}</span>\n <div className={style.bar} style={{background: primarySkinColor}} />\n </div>\n );\n })}\n <div className={style.rightArrowButton} ref={rightBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{\n position: 'left',\n faIcon: {\n name: 'arrow-right',\n size: 15\n }\n }}\n className={style.rightArrowButton}\n onClick={handleScrollRight}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-right-button\"\n />\n </div>\n </div>\n </div>\n {getFilterButton(filterButton, primarySkinColor)}\n </div>\n );\n};\n\nQuickFilters.propTypes = propTypes;\nQuickFilters.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\nexport default QuickFilters;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAA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;AAAC,IAAAkE,QAAA,GAAAjG,OAAA,CAAA7B,OAAA,GACauD,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_icon","_colors","_buttonLink","_provider","_style","_types","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","SCROLL_RIGHT_SIZE","SCROLL_LEFT_SIZE","handleScroll","direction","listRef","current","scrollBy","left","behavior","exports","getFilterButton","filterButtonProps","primarySkinColor","tag","rest","createElement","className","style","filterButtonWrapper","borderColor","label","filterButton","icon","position","faIcon","name","size","color","COLORS","cm_grey_700","neutral_500","customStyle","backgroundColor","undefined","borderRadius","QuickFilters","primaryOption","filterOptions","filterOptionsAriaLabel","context","skin","GetSkinFromContext","_get2","defaultLabel","defaultIconName","defaultSelected","defaultAriaLabel","onDefaultClick","filtersListRef","React","useRef","rightBtnRef","leftBtnRef","handleScrollRight","useCallback","handleScrollLeft","useEffect","list","rightButton","leftButton","update","rightArrowWidth","offsetWidth","showingRightButton","scrollLeft","clientWidth","scrollWidth","showingLeftButton","visibility","opacity","addEventListener","window","removeEventListener","filtersMainContainer","leftArrowButton","ref","onClick","height","filtersList","classNames","defaultOption","filterSelected","iconName","faSize","wrapperSize","filterLabel","bar","background","filterSeparator","filtersContainer","map","filterOption","idx","selected","value","ariaLabel","key","borderBottomColor","rightArrowButton","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default"],"sources":["../../../src/molecule/quick-filters/index.tsx"],"sourcesContent":["import React, {useCallback, useRef, useEffect} from 'react';\nimport classNames from 'classnames';\nimport {get} from 'lodash/fp';\nimport FaIcon from '../../atom/icon';\nimport {COLORS} from '../../variables/colors';\nimport ButtonLink from '../../atom/button-link';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport style from './style.css';\nimport {QuickFiltersProps, propTypes} from './types';\n\nconst SCROLL_RIGHT_SIZE = 400;\nconst SCROLL_LEFT_SIZE = -400;\nexport const handleScroll = (direction: number, listRef: React.RefObject<HTMLDivElement>) => {\n if (listRef.current) {\n listRef.current.scrollBy({\n left: direction,\n behavior: 'smooth'\n });\n }\n};\n\nconst getFilterButton = (\n filterButtonProps: ButtonLinkProps | undefined,\n primarySkinColor: string\n) => {\n if (!filterButtonProps) return null;\n const {tag, ...rest} = filterButtonProps;\n return (\n <div\n className={style.filterButtonWrapper}\n style={{borderColor: tag?.label ? primarySkinColor : 'transparent'}}\n >\n <div className={style.filterButton}>\n <ButtonLink\n {...rest}\n icon={{\n position: 'left',\n faIcon: {\n name: 'sliders',\n size: 14,\n color: tag ? COLORS.cm_grey_700 : COLORS.neutral_500\n }\n }}\n tag={\n tag\n ? {\n label: tag.label,\n customStyle: {backgroundColor: primarySkinColor, color: '#FFFFFF'}\n }\n : undefined\n }\n className={style.filterButton}\n data-testid=\"open-filters-modal-button\"\n customStyle={{borderRadius: '12px'}}\n />\n </div>\n </div>\n );\n};\n\nconst QuickFilters = (\n {primaryOption, filterOptions, filterButton, filterOptionsAriaLabel}: QuickFiltersProps,\n context: WebContextValues\n) => {\n const skin = GetSkinFromContext(context);\n const primarySkinColor = get('common.primary', skin);\n const {defaultLabel, defaultIconName, defaultSelected, defaultAriaLabel, onDefaultClick} =\n primaryOption;\n const filtersListRef = React.useRef<HTMLDivElement>(null);\n const rightBtnRef = useRef<HTMLDivElement>(null);\n const leftBtnRef = useRef<HTMLDivElement>(null);\n\n const handleScrollRight = useCallback(() => {\n handleScroll(SCROLL_RIGHT_SIZE, filtersListRef);\n }, [filtersListRef]);\n const handleScrollLeft = useCallback(() => {\n handleScroll(SCROLL_LEFT_SIZE, filtersListRef);\n }, [filtersListRef]);\n useEffect(() => {\n const list = filtersListRef.current;\n const rightButton = rightBtnRef.current;\n const leftButton = leftBtnRef.current;\n /* istanbul ignore next */ // not testable without complex mocking useRef\n if (!list || !leftButton || !rightButton) return;\n\n const update = () => {\n const rightArrowWidth = rightButton.offsetWidth;\n const showingRightButton =\n list.scrollLeft + list.clientWidth < list.scrollWidth - rightArrowWidth;\n const showingLeftButton = list.scrollLeft > 0;\n rightButton.style.visibility = showingRightButton ? 'visible' : 'hidden';\n rightButton.style.opacity = showingRightButton ? '1' : '0';\n leftButton.style.visibility = showingLeftButton ? 'visible' : 'hidden';\n leftButton.style.opacity = showingLeftButton ? '1' : '0';\n };\n\n list.addEventListener('scroll', update);\n window.addEventListener('resize', update);\n update();\n return () => {\n list.removeEventListener('scroll', update);\n window.removeEventListener('resize', update);\n };\n }, [filterOptions]);\n\n return (\n <div className={style.filtersMainContainer} data-name=\"search\">\n <div className={style.leftArrowButton} ref={leftBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{position: 'left', faIcon: {name: 'arrow-left', size: 15}}}\n onClick={handleScrollLeft}\n className={style.leftArrowButton}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-left-button\"\n />\n </div>\n <div\n className={style.filtersList}\n ref={filtersListRef}\n data-testid=\"filters-options-list\"\n aria-label={filterOptionsAriaLabel}\n >\n <div\n data-testid=\"all-option\"\n className={classNames(style.defaultOption, defaultSelected && style.filterSelected)}\n onClick={onDefaultClick}\n >\n <FaIcon\n iconName={defaultIconName}\n size={{faSize: 20, wrapperSize: 20}}\n aria-label={defaultAriaLabel}\n />\n <span className={style.filterLabel}>{defaultLabel}</span>\n <div className={style.bar} style={{background: primarySkinColor}} />\n </div>\n <div className={style.filterSeparator} />\n <div className={style.filtersContainer}>\n {filterOptions.map((filterOption, idx) => {\n const {iconName, label, selected, value, onClick, ariaLabel} = filterOption;\n return (\n <div\n key={idx}\n className={classNames(style.filterOption, selected && style.filterSelected)}\n data-testid={`filter-${value}-${idx}`}\n style={{borderBottomColor: primarySkinColor}}\n onClick={onClick}\n >\n <FaIcon\n iconName={iconName}\n size={{faSize: 20, wrapperSize: 20}}\n aria-label={ariaLabel}\n />\n <span className={style.filterLabel}>{label}</span>\n <div className={style.bar} style={{background: primarySkinColor}} />\n </div>\n );\n })}\n <div className={style.rightArrowButton} ref={rightBtnRef} style={{visibility: 'hidden'}}>\n <ButtonLink\n icon={{\n position: 'left',\n faIcon: {\n name: 'arrow-right',\n size: 15\n }\n }}\n className={style.rightArrowButton}\n onClick={handleScrollRight}\n customStyle={{height: '36px'}}\n data-testid=\"scroll-right-button\"\n />\n </div>\n </div>\n </div>\n {getFilterButton(filterButton, primarySkinColor)}\n </div>\n );\n};\n\nQuickFilters.propTypes = propTypes;\nQuickFilters.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\nexport default QuickFilters;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AAGA,IAAAM,SAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAqD,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CA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IAAQ;EAAE,gBACtFzG,MAAA,CAAAiB,OAAA,CAAAmC,aAAA,CAAC7C,WAAA,CAAAU,OAAU;IACT0C,IAAI,EAAE;MACJC,QAAQ,EAAE,MAAM;MAChBC,MAAM,EAAE;QACNC,IAAI,EAAE,aAAa;QACnBC,IAAI,EAAE;MACR;IACF,CAAE;IACFV,SAAS,EAAEC,cAAK,CAACiF,gBAAiB;IAClCtB,OAAO,EAAEvB,iBAAkB;IAC3BtB,WAAW,EAAE;MAAC8C,MAAM,EAAE;IAAM,CAAE;IAC9B,eAAY;EAAqB,CAClC,CACE,CACF,CACF,CAAC,EACLnE,eAAe,CAACW,YAAY,EAAET,gBAAgB,CAC5C,CAAC;AAEV,CAAC;AAEDuB,YAAY,CAACgE,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,gBAAS;AAClChE,YAAY,CAACoE,YAAY,GAAG;EAC1B/D,IAAI,EAAEgE,iBAAQ,CAACC,iBAAiB,CAACjE;AACnC,CAAC;AAAC,IAAAkE,QAAA,GAAAjG,OAAA,CAAA7B,OAAA,GACauD,YAAY","ignoreList":[]}
|
|
@@ -745,8 +745,28 @@ declare const ContentSkillModal: {
|
|
|
745
745
|
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
746
746
|
theme: import("prop-types").Validator<string>;
|
|
747
747
|
ariaLabel: import("prop-types").Validator<string>;
|
|
748
|
+
id: import("prop-types").Requireable<string>;
|
|
748
749
|
}> | null | undefined)[]>;
|
|
749
750
|
}>>;
|
|
751
|
+
}> | import("prop-types").InferProps<{
|
|
752
|
+
type: import("prop-types").Requireable<string>;
|
|
753
|
+
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
754
|
+
title: import("prop-types").Validator<string>;
|
|
755
|
+
titleAriaLabel: import("prop-types").Requireable<string>;
|
|
756
|
+
onClear: import("prop-types").Validator<(...args: any[]) => any>;
|
|
757
|
+
options: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
758
|
+
label: import("prop-types").Validator<string>;
|
|
759
|
+
min: import("prop-types").Validator<number>;
|
|
760
|
+
max: import("prop-types").Validator<number>;
|
|
761
|
+
step: import("prop-types").Requireable<number>;
|
|
762
|
+
value: import("prop-types").Requireable<(number | null | undefined)[]>;
|
|
763
|
+
minLabel: import("prop-types").Requireable<string>;
|
|
764
|
+
maxLabel: import("prop-types").Requireable<string>;
|
|
765
|
+
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
766
|
+
theme: import("prop-types").Requireable<string>;
|
|
767
|
+
selected: import("prop-types").Requireable<boolean>;
|
|
768
|
+
}>>;
|
|
769
|
+
}>>;
|
|
750
770
|
}> | null | undefined> | null | undefined)[]>;
|
|
751
771
|
}>>>;
|
|
752
772
|
modal: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DvD,CAAC;AAQF,eAAe,iBAAiB,CAAC"}
|
|
@@ -742,8 +742,28 @@ declare const ContentSkillModalPropTypes: {
|
|
|
742
742
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
743
743
|
theme: PropTypes.Validator<string>;
|
|
744
744
|
ariaLabel: PropTypes.Validator<string>;
|
|
745
|
+
id: PropTypes.Requireable<string>;
|
|
745
746
|
}> | null | undefined)[]>;
|
|
746
747
|
}>>;
|
|
748
|
+
}> | PropTypes.InferProps<{
|
|
749
|
+
type: PropTypes.Requireable<string>;
|
|
750
|
+
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
751
|
+
title: PropTypes.Validator<string>;
|
|
752
|
+
titleAriaLabel: PropTypes.Requireable<string>;
|
|
753
|
+
onClear: PropTypes.Validator<(...args: any[]) => any>;
|
|
754
|
+
options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
755
|
+
label: PropTypes.Validator<string>;
|
|
756
|
+
min: PropTypes.Validator<number>;
|
|
757
|
+
max: PropTypes.Validator<number>;
|
|
758
|
+
step: PropTypes.Requireable<number>;
|
|
759
|
+
value: PropTypes.Requireable<(number | null | undefined)[]>;
|
|
760
|
+
minLabel: PropTypes.Requireable<string>;
|
|
761
|
+
maxLabel: PropTypes.Requireable<string>;
|
|
762
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
763
|
+
theme: PropTypes.Requireable<string>;
|
|
764
|
+
selected: PropTypes.Requireable<boolean>;
|
|
765
|
+
}>>;
|
|
766
|
+
}>>;
|
|
747
767
|
}> | null | undefined> | null | undefined)[]>;
|
|
748
768
|
}>>>;
|
|
749
769
|
modal: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAkC,EAChC,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAStD,QAAA,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAkC,EAChC,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAStD,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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