Sha256: cf5e5d2e0d695aaed4c1ee1fb9d4fb91d98399d06d9816a85c5670719d556148

Contents?: true

Size: 1.9 KB

Versions: 34

Compression:

Stored size: 1.9 KB

Contents

!function(t){function e(s){if(i[s])return i[s].exports;var a=i[s]={exports:{},id:s,loaded:!1};return t[s].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";gapi.analytics.ready(function(){function t(t){if(s.test(t))return t;var a=i.exec(t);if(a)return e(+a[1]);if("today"==t)return e(0);if("yesterday"==t)return e(1);throw new Error("Cannot convert date "+t)}function e(t){var e=new Date;e.setDate(e.getDate()-t);var i=String(e.getMonth()+1);i=1==i.length?"0"+i:i;var s=String(e.getDate());return s=1==s.length?"0"+s:s,e.getFullYear()+"-"+i+"-"+s}var i=/(\d+)daysAgo/,s=/\d{4}\-\d{2}\-\d{2}/;gapi.analytics.createComponent("DateRangeSelector",{execute:function(){var e=this.get();e["start-date"]=e["start-date"]||"7daysAgo",e["end-date"]=e["end-date"]||"yesterday",this.container="string"==typeof e.container?document.getElementById(e.container):e.container,e.template&&(this.template=e.template),this.container.innerHTML=this.template;var i=this.container.querySelectorAll("input");return this.startDateInput=i[0],this.startDateInput.value=t(e["start-date"]),this.endDateInput=i[1],this.endDateInput.value=t(e["end-date"]),this.setValues(),this.setMinMax(),this.container.onchange=this.onChange.bind(this),this},onChange:function(){this.setValues(),this.setMinMax(),this.emit("change",{"start-date":this["start-date"],"end-date":this["end-date"]})},setValues:function(){this["start-date"]=this.startDateInput.value,this["end-date"]=this.endDateInput.value},setMinMax:function(){this.startDateInput.max=this.endDateInput.value,this.endDateInput.min=this.startDateInput.value},template:'<div class="DateRangeSelector">  <div class="DateRangeSelector-item">    <label>Start Date</label>     <input type="date">  </div>  <div class="DateRangeSelector-item">    <label>End Date</label>     <input type="date">  </div></div>'})})}]);
//# sourceMappingURL=date-range-selector.js.map

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
keppler-2.1.22 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.21 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.20 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.19 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.18 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.17 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.16 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.15 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.14 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.13 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.12 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.11 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.10 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.9 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.8 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.7 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.6 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.5 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.4 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js
keppler-2.1.3 installer/core/rockets/keppler_ga_dashboard/app/assets/javascripts/keppler_ga_dashboard/date-range-selector.js