getaddress-autocomplete-modal
Version:
GetAddress.io - Autocomplete modal plug-in
53 lines • 3.24 kB
JavaScript
export default class AttributeValues {
constructor(options, index) {
this.options = options;
this.id_prefix = "";
let suffix = "";
if (index > 0) {
suffix = `-${index}`;
}
this.id_prefix = options.id_prefix;
const css_prefix = options.css_prefix;
this.bodyClassName = `${css_prefix}_body`;
this.suggestionClassName = `${css_prefix}_suggestion`;
this.inputClassName = `${css_prefix}_input`;
this.modalClassName = `${css_prefix}_modal`;
this.backButtonClassName = `${css_prefix}_back_button`;
this.clearButtonClassName = `${css_prefix}_clear_button`;
this.buttonClassName = `${css_prefix}_button`;
this.iconClassName = `${css_prefix}_icon`;
this.iconBackClassName = `${css_prefix}_icon_back`;
this.iconLocationClassName = `${css_prefix}_icon_location`;
this.iconClockClassName = `${css_prefix}_icon_clock`;
this.iconCancelClassName = `${css_prefix}_icon_cancel`;
this.controlsContainerClassName = `${css_prefix}_controls_container`;
this.controlsContainerItemClassName = `${css_prefix}_controls_container_item`;
this.controlsContainerItem1ClassName = `${css_prefix}_controls_container_item_1`;
this.controlsContainerItem2ClassName = `${css_prefix}_controls_container_item_2`;
this.controlsContainerItem3ClassName = `${css_prefix}_controls_container_item_3`;
this.suggestionListClassName = `${css_prefix}_suggestion_list`;
this.suggestionListId = `${this.id_prefix}-suggestion-list${suffix}`;
this.suggestionContainerClassName = `${css_prefix}_suggestion_container`;
this.suggestionContainerFocusedClassName = `${css_prefix}_suggestion_container_focused`;
this.suggestionContainerItemClassName = `${css_prefix}_suggestion_container_item`;
this.suggestionContainerItem1ClassName = `${css_prefix}_suggestion_container_item_1`;
this.suggestionContainerItem2ClassName = `${css_prefix}_suggestion_container_item_2`;
this.suggestionHtmlClassName = `${css_prefix}_suggestion_html`;
this.historyContainerClassName = `${css_prefix}_history_container`;
this.historyContainerFocusedClassName = `${css_prefix}_history_container_focused`;
this.historyContainerItemClassName = `${css_prefix}_history_container_item`;
this.historyContainerItem1ClassName = `${css_prefix}_history_container_item_1`;
this.historyContainerItem2ClassName = `${css_prefix}_history_container_item_2`;
this.historyContainerItem3ClassName = `${css_prefix}_history_container_item_3`;
this.historyHtmlClassName = `${css_prefix}_history_html`;
this.historyClearButtonClassName = `${css_prefix}history_clear_button`;
this.historyListClassName = `${css_prefix}_history_list`;
this.historyListId = `${this.id_prefix}-history-list${suffix}`;
this.histroyIconClockClassName = `${css_prefix}_history_icon_clock`;
this.histroyIconCancelClassName = `${css_prefix}_history_icon_cancel`;
}
getSuggestionId(index) {
return `${this.id_prefix}-suggestion-${index}`;
}
}
//# sourceMappingURL=AttributeValues.js.map