@woosmap/ui 4.152.0 → 4.153.0
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
|
@@ -20,25 +20,27 @@ class PricingSlider extends Component {
|
|
|
20
20
|
if (queries === '∞') {
|
|
21
21
|
return this.contactSalesButton();
|
|
22
22
|
}
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
return (
|
|
24
|
+
<span className="amount">{`${parseInt(
|
|
25
|
+
pricing.reduce((amount, tier, index) => {
|
|
26
|
+
previousPricingTier = index > 0 ? pricing[index - 1] : null;
|
|
27
|
+
|
|
28
|
+
if (previousPricingTier !== null) {
|
|
29
|
+
const valueToRemove = Math.min(tier[0] - previousPricingTier[0], q);
|
|
30
|
+
if (valueToRemove > 0) {
|
|
31
|
+
q -= valueToRemove;
|
|
32
|
+
return amount + (valueToRemove / 1000) * tier[1] * coef;
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
const valueToRemove = Math.min(tier[0], q);
|
|
30
36
|
q -= valueToRemove;
|
|
31
37
|
return amount + (valueToRemove / 1000) * tier[1] * coef;
|
|
32
38
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return amount;
|
|
39
|
-
}, 0),
|
|
40
|
-
10
|
|
41
|
-
)} ${currency}`;
|
|
39
|
+
return amount;
|
|
40
|
+
}, 0),
|
|
41
|
+
10
|
|
42
|
+
)} ${currency}`}</span>
|
|
43
|
+
);
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
computeQueries = (valueNow) => {
|
|
@@ -72,7 +74,11 @@ class PricingSlider extends Component {
|
|
|
72
74
|
}
|
|
73
75
|
};
|
|
74
76
|
|
|
75
|
-
contactSalesButton = () =>
|
|
77
|
+
contactSalesButton = () => (
|
|
78
|
+
<span className="button-contac">
|
|
79
|
+
<Button size="small" label={tr('Contact Sales')} />
|
|
80
|
+
</span>
|
|
81
|
+
);
|
|
76
82
|
|
|
77
83
|
renderMarks = (props) => {
|
|
78
84
|
const { productPricing, publicMode } = this.props;
|
|
@@ -149,7 +155,7 @@ class PricingSlider extends Component {
|
|
|
149
155
|
</div>
|
|
150
156
|
<div className="pricing-slider__price">
|
|
151
157
|
<span>{productPricing.unit}</span>
|
|
152
|
-
|
|
158
|
+
{amount}
|
|
153
159
|
</div>
|
|
154
160
|
</div>
|
|
155
161
|
);
|