Commit 50065ae7 by crosf32

remove jquery

parent a110532b
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
color: #2c2c2c !important; color: #2c2c2c !important;
} }
.doodle-table thead tr th{ .doodle-table thead tr th {
padding: 15px; padding: 15px;
height: 70px; height: 70px;
font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
...@@ -154,11 +154,11 @@ ...@@ -154,11 +154,11 @@
} }
.doodle-table .delete_col{ .doodle-table .delete_col {
background: #fddddd; background: #fddddd;
position: absolute; position: absolute;
width: 100%; width: 100%;
top: -74px; top: -100%;
height: 74px; height: 74px;
left: 0; left: 0;
opacity: 0; opacity: 0;
...@@ -180,6 +180,16 @@ ...@@ -180,6 +180,16 @@
border-right: none; border-right: none;
} }
.doodle-table #heure:hover div {
display: flex;
opacity: 1;
}
.doodle-table #date:hover div {
display: flex;
opacity: 1;
}
.doodle-table #date:hover { .doodle-table #date:hover {
background: #fdf2f2 !important; background: #fdf2f2 !important;
color: #f55753; color: #f55753;
......
(function($) { const CLOSEIMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+IEmuOgAAAMpJREFUOI3Nkk0KglAQgL/3NPEKXSX62waB0F7w7y5BQRcIpU5Qd6ikDhJ6Ahcv9LUoWhmYETS7meH7ZgZGFIE7AWKgy2eRAaFsCfNkYtkSfknkFzAAvxHY8yXmcPzKzcEIe7GqFZh1xdt+hxVEj6Sq6LgeKlk3F5SXFCXA8iMQApWsKc9p8xMeHQlCACCM2jnvNzB6fSwvRG1i0BrLj9BoytOhmcCcOqhtQpkeAVBAx5nVCkQRuPrtfg3iPx4p+4LPJRABeQv4CoR3Jng1ltK2xpYAAAAASUVORK5CYII=';
const CLOSEIMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+IEmuOgAAAMpJREFUOI3Nkk0KglAQgL/3NPEKXSX62waB0F7w7y5BQRcIpU5Qd6ikDhJ6Ahcv9LUoWhmYETS7meH7ZgZGFIE7AWKgy2eRAaFsCfNkYtkSfknkFzAAvxHY8yXmcPzKzcEIe7GqFZh1xdt+hxVEj6Sq6LgeKlk3F5SXFCXA8iMQApWsKc9p8xMeHQlCACCM2jnvNzB6fSwvRG1i0BrLj9BoytOhmcCcOqhtQpkeAVBAx5nVCkQRuPrtfg3iPx4p+4LPJRABeQv4CoR3Jng1ltK2xpYAAAAASUVORK5CYII=';
/** const dynamicEvent = (event_type, target_element_selector, listener_function) => {
* doodle Object document.addEventListener(event_type, event => {
* @param item if (event.target && event.target.matches && event.target.matches(target_element_selector)) {
* @param config (listener_function)(event);
*/ }
});
}
let DoodleFront = function(item, config) {
this.item = item;
this.config = config;
this.json = null;
this.days = [];
this.hours = [];
this.dateFormat = this.config.outputDateFormat || 'DD/MM/YYYY';
this.outputJson = {};
this.initLoad = () => {
this.getJsonData();
if(!this.json) {
console.warn('Invalid Json data');
return;
}
let DoodleFront = function(item, config) { this.getDays();
this.item = item; this.getHours();
this.config = config; this.createTable(config);
this.json = null;
this.days = [];
this.hours = [];
this.dateFormat = this.config.outputDateFormat || 'DD/MM/YYYY';
this.outputJson = {};
this.initLoad = () => { this.initCSS(config);
this.getJsonData();
if(!this.json) { if(!config.vertical) {
console.warn('Invalid Json data'); document.querySelector('table').parentNode.style.overflowX = 'auto';
return; }
} };
this.getDays(); /**
this.getHours(); * Create Table
this.createTable(config); */
this.createTable = (config) => {
dynamicEvent('click', 'input[type=checkbox]', this.eventInput);
if(config.vertical) {
this.item.innerHTML += `
<ul class="doodle-list">
${this.createList()}
</ul>
`;
} else {
this.item.innerHTML += `
<table class="table doodle-table frontend">
<thead>
${this.createHeaderTable()}
</thead>
<tbody>
${this.createBodyTable()}
</tbody>
</table>
`;
}
};
this.initCSS(config); this.createList = function() { // TODO : vertical
let div = document.createElement('div');
// DAYS =>
for(let index in this.days) {
let formatDateDay = moment(this.days[index], this.dateFormat).locale('fr').format('dddd DD');
let formatDateMonth = moment(this.days[index], this.dateFormat).locale('fr').format('MMMM');
//Remet l'overflow pour le responsive en front let date = this.days[index];
if(!config.vertical) {
$('table').parent().css('overflow-x', 'auto');
}
};
/** div.innerHTML += '<h5><span class="date_format"><b>' + formatDateDay + '</b></span> ' + formatDateMonth + '</td>';
* Create Table
*/
this.createTable = (config) => {
$(document).on('click', 'input[type=checkbox]', this.eventInput);
if(config.vertical) {
this.item.append(`
<ul class="doodle-list">
${this.createList()}
</ul>
`);
} else {
this.item.append(`
<table class="table doodle-table frontend">
<thead>
${this.createHeaderTable()}
</thead>
<tbody>
${this.createBodyTable()}
</tbody>
</table>
`);
}
};
this.createList = function() { // TODO : vertical
let div = $('<div>');
// DAYS =>
for(let index in this.days) {
let formatDateDay = moment(this.days[index], this.dateFormat).locale('fr').format('dddd DD');
let formatDateMonth = moment(this.days[index], this.dateFormat).locale('fr').format('MMMM');
let date = this.days[index];
let $h3 = $('<h5><span class="date_format"><b>' + formatDateDay + '</b></span> ' + formatDateMonth + '</td>'); for(let index2 in this.hours) {
div.append($h3); let $li = document.createElement('li');
$li.classList.add('p-3');
for(let index2 in this.hours) { if(this.json[this.days[index]].includes(this.hours[index2])) {
let $li = $('<li class="p-3">'); let hour = this.hours[index2];
if(this.json[this.days[index]].includes(this.hours[index2])) { if (hour.indexOf(':') === -1) {
let hour = this.hours[index2]; hour += 'h';
if (hour.indexOf(':') === -1) { } else {
hour += 'h'; hour = hour.replace(':', 'h');
} else {
hour = hour.replace(':', 'h');
}
$li.html(this.createInputBox(this.hours[index2], date, hour));
div.append($li);
} }
$li.innerHTML += this.createInputBox(this.hours[index2], date, hour);
div.innerHTML += $li.innerHTML;
} }
} }
return div.html();
} }
this.initCSS = function() { return div.innerHTML;
$('.empty').css('background', '#fafafa') }
};
/**
* Create table header for hours
* @returns {string}
*/
this.createBodyTable = () => {
let $tbody = $('<tbody>');
let html, tbodyFinal;
for(let index in this.days) { this.initCSS = function() {
let $tr = $('<tr>'); document.querySelectorAll('.empty').forEach(e => e.style.background = '#fafafa');
let formatDateDay = moment(this.days[index], this.dateFormat).locale('fr').format('dddd DD'); };
let formatDateMonth = moment(this.days[index], this.dateFormat).locale('fr').format('MMMM');
html = $tr.append('<td><span class="date_format"><b>' + formatDateDay + '</b></span> ' + formatDateMonth + '</td>')
.append(this.createBodyContent(this.days[index]));
tbodyFinal = $tbody.append(html); /**
} * Create table header for hours
* @returns {string}
*/
this.createBodyTable = () => {
let $tbody = document.createElement('tbody');
let html, tbodyFinal;
return tbodyFinal.html(); for(let index in this.days) {
}; let $tr = document.createElement('tr');
let formatDateDay = moment(this.days[index], this.dateFormat).locale('fr').format('dddd DD');
let formatDateMonth = moment(this.days[index], this.dateFormat).locale('fr').format('MMMM');
/** html = $tr.innerHTML += '<td><span class="date_format"><b>' + formatDateDay + '</b></span> ' + formatDateMonth + '</td>'
* Create body content + this.createBodyContent(this.days[index]);
* @param index
* @returns {string}
*/
this.createBodyContent = (index) => {
let html;
let $td = $('<td>');
for(let key in this.hours) {
if(this.json[index].includes(this.hours[key]))
html = '<td>' + this.createInputBox(this.hours[key], index) + '</td>';
else
html = '<td class="empty"></td>';
$td.append(html);
}
return $td.html(); tbodyFinal = $tbody.innerHTML += html;
}; }
/** return tbodyFinal;
* Creer l'input };
* @param hour
* @param day
* @returns {string}
*/
this.createInputBox = (hour, day, name = null) => {
let dayFormat = moment(day, this.dateFormat).format('DDMMYYYY');
let html = "<label class='label_input'><input type='checkbox' data-check=" + dayFormat + '_' + hour + " /><span><i></i></span>";
if(name) {
html += "<h5>" + name + "</h5>";
}
html += "</label>"
return html;
}; /**
* Create body content
* @param index
* @returns {string}
*/
this.createBodyContent = (index) => {
let html;
let $td = document.createElement('td');
/** for(let key in this.hours) {
* Create table header for hours if(this.json[index].includes(this.hours[key]))
* @returns {string} html = '<td>' + this.createInputBox(this.hours[key], index) + '</td>';
*/ else
this.createHeaderTable = () => { html = '<td class="empty"></td>';
let $tr = $('<tr>');
let thead;
let finalSortedTab = [];
// Nombre de cases vide
const NBRCASEVIDE = 1;
//Ajoute les cases vide
for (let i = 0; i < NBRCASEVIDE; i++) {
thead = $tr.append('<th></th>');
}
// Permet de mettre un 'h' pour les heures/minutes $td.innerHTML = html;
this.hours.forEach( (el, index) => { }
if (el.indexOf(':') === -1) {
el += 'h';
} else {
el = el.replace(':', 'h');
}
finalSortedTab.push(el); return $td.innerHTML;
}); };
//Ajoute les heures /**
for(let index in finalSortedTab) { * Creer l'input
thead = $tr.append('<th>' + finalSortedTab[index] + '</th>'); * @param hour
} * @param day
* @returns {string}
*/
this.createInputBox = (hour, day, name = null) => {
let dayFormat = moment(day, this.dateFormat).format('DDMMYYYY');
return thead.html(); let html = "<label class='label_input'><input type='checkbox' data-check=" + dayFormat + '_' + hour + " /><span><i></i></span>";
}; if(name) {
html += "<h5>" + name + "</h5>";
}
html += "</label>"
return html;
};
/** /**
* Get Days * Create table header for hours
*/ * @returns {string}
this.getDays = () => { */
this.days = Object.keys(this.json); this.createHeaderTable = () => {
}; let $tr = document.createElement('tr');
let thead;
let finalSortedTab = [];
/** // Nombre de cases vide
* Get Hours const NBRCASEVIDE = 1;
*/
this.getHours = () => {
for(let key in this.json) {
for(let index in this.json[key]) {
if(!this.hours.includes(this.json[key][index])) {
this.hours.push(this.json[key][index]);
this.hours.sort();
}
}
}
};
/** //Ajoute les cases vide
* Get Json data for (let i = 0; i < NBRCASEVIDE; i++) {
*/ thead = $tr.innerHTML += '<th></th>';
this.getJsonData = () => { }
let dataJson = this.item.data('json');
if(typeof dataJson === 'object') { // Permet de mettre un 'h' pour les heures/minutes
this.json = dataJson; this.hours.forEach( (el, index) => {
} else if(this.isJsonString(dataJson)){ if (el.indexOf(':') === -1) {
this.json = JSON.parse(dataJson); el += 'h';
} else { } else {
let data = this.fileExistsAndGetData(dataJson); el = el.replace(':', 'h');
if(data) {
let json = JSON.parse(data);
if (!$.isEmptyObject(json)) {
this.json = json;
}
}
} }
};
/** finalSortedTab.push(el);
* Check if string is valid Json });
* @param str
* @returns {boolean}
*/
this.isJsonString = (str) => {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
};
/** //Ajoute les heures
* Check if file exist and get data for(let index in finalSortedTab) {
* @param url thead = $tr.innerHTML += '<th>' + finalSortedTab[index] + '</th>';
* @returns {boolean} }
*/
this.fileExistsAndGetData = (url) => {
if(url){
let req = new XMLHttpRequest();
req.open('GET', url, false);
req.send();
return req.response;
} else {
return false;
}
};
/** return thead.innerHTML;
* Generate JSON };
*/
this.createJSON = () => { /**
let $input = $(this.config.inputSelector); * Get Days
*/
this.getDays = () => {
this.days = Object.keys(this.json);
};
if ($input.length > 0) { /**
$input.val(JSON.stringify(this.outputJson)); * Get Hours
*/
this.getHours = () => {
for(let key in this.json) {
for(let index in this.json[key]) {
if(!this.hours.includes(this.json[key][index])) {
this.hours.push(this.json[key][index]);
this.hours.sort();
}
} }
}; }
};
/** /**
* Event for input * Get Json data
* @param e event */
*/ this.getJsonData = () => {
this.eventInput = (e) => { let dataJson = this.item.dataset.json;
let data = $(e.target).data('check').split('_');
let isChecked = $(e.target).is(':checked'); if(typeof dataJson === 'object') {
this.json = dataJson;
if (isChecked) { } else if(this.isJsonString(dataJson)) {
this.addInOutputObject(data); this.json = JSON.parse(dataJson);
$(e.target).parent().parent().css('background', '#e2deef'); } else {
} else { let data = this.fileExistsAndGetData(dataJson);
this.removeInOutputObject(data); if(data) {
$(e.target).parent().parent().css('background', ''); let json = JSON.parse(data);
if (Object.keys(json).length > 0) {
this.json = json;
}
} }
}
};
this.createJSON(); /**
}; * Check if string is valid Json
* @param str
* @returns {boolean}
*/
this.isJsonString = (str) => {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
};
/** /**
* Add value into json * Check if file exist and get data
* @param data * @param url
*/ * @returns {boolean}
this.addInOutputObject = (data) => { */
this.fileExistsAndGetData = (url) => {
if(url){
let req = new XMLHttpRequest();
req.open('GET', url, false);
req.send();
return req.response;
} else {
return false;
}
};
let dayFormat = moment(data[0], 'DDMMYYYY').format(this.dateFormat); /**
* Generate JSON
*/
this.createJSON = () => {
let $input = document.querySelector(this.config.inputSelector);
if (!this.outputJson[dayFormat]) { if ($input) {
this.outputJson[dayFormat] = []; $input.value = JSON.stringify(this.outputJson);
} }
};
let output = this.outputJson[dayFormat]; /**
* Event for input
* @param e event
*/
this.eventInput = (e) => {
let data = e.target.dataset.check.split('_');
let isChecked = e.target.checked;
if (isChecked) {
this.addInOutputObject(data);
e.target.parentNode.style.background = '#e2deef';
} else {
this.removeInOutputObject(data);
e.target.parentNode.style.background = '';
}
if (output.indexOf(data[1]) === -1) { this.createJSON();
output.push(data[1]); };
output.sort(function(a,b) {
return moment(a, 'HH:mm') - moment(b, 'HH:mm');
});
}
};
/** /**
* Remove value from json * Add value into json
* @param data * @param data
*/ */
this.removeInOutputObject = (data) => { this.addInOutputObject = (data) => {
let dayFormat = moment(data[0], 'DDMMYYYY').format(this.dateFormat);
if (this.outputJson[dayFormat]) { let dayFormat = moment(data[0], 'DDMMYYYY').format(this.dateFormat);
let output = this.outputJson[dayFormat];
let index = output.indexOf(data[1]);
if (index !== -1) { if (!this.outputJson[dayFormat]) {
output.splice(index, 1); this.outputJson[dayFormat] = [];
}
if (output.length === 0) { let output = this.outputJson[dayFormat];
delete this.outputJson[dayFormat];
}
}
}
};
/** if (output.indexOf(data[1]) === -1) {
* Init output.push(data[1]);
*/ output.sort(function(a,b) {
this.initLoad(); return moment(a, 'HH:mm') - moment(b, 'HH:mm');
});
}
}; };
/** /**
* For back * Remove value from json
* @param item * @param data
* @param config
* @constructor
*/ */
this.removeInOutputObject = (data) => {
let dayFormat = moment(data[0], 'DDMMYYYY').format(this.dateFormat);
let DoodleBack = function (item, config) { if (this.outputJson[dayFormat]) {
this.item = item; let output = this.outputJson[dayFormat];
this.config = config; let index = output.indexOf(data[1]);
this.json = null;
this.days = [];
this.hours = this.config.defaultHours || [];
this.dateFormat = this.config.outputDateFormat || 'DD/MM/YYYY';
this.outputJson = {};
this.init = true;
this.initLoad = () => { if (index !== -1) {
if (this.init) { output.splice(index, 1);
this.getJsonData();
if(!this.json) { if (output.length === 0) {
console.warn('Invalid Json data'); delete this.outputJson[dayFormat];
return;
} }
}
}
};
this.getDays(); /**
this.getHours(); * Init
*/
this.initLoad();
};
let DoodleBack = function (item, config) {
this.item = item;
this.config = config;
this.json = null;
this.days = [];
this.hours = this.config.defaultHours || [];
this.dateFormat = this.config.outputDateFormat || 'DD/MM/YYYY';
this.outputJson = {};
this.init = true;
this.initLoad = () => {
if (this.init) {
this.getJsonData();
this.init = false; if(!this.json) {
console.warn('Invalid Json data');
return;
} }
this.createTable();
this.createEvents();
this.initCSS(); this.getDays();
}; this.getHours();
this.reinit = () => { this.init = false;
this.createJSON(); }
$('.doodle').html(''); this.createTable();
$(document).off('click', 'input[type=checkbox]'); this.createEvents();
$(document).off('click', 'td a');
$(document).off('changeDate', '#addDate');
$(document).off('hide.timepicker', '#timepicker');
$(document).off('click', '#timepicker');
$(document).off('mouseenter mouseleave', '#date');
$(document).off('mouseenter mouseleave', '#heure');
this.initCSS();
};
this.initLoad(); this.reinit = () => {
}; this.createJSON();
document.querySelector('.doodle').innerHTML = '';
this.createEvents = () => { this.initLoad();
let date = new Date(); };
flatpickr(document.querySelector('#myDatepicker'), {
dateFormat: 'm/d/Y',
locale: 'fr',
minDate: 'today',
enableTime: false,
onClose: this.eventAddDate
})
flatpickr(document.querySelector('#timepicker'), {
dateFormat: 'H:i',
locale: 'fr',
noCalendar: true,
enableTime: true,
onClose: this.eventAddHour
})
$(document).on('click', 'input[type=checkbox]', this.eventCheckInput);
$(document).on('click', 'td a', this.eventRemoveDate);
$(document).on('click', 'th a', this.eventRemoveHour);
$(document).on('mouseenter mouseleave', '#date', function (e) {
if (e.type === 'mouseenter') {
$(e.target).find('div').css('display', 'flex');
$(e.target).find('div').animate({
opacity : 1,
display: 'flex'
}, 250, 'linear');
} else {
if ($(e.target).is('div.delete_row') ) {
$(e.target).css('display', 'none');
$(e.target).animate({
opacity : 0,
display: 'none'
}, 200);
} else {
$(e.target).find('div').css('display', 'none');
$(e.target).find('div').animate({
opacity : 0,
display: 'none'
}, 200);
}
}
});
$(document).on('mouseenter mouseleave', '#heure', function (e) { this.createEvents = () => {
if (e.type === 'mouseenter') { let date = new Date();
$(e.target).find('div').css('display', 'flex');
$(e.target).find('div').animate({ flatpickr(document.querySelector('#myDatepicker'), {
opacity : 1, dateFormat: 'm/d/Y',
display: 'flex' locale: 'fr',
}, 250, 'linear'); minDate: 'today',
} else { enableTime: false,
if ($(e.target).is('div.delete_col') ) { onClose: this.eventAddDate
$(e.target).css('display', 'none'); })
$(e.target).animate({
opacity : 0, flatpickr(document.querySelector('#timepicker'), {
display: 'none' dateFormat: 'H:i',
}, 200); locale: 'fr',
} else { noCalendar: true,
$(e.target).find('div').css('display', 'none'); enableTime: true,
$(e.target).find('div').animate({ onClose: this.eventAddHour
opacity : 0, })
display: 'none'
}, 200); dynamicEvent('click', 'input[type=checkbox]', this.eventCheckInput);
} dynamicEvent('click', 'td a, td a img', this.eventRemoveDate);
} dynamicEvent('click', 'th a, th a img', this.eventRemoveHour);
});
}; };
/** /**
* Create Table * Create Table
*/ */
this.createTable = () => { this.createTable = () => {
this.item.append(` this.item.innerHTML +=`
<table class="table doodle-table backend"> <table class="table doodle-table backend">
<thead> <thead>
${this.createHeaderTable()} ${this.createHeaderTable()}
</thead> </thead>
...@@ -482,493 +418,476 @@ ...@@ -482,493 +418,476 @@
<tbody> <tbody>
${this.createBodyTable()} ${this.createBodyTable()}
</tbody> </tbody>
</table> </table>
`); `;
this.generateEmptyCell(); this.generateEmptyCell();
}; };
this.initCSS = () => {
$('input[type=checkbox]:checked').parent().parent().css('background', '#e2deef');
};
/**
* Create table header for hours
* @returns {string}
*/
this.createBodyTable = () => {
let $tbody = $('<tbody>');
let html, tbodyFinal;
if (!$.isEmptyObject(this.outputJson)) { this.initCSS = () => {
for(let index in this.days) { document.querySelectorAll('input[type=checkbox]:checked').forEach(e => e.parentNode.parentNode.style.background = '#e2deef');
let $tr = $('<tr>'); };
let formatDateDay = moment(this.days[index], this.dateFormat).locale('fr').format('dddd DD'); /**
let formatDateMonth = moment(this.days[index], this.dateFormat).locale('fr').format('MMMM'); * Create table header for hours
let formatFullDate = moment(this.days[index], this.dateFormat).locale('fr').format(this.dateFormat); * @returns {string}
let date = this.days[index]; */
this.createBodyTable = () => {
let $tbody = document.createElement('tbody');
let tbodyFinal;
html = $tr.append('<td id="date" data-date="' + formatFullDate +'"><span class="date_format"><b>' + formatDateDay + '</b> ' + formatDateMonth + '</span><div class="delete_row"><a href="#"><img src='+ CLOSEIMG +' /></a></div></td>') if (Object.keys(this.outputJson).length > 0) {
.append(this.createBodyContent(date)) for(let index in this.days) {
.append('<td></td>'); let $tr = document.createElement('tr');
let formatDateDay = moment(this.days[index], this.dateFormat).locale('fr').format('dddd DD');
let formatDateMonth = moment(this.days[index], this.dateFormat).locale('fr').format('MMMM');
let formatFullDate = moment(this.days[index], this.dateFormat).locale('fr').format(this.dateFormat);
let date = this.days[index];
tbodyFinal = $tbody.append(html); $tr.innerHTML += '<td id="date" data-date="' + formatFullDate +'"><span class="date_format"><b>' + formatDateDay + '</b> ' + formatDateMonth + '</span><div class="delete_row"><a href="#"><img src='+ CLOSEIMG +' /></a></div></td>'
} + this.createBodyContent(date)
+ '<td></td>';
tbodyFinal.append(`<td><div id="myDatepicker" class="input-group date" data-provide="datepicker"> $tbody.innerHTML += $tr.innerHTML;
<label>Date</label>
<input type="text" id="addDate" class="form-control" placeholder="jj / mm / aaaa">
<span class="input-group-addon">
<i class="fa fa-calendar"></i>
</span>
</div>
</td> `);
} else {
let $tr = $('<tr>');
html = $tr.append(`<td><div id="myDatepicker" class="input-group date" data-provide="datepicker">
<label>Date</label>
<input type="text" id="addDate" class="form-control" placeholder="jj / mm / aaaa">
<span class="input-group-addon">
<i class="fa fa-calendar"></i>
</span>
</div>
</td> `);
tbodyFinal = $tbody.append(html);
} }
$tbody.innerHTML += `<td><div id="myDatepicker" class="input-group date" data-provide="datepicker">
<label>Date</label>
<input type="text" id="addDate" class="form-control" placeholder="jj / mm / aaaa">
<span class="input-group-addon">
<i class="fa fa-calendar"></i>
</span>
</div>
</td>`;
} else {
let $tr = document.createElement('tr');
$tr.innerHTML += `<td><div id="myDatepicker" class="input-group date" data-provide="datepicker">
<label>Date</label>
<input type="text" id="addDate" class="form-control" placeholder="jj / mm / aaaa">
<span class="input-group-addon">
<i class="fa fa-calendar"></i>
</span>
</div>
</td>`;
return tbodyFinal.html(); $tbody.innerHTML += $tr.innerHTML;
};
/** tbodyFinal = $tbody.innerHTML;
* Create body content` }
* @param index
* @returns {string}
*/
this.createBodyContent = (index) => {
let html;
let $td = $('<td>');
for(let key in this.hours) {
if(this.outputJson[index] && this.outputJson[index].includes(this.hours[key]))
html = '<td>' + this.createInputBox(this.hours[key], index, true) + '</td>';
else
html = '<td>' + this.createInputBox(this.hours[key], index, false) + '</td>';
$td.append(html);
}
return $td.html(); return $tbody.innerHTML;
}; };
/** /**
* Creer l'input * Create body content`
* @param hour * @param index
* @param day * @returns {string}
* @returns {string} */
*/ this.createBodyContent = (index) => {
let html = '';
for(let key in this.hours) {
if(this.outputJson[index] && this.outputJson[index].includes(this.hours[key]))
html += '<td>' + this.createInputBox(this.hours[key], index, true) + '</td>';
else
html += '<td>' + this.createInputBox(this.hours[key], index, false) + '</td>';
}
this.createInputBox = (hour, day, checked) => { return html;
let dayFormat = moment(day, this.dateFormat).format('DDMMYYYY'); };
let isChecked = checked ? 'checked' : '';
let data = dayFormat + '_' + hour;
return `<label class='label_input'> /**
* Creer l'input
* @param hour
* @param day
* @returns {string}
*/
this.createInputBox = (hour, day, checked) => {
let dayFormat = moment(day, this.dateFormat).format('DDMMYYYY');
let isChecked = checked ? 'checked' : '';
let data = dayFormat + '_' + hour;
return `<label class='label_input'>
<input type='checkbox' ${isChecked} data-check="${data}" /><span><i></i></span> <input type='checkbox' ${isChecked} data-check="${data}" /><span><i></i></span>
</label>` </label>`
} }
/** /**
* Create table header for hours * Create table header for hours
* @returns {string} * @returns {string}
*/ */
this.createHeaderTable = () => { this.createHeaderTable = () => {
let $tr = $('<tr>'); let $tr = document.createElement('tr');
let thead; let thead;
let finalSortedTab = []; let finalSortedTab = [];
// Nombre de cases vide // Nombre de cases vide
let nbrCaseVide = 1; let nbrCaseVide = 1;
//Ajoute les cases vide //Ajoute les cases vide
for (let i = 0; i < nbrCaseVide; i++) { for (let i = 0; i < nbrCaseVide; i++) {
thead = $tr.append('<th></th>'); thead = $tr.innerHTML += '<th></th>';
} }
// Permet de mettre un 'h' pour les heures/minutes // Permet de mettre un 'h' pour les heures/minutes
this.hours.forEach( (el, index) => { this.hours.forEach( (el, index) => {
if (el.indexOf(':') === -1) { if (el.indexOf(':') === -1) {
el += 'h'; el += 'h';
} else { } else {
el = el.replace(':', 'h'); el = el.replace(':', 'h');
} }
finalSortedTab.push(el); finalSortedTab.push(el);
}); });
//Ajoute les heures //Ajoute les heures
for(let index in finalSortedTab) { for(let index in finalSortedTab) {
thead = $tr.append('<th id="heure"><span>' + finalSortedTab[index] + '</span><div class="delete_col"><a href="#"><img src='+ CLOSEIMG +' /></a></div></th>'); thead = $tr.innerHTML += '<th id="heure"><span>' + finalSortedTab[index] + '</span><div class="delete_col"><a href="#"><img src='+ CLOSEIMG +' /></a></div></th>';
} }
thead = $tr.append(`<th><div class="input-group bootstrap-timepicker timepicker"> thead = $tr.innerHTML += `<th><div class="input-group bootstrap-timepicker timepicker">
<label>Horaire</label> <label>Horaire</label>
<input id="timepicker" type="text" class="form-control" data-provide="timepicker"> <input id="timepicker" type="text" class="form-control" data-provide="timepicker">
<span class="input-group-addon"> <span class="input-group-addon">
<i class="fa fa-clock-o"></i> <i class="fa fa-clock-o"></i>
</span> </span>
</div></th> `); </div></th>`;
return thead.html(); return thead;
}; };
/** /**
* Generate empty cell * Generate empty cell
*/ */
this.generateEmptyCell = () => { this.generateEmptyCell = () => {
let colLength = $('table thead th#heure').length + 1; let colLength = document.querySelectorAll('table thead th#heure').length + 1;
let lastTR = $('.doodle-table tbody tr:last-child'); let lastTR = document.querySelector('.doodle-table tbody tr:last-child');
if(lastTR) {
for (let i = 0; i < colLength; i++) { for (let i = 0; i < colLength; i++) {
$(lastTR).append('<td></td>') lastTR.innerHTML += '<td></td>';
} }
}
};
}; /**
* Get Days
/** */
* Get Days this.getDays = () => {
*/ this.days = Object.keys(this.json);
this.getDays = () => { };
this.days = Object.keys(this.json);
};
/** /**
* Get Hours * Get Hours
*/ */
this.getHours = () => { this.getHours = () => {
for(let key in this.json) { for(let key in this.json) {
for(let index in this.json[key]) { for(let index in this.json[key]) {
if(!this.hours.includes(this.json[key][index])) { if(!this.hours.includes(this.json[key][index])) {
this.hours.push(this.json[key][index]); this.hours.push(this.json[key][index]);
this.hours.sort(); this.hours.sort();
}
} }
} }
}; }
};
/**
* Get Json data
*/
this.getJsonData = () => {
let dataJson = $(this.config.inputSelector).val();
if(typeof dataJson === 'object') {
this.json = dataJson;
} else if(this.isJsonString(dataJson)){
this.json = JSON.parse(dataJson);
} else {
let data = this.fileExistsAndGetData(dataJson);
if(data){
let json = JSON.parse(data);
if (!$.isEmptyObject(json)) { /**
this.json = json; * Get Json data
} */
this.getJsonData = () => {
let dataJson = document.querySelector(this.config.inputSelector).value;
if(typeof dataJson === 'object') {
this.json = dataJson;
} else if(this.isJsonString(dataJson)){
this.json = JSON.parse(dataJson);
} else {
let data = this.fileExistsAndGetData(dataJson);
if(data){
let json = JSON.parse(data);
if (Object.keys(json).length > 0) {
this.json = json;
} }
} }
this.populateOutputJson(); }
}; this.populateOutputJson();
};
this.populateOutputJson = () => { this.populateOutputJson = () => {
for (let index in this.json) { for (let index in this.json) {
if (this.json[index].length === 0 ) { if (this.json[index].length === 0 ) {
this.addInOutputObject(index) this.addInOutputObject(index)
} }
for (let i in this.json[index]) { for (let i in this.json[index]) {
let dayFormat = moment(index, this.dateFormat).format(this.dateFormat); let dayFormat = moment(index, this.dateFormat).format(this.dateFormat);
this.addInOutputObject([dayFormat, this.json[index][i]] ) this.addInOutputObject([dayFormat, this.json[index][i]] )
}
} }
}; }
};
/** /**
* Check if string is valid Json * Check if string is valid Json
* @param str * @param str
* @returns {boolean} * @returns {boolean}
*/ */
this.isJsonString = (str) => { this.isJsonString = (str) => {
try { try {
JSON.parse(str); JSON.parse(str);
} catch (e) { } catch (e) {
return false; return false;
} }
return true; return true;
}; };
/** /**
* Check if file exist and get data * Check if file exist and get data
* @param url * @param url
* @returns {boolean} * @returns {boolean}
*/ */
this.fileExistsAndGetData = (url) => { this.fileExistsAndGetData = (url) => {
if(url){ if(url) {
let req = new XMLHttpRequest(); let req = new XMLHttpRequest();
req.open('GET', url, false); req.open('GET', url, false);
req.send(); req.send();
return req.response; return req.response;
} else { } else {
return false; return false;
} }
}; };
/** /**
* Generate JSON * Generate JSON
*/ */
this.createJSON = () => { this.createJSON = () => {
let $input = $(this.config.inputSelector); let $input = document.querySelector(this.config.inputSelector);
if ($input.length > 0) { if ($input) {
$input.val(JSON.stringify(this.outputJson)); $input.value = JSON.stringify(this.outputJson);
} }
}; };
/** /**
* Event for input * Event for input
* @param e event * @param e event
*/ */
this.eventCheckInput = (e) => { this.eventCheckInput = (e) => {
let data = $(e.target).data('check').split('_'); let data = e.target.dataset.check.split('_');
let isChecked = $(e.target).is(':checked'); let isChecked = e.target.checked;
if (isChecked) { if (isChecked) {
this.addInOutputObject(data); this.addInOutputObject(data);
$(e.target).parent().parent().css('background', '#e2deef'); e.target.parentNode.parentNode.style.background = '#e2deef';
} else { } else {
this.removeInOutputObject(data); this.removeInOutputObject(data);
$(e.target).parent().parent().css('background', ''); e.target.parentNode.parentNode.style.background = '';
} }
this.createJSON(); this.createJSON();
}; };
/** /**
* Check if key exist * Check if key exist
* @param key * @param key
* @returns {boolean} * @returns {boolean}
*/ */
this.keyExist = (key) => { this.keyExist = (key) => {
if (moment(key, this.dateFormat).format(this.dateFormat) === key) { if (moment(key, this.dateFormat).format(this.dateFormat) === key) {
if (this.days.indexOf(key) === -1) { if (this.days.indexOf(key) === -1) {
return true return true
} }
else { else {
console.error('La date est déjà présente dans le tableau'); console.error('La date est déjà présente dans le tableau');
return false return false
}
} }
}
if (moment(key, 'HH:mm').format('HH:mm') === key || moment(key, 'HH').format('HH') === key) { if (moment(key, 'HH:mm').format('HH:mm') === key || moment(key, 'HH').format('HH') === key) {
if (this.hours.indexOf(key) === -1) { if (this.hours.indexOf(key) === -1) {
return true return true
}
else {
console.error('L\'heure est déjà présente dans le tableau');
return false
}
} }
}; else {
console.error('L\'heure est déjà présente dans le tableau');
return false
}
}
};
/** /**
* Add date * Add date
* @param e * @param e
*/ */
this.eventAddDate = (e, dateStr) => { this.eventAddDate = (e, dateStr) => {
let formatDateOnSneFou = moment(dateStr).locale('fr').format(this.dateFormat); let formatDateOnSneFou = moment(dateStr).locale('fr').format(this.dateFormat);
if (this.keyExist(formatDateOnSneFou)) { if (this.keyExist(formatDateOnSneFou)) {
this.days.push(formatDateOnSneFou); this.days.push(formatDateOnSneFou);
this.addInOutputObject(formatDateOnSneFou); this.addInOutputObject(formatDateOnSneFou);
} }
//Tri les dates //Tri les dates
let formatDate = this.dateFormat; let formatDate = this.dateFormat;
this.days.sort(function(a,b) { this.days.sort(function(a,b) {
return moment(a, formatDate) - moment(b, formatDate); return moment(a, formatDate) - moment(b, formatDate);
}); });
this.reinit(); this.reinit();
}; };
/** /**
* Add hour * Add hour
*/ */
this.eventAddHour = (selectedDates, dateStr) => { this.eventAddHour = (selectedDates, dateStr) => {
let val = dateStr; let val = dateStr;
let splitHour = val.split(':'); let splitHour = val.split(':');
if (splitHour[0].length === 1) { if (splitHour[0].length === 1) {
val = "0" + val; val = "0" + val;
} }
if (this.keyExist(val)) { if (this.keyExist(val)) {
if (splitHour[1] === '00') { if (splitHour[1] === '00') {
if (this.keyExist(splitHour[0])) { if (this.keyExist(splitHour[0])) {
this.hours.push(splitHour[0]); this.hours.push(splitHour[0]);
}
} else {
this.hours.push(val);
} }
} else {
this.hours.push(val);
} }
}
this.hours.sort(function(a,b) { this.hours.sort(function(a,b) {
return moment(a, 'HH:mm') - moment(b, 'HH:mm'); return moment(a, 'HH:mm') - moment(b, 'HH:mm');
}); });
this.reinit(); this.reinit();
}; };
/** /**
* Remove Date * Remove Date
* @param e * @param e
*/ */
this.eventRemoveDate = (e) => { this.eventRemoveDate = (e) => {
e.preventDefault(); e.preventDefault();
e.stopImmediatePropagation(); e.stopImmediatePropagation();
let date = $(e.target).parent().parent().parent().data('date'); let date = e.target.closest('#date').dataset.date;
let formatDateDay = moment(date, this.dateFormat).locale('fr').format(this.dateFormat); let formatDateDay = moment(date, this.dateFormat).locale('fr').format(this.dateFormat);
let index = this.days.indexOf(formatDateDay); let index = this.days.indexOf(formatDateDay);
if (index !== -1) { if (index !== -1) {
this.days.splice(index, 1) this.days.splice(index, 1)
} }
delete this.outputJson[formatDateDay]; delete this.outputJson[formatDateDay];
this.reinit(); this.reinit();
}; };
/** /**
* Remove hour * Remove hour
* @param e * @param e
*/ */
this.eventRemoveHour = (e) => { this.eventRemoveHour = (e) => {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
let hour = $(e.target).parent().parent().parent().find('span').first().text(); let hour = e.target.closest('#heure').querySelector('span').innerText;
hour = hour.replace('h', ':'); hour = hour.replace('h', ':');
if(hour.length < 5){ if(hour.length < 5){
hour = hour.substring(0, hour.length-1); hour = hour.substring(0, hour.length-1);
} }
let index = this.hours.indexOf(hour); let index = this.hours.indexOf(hour);
if (index !== -1) { if (index !== -1) {
this.hours.splice(index, 1) this.hours.splice(index, 1)
} }
for(let yolo in this.outputJson) { for(let yolo in this.outputJson) {
let pipa = this.outputJson[yolo].indexOf(hour); let pipa = this.outputJson[yolo].indexOf(hour);
if (pipa !== -1) { if (pipa !== -1) {
this.outputJson[yolo].splice(pipa, 1); this.outputJson[yolo].splice(pipa, 1);
}
} }
}
this.reinit(); this.reinit();
}; };
/**
* Add value into json
* @param data
*/
this.addInOutputObject = (data) => {
if (typeof data === 'string') {
this.outputJson[data] = [];
} else {
let dayFormat = moment(data[0], 'DDMMYYYY').format(this.dateFormat);
if (!this.outputJson[dayFormat]) { /**
this.outputJson[dayFormat] = []; * Add value into json
} * @param data
*/
this.addInOutputObject = (data) => {
if (typeof data === 'string') {
this.outputJson[data] = [];
} else {
let output = this.outputJson[dayFormat]; let dayFormat = moment(data[0], 'DDMMYYYY').format(this.dateFormat);
if (output.indexOf(data[1]) === -1) { if (!this.outputJson[dayFormat]) {
output.push(data[1]); this.outputJson[dayFormat] = [];
}
} }
};
/** let output = this.outputJson[dayFormat];
* Remove value from json
* @param data
*/
this.removeInOutputObject = (data) => {
let dayFormat = moment(data[0], this.dateFormat).format(this.dateFormat);
if (this.outputJson[dayFormat]) {
let output = this.outputJson[dayFormat];
let index = output.indexOf(data[1]);
if (index !== -1) { if (output.indexOf(data[1]) === -1) {
output.splice(index, 1); output.push(data[1]);
}
} }
}; }
/**
* Init
*/
this.initLoad();
}; };
/** /**
* * Remove value from json
* @param options * @param data
* @returns {$.fn.Doodle}
* @constructor
*/ */
$.fn.Doodle = function(options) { this.removeInOutputObject = (data) => {
moment.locale('fr') let dayFormat = moment(data[0], this.dateFormat).format(this.dateFormat);
let config = initializeConfig();
this.each(function() { if (this.outputJson[dayFormat]) {
if (!config.editMode) { let output = this.outputJson[dayFormat];
new DoodleFront($(this), config); let index = output.indexOf(data[1]);
}
else { if (index !== -1) {
new DoodleBack($(this), config); output.splice(index, 1);
} }
}); }
};
return this; /**
* Init
*/
this.initLoad();
};
/** class Doodle {
* constructor(el, options) {
*/ moment.locale('fr')
function initializeConfig() { let config = this.initializeConfig(options);
let defaultOptions = {
editMode: false,
inputSelector: '',
defaultHours: [],
outputDateFormat: ''
};
return $.extend({}, defaultOptions, options); if (!config.editMode) {
new DoodleFront(el, config);
} }
else {
new DoodleBack(el, config);
}
}
}; initializeConfig(options) {
})(jQuery); let defaultOptions = {
editMode: false,
inputSelector: '',
defaultHours: [],
outputDateFormat: ''
};
return Object.assign(defaultOptions, options);
}
};
...@@ -12,11 +12,8 @@ ...@@ -12,11 +12,8 @@
"dayjs": "^1.8.14" "dayjs": "^1.8.14"
}, },
"devDependencies": { "devDependencies": {
"bootstrap": "4.0.0-alpha.6",
"font-awesome": "^4.7.0",
"flatpickr": "^4.6.13", "flatpickr": "^4.6.13",
"jquery": "^3.3.1", "font-awesome": "^4.7.0",
"moment": "^2.20.1", "moment": "^2.20.1"
"tether": "^1.4.3"
} }
} }
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
<title>Jumbotron Template for Bootstrap</title> <title>Jumbotron Template for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="./css/starter-template.css" rel="stylesheet"> <link href="./css/starter-template.css" rel="stylesheet">
<link href="../dist/css/doodle.css" rel="stylesheet"> <link href="../dist/css/doodle.css" rel="stylesheet">
...@@ -18,13 +15,13 @@ ...@@ -18,13 +15,13 @@
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<!-- Example row of columns --> <!-- Example row of columns -->
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="specific-doodle"> <div class="specific-doodle">
<div class="doodle table-responsive" data-json='{"29/07/2019":["11","12:15","13"],"30/07/2019":["11","12:15","13"],"31/07/2019":["11","12:15","13"],"01/08/2019":["13","12:15","11"],"02/08/2019":["11","12:15","13"]}' ></div> <div class="doodle table-responsive" data-json='{"29/07/2019":["11","13"],"30/07/2019":["11","12:15","13"],"31/07/2019":["11","12:15","13"],"01/08/2019":["13","12:15","11"],"02/08/2019":["11","12:15","13"]}' ></div>
<input type="hidden" id="inputVal" value='{"29/07/2019":["11","12:15","13"],"30/07/2019":["11","12:15","13"],"31/07/2019":["11","12:15","13"],"01/08/2019":["13","12:15","11"],"02/08/2019":["11","12:15","13"]}'> <input type="hidden" id="inputVal" value='{"29/07/2019":["11", "13"],"30/07/2019":["11","12:15","13"],"31/07/2019":["11","12:15","13"],"01/08/2019":["13","12:15","11"],"02/08/2019":["11","12:15","13"]}'>
</div> </div>
<!--<div class="doodle table-responsive" data-json="json/data.json"></div> <!--<div class="doodle table-responsive" data-json="json/data.json"></div>
...@@ -36,21 +33,12 @@ ...@@ -36,21 +33,12 @@
<footer> <footer>
<p>© Company 2017</p> <p>© Company 2017</p>
</footer> </footer>
</div> <!-- /container --> </div>
<script src="../node_modules/moment/min/moment.min.js"></script>
<!-- Jquery --> <script src="../node_modules/moment/min/moment-with-locales.js"></script>
<script src="../node_modules/jquery/dist/jquery.js"></script> <script src="../node_modules/flatpickr/dist/flatpickr.js"></script>
<!--<script src="../node_modules/tether/dist/js/tether.js"></script>--> <script src="../node_modules/flatpickr/dist/l10n/fr.js"></script>
<!-- Bootstrap / Boostrap datepicker / Bootstrap timepicker --> <script src="../dist/js/doodle.js" type="text/javascript"></script>
<!--<script src="../node_modules/bootstrap/dist/js/bootstrap.js"></script>--> <script src="../test/js/app.js" type="text/javascript"></script>
<!-- Moment -->
<script src="../node_modules/moment/min/moment.min.js"></script>
<script src="../node_modules/moment/min/moment-with-locales.js"></script>
<script src="../node_modules/flatpickr/dist/flatpickr.js"></script>
<script src="../node_modules/flatpickr/dist/l10n/fr.js"></script>
<script src="../dist/js/doodle.js" type="text/javascript"></script>
<script src="../test/js/app.js" type="text/javascript"></script>
</body></html> </body></html>
$( document ).ready(function() { new Doodle(document.querySelector('.doodle'), {
$('.doodle').Doodle({ editMode: true,
editMode: true, vertical: true,
vertical: true, inputSelector: '#inputVal'
inputSelector: '#inputVal'
});
}); });
...@@ -2,35 +2,20 @@ ...@@ -2,35 +2,20 @@
# yarn lockfile v1 # yarn lockfile v1
bootstrap-datepicker@^1.7.1: dayjs@^1.8.14:
version "1.7.1" version "1.11.5"
resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.7.1.tgz#4ee7faf34888dbec7834fbf9dbe7c4277e01ddaf" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93"
dependencies: integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==
jquery ">=1.7.1 <4.0.0"
bootstrap-timepicker@^0.5.2: flatpickr@^4.6.13:
version "0.5.2" version "4.6.13"
resolved "https://registry.yarnpkg.com/bootstrap-timepicker/-/bootstrap-timepicker-0.5.2.tgz#10ed9f2a2f0b8ccaefcde0fcf6a0738b919a3835" resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-4.6.13.tgz#8a029548187fd6e0d670908471e43abe9ad18d94"
integrity sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==
bootstrap@4.0.0-alpha.6:
version "4.0.0-alpha.6"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.0.0-alpha.6.tgz#4f54dd33ac0deac3b28407bc2df7ec608869c9c8"
dependencies:
jquery ">=1.9.1"
tether "^1.4.0"
font-awesome@^4.7.0: font-awesome@^4.7.0:
version "4.7.0" version "4.7.0"
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
"jquery@>=1.7.1 <4.0.0", jquery@>=1.9.1, jquery@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
moment@^2.20.1: moment@^2.20.1:
version "2.21.0" version "2.21.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a" resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a"
tether@^1.4.0, tether@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/tether/-/tether-1.4.3.tgz#fd547024c47b6e5c9b87e1880f997991a9a6ad54"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment