@colijnit/corecomponents_v12 255.1.5 → 255.1.7

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.
@@ -5,7 +5,7 @@ import { NgModel, FormGroup, FormsModule } from '@angular/forms';
5
5
  import { Subject, merge, fromEvent, BehaviorSubject } from 'rxjs';
6
6
  import { DomSanitizer, HammerGestureConfig, HammerModule, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
7
7
  import { trigger, state, style, transition, animate, query, animateChild } from '@angular/animations';
8
- import { CommonModule } from '@angular/common';
8
+ import { CommonModule, DatePipe } from '@angular/common';
9
9
  import { HttpClientModule } from '@angular/common/http';
10
10
  import { auditTime } from 'rxjs/operators';
11
11
  import { PlaneGeometry, Mesh, Vector2, Vector3, MeshPhongMaterial, SpotLight, PerspectiveCamera, Scene, Color, AmbientLight, Fog, WebGLRenderer, Box3 } from 'three';
@@ -1022,6 +1022,7 @@ var CoreComponentsIcon;
1022
1022
  CoreComponentsIcon["Barcode"] = "Barcode";
1023
1023
  CoreComponentsIcon["BigMac"] = "big_mac";
1024
1024
  CoreComponentsIcon["Boxes"] = "boxes";
1025
+ CoreComponentsIcon["BoxesPackingRegular"] = "boxes_packing_regular";
1025
1026
  CoreComponentsIcon["Brush"] = "brush";
1026
1027
  CoreComponentsIcon["BrushRoundOpen"] = "brush_round_open";
1027
1028
  CoreComponentsIcon["BuildingColumns"] = "building_columns";
@@ -1207,6 +1208,7 @@ var CoreComponentsIcon;
1207
1208
  CoreComponentsIcon["RangeSelect"] = "range_select";
1208
1209
  CoreComponentsIcon["Rectangles"] = "rectangles";
1209
1210
  CoreComponentsIcon["Refresh"] = "refresh";
1211
+ CoreComponentsIcon["RegularBoxesPackingCircleCheck"] = "regular_boxes_packing_circle_check";
1210
1212
  CoreComponentsIcon["Relations"] = "relations";
1211
1213
  CoreComponentsIcon["Remark"] = "remark";
1212
1214
  CoreComponentsIcon["RemarkRoundOpen"] = "remark_round_open";
@@ -1321,6 +1323,7 @@ const CoreComponentsIconSvg = {
1321
1323
  "Barcode": "<svg preserveAspectRatio=\"none\" version=\"1.1\" viewBox=\"0 0 50 50\" x=\"0px\" xmlns=\"http://www.w3.org/2000/svg\" y=\"0px\"><path d=\"M 32.002 0 L 3.001 0 C 1.345 0 0 1.344 0 2.999 L 0 20.002 C 0 21.66 1.345 23.002 3.001 23.002 L 32.002 23.002 C 33.66 23.002 35 21.66 35 20.002 L 35 2.999 C 35 1.344 33.66 0 32.002 0 Z M 5 20.5 L 2.503 20.5 L 2.503 2.501 L 5 2.501 L 5 20.5 Z M 7.301 20.5 L 5.801 20.5 L 5.801 2.501 L 7.301 2.501 L 7.301 20.5 Z M 10.302 20.5 L 8.8 20.5 L 8.8 2.501 L 10.302 2.501 L 10.302 20.5 Z M 14.403 20.5 L 11.9 20.5 L 11.9 2.501 L 14.403 2.501 L 14.403 20.5 Z M 16.802 20.5 L 15.3 20.5 L 15.3 2.501 L 16.802 2.501 L 16.802 20.5 Z M 19.204 20.5 L 17.703 20.5 L 17.703 2.501 L 19.204 2.501 L 19.204 20.5 Z M 22.306 20.5 L 20.804 20.5 L 20.804 2.501 L 22.306 2.501 L 22.306 20.5 Z M 26.404 20.5 L 24.902 20.5 L 24.902 2.501 L 26.404 2.501 L 26.404 20.5 Z M 30.304 20.5 L 27.303 20.5 L 27.303 2.501 L 30.304 2.501 L 30.304 20.5 Z M 33 20.5 L 31.505 20.5 L 31.505 2.501 L 33 2.501 L 33 20.5 Z\" fill=\"#1E2930\" transform=\" translate(7.5 13.499)\" /></svg>",
1322
1324
  "big_mac": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 51 51\"><rect x=\"10.5\" y=\"14.5\" width=\"30\" height=\"4\" fill=\"#4d5050\"/><rect x=\"10.5\" y=\"20.5\" width=\"30\" height=\"4\" fill=\"#4d5050\"/><rect x=\"10.5\" y=\"26.5\" width=\"30\" height=\"4\" fill=\"#4d5050\"/><rect x=\"10.5\" y=\"32.5\" width=\"30\" height=\"4\" fill=\"#4d5050\"/></svg>",
1323
1325
  "boxes": "<svg preserveAspectRatio=\"none\" version=\"1.1\" viewBox=\"0 0 50 50\" x=\"0px\" xmlns=\"http://www.w3.org/2000/svg\" y=\"0px\"><g transform=\" translate(9 11)\"><path d=\"M 0 12.292 L 0 0 L 8.563 1.518 L 8.563 14.576 L 0 12.292 Z\" fill=\"#1E2930\" transform=\" translate(0 13.24)\" /><path d=\"M 0 1.132 L 7.909 0 L 7.909 11.897 L 0 14.153 L 0 1.132 Z\" fill=\"#1E2930\" transform=\" translate(9.813 13.647)\" /><path d=\"M 0 11.868 L 0 0 L 3.111 0.625 L 3.111 12.876 L 0 11.868 Z\" fill=\"#1E2930\" transform=\" translate(18.969 13.69)\" /><path d=\"M 0 1.433 L 8.673 0 L 8.673 11.434 L 0 13.721 L 0 1.433 Z\" fill=\"#1E2930\" transform=\" translate(23.327 12.898)\" /><path d=\"M 0 0.752 L 7.691 0 L 7.691 10.344 L 0 11.655 L 0 0.752 Z\" fill=\"#1E2930\" transform=\" translate(17.633 1.08)\" /><path d=\"M 0 10.344 L 0 0 L 8.13 0.755 L 8.13 11.669 L 0 10.344 Z\" fill=\"#1E2930\" transform=\" translate(8.258 1.077)\" /><path d=\"M 0 0.752 L 5.708 0 L 5.708 0.444 L 12.023 1.475 L 7.602 2.106 L 0 0.752 Z\" fill=\"#1E2930\" transform=\" translate(1.588 11.791)\" /><path d=\"M 0 1.434 L 5.278 0.54 L 5.182 0 L 9.086 0.528 L 1.549 1.772 L 0 1.434 Z\" fill=\"#1E2930\" transform=\" translate(21.162 11.687)\" /><path d=\"M 0 0.29 L 5.135 0 L 9.542 0.281 L 4.829 0.741 L 0 0.29 Z\" fill=\"#1E2930\" transform=\" translate(12.179 0.185)\" /></g></svg>",
1326
+ "boxes_packing_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path d=\"M592 48H304v80H256V48c0-26.5 21.5-48 48-48H592c26.5 0 48 21.5 48 48V464c0 26.5-21.5 48-48 48H381.3c1.8-5 2.7-10.4 2.7-16V464H592V48zM561 311c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-23-23V392c0 13.3-10.7 24-24 24s-24-10.7-24-24V321.9l-23 23c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l64-64c9.4-9.4 24.6-9.4 33.9 0l64 64zM48 208v48H80 304h32V208H48zM0 272V192c0-17.7 14.3-32 32-32H352c17.7 0 32 14.3 32 32v80c0 17.7-14.3 32-32 32V480c0 17.7-14.3 32-32 32H64c-17.7 0-32-14.3-32-32l0-176c-17.7 0-32-14.3-32-32zm80 32V464H304V304H80zm72 32h80c13.3 0 24 10.7 24 24s-10.7 24-24 24H152c-13.3 0-24-10.7-24-24s10.7-24 24-24z\"/></svg>",
1324
1327
  "brush": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M28.16,26a9.71,9.71,0,0,1-4-3.66A.88.88,0,0,0,22.92,22c-1.08.48-2.19.92-3.27,1.43-3.71,1.74-6,4.5-6.23,8.75-.17,2.75-.89,5.32-3.42,7.25,1.18,0,2.12,0,3.05,0,.73,0,1.46-.07,2.18-.12a10.82,10.82,0,0,0,4.86-3.38c1.31-1.61,3.14-3.58,3.95-5.49l-.08.38a22.78,22.78,0,0,1-3.09,5.74A11.79,11.79,0,0,1,18.13,39a22.35,22.35,0,0,0,4.29-1A8.2,8.2,0,0,0,28.06,32c.38-1.62.44-3.31.66-5A1,1,0,0,0,28.16,26Z\" fill=\"#484f60\"/><path d=\"M26.23,20.43l6.57-9.32a1.23,1.23,0,0,1,1.87-.18l4.94,4.7a1.24,1.24,0,0,1-.11,1.9l-9.15,6.78a1.25,1.25,0,0,1-1.58-.08L26.4,22.06A1.23,1.23,0,0,1,26.23,20.43Z\" fill=\"#484f60\"/></svg>",
1325
1328
  "brush_round_open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><title>Tekengebied 13 kopie 739</title><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=\"M13.39,36.15A7,7,0,0,0,16,30.53a7.59,7.59,0,0,1,4.83-6.77c.83-.39,1.69-.73,2.53-1.11a.69.69,0,0,1,1,.29,7.34,7.34,0,0,0,3.09,2.83.73.73,0,0,1,.43.82c-.17,1.28-.22,2.59-.51,3.84A6.35,6.35,0,0,1,23,35a24.09,24.09,0,0,1-7.25,1.14C15,36.18,14.3,36.15,13.39,36.15Z\" fill=\"#484f60\"/><path d=\"M26,21.46,31,14.25a1,1,0,0,1,1.46-.14l3.82,3.64a1,1,0,0,1-.09,1.47l-7.08,5.24a1,1,0,0,1-1.22-.06l-1.83-1.67A1,1,0,0,1,26,21.46Z\" fill=\"#484f60\"/></svg>",
1326
1329
  "building_columns": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path style= \"fill: #484f60\" d=\"M243.4 2.587C251.4-.8625 260.6-.8625 268.6 2.587L492.6 98.59C506.6 104.6 514.4 119.6 511.3 134.4C508.3 149.3 495.2 159.1 479.1 160V168C479.1 181.3 469.3 192 455.1 192H55.1C42.74 192 31.1 181.3 31.1 168V160C16.81 159.1 3.708 149.3 .6528 134.4C-2.402 119.6 5.429 104.6 19.39 98.59L243.4 2.587zM256 128C273.7 128 288 113.7 288 96C288 78.33 273.7 64 256 64C238.3 64 224 78.33 224 96C224 113.7 238.3 128 256 128zM127.1 416H167.1V224H231.1V416H280V224H344V416H384V224H448V420.3C448.6 420.6 449.2 420.1 449.8 421.4L497.8 453.4C509.5 461.2 514.7 475.8 510.6 489.3C506.5 502.8 494.1 512 480 512H31.1C17.9 512 5.458 502.8 1.372 489.3C-2.715 475.8 2.515 461.2 14.25 453.4L62.25 421.4C62.82 420.1 63.41 420.6 63.1 420.3V224H127.1V416z\"/></svg>",
@@ -1506,6 +1509,7 @@ const CoreComponentsIconSvg = {
1506
1509
  "range_select": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"18\" y=\"11.17\" width=\"22\" height=\"4\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"18\" y=\"19.17\" width=\"22\" height=\"4\" fill=\"#484f60\"/><rect x=\"18\" y=\"27.17\" width=\"22\" height=\"4\" fill=\"#484f60\"/><circle cx=\"13\" cy=\"13.17\" r=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><circle cx=\"13\" cy=\"21.17\" r=\"3\" fill=\"#484f60\"/><circle cx=\"13\" cy=\"29.17\" r=\"3\" fill=\"#484f60\"/><rect x=\"18\" y=\"35.17\" width=\"22\" height=\"4\" fill=\"#484f60\"/><circle cx=\"13\" cy=\"37.17\" r=\"3\" fill=\"#484f60\"/></svg>",
1507
1510
  "rectangles": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><g><path fill=\"#484F5F\" d=\"M24.7,24.2c0,0.2-0.2,0.4-0.4,0.4H10.9c-0.2,0-0.4-0.2-0.4-0.4v-8.4c0-0.2,0.2-0.4,0.4-0.4h13.3c0.2,0,0.4,0.2,0.4,0.4V24.2z\"/><path fill=\"#484F5F\" d=\"M40.5,24.2c0,0.2-0.2,0.4-0.4,0.4H26.8c-0.2,0-0.4-0.2-0.4-0.4v-8.4c0-0.2,0.2-0.4,0.4-0.4h13.3c0.2,0,0.4,0.2,0.4,0.4V24.2z\"/><path fill=\"#484F5F\" d=\"M24.7,35.2c0,0.2-0.2,0.4-0.4,0.4H10.9c-0.2,0-0.4-0.2-0.4-0.4v-8.4c0-0.2,0.2-0.4,0.4-0.4h13.3c0.2,0,0.4,0.2,0.4,0.4V35.2z\"/><path opacity=\"0.5\" fill=\"#484F5F\" d=\"M40.5,35.2c0,0.2-0.2,0.4-0.4,0.4H26.8c-0.2,0-0.4-0.2-0.4-0.4v-8.4c0-0.2,0.2-0.4,0.4-0.4h13.3c0.2,0,0.4,0.2,0.4,0.4V35.2z\"/></g></svg>",
1508
1511
  "refresh": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"14.58 22.71 14.58 10 27.29 22.71 14.58 22.71\" fill=\"#484f60\"/><polygon points=\"35.42 27.29 35.42 40 22.71 27.29 35.42 27.29\" fill=\"#484f60\"/><path d=\"M19.9,15.32c4.09-4.09,10.2-8.13,18.33,0h0C31.73,8.82,26.65,13.9,22.56,18Z\" fill=\"#484f60\"/><path d=\"M30.1,34.68c-4.09,4.08-10.2,8.13-18.33,0h0c6.51,6.5,11.58,1.43,15.67-2.66Z\" fill=\"#484f60\"/></svg>",
1512
+ "regular_boxes_packing_circle_check": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path d=\"M0 192c0-17.7 14.3-32 32-32c106.7 0 213.3 0 320 0c17.7 0 32 14.3 32 32c0 13.4 0 26.8 0 40.2c-39.1 32.3-64 81.1-64 135.8c0 37.6 11.8 72.5 32 101.2c0 3.6 0 7.2 0 10.8c0 17.7-14.3 32-32 32c-85.4 0-170.7 0-256 0c-17.7 0-32-14.3-32-32c0-58.7 0-117.3 0-176c-17.7 0-32-14.3-32-32c0-26.7 0-53.3 0-80zm48 16c0 16 0 32 0 48c10.7 0 21.3 0 32 0c74.7 0 149.3 0 224 0c10.7 0 21.3 0 32 0c0-16 0-32 0-48L48 208zm32 96c0 53.3 0 106.7 0 160c74.7 0 149.3 0 224 0c0-53.3 0-106.7 0-160L80 304zm48 56c0-13.3 10.7-24 24-24c26.7 0 53.3 0 80 0c13.3 0 24 10.7 24 24s-10.7 24-24 24c-26.7 0-53.3 0-80 0c-13.3 0-24-10.7-24-24zM256 48c0-26.5 21.5-48 48-48c96 0 192 0 288 0c26.5 0 48 21.5 48 48c0 72.9 0 145.9 0 218.8c-12.9-18.3-29.2-34-48-46.3c0-57.5 0-115 0-172.5L304 48c0 26.7 0 53.3 0 80c-16 0-32 0-48 0c0-26.7 0-53.3 0-80zm96 320c0-79.5 64.5-144 144-144s144 64.5 144 144s-64.5 144-144 144s-144-64.5-144-144zm29.3 144c1-2.8 1.7-5.7 2.2-8.7c3.7 3 7.4 5.9 11.3 8.7c-4.5 0-9 0-13.5 0zm47.4-155.3c-6.2 6.2-6.2 16.4 0 22.6c13.3 13.3 26.7 26.7 40 40c6.2 6.2 16.4 6.2 22.6 0c24-24 48-48 72-72c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0c-20.2 20.2-40.5 40.5-60.7 60.7c-9.6-9.6-19.1-19.1-28.7-28.7c-6.2-6.2-16.4-6.2-22.6 0z\"/></svg>",
1509
1513
  "relations": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><g><path fill=\"#2A363B\" d=\"M32.8,35.2c1.4-1.3,2.5-4.7,2.9-6.7l-1.5,1.7C34,31.3,33.6,33.3,32.8,35.2z\"/><path fill=\"#2A363B\" d=\"M37,26.1l1.6-1.8c0-1.8-1.9-4-4.1-4h-0.5c-0.2,0.3-0.5,0.6-0.7,0.9C35.3,22,36.8,24.1,37,26.1z\"/><path fill=\"#2A363B\" d=\"M34.6,15.3c0-2.8-2.8-5.3-6.4-5.3c-1,0-1.9,0.2-2.8,0.6c4.1,0.2,7.5,3.3,7.5,6.9c0,0.6-0.1,1.3-0.3,1.9C33.8,18.2,34.6,16.7,34.6,15.3z\"/><path fill=\"#2A363B\" d=\"M33.7,28.2l1.6-1.8c0-1.8-1.9-4-4.1-4h-0.5c-0.2,0.3-0.5,0.6-0.7,0.9C32.1,24.2,33.6,26.2,33.7,28.2z\"/><path fill=\"#2A363B\" d=\"M29.6,37.3c1.4-1.3,2.5-4.7,2.9-6.7l-1.5,1.7C30.8,33.4,30.4,35.5,29.6,37.3z\"/><path fill=\"#2A363B\" d=\"M31.4,17.4c0-2.8-2.8-5.3-6.4-5.3c-1,0-1.9,0.2-2.8,0.6c4.1,0.2,7.5,3.3,7.5,6.9c0,0.6-0.1,1.3-0.3,1.9C30.6,20.4,31.4,18.9,31.4,17.4z\"/><path fill=\"#2A363B\" d=\"M28,24.6h-0.5c-0.9,1.2-2.5,2.7-4.2,3.3c0.1,0.2,0.2,0.4,0.2,0.6c0,0.4-0.3,0.8-0.6,1l1.5,7.1l-2.6,2.6l-2.6-2.6l1.5-7.1c-0.4-0.2-0.6-0.6-0.6-1c0-0.2,0.1-0.4,0.2-0.6c-1.7-0.6-3.3-2-4.2-3.3h-0.5c-2.3,0-4.1,2.2-4.1,4l2.8,3c0,1.8,1.9,8.4,4.1,8.4h6.9c2.3,0,4.2-6.6,4.2-8.4l2.8-3C32.2,26.8,30.3,24.6,28,24.6z\"/><path fill=\"#2A363B\" d=\"M28.1,19.6c0,2.8-2.8,5.9-6.4,5.9c-3.5,0-6.4-3.1-6.4-5.9c0-2.8,2.8-5.3,6.4-5.3C25.3,14.3,28.1,16.8,28.1,19.6z\"/></g></svg>",
1510
1514
  "remark": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,10.93c-8.28,0-15,4.9-15,11a8.87,8.87,0,0,0,2.27,5.77h-.16c.15.1.28.22.43.32a13.37,13.37,0,0,0,1.34,1.25c3.07,3.74.06,8.71-3.25,9.84,5.79-1.34,9.32-3.89,10.91-6.53a19.53,19.53,0,0,0,3.46.31c8.28,0,15-4.91,15-11S33.28,10.93,25,10.93Z\" fill=\"#484f60\"/></svg>",
1511
1515
  "remark_round_open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 51 51\"><path d=\"M683,375.62c-5.52,0-10,3.27-10,7.31a5.91,5.91,0,0,0,1.51,3.85h-.11c.11.07.19.14.29.22a8.27,8.27,0,0,0,.9.83c2,2.5,0,5.81-2.16,6.56,3.86-.89,6.21-2.59,7.27-4.35a13.52,13.52,0,0,0,2.31.2c5.52,0,10-3.27,10-7.3S688.52,375.62,683,375.62Z\" transform=\"translate(-658.5 -359.5)\" fill=\"#4d5050\"/><path d=\"M683,405a20,20,0,1,1,20-20A20,20,0,0,1,683,405Zm0-38.71A18.71,18.71,0,1,0,701.71,385,18.73,18.73,0,0,0,683,366.29Z\" transform=\"translate(-658.5 -359.5)\" fill=\"#4d5050\"/></svg>",
@@ -11305,13 +11309,19 @@ ListOfValuesModule.decorators = [
11305
11309
  ];
11306
11310
 
11307
11311
  class ListOfIconsComponent {
11308
- constructor(icons) {
11312
+ constructor(iconCacheService, icons) {
11313
+ this.iconCacheService = iconCacheService;
11309
11314
  this.icons = icons;
11310
11315
  this.iconSize = 25;
11311
11316
  this.itemSelected = new EventEmitter();
11312
11317
  this.Icon = CoreComponentsIcon;
11313
11318
  this.showMenu = false;
11319
+ this.showSubCategories = false;
11314
11320
  this._collection = [];
11321
+ this.subCategories = [
11322
+ { icon: this.iconCacheService.getIcon(this.Icon.BoxesPackingRegular), label: 'To be picked' },
11323
+ { icon: this.iconCacheService.getIcon(this.Icon.RegularBoxesPackingCircleCheck), label: 'Picked' }
11324
+ ];
11315
11325
  }
11316
11326
  set collection(value) {
11317
11327
  this._collection = value || [];
@@ -11331,10 +11341,23 @@ class ListOfIconsComponent {
11331
11341
  this.showMenu = !this.showMenu;
11332
11342
  }
11333
11343
  selectItem(item) {
11344
+ if (item.label === "Logistiek") {
11345
+ this.showSubCategories = !this.showSubCategories;
11346
+ return;
11347
+ }
11334
11348
  this.activeItem = item;
11335
11349
  this.showMenu = false;
11336
11350
  this.itemSelected.emit(this.activeItem);
11337
11351
  }
11352
+ handlePickingCategoryClicked(subCategory) {
11353
+ this.itemSelected.emit(subCategory);
11354
+ this.showMenu = false;
11355
+ this.showSubCategories = false;
11356
+ }
11357
+ onClickOutside() {
11358
+ this.showMenu = false;
11359
+ this.showSubCategories = false;
11360
+ }
11338
11361
  }
11339
11362
  ListOfIconsComponent.decorators = [
11340
11363
  { type: Component, args: [{
@@ -11344,17 +11367,25 @@ ListOfIconsComponent.decorators = [
11344
11367
  <co-icon [iconData]="activeItem.icon" [style.width.px]="iconSize" [style.height.px]="iconSize"></co-icon>
11345
11368
  <co-icon class="drop-arrow" [iconData]="icons.getIcon(Icon.ArrowPointDown)"></co-icon>
11346
11369
  </div>
11347
- <div class="dropdown-menu" *ngIf="showMenu" (clickOutside)="showMenu = false">
11348
- <div class="icon-item" *ngFor="let item of collection" (click)="selectItem(item)" [class.active]="item === activeItem">
11370
+ <div class="dropdown-menu" *ngIf="showMenu" (clickOutside)="onClickOutside()">
11371
+ <div class="icon-item" *ngFor="let item of collection" (click)="selectItem(item)"
11372
+ [class.active]="item === activeItem">
11349
11373
  <co-icon [iconData]="item.icon" [style.width.px]="iconSize" [style.height.px]="iconSize"></co-icon>
11350
11374
  <div class="label">{{ item.label }}</div>
11351
11375
  </div>
11376
+ <div class="picking-type-wrapper" *ngIf="showSubCategories">
11377
+ <div class="button-wrapper" *ngFor="let subCategory of subCategories" (click)="handlePickingCategoryClicked(subCategory)">
11378
+ <co-icon class="co-transaction-button-bar-icon" [iconData]="subCategory.icon"></co-icon>
11379
+ <span class="button-title">{{subCategory.label}}</span>
11380
+ </div>
11381
+ </div>
11352
11382
  </div>
11353
11383
  `,
11354
11384
  encapsulation: ViewEncapsulation.None
11355
11385
  },] }
11356
11386
  ];
11357
11387
  ListOfIconsComponent.ctorParameters = () => [
11388
+ { type: IconCacheService },
11358
11389
  { type: IconCacheService }
11359
11390
  ];
11360
11391
  ListOfIconsComponent.propDecorators = {
@@ -13654,8 +13685,9 @@ ColorSequenceService.decorators = [
13654
13685
  ];
13655
13686
 
13656
13687
  class HourSchedulingComponent {
13657
- constructor(cdRef) {
13688
+ constructor(cdRef, _datepipe) {
13658
13689
  this.cdRef = cdRef;
13690
+ this._datepipe = _datepipe;
13659
13691
  this.showClass = true;
13660
13692
  this.customTemplateUsed = false;
13661
13693
  this.hours = [];
@@ -13663,21 +13695,27 @@ class HourSchedulingComponent {
13663
13695
  this.draggedObject = null;
13664
13696
  }
13665
13697
  ngOnInit() {
13698
+ if (!this.childProp) {
13699
+ this.startTime = parseInt(this._datepipe.transform(new Date(this.schedule[this.startTimeProp]).toISOString(), 'H:mm'));
13700
+ this.endTime = parseInt(this._datepipe.transform(new Date(this.schedule[this.endTimeProp]).toISOString(), 'H:mm'));
13701
+ }
13702
+ else {
13703
+ this.startTime = parseInt(this._datepipe.transform(new Date(this.schedule[this.childProp][this.startTimeProp]).toISOString(), 'H:mm'));
13704
+ this.endTime = parseInt(this._datepipe.transform(new Date(this.schedule[this.childProp][this.endTimeProp]).toISOString(), 'H:mm'));
13705
+ }
13666
13706
  this.generateTimeBlocks();
13667
13707
  }
13668
13708
  generateTimeBlocks() {
13669
- const startTime = this.schedule[this.startTimeProp];
13670
- const endTime = this.schedule[this.endTimeProp];
13671
13709
  const objectsList = this.schedule[this.objectsProp];
13672
- for (let hour = startTime; hour <= endTime; hour++) {
13710
+ for (let hour = this.startTime; hour <= this.endTime; hour++) {
13673
13711
  this.hours.push(this.formatHour(hour));
13674
- this.scheduledObjects[this.formatHour(hour)] = this.getObjectsForHour(hour, objectsList);
13712
+ this.scheduledObjects[this.formatHour(hour)] = this._getObjectsForHour(hour, objectsList);
13675
13713
  }
13676
13714
  }
13677
- getObjectsForHour(hour, objectsList) {
13715
+ _getObjectsForHour(hour, objectsList) {
13678
13716
  const objectsForHour = [];
13679
- objectsList.forEach(obj => {
13680
- if (obj.start === hour) {
13717
+ objectsList.forEach((obj) => {
13718
+ if (this.convertToHourNotation(obj[this.startTimeProp]) === hour) {
13681
13719
  objectsForHour.push(Object.assign({}, obj));
13682
13720
  }
13683
13721
  });
@@ -13691,28 +13729,52 @@ class HourSchedulingComponent {
13691
13729
  const currentHourSpan = currentTarget.parentElement.parentElement.querySelector('.hour-label span');
13692
13730
  const currentHour = currentHourSpan.textContent;
13693
13731
  this.draggedObject = obj;
13694
- event.dataTransfer.setData('text', JSON.stringify({ obj, currentHour }));
13732
+ event.dataTransfer.setData('text', JSON.stringify({ obj: this.draggedObject, currentHour }));
13733
+ }
13734
+ onCustomDragStart(event, obj) {
13735
+ this.onDragStart(event, obj);
13695
13736
  }
13696
13737
  onDragOver(event) {
13697
13738
  event.preventDefault();
13698
13739
  }
13699
13740
  onDrop(event, hour) {
13700
13741
  event.preventDefault();
13742
+ event.stopPropagation();
13701
13743
  const data = JSON.parse(event.dataTransfer.getData('text'));
13744
+ if (!data || !data.obj) {
13745
+ return;
13746
+ }
13702
13747
  const newStartHour = parseInt(hour.split(':')[0], 10);
13703
13748
  const newEndHour = newStartHour + 1;
13704
- data.obj.start = newStartHour;
13705
- data.obj.end = newEndHour;
13706
- const currentHourBlock = data.currentHour;
13707
- this.scheduledObjects[currentHourBlock] = this.scheduledObjects[currentHourBlock].filter(o => o !== this.draggedObject);
13749
+ const originalStartHour = this.convertToHourNotation(data.obj[this.startTimeProp]);
13750
+ // Get the unique identifier value from the object using the `idProp`
13751
+ const objId = data.obj[this.idProp];
13752
+ // Ensure we create a new object to avoid mutation issues
13753
+ const updatedObject = Object.assign(Object.assign({}, data.obj), { start: newStartHour, end: newEndHour });
13754
+ const updatedObject2 = Object.assign(Object.assign({}, data.obj), { [this.startTimeProp]: this.createDate(newStartHour), [this.endTimeProp]: this.createDate(newEndHour) });
13755
+ // Remove the object from its old hour block using its unique id
13756
+ const originalHourBlock = this.formatHour(originalStartHour);
13757
+ this.scheduledObjects[originalHourBlock] = this.scheduledObjects[originalHourBlock].filter(o => o[this.idProp] !== objId);
13758
+ // Add the object to the new hour block
13708
13759
  const newHourBlock = this.formatHour(newStartHour);
13709
13760
  if (!this.scheduledObjects[newHourBlock]) {
13710
13761
  this.scheduledObjects[newHourBlock] = [];
13711
13762
  }
13712
- this.scheduledObjects[newHourBlock].push(data.obj);
13763
+ this.scheduledObjects[newHourBlock].push(updatedObject2);
13764
+ // Clear the dragged object
13713
13765
  this.draggedObject = null;
13766
+ // Trigger change detection to update the view
13714
13767
  this.cdRef.detectChanges();
13715
13768
  }
13769
+ convertToHourNotation(date) {
13770
+ return parseInt(this._datepipe.transform(new Date(date).toISOString(), 'H:mm'));
13771
+ }
13772
+ createDate(hours) {
13773
+ let date = new Date();
13774
+ date.setHours(hours);
13775
+ date.setMinutes(0, 0, 0);
13776
+ return date;
13777
+ }
13716
13778
  }
13717
13779
  HourSchedulingComponent.decorators = [
13718
13780
  { type: Component, args: [{
@@ -13720,23 +13782,35 @@ HourSchedulingComponent.decorators = [
13720
13782
  template: `
13721
13783
  <div class="time-block" *ngFor="let hour of hours">
13722
13784
  <div class="hour-label"><span [textContent]="hour"></span></div>
13723
- <div class="object-display"
13724
- (dragover)="onDragOver($event)"
13725
- (drop)="onDrop($event, hour)">
13785
+ <div
13786
+ class="object-display"
13787
+ (dragover)="onDragOver($event)"
13788
+ (drop)="onDrop($event, hour)"
13789
+ >
13726
13790
  <ng-container *ngIf="!customTemplateUsed">
13727
13791
  <ng-container *ngIf="scheduledObjects[hour]">
13728
- <div *ngFor="let obj of scheduledObjects[hour]" class="scheduled-object"
13729
- [draggable]="true"
13730
- (dragstart)="onDragStart($event, obj)">
13792
+ <div
13793
+ *ngFor="let obj of scheduledObjects[hour]"
13794
+ class="scheduled-object"
13795
+ [draggable]="true"
13796
+ (dragstart)="onDragStart($event, obj)"
13797
+ >
13731
13798
  <span class="title" [textContent]="obj.title"></span>
13732
13799
  <span class="sub-title" [textContent]="obj.subTitle"></span>
13733
13800
  </div>
13734
13801
  </ng-container>
13735
13802
  </ng-container>
13736
- <ng-template #customContent *ngIf="customTemplateUsed">
13737
- <ng-container *ngTemplateOutlet="customTemplate; context: { objects: scheduledObjects[hour] }">
13738
- </ng-container>
13739
- </ng-template>
13803
+
13804
+ <ng-container *ngIf="customTemplateUsed">
13805
+ <ng-template
13806
+ [ngTemplateOutlet]="customTemplate"
13807
+ [ngTemplateOutletContext]="{
13808
+ hour: hour,
13809
+ objects: scheduledObjects[hour]
13810
+ }"
13811
+ >
13812
+ </ng-template>
13813
+ </ng-container>
13740
13814
  </div>
13741
13815
  </div>
13742
13816
  `,
@@ -13744,16 +13818,19 @@ HourSchedulingComponent.decorators = [
13744
13818
  },] }
13745
13819
  ];
13746
13820
  HourSchedulingComponent.ctorParameters = () => [
13747
- { type: ChangeDetectorRef }
13821
+ { type: ChangeDetectorRef },
13822
+ { type: DatePipe }
13748
13823
  ];
13749
13824
  HourSchedulingComponent.propDecorators = {
13750
- showClass: [{ type: HostBinding, args: ['class.co-hour-scheduling',] }],
13751
13825
  schedule: [{ type: Input }],
13752
13826
  startTimeProp: [{ type: Input }],
13753
13827
  endTimeProp: [{ type: Input }],
13754
13828
  objectsProp: [{ type: Input }],
13829
+ childProp: [{ type: Input }],
13755
13830
  customTemplate: [{ type: Input }],
13756
- customTemplateUsed: [{ type: Input }]
13831
+ customTemplateUsed: [{ type: Input }],
13832
+ idProp: [{ type: Input }],
13833
+ generateTimeBlocks: [{ type: HostBinding, args: ['class.co-hour-scheduling',] }]
13757
13834
  };
13758
13835
 
13759
13836
  class HourSchedulingTestObjectComponent {
@@ -13791,7 +13868,8 @@ HourSchedulingComponentModule.decorators = [
13791
13868
  exports: [
13792
13869
  HourSchedulingComponent,
13793
13870
  HourSchedulingTestObjectComponent
13794
- ]
13871
+ ],
13872
+ providers: [DatePipe]
13795
13873
  },] }
13796
13874
  ];
13797
13875