@colijnit/corecomponents_v12 258.1.1 → 258.1.2

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.
@@ -14986,12 +14986,28 @@
14986
14986
  onDragStartCustom === null || onDragStartCustom === void 0 ? void 0 : onDragStartCustom.call(obj);
14987
14987
  event.dataTransfer.setData("text", JSON.stringify({ obj: obj }));
14988
14988
  };
14989
+ HourSchedulingExpandableTemplateComponent.prototype.leftForObject = function (index, objects) {
14990
+ if (index === 0) {
14991
+ return 0;
14992
+ }
14993
+ else {
14994
+ return index * this.widthForObject(index, objects);
14995
+ }
14996
+ };
14997
+ HourSchedulingExpandableTemplateComponent.prototype.widthForObject = function (index, objects) {
14998
+ if (objects.length > 1) {
14999
+ return 100 / objects.length;
15000
+ }
15001
+ if (objects.length === 1) {
15002
+ return 100;
15003
+ }
15004
+ };
14989
15005
  return HourSchedulingExpandableTemplateComponent;
14990
15006
  }());
14991
15007
  HourSchedulingExpandableTemplateComponent.decorators = [
14992
15008
  { type: i0.Component, args: [{
14993
15009
  selector: "co-hour-scheduling-expandable-template",
14994
- 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 ",
15010
+ template: "\n <div class=\"row\">\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 [style.--left]=\"leftForObject(objects.indexOf(obj), objects) + '%'\"\n [style.--width]=\"widthForObject(objects.indexOf(obj), objects) + '%'\"\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 </div>\n ",
14995
15011
  encapsulation: i0.ViewEncapsulation.None
14996
15012
  },] }
14997
15013
  ];