vehicleOptions/index
@boldpenguin/sdk-redux › Globals › "vehicleOptions/index"
Index
Variables
- getDisplayFriendlyVehicleOptionsSelection
- getVehicleOptions
- getVehicleOptionsConfigurations
- getVehicleOptionsConfigurationsMap
- getVehicleOptionsMakes
- getVehicleOptionsMakesMap
- getVehicleOptionsMap
- getVehicleOptionsModels
- getVehicleOptionsModelsMap
- getVehicleOptionsSelection
- getVehicleOptionsSelectionsMap
- getVehicleOptionsVin
- getVehicleOptionsVinsMap
- getVehicleOptionsYears
- getVehicleOptionsYearsMap
- getVehicleSelection
Variables
Const
getDisplayFriendlyVehicleOptionsSelection
• getDisplayFriendlyVehicleOptionsSelection: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => { const vehicleOptionsSelection = vehicleOptionsMap.selection; const friendlyDisplay = { year: vehicleOptionsSelection?.[questionGroupId]?.yearId ?? '', make: '', model: '', configuration: '', };
const makeId = vehicleOptionsSelection[questionGroupId]?.makeId;
if (makeId) {
friendlyDisplay.make = vehicleOptionsMap.makes?.[questionGroupId]?.[makeId] ?? '';
}
const modelId = vehicleOptionsSelection[questionGroupId]?.modelId;
if (modelId) {
friendlyDisplay.model = vehicleOptionsMap.models?.[questionGroupId]?.[modelId] ?? '';
}
const configurationId = vehicleOptionsSelection[questionGroupId]?.configurationId;
if (configurationId) {
friendlyDisplay.configuration = vehicleOptionsMap.configurations?.[questionGroupId]?.[configurationId] ?? '';
}
return friendlyDisplay;
}, )
Returns user friendly/display friendly object containing the vehicle year/make/model
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptions
• getVehicleOptions: function & OutputSelectorFields‹function› & object = createSelector( [(state: BpSdkStore, questionGroupId: string): { state: BpSdkStore; questionGroupId: string } => ({ state, questionGroupId })], ({ state, questionGroupId }) => ({ configurations: getVehicleOptionsConfigurations(state, questionGroupId), makes: getVehicleOptionsMakes(state, questionGroupId), models: getVehicleOptionsModels(state, questionGroupId), selection: getVehicleOptionsSelection(state, questionGroupId), vin: getVehicleOptionsVin(state, questionGroupId), years: getVehicleOptionsYears(state, questionGroupId), }), )
Returns all vehicle selection options for the specified question set
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptionsConfigurations
• getVehicleOptionsConfigurations: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsConfigurationsMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => vehicleOptionsMap[questionGroupId], )
Returns vehicle configurations for the specified question group
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptionsConfigurationsMap
• getVehicleOptionsConfigurationsMap: function & OutputSelectorFields‹function› & object = createSelector( getVehicleOptionsMap, (vehicleOptionsMap) => vehicleOptionsMap.configurations, )
Returns vehicle configurations map containing the available options for all question group IDs
param
The BpSdk Redux store
Const
getVehicleOptionsMakes
• getVehicleOptionsMakes: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsMakesMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => vehicleOptionsMap[questionGroupId], )
Returns just the vehicle makes options for the specified question set
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptionsMakesMap
• getVehicleOptionsMakesMap: function & OutputSelectorFields‹function› & object = createSelector(getVehicleOptionsMap, (vehicleOptionsMap) => vehicleOptionsMap.makes)
Returns just the vehicle makes map containing the available options for all question group IDs
param
The BpSdk Redux store
Const
getVehicleOptionsMap
• getVehicleOptionsMap: function & OutputSelectorFields‹function› & object = createSelector(getViewState, (viewState) => viewState.vehicleOptions)
Returns all vehicle selection options for all question sets
param
The BpSdk Redux store
Const
getVehicleOptionsModels
• getVehicleOptionsModels: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsModelsMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => vehicleOptionsMap[questionGroupId], )
Returns just the vehicle models options for the specified question set
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptionsModelsMap
• getVehicleOptionsModelsMap: function & OutputSelectorFields‹function› & object = createSelector(getVehicleOptionsMap, (vehicleOptionsMap) => vehicleOptionsMap.models)
Returns just the vehicle models map containing the available options for all question group IDs
param
The BpSdk Redux store
Const
getVehicleOptionsSelection
• getVehicleOptionsSelection: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsSelectionsMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => vehicleOptionsMap[questionGroupId], )
Returns vehicle selection for the specified question group
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptionsSelectionsMap
• getVehicleOptionsSelectionsMap: function & OutputSelectorFields‹function› & object = createSelector(getVehicleOptionsMap, (vehicleOptionsMap) => vehicleOptionsMap.selection)
Returns vehicle selection map containing the available options for all question group IDs
param
The BpSdk Redux store
Const
getVehicleOptionsVin
• getVehicleOptionsVin: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsVinsMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => vehicleOptionsMap[questionGroupId], )
Returns vehicle vin for the specified question group
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptionsVinsMap
• getVehicleOptionsVinsMap: function & OutputSelectorFields‹function› & object = createSelector(getVehicleOptionsMap, (vehicleOptionsMap) => vehicleOptionsMap.vin)
Returns vehicle vin map
param
The BpSdk Redux store
Const
getVehicleOptionsYears
• getVehicleOptionsYears: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsYearsMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => vehicleOptionsMap[questionGroupId], )
Returns just the vehicle year options for the specified question set
param
The BpSdk Redux store
param
Question Group ID
Const
getVehicleOptionsYearsMap
• getVehicleOptionsYearsMap: function & OutputSelectorFields‹function› & object = createSelector(getVehicleOptionsMap, (vehicleOptionsMap) => vehicleOptionsMap.years)
Returns just the vehicle year map containing the available options for all question group IDs
param
The BpSdk Redux store
Const
getVehicleSelection
• getVehicleSelection: function & OutputSelectorFields‹function› & object = createSelector( [getVehicleOptionsMap, (_: BpSdkStore, questionGroupId: string) => questionGroupId], (vehicleOptionsMap, questionGroupId) => { return vehicleOptionsMap.selection[questionGroupId]; }, )
Returns object containing the selected vehicle year/make/model ids
param
The BpSdk Redux store
param
Question Group ID