Constructor
new MovingCostCalculator(target, parametersopt)
Creates an instance of MovingCostCalculator
and checks for invalid parameters
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
target |
Element | String | The wrapper for the MovingCostCalculator module | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parameters |
Object |
<optional> |
Additional optional parameters
Properties
|
- Source:
Members
data
The calculator's available data
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
addresses |
Object | Addresses data
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
volume |
Number | The volume | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
volumeData |
Number | The additional volume data | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
contact |
String | The user's mail |
- Source:
Example
{
addresses: {
departure: {
value: '',
components: {
streetNumber: '',
route: '',
zipCode: '',
locality: '',
country: '',
countryCode: '',
department: '',
region: ''
},
location:{
lat: 0,
lng: 0,
placeId: ''
},
options: {
floor: 0,
lift: false,
porterageDistance: 0
}
},
arrival: {
value: '',
components: {
streetNumber: '',
route: '',
zipCode: '',
locality: '',
country: '',
countryCode: '',
department: '',
region: ''
},
location:{
lat: 0,
lng: 0
placeId: ''
},
options: {
floor: 0,
lift: false,
porterageDistance: 0
}
}
},
volume: 0,
volumeData: {},
contact: ''
};
Methods
(static) destroy(selector)
Removes any MovingCostCalculator mutation from the DOM
Parameters:
Name | Type | Description |
---|---|---|
selector |
String | The MovingCostCalculator wrapper selector |
- Source:
_toggleLoader(forcenullable)
Toggles the estimations loader
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
force |
Boolean |
<nullable> |
Force the display ? |
- Source:
destroy()
Removes any MovingCostCalculator mutation from the DOM
- Source:
setLang(lang) → {MovingCostCalculator}
Sets the lang
Parameters:
Name | Type | Description |
---|---|---|
lang |
String | The lang to set |
- Source:
Returns:
The current MovingCostCalculator
- Type
- MovingCostCalculator
validate() → {MovingCostCalculator}
Validates the calculator data & calculates the estimations
- Source:
Returns:
The current MovingCostCalculator
- Type
- MovingCostCalculator
Type Definitions
Dictionary
Translations object list
Type:
- Object.<String, MovingCostCalculator.Lang>
- Source:
Example
{
en: {
title: 'Estimate your moving cost',
addressesTitle: 'Your addresses'
},
fr: {
title: 'Estimez le coût de votre déménagement',
addressesTitle: 'Vos adresses'
}
}
Lang
Translations object
Type:
- Object.<String, String>
- Source:
Example
{
title: 'Estimate your moving cost',
addressesTitle: 'Your addresses'
}