@woosmap/ui 4.160.1 → 4.160.3
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
|
@@ -22,7 +22,7 @@ class PricingSlider extends Component {
|
|
|
22
22
|
if (queries === '∞') {
|
|
23
23
|
return this.contactSalesButton();
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
return parseInt(
|
|
26
26
|
pricing.reduce((amount, tier, index) => {
|
|
27
27
|
previousPricingTier = index > 0 ? pricing[index - 1] : null;
|
|
28
28
|
|
|
@@ -41,11 +41,6 @@ class PricingSlider extends Component {
|
|
|
41
41
|
}, 0),
|
|
42
42
|
10
|
|
43
43
|
);
|
|
44
|
-
return finalAmount === 0 ? (
|
|
45
|
-
<span className="free-label">FREE</span>
|
|
46
|
-
) : (
|
|
47
|
-
<span className="amount">{`${finalAmount} ${currency}`}</span>
|
|
48
|
-
);
|
|
49
44
|
};
|
|
50
45
|
|
|
51
46
|
computeQueries = (valueNow) => {
|
|
@@ -144,14 +139,19 @@ class PricingSlider extends Component {
|
|
|
144
139
|
onChange = () => {
|
|
145
140
|
const { onChange } = this.props;
|
|
146
141
|
if (onChange) {
|
|
147
|
-
onChange(this.
|
|
142
|
+
onChange(this.getDisplayedData());
|
|
148
143
|
}
|
|
149
144
|
};
|
|
150
145
|
|
|
151
146
|
render() {
|
|
152
|
-
const { name, productPricing } = this.props;
|
|
147
|
+
const { name, productPricing, currency } = this.props;
|
|
153
148
|
const { queries, displayedPricing, amount, formatedQueries, marks, computedQueries } = this.getDisplayedData();
|
|
154
|
-
|
|
149
|
+
const displayedAmount =
|
|
150
|
+
amount === 0 ? (
|
|
151
|
+
<span className="free-label">FREE</span>
|
|
152
|
+
) : (
|
|
153
|
+
<span className="amount">{`${amount} ${currency}`}</span>
|
|
154
|
+
);
|
|
155
155
|
return (
|
|
156
156
|
<div className="pricing-slider__wrapper" id={name}>
|
|
157
157
|
<div className="pricing-slider__info">
|
|
@@ -185,7 +185,7 @@ class PricingSlider extends Component {
|
|
|
185
185
|
<div className="pricing-slider__queries__label">{productPricing.unit}</div>
|
|
186
186
|
<Input type="text" onChange={this.reverseComputeQueries} value={computedQueries} />
|
|
187
187
|
</div>
|
|
188
|
-
<div className="pricing-slider__price">{
|
|
188
|
+
<div className="pricing-slider__price">{displayedAmount}</div>
|
|
189
189
|
</div>
|
|
190
190
|
);
|
|
191
191
|
}
|