@woosmap/ui 4.162.1 → 4.162.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
|
@@ -6,7 +6,13 @@ import PricingData from './PricingData';
|
|
|
6
6
|
class PricingSimulator extends Component {
|
|
7
7
|
constructor(props) {
|
|
8
8
|
super(props);
|
|
9
|
-
|
|
9
|
+
const sliders = {};
|
|
10
|
+
Object.keys(PricingData).forEach((category) => {
|
|
11
|
+
Object.keys(PricingData[category].pricings).forEach((pricingKey) => {
|
|
12
|
+
sliders[category + pricingKey] = { queries: PricingData[category].pricings[pricingKey].defaultQueries };
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
this.state = { total: 0, sliders };
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
onChange = (pricingKey) => (data) => {
|
|
@@ -11,7 +11,7 @@ class PricingSlider extends Component {
|
|
|
11
11
|
let q = queries;
|
|
12
12
|
let previousPricingTier;
|
|
13
13
|
if (queries === '∞') {
|
|
14
|
-
return
|
|
14
|
+
return queries;
|
|
15
15
|
}
|
|
16
16
|
return parseInt(
|
|
17
17
|
pricing.reduce((amount, tier, index) => {
|
|
@@ -137,12 +137,12 @@ class PricingSlider extends Component {
|
|
|
137
137
|
const { name, productPricing, currency, values } = this.props;
|
|
138
138
|
const { queries } = values;
|
|
139
139
|
const { displayedPricing, amount, formatedQueries, marks, computedQueries } = this.getDisplayedData(queries);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
let displayedAmount = <span className="free-label">FREE</span>;
|
|
141
|
+
if (amount === '∞') {
|
|
142
|
+
displayedAmount = this.contactSalesButton();
|
|
143
|
+
} else if (amount > 0) {
|
|
144
|
+
displayedAmount = <span className="amount">{`${amount} ${currency}`}</span>;
|
|
145
|
+
}
|
|
146
146
|
return (
|
|
147
147
|
<div className="pricing-slider__wrapper" id={name}>
|
|
148
148
|
<div className="pricing-slider__info">
|