Skip to content

Commit

Permalink
chore: bulid dist for 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kyuwoo.choi committed Apr 13, 2018
1 parent 7f5f5b1 commit 881c237
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
37 changes: 35 additions & 2 deletions dist/tui-auto-complete.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* tui-auto-complete.js
* @version 2.0.0
* @version 2.1.0
* @author NHNEnt FE Development Lab <dl_javascript@nhnent.com>
* @license MIT
*/
Expand Down Expand Up @@ -87,19 +87,26 @@ return /******/ (function(modules) { // webpackBootstrap
],
rIsElementOption = /element/i;

var hostnameSent = false;

/**
* @constructor
* @param {Object} options
* @param {Boolean} [options.usageStatistics=true] - Let us know the hostname. If you don't want to send the hostname, please set to false.
* @example <caption>CommonJS</caption>
* var AutoComplete = require('tui-auto-complete');
* var autoComplete = new AutoComplete({'config': 'Default'});
* @example <caption>Global Namespace</caption>
* var autoComplete = new tui.AutoComplete({"config" : "Default"});
* var autoComplete = new tui.AutoComplete({"config" : "Default"});
* @example <caption>Arguments of AutoComplete Constructor</caption>
* SAMPLE FILE: [AutoConfig.json]{@link http://nhnent.github.io/tui.auto-complete/latest/dist/src/js/autoComplete.js}
*/
var AutoComplete = snippet.defineClass(/** @lends AutoComplete.prototype */{
init: function(options) {
options = snippet.extend({
usageStatistics: true
}, options);

this.options = {};
this.isUse = true;
this.queries = null;
Expand All @@ -114,6 +121,10 @@ return /******/ (function(modules) { // webpackBootstrap

this.setToggleBtnImg(this.isUse);
this.setCookieValue(this.isUse);

if (options.usageStatistics) {
sendHostname();
}
},

/**
Expand Down Expand Up @@ -339,6 +350,28 @@ return /******/ (function(modules) { // webpackBootstrap

snippet.CustomEvents.mixin(AutoComplete);

/**
* send hostname
* @ignore
*/
function sendHostname() {
var hostname = location.hostname;

if (hostnameSent) {
return;
}
hostnameSent = true;

snippet.imagePing('https://www.google-analytics.com/collect', {
v: 1,
t: 'event',
tid: 'UA-115377265-9',
cid: hostname,
dp: hostname,
dh: 'auto-complete'
});
}

module.exports = AutoComplete;


Expand Down
Loading

0 comments on commit 881c237

Please sign in to comment.