Commit 448fe88457d46be44017b7f786f3f83048f421dc
Committed by
GitHub
Merge pull request #3054 from Xotic750/event_name_constants
Common event name constants, used by $emit and $on - DRY
Showing
1 changed file
with
27 additions
and
0 deletions
Show diff stats
| 1 | +import { | ||
| 2 | + APPEND, | ||
| 3 | + CHANGE, | ||
| 4 | + CLOSE, | ||
| 5 | + DESTROY, | ||
| 6 | + FORM, | ||
| 7 | + ON, | ||
| 8 | + POPPER, | ||
| 9 | + QUERY, | ||
| 10 | + REMOVE, | ||
| 11 | + SELECT, | ||
| 12 | + SELECTED, | ||
| 13 | + UPDATE, | ||
| 14 | +} from './constants'; | ||
| 15 | +import { | ||
| 16 | + kebabJoin, | ||
| 17 | +} from './assist'; | ||
| 18 | + | ||
| 19 | +export const EVENT_APPEND = kebabJoin(APPEND); | ||
| 20 | +export const EVENT_ON_CHANGE = kebabJoin(ON, CHANGE); | ||
| 21 | +export const EVENT_ON_DESTROY_POPPER = kebabJoin(ON, DESTROY, POPPER); | ||
| 22 | +export const EVENT_ON_FORM_CHANGE = kebabJoin(ON, FORM, CHANGE); | ||
| 23 | +export const EVENT_ON_QUERY_CHANGE = kebabJoin(ON, QUERY, CHANGE); | ||
| 24 | +export const EVENT_ON_SELECT_CLOSE = kebabJoin(ON, SELECT, CLOSE); | ||
| 25 | +export const EVENT_ON_SELECT_SELECTED = kebabJoin(ON, SELECT, SELECTED); | ||
| 26 | +export const EVENT_ON_UPDATE_POPPER = kebabJoin(ON, UPDATE, POPPER); | ||
| 27 | +export const EVENT_REMOVE = kebabJoin(REMOVE); |