@woosmap/ui 4.226.12 → 4.226.14
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/package.json
CHANGED
|
@@ -37,20 +37,20 @@ export default class PricingSlider extends Component {
|
|
|
37
37
|
const valueToRemove = Math.min(tier[0] - previousPricingTier[0], q);
|
|
38
38
|
if (valueToRemove > 0) {
|
|
39
39
|
q -= valueToRemove;
|
|
40
|
-
return amount + (valueToRemove / 1000) *
|
|
40
|
+
return amount + (valueToRemove / 1000) * tier[1];
|
|
41
41
|
}
|
|
42
42
|
} else {
|
|
43
43
|
const valueToRemove = Math.min(tier[0], q);
|
|
44
44
|
q -= valueToRemove;
|
|
45
|
-
return amount + (valueToRemove / 1000) *
|
|
45
|
+
return amount + (valueToRemove / 1000) * tier[1];
|
|
46
46
|
}
|
|
47
47
|
return Math.floor(amount);
|
|
48
48
|
}, 0);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
computeQueries = (valueNow) => {
|
|
52
|
-
const { productPricing
|
|
53
|
-
const { pricing
|
|
52
|
+
const { productPricing } = this.props;
|
|
53
|
+
const { pricing } = productPricing;
|
|
54
54
|
if (pricing.length === 0) {
|
|
55
55
|
return valueNow;
|
|
56
56
|
}
|
|
@@ -62,7 +62,7 @@ export default class PricingSlider extends Component {
|
|
|
62
62
|
|
|
63
63
|
const previousTier = pricing[tierIndex - 1] ? pricing[tierIndex - 1][0] : 0;
|
|
64
64
|
const newValue = ((tier - previousTier) * value) / 100000 + previousTier;
|
|
65
|
-
if (newValue > pricing[
|
|
65
|
+
if (newValue > pricing[pricing.length - 2][0]) {
|
|
66
66
|
return '∞';
|
|
67
67
|
}
|
|
68
68
|
return Math.floor(newValue);
|
|
@@ -99,7 +99,7 @@ export default class PricingSlider extends Component {
|
|
|
99
99
|
value = 0;
|
|
100
100
|
} else {
|
|
101
101
|
const index = props.key / 100000 - 1;
|
|
102
|
-
if (index === displayedPricing.length -
|
|
102
|
+
if (index === displayedPricing.length - 2) {
|
|
103
103
|
value = '∞';
|
|
104
104
|
} else {
|
|
105
105
|
const tier = displayedPricing[props.key / 100000 - 1];
|
|
@@ -192,14 +192,14 @@ export default class PricingSlider extends Component {
|
|
|
192
192
|
return (
|
|
193
193
|
<tr>
|
|
194
194
|
<td>{`${numeral(lower).format('0.[0]a')}+`}</td>
|
|
195
|
-
<td>{this.displayAmount(
|
|
195
|
+
<td>{this.displayAmount(tier[1].toFixed(2))}</td>
|
|
196
196
|
</tr>
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
199
|
return (
|
|
200
200
|
<tr>
|
|
201
201
|
<td>{`${numeral(lower).format('0.[0]a')} to ${numeral(tier[0]).format('0.[0]a')}`}</td>
|
|
202
|
-
<td>{this.displayAmount(
|
|
202
|
+
<td>{this.displayAmount(tier[1].toFixed(2))}</td>
|
|
203
203
|
</tr>
|
|
204
204
|
);
|
|
205
205
|
})}
|
|
@@ -306,7 +306,6 @@ PricingSlider.defaultProps = {
|
|
|
306
306
|
PricingSlider.propTypes = {
|
|
307
307
|
productPricing: PropTypes.object.isRequired,
|
|
308
308
|
name: PropTypes.string.isRequired,
|
|
309
|
-
publicMode: PropTypes.bool.isRequired,
|
|
310
309
|
currency: PropTypes.string.isRequired,
|
|
311
310
|
defaultQueries: PropTypes.number,
|
|
312
311
|
onChange: PropTypes.func,
|