@colijnit/corecomponents_v12 255.1.14 → 255.1.16
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 +15 -22
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/hour-scheduling-expandable/components/hour-scheduling-expandable-template/hour-scheduling-expandable-template.component.js +3 -3
- package/esm2015/lib/components/hour-scheduling-expandable/hour-scheduling-expandable.component.js +15 -21
- package/fesm2015/colijnit-corecomponents_v12.js +16 -22
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/hour-scheduling-expandable/hour-scheduling-expandable.component.d.ts +0 -1
- package/package.json +1 -1
|
@@ -14364,18 +14364,8 @@
|
|
|
14364
14364
|
if (this.schedule) {
|
|
14365
14365
|
this.renderObjects();
|
|
14366
14366
|
}
|
|
14367
|
-
this._calculateSchedulingObjectProperties();
|
|
14368
14367
|
};
|
|
14369
14368
|
// 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
14369
|
// Find the next object in the scheduledObjects list
|
|
14380
14370
|
HourSchedulingExpandableComponent.prototype._findNextObject = function (currentObject) {
|
|
14381
14371
|
var currentIndex = this.scheduledObjects.indexOf(currentObject);
|
|
@@ -14443,16 +14433,18 @@
|
|
|
14443
14433
|
start.setHours(parseInt(hourSplit[0]));
|
|
14444
14434
|
start.setMinutes(parseInt(hourSplit[1]));
|
|
14445
14435
|
var scheduledObject = this.scheduledObjects.find(function (scheduledObject) { return scheduledObject.id === _this.currentDraggingObject.id; });
|
|
14446
|
-
scheduledObject
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
|
|
14450
|
-
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14436
|
+
if (scheduledObject) {
|
|
14437
|
+
scheduledObject.start = start;
|
|
14438
|
+
var originalObject = this.schedule[this.objectsProp].find(function (object) { return object[_this.idProp] === _this.currentDraggingObject.id; });
|
|
14439
|
+
originalObject[this.startTimeProp] = start;
|
|
14440
|
+
var end = this.addMinutes(originalObject[this.startTimeProp], this.currentDraggingObject.height);
|
|
14441
|
+
originalObject[this.endTimeProp] = end;
|
|
14442
|
+
scheduledObject.end = end;
|
|
14443
|
+
scheduledObject.top = this.timeDifference(this.schedule[this.childProp][this.startTimeProp], scheduledObject.start);
|
|
14444
|
+
scheduledObject.height = this.timeDifference(scheduledObject.start, scheduledObject.end);
|
|
14445
|
+
this.timeChangeEvent.emit(originalObject);
|
|
14446
|
+
this.currentDraggingObject = undefined;
|
|
14447
|
+
}
|
|
14456
14448
|
}
|
|
14457
14449
|
else {
|
|
14458
14450
|
var parsed = this.tryParseJSONObject(dragEvent.dataTransfer.getData("text"));
|
|
@@ -14460,7 +14452,8 @@
|
|
|
14460
14452
|
this.newObjectPlanEvent.emit({ currentHour: hour, data: parsed.toString() });
|
|
14461
14453
|
return;
|
|
14462
14454
|
}
|
|
14463
|
-
|
|
14455
|
+
//Move between calendars is still too buggy
|
|
14456
|
+
// this.moveBetweenCalendarsEvent.emit({hour: hour, data: parsed});
|
|
14464
14457
|
}
|
|
14465
14458
|
};
|
|
14466
14459
|
HourSchedulingExpandableComponent.prototype.allowDrop = function (event, hour) {
|
|
@@ -14634,7 +14627,7 @@
|
|
|
14634
14627
|
HourSchedulingExpandableTemplateComponent.decorators = [
|
|
14635
14628
|
{ type: i0.Component, args: [{
|
|
14636
14629
|
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']
|
|
14630
|
+
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']\"\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']\"\n class=\"bottom-resizer\"\n (mousedown)=\"onResizeStart($event, obj, 'bottom')\"></div>\n </div>\n ",
|
|
14638
14631
|
encapsulation: i0.ViewEncapsulation.None
|
|
14639
14632
|
},] }
|
|
14640
14633
|
];
|