@colijnit/corecomponents_v12 255.1.12 → 255.1.14
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-corecomponents_v12.umd.js +357 -4
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/calendar/calendar-template.component.js +6 -4
- package/esm2015/lib/components/hour-scheduling/components/hour-scheduling-test-object/hour-scheduling-test-object.component.js +2 -2
- package/esm2015/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/hour-scheduling-expandable-template.component.js +55 -0
- package/esm2015/lib/components/hour-scheduling-expandable/hour-scheduling-expandable.component.js +323 -0
- package/esm2015/lib/components/hour-scheduling-expandable/hour-scheduling-expandable.module.js +25 -0
- package/esm2015/public-api.js +5 -1
- package/fesm2015/colijnit-corecomponents_v12.js +403 -5
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/hour-scheduling/components/hour-scheduling-test-object/style/_layout.scss +2 -0
- package/lib/components/hour-scheduling/components/hour-scheduling-test-object/style/_theme.scss +2 -2
- package/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/hour-scheduling-expandable-template.component.d.ts +10 -0
- package/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/style/_layout.scss +4 -0
- package/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/style/_material-definition.scss +0 -0
- package/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/style/_theme.scss +4 -0
- package/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/style/material.scss +4 -0
- package/lib/components/hour-scheduling-expandable/hour-scheduling-expandable.component.d.ts +78 -0
- package/lib/components/hour-scheduling-expandable/hour-scheduling-expandable.module.d.ts +2 -0
- package/lib/components/hour-scheduling-expandable/style/_layout.scss +114 -0
- package/lib/components/hour-scheduling-expandable/style/_material-definition.scss +0 -0
- package/lib/components/hour-scheduling-expandable/style/_theme.scss +4 -0
- package/lib/components/hour-scheduling-expandable/style/material.scss +4 -0
- package/lib/components/input-checkbox/style/_material-definition.scss +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/colijnit-corecomponents_v12-255.1.11.tgz +0 -0
|
@@ -7013,9 +7013,11 @@
|
|
|
7013
7013
|
this.showYearSelection = true;
|
|
7014
7014
|
};
|
|
7015
7015
|
CalendarTemplateComponent.prototype.selectDate = function (day) {
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7016
|
+
if (day) {
|
|
7017
|
+
this.selectedDate = day;
|
|
7018
|
+
this._fillDatesBetweenSelected();
|
|
7019
|
+
this.dateSelected.emit(new Date(this.selectedDate));
|
|
7020
|
+
}
|
|
7019
7021
|
};
|
|
7020
7022
|
CalendarTemplateComponent.prototype.selectMonth = function (month) {
|
|
7021
7023
|
this.showSelectedMonth = month;
|
|
@@ -14320,6 +14322,331 @@
|
|
|
14320
14322
|
showClass: [{ type: i0.HostBinding, args: ['class.co-hour-scheduling',] }]
|
|
14321
14323
|
};
|
|
14322
14324
|
|
|
14325
|
+
var HourSchedulingExpandableComponent = /** @class */ (function () {
|
|
14326
|
+
function HourSchedulingExpandableComponent(cdRef, eRef) {
|
|
14327
|
+
this.cdRef = cdRef;
|
|
14328
|
+
this.eRef = eRef;
|
|
14329
|
+
this.hourLabels = [];
|
|
14330
|
+
this.scheduledObjects = [];
|
|
14331
|
+
this.resizing = false;
|
|
14332
|
+
this.currentResizingObject = null;
|
|
14333
|
+
this.currentDraggingObject = null;
|
|
14334
|
+
this.MIN_HEIGHT = 30;
|
|
14335
|
+
this._schedule = {};
|
|
14336
|
+
this.timeChangeEvent = new i0.EventEmitter();
|
|
14337
|
+
this.newObjectPlanEvent = new i0.EventEmitter();
|
|
14338
|
+
this.moveBetweenCalendarsEvent = new i0.EventEmitter();
|
|
14339
|
+
this.showClass = true;
|
|
14340
|
+
}
|
|
14341
|
+
Object.defineProperty(HourSchedulingExpandableComponent.prototype, "schedule", {
|
|
14342
|
+
get: function () {
|
|
14343
|
+
return this._schedule;
|
|
14344
|
+
},
|
|
14345
|
+
set: function (value) {
|
|
14346
|
+
if (value && value !== this._schedule) {
|
|
14347
|
+
this.renderObjects();
|
|
14348
|
+
}
|
|
14349
|
+
this._schedule = value;
|
|
14350
|
+
},
|
|
14351
|
+
enumerable: false,
|
|
14352
|
+
configurable: true
|
|
14353
|
+
});
|
|
14354
|
+
HourSchedulingExpandableComponent.prototype.onResize = function (event) {
|
|
14355
|
+
event.target.innerWidth;
|
|
14356
|
+
};
|
|
14357
|
+
HourSchedulingExpandableComponent.prototype.clickOut = function (event) {
|
|
14358
|
+
if (!this.eRef.nativeElement.contains(event.target)) {
|
|
14359
|
+
this.handleDeselectAll();
|
|
14360
|
+
}
|
|
14361
|
+
};
|
|
14362
|
+
HourSchedulingExpandableComponent.prototype.ngOnInit = function () {
|
|
14363
|
+
this.generateTimeBlocks();
|
|
14364
|
+
if (this.schedule) {
|
|
14365
|
+
this.renderObjects();
|
|
14366
|
+
}
|
|
14367
|
+
this._calculateSchedulingObjectProperties();
|
|
14368
|
+
};
|
|
14369
|
+
// Calculate properties for each scheduled object to determine resizer visibility
|
|
14370
|
+
HourSchedulingExpandableComponent.prototype._calculateSchedulingObjectProperties = function () {
|
|
14371
|
+
var _this = this;
|
|
14372
|
+
var scheduleStart = this.convertDateToEuropean(this.schedule[this.childProp][this.startTimeProp]);
|
|
14373
|
+
var scheduleEnd = this.convertDateToEuropean(this.schedule[this.childProp][this.endTimeProp]);
|
|
14374
|
+
this.scheduledObjects.forEach(function (obj) {
|
|
14375
|
+
obj.showTopResizer = _this.timeDifference(scheduleStart, obj.start) > 0; // Show top resizer if the start time differs
|
|
14376
|
+
obj.showBottomResizer = _this.timeDifference(scheduleEnd, obj.end) > 0; // Show bottom resizer if the end time differs
|
|
14377
|
+
});
|
|
14378
|
+
};
|
|
14379
|
+
// Find the next object in the scheduledObjects list
|
|
14380
|
+
HourSchedulingExpandableComponent.prototype._findNextObject = function (currentObject) {
|
|
14381
|
+
var currentIndex = this.scheduledObjects.indexOf(currentObject);
|
|
14382
|
+
if (currentIndex >= 0 && currentIndex < this.scheduledObjects.length - 1) {
|
|
14383
|
+
return this.scheduledObjects[currentIndex + 1]; // The next object in the list
|
|
14384
|
+
}
|
|
14385
|
+
return null; // No next object (it's the last one)
|
|
14386
|
+
};
|
|
14387
|
+
// Find the previous object in the scheduledObjects list
|
|
14388
|
+
HourSchedulingExpandableComponent.prototype._findPreviousObject = function (currentObject) {
|
|
14389
|
+
var currentIndex = this.scheduledObjects.indexOf(currentObject);
|
|
14390
|
+
if (currentIndex > 0) {
|
|
14391
|
+
return this.scheduledObjects[currentIndex - 1]; // The previous object in the list
|
|
14392
|
+
}
|
|
14393
|
+
return null; // No previous object (it's the first one)
|
|
14394
|
+
};
|
|
14395
|
+
HourSchedulingExpandableComponent.prototype.renderObjects = function () {
|
|
14396
|
+
var _this = this;
|
|
14397
|
+
if (this.schedule) {
|
|
14398
|
+
if (this.scheduledObjects.length > 1) {
|
|
14399
|
+
this.scheduledObjects = [];
|
|
14400
|
+
}
|
|
14401
|
+
var objects = this.schedule[this.objectsProp];
|
|
14402
|
+
var schedulingObjects_1 = [];
|
|
14403
|
+
if (objects && objects.length > 0) {
|
|
14404
|
+
objects.forEach(function (object) {
|
|
14405
|
+
var topDifference = _this.timeDifference(_this.schedule[_this.childProp][_this.startTimeProp], object[_this.startTimeProp]);
|
|
14406
|
+
schedulingObjects_1.push({
|
|
14407
|
+
title: object['title'],
|
|
14408
|
+
subTitle: object['subTitle'],
|
|
14409
|
+
start: _this.convertDateToEuropean(object[_this.startTimeProp]),
|
|
14410
|
+
end: _this.convertDateToEuropean(object[_this.endTimeProp]),
|
|
14411
|
+
id: object[_this.idProp],
|
|
14412
|
+
height: _this.timeDifference(object[_this.startTimeProp], object[_this.endTimeProp]),
|
|
14413
|
+
top: topDifference,
|
|
14414
|
+
selected: false
|
|
14415
|
+
});
|
|
14416
|
+
});
|
|
14417
|
+
}
|
|
14418
|
+
this.scheduledObjects = schedulingObjects_1;
|
|
14419
|
+
this.cdRef.markForCheck();
|
|
14420
|
+
this.cdRef.detectChanges();
|
|
14421
|
+
}
|
|
14422
|
+
};
|
|
14423
|
+
HourSchedulingExpandableComponent.prototype.onSelectBlock = function (obj) {
|
|
14424
|
+
obj.selected = !obj.selected;
|
|
14425
|
+
if (obj.selected) {
|
|
14426
|
+
this.scheduledObjects.forEach(function (scheduledObject) {
|
|
14427
|
+
if (scheduledObject.selected && scheduledObject !== obj) {
|
|
14428
|
+
scheduledObject.selected = false;
|
|
14429
|
+
}
|
|
14430
|
+
});
|
|
14431
|
+
}
|
|
14432
|
+
this.currentResizingObject = obj;
|
|
14433
|
+
};
|
|
14434
|
+
HourSchedulingExpandableComponent.prototype.onDragStartCustom = function (obj) {
|
|
14435
|
+
this.currentDraggingObject = obj;
|
|
14436
|
+
};
|
|
14437
|
+
HourSchedulingExpandableComponent.prototype.handleDrop = function (dragEvent, hour) {
|
|
14438
|
+
var _this = this;
|
|
14439
|
+
if (this.currentDraggingObject) {
|
|
14440
|
+
//The order was scheduled and needs to be moved
|
|
14441
|
+
var start = this.currentDraggingObject.start;
|
|
14442
|
+
var hourSplit = hour.split(":");
|
|
14443
|
+
start.setHours(parseInt(hourSplit[0]));
|
|
14444
|
+
start.setMinutes(parseInt(hourSplit[1]));
|
|
14445
|
+
var scheduledObject = this.scheduledObjects.find(function (scheduledObject) { return scheduledObject.id === _this.currentDraggingObject.id; });
|
|
14446
|
+
scheduledObject.start = start;
|
|
14447
|
+
var originalObject = this.schedule[this.objectsProp].find(function (object) { return object[_this.idProp] === _this.currentDraggingObject.id; });
|
|
14448
|
+
originalObject[this.startTimeProp] = start;
|
|
14449
|
+
var end = this.addMinutes(originalObject[this.startTimeProp], this.currentDraggingObject.height);
|
|
14450
|
+
originalObject[this.endTimeProp] = end;
|
|
14451
|
+
scheduledObject.end = end;
|
|
14452
|
+
scheduledObject.top = this.timeDifference(this.schedule[this.childProp][this.startTimeProp], scheduledObject.start);
|
|
14453
|
+
scheduledObject.height = this.timeDifference(scheduledObject.start, scheduledObject.end);
|
|
14454
|
+
this.timeChangeEvent.emit(originalObject);
|
|
14455
|
+
this.currentDraggingObject = undefined;
|
|
14456
|
+
}
|
|
14457
|
+
else {
|
|
14458
|
+
var parsed = this.tryParseJSONObject(dragEvent.dataTransfer.getData("text"));
|
|
14459
|
+
if (!parsed) {
|
|
14460
|
+
this.newObjectPlanEvent.emit({ currentHour: hour, data: parsed.toString() });
|
|
14461
|
+
return;
|
|
14462
|
+
}
|
|
14463
|
+
this.moveBetweenCalendarsEvent.emit({ hour: hour, data: parsed });
|
|
14464
|
+
}
|
|
14465
|
+
};
|
|
14466
|
+
HourSchedulingExpandableComponent.prototype.allowDrop = function (event, hour) {
|
|
14467
|
+
event.preventDefault();
|
|
14468
|
+
event.stopPropagation();
|
|
14469
|
+
if (this.currentDraggingObject) {
|
|
14470
|
+
var newStartDate_1 = this.convertDateToEuropean(this.currentDraggingObject.start);
|
|
14471
|
+
var hourSplit = hour.split(":");
|
|
14472
|
+
newStartDate_1.setHours(parseInt(hourSplit[0]));
|
|
14473
|
+
newStartDate_1.setHours(parseInt(hourSplit[1]));
|
|
14474
|
+
if (this.scheduledObjects.find(function (scheduledObject) { return scheduledObject.start === newStartDate_1; })) {
|
|
14475
|
+
return false;
|
|
14476
|
+
}
|
|
14477
|
+
else {
|
|
14478
|
+
return true;
|
|
14479
|
+
}
|
|
14480
|
+
}
|
|
14481
|
+
};
|
|
14482
|
+
// Triggered when resizing starts
|
|
14483
|
+
HourSchedulingExpandableComponent.prototype.onResizeStart = function (event, obj, direction) {
|
|
14484
|
+
this.resizing = true;
|
|
14485
|
+
this.resizeDirection = direction;
|
|
14486
|
+
this.currentResizingObject = obj;
|
|
14487
|
+
this.initialY = event.clientY;
|
|
14488
|
+
this.initialHeight = obj.height || 0;
|
|
14489
|
+
this.initialTop = obj.top || 0;
|
|
14490
|
+
// Listen to mousemove and mouseup events globally
|
|
14491
|
+
document.addEventListener('mousemove', this.onResizing.bind(this));
|
|
14492
|
+
document.addEventListener('mouseup', this.onResizeEnd.bind(this));
|
|
14493
|
+
};
|
|
14494
|
+
// Handle resizing with snapping to 30px increments and minimum height restriction
|
|
14495
|
+
HourSchedulingExpandableComponent.prototype.onResizing = function (event) {
|
|
14496
|
+
if (!this.resizing || !this.currentResizingObject)
|
|
14497
|
+
return;
|
|
14498
|
+
var deltaY = event.clientY - this.initialY;
|
|
14499
|
+
var snappedDeltaY = Math.round(deltaY / 30) * 30;
|
|
14500
|
+
if (this.resizeDirection === 'bottom') {
|
|
14501
|
+
var nextObject = this._findNextObject(this.currentResizingObject);
|
|
14502
|
+
var maxHeight = nextObject ? nextObject.top - this.currentResizingObject.top : Infinity;
|
|
14503
|
+
// Block expanding beyond the next object and shrinking below 30px
|
|
14504
|
+
var newHeight = Math.max(this.initialHeight + snappedDeltaY, this.MIN_HEIGHT);
|
|
14505
|
+
this.currentResizingObject.height = Math.min(newHeight, maxHeight);
|
|
14506
|
+
}
|
|
14507
|
+
else if (this.resizeDirection === 'top') {
|
|
14508
|
+
var previousObject = this._findPreviousObject(this.currentResizingObject);
|
|
14509
|
+
var minTop = previousObject ? previousObject.top + previousObject.height : 0;
|
|
14510
|
+
var newHeight = Math.max(this.initialHeight - snappedDeltaY, this.MIN_HEIGHT);
|
|
14511
|
+
var newTop = this.initialTop + (this.initialHeight - newHeight);
|
|
14512
|
+
// Block moving above the previous object's bottom and shrinking below MIN_HEIGHT
|
|
14513
|
+
if (newHeight >= this.MIN_HEIGHT && newTop >= minTop) {
|
|
14514
|
+
this.currentResizingObject.top = newTop;
|
|
14515
|
+
this.currentResizingObject.height = newHeight;
|
|
14516
|
+
}
|
|
14517
|
+
}
|
|
14518
|
+
// Ensure change detection happens
|
|
14519
|
+
this.cdRef.detectChanges();
|
|
14520
|
+
};
|
|
14521
|
+
// Triggered when resizing ends
|
|
14522
|
+
HourSchedulingExpandableComponent.prototype.onResizeEnd = function (event) {
|
|
14523
|
+
var _this = this;
|
|
14524
|
+
var object = this.currentResizingObject;
|
|
14525
|
+
if (object && object.selected) {
|
|
14526
|
+
var originalObject = this.schedule[this.objectsProp].find(function (scheduledObject) { return scheduledObject[_this.idProp] === object.id; });
|
|
14527
|
+
if (originalObject) {
|
|
14528
|
+
// Start date calculation first
|
|
14529
|
+
originalObject[this.startTimeProp] = this.addMinutes(this.convertDateToEuropean(this.schedule[this.childProp][this.startTimeProp]), object.top);
|
|
14530
|
+
// Then end date calculation based on the height of the object
|
|
14531
|
+
originalObject[this.endTimeProp] = this.addMinutes(this.convertDateToEuropean(originalObject[this.startTimeProp]), object.height);
|
|
14532
|
+
}
|
|
14533
|
+
this.timeChangeEvent.emit(originalObject);
|
|
14534
|
+
this.resizing = false;
|
|
14535
|
+
this.currentResizingObject.selected = false;
|
|
14536
|
+
this.currentResizingObject = null;
|
|
14537
|
+
}
|
|
14538
|
+
// Remove global event listeners
|
|
14539
|
+
document.removeEventListener('mousemove', this.onResizing.bind(this));
|
|
14540
|
+
document.removeEventListener('mouseup', this.onResizeEnd.bind(this));
|
|
14541
|
+
};
|
|
14542
|
+
HourSchedulingExpandableComponent.prototype.timeDifference = function (date1, date2) {
|
|
14543
|
+
var difference = this.convertDateToEuropean(date1).getTime() / 1000 - this.convertDateToEuropean(date2).getTime() / 1000;
|
|
14544
|
+
return Math.abs(difference / 60);
|
|
14545
|
+
};
|
|
14546
|
+
HourSchedulingExpandableComponent.prototype.generateTimeBlocks = function () {
|
|
14547
|
+
var startUnix = !this.childProp ? this.dateToUnixEpoch(this.convertDateToEuropean(this.schedule[this.startTimeProp])) : this.dateToUnixEpoch(this.convertDateToEuropean(this.schedule[this.childProp][this.startTimeProp]));
|
|
14548
|
+
var endUnix = !this.childProp ? this.dateToUnixEpoch(this.convertDateToEuropean(this.schedule[this.endTimeProp])) : this.dateToUnixEpoch(this.convertDateToEuropean(this.schedule[this.childProp][this.endTimeProp]));
|
|
14549
|
+
var interval = 60 * 60;
|
|
14550
|
+
for (var hourCount = startUnix; hourCount <= endUnix; hourCount += interval) {
|
|
14551
|
+
var hour = new Date(hourCount * 1000);
|
|
14552
|
+
var hourString = hour.getHours() + ":" + (hour.getMinutes() === 0 ? '00' : hour.getMinutes());
|
|
14553
|
+
this.hourLabels.push(hourString);
|
|
14554
|
+
}
|
|
14555
|
+
};
|
|
14556
|
+
HourSchedulingExpandableComponent.prototype.dateToUnixEpoch = function (date) {
|
|
14557
|
+
return Math.floor(date.getTime()) / 1000;
|
|
14558
|
+
};
|
|
14559
|
+
HourSchedulingExpandableComponent.prototype.addMinutes = function (date, minutes) {
|
|
14560
|
+
return new Date(date.getTime() + minutes * 60000);
|
|
14561
|
+
};
|
|
14562
|
+
HourSchedulingExpandableComponent.prototype.tryParseJSONObject = function (jsonString) {
|
|
14563
|
+
try {
|
|
14564
|
+
var o = JSON.parse(jsonString);
|
|
14565
|
+
if (o && typeof o === "object") {
|
|
14566
|
+
return o;
|
|
14567
|
+
}
|
|
14568
|
+
}
|
|
14569
|
+
catch (e) {
|
|
14570
|
+
}
|
|
14571
|
+
return false;
|
|
14572
|
+
};
|
|
14573
|
+
HourSchedulingExpandableComponent.prototype.addHalfHour = function (hour) {
|
|
14574
|
+
var split = hour.split(":");
|
|
14575
|
+
split[1] = "30";
|
|
14576
|
+
return split.join(':');
|
|
14577
|
+
};
|
|
14578
|
+
HourSchedulingExpandableComponent.prototype.convertTZ = function (date, tzString) {
|
|
14579
|
+
return new Date((typeof date === "string" ? new Date(date) : date).toLocaleString("en-US", { timeZone: tzString }));
|
|
14580
|
+
};
|
|
14581
|
+
HourSchedulingExpandableComponent.prototype.convertDateToEuropean = function (date) {
|
|
14582
|
+
return this.convertTZ(date, 'Europe/Amsterdam');
|
|
14583
|
+
};
|
|
14584
|
+
HourSchedulingExpandableComponent.prototype.handleDeselectAll = function () {
|
|
14585
|
+
this.scheduledObjects.forEach(function (scheduledObject) {
|
|
14586
|
+
if (scheduledObject.selected) {
|
|
14587
|
+
scheduledObject.selected = false;
|
|
14588
|
+
}
|
|
14589
|
+
});
|
|
14590
|
+
};
|
|
14591
|
+
return HourSchedulingExpandableComponent;
|
|
14592
|
+
}());
|
|
14593
|
+
HourSchedulingExpandableComponent.decorators = [
|
|
14594
|
+
{ type: i0.Component, args: [{
|
|
14595
|
+
selector: 'co-hour-scheduling-expandable',
|
|
14596
|
+
template: "\n <div class=\"wrapper\">\n <div class=\"time-block\" *ngFor=\"let hour of hourLabels\">\n <div class=\"hour-label\"><span [textContent]=\"hour\"></span></div>\n\n <div class=\"object-display\">\n <div class=\"first-half-hour object-half\" (dragover)=\"allowDrop($event, hour)\"\n (drop)=\"handleDrop($event, hour)\">\n </div>\n\n <div class=\"second-half-hour object-half\" (dragover)=\"allowDrop($event, addHalfHour(hour))\"\n (drop)=\"handleDrop($event, addHalfHour(hour))\">\n </div>\n </div>\n </div>\n\n <div class=\"scheduled-objects\" >\n <ng-container>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate\"\n [ngTemplateOutletContext]=\"{\n objects: scheduledObjects,\n onSelectBlock: this.onSelectBlock.bind(this),\n onResizeStart: this.onResizeStart.bind(this),\n onDragStartCustom: this.onDragStartCustom.bind(this)\n\n }\"\n >\n <ng-content></ng-content>\n </ng-template>\n </ng-container>\n </div>\n\n </div>\n\n ",
|
|
14597
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
14598
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
14599
|
+
},] }
|
|
14600
|
+
];
|
|
14601
|
+
HourSchedulingExpandableComponent.ctorParameters = function () { return [
|
|
14602
|
+
{ type: i0.ChangeDetectorRef },
|
|
14603
|
+
{ type: i0.ElementRef }
|
|
14604
|
+
]; };
|
|
14605
|
+
HourSchedulingExpandableComponent.propDecorators = {
|
|
14606
|
+
schedule: [{ type: i0.Input }],
|
|
14607
|
+
startTimeProp: [{ type: i0.Input }],
|
|
14608
|
+
endTimeProp: [{ type: i0.Input }],
|
|
14609
|
+
objectsProp: [{ type: i0.Input }],
|
|
14610
|
+
childProp: [{ type: i0.Input }],
|
|
14611
|
+
customTemplate: [{ type: i0.Input }],
|
|
14612
|
+
idProp: [{ type: i0.Input }],
|
|
14613
|
+
timeChangeEvent: [{ type: i0.Output }],
|
|
14614
|
+
newObjectPlanEvent: [{ type: i0.Output }],
|
|
14615
|
+
moveBetweenCalendarsEvent: [{ type: i0.Output }],
|
|
14616
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-hour-scheduling-expandable',] }],
|
|
14617
|
+
onResize: [{ type: i0.HostListener, args: ['window:resize', ['$event'],] }],
|
|
14618
|
+
clickOut: [{ type: i0.HostListener, args: ['document:click', ['$event'],] }]
|
|
14619
|
+
};
|
|
14620
|
+
|
|
14621
|
+
var HourSchedulingExpandableTemplateComponent = /** @class */ (function () {
|
|
14622
|
+
function HourSchedulingExpandableTemplateComponent() {
|
|
14623
|
+
this.objects = [];
|
|
14624
|
+
}
|
|
14625
|
+
HourSchedulingExpandableTemplateComponent.prototype.showClass = function () {
|
|
14626
|
+
return true;
|
|
14627
|
+
};
|
|
14628
|
+
HourSchedulingExpandableTemplateComponent.prototype.onExpandableDragStart = function (event, obj, onDragStartCustom) {
|
|
14629
|
+
onDragStartCustom === null || onDragStartCustom === void 0 ? void 0 : onDragStartCustom.call(obj);
|
|
14630
|
+
event.dataTransfer.setData("text", JSON.stringify({ obj: obj }));
|
|
14631
|
+
};
|
|
14632
|
+
return HourSchedulingExpandableTemplateComponent;
|
|
14633
|
+
}());
|
|
14634
|
+
HourSchedulingExpandableTemplateComponent.decorators = [
|
|
14635
|
+
{ type: i0.Component, args: [{
|
|
14636
|
+
selector: "co-hour-scheduling-expandable-template",
|
|
14637
|
+
template: "\n <div\n *ngFor=\"let obj of objects\"\n [class]=\"'custom-scheduled-object'\"\n [class.selected]=\"obj['selected']\"\n [draggable]=\"!obj['selected']\"\n [style.--height]=\"obj['height'] + 'px'\"\n [style.--top]=\"obj['top'] + 'px'\"\n (click)=\"onSelectBlock(obj)\"\n (dragstart)=\"onExpandableDragStart($event, obj, onDragStartCustom(obj) )\">\n\n <div\n *ngIf=\"obj['selected'] && obj['showTopResizer']\"\n class=\"top-resizer\"\n (mousedown)=\"onResizeStart($event, obj, 'top')\"></div>\n <ng-template\n [ngTemplateOutlet]=\"objectTemplate\"\n [ngTemplateOutletContext]=\"{\n object: obj\n }\"\n >\n </ng-template>\n <div *ngIf=\"obj['selected'] && obj['showBottomResizer']\"\n class=\"bottom-resizer\"\n (mousedown)=\"onResizeStart($event, obj, 'bottom')\"></div>\n </div>\n ",
|
|
14638
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
14639
|
+
},] }
|
|
14640
|
+
];
|
|
14641
|
+
HourSchedulingExpandableTemplateComponent.propDecorators = {
|
|
14642
|
+
objectTemplate: [{ type: i0.Input }],
|
|
14643
|
+
objects: [{ type: i0.Input }],
|
|
14644
|
+
onDragStartCustom: [{ type: i0.Input }],
|
|
14645
|
+
onResizeStart: [{ type: i0.Input }],
|
|
14646
|
+
onSelectBlock: [{ type: i0.Input }],
|
|
14647
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-hour-scheduling-expandable-template",] }]
|
|
14648
|
+
};
|
|
14649
|
+
|
|
14323
14650
|
var HourSchedulingTestObjectComponent = /** @class */ (function () {
|
|
14324
14651
|
function HourSchedulingTestObjectComponent() {
|
|
14325
14652
|
}
|
|
@@ -14336,7 +14663,7 @@
|
|
|
14336
14663
|
},] }
|
|
14337
14664
|
];
|
|
14338
14665
|
HourSchedulingTestObjectComponent.propDecorators = {
|
|
14339
|
-
showClass: [{ type: i0.HostBinding, args: ["class.co-test-object",] }],
|
|
14666
|
+
showClass: [{ type: i0.HostBinding, args: ["class.co-hour-scheduling-test-object",] }],
|
|
14340
14667
|
title: [{ type: i0.Input }],
|
|
14341
14668
|
subTitle: [{ type: i0.Input }]
|
|
14342
14669
|
};
|
|
@@ -14363,6 +14690,29 @@
|
|
|
14363
14690
|
},] }
|
|
14364
14691
|
];
|
|
14365
14692
|
|
|
14693
|
+
var HourSchedulingExpandableComponentModule = /** @class */ (function () {
|
|
14694
|
+
function HourSchedulingExpandableComponentModule() {
|
|
14695
|
+
}
|
|
14696
|
+
return HourSchedulingExpandableComponentModule;
|
|
14697
|
+
}());
|
|
14698
|
+
HourSchedulingExpandableComponentModule.decorators = [
|
|
14699
|
+
{ type: i0.NgModule, args: [{
|
|
14700
|
+
imports: [
|
|
14701
|
+
common.CommonModule,
|
|
14702
|
+
HourSchedulingComponentModule,
|
|
14703
|
+
],
|
|
14704
|
+
declarations: [
|
|
14705
|
+
HourSchedulingExpandableComponent,
|
|
14706
|
+
HourSchedulingExpandableTemplateComponent
|
|
14707
|
+
],
|
|
14708
|
+
exports: [
|
|
14709
|
+
HourSchedulingExpandableComponent,
|
|
14710
|
+
HourSchedulingExpandableTemplateComponent
|
|
14711
|
+
],
|
|
14712
|
+
providers: [common.DatePipe]
|
|
14713
|
+
},] }
|
|
14714
|
+
];
|
|
14715
|
+
|
|
14366
14716
|
/*
|
|
14367
14717
|
* Public API Surface of corecomponents
|
|
14368
14718
|
*/
|
|
@@ -14421,6 +14771,9 @@
|
|
|
14421
14771
|
exports.GridToolbarModule = GridToolbarModule;
|
|
14422
14772
|
exports.HourSchedulingComponent = HourSchedulingComponent;
|
|
14423
14773
|
exports.HourSchedulingComponentModule = HourSchedulingComponentModule;
|
|
14774
|
+
exports.HourSchedulingExpandableComponent = HourSchedulingExpandableComponent;
|
|
14775
|
+
exports.HourSchedulingExpandableComponentModule = HourSchedulingExpandableComponentModule;
|
|
14776
|
+
exports.HourSchedulingExpandableTemplateComponent = HourSchedulingExpandableTemplateComponent;
|
|
14424
14777
|
exports.IconCacheService = IconCacheService;
|
|
14425
14778
|
exports.IconCollapseHandleComponent = IconCollapseHandleComponent;
|
|
14426
14779
|
exports.IconCollapseHandleModule = IconCollapseHandleModule;
|