@colijnit/corecomponents_v12 258.1.1 → 258.1.3

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.
@@ -12839,7 +12839,12 @@
12839
12839
  var filterRange = [];
12840
12840
  this.collection.forEach(function (viewModel) {
12841
12841
  if (viewModel.checked) {
12842
- filterRange.push(viewModel.code.toString());
12842
+ if (typeof viewModel.code === 'string') {
12843
+ filterRange.push(viewModel.code.toString());
12844
+ }
12845
+ else if (typeof viewModel.code === 'number') {
12846
+ filterRange.push(viewModel.code);
12847
+ }
12843
12848
  }
12844
12849
  });
12845
12850
  if (filterRange.length > 0) {
@@ -12985,11 +12990,11 @@
12985
12990
  this._model = collectionModel;
12986
12991
  if (collectionModel !== null && collectionModel !== undefined && this.collection !== null && this.collection !== undefined) {
12987
12992
  this.collection.forEach(function (viewModel) {
12988
- if (collectionModel.indexOf(viewModel.code.toString()) > -1) {
12989
- viewModel.checked = true;
12993
+ if (typeof collectionModel.indexOf(viewModel.code) === 'string') {
12994
+ viewModel.checked = collectionModel.indexOf(viewModel.code.toString()) > -1;
12990
12995
  }
12991
- else {
12992
- viewModel.checked = false;
12996
+ else if (typeof collectionModel.indexOf(viewModel.code) === 'number') {
12997
+ viewModel.checked = collectionModel.indexOf(viewModel.code) > -1;
12993
12998
  }
12994
12999
  });
12995
13000
  }
@@ -14986,12 +14991,28 @@
14986
14991
  onDragStartCustom === null || onDragStartCustom === void 0 ? void 0 : onDragStartCustom.call(obj);
14987
14992
  event.dataTransfer.setData("text", JSON.stringify({ obj: obj }));
14988
14993
  };
14994
+ HourSchedulingExpandableTemplateComponent.prototype.leftForObject = function (index, objects) {
14995
+ if (index === 0) {
14996
+ return 0;
14997
+ }
14998
+ else {
14999
+ return index * this.widthForObject(index, objects);
15000
+ }
15001
+ };
15002
+ HourSchedulingExpandableTemplateComponent.prototype.widthForObject = function (index, objects) {
15003
+ if (objects.length > 1) {
15004
+ return 100 / objects.length;
15005
+ }
15006
+ if (objects.length === 1) {
15007
+ return 100;
15008
+ }
15009
+ };
14989
15010
  return HourSchedulingExpandableTemplateComponent;
14990
15011
  }());
14991
15012
  HourSchedulingExpandableTemplateComponent.decorators = [
14992
15013
  { type: i0.Component, args: [{
14993
15014
  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 ",
15015
+ 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
15016
  encapsulation: i0.ViewEncapsulation.None
14996
15017
  },] }
14997
15018
  ];