@colijnit/sharedcomponents 1.0.68 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/colijnit-sharedcomponents.umd.js +50 -3
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/lib/components/date-planning/component/agenda/agenda-header.component.js +32 -3
- package/esm2015/lib/enum/calendar-view.enum.js +2 -1
- package/esm2015/lib/model/icon-svg.js +3 -3
- package/esm2015/lib/utils/calendar.utils.js +34 -1
- package/fesm2015/colijnit-sharedcomponents.js +67 -4
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/lib/components/date-planning/component/agenda/style/_layout.scss +68 -55
- package/lib/components/date-planning/component/agenda/style/_material-definition.scss +1 -1
- package/lib/components/date-planning/style/_layout.scss +1 -0
- package/lib/enum/calendar-view.enum.d.ts +1 -0
- package/lib/utils/calendar.utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1935,8 +1935,8 @@
|
|
|
1935
1935
|
"arrow_down": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><polygon points=\"17.06 21.14 17.06 2.5 12.94 2.5 12.94 21.14 12.94 21.14 8.64 21.14 15 27.5 21.36 21.14 17.06 21.14\" fill=\"#484f60\"/></g></svg>",
|
|
1936
1936
|
"arrow_down_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path d=\"M174.6 472.6c4.5 4.7 10.8 7.4 17.4 7.4s12.8-2.7 17.4-7.4l168-176c9.2-9.6 8.8-24.8-.8-33.9s-24.8-8.8-33.9 .8L216 396.1 216 56c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 340.1L41.4 263.4c-9.2-9.6-24.3-9.9-33.9-.8s-9.9 24.3-.8 33.9l168 176z\"/></svg>",
|
|
1937
1937
|
"arrow_fat_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"37.5 25 25.2 12.7 25.2 20.35 12.5 20.35 12.5 29.66 25.2 29.66 25.2 37.3 37.5 25\" fill=\"#484f60\"/></svg>",
|
|
1938
|
-
"arrow_point_left": "<svg
|
|
1939
|
-
"arrow_point_right": "<svg
|
|
1938
|
+
"arrow_point_left": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\"/></svg>",
|
|
1939
|
+
"arrow_point_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"/></svg>",
|
|
1940
1940
|
"at_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M207.8 20.73c-93.45 18.32-168.7 93.66-187 187.1c-27.64 140.9 68.65 266.2 199.1 285.1c19.01 2.888 36.17-12.26 36.17-31.49l.0001-.6631c0-15.74-11.44-28.88-26.84-31.24c-84.35-12.98-149.2-86.13-149.2-174.2c0-102.9 88.61-185.5 193.4-175.4c91.54 8.869 158.6 91.25 158.6 183.2l0 16.16c0 22.09-17.94 40.05-40 40.05s-40.01-17.96-40.01-40.05v-120.1c0-8.847-7.161-16.02-16.01-16.02l-31.98 .0036c-7.299 0-13.2 4.992-15.12 11.68c-24.85-12.15-54.24-16.38-86.06-5.106c-38.75 13.73-68.12 48.91-73.72 89.64c-9.483 69.01 43.81 128 110.9 128c26.44 0 50.43-9.544 69.59-24.88c24 31.3 65.23 48.69 109.4 37.49C465.2 369.3 496 324.1 495.1 277.2V256.3C495.1 107.1 361.2-9.332 207.8 20.73zM239.1 304.3c-26.47 0-48-21.56-48-48.05s21.53-48.05 48-48.05s48 21.56 48 48.05S266.5 304.3 239.1 304.3z\"/></svg>",
|
|
1941
1941
|
"barcode_read_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M56 48c-4.4 0-8 3.6-8 8v80c0 13.3-10.7 24-24 24s-24-10.7-24-24V56C0 25.1 25.1 0 56 0h80c13.3 0 24 10.7 24 24s-10.7 24-24 24H56zm64 80c13.3 0 24 10.7 24 24V360c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zm56 16c0-8.8 7.2-16 16-16s16 7.2 16 16V368c0 8.8-7.2 16-16 16s-16-7.2-16-16V144zm272 0c0-8.8 7.2-16 16-16s16 7.2 16 16V368c0 8.8-7.2 16-16 16s-16-7.2-16-16V144zm-208 8c0-13.3 10.7-24 24-24s24 10.7 24 24V360c0 13.3-10.7 24-24 24s-24-10.7-24-24V152zm152-24c13.3 0 24 10.7 24 24V360c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM528 56c0-4.4-3.6-8-8-8H440c-13.3 0-24-10.7-24-24s10.7-24 24-24h80c30.9 0 56 25.1 56 56v80c0 13.3-10.7 24-24 24s-24-10.7-24-24V56zM56 464h80c13.3 0 24 10.7 24 24s-10.7 24-24 24H56c-30.9 0-56-25.1-56-56V376c0-13.3 10.7-24 24-24s24 10.7 24 24v80c0 4.4 3.6 8 8 8zm472-8V376c0-13.3 10.7-24 24-24s24 10.7 24 24v80c0 30.9-25.1 56-56 56H440c-13.3 0-24-10.7-24-24s10.7-24 24-24h80c4.4 0 8-3.6 8-8z\"/></svg>",
|
|
1942
1942
|
"bring_forward_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path fill=\"#183153\" d=\"M224 464H448C456.8 464 464 456.8 464 448V224C464 215.2 456.8 208 448 208H384V160H448C483.3 160 512 188.7 512 224V448C512 483.3 483.3 512 448 512H224C188.7 512 160 483.3 160 448V384H208V448C208 456.8 215.2 464 224 464zM64 352C28.65 352 0 323.3 0 288V64C0 28.65 28.65 0 64 0H288C323.3 0 352 28.65 352 64V288C352 323.3 323.3 352 288 352H64z\"/></svg>",
|
|
@@ -4972,6 +4972,7 @@
|
|
|
4972
4972
|
exports.CalendarView = void 0;
|
|
4973
4973
|
(function (CalendarView) {
|
|
4974
4974
|
CalendarView["DayView"] = "DAY";
|
|
4975
|
+
CalendarView["DaysAround"] = "DAYS_AROUND";
|
|
4975
4976
|
CalendarView["WeekView"] = "WEEK";
|
|
4976
4977
|
CalendarView["WeekSelectView"] = "WEEK_SELECT";
|
|
4977
4978
|
CalendarView["WeekPlanningView"] = "WEEK_PLANNING";
|
|
@@ -5811,6 +5812,39 @@
|
|
|
5811
5812
|
week.weekDays = daysOfWeek;
|
|
5812
5813
|
return week;
|
|
5813
5814
|
};
|
|
5815
|
+
CalendarUtils.GetDaysAround = function (date) {
|
|
5816
|
+
var daysAround = [];
|
|
5817
|
+
var currentDate = date ? new Date(date) : new Date();
|
|
5818
|
+
currentDate.setHours(0, 0, 0, 0);
|
|
5819
|
+
// Get the current day and go two days back
|
|
5820
|
+
var day = new Date(currentDate);
|
|
5821
|
+
day.setDate(day.getDate() - 2);
|
|
5822
|
+
// Loop to get the two days before and four days after the current day
|
|
5823
|
+
for (var i = 0; i < 7; i++) {
|
|
5824
|
+
var dayPerWeek = new Weekday();
|
|
5825
|
+
var dayHours = CalendarUtils.GetDayHours(day);
|
|
5826
|
+
dayPerWeek.newMonth = day.getMonth() !== currentDate.getMonth();
|
|
5827
|
+
dayPerWeek.weekdaySelected = day.getDate() === currentDate.getDate();
|
|
5828
|
+
dayPerWeek.weekdayDay = day.getDate();
|
|
5829
|
+
var options = { weekday: "short" };
|
|
5830
|
+
dayPerWeek.weekdayShort = day.toLocaleDateString(CalendarUtils.Locale, options);
|
|
5831
|
+
options = { weekday: "long" };
|
|
5832
|
+
dayPerWeek.weekdayLong = day.toLocaleDateString(CalendarUtils.Locale, options);
|
|
5833
|
+
options = { month: "short" };
|
|
5834
|
+
dayPerWeek.weekdayMonthShort = day.toLocaleDateString(CalendarUtils.Locale, options);
|
|
5835
|
+
options = { month: "long" };
|
|
5836
|
+
dayPerWeek.weekdayMonthLong = day.toLocaleDateString(CalendarUtils.Locale, options);
|
|
5837
|
+
dayPerWeek.weekdayYear = day.getFullYear();
|
|
5838
|
+
dayPerWeek.date = new Date(day);
|
|
5839
|
+
dayPerWeek.datesByTheHour = dayHours;
|
|
5840
|
+
daysAround.push(dayPerWeek);
|
|
5841
|
+
// Move to the next day
|
|
5842
|
+
day.setDate(day.getDate() + 1);
|
|
5843
|
+
}
|
|
5844
|
+
var week = new Week();
|
|
5845
|
+
week.weekDays = daysAround;
|
|
5846
|
+
return week;
|
|
5847
|
+
};
|
|
5814
5848
|
return CalendarUtils;
|
|
5815
5849
|
}());
|
|
5816
5850
|
CalendarUtils.Locale = undefined;
|
|
@@ -5943,6 +5977,9 @@
|
|
|
5943
5977
|
case exports.CalendarView.DayView:
|
|
5944
5978
|
newDate.setDate(this.selectedDate.getDate() - 1);
|
|
5945
5979
|
break;
|
|
5980
|
+
case exports.CalendarView.DaysAround:
|
|
5981
|
+
newDate.setDate(this.selectedDate.getDate() - 1);
|
|
5982
|
+
break;
|
|
5946
5983
|
case exports.CalendarView.WeekView:
|
|
5947
5984
|
newDate.setDate(this.selectedDate.getDate() - 3);
|
|
5948
5985
|
break;
|
|
@@ -5964,6 +6001,9 @@
|
|
|
5964
6001
|
case exports.CalendarView.DayView:
|
|
5965
6002
|
newDate.setDate(this.selectedDate.getDate() + 1);
|
|
5966
6003
|
break;
|
|
6004
|
+
case exports.CalendarView.DaysAround:
|
|
6005
|
+
newDate.setDate(this.selectedDate.getDate() + 1);
|
|
6006
|
+
break;
|
|
5967
6007
|
case exports.CalendarView.WeekView:
|
|
5968
6008
|
newDate.setDate(this.selectedDate.getDate() + 3);
|
|
5969
6009
|
break;
|
|
@@ -6006,6 +6046,13 @@
|
|
|
6006
6046
|
day.description = this.selectedDate.toLocaleDateString(this._locale, options);
|
|
6007
6047
|
this.day = day;
|
|
6008
6048
|
break;
|
|
6049
|
+
case exports.CalendarView.DaysAround:
|
|
6050
|
+
var weekAroundView = CalendarUtils.GetDaysAround(this.selectedDate);
|
|
6051
|
+
this.weekDays = weekAroundView.weekDays;
|
|
6052
|
+
if (this.firstAvailableDate) {
|
|
6053
|
+
this.showBackButton = this.weekDays.find(function (wd) { return DateUtils.DatesEqual(_this.firstAvailableDate, wd.date); }) === undefined;
|
|
6054
|
+
}
|
|
6055
|
+
break;
|
|
6009
6056
|
case exports.CalendarView.WeekView:
|
|
6010
6057
|
var weekView = CalendarUtils.GetDaysOfWeek(this.selectedDate);
|
|
6011
6058
|
this.weekDays = weekView.weekDays;
|
|
@@ -6047,7 +6094,7 @@
|
|
|
6047
6094
|
AgendaHeaderComponent.decorators = [
|
|
6048
6095
|
{ type: i0.Component, args: [{
|
|
6049
6096
|
selector: "agenda-header",
|
|
6050
|
-
template: "\n <div class=\"agenda-header-wrapper\" *ngIf=\"view === viewTypes.DayView\">\n <div class=\"hour-label-placeholder\" *ngIf=\"viewSelection\">\n <view-select [selectedView]=\"view\" (selectedViewChange)=\"changeTheView($event)\"></view-select>\n </div>\n <div class=\"week-day-label\">\n <co-icon class=\"pointer-hover no-user-select sub-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\" (click)=\"subUnit()\"></co-icon>\n <div class=\"day-description\" [textContent]=\"day.description\"></div>\n <co-icon class=\"pointer-hover no-user-select add-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\" (click)=\"addUnit()\"></co-icon>\n </div>\n </div>\n <div class=\"agenda-header-wrapper\" *ngIf=\"view === viewTypes.
|
|
6097
|
+
template: "\n <div class=\"agenda-header-wrapper\" *ngIf=\"view === viewTypes.DayView\">\n <div class=\"hour-label-placeholder\" *ngIf=\"viewSelection\">\n <view-select [selectedView]=\"view\" (selectedViewChange)=\"changeTheView($event)\"></view-select>\n </div>\n <div class=\"week-day-label\">\n <co-icon class=\"pointer-hover no-user-select sub-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\" (click)=\"subUnit()\"></co-icon>\n <div class=\"day-description\" [textContent]=\"day.description\"></div>\n <co-icon class=\"pointer-hover no-user-select add-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\" (click)=\"addUnit()\"></co-icon>\n </div>\n </div>\n <div class=\"agenda-header-wrapper days-around\" *ngIf=\"view === viewTypes.DaysAround\">\n <div class=\"hour-label-placeholder\" *ngIf=\"viewSelection\">\n <view-select [selectedView]=\"view\" (selectedViewChange)=\"changeTheView($event)\"></view-select>\n </div>\n <div class=\"week-day-label days-around\" *ngFor=\"let weekDay of weekDays; let index = index\"\n [class.selected]=\"weekDay.weekdaySelected\" (click)=\"setUnit(weekDay)\">\n <co-icon *ngIf=\"showBackButton && index === 0\" class=\"pointer-hover no-user-select sub-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\" (click)=\"subUnit()\"></co-icon>\n <div *ngIf=\"weekDay.newMonth\" [textContent]=\"weekDay.weekdayMonthLong + ' ' + weekDay.weekdayYear\"\n class=\"month-description\"></div>\n <div class=\"weekday-value day\"\n [textContent]=\"capitalizeString(weekDay.weekdayShort)\"></div>\n <div class=\"weekday-value date\"\n [textContent]=\"weekDay.weekdayDay\"></div>\n <co-icon *ngIf=\"index === 6\" class=\"pointer-hover no-user-select add-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\" (click)=\"addUnit()\"></co-icon>\n </div>\n </div>\n <div class=\"agenda-header-wrapper\" *ngIf=\"view === viewTypes.WeekView\">\n <div class=\"hour-label-placeholder\" *ngIf=\"viewSelection\">\n <view-select [selectedView]=\"view\" (selectedViewChange)=\"changeTheView($event)\"></view-select>\n </div>\n <div class=\"week-day-label\" *ngFor=\"let weekDay of weekDays; let index = index\"\n [class.selected]=\"weekDay.weekdaySelected\" (click)=\"setUnit(weekDay)\">\n <co-icon *ngIf=\"showBackButton && index === 0\" class=\"pointer-hover no-user-select sub-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\" (click)=\"subUnit()\"></co-icon>\n <div *ngIf=\"weekDay.newMonth\" [textContent]=\"weekDay.weekdayMonthLong + ' ' + weekDay.weekdayYear\"\n class=\"month-description\"></div>\n <div class=\"weekday-value\"\n [textContent]=\"capitalizeString(weekDay.weekdayLong) + ' ' + weekDay.weekdayDay + ' ' + capitalizeString(weekDay.weekdayMonthLong) + ' ' + weekDay.weekdayYear \"></div>\n <co-icon *ngIf=\"index === 2\" class=\"pointer-hover no-user-select add-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\" (click)=\"addUnit()\"></co-icon>\n\n </div>\n\n </div>\n\n\n <div class=\"agenda-header-wrapper\" *ngIf=\"view === viewTypes.WeekSelectView\">\n <div class=\"week-day-label\" *ngFor=\"let weekDay of weekDays; let index = index\"\n [class.selected]=\"weekDay.weekdaySelected\"\n [class.selectable]=\"weekDay.events && weekDay.events.length > 0\"\n (click)=\"setUnit(weekDay)\">\n <co-icon *ngIf=\"index === 0 && showBackButton\" class=\"pointer-hover no-user-select sub-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\" (click)=\"subUnit()\"></co-icon>\n <div class=\"weekday-description\" [textContent]=\"weekDay.weekdayShort\"></div>\n <div class=\"weekday-value\" [textContent]=\"weekDay.weekdayDay + ' ' + weekDay.weekdayMonthShort\"></div>\n <co-icon *ngIf=\"index === 6\" class=\"pointer-hover no-user-select add-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\" (click)=\"addUnit()\"></co-icon>\n </div>\n </div>\n <div class=\"agenda-header-wrapper\" *ngIf=\"view === viewTypes.MonthView\">\n <div class=\"week-day-label\" *ngFor=\"let weekDay of weekDays; let index = index\">\n <co-icon *ngIf=\"index === 0 && showBackButton\" class=\"pointer-hover no-user-select sub-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\" (click)=\"subUnit()\"></co-icon>\n <div class=\"weekday-description\" [textContent]=\"weekDay.weekdayShort\"></div>\n <co-icon *ngIf=\"index === 6\" class=\"pointer-hover no-user-select add-unit-icon dark\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointRight)\" (click)=\"addUnit()\"></co-icon>\n </div>\n </div>\n ",
|
|
6051
6098
|
encapsulation: i0.ViewEncapsulation.None
|
|
6052
6099
|
},] }
|
|
6053
6100
|
];
|