@searchspring/snap-preact-components 0.44.1 → 0.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -144,7 +144,7 @@ var CSS = {
|
|
|
144
144
|
},
|
|
145
145
|
};
|
|
146
146
|
exports.FacetSlider = (0, mobx_react_lite_1.observer)(function (properties) {
|
|
147
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
147
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
148
148
|
var globalTheme = (0, providers_1.useTheme)();
|
|
149
149
|
var theme = __assign(__assign({}, globalTheme), properties.theme);
|
|
150
150
|
var props = __assign(__assign(__assign({
|
|
@@ -159,13 +159,13 @@ exports.FacetSlider = (0, mobx_react_lite_1.observer)(function (properties) {
|
|
|
159
159
|
else {
|
|
160
160
|
tickSize = Number(tickSize);
|
|
161
161
|
}
|
|
162
|
-
var
|
|
163
|
-
var
|
|
164
|
-
if ((((_m = facet.active) === null || _m === void 0 ? void 0 : _m.low)
|
|
165
|
-
setActive([(
|
|
166
|
-
setValues([(
|
|
162
|
+
var _y = (0, hooks_1.useState)([(_h = facet.active) === null || _h === void 0 ? void 0 : _h.low, (_j = facet.active) === null || _j === void 0 ? void 0 : _j.high]), values = _y[0], setValues = _y[1];
|
|
163
|
+
var _z = (0, hooks_1.useState)([(_k = facet.active) === null || _k === void 0 ? void 0 : _k.low, (_l = facet.active) === null || _l === void 0 ? void 0 : _l.high]), active = _z[0], setActive = _z[1];
|
|
164
|
+
if (((((_m = facet.active) === null || _m === void 0 ? void 0 : _m.low) || ((_o = facet.active) === null || _o === void 0 ? void 0 : _o.low) === 0) && ((_p = facet.active) === null || _p === void 0 ? void 0 : _p.high) && values[0] != ((_q = facet.active) === null || _q === void 0 ? void 0 : _q.low)) || values[1] != ((_r = facet.active) === null || _r === void 0 ? void 0 : _r.high)) {
|
|
165
|
+
setActive([(_s = facet.active) === null || _s === void 0 ? void 0 : _s.low, (_t = facet.active) === null || _t === void 0 ? void 0 : _t.high]);
|
|
166
|
+
setValues([(_u = facet.active) === null || _u === void 0 ? void 0 : _u.low, (_v = facet.active) === null || _v === void 0 ? void 0 : _v.high]);
|
|
167
167
|
}
|
|
168
|
-
var
|
|
168
|
+
var _0 = (0, react_ranger_1.useRanger)({
|
|
169
169
|
values: active,
|
|
170
170
|
onChange: function (val) {
|
|
171
171
|
var _a;
|
|
@@ -184,11 +184,11 @@ exports.FacetSlider = (0, mobx_react_lite_1.observer)(function (properties) {
|
|
|
184
184
|
setActive(val);
|
|
185
185
|
onDrag && onDrag(val);
|
|
186
186
|
},
|
|
187
|
-
min: (
|
|
188
|
-
max: (
|
|
187
|
+
min: (_w = facet.range) === null || _w === void 0 ? void 0 : _w.low,
|
|
188
|
+
max: (_x = facet.range) === null || _x === void 0 ? void 0 : _x.high,
|
|
189
189
|
stepSize: facet.step,
|
|
190
190
|
tickSize: tickSize,
|
|
191
|
-
}), getTrackProps =
|
|
191
|
+
}), getTrackProps = _0.getTrackProps, ticks = _0.ticks, segments = _0.segments, handles = _0.handles;
|
|
192
192
|
var styling = {};
|
|
193
193
|
if (!disableStyles) {
|
|
194
194
|
styling.css = [
|
|
@@ -145,7 +145,7 @@ export const FacetSlider = observer((properties) => {
|
|
|
145
145
|
}
|
|
146
146
|
const [values, setValues] = useState([facet.active?.low, facet.active?.high]);
|
|
147
147
|
const [active, setActive] = useState([facet.active?.low, facet.active?.high]);
|
|
148
|
-
if ((facet.active?.low && facet.active?.high && values[0] != facet.active?.low) || values[1] != facet.active?.high) {
|
|
148
|
+
if (((facet.active?.low || facet.active?.low === 0) && facet.active?.high && values[0] != facet.active?.low) || values[1] != facet.active?.high) {
|
|
149
149
|
setActive([facet.active?.low, facet.active?.high]);
|
|
150
150
|
setValues([facet.active?.low, facet.active?.high]);
|
|
151
151
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchspring/snap-preact-components",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.2",
|
|
4
4
|
"description": "Snap Preact Component Library",
|
|
5
5
|
"author": "Searchspring",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@emotion/react": "11.9.0",
|
|
29
|
-
"@searchspring/snap-toolbox": "^0.44.
|
|
29
|
+
"@searchspring/snap-toolbox": "^0.44.2",
|
|
30
30
|
"classnames": "^2.3.2",
|
|
31
31
|
"deepmerge": "4.3.1",
|
|
32
32
|
"dequal": "2.0.3",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"preact": "10.9.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@searchspring/snap-client": "^0.44.
|
|
42
|
-
"@searchspring/snap-controller": "^0.44.
|
|
43
|
-
"@searchspring/snap-event-manager": "^0.44.
|
|
44
|
-
"@searchspring/snap-logger": "^0.44.
|
|
45
|
-
"@searchspring/snap-profiler": "^0.44.
|
|
46
|
-
"@searchspring/snap-store-mobx": "^0.44.
|
|
47
|
-
"@searchspring/snap-tracker": "^0.44.
|
|
48
|
-
"@searchspring/snap-url-manager": "^0.44.
|
|
41
|
+
"@searchspring/snap-client": "^0.44.2",
|
|
42
|
+
"@searchspring/snap-controller": "^0.44.2",
|
|
43
|
+
"@searchspring/snap-event-manager": "^0.44.2",
|
|
44
|
+
"@searchspring/snap-logger": "^0.44.2",
|
|
45
|
+
"@searchspring/snap-profiler": "^0.44.2",
|
|
46
|
+
"@searchspring/snap-store-mobx": "^0.44.2",
|
|
47
|
+
"@searchspring/snap-tracker": "^0.44.2",
|
|
48
|
+
"@searchspring/snap-url-manager": "^0.44.2",
|
|
49
49
|
"@storybook/addon-actions": "6.4.22",
|
|
50
50
|
"@storybook/addon-controls": "6.4.22",
|
|
51
51
|
"@storybook/addon-docs": "6.4.22",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"ts-loader": "9.3.0"
|
|
68
68
|
},
|
|
69
69
|
"sideEffects": false,
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "761970703e97599f924d5c6a0d2e2a8401a2de34"
|
|
71
71
|
}
|