Clean up more plugins' files. (#2767)

This commit is contained in:
XhmikosR 2020-06-02 12:29:28 +03:00 committed by GitHub
parent bbb22a16de
commit feb42f852e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
128 changed files with 34 additions and 18346 deletions

28
.gitignore vendored
View file

@ -20,9 +20,31 @@ node_modules/
bower_components/
# Plugins
/plugins/*/*.md
/plugins/*/*.html
/plugins/*/package.json
/plugins/**/*.html
/plugins/**/*.less
/plugins/**/*.md
/plugins/**/*.scss
/plugins/**/*.ts
/plugins/**/bower.json
/plugins/**/package.json
/plugins/**/webpack.config.js
/plugins/**/demo/
/plugins/**/demos/
/plugins/**/dev/
/plugins/**/example/
/plugins/**/examples/
/plugins/**/less/
/plugins/**/test/
/plugins/**/tests/
/plugins/daterangepicker/website/
/plugins/daterangepicker/drp.png
!/plugins/**/LICENSE.md
!/plugins/**/LICENSE.txt
!/plugins/**/license.md
!/plugins/**/license.txt
!/plugins/**/LICENSE
!/plugins/**/license
!/plugins/**/COPYING
# Docs

View file

@ -1,20 +0,0 @@
{
"name": "daterangepicker",
"main": [
"daterangepicker.js",
"daterangepicker.css"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"moment.js",
"moment.min.js"
],
"dependencies": {
"jquery": "1.9.1 - 3",
"moment": ">=2.9.0"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

View file

@ -1,210 +0,0 @@
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<title>A date range picker for Bootstrap</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="all" href="../../daterangepicker.css" />
<style type="text/css">
.demo { position: relative; }
.demo i {
position: absolute; bottom: 10px; right: 24px; top: auto; cursor: pointer;
}
</style>
</head>
<body style="margin: 60px 0">
<div class="container">
<h1 style="margin: 0 0 20px 0">Configuration Builder</h1>
<div class="well configurator">
<form>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="parentEl">parentEl</label>
<input type="text" class="form-control" id="parentEl" value="" placeholder="body">
</div>
<div class="form-group">
<label for="startDate">startDate</label>
<input type="text" class="form-control" id="startDate" value="07/01/2015">
</div>
<div class="form-group">
<label for="endDate">endDate</label>
<input type="text" class="form-control" id="endDate" value="07/15/2015">
</div>
<div class="form-group">
<label for="minDate">minDate</label>
<input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
</div>
<div class="form-group">
<label for="maxDate">maxDate</label>
<input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
</div>
</div>
<div class="col-md-4">
<div class="checkbox">
<label>
<input type="checkbox" id="autoApply"> autoApply
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="singleDatePicker"> singleDatePicker
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showDropdowns"> showDropdowns
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showWeekNumbers"> showWeekNumbers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showISOWeekNumbers"> showISOWeekNumbers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePicker"> timePicker
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePicker24Hour"> timePicker24Hour
</label>
</div>
<div class="form-group">
<label for="timePickerIncrement">timePickerIncrement (in minutes)</label>
<input type="text" class="form-control" id="timePickerIncrement" value="1">
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePickerSeconds"> timePickerSeconds
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="dateLimit"> dateLimit (with example date range span)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="ranges"> ranges (with example predefined ranges)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="locale"> locale (with example settings)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="linkedCalendars" checked="checked"> linkedCalendars
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="autoUpdateInput" checked="checked"> autoUpdateInput
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="alwaysShowCalendars"> alwaysShowCalendars
</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="opens">opens</label>
<select id="opens" class="form-control">
<option value="right" selected>right</option>
<option value="left">left</option>
<option value="center">center</option>
</select>
</div>
<div class="form-group">
<label for="drops">drops</label>
<select id="drops" class="form-control">
<option value="down" selected>down</option>
<option value="up">up</option>
</select>
</div>
<div class="form-group">
<label for="buttonClasses">buttonClasses</label>
<input type="text" class="form-control" id="buttonClasses" value="btn btn-sm">
</div>
<div class="form-group">
<label for="applyClass">applyClass</label>
<input type="text" class="form-control" id="applyClass" value="btn-success">
</div>
<div class="form-group">
<label for="cancelClass">cancelClass</label>
<input type="text" class="form-control" id="cancelClass" value="btn-default">
</div>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-2 demo">
<h4>Your Date Range Picker</h4>
<input type="text" id="config-demo" class="form-control">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
</div>
<div class="col-md-6">
<h4>Configuration</h4>
<div class="well">
<textarea id="config-text" style="height: 300px; width: 100%; padding: 10px"></textarea>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="require.js" data-main="main.js"></script>
</body>
</html>

View file

@ -1,141 +0,0 @@
requirejs.config({
"paths": {
"jquery": "https://code.jquery.com/jquery-1.11.3.min",
"moment": "../../moment",
"daterangepicker": "../../daterangepicker"
}
});
requirejs(['jquery', 'moment', 'daterangepicker'] , function ($, moment) {
$(document).ready(function() {
$('#config-text').keyup(function() {
eval($(this).val());
});
$('.configurator input, .configurator select').change(function() {
updateConfig();
});
$('.demo i').click(function() {
$(this).parent().find('input').click();
});
$('#startDate').daterangepicker({
singleDatePicker: true,
startDate: moment().subtract(6, 'days')
});
$('#endDate').daterangepicker({
singleDatePicker: true,
startDate: moment()
});
updateConfig();
function updateConfig() {
var options = {};
if ($('#singleDatePicker').is(':checked'))
options.singleDatePicker = true;
if ($('#showDropdowns').is(':checked'))
options.showDropdowns = true;
if ($('#showWeekNumbers').is(':checked'))
options.showWeekNumbers = true;
if ($('#showISOWeekNumbers').is(':checked'))
options.showISOWeekNumbers = true;
if ($('#timePicker').is(':checked'))
options.timePicker = true;
if ($('#timePicker24Hour').is(':checked'))
options.timePicker24Hour = true;
if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1)
options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10);
if ($('#timePickerSeconds').is(':checked'))
options.timePickerSeconds = true;
if ($('#autoApply').is(':checked'))
options.autoApply = true;
if ($('#dateLimit').is(':checked'))
options.dateLimit = { days: 7 };
if ($('#ranges').is(':checked')) {
options.ranges = {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
};
}
if ($('#locale').is(':checked')) {
options.locale = {
format: 'MM/DD/YYYY HH:mm',
separator: ' - ',
applyLabel: 'Apply',
cancelLabel: 'Cancel',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom',
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
firstDay: 1
};
}
if (!$('#linkedCalendars').is(':checked'))
options.linkedCalendars = false;
if (!$('#autoUpdateInput').is(':checked'))
options.autoUpdateInput = false;
if ($('#alwaysShowCalendars').is(':checked'))
options.alwaysShowCalendars = true;
if ($('#parentEl').val().length)
options.parentEl = $('#parentEl').val();
if ($('#startDate').val().length)
options.startDate = $('#startDate').val();
if ($('#endDate').val().length)
options.endDate = $('#endDate').val();
if ($('#minDate').val().length)
options.minDate = $('#minDate').val();
if ($('#maxDate').val().length)
options.maxDate = $('#maxDate').val();
if ($('#opens').val().length && $('#opens').val() != 'right')
options.opens = $('#opens').val();
if ($('#drops').val().length && $('#drops').val() != 'down')
options.drops = $('#drops').val();
if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm')
options.buttonClasses = $('#buttonClasses').val();
if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success')
options.applyClass = $('#applyClass').val();
if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default')
options.cancelClass = $('#cancelClass').val();
$('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log(\"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')\");\n});");
$('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); });
}
});
});

View file

@ -1,36 +0,0 @@
/*
RequireJS 2.2.0 Copyright jQuery Foundation and other contributors.
Released under MIT license, http://github.com/requirejs/requirejs/LICENSE
*/
var requirejs,require,define;
(function(ga){function ka(b,c,d,g){return g||""}function K(b){return"[object Function]"===Q.call(b)}function L(b){return"[object Array]"===Q.call(b)}function y(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function X(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));--d);}}function x(b,c){return la.call(b,c)}function e(b,c){return x(b,c)&&b[c]}function D(b,c){for(var d in b)if(x(b,d)&&c(b[d],d))break}function Y(b,c,d,g){c&&D(c,function(c,e){if(d||!x(b,e))!g||"object"!==
typeof c||!c||L(c)||K(c)||c instanceof RegExp?b[e]=c:(b[e]||(b[e]={}),Y(b[e],c,d,g))});return b}function z(b,c){return function(){return c.apply(b,arguments)}}function ha(b){throw b;}function ia(b){if(!b)return b;var c=ga;y(b.split("."),function(b){c=c[b]});return c}function F(b,c,d,g){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c}function ma(b){function c(a,n,b){var h,k,f,c,d,l,g,r;n=n&&n.split("/");var q=p.map,m=q&&q["*"];
if(a){a=a.split("/");k=a.length-1;p.nodeIdCompat&&U.test(a[k])&&(a[k]=a[k].replace(U,""));"."===a[0].charAt(0)&&n&&(k=n.slice(0,n.length-1),a=k.concat(a));k=a;for(f=0;f<k.length;f++)c=k[f],"."===c?(k.splice(f,1),--f):".."===c&&0!==f&&(1!==f||".."!==k[2])&&".."!==k[f-1]&&0<f&&(k.splice(f-1,2),f-=2);a=a.join("/")}if(b&&q&&(n||m)){k=a.split("/");f=k.length;a:for(;0<f;--f){d=k.slice(0,f).join("/");if(n)for(c=n.length;0<c;--c)if(b=e(q,n.slice(0,c).join("/")))if(b=e(b,d)){h=b;l=f;break a}!g&&m&&e(m,d)&&
(g=e(m,d),r=f)}!h&&g&&(h=g,l=r);h&&(k.splice(0,l,h),a=k.join("/"))}return(h=e(p.pkgs,a))?h:a}function d(a){E&&y(document.getElementsByTagName("script"),function(n){if(n.getAttribute("data-requiremodule")===a&&n.getAttribute("data-requirecontext")===l.contextName)return n.parentNode.removeChild(n),!0})}function m(a){var n=e(p.paths,a);if(n&&L(n)&&1<n.length)return n.shift(),l.require.undef(a),l.makeRequire(null,{skipMap:!0})([a]),!0}function r(a){var n,b=a?a.indexOf("!"):-1;-1<b&&(n=a.substring(0,
b),a=a.substring(b+1,a.length));return[n,a]}function q(a,n,b,h){var k,f,d=null,g=n?n.name:null,p=a,q=!0,m="";a||(q=!1,a="_@r"+(Q+=1));a=r(a);d=a[0];a=a[1];d&&(d=c(d,g,h),f=e(v,d));a&&(d?m=f&&f.normalize?f.normalize(a,function(a){return c(a,g,h)}):-1===a.indexOf("!")?c(a,g,h):a:(m=c(a,g,h),a=r(m),d=a[0],m=a[1],b=!0,k=l.nameToUrl(m)));b=!d||f||b?"":"_unnormalized"+(T+=1);return{prefix:d,name:m,parentMap:n,unnormalized:!!b,url:k,originalName:p,isDefine:q,id:(d?d+"!"+m:m)+b}}function u(a){var b=a.id,
c=e(t,b);c||(c=t[b]=new l.Module(a));return c}function w(a,b,c){var h=a.id,k=e(t,h);if(!x(v,h)||k&&!k.defineEmitComplete)if(k=u(a),k.error&&"error"===b)c(k.error);else k.on(b,c);else"defined"===b&&c(v[h])}function A(a,b){var c=a.requireModules,h=!1;if(b)b(a);else if(y(c,function(b){if(b=e(t,b))b.error=a,b.events.error&&(h=!0,b.emit("error",a))}),!h)g.onError(a)}function B(){V.length&&(y(V,function(a){var b=a[0];"string"===typeof b&&(l.defQueueMap[b]=!0);G.push(a)}),V=[])}function C(a){delete t[a];
delete Z[a]}function J(a,b,c){var h=a.map.id;a.error?a.emit("error",a.error):(b[h]=!0,y(a.depMaps,function(h,f){var d=h.id,g=e(t,d);!g||a.depMatched[f]||c[d]||(e(b,d)?(a.defineDep(f,v[d]),a.check()):J(g,b,c))}),c[h]=!0)}function H(){var a,b,c=(a=1E3*p.waitSeconds)&&l.startTime+a<(new Date).getTime(),h=[],k=[],f=!1,g=!0;if(!aa){aa=!0;D(Z,function(a){var l=a.map,e=l.id;if(a.enabled&&(l.isDefine||k.push(a),!a.error))if(!a.inited&&c)m(e)?f=b=!0:(h.push(e),d(e));else if(!a.inited&&a.fetched&&l.isDefine&&
(f=!0,!l.prefix))return g=!1});if(c&&h.length)return a=F("timeout","Load timeout for modules: "+h,null,h),a.contextName=l.contextName,A(a);g&&y(k,function(a){J(a,{},{})});c&&!b||!f||!E&&!ja||ba||(ba=setTimeout(function(){ba=0;H()},50));aa=!1}}function I(a){x(v,a[0])||u(q(a[0],null,!0)).init(a[1],a[2])}function O(a){a=a.currentTarget||a.srcElement;var b=l.onScriptLoad;a.detachEvent&&!ca?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=l.onScriptError;a.detachEvent&&!ca||a.removeEventListener("error",
b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function P(){var a;for(B();G.length;){a=G.shift();if(null===a[0])return A(F("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));I(a)}l.defQueueMap={}}var aa,da,l,R,ba,p={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},t={},Z={},ea={},G=[],v={},W={},fa={},Q=1,T=1;R={require:function(a){return a.require?a.require:a.require=l.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?
v[a.map.id]=a.exports:a.exports=v[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return e(p.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};da=function(a){this.events=e(ea,a.id)||{};this.map=a;this.shim=e(p.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};da.prototype={init:function(a,b,c,h){h=h||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&
(c=z(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=h.ignore;h.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,--this.depCount,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;l.startTime=(new Date).getTime();var a=this.map;if(this.shim)l.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],z(this,function(){return a.prefix?this.callPlugin():
this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;W[a]||(W[a]=!0,l.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var h=this.exports,k=this.factory;if(!this.inited)x(l.defQueueMap,c)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(K(k)){if(this.events.error&&this.map.isDefine||g.onError!==
ha)try{h=l.execCb(c,k,b,h)}catch(d){a=d}else h=l.execCb(c,k,b,h);this.map.isDefine&&void 0===h&&((b=this.module)?h=b.exports:this.usingExports&&(h=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",A(this.error=a)}else h=k;this.exports=h;if(this.map.isDefine&&!this.ignore&&(v[c]=h,g.onResourceLoad)){var f=[];y(this.depMaps,function(a){f.push(a.normalizedMap||a)});g.onResourceLoad(l,this.map,f)}C(c);
this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var a=this.map,b=a.id,d=q(a.prefix);this.depMaps.push(d);w(d,"defined",z(this,function(h){var k,f,d=e(fa,this.map.id),M=this.map.name,r=this.map.parentMap?this.map.parentMap.name:null,m=l.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(h.normalize&&(M=h.normalize(M,function(a){return c(a,r,!0)})||
""),f=q(a.prefix+"!"+M,this.map.parentMap),w(f,"defined",z(this,function(a){this.map.normalizedMap=f;this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),h=e(t,f.id)){this.depMaps.push(f);if(this.events.error)h.on("error",z(this,function(a){this.emit("error",a)}));h.enable()}}else d?(this.map.url=l.nameToUrl(d),this.load()):(k=z(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),k.error=z(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];D(t,function(a){0===
a.map.id.indexOf(b+"_unnormalized")&&C(a.map.id)});A(a)}),k.fromText=z(this,function(h,c){var d=a.name,f=q(d),M=S;c&&(h=c);M&&(S=!1);u(f);x(p.config,b)&&(p.config[d]=p.config[b]);try{g.exec(h)}catch(e){return A(F("fromtexteval","fromText eval for "+b+" failed: "+e,e,[b]))}M&&(S=!0);this.depMaps.push(f);l.completeLoad(d);m([d],k)}),h.load(a.name,m,k,p))}));l.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){Z[this.map.id]=this;this.enabling=this.enabled=!0;y(this.depMaps,z(this,function(a,
b){var c,h;if("string"===typeof a){a=q(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=e(R,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;w(a,"defined",z(this,function(a){this.undefed||(this.defineDep(b,a),this.check())}));this.errback?w(a,"error",z(this,this.errback)):this.events.error&&w(a,"error",z(this,function(a){this.emit("error",a)}))}c=a.id;h=t[c];x(R,c)||!h||h.enabled||l.enable(a,this)}));D(this.pluginMaps,z(this,function(a){var b=e(t,a.id);
b&&!b.enabled&&l.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){y(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};l={config:p,contextName:b,registry:t,defined:v,urlFetched:W,defQueue:G,defQueueMap:{},Module:da,makeModuleMap:q,nextTick:g.nextTick,onError:A,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");if("string"===typeof a.urlArgs){var b=
a.urlArgs;a.urlArgs=function(a,c){return(-1===c.indexOf("?")?"?":"&")+b}}var c=p.shim,h={paths:!0,bundles:!0,config:!0,map:!0};D(a,function(a,b){h[b]?(p[b]||(p[b]={}),Y(p[b],a,!0,!0)):p[b]=a});a.bundles&&D(a.bundles,function(a,b){y(a,function(a){a!==b&&(fa[a]=b)})});a.shim&&(D(a.shim,function(a,b){L(a)&&(a={deps:a});!a.exports&&!a.init||a.exportsFn||(a.exportsFn=l.makeShimExports(a));c[b]=a}),p.shim=c);a.packages&&y(a.packages,function(a){var b;a="string"===typeof a?{name:a}:a;b=a.name;a.location&&
(p.paths[b]=a.location);p.pkgs[b]=a.name+"/"+(a.main||"main").replace(na,"").replace(U,"")});D(t,function(a,b){a.inited||a.map.unnormalized||(a.map=q(b,null,!0))});(a.deps||a.callback)&&l.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ga,arguments));return b||a.exports&&ia(a.exports)}},makeRequire:function(a,n){function m(c,d,f){var e,r;n.enableBuildCallback&&d&&K(d)&&(d.__requireJsBuild=!0);if("string"===typeof c){if(K(d))return A(F("requireargs",
"Invalid require call"),f);if(a&&x(R,c))return R[c](t[a.id]);if(g.get)return g.get(l,c,a,m);e=q(c,a,!1,!0);e=e.id;return x(v,e)?v[e]:A(F("notloaded",'Module name "'+e+'" has not been loaded yet for context: '+b+(a?"":". Use require([])")))}P();l.nextTick(function(){P();r=u(q(null,a));r.skipMap=n.skipMap;r.init(c,d,f,{enabled:!0});H()});return m}n=n||{};Y(m,{isBrowser:E,toUrl:function(b){var d,f=b.lastIndexOf("."),g=b.split("/")[0];-1!==f&&("."!==g&&".."!==g||1<f)&&(d=b.substring(f,b.length),b=b.substring(0,
f));return l.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return x(v,q(b,a,!1,!0).id)},specified:function(b){b=q(b,a,!1,!0).id;return x(v,b)||x(t,b)}});a||(m.undef=function(b){B();var c=q(b,a,!0),f=e(t,b);f.undefed=!0;d(b);delete v[b];delete W[c.url];delete ea[b];X(G,function(a,c){a[0]===b&&G.splice(c,1)});delete l.defQueueMap[b];f&&(f.events.defined&&(ea[b]=f.events),C(b))});return m},enable:function(a){e(t,a.id)&&u(a).enable()},completeLoad:function(a){var b,c,d=e(p.shim,a)||{},g=d.exports;
for(B();G.length;){c=G.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);I(c)}l.defQueueMap={};c=e(t,a);if(!b&&!x(v,a)&&c&&!c.inited)if(!p.enforceDefine||g&&ia(g))I([a,d.deps||[],d.exportsFn]);else return m(a)?void 0:A(F("nodefine","No define call for "+a,null,[a]));H()},nameToUrl:function(a,b,c){var d,k,f,m;(d=e(p.pkgs,a))&&(a=d);if(d=e(fa,a))return l.nameToUrl(d,b,c);if(g.jsExtRegExp.test(a))d=a+(b||"");else{d=p.paths;k=a.split("/");for(f=k.length;0<f;--f)if(m=k.slice(0,f).join("/"),
m=e(d,m)){L(m)&&(m=m[0]);k.splice(0,f,m);break}d=k.join("/");d+=b||(/^data\:|^blob\:|\?/.test(d)||c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":p.baseUrl)+d}return p.urlArgs&&!/^blob\:/.test(d)?d+p.urlArgs(a,d):d},load:function(a,b){g.load(l,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||oa.test((a.currentTarget||a.srcElement).readyState))N=null,a=O(a),l.completeLoad(a.id)},onScriptError:function(a){var b=O(a);if(!m(b.id)){var c=[];
D(t,function(a,d){0!==d.indexOf("_@r")&&y(a.depMaps,function(a){if(a.id===b.id)return c.push(d),!0})});return A(F("scripterror",'Script error for "'+b.id+(c.length?'", needed by: '+c.join(", "):'"'),a,[b.id]))}}};l.require=l.makeRequire();return l}function pa(){if(N&&"interactive"===N.readyState)return N;X(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b});return N}var g,B,C,H,O,I,N,P,u,T,qa=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ra=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
U=/\.js$/,na=/^\.\//;B=Object.prototype;var Q=B.toString,la=B.hasOwnProperty,E=!("undefined"===typeof window||"undefined"===typeof navigator||!window.document),ja=!E&&"undefined"!==typeof importScripts,oa=E&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,ca="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),J={},w={},V=[],S=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(K(requirejs))return;w=requirejs;requirejs=void 0}"undefined"===typeof require||
K(require)||(w=require,require=void 0);g=requirejs=function(b,c,d,m){var r,q="_";L(b)||"string"===typeof b||(r=b,L(c)?(b=c,c=d,d=m):b=[]);r&&r.context&&(q=r.context);(m=e(J,q))||(m=J[q]=g.s.newContext(q));r&&m.configure(r);return m.require(b,c,d)};g.config=function(b){return g(b)};g.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=g);g.version="2.2.0";g.jsExtRegExp=/^\/|:|\?|\.js$/;g.isBrowser=E;B=g.s={contexts:J,newContext:ma};g({});y(["toUrl",
"undef","defined","specified"],function(b){g[b]=function(){var c=J._;return c.require[b].apply(c,arguments)}});E&&(C=B.head=document.getElementsByTagName("head")[0],H=document.getElementsByTagName("base")[0])&&(C=B.head=H.parentNode);g.onError=ha;g.createNode=function(b,c,d){c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};g.load=function(b,c,d){var m=b&&b.config||
{},e;if(E){e=g.createNode(m,c,d);e.setAttribute("data-requirecontext",b.contextName);e.setAttribute("data-requiremodule",c);!e.attachEvent||e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code")||ca?(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)):(S=!0,e.attachEvent("onreadystatechange",b.onScriptLoad));e.src=d;if(m.onNodeCreated)m.onNodeCreated(e,m,c,d);P=e;H?C.insertBefore(e,H):C.appendChild(e);P=null;return e}if(ja)try{setTimeout(function(){},
0),importScripts(d),b.completeLoad(c)}catch(q){b.onError(F("importscripts","importScripts failed for "+c+" at "+d,q,[c]))}};E&&!w.skipDataMain&&X(document.getElementsByTagName("script"),function(b){C||(C=b.parentNode);if(O=b.getAttribute("data-main"))return u=O,w.baseUrl||-1!==u.indexOf("!")||(I=u.split("/"),u=I.pop(),T=I.length?I.join("/")+"/":"./",w.baseUrl=T),u=u.replace(U,""),g.jsExtRegExp.test(u)&&(u=O),w.deps=w.deps?w.deps.concat(u):[u],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&
(d=c,c=b,b=null);L(c)||(d=c,c=null);!c&&K(d)&&(c=[],d.length&&(d.toString().replace(qa,ka).replace(ra,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));S&&(e=P||pa())&&(b||(b=e.getAttribute("data-requiremodule")),g=J[e.getAttribute("data-requirecontext")]);g?(g.defQueue.push([b,c,d]),g.defQueueMap[b]=!0):V.push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(w)}})(this);

View file

@ -1,11 +0,0 @@
# Browserify example
Two steps need to be done for this to work
In the project root
npm install
In this folder
../../node_modules/.bin/browserify main.js -o bundle.js

View file

@ -1,209 +0,0 @@
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<title>A date range picker for Bootstrap</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="all" href="../../daterangepicker.css" />
<style type="text/css">
.demo { position: relative; }
.demo i {
position: absolute; bottom: 10px; right: 24px; top: auto; cursor: pointer;
}
</style>
</head>
<body style="margin: 60px 0">
<div class="container">
<h1 style="margin: 0 0 20px 0">Configuration Builder</h1>
<div class="well configurator">
<form>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="parentEl">parentEl</label>
<input type="text" class="form-control" id="parentEl" value="" placeholder="body">
</div>
<div class="form-group">
<label for="startDate">startDate</label>
<input type="text" class="form-control" id="startDate" value="07/01/2015">
</div>
<div class="form-group">
<label for="endDate">endDate</label>
<input type="text" class="form-control" id="endDate" value="07/15/2015">
</div>
<div class="form-group">
<label for="minDate">minDate</label>
<input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
</div>
<div class="form-group">
<label for="maxDate">maxDate</label>
<input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
</div>
</div>
<div class="col-md-4">
<div class="checkbox">
<label>
<input type="checkbox" id="autoApply"> autoApply
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="singleDatePicker"> singleDatePicker
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showDropdowns"> showDropdowns
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showWeekNumbers"> showWeekNumbers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showISOWeekNumbers"> showISOWeekNumbers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePicker"> timePicker
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePicker24Hour"> timePicker24Hour
</label>
</div>
<div class="form-group">
<label for="timePickerIncrement">timePickerIncrement (in minutes)</label>
<input type="text" class="form-control" id="timePickerIncrement" value="1">
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePickerSeconds"> timePickerSeconds
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="dateLimit"> dateLimit (with example date range span)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="ranges"> ranges (with example predefined ranges)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="locale"> locale (with example settings)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="linkedCalendars" checked="checked"> linkedCalendars
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="autoUpdateInput" checked="checked"> autoUpdateInput
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="alwaysShowCalendars"> alwaysShowCalendars
</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="opens">opens</label>
<select id="opens" class="form-control">
<option value="right" selected>right</option>
<option value="left">left</option>
<option value="center">center</option>
</select>
</div>
<div class="form-group">
<label for="drops">drops</label>
<select id="drops" class="form-control">
<option value="down" selected>down</option>
<option value="up">up</option>
</select>
</div>
<div class="form-group">
<label for="buttonClasses">buttonClasses</label>
<input type="text" class="form-control" id="buttonClasses" value="btn btn-sm">
</div>
<div class="form-group">
<label for="applyClass">applyClass</label>
<input type="text" class="form-control" id="applyClass" value="btn-success">
</div>
<div class="form-group">
<label for="cancelClass">cancelClass</label>
<input type="text" class="form-control" id="cancelClass" value="btn-default">
</div>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-2 demo">
<h4>Your Date Range Picker</h4>
<input type="text" id="config-demo" class="form-control">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
</div>
<div class="col-md-6">
<h4>Configuration</h4>
<div class="well">
<textarea id="config-text" style="height: 300px; width: 100%; padding: 10px"></textarea>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="bundle.js"></script>
</body>
</html>

View file

@ -1,135 +0,0 @@
require('../../daterangepicker.js');
var $ = require('jquery'),
moment = require('moment');
$(document).ready(function() {
$('#config-text').keyup(function() {
eval($(this).val());
});
$('.configurator input, .configurator select').change(function() {
updateConfig();
});
$('.demo i').click(function() {
$(this).parent().find('input').click();
});
$('#startDate').daterangepicker({
singleDatePicker: true,
startDate: moment().subtract(6, 'days')
});
$('#endDate').daterangepicker({
singleDatePicker: true,
startDate: moment()
});
updateConfig();
function updateConfig() {
var options = {};
if ($('#singleDatePicker').is(':checked'))
options.singleDatePicker = true;
if ($('#showDropdowns').is(':checked'))
options.showDropdowns = true;
if ($('#showWeekNumbers').is(':checked'))
options.showWeekNumbers = true;
if ($('#showISOWeekNumbers').is(':checked'))
options.showISOWeekNumbers = true;
if ($('#timePicker').is(':checked'))
options.timePicker = true;
if ($('#timePicker24Hour').is(':checked'))
options.timePicker24Hour = true;
if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1)
options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10);
if ($('#timePickerSeconds').is(':checked'))
options.timePickerSeconds = true;
if ($('#autoApply').is(':checked'))
options.autoApply = true;
if ($('#dateLimit').is(':checked'))
options.dateLimit = { days: 7 };
if ($('#ranges').is(':checked')) {
options.ranges = {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
};
}
if ($('#locale').is(':checked')) {
options.locale = {
format: 'MM/DD/YYYY HH:mm',
separator: ' - ',
applyLabel: 'Apply',
cancelLabel: 'Cancel',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom',
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
firstDay: 1
};
}
if (!$('#linkedCalendars').is(':checked'))
options.linkedCalendars = false;
if (!$('#autoUpdateInput').is(':checked'))
options.autoUpdateInput = false;
if ($('#alwaysShowCalendars').is(':checked'))
options.alwaysShowCalendars = true;
if ($('#parentEl').val().length)
options.parentEl = $('#parentEl').val();
if ($('#startDate').val().length)
options.startDate = $('#startDate').val();
if ($('#endDate').val().length)
options.endDate = $('#endDate').val();
if ($('#minDate').val().length)
options.minDate = $('#minDate').val();
if ($('#maxDate').val().length)
options.maxDate = $('#maxDate').val();
if ($('#opens').val().length && $('#opens').val() != 'right')
options.opens = $('#opens').val();
if ($('#drops').val().length && $('#drops').val() != 'down')
options.drops = $('#drops').val();
if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm')
options.buttonClasses = $('#buttonClasses').val();
if ($('#applyClass').val().length && $('#applyClass').val() != 'btn-success')
options.applyClass = $('#applyClass').val();
if ($('#cancelClass').val().length && $('#cancelClass').val() != 'btn-default')
options.cancelClass = $('#cancelClass').val();
$('#config-text').val("$('#demo').daterangepicker(" + JSON.stringify(options, null, ' ') + ", function(start, end, label) {\n console.log(\"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')\");\n});");
$('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); });
}
});

View file

@ -1,745 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Date Range Picker &mdash; JavaScript Date &amp; Time Picker Library</title>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/trianglify/0.2.1/trianglify.min.js"></script>
<script type="text/javascript" src="daterangepicker.js"></script>
<link rel="stylesheet" type="text/css" href="daterangepicker.css" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
<script src="website.js"></script>
<link rel="stylesheet" type="text/css" href="website.css" />
<meta name="google-site-verification" content="1fP-Eo9i1ozV4MUlqZv2vsLv1r7tvYutUb6i38v0_vg" />
</head>
<body>
<nav class="navbar navbar-expand-sm navbar-dark bg-dark" style="padding: 0; justify-content: space-between">
<div class="container">
<ul class="navbar-nav">
<li class="nav-item" style="padding-left: 0"><a class="nav-link" href="/" style="color: #eeeeee"><i class="fa fa-calendar"></i>&nbsp; Date Range Picker</a></li>
</ul>
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="https://www.improvely.com" style="color: #33beff"><i class="fa fa-chart-bar"></i>&nbsp; Improvely</a></li>
<li class="nav-item"><a class="nav-link" href="https://www.w3counter.com" style="color: #ff9999"><i class="fa fa-chart-pie"></i>&nbsp; W3Counter</a></li>
<li class="nav-item"><a class="nav-link" href="https://www.websitegoodies.com" style="color: #f49a16"><i class="fa fa-wrench"></i>&nbsp; Website Goodies</a></li>
</ul>
</div>
</nav>
<div id="jumbo">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-12">
<h1 style="margin: 0 0 10px 0">Date Range Picker</h1>
<p style="font-size: 18px; margin-bottom: 0">
A JavaScript component for choosing date ranges,
dates and times.
</p>
</div>
<div class="col-md-6 col-sm-12" style="text-align: right; padding-right: 0">
<div style="margin-bottom: 10px; margin-right: 15px">
<a href="https://github.com/dangrossman/daterangepicker" class="btn btn-light"><i class="fab fa-github-alt"></i>&nbsp; View on GitHub</a>
&nbsp;
<a href="https://github.com/dangrossman/daterangepicker/archive/master.zip" class="btn btn-success"><i class="fas fa-download"></i>&nbsp; Download ZIP</a>
</div>
<div style="margin-right: 0px">
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=daterangepicker&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=daterangepicker&type=watch&count=true&size=large&v=2" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=daterangepicker&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
</div>
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0 30px" id="main">
<div class="row">
<div class="leftcol d-none d-lg-block d-xl-block">
<div id="menu" class="list-group" style="margin-bottom: 10px">
<a class="list-group-item" href="#usage">Getting Started</a>
<a class="list-group-item" href="#examples">Examples</a>
<a class="list-group-item" href="#options">Options, Methods &amp; Events</a>
<a class="list-group-item" href="#config">Configuration Generator</a>
<a class="list-group-item" href="#license">License &amp; Comments</a>
</div>
<div style="width: 300px; min-width: 300px">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- DRP Responsive -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9095657276960731"
data-ad-slot="8963174596"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
<div class="rightcol">
<p>Originally created for reports at <a href="https://www.improvely.com">Improvely</a>, the Date Range Picker can be attached to any webpage element to pop up two calendars for selecting dates, times, or predefined ranges like "Last 30 Days".</p>
<a style="display: block; height: 300px; background: url('drp.png') top right no-repeat; background-size: cover; border: 1px solid #ccc; margin-bottom: 30px" href="https://awio.iljmp.com/5/drpdemo" title="Click for a Live Demo"></a>
<h1><a id="usage" href="#usage">Getting Started</a></h1>
<p>
To get started, include jQuery, Moment.js and Date Range Picker's files in your webpage:
</p>
<script src="https://gist.github.com/dangrossman/4879503153c6a7a0b3b6ebd64e0383b7.js"></script>
<p style="margin-bottom: 10px">
Then attach a date range picker to whatever you want to trigger it:
</p>
<div class="row">
<div class="col-8">
<label>Code:</label>
<script src="https://gist.github.com/dangrossman/f460cf1243d8ffb08c749730e89c2f3d.js"></script>
</div>
<div class="col-4">
<label>Produces:</label>
<input type="text" name="dates" class="form-control pull-right" />
<script>
$(function() {
$('input[name="dates"]').daterangepicker({ startDate: moment(), endDate: moment().add(2, 'day')});
})
</script>
</div>
</div>
<p>
You can customize Date Range Picker with options, and get notified when the user chooses new dates by providing a callback function.
</p>
<h1><a id="examples" href="#examples">Examples</a></h1>
<!-- Example 1 -->
<h2><a data-toggle="nothing" href="#example1">Simple Date Range Picker With a Callback</a></h2>
<div class="collapsable" id="example1">
<div class="row">
<div class="col-8">
<label>Code:</label>
<script src="https://gist.github.com/dangrossman/e118af4dbadc5177d7494dba9d3295d1.js"></script>
</div>
<div class="col-4">
<label>Produces:</label>
<input type="text" name="daterange" class="form-control" value="1/01/2018 - 01/15/2018" />
<script>
$(function() {
$('input[name="daterange"]').daterangepicker({
opens: 'left'
}, function(start, end, label) {
console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
});
});
</script>
</div>
</div>
</div>
<!-- Example 2 -->
<h2><a data-toggle="nothing" href="#example2">Date Range Picker With Times</a></h2>
<div class="collapsable" id="example2">
<div class="row">
<div class="col-8">
<label>Code:</label>
<script src="https://gist.github.com/dangrossman/14db17599e24652db7401ed2448eb91a.js"></script>
</div>
<div class="col-4">
<label>Produces:</label>
<input type="text" name="datetimes" class="form-control pull-right" />
<script>
$(function() {
$('input[name="datetimes"]').daterangepicker({
timePicker: true,
startDate: moment().startOf('hour'),
endDate: moment().startOf('hour').add(32, 'hour'),
locale: {
format: 'M/DD hh:mm A'
}
});
});
</script>
</div>
</div>
</div>
<!-- Example 3 -->
<h2><a data-toggle="nothing" href="#example3">Single Date Picker</a></h2>
<div class="collapsable" id="example3">
<div class="row">
<div class="col-8">
<label>Code:</label>
<script src="https://gist.github.com/dangrossman/98d8f1c304328c191b1ad33ac21354fd.js"></script>
</div>
<div class="col-4">
<label>Produces:</label>
<input type="text" name="birthday" class="form-control pull-right" value="10/24/1984" />
<script>
$(function() {
$('input[name="birthday"]').daterangepicker({
singleDatePicker: true,
showDropdowns: true,
minYear: 1901,
maxYear: parseInt(moment().format('YYYY'),10)
}, function(start, end, label) {
var years = moment().diff(start, 'years');
alert("You are " + years + " years old!");
});
});
</script>
</div>
</div>
</div>
<!-- Example 4 -->
<h2><a data-toggle="nothing" href="#example4">Predefined Date Ranges</a></h2>
<div class="collapsable" id="example4">
<div class="row">
<div class="col-8">
<label>Code:</label>
<script src="https://gist.github.com/dangrossman/8c6747b82572bc860364f17258004dbb.js"></script>
</div>
<div class="col-4">
<label>Produces:</label>
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="fa fa-calendar"></i>&nbsp;
<span></span> <i class="fa fa-caret-down"></i>
</div>
<script type="text/javascript">
$(function() {
var start = moment().subtract(29, 'days');
var end = moment();
function cb(start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
}
}, cb);
cb(start, end);
});
</script>
</div>
</div>
</div>
<!-- Example 5 -->
<h2><a data-toggle="nothing" href="#example5">Input Initially Empty</a></h2>
<div class="collapsable" id="example5">
<div class="row">
<div class="col-8">
<label>Code:</label>
<script src="https://gist.github.com/dangrossman/d50376f3467f69e7fb5570afd07dc921.js"></script>
</div>
<div class="col-4">
<label>Produces:</label>
<input type="text" name="datefilter" class="form-control pull-right" value="" />
<script type="text/javascript">
$(function() {
$('input[name="datefilter"]').daterangepicker({
autoUpdateInput: false,
locale: {
cancelLabel: 'Clear'
}
});
$('input[name="datefilter"]').on('apply.daterangepicker', function(ev, picker) {
$(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
});
$('input[name="datefilter"]').on('cancel.daterangepicker', function(ev, picker) {
$(this).val('');
});
});
</script>
</div>
</div>
</div>
<h1 style="margin-top: 30px"><a id="options" href="#options">Options</a></h1>
<ul class="nobullets">
<li>
<code>startDate</code> (Date or string) The beginning date of the initially selected date range. If you provide a string, it must match the date format string set in your <code>locale</code> setting.
</li>
<li>
<code>endDate</code>: (Date or string) The end date of the initially selected date range.
</li>
<li>
<code>minDate</code>: (Date or string) The earliest date a user may select.
</li>
<li>
<code>maxDate</code>: (Date or string) The latest date a user may select.
</li>
<li>
<code>maxSpan</code>: (object) The maximum span between the selected start and end dates. Check off <code>maxSpan</code> in the configuration generator for an example of how to use this. You can provide any object the <code>moment</code> library would let you add to a date.
</li>
<li>
<code>showDropdowns</code>: (true/false) Show year and month select boxes above calendars to jump to a specific month and year.
</li>
<li>
<code>minYear</code>: (number) The minimum year shown in the dropdowns when <code>showDropdowns</code> is set to true.
</li>
<li>
<code>maxYear</code>: (number) The maximum year shown in the dropdowns when <code>showDropdowns</code> is set to true.
</li>
<li>
<code>showWeekNumbers</code>: (true/false) Show localized week numbers at the start of each week on the calendars.
</li>
<li>
<code>showISOWeekNumbers</code>: (true/false) Show ISO week numbers at the start of each week on the calendars.
</li>
<li>
<code>timePicker</code>: (true/false) Adds select boxes to choose times in addition to dates.
</li>
<li>
<code>timePickerIncrement</code>: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30).
</li>
<li>
<code>timePicker24Hour</code>: (true/false) Use 24-hour instead of 12-hour times, removing the AM/PM selection.
</li>
<li>
<code>timePickerSeconds</code>: (true/false) Show seconds in the timePicker.
</li>
<li>
<code>ranges</code>: (object) Set predefined date ranges the user can select from. Each key is the label for the range, and its value an array with two dates representing the bounds of the range. Click <code>ranges</code> in the configuration generator for examples.
</li>
<li>
<code>showCustomRangeLabel</code>: (true/false) Displays "Custom Range" at
the end of the list of predefined ranges, when the <code>ranges</code> option is used.
This option will be highlighted whenever the current date range selection does not match one of the predefined ranges. Clicking it will display the calendars to select a new range.
</li>
<li>
<code>alwaysShowCalendars</code>: (true/false) Normally, if you use the <code>ranges</code> option to specify pre-defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range". When this option is set to true, the calendars for choosing a custom date range are always shown instead.
</li>
<li>
<code>opens</code>: ('left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to.
</li>
<li>
<code>drops</code>: ('down'/'up'/'auto') Whether the picker appears below (default) or above the HTML element it's attached to.
</li>
<li>
<code>buttonClasses</code>: (string) CSS class names that will be added to both the apply and cancel buttons.
</li>
<li>
<code>applyButtonClasses</code>: (string) CSS class names that will be added only to the apply button.
</li>
<li>
<code>cancelButtonClasses</code>: (string) CSS class names that will be added only to the cancel button.
</li>
<li>
<code>locale</code>: (object) Allows you to provide localized strings for buttons and labels, customize the date format, and change the first day of week for the calendars.
Check off <code>locale</code> in the configuration generator to see how
to customize these options.
</li>
<li>
<code>singleDatePicker</code>: (true/false) Show only a single calendar to choose one date, instead of a range picker with two calendars. The start and end dates provided to your callback will be the same single date chosen.
</li>
<li>
<code>autoApply</code>: (true/false) Hide the apply and cancel buttons, and automatically apply a new date range as soon as two dates are clicked.
</li>
<li>
<code>linkedCalendars</code>: (true/false) When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February), and both will be advanced when clicking the left or right arrows above the calendars. When disabled, the two calendars can be individually advanced and display any month/year.
</li>
<li>
<code>isInvalidDate</code>: (function) A function that is passed each date in the two
calendars before they are displayed, and may return true or false to indicate whether
that date should be available for selection or not.
</li>
<li>
<code>isCustomDate</code>: (function) A function that is passed each date in the two
calendars before they are displayed, and may return a string or array of CSS class names
to apply to that date's calendar cell.
</li>
<li>
<code>autoUpdateInput</code>: (true/false) Indicates whether the date range picker should
automatically update the value of the <code>&lt;input&gt;</code> element it's attached to at initialization and when the selected dates change.
</li>
<li>
<code>parentEl</code>: (string) jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body'
</li>
</ul>
<h1 style="margin-top: 30px"><a id="methods" href="#methods">Methods</a></h1>
<p>
You can programmatically update the <code>startDate</code> and <code>endDate</code>
in the picker using the <code>setStartDate</code> and <code>setEndDate</code> methods.
You can access the Date Range Picker object and its functions and properties through
data properties of the element you attached it to.
</p>
<script src="https://gist.github.com/dangrossman/8ff9b1220c9b5682e8bd.js"></script>
<br/>
<ul class="nobullets">
<li>
<code>setStartDate(Date or string)</code>: Sets the date range picker's currently selected start date to the provided date
</li>
<li>
<code>setEndDate(Date or string)</code>: Sets the date range picker's currently selected end date to the provided date
</li>
</ul>
<p style="margin: 0"><b>Example usage:</b></p>
<script src="https://gist.github.com/dangrossman/e1a8effbaeacb50a1e31.js"></script>
<h1 style="margin-top: 30px"><a id="events" href="#events">Events</a></h1>
<p>
Several events are triggered on the element you attach the picker to, which you can listen for.
</p>
<ul class="nobullets">
<li>
<code>show.daterangepicker</code>: Triggered when the picker is shown
</li>
<li>
<code>hide.daterangepicker</code>: Triggered when the picker is hidden
</li>
<li>
<code>showCalendar.daterangepicker</code>: Triggered when the calendar(s) are shown
</li>
<li>
<code>hideCalendar.daterangepicker</code>: Triggered when the calendar(s) are hidden
</li>
<li>
<code>apply.daterangepicker</code>: Triggered when the apply button is clicked,
or when a predefined range is clicked
</li>
<li>
<code>cancel.daterangepicker</code>: Triggered when the cancel button is clicked
</li>
</ul>
<p>
Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by changing the button label and watching for the cancel event:
</p>
<script src="https://gist.github.com/dangrossman/1bea78da703f2896564d.js"></script>
<br/>
<p>
While passing in a callback to the constructor is the easiest way to listen for changes in the selected date range, you can also do something every time the apply button is clicked even if the selection hasn't changed:
</p>
<script src="https://gist.github.com/dangrossman/0c6c911fea1459b5fd13.js"></script>
<h1 style="margin-top: 30px"><a id="config" href="#config">Configuration Generator</a></h1>
<div class="well configurator">
<form>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="parentEl">parentEl</label>
<input type="text" class="form-control" id="parentEl" value="" placeholder="body">
</div>
<div class="form-group">
<label for="startDate">startDate</label>
<input type="text" class="form-control" id="startDate" value="07/01/2017">
</div>
<div class="form-group">
<label for="endDate">endDate</label>
<input type="text" class="form-control" id="endDate" value="07/15/2017">
</div>
<div class="form-group">
<label for="minDate">minDate</label>
<input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
</div>
<div class="form-group">
<label for="maxDate">maxDate</label>
<input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
</div>
<div class="form-group">
<label for="opens">opens</label>
<select id="opens" class="form-control">
<option value="right" selected>right</option>
<option value="left">left</option>
<option value="center">center</option>
</select>
</div>
<div class="form-group">
<label for="drops">drops</label>
<select id="drops" class="form-control">
<option value="down" selected>down</option>
<option value="up">up</option>
<option value="auto">auto</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="checkbox">
<label>
<input type="checkbox" id="showDropdowns"> showDropdowns
</label>
</div>
<div class="form-group">
<label for="minYear">minYear</label>
<input type="text" class="form-control" id="minYear" value="">
</div>
<div class="form-group">
<label for="maxYear">maxYear</label>
<input type="text" class="form-control" id="maxYear" value="">
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showWeekNumbers"> showWeekNumbers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showISOWeekNumbers"> showISOWeekNumbers
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="singleDatePicker"> singleDatePicker
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePicker"> timePicker
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePicker24Hour"> timePicker24Hour
</label>
</div>
<div class="form-group">
<label for="timePickerIncrement">timePickerIncrement (in minutes)</label>
<input type="text" class="form-control" id="timePickerIncrement" value="1">
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="timePickerSeconds"> timePickerSeconds
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="maxSpan"> maxSpan (example value)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="locale"> locale (example settings)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="autoApply"> autoApply
</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="buttonClasses">buttonClasses</label>
<input type="text" class="form-control" id="buttonClasses" value="btn btn-sm">
</div>
<div class="form-group">
<label for="applyButtonClasses">applyButtonClasses</label>
<input type="text" class="form-control" id="applyButtonClasses" value="btn-primary">
</div>
<div class="form-group">
<label for="cancelButtonClasses">cancelButtonClasses</label>
<input type="text" class="form-control" id="cancelButtonClasses" value="btn-default">
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="ranges"> ranges (with example predefined ranges)
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="alwaysShowCalendars"> alwaysShowCalendars
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="showCustomRangeLabel" checked="checked"> showCustomRangeLabel
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="linkedCalendars" checked="checked"> linkedCalendars
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="autoUpdateInput" checked="checked"> autoUpdateInput
</label>
</div>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-4 demo">
<div style="position: relative">
<h2 style="margin-bottom: 15px">Your Date Range Picker</h2>
<input type="text" id="config-demo" class="form-control">
</div>
</div>
<div class="col-8">
<h2 style="margin-bottom: 15px">Your Configuration to Copy</h2>
<div class="well">
<textarea id="config-text" style="height: 300px; width: 100%; padding: 10px"></textarea>
</div>
</div>
</div>
<!-- License -->
<h1 style="margin-top: 30px"><a id="license" href="#license">License</a></h1>
<p>The MIT License (MIT)</p>
<p>Copyright (c) 2012-2019 <a href="http://www.dangrossman.info">Dan Grossman</a></p>
<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
</p>
<p>
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
</p>
<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</p>
<h1 style="margin-top: 30px"><a id="config" href="#comments">Comments</a></h1>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_url = 'http://www.dangrossman.info/2012/08/20/a-date-range-picker-for-twitter-bootstrap/';
var disqus_identifier = '1045 http://www.dangrossman.info/?p=1045';
var disqus_container_id = 'disqus_thread';
var disqus_shortname = 'dangrossman';
var disqus_title = "A Date Range Picker for Bootstrap";
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</div>
</div>
<!-- Begin W3Counter Tracking Code -->
<script type="text/javascript" src="https://www.w3counter.com/tracker.js?id=90840"></script>
<!-- End W3Counter Tracking Code -->
<script type="text/javascript">
var im_domain = 'awio';
var im_project_id = 48;
(function(e,t){window._improvely=[];var n=e.getElementsByTagName("script")[0];var r=e.createElement("script");r.type="text/javascript";r.src="https://"+im_domain+".iljmp.com/improvely.js";r.async=true;n.parentNode.insertBefore(r,n);if(typeof t.init=="undefined"){t.init=function(e,t){window._improvely.push(["init",e,t])};t.goal=function(e){window._improvely.push(["goal",e])};t.conversion=function(e){window._improvely.push(["conversion",e])};t.label=function(e){window._improvely.push(["label",e])}}window.improvely=t;t.init(im_domain,im_project_id)})(document,window.improvely||[])
</script>
<div id="footer">
Copyright &copy; 2012-2018 <a href="http://www.dangrossman.info/">Dan Grossman</a>.
</div>
</body>
</html>

View file

@ -1,152 +0,0 @@
body {
font-size: 15px;
line-height: 1.6em;
position: relative;
margin: 0;
}
.navbar .nav-item {
padding: 8px 0 8px 20px;
}
.navbar .nav-link {
font-weight: bold;
font-size: 14px;
padding: 0;
}
.navbar-expand-sm .navbar-nav .nav-link {
padding: 0;
}
.well {
background: #f5f5f5;
border-radius: 4px;
padding: 20px;
}
h1 {
font-size: 20px;
margin-bottom: 1em;
padding-bottom: 5px;
border-bottom: 1px dotted #08c;
}
h1:before {
content: '#';
color: #666;
position: relative;
padding-right: 5px;
}
h2 {
padding: 0;
margin: 20px 0 0 0;
font-size: 18px;
}
h2 a {
color: #444;
display: block;
background: #eee;
padding: 8px 12px;
margin-bottom: 0;
cursor: default;
text-decoration: none;
}
input.form-control {
font-size: 14px;
}
.collapsable {
border: 1px solid #eee;
padding: 12px;
display: block;
}
label {
font-size: 13px;
font-weight: bold;
}
.gist {
overflow: auto;
}
.gist .blob-wrapper.data {
max-height: 350px;
overflow: auto;
}
.list-group-item {
padding: 4px 0;
border: 0;
font-size: 16px;
}
.leftcol {
position: absolute;
top: 180px;
}
.rightcol {
max-width: 950px;
}
.container {
max-width: 1300px;
}
@media (min-width: 980px) {
.rightcol {
margin-left: 320px;
}
}
p, pre {
margin-bottom: 2em;
}
ul.nobullets {
margin: 0;
padding: 0;
list-style: none;
}
ul.nobullets li {
padding-bottom: 1em;
margin-bottom: 1em;
border-bottom: 1px dotted #ddd;
}
input[type="text"] {
padding: 6px;
width: 100%;
border-radius: 4px;
}
#footer {
background: #222;
margin-top: 80px;
padding: 10px;
color: #fff;
text-align: center;
}
#footer a:link, #footer a:visited {
color: #fff;
border-bottom: 1px dotted #fff;
}
#jumbo {
background: #c1deef;
color: #000;
padding: 20px 0;
margin-bottom: 20px;
}
#jumbo h1 {
font-size: 28px;
}
#jumbo .btn {
border-radius: 0;
font-size: 16px;
}

View file

@ -1,179 +0,0 @@
$(document).ready(function() {
$('#config-text').keyup(function() {
eval($(this).val());
});
$('.configurator input, .configurator select').change(function() {
updateConfig();
});
$('.demo i').click(function() {
$(this).parent().find('input').click();
});
$('#startDate').daterangepicker({
singleDatePicker: true,
startDate: moment().subtract(6, 'days')
});
$('#endDate').daterangepicker({
singleDatePicker: true,
startDate: moment()
});
//updateConfig();
function updateConfig() {
var options = {};
if ($('#singleDatePicker').is(':checked'))
options.singleDatePicker = true;
if ($('#showDropdowns').is(':checked'))
options.showDropdowns = true;
if ($('#minYear').val().length && $('#minYear').val() != 1)
options.minYear = parseInt($('#minYear').val(), 10);
if ($('#maxYear').val().length && $('#maxYear').val() != 1)
options.maxYear = parseInt($('#maxYear').val(), 10);
if ($('#showWeekNumbers').is(':checked'))
options.showWeekNumbers = true;
if ($('#showISOWeekNumbers').is(':checked'))
options.showISOWeekNumbers = true;
if ($('#timePicker').is(':checked'))
options.timePicker = true;
if ($('#timePicker24Hour').is(':checked'))
options.timePicker24Hour = true;
if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1)
options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10);
if ($('#timePickerSeconds').is(':checked'))
options.timePickerSeconds = true;
if ($('#autoApply').is(':checked'))
options.autoApply = true;
if ($('#maxSpan').is(':checked'))
options.maxSpan = { days: 7 };
if ($('#ranges').is(':checked')) {
options.ranges = {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
};
}
if ($('#locale').is(':checked')) {
options.locale = {
format: 'MM/DD/YYYY',
separator: ' - ',
applyLabel: 'Apply',
cancelLabel: 'Cancel',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom',
weekLabel: 'W',
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
firstDay: 1
};
}
if (!$('#linkedCalendars').is(':checked'))
options.linkedCalendars = false;
if (!$('#autoUpdateInput').is(':checked'))
options.autoUpdateInput = false;
if (!$('#showCustomRangeLabel').is(':checked'))
options.showCustomRangeLabel = false;
if ($('#alwaysShowCalendars').is(':checked'))
options.alwaysShowCalendars = true;
if ($('#parentEl').val().length)
options.parentEl = $('#parentEl').val();
if ($('#startDate').val().length)
options.startDate = $('#startDate').val();
if ($('#endDate').val().length)
options.endDate = $('#endDate').val();
if ($('#minDate').val().length)
options.minDate = $('#minDate').val();
if ($('#maxDate').val().length)
options.maxDate = $('#maxDate').val();
if ($('#opens').val().length && $('#opens').val() != 'right')
options.opens = $('#opens').val();
if ($('#drops').val().length && $('#drops').val() != 'down')
options.drops = $('#drops').val();
if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm')
options.buttonClasses = $('#buttonClasses').val();
if ($('#applyButtonClasses').val().length && $('#applyButtonClasses').val() != 'btn-primary')
options.applyButtonClasses = $('#applyButtonClasses').val();
if ($('#cancelButtonClasses').val().length && $('#cancelButtonClasses').val() != 'btn-default')
options.cancelClass = $('#cancelButtonClasses').val();
$('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); });
if (typeof options.ranges !== 'undefined') {
options.ranges = {};
}
var option_text = JSON.stringify(options, null, ' ');
var replacement = "ranges: {\n"
+ " 'Today': [moment(), moment()],\n"
+ " 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],\n"
+ " 'Last 7 Days': [moment().subtract(6, 'days'), moment()],\n"
+ " 'Last 30 Days': [moment().subtract(29, 'days'), moment()],\n"
+ " 'This Month': [moment().startOf('month'), moment().endOf('month')],\n"
+ " 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]\n"
+ " }";
option_text = option_text.replace(new RegExp('"ranges"\: \{\}', 'g'), replacement);
$('#config-text').val("$('#demo').daterangepicker(" + option_text + ", function(start, end, label) {\n console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');\n});");
}
$(window).scroll(function (event) {
var scroll = $(window).scrollTop();
if (scroll > 180) {
$('.leftcol').css('position', 'fixed');
$('.leftcol').css('top', '10px');
} else {
$('.leftcol').css('position', 'absolute');
$('.leftcol').css('top', '180px');
}
});
var bg = new Trianglify({
x_colors: ["#e1f3fd", "#eeeeee", "#407dbf"],
y_colors: 'match_x',
width: document.body.clientWidth,
height: 150,
stroke_width: 0,
cell_size: 20
});
$('#jumbo').css('background-image', 'url(' + bg.png() + ')');
});

View file

@ -1,15 +0,0 @@
import { Filter } from './types';
/**
* ActiveFilter represents the currently active filter over
* the grid.
*
* It can be a plain string value or an array of strings.
*/
export default class ActiveFilter {
private filter;
constructor(filter: Filter);
get(): Filter;
set(targetFilter: Filter): void;
toggle(targetFilter: string): void;
private toggleFilter;
}

View file

@ -1,12 +0,0 @@
import { Destructible } from './types/interfaces';
declare type Receiver = NodeListOf<Element> | Element | Window;
export default class EventReceiver implements Destructible {
private receiver;
private eventDictionary;
constructor(receiver: Receiver);
on(eventType: string, eventHandler: EventListener): void;
off(eventType: string): void;
destroy(): void;
private removeAllEvents;
}
export {};

View file

@ -1,28 +0,0 @@
import { FilterizrState } from '../types';
import FilterizrOptions from '../FilterizrOptions';
import FilterItems from '../FilterItems';
import FilterizrElement from '../FilterizrElement';
import StyledFilterContainer from './StyledFilterContainer';
/**
* Resembles the grid of items within Filterizr.
*/
export default class FilterContainer extends FilterizrElement {
filterItems: FilterItems;
protected styledNode: StyledFilterContainer;
private _filterizrState;
constructor(node: Element, options: FilterizrOptions);
readonly styles: StyledFilterContainer;
filterizrState: FilterizrState;
destroy(): void;
/**
* Turn the HTML elements in the grid to FilterItem
* instances and return a collection of them.
* @throws when no filter items are found in the grid.
*/
makeFilterItems(options: FilterizrOptions): FilterItems;
insertItem(node: HTMLElement): void;
removeItem(node: HTMLElement): void;
setHeight(newHeight: number): void;
bindEvents(): void;
unbindEvents(): void;
}

View file

@ -1,6 +0,0 @@
import StyledFilterizrElement from '../StyledFilterizrElement';
export default class StyledFilterContainer extends StyledFilterizrElement {
initialize(): void;
updatePaddings(): void;
setHeight(newHeight: number): void;
}

View file

@ -1 +0,0 @@
export { default } from './FilterContainer';

View file

@ -1,4 +0,0 @@
import FilterizrOptions from '../FilterizrOptions';
export declare const makePaddingStyles: (options: FilterizrOptions) => object;
export declare const makeInitialStyles: (options: FilterizrOptions) => object;
export declare const makeHeightStyles: (height: number) => object;

View file

@ -1,19 +0,0 @@
import Filterizr from './Filterizr';
import { Destructible } from './types/interfaces';
export default class FilterControls implements Destructible {
private filterControls;
private filterizr;
private multiFilterControls;
private searchControls;
private selector;
private shuffleControls;
private sortAscControls;
private sortDescControls;
/**
* @param filterizr keep a ref to the Filterizr object to control actions
* @param selector selector of controls in case of multiple Filterizr instances
*/
constructor(filterizr: Filterizr, selector?: string);
destroy(): void;
private initialize;
}

View file

@ -1,44 +0,0 @@
import { Position } from '../types/interfaces';
import FilterizrOptions from '../FilterizrOptions';
import FilterizrElement from '../FilterizrElement';
import StyledFilterItem from './StyledFilterItem';
/**
* Resembles an item in the grid of Filterizr.
*/
export default class FilterItem extends FilterizrElement {
protected styledNode: StyledFilterItem;
private filteredOut;
private lastPosition;
private sortData;
constructor(node: Element, index: number, options: FilterizrOptions);
readonly styles: StyledFilterItem;
/**
* Destroys the FilterItem instance
*/
destroy(): void;
/**
* Filters in a specific FilterItem out of the grid.
*/
filterIn(targetPosition: Position): void;
/**
* Filters out a specific FilterItem out of the grid.
*/
filterOut(): void;
/**
* Returns true if the text contents of the FilterItem match the search term
* @param searchTerm to look up
*/
contentsMatchSearch(searchTerm: string): boolean;
/**
* Returns all categories of the grid items data-category attribute
* with a regexp regarding all whitespace.
*/
getCategories(): string[];
/**
* Returns the value of the sort attribute
* @param sortAttribute "index", "sortData" or custom user data-attribute by which to sort
*/
getSortAttribute(sortAttribute: string): string | number;
protected bindEvents(): void;
protected unbindEvents(): void;
}

View file

@ -1,32 +0,0 @@
import { Position } from './../types/interfaces';
import StyledFilterizrElement from '../StyledFilterizrElement';
import FilterizrOptions from '../FilterizrOptions';
export default class StyledFilterItem extends StyledFilterizrElement {
private _index;
constructor(node: HTMLElement, index: number, options: FilterizrOptions);
initialize(): void;
setFilteredStyles(position: Position, cssOptions: object): void;
updateTransitionStyle(): void;
updateWidth(): void;
/**
* Sets the transition css property as an inline style on the FilterItem.
*
* The idea here is that during the very first render items should assume
* their positions directly.
*
* Following renders should actually trigger the transitions, which is why
* we need to delay setting the transition property.
*
* Unfortunately, JavaScript code executes on the same thread as the
* browser's rendering. Everything that needs to be drawn waits for
* JavaScript execution to complete. Thus, we need to use a setTimeout
* here to defer setting the transition style at the first rendering cycle.
*/
enableTransitions(): Promise<void>;
disableTransitions(): void;
setZIndex(zIndex: number): void;
removeZIndex(): void;
removeWidth(): void;
setHidden(): void;
setVisible(): void;
}

View file

@ -1 +0,0 @@
export { default } from './FilterItem';

View file

@ -1,5 +0,0 @@
import FilterizrOptions from '../FilterizrOptions';
import { Dictionary, Position } from '../types/interfaces';
export declare const makeInitialStyles: (options: FilterizrOptions) => object;
export declare const makeFilteringStyles: (targetPosition: Position, cssOptions: Dictionary) => object;
export declare const makeTransitionStyles: (index: number, options: FilterizrOptions) => object;

View file

@ -1,23 +0,0 @@
import StyledFilterItems from './StyledFilterItems';
import { Filter } from '../types';
import FilterItem from '../FilterItem';
import FilterizrOptions from '../FilterizrOptions/FilterizrOptions';
import { Destructible, Styleable } from '../types/interfaces';
export default class FilterItems implements Destructible, Styleable {
private filterItems;
private styledFilterItems;
private options;
constructor(filterItems: FilterItem[], options: FilterizrOptions);
readonly styles: StyledFilterItems;
readonly length: number;
getItem(index: number): FilterItem;
destroy(): void;
push(filterItem: FilterItem): number;
remove(node: HTMLElement): void;
getFiltered(filter: Filter): FilterItem[];
getFilteredOut(filter: Filter): FilterItem[];
sort(sortAttr?: string, sortOrder?: 'asc' | 'desc'): void;
shuffle(): void;
private search;
private shouldBeFiltered;
}

View file

@ -1,13 +0,0 @@
import StyledFilterizrElements from '../StyledFilterizrElements';
import FilterItem from '../FilterItem/FilterItem';
export default class StyledFilterItems extends StyledFilterizrElements {
private _filterItems;
constructor(elements: FilterItem[]);
resetDisplay(): void;
removeWidth(): void;
updateWidth(): void;
updateTransitionStyle(): void;
disableTransitions(): void;
enableTransitions(): Promise<void>;
updateWidthWithTransitionsDisabled(): void;
}

View file

@ -1 +0,0 @@
export { default } from './FilterItems';

View file

@ -1,75 +0,0 @@
import { Filter } from '../types';
import { RawOptions, Destructible } from '../types/interfaces';
import FilterizrOptions from '../FilterizrOptions';
import FilterContainer from '../FilterContainer';
import FilterItem from '../FilterItem';
export default class Filterizr implements Destructible {
/**
* Main Filterizr classes exported as static members
*/
static FilterContainer: typeof FilterContainer;
static FilterItem: typeof FilterItem;
static defaultOptions: RawOptions;
/**
* Static method that receives the jQuery object and extends
* its prototype with a .filterizr method.
*/
static installAsJQueryPlugin: Function;
options: FilterizrOptions;
private windowEventReceiver;
private filterContainer;
private filterControls?;
private imagesHaveLoaded;
private spinner?;
constructor(selectorOrNode?: string | HTMLElement, userOptions?: RawOptions);
private readonly filterItems;
/**
* Filters the items in the grid by a category
* @param category by which to filter
*/
filter(category: Filter): void;
destroy(): void;
/**
* Inserts a new FilterItem into the grid
*/
insertItem(node: HTMLElement): Promise<void>;
/**
* Removes a FilterItem from the grid
*/
removeItem(node: HTMLElement): void;
/**
* Sorts the FilterItems in the grid
* @param sortAttr the attribute by which to perform the sort
* @param sortOrder ascending or descending
*/
sort(sortAttr?: string, sortOrder?: 'asc' | 'desc'): void;
/**
* Searches through the FilterItems for a given string and adds an additional filter layer.
*/
search(searchTerm?: string): void;
/**
* Shuffles the FilterItems in the grid, making sure their positions have changed.
*/
shuffle(): void;
/**
* Updates the perferences of the users for rendering the Filterizr grid,
* additionally performs error checking on the new options passed.
* @param newOptions to override the defaults.
*/
setOptions(newOptions: RawOptions): void;
/**
* Performs multifiltering with AND/OR logic.
* @param toggledFilter the filter to toggle
*/
toggleFilter(toggledFilter: string): void;
private render;
/**
* Initialization sequence of Filterizr when the grid is first loaded
*/
private initialize;
private bindEvents;
/**
* Resolves when the images of the grid have finished loading into the DOM
*/
private waitForImagesToLoad;
}

View file

@ -1 +0,0 @@
export { default } from './Filterizr';

View file

@ -1 +0,0 @@
export default function installAsJQueryPlugin($: any): void;

View file

@ -1,16 +0,0 @@
import { Destructible, Dimensions, Resizable, Styleable } from './types/interfaces';
import FilterizrOptions from './FilterizrOptions';
import EventReceiver from './EventReceiver';
import StyledFilterizrElement from './StyledFilterizrElement';
export default abstract class FilterizrElement implements Destructible, Resizable, Styleable {
node: Element;
options: FilterizrOptions;
protected eventReceiver: EventReceiver;
constructor(node: Element, options: FilterizrOptions);
readonly dimensions: Dimensions;
destroy(): void | Promise<void>;
trigger(eventType: string): void;
abstract readonly styles: StyledFilterizrElement;
protected abstract bindEvents(): void;
protected abstract unbindEvents(): void;
}

View file

@ -1,22 +0,0 @@
import { BaseOptions, RawOptions } from './../types/interfaces';
import ActiveFilter from '../ActiveFilter';
import { Filter } from '../types';
export interface Options extends BaseOptions {
filter: ActiveFilter;
}
export default class FilterizrOptions {
private options;
constructor(userOptions: RawOptions);
readonly isSpinnerEnabled: boolean;
readonly areControlsEnabled: boolean;
readonly controlsSelector: string;
filter: Filter;
toggleFilter(filter: string): void;
searchTerm: string;
get(): Options;
getRaw(): RawOptions;
set(newUserOptions: RawOptions): void;
private convertToFilterizrOptions;
private convertToOptions;
private validate;
}

View file

@ -1,3 +0,0 @@
import { RawOptions } from '../types/interfaces';
declare const defaultOptions: RawOptions;
export default defaultOptions;

View file

@ -1,2 +0,0 @@
export { default as defaultOptions } from './defaultOptions';
export { default } from './FilterizrOptions';

View file

@ -1,13 +0,0 @@
import { Destructible, Styleable } from '../types/interfaces';
import FilterizrOptions from '../FilterizrOptions';
import FilterContainer from '../FilterContainer';
import StyledSpinner from './StyledSpinner';
export default class Spinner implements Destructible, Styleable {
private node;
private styledNode;
private filterContainer;
constructor(filterContainer: FilterContainer, options: FilterizrOptions);
readonly styles: StyledSpinner;
destroy(): Promise<void>;
private initialize;
}

View file

@ -1,5 +0,0 @@
import StyledFilterizrElement from '../StyledFilterizrElement';
export default class StyledSpinner extends StyledFilterizrElement {
initialize(): void;
fadeOut(): Promise<void>;
}

View file

@ -1 +0,0 @@
export { default } from './Spinner';

View file

@ -1,2 +0,0 @@
import { SpinnerOptions } from '../types/interfaces';
export declare function makeSpinner({ fillColor }: SpinnerOptions): HTMLElement;

View file

@ -1,12 +0,0 @@
import { Destructible } from './types/interfaces/Destructible';
import FilterizrOptions from './FilterizrOptions';
export default abstract class StyledFilterizrElement implements Destructible {
protected options: FilterizrOptions;
protected node: HTMLElement;
constructor(node: HTMLElement, options: FilterizrOptions);
destroy(): void;
protected animate(targetStyles: object): Promise<void>;
protected set(targetStyles: object): void;
protected remove(propertyName: string): void;
abstract initialize(): void | Promise<void>;
}

View file

@ -1,2 +0,0 @@
export default abstract class StyledFilterizrElements {
}

View file

@ -1,6 +0,0 @@
declare class Animator {
static animate(node: HTMLElement, targetStyles: object): Promise<void>;
private static process;
}
declare const _default: typeof Animator.animate;
export default _default;

View file

@ -1,4 +0,0 @@
/**
* A Regexp to validate potential values for the CSS easing property of transitions.
*/
export declare const cssEasingValuesRegexp: RegExp;

View file

@ -1,11 +0,0 @@
interface FilterizrState {
IDLE: 'IDLE';
FILTERING: 'FILTERING';
SORTING: 'SORTING';
SHUFFLING: 'SHUFFLING';
}
/**
* Possible animation states for Filterizr
*/
export declare const FILTERIZR_STATE: FilterizrState;
export {};

View file

@ -1,3 +0,0 @@
export { FILTERIZR_STATE } from './filterizrState';
export { LAYOUT } from './layout';
export { cssEasingValuesRegexp } from './cssEasingValuesRegexp';

View file

@ -1,13 +0,0 @@
interface Layout {
SAME_SIZE: 'sameSize';
SAME_HEIGHT: 'sameHeight';
SAME_WIDTH: 'sameWidth';
PACKED: 'packed';
HORIZONTAL: 'horizontal';
VERTICAL: 'vertical';
}
/**
* Possible grid layout modes
*/
export declare const LAYOUT: Layout;
export {};

View file

@ -1,9 +0,0 @@
/**
* Filterizr is a JavaScript library that sorts, shuffles and applies stunning
* filters over responsive galleries using CSS3 transitions and
* custom CSS effects.
* @author Yiotis Kaltsikis
* @see {@link http://yiotis.net/filterizr}
* @license MIT
*/
export { default } from './Filterizr';

View file

@ -1,10 +0,0 @@
/**
* Filterizr is a JavaScript library that sorts, shuffles and applies stunning filters over
* responsive galleries using CSS3 transitions and custom CSS effects.
*
* @author Yiotis Kaltsikis
* @see {@link http://yiotis.net/filterizr}
* @license MIT
*/
import Filterizr from './Filterizr';
export default Filterizr;

View file

@ -1,30 +0,0 @@
/**
* Modified version of Jake Gordon's Bin Packing algorithm used for Filterizr's 'packed' layout
* @see {@link https://github.com/jakesgordon/bin-packing}
*/
interface PackerRoot {
x: number;
y: number;
w: number;
h?: number;
used?: boolean;
down?: PackerRoot;
right?: PackerRoot;
}
interface PackerBlock {
x?: number;
y?: number;
w?: number;
h?: number;
fit?: PackerRoot | void;
}
export default class Packer {
root: PackerRoot;
constructor(w: number);
init(w: number): void;
fit(blocks: PackerBlock[]): void;
findNode(root: PackerRoot, w: number, h: number): PackerRoot | void;
splitNode(node: PackerRoot, w: number, h: number): PackerRoot;
growDown(w: number, h: number): PackerRoot | void;
}
export {};

View file

@ -1 +0,0 @@
export { default } from './makeLayoutPositions';

View file

@ -1,6 +0,0 @@
import { ContainerLayout, Dimensions } from '../types/interfaces';
declare const _default: (itemsDimensions: Dimensions[], gutterPixels: number) => ContainerLayout;
/**
* Horizontal layout algorithm that arranges all FilterItems in one row. Their width may vary.
*/
export default _default;

View file

@ -1,7 +0,0 @@
import { ContainerLayout, Dimensions, Options } from '../types/interfaces';
declare const _default: (containerWidth: number, itemsDimensions: Dimensions[], { gutterPixels, layout }: Options) => ContainerLayout;
/**
* Creates the specifications of the dimensions of the
* container and items for the next render of Filterizr.
*/
export default _default;

View file

@ -1,6 +0,0 @@
import { ContainerLayout, Dimensions } from '../types/interfaces';
declare const _default: (containerWidth: number, itemsDimensions: Dimensions[], gutterPixels: number) => ContainerLayout;
/**
* Packed layout for items that can have varying width as well as varying height.
*/
export default _default;

View file

@ -1,6 +0,0 @@
import { ContainerLayout, Dimensions } from '../types/interfaces';
declare const _default: (containerWidth: number, itemsDimensions: Dimensions[], gutterPixels: number) => ContainerLayout;
/**
* Same height layout for items that have the same height, but can have varying width
*/
export default _default;

View file

@ -1,6 +0,0 @@
import { ContainerLayout, Dimensions } from '../types/interfaces';
declare const _default: (containerWidth: number, itemsDimensions: Dimensions[], gutterPixels: number) => ContainerLayout;
/**
* Same size layout for items that have the same width/height
*/
export default _default;

View file

@ -1,6 +0,0 @@
import { ContainerLayout, Dimensions } from '../types/interfaces';
declare const _default: (containerWidth: number, itemsDimensions: Dimensions[], gutterPixels: number) => ContainerLayout;
/**
* Same width layout for items that have the same width and varying height
*/
export default _default;

View file

@ -1,6 +0,0 @@
import { ContainerLayout, Dimensions } from '../types/interfaces';
declare const _default: (itemsDimensions: Dimensions[], gutterPixels: number) => ContainerLayout;
/**
* Vertical layout algorithm that arranges all FilterItems in one column. Their height may vary.
*/
export default _default;

View file

@ -1,3 +0,0 @@
export declare type Filter = string | string[];
export declare type FilterizrState = 'IDLE' | 'FILTERING' | 'SORTING' | 'SHUFFLING';
export declare type Layout = 'horizontal' | 'vertical' | 'sameHeight' | 'sameWidth' | 'sameSize' | 'packed';

View file

@ -1,20 +0,0 @@
import { SpinnerOptions } from './SpinnerOptions';
import { RawOptionsCallbacks } from './RawOptionsCallbacks';
import { Layout } from '..';
export interface BaseOptions {
animationDuration?: number;
callbacks?: RawOptionsCallbacks;
controlsSelector?: string;
delay?: number;
delayMode?: 'alternate' | 'progressive';
easing?: string;
filterOutCss?: object;
filterInCss?: object;
gridItemsSelector?: string;
gutterPixels?: number;
layout?: Layout;
multifilterLogicalOperator?: 'or' | 'and';
searchTerm?: string;
setupControls?: boolean;
spinner?: SpinnerOptions;
}

View file

@ -1,5 +0,0 @@
import { Position } from './Position';
export interface ContainerLayout {
containerHeight: number;
itemsPositions: Position[];
}

View file

@ -1,3 +0,0 @@
export interface Destructible {
destroy(): void | Promise<void>;
}

View file

@ -1,3 +0,0 @@
export interface Dictionary {
[key: string]: any;
}

View file

@ -1,4 +0,0 @@
export interface Dimensions {
width: number;
height: number;
}

View file

@ -1,5 +0,0 @@
import { BaseOptions } from './BaseOptions';
import ActiveFilter from '../../ActiveFilter';
export interface Options extends BaseOptions {
filter: ActiveFilter;
}

View file

@ -1,4 +0,0 @@
export interface Position {
left: number;
top: number;
}

View file

@ -1,4 +0,0 @@
import { BaseOptions } from './BaseOptions';
export interface RawOptions extends BaseOptions {
filter?: string | string[];
}

View file

@ -1,10 +0,0 @@
export interface RawOptionsCallbacks {
onInit?: EventListener;
onFilteringStart?: EventListener;
onFilteringEnd?: EventListener;
onShufflingStart?: EventListener;
onShufflingEnd?: EventListener;
onSortingStart?: EventListener;
onSortingEnd?: EventListener;
onTransitionEnd?: EventListener;
}

View file

@ -1,6 +0,0 @@
export interface Resizable {
readonly dimensions: {
width: number;
height: number;
};
}

View file

@ -1,6 +0,0 @@
import { Dictionary } from './Dictionary';
export interface SpinnerOptions {
enabled?: boolean;
fillColor?: string;
styles?: Dictionary;
}

View file

@ -1,5 +0,0 @@
import StyledFilterizrElement from '../../StyledFilterizrElement';
import StyledFilterizrElements from '../../StyledFilterizrElements';
export interface Styleable {
readonly styles: StyledFilterizrElement | StyledFilterizrElements;
}

View file

@ -1,12 +0,0 @@
export { BaseOptions } from './BaseOptions';
export { ContainerLayout } from './ContainerLayout';
export { Destructible } from './Destructible';
export { Dictionary } from './Dictionary';
export { Dimensions } from './Dimensions';
export { Options } from './Options';
export { Position } from './Position';
export { RawOptions } from './RawOptions';
export { RawOptionsCallbacks } from './RawOptionsCallbacks';
export { Resizable } from './Resizable';
export { SpinnerOptions } from './SpinnerOptions';
export { Styleable } from './Styleable';

View file

@ -1 +0,0 @@
export declare const allStringsOfArray1InArray2: (arr1: string[], arr2: string[]) => boolean;

View file

@ -1,9 +0,0 @@
/**
* Error checking method to restrict a prop to some allowed values
* @param {String} name of the option key in the options object
* @param {String|Number|Object|Function|Array|Boolean} value of the option
* @param {String} type of the property
* @param {Array} allowed accepted values for option
* @param {String} furtherHelpLink a link to docs for further help
*/
export declare const checkOptionForErrors: (name: string, value: string | number | boolean | object | Function | any[], type?: string, allowed?: RegExp | any[], furtherHelpLink?: string) => void;

View file

@ -1,4 +0,0 @@
/**
* Debounce of Underscore.js
*/
export declare const debounce: (func: Function, wait: number, immediate: boolean) => Function;

View file

@ -1,9 +0,0 @@
import FilterItem from '../FilterItem';
/**
* Simple method to check if two arrays of FilterItems
* are sorted in the same manner or not.
* @param {Array} arr1 the first array of FilterItems
* @param {Array} arr2 the second array of FilterItems
* @return {Boolean} equality
*/
export declare const filterItemArraysHaveSameSorting: (filterItemsA: FilterItem[], filterItemsB: FilterItem[]) => boolean;

View file

@ -1,2 +0,0 @@
import { Dictionary } from '../types/interfaces/Dictionary';
export declare function getDataAttributesOfHTMLNode(node: Element): Dictionary;

View file

@ -1,6 +0,0 @@
/**
* Wrapper around document.querySelector, will function as
* an identity function if an HTML element is passed in
* @param {HTMLElement|string} nodeOrSelector
*/
export declare const getHTMLElement: (selectorOrNode: string | HTMLElement) => HTMLElement;

View file

@ -1,12 +0,0 @@
export { allStringsOfArray1InArray2 } from './allStringsOfArray1InArray2';
export { checkOptionForErrors } from './checkOptionForErrors';
export { debounce } from './debounce';
export { filterItemArraysHaveSameSorting, } from './filterItemArraysHaveSameSorting';
export { getDataAttributesOfHTMLNode } from './getDataAttributesOfHTMLNode';
export { getHTMLElement } from './getHTMLElement';
export { intersection } from './intersection';
export { merge } from './merge';
export { noop } from './noop';
export { setStyles } from './setStyles';
export { shuffle } from './shuffle';
export { sortBy } from './sortBy';

View file

@ -1,4 +0,0 @@
/**
* A function get the intersection of two arrays. IE9+.
*/
export declare const intersection: (arr1: any[], arr2: any[]) => any[];

View file

@ -1,5 +0,0 @@
import { Dictionary } from '../types/interfaces/Dictionary';
/**
* Deep merge two objects.
*/
export declare function merge(target: Dictionary, ...sources: Dictionary[]): Dictionary;

View file

@ -1,4 +0,0 @@
/**
* A no-operation function
*/
export declare const noop: () => void;

View file

@ -1,7 +0,0 @@
/**
* Set inline styles on an HTML node
* @param {HTMLElement} node - HTML node
* @param {Object} styles - object with styles
* @returns {undefined}
*/
export declare function setStyles(node: Element, styles: any): void;

View file

@ -1,6 +0,0 @@
/**
* Fisher-Yates shuffle ES6 non-mutating implementation.
* @param {Array} array the array to shuffle
* @return {Array} shuffled array without mutating the initial array.
*/
export declare const shuffle: (array: any[]) => any[];

View file

@ -1,7 +0,0 @@
/**
* Simple non-mutating sorting function for arrays of objects by a property
* @param {Array} array to sort
* @param {Function} propFn fetches the property by which to sort
* @return {Array} a new sorted array
*/
export declare const sortBy: (array: any[], propFn: Function) => any[];

View file

@ -1,12 +0,0 @@
// Generated by dts-bundle v0.7.3-fork.1
// Dependencies for this module:
// ../../../../../@fullcalendar/core
declare module '@fullcalendar/bootstrap' {
import { Theme } from '@fullcalendar/core';
export class BootstrapTheme extends Theme {
}
const _default: import("@fullcalendar/core").PluginDef;
export default _default;
}

View file

@ -1,316 +0,0 @@
// Generated by dts-bundle v0.7.3-fork.1
// Dependencies for this module:
// ../../../../../@fullcalendar/core
declare module '@fullcalendar/daygrid' {
export { default as SimpleDayGrid, DayGridSlicer } from '@fullcalendar/daygrid/SimpleDayGrid';
export { default as DayGrid, DayGridSeg } from '@fullcalendar/daygrid/DayGrid';
export { default as AbstractDayGridView } from '@fullcalendar/daygrid/AbstractDayGridView';
export { default as DayGridView, buildDayTable as buildBasicDayTable } from '@fullcalendar/daygrid/DayGridView';
export { default as DayBgRow } from '@fullcalendar/daygrid/DayBgRow';
const _default: import("@fullcalendar/core").PluginDef;
export default _default;
}
declare module '@fullcalendar/daygrid/SimpleDayGrid' {
import { DateProfile, EventStore, EventUiHash, DateSpan, EventInteractionState, DayTable, Duration, DateComponent, DateRange, Slicer, Hit, ComponentContext } from '@fullcalendar/core';
import { default as DayGrid, DayGridSeg } from '@fullcalendar/daygrid/DayGrid';
export interface SimpleDayGridProps {
dateProfile: DateProfile | null;
dayTable: DayTable;
nextDayThreshold: Duration;
businessHours: EventStore;
eventStore: EventStore;
eventUiBases: EventUiHash;
dateSelection: DateSpan | null;
eventSelection: string;
eventDrag: EventInteractionState | null;
eventResize: EventInteractionState | null;
isRigid: boolean;
}
export { SimpleDayGrid as default, SimpleDayGrid };
class SimpleDayGrid extends DateComponent<SimpleDayGridProps> {
dayGrid: DayGrid;
constructor(dayGrid: DayGrid);
firstContext(context: ComponentContext): void;
destroy(): void;
render(props: SimpleDayGridProps, context: ComponentContext): void;
buildPositionCaches(): void;
queryHit(positionLeft: number, positionTop: number): Hit;
}
export class DayGridSlicer extends Slicer<DayGridSeg, [DayTable]> {
sliceRange(dateRange: DateRange, dayTable: DayTable): DayGridSeg[];
}
}
declare module '@fullcalendar/daygrid/DayGrid' {
import { PositionCache, DateMarker, DateComponent, EventSegUiInteractionState, Seg, DateProfile, ComponentContext } from '@fullcalendar/core';
import Popover from '@fullcalendar/daygrid/Popover';
import DayGridEventRenderer from '@fullcalendar/daygrid/DayGridEventRenderer';
import DayTile from '@fullcalendar/daygrid/DayTile';
export interface RenderProps {
renderNumberIntroHtml: (row: number, dayGrid: DayGrid) => string;
renderBgIntroHtml: () => string;
renderIntroHtml: () => string;
colWeekNumbersVisible: boolean;
cellWeekNumbersVisible: boolean;
}
export interface DayGridSeg extends Seg {
row: number;
firstCol: number;
lastCol: number;
}
export interface DayGridCell {
date: DateMarker;
htmlAttrs?: string;
}
export interface DayGridProps {
dateProfile: DateProfile;
cells: DayGridCell[][];
businessHourSegs: DayGridSeg[];
bgEventSegs: DayGridSeg[];
fgEventSegs: DayGridSeg[];
dateSelectionSegs: DayGridSeg[];
eventSelection: string;
eventDrag: EventSegUiInteractionState | null;
eventResize: EventSegUiInteractionState | null;
isRigid: boolean;
}
export { DayGrid as default, DayGrid };
class DayGrid extends DateComponent<DayGridProps> {
eventRenderer: DayGridEventRenderer;
renderProps: RenderProps;
rowCnt: number;
colCnt: number;
bottomCoordPadding: number;
rowEls: HTMLElement[];
cellEls: HTMLElement[];
isCellSizesDirty: boolean;
rowPositions: PositionCache;
colPositions: PositionCache;
segPopover: Popover;
segPopoverTile: DayTile;
constructor(el: any, renderProps: RenderProps);
render(props: DayGridProps, context: ComponentContext): void;
destroy(): void;
getCellRange(row: any, col: any): {
start: Date;
end: Date;
};
updateSegPopoverTile(date?: any, segs?: any): void;
_renderCells(cells: DayGridCell[][], isRigid: boolean): void;
_unrenderCells(): void;
renderDayRowHtml(row: any, isRigid: any): string;
getIsNumbersVisible(): boolean;
getIsDayNumbersVisible(): boolean;
renderNumberTrHtml(row: number): string;
renderNumberCellsHtml(row: any): string;
renderNumberCellHtml(date: any): string;
updateSize(isResize: boolean): void;
buildPositionCaches(): void;
buildColPositions(): void;
buildRowPositions(): void;
positionToHit(leftPosition: any, topPosition: any): {
row: any;
col: any;
dateSpan: {
range: {
start: Date;
end: Date;
};
allDay: boolean;
};
dayEl: HTMLElement;
relativeRect: {
left: any;
right: any;
top: any;
bottom: any;
};
};
getCellEl(row: any, col: any): HTMLElement;
_renderEventDrag(state: EventSegUiInteractionState): void;
_unrenderEventDrag(state: EventSegUiInteractionState): void;
_renderEventResize(state: EventSegUiInteractionState): void;
_unrenderEventResize(state: EventSegUiInteractionState): void;
removeSegPopover(): void;
limitRows(levelLimit: any): void;
computeRowLevelLimit(row: any): (number | false);
limitRow(row: any, levelLimit: any): void;
unlimitRow(row: any): void;
renderMoreLink(row: any, col: any, hiddenSegs: any): HTMLElement;
showSegPopover(row: any, col: any, moreLink: HTMLElement, segs: any): void;
resliceDaySegs(segs: any, dayDate: any): any[];
getMoreLinkText(num: any): any;
getCellSegs(row: any, col: any, startLevel?: any): any[];
}
}
declare module '@fullcalendar/daygrid/AbstractDayGridView' {
import { ScrollComponent, View, Duration, ComponentContext, ViewProps } from '@fullcalendar/core';
import DayGrid from '@fullcalendar/daygrid/DayGrid';
export { AbstractDayGridView as default, AbstractDayGridView };
abstract class AbstractDayGridView extends View {
scroller: ScrollComponent;
dayGrid: DayGrid;
colWeekNumbersVisible: boolean;
cellWeekNumbersVisible: boolean;
weekNumberWidth: number;
_processOptions(options: any): void;
render(props: ViewProps, context: ComponentContext): void;
destroy(): void;
_renderSkeleton(context: ComponentContext): void;
_unrenderSkeleton(): void;
renderSkeletonHtml(): string;
weekNumberStyleAttr(): string;
hasRigidRows(): boolean;
updateSize(isResize: boolean, viewHeight: number, isAuto: boolean): void;
updateBaseSize(isResize: boolean, viewHeight: number, isAuto: boolean): void;
computeScrollerHeight(viewHeight: any): number;
setGridHeight(height: any, isAuto: any): void;
computeDateScroll(duration: Duration): {
top: number;
};
queryDateScroll(): {
top: number;
};
applyDateScroll(scroll: any): void;
renderHeadIntroHtml: () => string;
renderDayGridNumberIntroHtml: (row: number, dayGrid: DayGrid) => string;
renderDayGridBgIntroHtml: () => string;
renderDayGridIntroHtml: () => string;
}
}
declare module '@fullcalendar/daygrid/DayGridView' {
import { DayHeader, ComponentContext, DateProfileGenerator, DateProfile, ViewProps, DayTable } from '@fullcalendar/core';
import AbstractDayGridView from '@fullcalendar/daygrid/AbstractDayGridView';
import SimpleDayGrid from '@fullcalendar/daygrid/SimpleDayGrid';
export { DayGridView as default, DayGridView };
class DayGridView extends AbstractDayGridView {
header: DayHeader;
simpleDayGrid: SimpleDayGrid;
dayTable: DayTable;
render(props: ViewProps, context: ComponentContext): void;
_renderSkeleton(context: ComponentContext): void;
_unrenderSkeleton(): void;
}
export function buildDayTable(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator): DayTable;
}
declare module '@fullcalendar/daygrid/DayBgRow' {
import { ComponentContext, DateMarker, DateProfile } from '@fullcalendar/core';
export interface DayBgCell {
date: DateMarker;
htmlAttrs?: string;
}
export interface DayBgRowProps {
cells: DayBgCell[];
dateProfile: DateProfile;
renderIntroHtml?: () => string;
}
export { DayBgRow as default, DayBgRow };
class DayBgRow {
context: ComponentContext;
constructor(context: ComponentContext);
renderHtml(props: DayBgRowProps): string;
}
}
declare module '@fullcalendar/daygrid/Popover' {
export interface PopoverOptions {
className?: string;
content?: (el: HTMLElement) => void;
parentEl: HTMLElement;
autoHide?: boolean;
top?: number;
left?: number;
right?: number;
viewportConstrain?: boolean;
}
export { Popover as default, Popover };
class Popover {
isHidden: boolean;
options: PopoverOptions;
el: HTMLElement;
margin: number;
constructor(options: PopoverOptions);
show(): void;
hide(): void;
render(): void;
documentMousedown: (ev: any) => void;
destroy(): void;
position(): void;
trigger(name: any): void;
}
}
declare module '@fullcalendar/daygrid/DayGridEventRenderer' {
import { Seg } from '@fullcalendar/core';
import DayGrid from '@fullcalendar/daygrid/DayGrid';
import SimpleDayGridEventRenderer from '@fullcalendar/daygrid/SimpleDayGridEventRenderer';
export { DayGridEventRenderer as default, DayGridEventRenderer };
class DayGridEventRenderer extends SimpleDayGridEventRenderer {
dayGrid: DayGrid;
rowStructs: any;
constructor(dayGrid: DayGrid);
attachSegs(segs: Seg[], mirrorInfo: any): void;
detachSegs(): void;
renderSegRows(segs: Seg[]): any[];
renderSegRow(row: any, rowSegs: any): {
row: any;
tbodyEl: HTMLTableSectionElement;
cellMatrix: any[];
segMatrix: any[];
segLevels: any[];
segs: any;
};
buildSegLevels(segs: Seg[]): any[];
groupSegRows(segs: Seg[]): any[];
computeDisplayEventEnd(): boolean;
}
}
declare module '@fullcalendar/daygrid/DayTile' {
import { DateComponent, Seg, Hit, DateMarker, ComponentContext, EventInstanceHash } from '@fullcalendar/core';
import SimpleDayGridEventRenderer from '@fullcalendar/daygrid/SimpleDayGridEventRenderer';
export interface DayTileProps {
date: DateMarker;
fgSegs: Seg[];
eventSelection: string;
eventDragInstances: EventInstanceHash;
eventResizeInstances: EventInstanceHash;
}
export { DayTile as default, DayTile };
class DayTile extends DateComponent<DayTileProps> {
segContainerEl: HTMLElement;
constructor(el: HTMLElement);
firstContext(context: ComponentContext): void;
render(props: DayTileProps, context: ComponentContext): void;
destroy(): void;
_renderFrame(date: DateMarker): void;
queryHit(positionLeft: number, positionTop: number, elWidth: number, elHeight: number): Hit | null;
}
export class DayTileEventRenderer extends SimpleDayGridEventRenderer {
dayTile: DayTile;
constructor(dayTile: any);
attachSegs(segs: Seg[]): void;
detachSegs(segs: Seg[]): void;
}
}
declare module '@fullcalendar/daygrid/SimpleDayGridEventRenderer' {
import { FgEventRenderer, Seg } from '@fullcalendar/core';
export { SimpleDayGridEventRenderer as default, SimpleDayGridEventRenderer };
abstract class SimpleDayGridEventRenderer extends FgEventRenderer {
renderSegHtml(seg: Seg, mirrorInfo: any): string;
computeEventTimeFormat(): {
hour: string;
minute: string;
omitZeroMinute: boolean;
meridiem: string;
};
computeDisplayEventEnd(): boolean;
}
}

View file

@ -1,323 +0,0 @@
// Generated by dts-bundle v0.7.3-fork.1
// Dependencies for this module:
// ../../../../../@fullcalendar/core
declare module '@fullcalendar/interaction' {
import FeaturefulElementDragging from '@fullcalendar/interaction/dnd/FeaturefulElementDragging';
const _default: import("@fullcalendar/core").PluginDef;
export default _default;
export { FeaturefulElementDragging };
export { default as PointerDragging } from '@fullcalendar/interaction/dnd/PointerDragging';
export { default as Draggable } from '@fullcalendar/interaction/interactions-external/ExternalDraggable';
export { default as ThirdPartyDraggable } from '@fullcalendar/interaction/interactions-external/ThirdPartyDraggable';
}
declare module '@fullcalendar/interaction/dnd/FeaturefulElementDragging' {
import { PointerDragEvent, ElementDragging } from '@fullcalendar/core';
import PointerDragging from '@fullcalendar/interaction/dnd/PointerDragging';
import ElementMirror from '@fullcalendar/interaction/dnd/ElementMirror';
import AutoScroller from '@fullcalendar/interaction/dnd/AutoScroller';
export { FeaturefulElementDragging as default, FeaturefulElementDragging };
class FeaturefulElementDragging extends ElementDragging {
pointer: PointerDragging;
mirror: ElementMirror;
autoScroller: AutoScroller;
delay: number | null;
minDistance: number;
touchScrollAllowed: boolean;
mirrorNeedsRevert: boolean;
isInteracting: boolean;
isDragging: boolean;
isDelayEnded: boolean;
isDistanceSurpassed: boolean;
delayTimeoutId: number | null;
constructor(containerEl: HTMLElement);
destroy(): void;
onPointerDown: (ev: PointerDragEvent) => void;
onPointerMove: (ev: PointerDragEvent) => void;
onPointerUp: (ev: PointerDragEvent) => void;
startDelay(ev: PointerDragEvent): void;
handleDelayEnd(ev: PointerDragEvent): void;
handleDistanceSurpassed(ev: PointerDragEvent): void;
tryStartDrag(ev: PointerDragEvent): void;
tryStopDrag(ev: PointerDragEvent): void;
stopDrag(ev: PointerDragEvent): void;
setIgnoreMove(bool: boolean): void;
setMirrorIsVisible(bool: boolean): void;
setMirrorNeedsRevert(bool: boolean): void;
setAutoScrollEnabled(bool: boolean): void;
}
}
declare module '@fullcalendar/interaction/dnd/PointerDragging' {
import { EmitterMixin, PointerDragEvent } from '@fullcalendar/core';
export { PointerDragging as default, PointerDragging };
class PointerDragging {
containerEl: EventTarget;
subjectEl: HTMLElement | null;
downEl: HTMLElement | null;
emitter: EmitterMixin;
selector: string;
handleSelector: string;
shouldIgnoreMove: boolean;
shouldWatchScroll: boolean;
isDragging: boolean;
isTouchDragging: boolean;
wasTouchScroll: boolean;
origPageX: number;
origPageY: number;
prevPageX: number;
prevPageY: number;
prevScrollX: number;
prevScrollY: number;
constructor(containerEl: EventTarget);
destroy(): void;
tryStart(ev: UIEvent): boolean;
cleanup(): void;
querySubjectEl(ev: UIEvent): HTMLElement;
handleMouseDown: (ev: MouseEvent) => void;
handleMouseMove: (ev: MouseEvent) => void;
handleMouseUp: (ev: MouseEvent) => void;
shouldIgnoreMouse(): number | boolean;
handleTouchStart: (ev: TouchEvent) => void;
handleTouchMove: (ev: TouchEvent) => void;
handleTouchEnd: (ev: TouchEvent) => void;
handleTouchScroll: () => void;
cancelTouchScroll(): void;
initScrollWatch(ev: PointerDragEvent): void;
recordCoords(ev: PointerDragEvent): void;
handleScroll: (ev: UIEvent) => void;
destroyScrollWatch(): void;
createEventFromMouse(ev: MouseEvent, isFirst?: boolean): PointerDragEvent;
createEventFromTouch(ev: TouchEvent, isFirst?: boolean): PointerDragEvent;
}
}
declare module '@fullcalendar/interaction/interactions-external/ExternalDraggable' {
import { PointerDragEvent } from '@fullcalendar/core';
import FeaturefulElementDragging from '@fullcalendar/interaction/dnd/FeaturefulElementDragging';
import { DragMetaGenerator } from '@fullcalendar/interaction/interactions-external/ExternalElementDragging';
export interface ExternalDraggableSettings {
eventData?: DragMetaGenerator;
itemSelector?: string;
minDistance?: number;
longPressDelay?: number;
appendTo?: HTMLElement;
}
export { ExternalDraggable as default, ExternalDraggable };
class ExternalDraggable {
dragging: FeaturefulElementDragging;
settings: ExternalDraggableSettings;
constructor(el: HTMLElement, settings?: ExternalDraggableSettings);
handlePointerDown: (ev: PointerDragEvent) => void;
handleDragStart: (ev: PointerDragEvent) => void;
destroy(): void;
}
}
declare module '@fullcalendar/interaction/interactions-external/ThirdPartyDraggable' {
import { DragMetaGenerator } from '@fullcalendar/interaction/interactions-external/ExternalElementDragging';
import InferredElementDragging from '@fullcalendar/interaction/interactions-external/InferredElementDragging';
export interface ThirdPartyDraggableSettings {
eventData?: DragMetaGenerator;
itemSelector?: string;
mirrorSelector?: string;
}
export { ThirdPartyDraggable as default, ThirdPartyDraggable };
class ThirdPartyDraggable {
dragging: InferredElementDragging;
constructor(containerOrSettings?: EventTarget | ThirdPartyDraggableSettings, settings?: ThirdPartyDraggableSettings);
destroy(): void;
}
}
declare module '@fullcalendar/interaction/dnd/ElementMirror' {
import { Rect } from '@fullcalendar/core';
export { ElementMirror as default, ElementMirror };
class ElementMirror {
isVisible: boolean;
origScreenX?: number;
origScreenY?: number;
deltaX?: number;
deltaY?: number;
sourceEl: HTMLElement | null;
mirrorEl: HTMLElement | null;
sourceElRect: Rect | null;
parentNode: HTMLElement;
zIndex: number;
revertDuration: number;
start(sourceEl: HTMLElement, pageX: number, pageY: number): void;
handleMove(pageX: number, pageY: number): void;
setIsVisible(bool: boolean): void;
stop(needsRevertAnimation: boolean, callback: () => void): void;
doRevertAnimation(callback: () => void, revertDuration: number): void;
cleanup(): void;
updateElPosition(): void;
getMirrorEl(): HTMLElement;
}
}
declare module '@fullcalendar/interaction/dnd/AutoScroller' {
import { ScrollGeomCache } from '@fullcalendar/interaction/scroll-geom-cache';
export { AutoScroller as default, AutoScroller };
class AutoScroller {
isEnabled: boolean;
scrollQuery: (Window | string)[];
edgeThreshold: number;
maxVelocity: number;
pointerScreenX: number | null;
pointerScreenY: number | null;
isAnimating: boolean;
scrollCaches: ScrollGeomCache[] | null;
msSinceRequest?: number;
everMovedUp: boolean;
everMovedDown: boolean;
everMovedLeft: boolean;
everMovedRight: boolean;
start(pageX: number, pageY: number): void;
handleMove(pageX: number, pageY: number): void;
stop(): void;
requestAnimation(now: number): void;
}
}
declare module '@fullcalendar/interaction/interactions-external/ExternalElementDragging' {
import { Hit, PointerDragEvent, EventTuple, DatePointApi, Calendar, EventInteractionState, DragMetaInput, DragMeta, View, ElementDragging } from '@fullcalendar/core';
import HitDragging from '@fullcalendar/interaction/interactions/HitDragging';
export type DragMetaGenerator = DragMetaInput | ((el: HTMLElement) => DragMetaInput);
export interface ExternalDropApi extends DatePointApi {
draggedEl: HTMLElement;
jsEvent: UIEvent;
view: View;
}
export { ExternalElementDragging as default, ExternalElementDragging };
class ExternalElementDragging {
hitDragging: HitDragging;
receivingCalendar: Calendar | null;
droppableEvent: EventTuple | null;
suppliedDragMeta: DragMetaGenerator | null;
dragMeta: DragMeta | null;
constructor(dragging: ElementDragging, suppliedDragMeta?: DragMetaGenerator);
handleDragStart: (ev: PointerDragEvent) => void;
buildDragMeta(subjectEl: HTMLElement): DragMeta;
handleHitUpdate: (hit: Hit, isFinal: boolean, ev: PointerDragEvent) => void;
handleDragEnd: (pev: PointerDragEvent) => void;
displayDrag(nextCalendar: Calendar | null, state: EventInteractionState): void;
clearDrag(): void;
canDropElOnCalendar(el: HTMLElement, receivingCalendar: Calendar): boolean;
}
}
declare module '@fullcalendar/interaction/interactions-external/InferredElementDragging' {
import { PointerDragEvent, ElementDragging } from '@fullcalendar/core';
import PointerDragging from '@fullcalendar/interaction/dnd/PointerDragging';
export { InferredElementDragging as default, InferredElementDragging };
class InferredElementDragging extends ElementDragging {
pointer: PointerDragging;
shouldIgnoreMove: boolean;
mirrorSelector: string;
currentMirrorEl: HTMLElement | null;
constructor(containerEl: HTMLElement);
destroy(): void;
handlePointerDown: (ev: PointerDragEvent) => void;
handlePointerMove: (ev: PointerDragEvent) => void;
handlePointerUp: (ev: PointerDragEvent) => void;
setIgnoreMove(bool: boolean): void;
setMirrorIsVisible(bool: boolean): void;
}
}
declare module '@fullcalendar/interaction/scroll-geom-cache' {
import { Rect, ScrollController } from '@fullcalendar/core';
export abstract class ScrollGeomCache extends ScrollController {
clientRect: Rect;
origScrollTop: number;
origScrollLeft: number;
protected scrollController: ScrollController;
protected doesListening: boolean;
protected scrollTop: number;
protected scrollLeft: number;
protected scrollWidth: number;
protected scrollHeight: number;
protected clientWidth: number;
protected clientHeight: number;
constructor(scrollController: ScrollController, doesListening: boolean);
abstract getEventTarget(): EventTarget;
abstract computeClientRect(): Rect;
destroy(): void;
handleScroll: () => void;
getScrollTop(): number;
getScrollLeft(): number;
setScrollTop(top: number): void;
setScrollLeft(top: number): void;
getClientWidth(): number;
getClientHeight(): number;
getScrollWidth(): number;
getScrollHeight(): number;
handleScrollChange(): void;
}
export class ElementScrollGeomCache extends ScrollGeomCache {
constructor(el: HTMLElement, doesListening: boolean);
getEventTarget(): EventTarget;
computeClientRect(): {
left: number;
right: number;
top: number;
bottom: number;
};
}
export class WindowScrollGeomCache extends ScrollGeomCache {
constructor(doesListening: boolean);
getEventTarget(): EventTarget;
computeClientRect(): Rect;
handleScrollChange(): void;
}
}
declare module '@fullcalendar/interaction/interactions/HitDragging' {
import { EmitterMixin, PointerDragEvent, Point, Hit, InteractionSettingsStore, ElementDragging } from '@fullcalendar/core';
import OffsetTracker from '@fullcalendar/interaction/OffsetTracker';
export { HitDragging as default, HitDragging };
class HitDragging {
droppableStore: InteractionSettingsStore;
dragging: ElementDragging;
emitter: EmitterMixin;
useSubjectCenter: boolean;
requireInitial: boolean;
offsetTrackers: {
[componentUid: string]: OffsetTracker;
};
initialHit: Hit | null;
movingHit: Hit | null;
finalHit: Hit | null;
coordAdjust?: Point;
constructor(dragging: ElementDragging, droppableStore: InteractionSettingsStore);
handlePointerDown: (ev: PointerDragEvent) => void;
processFirstCoord(ev: PointerDragEvent): void;
handleDragStart: (ev: PointerDragEvent) => void;
handleDragMove: (ev: PointerDragEvent) => void;
handlePointerUp: (ev: PointerDragEvent) => void;
handleDragEnd: (ev: PointerDragEvent) => void;
handleMove(ev: PointerDragEvent, forceHandle?: boolean): void;
prepareHits(): void;
releaseHits(): void;
queryHitForOffset(offsetLeft: number, offsetTop: number): Hit | null;
}
export function isHitsEqual(hit0: Hit | null, hit1: Hit | null): boolean;
}
declare module '@fullcalendar/interaction/OffsetTracker' {
import { Rect } from '@fullcalendar/core';
import { ElementScrollGeomCache } from '@fullcalendar/interaction/scroll-geom-cache';
export { OffsetTracker as default, OffsetTracker };
class OffsetTracker {
scrollCaches: ElementScrollGeomCache[];
origRect: Rect;
constructor(el: HTMLElement);
destroy(): void;
computeLeft(): number;
computeTop(): number;
isWithinClipping(pageX: number, pageY: number): boolean;
}
}

View file

@ -1,224 +0,0 @@
// Generated by dts-bundle v0.7.3-fork.1
// Dependencies for this module:
// ../../../../../@fullcalendar/core
// ../../../../../@fullcalendar/daygrid
declare module '@fullcalendar/timegrid' {
import AbstractTimeGridView from '@fullcalendar/timegrid/AbstractTimeGridView';
import TimeGridView, { buildDayTable } from '@fullcalendar/timegrid/TimeGridView';
import { TimeGridSeg } from '@fullcalendar/timegrid/TimeGrid';
import { TimeGridSlicer, buildDayRanges } from '@fullcalendar/timegrid/SimpleTimeGrid';
export { TimeGridView, AbstractTimeGridView, buildDayTable, buildDayRanges, TimeGridSlicer, TimeGridSeg };
export { default as TimeGrid } from '@fullcalendar/timegrid/TimeGrid';
const _default: import("@fullcalendar/core").PluginDef;
export default _default;
}
declare module '@fullcalendar/timegrid/AbstractTimeGridView' {
import { ScrollComponent, View, ComponentContext, Duration, ViewProps } from '@fullcalendar/core';
import { DayGrid } from '@fullcalendar/daygrid';
import TimeGrid from '@fullcalendar/timegrid/TimeGrid';
import AllDaySplitter from '@fullcalendar/timegrid/AllDaySplitter';
export { AbstractTimeGridView as default, AbstractTimeGridView };
abstract class AbstractTimeGridView extends View {
timeGrid: TimeGrid;
dayGrid: DayGrid;
scroller: ScrollComponent;
axisWidth: any;
protected splitter: AllDaySplitter;
render(props: ViewProps, context: ComponentContext): void;
destroy(): void;
_renderSkeleton(context: ComponentContext): void;
_unrenderSkeleton(): void;
renderSkeletonHtml(): string;
getNowIndicatorUnit(): string;
unrenderNowIndicator(): void;
updateSize(isResize: boolean, viewHeight: number, isAuto: boolean): void;
updateBaseSize(isResize: any, viewHeight: any, isAuto: any): void;
computeScrollerHeight(viewHeight: any): number;
computeDateScroll(duration: Duration): {
top: any;
};
queryDateScroll(): {
top: number;
};
applyDateScroll(scroll: any): void;
renderHeadIntroHtml: () => string;
axisStyleAttr(): string;
renderTimeGridBgIntroHtml: () => string;
renderTimeGridIntroHtml: () => string;
renderDayGridBgIntroHtml: () => string;
renderDayGridIntroHtml: () => string;
}
}
declare module '@fullcalendar/timegrid/TimeGridView' {
import { DateProfileGenerator, DateProfile, ComponentContext, DayHeader, DayTable, ViewProps } from '@fullcalendar/core';
import { SimpleDayGrid } from '@fullcalendar/daygrid';
import SimpleTimeGrid from '@fullcalendar/timegrid/SimpleTimeGrid';
import AbstractTimeGridView from '@fullcalendar/timegrid/AbstractTimeGridView';
export { TimeGridView as default, TimeGridView };
class TimeGridView extends AbstractTimeGridView {
header: DayHeader;
simpleDayGrid: SimpleDayGrid;
simpleTimeGrid: SimpleTimeGrid;
render(props: ViewProps, context: ComponentContext): void;
_renderSkeleton(context: ComponentContext): void;
_unrenderSkeleton(): void;
renderNowIndicator(date: any): void;
}
export function buildDayTable(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator): DayTable;
}
declare module '@fullcalendar/timegrid/TimeGrid' {
import { PositionCache, Duration, DateMarker, DateFormatter, ComponentContext, DateComponent, Seg, EventSegUiInteractionState, DateProfile, Theme } from '@fullcalendar/core';
export interface RenderProps {
renderBgIntroHtml: () => string;
renderIntroHtml: () => string;
}
export interface TimeGridSeg extends Seg {
col: number;
start: DateMarker;
end: DateMarker;
}
export interface TimeGridCell {
date: DateMarker;
htmlAttrs?: string;
}
export interface TimeGridProps {
dateProfile: DateProfile;
cells: TimeGridCell[];
businessHourSegs: TimeGridSeg[];
bgEventSegs: TimeGridSeg[];
fgEventSegs: TimeGridSeg[];
dateSelectionSegs: TimeGridSeg[];
eventSelection: string;
eventDrag: EventSegUiInteractionState | null;
eventResize: EventSegUiInteractionState | null;
}
export { TimeGrid as default, TimeGrid };
class TimeGrid extends DateComponent<TimeGridProps> {
renderProps: RenderProps;
slotDuration: Duration;
snapDuration: Duration;
snapsPerSlot: any;
labelFormat: DateFormatter;
labelInterval: Duration;
colCnt: number;
colEls: HTMLElement[];
slatContainerEl: HTMLElement;
slatEls: HTMLElement[];
nowIndicatorEls: HTMLElement[];
colPositions: PositionCache;
slatPositions: PositionCache;
isSlatSizesDirty: boolean;
isColSizesDirty: boolean;
rootBgContainerEl: HTMLElement;
bottomRuleEl: HTMLElement;
contentSkeletonEl: HTMLElement;
colContainerEls: HTMLElement[];
fgContainerEls: HTMLElement[];
bgContainerEls: HTMLElement[];
mirrorContainerEls: HTMLElement[];
highlightContainerEls: HTMLElement[];
businessContainerEls: HTMLElement[];
constructor(el: HTMLElement, renderProps: RenderProps);
_processOptions(options: any): void;
computeLabelInterval(slotDuration: any): any;
render(props: TimeGridProps, context: ComponentContext): void;
destroy(): void;
updateSize(isResize: boolean): void;
_renderSkeleton(theme: Theme): void;
_renderSlats(dateProfile: DateProfile): void;
renderSlatRowHtml(dateProfile: DateProfile): string;
_renderColumns(cells: TimeGridCell[], dateProfile: DateProfile): void;
_unrenderColumns(): void;
renderContentSkeleton(): void;
unrenderContentSkeleton(): void;
groupSegsByCol(segs: any): any[];
attachSegsByCol(segsByCol: any, containerEls: HTMLElement[]): void;
getNowIndicatorUnit(): string;
renderNowIndicator(segs: TimeGridSeg[], date: any): void;
unrenderNowIndicator(): void;
getTotalSlatHeight(): number;
computeDateTop(when: DateMarker, startOfDayDate?: DateMarker): any;
computeTimeTop(duration: Duration): any;
computeSegVerticals(segs: any): void;
assignSegVerticals(segs: any): void;
generateSegVerticalCss(seg: any): {
top: any;
bottom: number;
};
buildPositionCaches(): void;
buildColPositions(): void;
buildSlatPositions(): void;
positionToHit(positionLeft: any, positionTop: any): {
col: any;
dateSpan: {
range: {
start: Date;
end: Date;
};
allDay: boolean;
};
dayEl: HTMLElement;
relativeRect: {
left: any;
right: any;
top: any;
bottom: any;
};
};
_renderEventDrag(state: EventSegUiInteractionState): void;
_unrenderEventDrag(state: EventSegUiInteractionState): void;
_renderEventResize(state: EventSegUiInteractionState): void;
_unrenderEventResize(state: EventSegUiInteractionState): void;
_renderDateSelection(segs: Seg[]): void;
_unrenderDateSelection(segs: Seg[]): void;
}
}
declare module '@fullcalendar/timegrid/SimpleTimeGrid' {
import { DateComponent, DateProfile, EventStore, EventUiHash, EventInteractionState, DateSpan, DateRange, DayTable, DateEnv, DateMarker, Slicer, Hit, ComponentContext } from '@fullcalendar/core';
import TimeGrid, { TimeGridSeg } from '@fullcalendar/timegrid/TimeGrid';
export interface SimpleTimeGridProps {
dateProfile: DateProfile | null;
dayTable: DayTable;
businessHours: EventStore;
eventStore: EventStore;
eventUiBases: EventUiHash;
dateSelection: DateSpan | null;
eventSelection: string;
eventDrag: EventInteractionState | null;
eventResize: EventInteractionState | null;
}
export { SimpleTimeGrid as default, SimpleTimeGrid };
class SimpleTimeGrid extends DateComponent<SimpleTimeGridProps> {
timeGrid: TimeGrid;
constructor(timeGrid: TimeGrid);
firstContext(context: ComponentContext): void;
destroy(): void;
render(props: SimpleTimeGridProps, context: ComponentContext): void;
renderNowIndicator(date: DateMarker): void;
buildPositionCaches(): void;
queryHit(positionLeft: number, positionTop: number): Hit;
}
export function buildDayRanges(dayTable: DayTable, dateProfile: DateProfile, dateEnv: DateEnv): DateRange[];
export class TimeGridSlicer extends Slicer<TimeGridSeg, [DateRange[]]> {
sliceRange(range: DateRange, dayRanges: DateRange[]): TimeGridSeg[];
}
}
declare module '@fullcalendar/timegrid/AllDaySplitter' {
import { Splitter, EventDef, DateSpan } from '@fullcalendar/core';
export { AllDaySplitter as default, AllDaySplitter };
class AllDaySplitter extends Splitter {
getKeyInfo(): {
allDay: {};
timed: {};
};
getKeysForDateSpan(dateSpan: DateSpan): string[];
getKeysForEventDef(eventDef: EventDef): string[];
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,9 @@
## The MIT License
Copyright © 2019 by Denis Ineshin (http://ionden.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,145 +0,0 @@
@import (reference) "_mixins";
.irs {
.pos-r();
-webkit-touch-callout: none;
.no-click();
font-size: 12px;
font-family: Arial, sans-serif;
&-line {
.pos-r();
overflow: hidden;
outline: none !important;
}
&-bar {
.pos-a();
left: 0;
width: 0;
}
&-shadow {
position: absolute;
display: none;
left: 0;
width: 0;
}
&-handle {
.pos-a();
box-sizing: border-box;
cursor: default;
z-index: 1;
&.single,
&.from,
&.to {}
&.type_last {
z-index: 2;
}
}
&-min,
&-max {
.pos-a();
cursor: default;
}
&-min {
left: 0;
}
&-max {
right: 0;
}
&-from,
&-to,
&-single {
.pos-a();
top: 0;
left: 0;
cursor: default;
white-space: nowrap;
}
&-grid {
position: absolute;
display: none;
bottom: 0;
left: 0;
width: 100%;
height: 20px;
.irs-with-grid & {
display: block;
}
&-pol {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 8px;
background: #000;
&.small {
height: 4px;
}
}
&-text {
position: absolute;
bottom: 0;
left: 0;
white-space: nowrap;
text-align: center;
font-size: 9px;
line-height: 9px;
padding: 0 3px;
color: #000;
}
}
&-disable-mask {
.pos-a();
top: 0;
left: -1%;
width: 102%;
height: 100%;
cursor: default;
background: rgba(0,0,0,0.0);
z-index: 2;
.lt-ie9 & {
background: #000;
filter: alpha(opacity=0);
cursor: not-allowed;
}
}
&-disabled {
opacity: 0.4;
}
&-hidden-input {
position: absolute !important;
display: block !important;
top: 0 !important;
left: 0 !important;
width: 0 !important;
height: 0 !important;
font-size: 0 !important;
line-height: 0 !important;
padding: 0 !important;
margin: 0 !important;
overflow: hidden;
outline: none !important;
z-index: -9999 !important;
background: none !important;
border-style: solid !important;
border-color: transparent !important;
}
}

View file

@ -1,17 +0,0 @@
.no-click () {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.pos-r () {
position: relative;
display: block;
}
.pos-a () {
position: absolute;
display: block;
}

View file

@ -1,10 +0,0 @@
// Base styles
@import "_base";
// Skins styles
@import "skins/flat";
@import "skins/big";
@import "skins/modern";
@import "skins/sharp";
@import "skins/round";
@import "skins/square";

View file

@ -1,109 +0,0 @@
.irs--big {
@name: irs;
@top: 33px;
@bottom: 16px;
@line_height: 12px;
@handle_width: 30px;
@handle_height: 30px;
@custom_radius: 3px;
@line_color_1: white;
@line_color_2: #ccc;
@line_color_3: #ddd;
@bar_color: #428bca;
@handle_color_1: #cbcfd5;
@handle_color_2: #B4B9BE;
@handle_color_3: white;
@handle_color_4: #919BA5;
@minmax_text_color: white;
@minmax_bg_color: #9f9f9f;
@label_color_1: #428bca;
@label_color_2: white;
@grid_color_1: #428bca;
height: 55px;
&.irs-with-grid {
height: 70px;
}
.@{name}-line {
top: @top;
height: @line_height;
background-color: @line_color_1;
background: linear-gradient(to bottom, @line_color_3 -50%, @line_color_1 150%);
border: 1px solid @line_color_2;
border-radius: @line_height;
}
.@{name}-bar {
top: @top;
height: @line_height;
background-color: lighten(@bar_color, 20%);
border: 1px solid @bar_color;
background: linear-gradient(to bottom, lighten(@bar_color, 70%) 0%, @bar_color 30%, lighten(@bar_color, 30%) 100%);
box-shadow: inset 0 0 1px 1px rgba(255,255,255,0.5);
&--single {
border-radius: @line_height 0 0 @line_height;
}
}
.@{name}-shadow {
height: 1px;
bottom: @bottom;
background-color: fade(@bar_color, 50%);
}
.@{name}-handle {
top: 25px;
width: @handle_width;
height: @handle_height;
border: 1px solid rgba(0,0,0,0.3);
background-color: @handle_color_1;
background: linear-gradient(to bottom, @handle_color_3 0%, @handle_color_2 30%, @handle_color_3 100%);
box-shadow: 1px 1px 2px rgba(0,0,0,0.2), inset 0 0 3px 1px @handle_color_3;
border-radius: @handle_width;
&.state_hover,
&:hover {
border-color: rgba(0,0,0,0.45);
background-color: darken(@handle_color_1, 20%);
background: linear-gradient(to bottom, @handle_color_3 0%, @handle_color_4 30%, @handle_color_3 100%);
}
}
.@{name}-min,
.@{name}-max {
top: 0;
padding: 1px 5px;
color: @minmax_text_color;
text-shadow: none;
background-color: @minmax_bg_color;
border-radius: @custom_radius;
}
.@{name}-from,
.@{name}-to,
.@{name}-single {
color: @label_color_2;
text-shadow: none;
padding: 1px 5px;
background-color: @label_color_1;
background: linear-gradient(to bottom, @label_color_1 0%, darken(@label_color_1, 10%) 100%);
border-radius: @custom_radius;
}
.@{name}-grid {
&-pol {
background-color: @grid_color_1;
}
&-text {
color: @grid_color_1;
}
}
}

View file

@ -1,125 +0,0 @@
.irs--flat {
@name: irs;
@top: 25px;
@bottom: 16px;
@line_height: 12px;
@handle_width: 16px;
@handle_height: 18px;
@custom_radius: 4px;
@line_color: #e1e4e9;
@bar_color: #ed5565;
@handle_color_1: #da4453;
@handle_color_2: #a43540;
@minmax_text_color: #999;
@minmax_bg_color: #e1e4e9;
@label_color_1: #ed5565;
@label_color_2: white;
@grid_color_1: #e1e4e9;
@grid_color_2: #999;
height: 40px;
&.irs-with-grid {
height: 60px;
}
.@{name}-line {
top: @top;
height: @line_height;
background-color: @line_color;
border-radius: @custom_radius;
}
.@{name}-bar {
top: @top;
height: @line_height;
background-color: @bar_color;
&--single {
border-radius: @custom_radius 0 0 @custom_radius;
}
}
.@{name}-shadow {
height: 1px;
bottom: @bottom;
background-color: @line_color;
}
.@{name}-handle {
top: 22px;
width: @handle_width;
height: @handle_height;
background-color: transparent;
& > i:first-child {
position: absolute;
display: block;
top: 0;
left: 50%;
width: 2px;
height: 100%;
margin-left: -1px;
background-color: @handle_color_1;
}
&.state_hover,
&:hover {
& > i:first-child {
background-color: @handle_color_2;
}
}
}
.@{name}-min,
.@{name}-max {
top: 0;
padding: 1px 3px;
color: @minmax_text_color;
font-size: 10px;
line-height: 1.333;
text-shadow: none;
background-color: @minmax_bg_color;
border-radius: @custom_radius;
}
.@{name}-from,
.@{name}-to,
.@{name}-single {
color: @label_color_2;
font-size: 10px;
line-height: 1.333;
text-shadow: none;
padding: 1px 5px;
background-color: @label_color_1;
border-radius: @custom_radius;
&:before {
position: absolute;
display: block;
content: "";
bottom: -6px;
left: 50%;
width: 0;
height: 0;
margin-left: -3px;
overflow: hidden;
border: 3px solid transparent;
border-top-color: @label_color_1;
}
}
.@{name}-grid {
&-pol {
background-color: @grid_color_1;
}
&-text {
color: @grid_color_2;
}
}
}

View file

@ -1,165 +0,0 @@
.irs--modern {
@name: irs;
@top: 25px;
@bottom: 21px;
@line_height: 5px;
@handle_width: 12px;
@handle_height: 13px;
@line_color: #d1d6e0;
@bar_color: #20b426;
@handle_color_1: #e9e6e6;
@handle_color_2: white;
@handle_color_3: black;
@minmax_text_color: white;
@minmax_bg_color: #d1d6e0;
@label_color_1: #20b426;
@label_color_2: white;
@grid_color_1: #dedede;
@grid_color_2: silver;
height: 55px;
&.irs-with-grid {
height: 55px;
}
.@{name}-line {
top: @top;
height: @line_height;
background-color: @line_color;
background: linear-gradient(to bottom, lighten(@line_color, 5%) 0%, @line_color 100%);
border: 1px solid darken(@line_color, 15%);
border-bottom-width: 0;
border-radius: @line_height;
}
.@{name}-bar {
top: @top;
height: @line_height;
background: @bar_color;
background: linear-gradient(to bottom, @bar_color 0%, darken(@bar_color, 10%) 100%);
&--single {
border-radius: @line_height 0 0 @line_height;
}
}
.@{name}-shadow {
height: 1px;
bottom: @bottom;
background-color: fade(@line_color, 50%);
}
.@{name}-handle {
top: 37px;
width: @handle_width;
height: @handle_height;
border: 1px solid darken(@line_color, 15%);
border-top-width: 0;
box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
border-radius: 0 0 3px 3px;
& > i:nth-child(1) {
position: absolute;
display: block;
top: -4px; left: 1px;
width: (@handle_width - 6px);
height: (@handle_width - 6px);
border: 1px solid darken(@line_color, 15%);
background: @handle_color_2;
transform: rotate(45deg);
}
& > i:nth-child(2) {
position: absolute;
display: block;
box-sizing: border-box;
top: 0; left: 0;
width: (@handle_width - 2);
height: (@handle_height - 1);
background: @handle_color_1;
background: linear-gradient(to bottom, @handle_color_2 0%, @handle_color_1 100%);
border-radius: 0 0 3px 3px;
}
& > i:nth-child(3) {
position: absolute;
display: block;
box-sizing: border-box;
top: 3px; left: 3px;
width: 4px; height: 5px;
border-left: 1px solid darken(@line_color, 15%);
border-right: 1px solid darken(@line_color, 15%);
}
&.state_hover,
&:hover {
border-color: darken(@line_color, 30%);
background: #c3c7cd;
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(145,155,165,1) 30%,rgba(255,255,255,1) 100%);
& > i:nth-child(1) {
border-color: darken(@line_color, 30%);
}
& > i:nth-child(3) {
border-color: darken(@line_color, 50%);
}
}
}
.@{name}-min,
.@{name}-max {
top: 0;
font-size: 10px;
line-height: 1.333;
text-shadow: none;
padding: 1px 5px;
color: @minmax_text_color;
background-color: @minmax_bg_color;
border-radius: @line_height;
}
.@{name}-from,
.@{name}-to,
.@{name}-single {
font-size: 10px;
line-height: 1.333;
text-shadow: none;
padding: 1px 5px;
background-color: @label_color_1;
color: @label_color_2;
border-radius: @line_height;
&:before {
position: absolute;
display: block;
content: "";
bottom: -6px;
left: 50%;
width: 0;
height: 0;
margin-left: -3px;
overflow: hidden;
border: 3px solid transparent;
border-top-color: @label_color_1;
}
}
.@{name}-grid {
height: 25px;
&-pol {
background-color: @grid_color_1;
}
&-text {
color: @grid_color_2;
font-size: 13px;
}
}
}

View file

@ -1,120 +0,0 @@
// Skin design by Veaceslav Grimalschi
// https://github.com/grimalschi
.irs--round {
@name: irs;
@top: 36px;
@bottom: 21px;
@line_height: 4px;
@handle_width: 24px;
@handle_height: 24px;
@line_color: #dee4ec;
@bar_color: #006cfa;
@handle_color_1: #006cfa;
@handle_color_2: white;
@handle_color_3: #f0f6ff;
@minmax_text_color: #333;
@minmax_bg_color: rgba(0,0,0,0.1);
@label_color_1: #006cfa;
@label_color_2: white;
@grid_color_1: #dedede;
@grid_color_2: silver;
height: 50px;
&.irs-with-grid {
height: 65px;
}
.@{name}-line {
top: @top;
height: @line_height;
background-color: @line_color;
border-radius: @line_height;
}
.@{name}-bar {
top: @top;
height: @line_height;
background-color: @bar_color;
&--single {
border-radius: @line_height 0 0 @line_height;
}
}
.@{name}-shadow {
height: 4px;
bottom: @bottom;
background-color: fade(@line_color, 50%);
}
.@{name}-handle {
top: 26px;
width: @handle_width;
height: @handle_height;
border: 4px solid @handle_color_1;
background-color: @handle_color_2;
border-radius: @handle_width;
box-shadow: 0 1px 3px rgba(0, 0, 255, 0.3);
&.state_hover,
&:hover {
background-color: @handle_color_3;
}
}
.@{name}-min,
.@{name}-max {
color: @minmax_text_color;
font-size: 14px;
line-height: 1;
top: 0;
padding: 3px 5px;
background-color: @minmax_bg_color;
border-radius: @line_height;
}
.@{name}-from,
.@{name}-to,
.@{name}-single {
font-size: 14px;
line-height: 1;
text-shadow: none;
padding: 3px 5px;
background-color: @label_color_1;
color: @label_color_2;
border-radius: @line_height;
&:before {
position: absolute;
display: block;
content: "";
bottom: -6px;
left: 50%;
width: 0;
height: 0;
margin-left: -3px;
overflow: hidden;
border: 3px solid transparent;
border-top-color: @label_color_1;
}
}
.@{name}-grid {
height: 25px;
&-pol {
background-color: @grid_color_1;
}
&-text {
color: @grid_color_2;
font-size: 13px;
}
}
}

View file

@ -1,132 +0,0 @@
.irs--sharp {
@name: irs;
@top: 30px;
@bottom: 21px;
@line_height: 2px;
@handle_width: 10px;
@handle_height: 10px;
@line_color: black;
@bar_color: #ee22fa;
@handle_color_1: darken(#ee22fa, 20%);
@handle_color_2: white;
@handle_color_3: black;
@minmax_text_color: white;
@minmax_bg_color: darken(#ee22fa, 20%);
@label_color_1: darken(#ee22fa, 20%);
@label_color_2: white;
@grid_color_1: #dedede;
@grid_color_2: silver;
height: 50px;
font-size: 12px;
line-height: 1;
&.irs-with-grid {
height: 57px;
}
.@{name}-line {
top: @top;
height: @line_height;
background-color: @line_color;
border-radius: @line_height;
}
.@{name}-bar {
top: @top;
height: @line_height;
background-color: @bar_color;
&--single {
border-radius: @line_height 0 0 @line_height;
}
}
.@{name}-shadow {
height: 1px;
bottom: @bottom;
background-color: fade(@line_color, 50%);
}
.@{name}-handle {
top: (@top - 5px);
width: @handle_width;
height: @handle_height;
background-color: @handle_color_1;
& > i:first-child {
position: absolute;
display: block;
top: 100%;
left: 0;
width: 0;
height: 0;
border: 5px solid transparent;
border-top-color: @handle_color_1;
}
&.state_hover,
&:hover {
background-color: @handle_color_3;
& > i:first-child {
border-top-color: @handle_color_3;
}
}
}
.@{name}-min,
.@{name}-max {
color: @minmax_text_color;
font-size: 14px;
line-height: 1;
top: 0;
padding: 3px 4px;
opacity: 0.4;
background-color: @minmax_bg_color;
border-radius: @line_height;
}
.@{name}-from,
.@{name}-to,
.@{name}-single {
font-size: 14px;
line-height: 1;
text-shadow: none;
padding: 3px 4px;
background-color: @label_color_1;
color: @label_color_2;
border-radius: @line_height;
&:before {
position: absolute;
display: block;
content: "";
bottom: -6px;
left: 50%;
width: 0;
height: 0;
margin-left: -3px;
overflow: hidden;
border: 3px solid transparent;
border-top-color: @label_color_1;
}
}
.@{name}-grid {
height: 25px;
&-pol {
background-color: @grid_color_1;
}
&-text {
color: @grid_color_2;
font-size: 13px;
}
}
}

View file

@ -1,100 +0,0 @@
// Skin design by Veaceslav Grimalschi
// https://github.com/grimalschi
.irs--square {
@name: irs;
@top: 31px;
@bottom: 21px;
@line_height: 4px;
@handle_width: 16px;
@handle_height: 16px;
@line_color: #dedede;
@bar_color: black;
@handle_color_1: black;
@handle_color_2: white;
@handle_color_3: #f0f6ff;
@minmax_text_color: #333;
@minmax_bg_color: rgba(0,0,0,0.1);
@label_color_1: black;
@label_color_2: white;
@grid_color_1: #dedede;
@grid_color_2: silver;
height: 50px;
&.irs-with-grid {
height: 60px;
}
.@{name}-line {
top: @top;
height: @line_height;
background-color: @line_color;
}
.@{name}-bar {
top: @top;
height: @line_height;
background-color: @bar_color;
}
.@{name}-shadow {
height: 2px;
bottom: @bottom;
background-color: @line_color;
}
.@{name}-handle {
top: (@top - 6px);
width: @handle_width;
height: @handle_height;
border: 3px solid @handle_color_1;
background-color: @handle_color_2;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
&.state_hover,
&:hover {
background-color: @handle_color_3;
}
}
.@{name}-min,
.@{name}-max {
color: @minmax_text_color;
font-size: 14px;
line-height: 1;
top: 0;
padding: 3px 5px;
background-color: @minmax_bg_color;
}
.@{name}-from,
.@{name}-to,
.@{name}-single {
font-size: 14px;
line-height: 1;
text-shadow: none;
padding: 3px 5px;
background-color: @label_color_1;
color: @label_color_2;
}
.@{name}-grid {
height: 25px;
&-pol {
background-color: @grid_color_1;
}
&-text {
color: @grid_color_2;
font-size: 11px;
}
}
}

View file

@ -1,59 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>jsGrid - Basic Scenario</title>
<link rel="stylesheet" type="text/css" href="demos.css" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600,400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="../css/jsgrid.css" />
<link rel="stylesheet" type="text/css" href="../css/theme.css" />
<script src="../external/jquery/jquery-1.8.3.js"></script>
<script src="db.js"></script>
<script src="../src/jsgrid.core.js"></script>
<script src="../src/jsgrid.load-indicator.js"></script>
<script src="../src/jsgrid.load-strategies.js"></script>
<script src="../src/jsgrid.sort-strategies.js"></script>
<script src="../src/jsgrid.field.js"></script>
<script src="../src/fields/jsgrid.field.text.js"></script>
<script src="../src/fields/jsgrid.field.number.js"></script>
<script src="../src/fields/jsgrid.field.select.js"></script>
<script src="../src/fields/jsgrid.field.checkbox.js"></script>
<script src="../src/fields/jsgrid.field.control.js"></script>
</head>
<body>
<h1>Basic Scenario</h1>
<div id="jsGrid"></div>
<script>
$(function() {
$("#jsGrid").jsGrid({
height: "70%",
width: "100%",
filtering: true,
editing: true,
inserting: true,
sorting: true,
paging: true,
autoload: true,
pageSize: 15,
pageButtonCount: 5,
deleteConfirm: "Do you really want to delete the client?",
controller: db,
fields: [
{ name: "Name", type: "text", width: 150 },
{ name: "Age", type: "number", width: 50 },
{ name: "Address", type: "text", width: 200 },
{ name: "Country", type: "select", items: db.countries, valueField: "Id", textField: "Name" },
{ name: "Married", type: "checkbox", title: "Is Married", sorting: false },
{ type: "control" }
]
});
});
</script>
</body>
</html>

View file

@ -1,102 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>jsGrid - Batch Delete</title>
<link rel="stylesheet" type="text/css" href="demos.css" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600,400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="../css/jsgrid.css" />
<link rel="stylesheet" type="text/css" href="../css/theme.css" />
<script src="../external/jquery/jquery-1.8.3.js"></script>
<script src="db.js"></script>
<script src="../src/jsgrid.core.js"></script>
<script src="../src/jsgrid.load-indicator.js"></script>
<script src="../src/jsgrid.load-strategies.js"></script>
<script src="../src/jsgrid.sort-strategies.js"></script>
<script src="../src/jsgrid.field.js"></script>
<script src="../src/fields/jsgrid.field.text.js"></script>
<script src="../src/fields/jsgrid.field.number.js"></script>
<script src="../src/fields/jsgrid.field.control.js"></script>
</head>
<body>
<h1>Batch Delete</h1>
<div id="jsGrid"></div>
<script>
$(function() {
$("#jsGrid").jsGrid({
height: "50%",
width: "100%",
autoload: true,
confirmDeleting: false,
paging: true,
controller: {
loadData: function() {
return db.clients;
}
},
fields: [
{
headerTemplate: function() {
return $("<button>").attr("type", "button").text("Delete")
.on("click", function () {
deleteSelectedItems();
});
},
itemTemplate: function(_, item) {
return $("<input>").attr("type", "checkbox")
.prop("checked", $.inArray(item, selectedItems) > -1)
.on("change", function () {
$(this).is(":checked") ? selectItem(item) : unselectItem(item);
});
},
align: "center",
width: 50
},
{ name: "Name", type: "text", width: 150 },
{ name: "Age", type: "number", width: 50 },
{ name: "Address", type: "text", width: 200 }
]
});
var selectedItems = [];
var selectItem = function(item) {
selectedItems.push(item);
};
var unselectItem = function(item) {
selectedItems = $.grep(selectedItems, function(i) {
return i !== item;
});
};
var deleteSelectedItems = function() {
if(!selectedItems.length || !confirm("Are you sure?"))
return;
deleteClientsFromDb(selectedItems);
var $grid = $("#jsGrid");
$grid.jsGrid("option", "pageIndex", 1);
$grid.jsGrid("loadData");
selectedItems = [];
};
var deleteClientsFromDb = function(deletingClients) {
db.clients = $.map(db.clients, function(client) {
return ($.inArray(client, deletingClients) > -1) ? null : client;
});
};
});
</script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show more