This commit is contained in:
Carlos Jimenez Ruiz 2019-04-03 15:19:05 +02:00
commit 09288c2c12
53 changed files with 1278 additions and 945 deletions

View File

@ -19,7 +19,13 @@ RUN cp /usr/local/bin/docker-entrypoint.sh /usr/local/bin/docker-init.sh \
WORKDIR /docker-entrypoint-initdb.d
ARG STAMP=unknown
COPY install /docker-entrypoint-initdb.d
COPY import-changes.sh config.ini /docker-entrypoint-initdb.d/import/
COPY changes /docker-entrypoint-initdb.d/import/changes
COPY docker-boot.sh /docker-entrypoint-initdb.d/
COPY dump /docker-entrypoint-initdb.d/dump
RUN mkdir /mysql-data \
&& /usr/local/bin/docker-init.sh mysqld --datadir /mysql-data \
&& chown -R mysql:mysql /mysql-data \

View File

@ -15,4 +15,4 @@ VIEW `vn`.`workerLabour` AS
JOIN `postgresql`.`profile` `pr` ON `pr`.`person_id` = `p`.`person_id`
JOIN `postgresql`.`business` `b` ON `b`.`client_id` = `pr`.`profile_id`
JOIN `postgresql`.`business_labour` `bl` ON `b`.`business_id` = `bl`.`business_id`
JOIN `vn`.`department` `d` ON `d`.`id` = `bl`.`department_id`
JOIN `vn`.`department` `d` ON `d`.`id` = `bl`.`department_id`

View File

@ -2,6 +2,4 @@
host = localhost
port = 3306
user = root
password = password
ssl-mode = DISABLED
enable_cleartext_plugin = ON
password = root

17
db/docker-boot.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
export MYSQL_PWD=root
mysql_import() {
FILE=$1
echo "[INFO] -> Imported $FILE"
mysql -u root --comments -f < "$FILE"
}
mysql_import dump/structure.sql
mysql_import dump/mysqlPlugins.sql
mysql_import dump/dumpedFixtures.sql
import/import-changes.sh
mysql_import dump/fixtures.sql
echo "[INFO] -> Import finished"

638
db/dump/dumpedFixtures.sql Normal file

File diff suppressed because one or more lines are too long

View File

@ -1323,3 +1323,7 @@ INSERT INTO `postgresql`.`calendar_employee` (`business_id`, `calendar_state_id`
(107, 1, DATE_ADD(CURDATE(), INTERVAL -12 DAY)),
(107, 2, DATE_ADD(CURDATE(), INTERVAL -20 DAY));
INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `user`, `password`, `title`)
VALUES
('1', 'https://websms.xtratelecom.es/api_php/server.wsdl', 'VERDINATURA', '182wbOKu', 'Verdnatura');

View File

@ -1,19 +1,102 @@
#!/bin/bash
echo "USE \`account\`;" > install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info account role roleRole roleInherit >> install/dump/dumpedFixtures.sql
echo "USE \`salix\`;" >> install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info salix ACL fieldAcl>> install/dump/dumpedFixtures.sql
echo "USE \`vn\`;" >> install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc tag alertLevel >> install/dump/dumpedFixtures.sql
echo "USE \`vn2008\`;" >> install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options \
Grupos Monedas container iva_group_codigo escritos cl_est cl_con cl_res cl_dev cl_mot department businessReasonEnd>> install/dump/dumpedFixtures.sql
echo "USE \`bi\`;" >> install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info bi tarifa_componentes tarifa_componentes_series >> install/dump/dumpedFixtures.sql
echo "USE \`cache\`;" >> install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info cache cache >> install/dump/dumpedFixtures.sql
echo "USE \`hedera\`;" >> install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info hedera tpvError tpvResponse tpvConfig >> install/dump/dumpedFixtures.sql
echo "USE \`postgresql\`;" >> install/dump/dumpedFixtures.sql
mysqldump --defaults-file=config.production.ini --no-create-info postgresql profile_type media_type professional_category labour_agreement \
calendar_labour_type workcenter>> install/dump/dumpedFixtures.sql
DUMPED_FILE="dump/dumpedFixtures.sql"
INI_FILE="config.production.ini"
dump_tables() {
SCHEMA=$1
echo "USE \`$SCHEMA\`;" >> "$DUMPED_FILE"
mysqldump --defaults-file="$INI_FILE" --no-create-info $@ >> "$DUMPED_FILE"
}
echo "" > "$DUMPED_FILE"
TABLES=(
util
config
)
dump_tables ${TABLES[@]}
TABLES=(
account
role
roleInherit
roleRole
)
dump_tables ${TABLES[@]}
TABLES=(
salix
ACL
fieldAcl
)
dump_tables ${TABLES[@]}
TABLES=(
vn
alertLevel
bookingPlanner
cplusInvoiceType477
cplusSubjectOp
cplusTaxBreak
pgc
tag
)
dump_tables ${TABLES[@]}
TABLES=(
vn2008
accion_dits
bionic_updating_options
businessReasonEnd
cl_est
cl_con
cl_res
cl_dev
cl_mot
container
department
escritos
Gastos
Grupos
iva_group_codigo
Monedas
state
tarifa_componentes
tarifa_componentes_series
Tintas
)
dump_tables ${TABLES[@]}
TABLES=(
bi
tarifa_componentes
tarifa_componentes_series
)
dump_tables ${TABLES[@]}
TABLES=(
cache
cache
)
dump_tables ${TABLES[@]}
TABLES=(
hedera
tpvConfig
tpvError
tpvResponse
)
dump_tables ${TABLES[@]}
TABLES=(
postgresql
calendar_labour_type
labour_agreement
media_type
professional_category
profile_type
workcenter
)
dump_tables ${TABLES[@]}

View File

@ -1,4 +1,29 @@
#!/bin/bash
#IMPORTANT Any changes in this file are to applyed to mirror file export-structure.cmd
mysqldump --defaults-file=config.production.ini --default-character-set=utf8 --no-data --comments --triggers --routines --events --databases \
account util vn2008 vn edi bs bi pbx cache salix vncontrol hedera stock postgresql nst> install/dump/structure.sql
SCHEMAS=(
account
bi
bs
cache
edi
hedera
nst
pbx
postgresql
salix
stock
util
vn
vn2008
vncontrol
)
mysqldump \
--defaults-file=config.production.ini \
--default-character-set=utf8 \
--no-data --comments \
--triggers --routines --events \
--databases \
${SCHEMAS[@]} \
> dump/structure.sql

View File

@ -3,7 +3,7 @@
FORCE=FALSE
usage() {
echo "Usage: $0 [-f] [environment]"
echo "[ERROR] Usage: $0 [-f] [environment]"
exit 1
}
@ -22,11 +22,14 @@ done
shift $(($OPTIND - 1))
ENV=$1
DIR="$(dirname "${BASH_SOURCE[0]}")"
# Production protection
if [ "$ENV" == "production" ]; then
echo ""
echo " ( ( ) ( ( ) ) "
echo " )\ ))\ ) ( /( )\ ) ( * ))\ ) ( /( ( /( "
echo " )\ ))\ ) ( /( )\ ) ( ))\ ) ( /( ( /( "
echo "(()/(()/( )\()|()/( ( )\ ) /(()/( )\()) )\())"
echo " /(_))(_)|(_)\ /(_)) )\ (((_) ( )(_))(_)|(_)\ ((_)\ "
echo "(_))(_)) ((_|_))_ _ ((_))\___(_(_()|_)) ((_) _((_)"
@ -36,33 +39,75 @@ if [ "$ENV" == "production" ]; then
echo ""
if [ "$FORCE" != "TRUE" ]; then
read -p "Are you sure? (Default: no) [yes|no]: " ANSWER
read -p "[INTERACTIVE] Are you sure? (Default: no) [yes|no]: " ANSWER
if [ "$ANSWER" != "yes" ]; then
echo "Aborting"
exit;
echo "[INFO] Aborting changes."
exit
fi
fi
fi
# Configuration file
if [ -z "$ENV" ]; then
ENV="test"
INI_FILE="$DIR/config.ini"
else
INI_FILE="$DIR/config.$ENV.ini"
fi
DIR="$(dirname "${BASH_SOURCE[0]}")"
INI_FILE="$DIR/config.$ENV.ini"
if [ ! -f "$INI_FILE" ]; then
echo "Config file doesn't exists: $INI_FILE"
echo "[ERROR] Config file doesn't exists: $INI_FILE"
exit 2
fi
echo "[INFO] Config file: $INI_FILE"
echo "[INFO] Applying changes"
echo "[INFO] Using config file: $INI_FILE"
# Import changes
# Fetching database version
for file in $DIR/install/changes/*.sql; do
echo "[INFO] -> $file"
mysql --defaults-file="$INI_FILE" < $file
GET_VERSION="SELECT dbVersion FROM util.config LIMIT 1"
DB_VERSION=`echo "$GET_VERSION" | mysql --defaults-file="$INI_FILE" --silent --raw`
echo "[INFO] Current database version: $DB_VERSION"
if [[ ! "$DB_VERSION" =~ ^[0-9]+$ ]]; then
echo "[ERROR] Cannot fetch the database version."
exit 3
fi
# Applying changes
N_CHANGES=0
echo "[INFO] Applying changes."
for DIR_PATH in "$DIR/changes/"*; do
DIR_NAME=$(basename $DIR_PATH)
DIR_VERSION=${DIR_NAME:0:5}
if [[ ! "$DIR_NAME" =~ ^[0-9]{5}(-[a-zA-Z0-9]+)?$ ]]; then
echo "[WARN] Ignoring wrong directory name: $DIR_NAME"
continue
fi
if [ "$DB_VERSION" -ge "$DIR_VERSION" ]; then
echo "[INFO] Ignoring already applied version: $DIR_NAME"
continue
fi
echo "[INFO] Applying version: $DIR_NAME"
for FILE in "$DIR_PATH/"*; do
echo "[INFO] -> $(basename "$FILE")"
mysql --defaults-file="$INI_FILE" --comments < $FILE
N_CHANGES=$((N_CHANGES + 1))
done
UPDATE_VERSION="UPDATE util.config SET dbVersion='$DIR_VERSION'"
echo "$UPDATE_VERSION" | mysql --defaults-file="$INI_FILE"
done
if [ "$N_CHANGES" -eq "0" ]; then
echo "[INFO] No changes to apply."
else
echo "[INFO] Changes applied succesfully."
fi

View File

@ -1,28 +0,0 @@
#!/bin/bash
export MYSQL_PWD=root
# Dump structure
echo "[INFO] -> Imported ./dump/structure.sql"
mysql -u root -f < ./dump/structure.sql
echo "[INFO] -> Imported ./dump/mysqlPlugins.sql"
mysql -u root -f < ./dump/mysqlPlugins.sql
# Import changes
for file in changes/*.sql; do
echo "[INFO] -> Imported ./$file"
mysql -u root -fc < $file
done
# Import changes for local db
for file in only-local/*.sql; do
echo "[INFO] -> Imported ./$file"
mysql -u root -fc < $file
done
# Import fixtures
echo "[INFO] -> Imported ./dump/dumpedFixtures.sql"
mysql -u root -f < ./dump/dumpedFixtures.sql
echo "[INFO] -> Imported ./dump/fixtures.sql"
mysql -u root -f < ./dump/fixtures.sql
echo "[INFO] -> Dumped database"

File diff suppressed because one or more lines are too long

View File

@ -10,8 +10,8 @@
</vn-auto>
<vn-one>
<strong>
<span translate>{{$ctrl.defaultDate | dateTime: 'MMMM'}}</span>
<span>{{$ctrl.defaultDate | dateTime: 'yyyy'}}</span>
<span translate>{{$ctrl.defaultDate | date: 'MMMM'}}</span>
<span>{{$ctrl.defaultDate | date: 'yyyy'}}</span>
</strong>
</vn-one>
<vn-auto>
@ -23,69 +23,41 @@
</vn-icon>
</vn-auto>
</vn-horizontal>
<vn-horizontal>
<!-- <vn-auto>
<vn-vertical class="body">
<section class="day">
<span></span>
</section>
<section class="day">
<span>1</span>
</section>
<section class="day">
<span>2</span>
</section>
<section class="day">
<span>3</span>
</section>
<section class="day">
<span>4</span>
</section>
<section class="day">
<span>5</span>
</section>
<section class="day">
<span>6</span>
</section>
</vn-vertical>
</vn-auto>
<vn-one> -->
<vn-vertical class="body">
<vn-horizontal class="weekdays">
<section class="day" ng-click="$ctrl.selectAll(1)">
<span>L</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(2)">
<span>M</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(3)">
<span>X</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(4)">
<span>J</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(5)">
<span>V</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(6)">
<span>S</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(0)">
<span>D</span>
</section>
</vn-horizontal>
<vn-horizontal class="days">
<section ng-repeat="day in $ctrl.days" class="day {{day.className}}"
ng-click="$ctrl.select($index)"
ng-style="{'color': day.style.color}">
<span ng-if="day.event" vn-tooltip="{{day.event.title}}"
ng-style="{'background-color': day.style.background}">
{{::day.date | date: 'd'}}
</span>
<span ng-if="!day.event">{{::day.date | date: 'd'}}</span>
</section>
</vn-horizontal>
</vn-vertical>
</vn-one>
</vn-horizontal>
<vn-vertical class="body">
<vn-horizontal class="weekdays">
<section class="day" ng-click="$ctrl.selectAll(1)">
<span>L</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(2)">
<span>M</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(3)">
<span>X</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(4)">
<span>J</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(5)">
<span>V</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(6)">
<span>S</span>
</section>
<section class="day" ng-click="$ctrl.selectAll(0)">
<span>D</span>
</section>
</vn-horizontal>
<vn-horizontal class="days">
<section ng-repeat="day in $ctrl.days" class="day {{day.event.className || day.className}}"
ng-click="$ctrl.select($index)"
ng-style="{'color': day.event.style.color}">
<span ng-if="day.event" vn-tooltip="{{day.event.title}}"
ng-style="{'background-color': day.event.style.background}">
{{::day.dated | date: 'd'}}
</span>
<span ng-if="!day.event">{{::day.dated | date: 'd'}}</span>
</section>
</vn-horizontal>
</vn-vertical>
</div>

View File

@ -15,37 +15,57 @@ export default class Calendar extends Component {
this.skip = 1;
}
/**
* Returns the initial date
*
* @return {Date} - Default date
*/
get defaultDate() {
return this._defaultDate;
}
/**
* Sets a new initial date
*
* @param {Date} value - New default date
*/
set defaultDate(value) {
this._defaultDate = value;
this.repaint();
}
get currentMonth() {
return this.defaultDate;
}
get events() {
return this._events;
}
set events(value) {
/**
* Sets initial events
*
* @param {Array} value - Array of events
*/
set data(value) {
if (!value) return;
value.map(event => {
event.date = new Date(event.date);
});
this.events = [];
this._events = value;
value.forEach(event => {
this.addEvent(event);
});
if (value.length && this.defaultDate)
this.repaint();
}
/**
* Gets current month date
*/
get currentMonth() {
return this.defaultDate;
}
/**
* Gets next month date
*
* @return {Date}
*/
get nextMonth() {
const newDate = new Date(this.currentMonth);
newDate.setMonth(this.currentMonth.getMonth() + 1);
@ -53,6 +73,11 @@ export default class Calendar extends Component {
return newDate;
}
/**
* Gets previous month date
*
* @return {Date}
*/
get previousMonth() {
const newDate = new Date(this.currentMonth);
newDate.setMonth(this.currentMonth.getMonth() - 1);
@ -101,73 +126,100 @@ export default class Calendar extends Component {
this.days = [];
for (let fieldIndex = 1; fieldIndex <= maxFields; fieldIndex++) {
for (let fieldIndex = 1; fieldIndex < maxFields; fieldIndex++) {
// Insert previous month days
if (fieldIndex < weekdayOffset) {
this.addDay(this.previousMonth, dayPrevious, 'gray');
const dated = new Date(
this.previousMonth.getFullYear(),
this.previousMonth.getMonth(), dayPrevious);
this.insertDay(dated, 'gray');
dayPrevious++;
} else if (fieldIndex >= weekdayOffset && dayCurrent <= currentLastDay) {
this.addDay(this.currentMonth, dayCurrent);
}
// Insert current month days
if (fieldIndex >= weekdayOffset && dayCurrent <= currentLastDay) {
const dated = new Date(
this.currentMonth.getFullYear(),
this.currentMonth.getMonth(), dayCurrent);
this.insertDay(dated);
dayCurrent++;
} else if (fieldIndex >= weekdayOffset && dayCurrent > currentLastDay) {
this.addDay(this.nextMonth, dayNext, 'gray');
}
// Insert next month days
if (fieldIndex >= weekdayOffset && dayCurrent > currentLastDay) {
const dated = new Date(
this.nextMonth.getFullYear(),
this.nextMonth.getMonth(), dayNext);
this.insertDay(dated, 'gray');
dayNext++;
}
}
}
addDay(date, day, className = '', style) {
const newDate = new Date(
date.getFullYear(),
date.getMonth(), day);
/**
* Inserts a date on an array of month days
*
* @param {Date} dated - Date of month
* @param {String} className - Default class style
*/
insertDay(dated, className = '') {
let event = this.events.find(event => {
return event.date >= newDate && event.date <= newDate;
return event.dated >= dated && event.dated <= dated;
});
if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 0)
// Weeekends
if (dated.getMonth() === this.currentMonth.getMonth() && dated.getDay() == 0)
className = 'red';
if (event) {
className = event.className;
style = event.style;
}
this.days.push({date: newDate, className, style, event});
this.days.push({dated, className, event});
}
/**
* Adds a new calendar event
*
* @param {Date} date - Day to add event
* @param {String} className - [green, blue, orange, red]
* @param {String} title - Tooltip description
* @param {Boolean} isRemovable - True if is removable by users
* @param {Object} options - Event params
* @param {Date} options.dated - Day to add event
* @param {String} options.title - Tooltip description
* @param {String} options.className - ClassName style
* @param {Object} options.style - Style properties
* @param {Boolean} options.isRemovable - True if is removable by users
*/
addEvent(date, className, title = '', isRemovable = true) {
addEvent(options) {
if (!Object.hasOwnProperty.call(options, 'isRemovable'))
options.isRemovable = true;
options.dated = new Date(options.dated);
options.dated.setHours(0, 0, 0, 0);
const event = this.events.findIndex(event => {
return event.date >= date && event.date <= date;
return event.dated >= options.dated && event.dated <= options.dated;
});
if (event == -1)
this.events.push({date, className, title, isRemovable});
this.repaint();
if (event < 0)
this.events.push(options);
}
removeEvent(date) {
/**
* Removes an event from an array of events
* @param {Object} dated - Dated event
*/
removeEvent(dated) {
dated = new Date(dated);
dated.setHours(0, 0, 0, 0);
const event = this.events.findIndex(event => {
return event.date >= date && event.date <= date;
return event.dated >= dated && event.dated <= dated;
});
if (event > -1)
this.events.splice(event, 1);
this.repaint();
}
/**
* Moves to next month
* Moves to next month(s)
*
* @param {Integer} skip - Months to skip at once
*/
@ -180,7 +232,7 @@ export default class Calendar extends Component {
}
/**
* Moves to previous month
* Moves to previous month(s)
*
* @param {Integer} skip - Months to skip at once
*/
@ -204,11 +256,16 @@ export default class Calendar extends Component {
this.emit('selection', {values: [day]});
}
/**
* WeekDay selection event
*
* @param {Integer} weekday - weekday index
*/
selectAll(weekday) {
let selected = [];
for (let i in this.days) {
const day = this.days[i];
const date = day.date;
const date = day.dated;
day.index = i;
if (date.getDay() === weekday && date.getMonth() == this.defaultDate.getMonth())
selected.push(day);
@ -217,14 +274,14 @@ export default class Calendar extends Component {
}
}
Calendar.$inject = ['$element', '$scope', '$attrs'];
Calendar.$inject = ['$element', '$scope'];
ngModule.component('vnCalendar', {
template: require('./index.html'),
controller: Calendar,
bindings: {
model: '<',
events: '<?',
data: '<?',
defaultDate: '<?',
onSelection: '&?',
onMoveNext: '&?',

View File

@ -0,0 +1,121 @@
describe('Component vnCalendar', () => {
let controller;
let $element;
beforeEach(ngModule('vnCore'));
beforeEach(inject(($compile, $rootScope) => {
$element = $compile(`<vn-calendar></vn-calendar`)($rootScope);
controller = $element.controller('vnCalendar');
controller.defaultDate = new Date();
}));
afterEach(() => {
$element.remove();
});
describe('data() setter', () => {
it(`should set an array of events and convert string dates to string object, then call repaint() method`, () => {
spyOn(controller, 'repaint');
let currentDate = new Date().toString();
controller.data = [
{dated: currentDate, title: 'Event 1'},
{dated: currentDate, title: 'Event 2'},
];
expect(controller.events[0].dated instanceof Object).toBeTruthy();
expect(controller.repaint).toHaveBeenCalledWith();
});
});
describe('addEvent()', () => {
it(`should add an event to an array of events`, () => {
controller.events = [];
controller.addEvent({
dated: new Date(),
title: 'My event',
className: 'color'
});
const firstEvent = controller.events[0];
expect(firstEvent.title).toEqual('My event');
expect(firstEvent.isRemovable).toBeDefined();
expect(firstEvent.isRemovable).toBeTruthy();
});
it(`should not repeat an event for the same date`, () => {
const curDate = new Date();
curDate.setHours(0, 0, 0, 0);
controller.events = [{
dated: curDate,
title: 'My event 1',
className: 'color'
}];
controller.addEvent({
dated: curDate,
title: 'My event 2',
className: 'color'
});
const firstEvent = controller.events[0];
expect(controller.events.length).toEqual(1);
expect(firstEvent.title).toEqual('My event 1');
});
});
describe('removeEvent()', () => {
it(`should remove an event from an array of events`, () => {
const curDate = new Date();
controller._events = [{
dated: curDate,
title: 'My event 1',
className: 'color'
}];
controller.removeEvent(curDate);
expect(controller.events.length).toEqual(0);
});
});
describe('moveNext()', () => {
it(`should shift to the next n months, then emit a 'moveNext' event`, () => {
spyOn(controller, 'emit');
const currentMonth = controller.defaultDate.getMonth();
let nextMonth = currentMonth + 1;
controller.moveNext(1);
expect(controller.defaultDate.getMonth()).toEqual(nextMonth);
expect(controller.emit).toHaveBeenCalledWith('moveNext');
});
});
describe('movePrevious()', () => {
it(`should shift to the previous n months, then emit a 'movePrevious' event`, () => {
spyOn(controller, 'emit');
const currentMonth = controller.defaultDate.getMonth();
let previousMonth = currentMonth - 1;
controller.movePrevious(1);
expect(controller.defaultDate.getMonth()).toEqual(previousMonth);
expect(controller.emit).toHaveBeenCalledWith('movePrevious');
});
});
describe('select()', () => {
it(`should return the selected element, then emit a 'selection' event`, () => {
spyOn(controller, 'emit');
const days = [{dated: new Date()}];
controller.days = days;
controller.select(0);
expect(controller.emit).toHaveBeenCalledWith('selection', {values: days});
});
});
});

View File

@ -19,6 +19,7 @@ vn-calendar {
.weekdays {
border-bottom: 1px solid $color-hover-cd;
border-top: 1px solid $color-hover-cd;
color: $color-font-secondary;
font-weight: bold
}

View File

@ -50,7 +50,7 @@ export function directive($http, $compile, vnApp, $translate) {
});
if ($scope.css || document.querySelector('style[id="uvc"]')) {
if (document.querySelector('style[id="uvc"]')) {
let child = document.querySelector('style[id="uvc"]');
child.parentNode.removeChild(child);
}

Binary file not shown.

Binary file not shown.

View File

@ -76,5 +76,6 @@
"You cannot remove this department": "No puedes eliminar este departamento",
"The extension must be unique": "La extensión debe ser unica",
"The secret can't be blank": "La contraseña no puede estar en blanco",
"EXTENSION_INVALID_FORMAT": "La extensión es invalida"
"EXTENSION_INVALID_FORMAT": "La extensión es invalida",
"We weren't able to send this SMS": "No hemos podido enviar el SMS"
}

View File

@ -7,20 +7,14 @@
primary-key="zoneFk"
auto-load="true">
</vn-crud-model>
<vn-calendar
pad-small
vn-id="stMonth"
events="$ctrl.events"
skip="2"
<vn-calendar pad-small vn-id="stMonth" skip="2"
data="$ctrl.events"
on-selection="$ctrl.onSelection(stMonth, values)"
on-move-next="$ctrl.onMoveNext(ndMonth)"
on-move-previous="$ctrl.onMovePrevious(ndMonth)">
</vn-calendar>
<vn-calendar
pad-small
vn-id="ndMonth"
events="$ctrl.events"
skip="2"
<vn-calendar pad-small vn-id="ndMonth" skip="2"
data="$ctrl.events"
display-controls="false"
on-selection="$ctrl.onSelection(ndMonth, values)"
default-date="$ctrl.ndMonthDate">

View File

@ -9,7 +9,6 @@ class Controller {
this.stMonthDate = new Date();
this.ndMonthDate = new Date();
this.ndMonthDate.setMonth(this.ndMonthDate.getMonth() + 1);
this.events = [];
}
$postLink() {
@ -53,28 +52,23 @@ class Controller {
this._data = value;
if (!value) return;
const events = [];
value.forEach(event => {
let date = new Date(event.delivered);
date.setHours(0, 0, 0, 0);
events.push({
date: date,
dated: event.delivered,
className: 'green-circle',
title: 'Has delivery',
isRemovable: true
title: 'Has delivery'
});
});
this.events = this.events.concat(events);
this.events = events;
}
onSelection(calendar, values) {
let totalEvents = 0;
values.forEach(day => {
const exists = this.events.findIndex(event => {
return event.date >= day.date && event.date <= day.date
const exists = calendar.events.findIndex(event => {
return event.dated >= day.dated && event.dated <= day.dated
&& event.isRemovable;
});
@ -82,54 +76,56 @@ class Controller {
});
if (totalEvents > (values.length / 2))
this.removeEvents(values);
this.removeEvents(calendar, values);
else
this.addEvents(values);
this.insertEvents(calendar, values);
}
addEvents(days) {
insertEvents(calendar, days) {
days.forEach(day => {
const event = this.events.find(event => {
return event.date >= day.date && event.date <= day.date;
const event = calendar.events.find(event => {
return event.dated >= day.dated && event.dated <= day.dated;
});
if (event)
return false;
if (event) return false;
this.$scope.model.insert({
zoneFk: this.zone.id,
delivered: day.date
delivered: day.dated
});
this.stMonth.addEvent(day.date, 'green-circle', 'Has delivery', true);
this.stMonth.repaint();
this.ndMonth.addEvent(day.date, 'green-circle', 'Has delivery', true);
this.ndMonth.repaint();
calendar.addEvent({
dated: day.dated,
className: 'green-circle',
title: 'Has delivery'
});
});
this.$scope.model.save().then(() => {
this.events = calendar.events;
});
this.$scope.model.save();
}
removeEvents(days) {
removeEvents(calendar, days) {
let dates = [];
days.forEach(day => {
const event = this.events.find(event => {
return event.date >= day.date && event.date <= day.date;
const event = calendar.events.find(event => {
return event.dated >= day.dated && event.dated <= day.dated;
});
if (event && !event.isRemovable)
return false;
dates.push(day.date);
dates.push(day.dated);
this.stMonth.removeEvent(day.date);
this.stMonth.repaint();
this.ndMonth.removeEvent(day.date);
this.ndMonth.repaint();
calendar.removeEvent(day.dated);
});
if (dates.length == 0) return;
const params = {zoneFk: this.zone.id, dates};
this.$http.post('/agency/api/zoneCalendars/removeByDate', params);
this.$http.post('/agency/api/zoneCalendars/removeByDate', params).then(() => {
this.events = calendar.events;
});
}
onMoveNext(calendar) {

View File

@ -57,7 +57,7 @@
"params": {
"item-tags": "$ctrl.itemTags"
},
"acl": ["buyer"]
"acl": ["buyer", "accessory"]
}, {
"url" : "/tax",
"state": "item.card.tax",

View File

@ -31,7 +31,6 @@
data="tags"
on-change="$ctrl.getSourceTable(tag)"
show-field="name"
vn-acl="buyer"
vn-focus>
</vn-autocomplete>
<vn-textfield
@ -40,8 +39,7 @@
vn-three
label="Value"
model="itemTag.value"
rule="itemTag.value"
vn-acl="buyer">
rule="itemTag.value">
</vn-textfield>
<vn-autocomplete
ng-show="tag.selection.isFree === false"
@ -51,8 +49,7 @@
label="Value"
field="itemTag.value"
show-field="{{$ctrl.sourceTables[itemTag.id].field}}"
value-field="{{$ctrl.sourceTables[itemTag.id].field}}"
vn-acl="buyer">
value-field="{{$ctrl.sourceTables[itemTag.id].field}}">
</vn-autocomplete>
<vn-textfield
vn-tab-index="-1"
@ -60,8 +57,7 @@
type="number"
label="Relevancy"
model="itemTag.priority"
rule="itemTag.priority"
vn-acl="buyer">
rule="itemTag.priority">
</vn-textfield>
<vn-none>
<vn-icon-button

View File

@ -28,6 +28,16 @@
value-field="id">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-date-picker vn-one
label="From"
model="filter.from">
</vn-date-picker>
<vn-date-picker vn-one
label="To"
model="filter.to">
</vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one

View File

@ -124,7 +124,7 @@ module.exports = Self => {
let totalHolidays = contract.holidays().days;
if (contract.started && contract.ended)
totalHolidays = getHolidaysByContract(contract);
totalHolidays = getHolidaysByContract(started, contract);
calendar.totalHolidays += totalHolidays;
@ -141,10 +141,10 @@ module.exports = Self => {
return [calendar, absences, holidays];
};
function getHolidaysByContract(contract) {
function getHolidaysByContract(started, contract) {
const dayTimestamp = 1000 * 60 * 60 * 24;
const endedTime = contract.ended.getTime();
const startedTime = contract.started.getTime();
const startedTime = started.getTime();
const contractDays = Math.floor((endedTime - startedTime) / dayTimestamp);
if (contractDays < 365)

View File

@ -20,7 +20,7 @@ describe('Worker absences()', () => {
let calendar = result[0];
let absences = result[1];
expect(calendar.totalHolidays).toEqual(14);
expect(calendar.totalHolidays).toEqual(20);
expect(calendar.holidaysEnjoyed).toEqual(5);
let firstType = absences[0].absenceType().name;

View File

@ -11,9 +11,9 @@
</vn-horizontal>
<vn-horizontal class="calendar-list">
<section class="calendar" ng-repeat="month in $ctrl.months">
<vn-calendar vn-id="stMonth"
<vn-calendar
data="$ctrl.events"
default-date="month"
events="$ctrl.events"
display-controls="false">
</vn-calendar>
</section>

View File

@ -7,7 +7,6 @@ class Controller {
this.$http = $http;
this.months = this.monthsOfYear();
this.events = [];
this.eventMap = {};
}
get worker() {
@ -31,7 +30,6 @@ class Controller {
this.setHolidays(res.data);
this.setWorkerCalendar(res.data);
this.calendar = res.data.calendar;
});
}
@ -43,7 +41,7 @@ class Controller {
const events = [];
holidays.forEach(holiday => {
events.push({
date: holiday.dated,
dated: holiday.dated,
className: 'red',
title: holiday.detail.description || holiday.type.name,
isRemovable: false
@ -60,7 +58,7 @@ class Controller {
absences.forEach(absence => {
const absenceType = absence.absenceType;
events.push({
date: absence.dated,
dated: absence.dated,
title: absenceType.name,
style: {
background: absenceType.rgb

151
package-lock.json generated
View File

@ -1505,7 +1505,7 @@
},
"util": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"dev": true,
"requires": {
@ -1733,7 +1733,7 @@
"base": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
"integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=",
"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
"dev": true,
"requires": {
"cache-base": "^1.0.1",
@ -2321,7 +2321,7 @@
"cache-base": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
"integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=",
"integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
"dev": true,
"requires": {
"collection-visit": "^1.0.0",
@ -2496,7 +2496,7 @@
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
"integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=",
"integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
"dev": true,
"requires": {
"arr-union": "^3.1.0",
@ -2656,7 +2656,7 @@
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
@ -3194,13 +3194,13 @@
"dependencies": {
"jsesc": {
"version": "0.5.0",
"resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true
},
"regexpu-core": {
"version": "1.0.0",
"resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz",
"integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=",
"dev": true,
"requires": {
@ -3211,13 +3211,13 @@
},
"regjsgen": {
"version": "0.2.0",
"resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
"dev": true
},
"regjsparser": {
"version": "0.1.5",
"resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
"dev": true,
"requires": {
@ -3687,7 +3687,7 @@
"dot-prop": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
"integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=",
"integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==",
"dev": true,
"requires": {
"is-obj": "^1.0.0"
@ -3847,7 +3847,7 @@
"dependencies": {
"fs-extra": {
"version": "0.30.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
"resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
"integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=",
"dev": true,
"requires": {
@ -3860,7 +3860,7 @@
},
"jsonfile": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
"dev": true,
"requires": {
@ -4844,7 +4844,7 @@
},
"file-loader": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
"resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
"integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==",
"dev": true,
"requires": {
@ -5181,7 +5181,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -5202,12 +5203,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -5222,17 +5225,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -5349,7 +5355,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -5361,6 +5368,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -5375,6 +5383,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -5382,12 +5391,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@ -5406,6 +5417,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -5486,7 +5498,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -5498,6 +5511,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -5583,7 +5597,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -5619,6 +5634,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -5638,6 +5654,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -5681,12 +5698,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@ -5888,7 +5907,7 @@
"global-modules": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
"integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=",
"integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
"dev": true,
"requires": {
"global-prefix": "^1.0.1",
@ -6240,7 +6259,7 @@
},
"kind-of": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
"dev": true
},
@ -6424,7 +6443,7 @@
"dependencies": {
"es6-promise": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
"resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
"integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=",
"dev": true
},
@ -7439,7 +7458,7 @@
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"dev": true,
"requires": {
"isobject": "^3.0.1"
@ -7609,7 +7628,7 @@
},
"jasmine-core": {
"version": "2.99.1",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz",
"resolved": "http://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz",
"integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=",
"dev": true
},
@ -7626,7 +7645,7 @@
"jasmine-spec-reporter": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz",
"integrity": "sha1-HWMq7ANBZwrTJPkrqEtLMrNeniI=",
"integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==",
"dev": true,
"requires": {
"colors": "1.1.2"
@ -7861,7 +7880,7 @@
"karma-chrome-launcher": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
"integrity": "sha1-zxudBxNswY/iOTJ9JGVMPbw2is8=",
"integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==",
"dev": true,
"requires": {
"fs-access": "^1.0.0",
@ -9671,7 +9690,7 @@
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"minstache": {
@ -9685,7 +9704,7 @@
"dependencies": {
"commander": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz",
"resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz",
"integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=",
"dev": true,
"requires": {
@ -10143,7 +10162,7 @@
"dependencies": {
"jsesc": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true
}
@ -10773,7 +10792,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -10816,7 +10836,8 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
@ -10827,7 +10848,8 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -10944,7 +10966,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -10956,6 +10979,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -10985,6 +11009,7 @@
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -11003,6 +11028,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -11083,7 +11109,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -11095,6 +11122,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -11180,7 +11208,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -11216,6 +11245,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -11235,6 +11265,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -11278,12 +11309,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@ -11582,7 +11615,7 @@
"dependencies": {
"minimist": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
"dev": true
},
@ -12138,7 +12171,7 @@
},
"pretty-bytes": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
"resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
"integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
"dev": true,
"requires": {
@ -12209,7 +12242,7 @@
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true,
"requires": {
@ -12221,13 +12254,13 @@
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true
},
"through2": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
"resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
"integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
"dev": true,
"requires": {
@ -13118,7 +13151,7 @@
},
"safe-regex": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"dev": true,
"requires": {
@ -13243,7 +13276,7 @@
"dependencies": {
"source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"dev": true,
"requires": {
@ -13383,7 +13416,7 @@
"set-value": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
"integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=",
"integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
"dev": true,
"requires": {
"extend-shallow": "^2.0.1",
@ -13494,7 +13527,7 @@
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
@ -13570,7 +13603,7 @@
"snapdragon-node": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
"integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=",
"integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
"dev": true,
"requires": {
"define-property": "^1.0.0",
@ -13621,7 +13654,7 @@
"snapdragon-util": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
"integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=",
"integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
"dev": true,
"requires": {
"kind-of": "^3.2.0"
@ -13977,7 +14010,7 @@
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
"integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=",
"integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
"dev": true,
"requires": {
"extend-shallow": "^3.0.0"
@ -14161,7 +14194,7 @@
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
@ -15046,7 +15079,7 @@
"touch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
"dev": true,
"requires": {
"nopt": "~1.0.10"
@ -15532,7 +15565,7 @@
"useragent": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
"integrity": "sha1-IX+UOtVAyyEoZYqyP8lg9qiMmXI=",
"integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==",
"dev": true,
"requires": {
"lru-cache": "4.1.x",
@ -16269,7 +16302,7 @@
},
"globby": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
"resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
"dev": true,
"requires": {
@ -16282,7 +16315,7 @@
"dependencies": {
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
}