@woosmap/ui 4.151.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;
|
|
@@ -144,9 +150,11 @@ class PricingSlider extends Component {
|
|
|
144
150
|
}}
|
|
145
151
|
max={displayedPricing.length * 1000}
|
|
146
152
|
/>
|
|
147
|
-
<div className="pricing-
|
|
148
|
-
<Input type="text" onChange={this.reverseComputeQueries} value={computedQueries} />
|
|
149
|
-
|
|
153
|
+
<div className="pricing-slider__queries">
|
|
154
|
+
<Input type="text" onChange={this.reverseComputeQueries} value={computedQueries} />
|
|
155
|
+
</div>
|
|
156
|
+
<div className="pricing-slider__price">
|
|
157
|
+
<span>{productPricing.unit}</span>
|
|
150
158
|
{amount}
|
|
151
159
|
</div>
|
|
152
160
|
</div>
|