2017-07-19 19:48:46 +02:00
|
|
|
export const addItem = (value, label, id, choiceId, groupId, customProperties, keyCode) => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'ADD_ITEM',
|
|
|
|
value,
|
|
|
|
label,
|
|
|
|
id,
|
|
|
|
choiceId,
|
2016-10-18 20:23:07 +02:00
|
|
|
groupId,
|
2017-07-19 19:48:46 +02:00
|
|
|
customProperties,
|
|
|
|
keyCode
|
2016-09-05 23:04:15 +02:00
|
|
|
};
|
2016-04-04 00:07:10 +02:00
|
|
|
};
|
2016-03-30 16:04:21 +02:00
|
|
|
|
2016-06-27 15:46:12 +02:00
|
|
|
export const removeItem = (id, choiceId) => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'REMOVE_ITEM',
|
|
|
|
id,
|
|
|
|
choiceId,
|
|
|
|
};
|
2016-04-04 00:07:10 +02:00
|
|
|
};
|
2016-03-30 16:04:21 +02:00
|
|
|
|
2016-06-30 14:57:56 +02:00
|
|
|
export const highlightItem = (id, highlighted) => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'HIGHLIGHT_ITEM',
|
|
|
|
id,
|
|
|
|
highlighted,
|
|
|
|
};
|
2016-04-12 15:31:07 +02:00
|
|
|
};
|
|
|
|
|
2017-07-19 19:48:46 +02:00
|
|
|
export const addChoice = (value, label, id, groupId, disabled, elementId, customProperties, keyCode) => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'ADD_CHOICE',
|
|
|
|
value,
|
|
|
|
label,
|
|
|
|
id,
|
|
|
|
groupId,
|
|
|
|
disabled,
|
2017-06-02 22:34:07 +02:00
|
|
|
elementId: elementId,
|
2017-07-19 19:48:46 +02:00
|
|
|
customProperties,
|
|
|
|
keyCode
|
2016-09-05 23:04:15 +02:00
|
|
|
};
|
2016-04-12 21:16:36 +02:00
|
|
|
};
|
|
|
|
|
2016-06-27 15:46:12 +02:00
|
|
|
export const filterChoices = (results) => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'FILTER_CHOICES',
|
|
|
|
results,
|
|
|
|
};
|
2016-04-22 20:45:50 +02:00
|
|
|
};
|
|
|
|
|
2016-06-27 15:46:12 +02:00
|
|
|
export const activateChoices = (active = true) => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'ACTIVATE_CHOICES',
|
|
|
|
active,
|
|
|
|
};
|
2016-04-22 20:45:50 +02:00
|
|
|
};
|
|
|
|
|
2016-09-26 18:11:32 +02:00
|
|
|
export const clearChoices = () => {
|
|
|
|
return {
|
|
|
|
type: 'CLEAR_CHOICES',
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-04-22 20:45:50 +02:00
|
|
|
export const addGroup = (value, id, active, disabled) => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'ADD_GROUP',
|
|
|
|
value,
|
|
|
|
id,
|
|
|
|
active,
|
|
|
|
disabled,
|
|
|
|
};
|
2016-06-08 15:45:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export const clearAll = () => {
|
2016-09-05 23:04:15 +02:00
|
|
|
return {
|
|
|
|
type: 'CLEAR_ALL',
|
|
|
|
};
|
2016-10-18 20:23:07 +02:00
|
|
|
};
|