@bento-core/facet-filter 1.0.1-ccdihub.4 → 1.0.1-ccdihub.5
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.
|
@@ -32,7 +32,6 @@ const SliderView = _ref => {
|
|
|
32
32
|
} = facet;
|
|
33
33
|
const lowerBoundValue = facetValues[0];
|
|
34
34
|
const upperBoundValue = facetValues[1];
|
|
35
|
-
console.log(facet);
|
|
36
35
|
|
|
37
36
|
// Determines whether the lower bound and upper bound values are valid
|
|
38
37
|
const isValid = () => {
|
|
@@ -119,7 +118,7 @@ const styles = () => ({
|
|
|
119
118
|
marginRight: 'Auto',
|
|
120
119
|
paddingRight: '20px'
|
|
121
120
|
},
|
|
122
|
-
minValue: props =>
|
|
121
|
+
minValue: props => props.facet.style && props.facet.style.minValue ? props.facet.style.minValue : {
|
|
123
122
|
fontFamily: 'Nunito',
|
|
124
123
|
fontSize: '15px',
|
|
125
124
|
color: '#000000',
|
|
@@ -127,57 +126,57 @@ const styles = () => ({
|
|
|
127
126
|
float: 'left',
|
|
128
127
|
width: '75px',
|
|
129
128
|
display: 'flex'
|
|
130
|
-
}
|
|
131
|
-
maxValue: props =>
|
|
129
|
+
},
|
|
130
|
+
maxValue: props => props.facet.style && props.facet.style.maxValue ? props.facet.style.maxValue : {
|
|
132
131
|
fontFamily: 'Nunito',
|
|
133
132
|
fontSize: '15px',
|
|
134
133
|
color: '#000000',
|
|
135
134
|
float: 'right',
|
|
136
135
|
marginBottom: '0px',
|
|
137
136
|
display: 'flex'
|
|
138
|
-
}
|
|
139
|
-
rail: props =>
|
|
137
|
+
},
|
|
138
|
+
rail: props => props.facet.style && props.facet.style.rail ? props.facet.style.rail : {
|
|
140
139
|
borderRadius: 4,
|
|
141
140
|
height: 6,
|
|
142
141
|
background: '#142D64'
|
|
143
|
-
}
|
|
144
|
-
minInputLabel: props =>
|
|
142
|
+
},
|
|
143
|
+
minInputLabel: props => props.facet.style && props.facet.style.minInputLabel ? props.facet.style.minInputLabel : {
|
|
145
144
|
float: 'left',
|
|
146
145
|
lineHeight: '34px',
|
|
147
146
|
marginRight: '5px'
|
|
148
|
-
}
|
|
149
|
-
maxInputLabel: props =>
|
|
147
|
+
},
|
|
148
|
+
maxInputLabel: props => props.facet.style && props.facet.style.maxInputLabel ? props.facet.style.maxInputLabel : {
|
|
150
149
|
float: 'left',
|
|
151
150
|
lineHeight: '34px',
|
|
152
151
|
marginRight: '5px'
|
|
153
|
-
}
|
|
154
|
-
thumb: props =>
|
|
152
|
+
},
|
|
153
|
+
thumb: props => props.facet.style && props.facet.style.thumb ? props.facet.style.thumb : {
|
|
155
154
|
height: 16,
|
|
156
155
|
width: 16,
|
|
157
156
|
background: '#10A075'
|
|
158
|
-
}
|
|
159
|
-
invalidThumb: props =>
|
|
157
|
+
},
|
|
158
|
+
invalidThumb: props => props.facet.style && props.facet.style.invalidThumb ? props.facet.style.invalidThumb : {
|
|
160
159
|
height: 16,
|
|
161
160
|
width: 16,
|
|
162
161
|
background: '#F44336'
|
|
163
|
-
}
|
|
164
|
-
track: props =>
|
|
162
|
+
},
|
|
163
|
+
track: props => props.facet.style && props.facet.style.track ? props.facet.style.track : {
|
|
165
164
|
borderRadius: 4,
|
|
166
165
|
height: 6,
|
|
167
166
|
background: '#10A075',
|
|
168
167
|
'&~&': {
|
|
169
168
|
background: '#142D64'
|
|
170
169
|
}
|
|
171
|
-
}
|
|
172
|
-
invalidTrack: props =>
|
|
170
|
+
},
|
|
171
|
+
invalidTrack: props => props.facet.style && props.facet.style.invalidTrack ? props.facet.style.invalidTrack : {
|
|
173
172
|
borderRadius: 4,
|
|
174
173
|
height: 6,
|
|
175
174
|
background: '#F44336',
|
|
176
175
|
'&~&': {
|
|
177
176
|
background: '#142D64'
|
|
178
177
|
}
|
|
179
|
-
}
|
|
180
|
-
upperBound: props =>
|
|
178
|
+
},
|
|
179
|
+
upperBound: props => props.facet.style && props.facet.style.upperBound ? props.facet.style.upperBound : {
|
|
181
180
|
fontFamily: 'Nunito',
|
|
182
181
|
fontSize: '10px',
|
|
183
182
|
color: '#000000',
|
|
@@ -185,8 +184,8 @@ const styles = () => ({
|
|
|
185
184
|
marginLeft: 'Auto',
|
|
186
185
|
marginRight: 'Auto',
|
|
187
186
|
marginBottom: '15px'
|
|
188
|
-
}
|
|
189
|
-
lowerBound: props =>
|
|
187
|
+
},
|
|
188
|
+
lowerBound: props => props.facet.style && props.facet.style.lowerBound ? props.facet.style.lowerBound : {
|
|
190
189
|
fontFamily: 'Nunito',
|
|
191
190
|
fontSize: '10px',
|
|
192
191
|
color: '#000000',
|
|
@@ -194,8 +193,8 @@ const styles = () => ({
|
|
|
194
193
|
marginLeft: 'Auto',
|
|
195
194
|
marginRight: 'Auto',
|
|
196
195
|
marginBottom: '15px'
|
|
197
|
-
}
|
|
198
|
-
sliderText: props =>
|
|
196
|
+
},
|
|
197
|
+
sliderText: props => props.facet.style && props.facet.style.sliderText ? props.facet.style.sliderText : {
|
|
199
198
|
color: '#10a075',
|
|
200
199
|
lineHeight: '120%',
|
|
201
200
|
fontFamily: 'Nunito',
|
|
@@ -205,8 +204,8 @@ const styles = () => ({
|
|
|
205
204
|
textAlign: 'right',
|
|
206
205
|
background: '#f5fdee',
|
|
207
206
|
marginTop: '10px'
|
|
208
|
-
}
|
|
209
|
-
invalidSliderText: props =>
|
|
207
|
+
},
|
|
208
|
+
invalidSliderText: props => props.facet.style && props.facet.style.invalidSliderText ? props.facet.style.invalidSliderText : {
|
|
210
209
|
color: '#D32F2F',
|
|
211
210
|
lineHeight: '120%',
|
|
212
211
|
fontFamily: 'Nunito',
|
|
@@ -216,18 +215,18 @@ const styles = () => ({
|
|
|
216
215
|
textAlign: 'right',
|
|
217
216
|
background: '#E57373',
|
|
218
217
|
marginTop: '10px'
|
|
219
|
-
}
|
|
220
|
-
sliderListItem: props =>
|
|
218
|
+
},
|
|
219
|
+
sliderListItem: props => props.facet.style && props.facet.style.sliderListItem ? props.facet.style.sliderListItem : {
|
|
221
220
|
height: '15px'
|
|
222
|
-
}
|
|
223
|
-
listItemGutters: props =>
|
|
221
|
+
},
|
|
222
|
+
listItemGutters: props => props.facet.style && props.facet.style.listItemGutters ? props.facet.style.listItemGutters : {
|
|
224
223
|
display: 'flex',
|
|
225
224
|
justifyContent: 'space-between',
|
|
226
225
|
padding: '2px 5px 2px 8px'
|
|
227
|
-
}
|
|
228
|
-
lowerUpperBound: props =>
|
|
226
|
+
},
|
|
227
|
+
lowerUpperBound: props => props.facet.style && props.facet.style.lowerUpperBound ? props.facet.style.lowerUpperBound : {
|
|
229
228
|
height: '15px'
|
|
230
|
-
}
|
|
229
|
+
}
|
|
231
230
|
});
|
|
232
231
|
var _default = (0, _core.withStyles)(styles)(SliderView);
|
|
233
232
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -18,8 +18,6 @@ const SliderView = ({
|
|
|
18
18
|
const lowerBoundValue = facetValues[0];
|
|
19
19
|
const upperBoundValue = facetValues[1];
|
|
20
20
|
|
|
21
|
-
console.log(facet);
|
|
22
|
-
|
|
23
21
|
// Determines whether the lower bound and upper bound values are valid
|
|
24
22
|
const isValid = () => {
|
|
25
23
|
const checks = [
|
|
@@ -138,115 +136,147 @@ const styles = () => ({
|
|
|
138
136
|
marginRight: 'Auto',
|
|
139
137
|
paddingRight: '20px',
|
|
140
138
|
}),
|
|
141
|
-
minValue: (props) => (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
maxInputLabel: (props) => ({
|
|
169
|
-
float: 'left',
|
|
170
|
-
lineHeight: '34px',
|
|
171
|
-
marginRight: '5px',
|
|
172
|
-
}),
|
|
173
|
-
thumb: (props) => ({
|
|
174
|
-
height: 16,
|
|
175
|
-
width: 16,
|
|
176
|
-
background: '#10A075',
|
|
177
|
-
}),
|
|
178
|
-
invalidThumb: (props) => ({
|
|
179
|
-
height: 16,
|
|
180
|
-
width: 16,
|
|
181
|
-
background: '#F44336',
|
|
182
|
-
}),
|
|
183
|
-
track: (props) => ({
|
|
184
|
-
borderRadius: 4,
|
|
185
|
-
height: 6,
|
|
186
|
-
background: '#10A075',
|
|
187
|
-
'&~&': {
|
|
188
|
-
background: '#142D64',
|
|
189
|
-
},
|
|
190
|
-
}),
|
|
191
|
-
invalidTrack: (props) => ({
|
|
192
|
-
borderRadius: 4,
|
|
193
|
-
height: 6,
|
|
194
|
-
background: '#F44336',
|
|
195
|
-
'&~&': {
|
|
139
|
+
minValue: (props) => (props.facet.style && props.facet.style.minValue
|
|
140
|
+
? props.facet.style.minValue
|
|
141
|
+
: {
|
|
142
|
+
fontFamily: 'Nunito',
|
|
143
|
+
fontSize: '15px',
|
|
144
|
+
color: '#000000',
|
|
145
|
+
marginBottom: '0px',
|
|
146
|
+
float: 'left',
|
|
147
|
+
width: '75px',
|
|
148
|
+
display: 'flex',
|
|
149
|
+
}),
|
|
150
|
+
maxValue: (props) => (props.facet.style && props.facet.style.maxValue
|
|
151
|
+
? props.facet.style.maxValue
|
|
152
|
+
: {
|
|
153
|
+
fontFamily: 'Nunito',
|
|
154
|
+
fontSize: '15px',
|
|
155
|
+
color: '#000000',
|
|
156
|
+
float: 'right',
|
|
157
|
+
marginBottom: '0px',
|
|
158
|
+
display: 'flex',
|
|
159
|
+
}),
|
|
160
|
+
rail: (props) => (props.facet.style && props.facet.style.rail
|
|
161
|
+
? props.facet.style.rail
|
|
162
|
+
: {
|
|
163
|
+
borderRadius: 4,
|
|
164
|
+
height: 6,
|
|
196
165
|
background: '#142D64',
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
166
|
+
}),
|
|
167
|
+
minInputLabel: (props) => (props.facet.style && props.facet.style.minInputLabel
|
|
168
|
+
? props.facet.style.minInputLabel
|
|
169
|
+
: {
|
|
170
|
+
float: 'left',
|
|
171
|
+
lineHeight: '34px',
|
|
172
|
+
marginRight: '5px',
|
|
173
|
+
}),
|
|
174
|
+
maxInputLabel: (props) => (props.facet.style && props.facet.style.maxInputLabel
|
|
175
|
+
? props.facet.style.maxInputLabel
|
|
176
|
+
: {
|
|
177
|
+
float: 'left',
|
|
178
|
+
lineHeight: '34px',
|
|
179
|
+
marginRight: '5px',
|
|
180
|
+
}),
|
|
181
|
+
thumb: (props) => (props.facet.style && props.facet.style.thumb
|
|
182
|
+
? props.facet.style.thumb
|
|
183
|
+
: {
|
|
184
|
+
height: 16,
|
|
185
|
+
width: 16,
|
|
186
|
+
background: '#10A075',
|
|
187
|
+
}),
|
|
188
|
+
invalidThumb: (props) => (props.facet.style && props.facet.style.invalidThumb
|
|
189
|
+
? props.facet.style.invalidThumb
|
|
190
|
+
: {
|
|
191
|
+
height: 16,
|
|
192
|
+
width: 16,
|
|
193
|
+
background: '#F44336',
|
|
194
|
+
}),
|
|
195
|
+
track: (props) => (props.facet.style && props.facet.style.track
|
|
196
|
+
? props.facet.style.track
|
|
197
|
+
: {
|
|
198
|
+
borderRadius: 4,
|
|
199
|
+
height: 6,
|
|
200
|
+
background: '#10A075',
|
|
201
|
+
'&~&': {
|
|
202
|
+
background: '#142D64',
|
|
203
|
+
},
|
|
204
|
+
}),
|
|
205
|
+
invalidTrack: (props) => (props.facet.style && props.facet.style.invalidTrack
|
|
206
|
+
? props.facet.style.invalidTrack
|
|
207
|
+
: {
|
|
208
|
+
borderRadius: 4,
|
|
209
|
+
height: 6,
|
|
210
|
+
background: '#F44336',
|
|
211
|
+
'&~&': {
|
|
212
|
+
background: '#142D64',
|
|
213
|
+
},
|
|
214
|
+
}),
|
|
215
|
+
upperBound: (props) => (props.facet.style && props.facet.style.upperBound
|
|
216
|
+
? props.facet.style.upperBound
|
|
217
|
+
: {
|
|
218
|
+
fontFamily: 'Nunito',
|
|
219
|
+
fontSize: '10px',
|
|
220
|
+
color: '#000000',
|
|
221
|
+
float: 'right',
|
|
222
|
+
marginLeft: 'Auto',
|
|
223
|
+
marginRight: 'Auto',
|
|
224
|
+
marginBottom: '15px',
|
|
225
|
+
}),
|
|
226
|
+
lowerBound: (props) => (props.facet.style && props.facet.style.lowerBound
|
|
227
|
+
? props.facet.style.lowerBound
|
|
228
|
+
: {
|
|
229
|
+
fontFamily: 'Nunito',
|
|
230
|
+
fontSize: '10px',
|
|
231
|
+
color: '#000000',
|
|
232
|
+
float: 'left',
|
|
233
|
+
marginLeft: 'Auto',
|
|
234
|
+
marginRight: 'Auto',
|
|
235
|
+
marginBottom: '15px',
|
|
236
|
+
}),
|
|
237
|
+
sliderText: (props) => (props.facet.style && props.facet.style.sliderText
|
|
238
|
+
? props.facet.style.sliderText
|
|
239
|
+
: {
|
|
240
|
+
color: '#10a075',
|
|
241
|
+
lineHeight: '120%',
|
|
242
|
+
fontFamily: 'Nunito',
|
|
243
|
+
fontSize: '14px',
|
|
244
|
+
padding: '5px 15px 5px 0px',
|
|
245
|
+
width: '100%',
|
|
246
|
+
textAlign: 'right',
|
|
247
|
+
background: '#f5fdee',
|
|
248
|
+
marginTop: '10px',
|
|
249
|
+
}),
|
|
250
|
+
invalidSliderText: (props) => (props.facet.style && props.facet.style.invalidSliderText
|
|
251
|
+
? props.facet.style.invalidSliderText
|
|
252
|
+
: {
|
|
253
|
+
color: '#D32F2F',
|
|
254
|
+
lineHeight: '120%',
|
|
255
|
+
fontFamily: 'Nunito',
|
|
256
|
+
fontSize: '14px',
|
|
257
|
+
padding: '5px 15px 5px 0px',
|
|
258
|
+
width: '100%',
|
|
259
|
+
textAlign: 'right',
|
|
260
|
+
background: '#E57373',
|
|
261
|
+
marginTop: '10px',
|
|
262
|
+
}),
|
|
263
|
+
sliderListItem: (props) => (props.facet.style && props.facet.style.sliderListItem
|
|
264
|
+
? props.facet.style.sliderListItem
|
|
265
|
+
: {
|
|
266
|
+
height: '15px',
|
|
267
|
+
}),
|
|
268
|
+
listItemGutters: (props) => (props.facet.style && props.facet.style.listItemGutters
|
|
269
|
+
? props.facet.style.listItemGutters
|
|
270
|
+
: {
|
|
271
|
+
display: 'flex',
|
|
272
|
+
justifyContent: 'space-between',
|
|
273
|
+
padding: '2px 5px 2px 8px',
|
|
274
|
+
}),
|
|
275
|
+
lowerUpperBound: (props) => (props.facet.style && props.facet.style.lowerUpperBound
|
|
276
|
+
? props.facet.style.lowerUpperBound
|
|
277
|
+
: {
|
|
278
|
+
height: '15px',
|
|
279
|
+
}),
|
|
250
280
|
});
|
|
251
281
|
|
|
252
282
|
export default withStyles(styles)(SliderView);
|