@colijnit/corecomponents_v12 300.1.1 → 300.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.
@@ -1133,6 +1133,7 @@ var CoreComponentsIcon;
1133
1133
  CoreComponentsIcon["Linechart"] = "linechart";
1134
1134
  CoreComponentsIcon["LinkedProducts"] = "linked_products";
1135
1135
  CoreComponentsIcon["LinkCircle"] = "link_circle";
1136
+ CoreComponentsIcon["ListRegular"] = "list_regular";
1136
1137
  CoreComponentsIcon["ListView"] = "list_view";
1137
1138
  CoreComponentsIcon["Location"] = "location";
1138
1139
  CoreComponentsIcon["Lock"] = "lock";
@@ -1439,6 +1440,7 @@ const CoreComponentsIconSvg = {
1439
1440
  "linechart": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M11,12.17v25H40v1H10v-26Z\" fill=\"#4c5050\" opacity=\"0.75\"/><polygon points=\"11.76 33.18 11 32.53 15.16 26.48 19.66 24.3 24.26 27.19 28.07 22.25 35.3 19.53 37.01 21.7 38.92 17.28 39.84 17.68 37.26 23.64 34.97 20.72 28.69 23.09 24.5 28.52 19.6 25.44 15.7 27.34 11.76 33.18\" fill=\"#4c5050\"/><polygon points=\"39.84 17.68 37.26 23.64 34.97 20.72 28.69 23.09 24.5 28.52 19.6 25.44 15.7 27.34 11.76 33.18 11 32.53 11 37.17 40 37.17 39.84 17.68\" fill=\"#4c5050\" opacity=\"0.25\"/></svg>",
1440
1441
  "linked_products": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><g opacity=\"0.5\"><path d=\"M20.2,14.71h2.15V26.2l.76-.77V14.71H24.4v9.43l.77-.77V14.71h1.29V22.1l.08-.09,1.29-1.3v-6h1.29v4.71l1.68-1.67a6.28,6.28,0,0,1,.54-.49V14.71h1.29v1.77a7.15,7.15,0,0,1,.77-.29V14.71H36V16a6.71,6.71,0,0,1,1,.21V14.71h1.29v2a6,6,0,0,1,1.31,1l.09.08c.11.11.21.23.31.35v-3a2.57,2.57,0,0,0-2.57-2.57H12.57A2.57,2.57,0,0,0,10,15.14V29.72a2.57,2.57,0,0,0,2.57,2.57h5.95a6.13,6.13,0,0,1,1.68-3.93ZM14.29,30.14H12.15V14.71h2.14Zm2,0H15V14.71h1.29Zm1.28,0V14.71h1.29V30.14Z\" fill=\"#484f60\"/><path d=\"M39.68,26.63,38.29,28v2.11H37v-.83l-2.92,2.92v-.1s-.09.1-.13.16h3.48A2.57,2.57,0,0,0,40,29.72V26.28A3.49,3.49,0,0,1,39.68,26.63Z\" fill=\"#484f60\"/></g><path d=\"M38.62,18.89l-.08-.08a4.73,4.73,0,0,0-6.68,0L27.6,23.07a4.73,4.73,0,0,0,0,6.68l.08.08a3.8,3.8,0,0,0,.48.42l1.56-1.56a2.38,2.38,0,0,1-.51-.39l-.08-.08a2.56,2.56,0,0,1,0-3.62l4.26-4.26a2.56,2.56,0,0,1,3.62,0l.08.08a2.56,2.56,0,0,1,0,3.62L35.16,26a6.53,6.53,0,0,1,.48,2.58l3-3A4.73,4.73,0,0,0,38.62,18.89ZM32.33,25a3.77,3.77,0,0,0-.49-.42l-1.56,1.56a2.1,2.1,0,0,1,.51.39l.08.08a2.56,2.56,0,0,1,0,3.62l-4.26,4.26a2.56,2.56,0,0,1-3.62,0l-.08-.08a2.56,2.56,0,0,1,0-3.62l1.93-1.93a6.6,6.6,0,0,1-.48-2.58l-3,3a4.73,4.73,0,0,0,0,6.68l.08.08a4.73,4.73,0,0,0,6.68,0l4.26-4.26a4.74,4.74,0,0,0,0-6.69Z\" fill=\"#484f60\"/></svg>",
1441
1442
  "link_circle": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,45A20,20,0,1,1,45,25,20,20,0,0,1,25,45ZM25,6.29A18.71,18.71,0,1,0,43.71,25,18.73,18.73,0,0,0,25,6.29Z\" fill=\"#484f60\"/><path d=\"M34.48,15.6l-.08-.08a5.21,5.21,0,0,0-7.36,0L22.36,20.2a5.21,5.21,0,0,0,0,7.36l.08.08c.17.17.35.32.53.47l1.72-1.72a2.88,2.88,0,0,1-.56-.43L24,25.87a2.81,2.81,0,0,1,0-4l4.69-4.69a2.81,2.81,0,0,1,4,0l.09.09a2.81,2.81,0,0,1,0,4l-2.12,2.12a7.17,7.17,0,0,1,.52,2.85L34.48,23A5.21,5.21,0,0,0,34.48,15.6Zm-6.92,6.76A5.62,5.62,0,0,0,27,21.9l-1.72,1.71a2.88,2.88,0,0,1,.56.43l.09.09a2.81,2.81,0,0,1,0,4L21.27,32.8a2.81,2.81,0,0,1-4,0l-.09-.09a2.81,2.81,0,0,1,0-4l2.12-2.12a7.17,7.17,0,0,1-.52-2.85L15.52,27a5.21,5.21,0,0,0,0,7.36l.08.08a5.21,5.21,0,0,0,7.36,0l4.68-4.68a5.21,5.21,0,0,0,0-7.36Z\" fill=\"#484f60\"/></svg>",
1443
+ "list_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M88 48C101.3 48 112 58.75 112 72V120C112 133.3 101.3 144 88 144H40C26.75 144 16 133.3 16 120V72C16 58.75 26.75 48 40 48H88zM488 72C501.3 72 512 82.75 512 96C512 109.3 501.3 120 488 120H184C170.7 120 160 109.3 160 96C160 82.75 170.7 72 184 72H488zM488 232C501.3 232 512 242.7 512 256C512 269.3 501.3 280 488 280H184C170.7 280 160 269.3 160 256C160 242.7 170.7 232 184 232H488zM488 392C501.3 392 512 402.7 512 416C512 429.3 501.3 440 488 440H184C170.7 440 160 429.3 160 416C160 402.7 170.7 392 184 392H488zM16 232C16 218.7 26.75 208 40 208H88C101.3 208 112 218.7 112 232V280C112 293.3 101.3 304 88 304H40C26.75 304 16 293.3 16 280V232zM88 368C101.3 368 112 378.7 112 392V440C112 453.3 101.3 464 88 464H40C26.75 464 16 453.3 16 440V392C16 378.7 26.75 368 40 368H88z\"/></svg>",
1442
1444
  "list_view": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 51 51\"><rect x=\"26.5\" y=\"13\" width=\"14\" height=\"7\" fill=\"#4d5050\"/><rect x=\"10.5\" y=\"13\" width=\"14\" height=\"7\" fill=\"#4d5050\"/><rect x=\"10.5\" y=\"22\" width=\"14\" height=\"7\" fill=\"#4d5050\"/><rect x=\"26.5\" y=\"22\" width=\"14\" height=\"7\" fill=\"#4d5050\"/><rect x=\"10.5\" y=\"31\" width=\"14\" height=\"7\" fill=\"#4d5050\"/><rect x=\"26.5\" y=\"31\" width=\"14\" height=\"7\" fill=\"#4d5050\"/></svg>",
1443
1445
  "location": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,12.67A8.33,8.33,0,0,0,16.67,21c0,4.6,8.33,16.67,8.33,16.67S33.33,25.6,33.33,21A8.33,8.33,0,0,0,25,12.67Zm0,10.41A2.08,2.08,0,1,1,27.08,21,2.08,2.08,0,0,1,25,23.08Z\" fill=\"#484f60\"/></svg>",
1444
1446
  "lock": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M32.65,21.67H17.35c-2.81,0-3.06,2.29-3.06,5.12v8.09c0,2.83.25,5.12,3.06,5.12h15.3c2.81,0,3.06-2.29,3.06-5.12V26.79C35.71,24,35.46,21.67,32.65,21.67ZM20.22,37.49l2.61-6.32a3.82,3.82,0,1,1,4.35,0l2.6,6.32Z\" fill=\"#484f60\"/><path d=\"M29.51,16.64c0-3.6-2-4.07-4.51-4.07h0c-2.49,0-4.51.47-4.51,4.07v3h-2.7v-3C17.79,11.62,21,10,25,10h0c4,0,7.21,1.62,7.21,6.64v3h-2.7Z\" fill=\"#484f60\"/></svg>",
@@ -7491,7 +7493,7 @@ class InputTextComponent extends BaseInputComponent {
7491
7493
  this.clearIconClick.emit(event);
7492
7494
  }
7493
7495
  handleKeyDownInput(event) {
7494
- const key = event.key.toLowerCase();
7496
+ const key = event.key ? event.key.toLowerCase() : '';
7495
7497
  if (this.type === 'date') {
7496
7498
  if (key === 'w') {
7497
7499
  event.preventDefault();
@@ -7524,7 +7526,7 @@ class InputTextComponent extends BaseInputComponent {
7524
7526
  }
7525
7527
  if (this.digitsOnly && !this.isWeekInputMode) {
7526
7528
  // the field is a text input (so a locale comma is allowed), so actively permit only numeric characters
7527
- if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
7529
+ if (key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
7528
7530
  const isDigit = /\d/.test(event.key);
7529
7531
  const isSeparator = event.key === '.' || event.key === ',';
7530
7532
  const isSign = !this.excludePlusMinus && (event.key === '-' || event.key === '+');
@@ -7538,7 +7540,7 @@ class InputTextComponent extends BaseInputComponent {
7538
7540
  event.preventDefault();
7539
7541
  return;
7540
7542
  }
7541
- if (event.key !== this._numberLocale.decimalSeparator) {
7543
+ if (key !== this._numberLocale.decimalSeparator) {
7542
7544
  event.preventDefault();
7543
7545
  if (this.input) {
7544
7546
  this._numberLocale.insertDecimalSeparator(this.input);
@@ -19687,8 +19689,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
19687
19689
  class HourSchedulingExpandableComponent {
19688
19690
  cdRef;
19689
19691
  eRef;
19692
+ iconCacheService;
19693
+ icons = CoreComponentsIcon;
19690
19694
  hourLabels = [];
19691
19695
  scheduledObjects = [];
19696
+ selectedHour;
19692
19697
  resizing = false;
19693
19698
  resizeDirection;
19694
19699
  initialY;
@@ -19717,6 +19722,7 @@ class HourSchedulingExpandableComponent {
19717
19722
  idProp; // Input for unique identifier property
19718
19723
  timeChangeEvent = new EventEmitter();
19719
19724
  newObjectPlanEvent = new EventEmitter();
19725
+ taskCreationEvent = new EventEmitter();
19720
19726
  moveBetweenCalendarsEvent = new EventEmitter();
19721
19727
  showClass = true;
19722
19728
  onResize(event) {
@@ -19727,9 +19733,10 @@ class HourSchedulingExpandableComponent {
19727
19733
  this.handleDeselectAll();
19728
19734
  }
19729
19735
  }
19730
- constructor(cdRef, eRef) {
19736
+ constructor(cdRef, eRef, iconCacheService) {
19731
19737
  this.cdRef = cdRef;
19732
19738
  this.eRef = eRef;
19739
+ this.iconCacheService = iconCacheService;
19733
19740
  }
19734
19741
  ngOnInit() {
19735
19742
  this.generateTimeBlocks();
@@ -19960,22 +19967,44 @@ class HourSchedulingExpandableComponent {
19960
19967
  }
19961
19968
  });
19962
19969
  }
19963
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
19964
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: HourSchedulingExpandableComponent, isStandalone: false, selector: "co-hour-scheduling-expandable", inputs: { schedule: "schedule", startTimeProp: "startTimeProp", endTimeProp: "endTimeProp", objectsProp: "objectsProp", childProp: "childProp", customTemplate: "customTemplate", idProp: "idProp" }, outputs: { timeChangeEvent: "timeChangeEvent", newObjectPlanEvent: "newObjectPlanEvent", moveBetweenCalendarsEvent: "moveBetweenCalendarsEvent" }, host: { listeners: { "window:resize": "onResize($event)", "document:click": "clickOut($event)" }, properties: { "class.co-hour-scheduling-expandable": "this.showClass" } }, ngImport: i0, template: `
19970
+ selectHalfHourBlock(mouseEvent, hour, first = true) {
19971
+ mouseEvent.stopPropagation();
19972
+ if (!first) {
19973
+ hour = this.addHalfHour(hour);
19974
+ }
19975
+ this.selectedHour = hour;
19976
+ }
19977
+ handleHourTaskCreate(mouseEvent, hour, first = true) {
19978
+ mouseEvent.stopPropagation();
19979
+ if (!first) {
19980
+ hour = this.addHalfHour(hour);
19981
+ }
19982
+ this.taskCreationEvent.emit(hour);
19983
+ this.selectedHour = "";
19984
+ }
19985
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: IconCacheService }], target: i0.ɵɵFactoryTarget.Component });
19986
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: HourSchedulingExpandableComponent, isStandalone: false, selector: "co-hour-scheduling-expandable", inputs: { schedule: "schedule", startTimeProp: "startTimeProp", endTimeProp: "endTimeProp", objectsProp: "objectsProp", childProp: "childProp", customTemplate: "customTemplate", idProp: "idProp" }, outputs: { timeChangeEvent: "timeChangeEvent", newObjectPlanEvent: "newObjectPlanEvent", taskCreationEvent: "taskCreationEvent", moveBetweenCalendarsEvent: "moveBetweenCalendarsEvent" }, host: { listeners: { "window:resize": "onResize($event)", "document:click": "clickOut($event)" }, properties: { "class.co-hour-scheduling-expandable": "this.showClass" } }, ngImport: i0, template: `
19965
19987
  <div class="wrapper">
19966
19988
  @for (hour of hourLabels; track hour) {
19967
19989
  <div class="time-block">
19968
19990
  <div class="hour-label"><span [textContent]="hour"></span></div>
19969
19991
  <div class="object-display">
19970
19992
  <div class="first-half-hour object-half"
19993
+ [class.selected]="selectedHour === hour"
19994
+ (click)="selectHalfHourBlock($event, hour)"
19971
19995
  (dragover)="allowDrop($event, hour)"
19972
19996
  (dragleave)="handleDragLeave($event)"
19973
19997
  (drop)="handleDrop($event, hour)">
19998
+ <co-icon class="toggle-icon" [class.visible]="selectedHour === hour" [icon]="icons.ListRegular" (click)="handleHourTaskCreate($event, hour)"></co-icon>
19974
19999
  </div>
19975
20000
  <div class="second-half-hour object-half"
20001
+ [class.selected]="selectedHour === this.addHalfHour(hour)"
19976
20002
  (dragover)="allowDrop($event, addHalfHour(hour))"
19977
20003
  (dragleave)="handleDragLeave($event)"
20004
+ (click)="selectHalfHourBlock($event, hour, false)"
19978
20005
  (drop)="handleDrop($event, addHalfHour(hour))">
20006
+ <co-icon class="toggle-icon" [class.visible]="selectedHour === this.addHalfHour(hour)" [icon]="icons.ListRegular" (click)="handleHourTaskCreate($event, hour, false)"></co-icon>
20007
+
19979
20008
  </div>
19980
20009
  </div>
19981
20010
  </div>
@@ -20001,7 +20030,7 @@ class HourSchedulingExpandableComponent {
20001
20030
 
20002
20031
  </div>
20003
20032
 
20004
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
20033
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
20005
20034
  }
20006
20035
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponent, decorators: [{
20007
20036
  type: Component,
@@ -20014,14 +20043,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
20014
20043
  <div class="hour-label"><span [textContent]="hour"></span></div>
20015
20044
  <div class="object-display">
20016
20045
  <div class="first-half-hour object-half"
20046
+ [class.selected]="selectedHour === hour"
20047
+ (click)="selectHalfHourBlock($event, hour)"
20017
20048
  (dragover)="allowDrop($event, hour)"
20018
20049
  (dragleave)="handleDragLeave($event)"
20019
20050
  (drop)="handleDrop($event, hour)">
20051
+ <co-icon class="toggle-icon" [class.visible]="selectedHour === hour" [icon]="icons.ListRegular" (click)="handleHourTaskCreate($event, hour)"></co-icon>
20020
20052
  </div>
20021
20053
  <div class="second-half-hour object-half"
20054
+ [class.selected]="selectedHour === this.addHalfHour(hour)"
20022
20055
  (dragover)="allowDrop($event, addHalfHour(hour))"
20023
20056
  (dragleave)="handleDragLeave($event)"
20057
+ (click)="selectHalfHourBlock($event, hour, false)"
20024
20058
  (drop)="handleDrop($event, addHalfHour(hour))">
20059
+ <co-icon class="toggle-icon" [class.visible]="selectedHour === this.addHalfHour(hour)" [icon]="icons.ListRegular" (click)="handleHourTaskCreate($event, hour, false)"></co-icon>
20060
+
20025
20061
  </div>
20026
20062
  </div>
20027
20063
  </div>
@@ -20052,7 +20088,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
20052
20088
  encapsulation: ViewEncapsulation.None,
20053
20089
  standalone: false
20054
20090
  }]
20055
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { schedule: [{
20091
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: IconCacheService }], propDecorators: { schedule: [{
20056
20092
  type: Input
20057
20093
  }], startTimeProp: [{
20058
20094
  type: Input
@@ -20070,6 +20106,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
20070
20106
  type: Output
20071
20107
  }], newObjectPlanEvent: [{
20072
20108
  type: Output
20109
+ }], taskCreationEvent: [{
20110
+ type: Output
20073
20111
  }], moveBetweenCalendarsEvent: [{
20074
20112
  type: Output
20075
20113
  }], showClass: [{
@@ -20257,10 +20295,12 @@ class HourSchedulingExpandableComponentModule {
20257
20295
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20258
20296
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponentModule, declarations: [HourSchedulingExpandableComponent], imports: [CommonModule,
20259
20297
  HourSchedulingComponentModule,
20260
- HourSchedulingExpandableTemplateModule], exports: [HourSchedulingExpandableComponent] });
20298
+ HourSchedulingExpandableTemplateModule,
20299
+ IconModule], exports: [HourSchedulingExpandableComponent] });
20261
20300
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponentModule, providers: [DatePipe], imports: [CommonModule,
20262
20301
  HourSchedulingComponentModule,
20263
- HourSchedulingExpandableTemplateModule] });
20302
+ HourSchedulingExpandableTemplateModule,
20303
+ IconModule] });
20264
20304
  }
20265
20305
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: HourSchedulingExpandableComponentModule, decorators: [{
20266
20306
  type: NgModule,
@@ -20268,7 +20308,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
20268
20308
  imports: [
20269
20309
  CommonModule,
20270
20310
  HourSchedulingComponentModule,
20271
- HourSchedulingExpandableTemplateModule
20311
+ HourSchedulingExpandableTemplateModule,
20312
+ IconModule
20272
20313
  ],
20273
20314
  declarations: [
20274
20315
  HourSchedulingExpandableComponent,