kwikid-agent-dashboard 0.0.48 → 0.0.50

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.
@@ -502,8 +502,17 @@
502
502
  }
503
503
  return next();
504
504
  }
505
- function __rewriteRelativeImportExtension(path, preserveJsx) {
505
+ function __rewriteRelativeImportExtension(path, preserveJsx, extraExtensions, ignoreCase) {
506
506
  if (typeof path === "string" && /^\.\.?\//.test(path)) {
507
+ if (extraExtensions) {
508
+ for (var extension in extraExtensions) {
509
+ var suffix = path.slice(-extension.length);
510
+ if (suffix === extension || ignoreCase && suffix.toLowerCase() === extension.toLowerCase()) {
511
+ var output = extraExtensions[extension];
512
+ return output === extension ? path : path.slice(0, -extension.length) + output;
513
+ }
514
+ }
515
+ }
507
516
  return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
508
517
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
509
518
  });
@@ -2228,11 +2237,18 @@
2228
2237
  this.mapDirectionsService = mapDirectionsService;
2229
2238
  this.httpClient = httpClient;
2230
2239
  this.allMarkers = [];
2240
+ // Geocoded locations by address, so re-plotting does not query Nominatim again
2241
+ this.locationCache = new Map();
2242
+ this.lastGeocodeAt = 0;
2243
+ // Every Nominatim request goes through this chain, so they never overlap
2244
+ this.geocodeQueue = Promise.resolve();
2245
+ // Only the latest plot may draw; an older one still geocoding is dropped
2246
+ this.plotRunId = 0;
2231
2247
  }
2232
2248
  // To get Current Position
2233
2249
  OpenStreetMapsService.prototype.getPosition = function () {
2234
2250
  return new Promise(function (resolve, reject) {
2235
- navigator.geolocation.watchPosition(function (resp) {
2251
+ navigator.geolocation.getCurrentPosition(function (resp) {
2236
2252
  resolve({
2237
2253
  lng: resp.coords.longitude,
2238
2254
  lat: resp.coords.latitude
@@ -2246,43 +2262,37 @@
2246
2262
  OpenStreetMapsService.prototype.getLocation = function (task) {
2247
2263
  return __awaiter(this, void 0, void 0, function () {
2248
2264
  var _this = this;
2249
- return __generator(this, function (_q) {
2265
+ return __generator(this, function (_l) {
2250
2266
  return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
2251
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, encodedAddres, config, address, config, address, address, url, response, data, isValidLocation, location;
2252
- return __generator(this, function (_q) {
2253
- switch (_q.label) {
2267
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, address, config, config, location, _l, _m, _o, isValidLocation;
2268
+ return __generator(this, function (_p) {
2269
+ switch (_p.label) {
2254
2270
  case 0:
2255
2271
  // If Fetch Address from Multiple Paths
2256
2272
  if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "extendedFlags.taskLocationPaths")) {
2257
2273
  config = this.agentService.config.extendedFlags.taskLocationPaths;
2258
2274
  address = addressConcator(task, config);
2259
- // Encode the Address in URI
2260
- encodedAddres = encodeURI(address);
2261
2275
  }
2262
2276
  // If Fetch Address from Single Path
2263
2277
  else if (kwikidToolkit.checkObjectPathExists(this.agentService.config, "extendedFlags.taskLocationPath")) {
2264
2278
  config = this.agentService.config.extendedFlags.taskLocationPath;
2265
2279
  address = kwikidToolkit.getObjectValueFromPath(task, config);
2266
- // Encode the Address in URI
2267
- encodedAddres = encodeURI(address);
2268
2280
  }
2269
2281
  // Default Address Paths Avaiable
2270
2282
  else {
2271
- address = (_k = (_j = (_g = (_d = (_c = (_b = (_a = task === null || task === void 0 ? void 0 : task.extras) === null || _a === void 0 ? void 0 : _a.task_details) === null || _b === void 0 ? void 0 : _b.customer_details) === null || _c === void 0 ? void 0 : _c.address) !== null && _d !== void 0 ? _d : (_f = (_e = task === null || task === void 0 ? void 0 : task.task_details) === null || _e === void 0 ? void 0 : _e.customer_details) === null || _f === void 0 ? void 0 : _f.address) !== null && _g !== void 0 ? _g : (_h = task === null || task === void 0 ? void 0 : task.extras) === null || _h === void 0 ? void 0 : _h.address) !== null && _j !== void 0 ? _j : task === null || task === void 0 ? void 0 : task.address) !== null && _k !== void 0 ? _k : "";
2272
- // Encode the Address in URI
2273
- encodedAddres = encodeURI(address);
2283
+ address =
2284
+ (_k = (_j = (_g = (_d = (_c = (_b = (_a = task === null || task === void 0 ? void 0 : task.extras) === null || _a === void 0 ? void 0 : _a.task_details) === null || _b === void 0 ? void 0 : _b.customer_details) === null || _c === void 0 ? void 0 : _c.address) !== null && _d !== void 0 ? _d : (_f = (_e = task === null || task === void 0 ? void 0 : task.task_details) === null || _e === void 0 ? void 0 : _e.customer_details) === null || _f === void 0 ? void 0 : _f.address) !== null && _g !== void 0 ? _g : (_h = task === null || task === void 0 ? void 0 : task.extras) === null || _h === void 0 ? void 0 : _h.address) !== null && _j !== void 0 ? _j : task === null || task === void 0 ? void 0 : task.address) !== null && _k !== void 0 ? _k : "";
2274
2285
  }
2275
- url = "https://nominatim.openstreetmap.org/search?q=" + encodedAddres + "&format=json";
2276
- return [4 /*yield*/, fetch(url)];
2286
+ address = String(address !== null && address !== void 0 ? address : "")
2287
+ .replace(/\b(undefined|null)\b/g, " ")
2288
+ .replace(/\s+/g, " ")
2289
+ .trim();
2290
+ _m = (_l = Object).assign;
2291
+ _o = [{}];
2292
+ return [4 /*yield*/, this.geocodeAddress(address)];
2277
2293
  case 1:
2278
- response = _q.sent();
2279
- return [4 /*yield*/, response.json()];
2280
- case 2:
2281
- data = _q.sent();
2282
- isValidLocation = kwikidToolkit.isNotEmptyArray(data) && ((_l = data[0]) === null || _l === void 0 ? void 0 : _l.lat) & ((_m = data[0]) === null || _m === void 0 ? void 0 : _m.lon);
2283
- location = isValidLocation
2284
- ? { lat: (_o = data[0]) === null || _o === void 0 ? void 0 : _o.lat, lng: (_p = data[0]) === null || _p === void 0 ? void 0 : _p.lon }
2285
- : { lat: null, lng: null };
2294
+ location = _m.apply(_l, _o.concat([(_p.sent())]));
2295
+ isValidLocation = location.lat !== null && location.lng !== null;
2286
2296
  // Set Location validation & Google Maps URL
2287
2297
  location.isValidLocation = isValidLocation;
2288
2298
  location.color = isValidLocation ? "blue" : "red";
@@ -2295,55 +2305,122 @@
2295
2305
  });
2296
2306
  });
2297
2307
  };
2298
- // Get Tasks | Markers Location Co Ordinates
2308
+ // Geocode an address with Nominatim: one request at a time, results cached
2309
+ OpenStreetMapsService.prototype.geocodeAddress = function (address) {
2310
+ var _this = this;
2311
+ if (!address) {
2312
+ return Promise.resolve({ lat: null, lng: null });
2313
+ }
2314
+ if (!this.locationCache.has(address)) {
2315
+ var request = this.geocodeQueue.then(function () { return _this.fetchLocation(address); });
2316
+ this.geocodeQueue = request.catch(function () { return undefined; });
2317
+ this.locationCache.set(address, request);
2318
+ request.then(function (result) {
2319
+ // Do not keep failures (rate limit, outage); retry on the next plot
2320
+ if (result.failed) {
2321
+ _this.locationCache.delete(address);
2322
+ }
2323
+ });
2324
+ }
2325
+ return this.locationCache
2326
+ .get(address)
2327
+ .then(function (_l) {
2328
+ var lat = _l.lat, lng = _l.lng;
2329
+ return ({ lat: lat, lng: lng });
2330
+ });
2331
+ };
2332
+ OpenStreetMapsService.prototype.fetchLocation = function (address) {
2333
+ var _a, _b;
2334
+ return __awaiter(this, void 0, void 0, function () {
2335
+ var wait, url, controller_1, timer, data, response, lat, lng, error_1;
2336
+ return __generator(this, function (_l) {
2337
+ switch (_l.label) {
2338
+ case 0:
2339
+ wait = this.lastGeocodeAt +
2340
+ OpenStreetMapsService.GEOCODE_INTERVAL_MS -
2341
+ Date.now();
2342
+ if (!(wait > 0)) return [3 /*break*/, 2];
2343
+ return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, wait); })];
2344
+ case 1:
2345
+ _l.sent();
2346
+ _l.label = 2;
2347
+ case 2:
2348
+ this.lastGeocodeAt = Date.now();
2349
+ _l.label = 3;
2350
+ case 3:
2351
+ _l.trys.push([3, 9, , 10]);
2352
+ url = "https://nominatim.openstreetmap.org/search?q=" + encodeURIComponent(address) + "&format=json&limit=1";
2353
+ controller_1 = new AbortController();
2354
+ timer = setTimeout(function () { return controller_1.abort(); }, OpenStreetMapsService.GEOCODE_TIMEOUT_MS);
2355
+ data = void 0;
2356
+ _l.label = 4;
2357
+ case 4:
2358
+ _l.trys.push([4, , 7, 8]);
2359
+ return [4 /*yield*/, fetch(url, { signal: controller_1.signal })];
2360
+ case 5:
2361
+ response = _l.sent();
2362
+ if (!response.ok) {
2363
+ return [2 /*return*/, { lat: null, lng: null, failed: true }];
2364
+ }
2365
+ return [4 /*yield*/, response.json()];
2366
+ case 6:
2367
+ data = _l.sent();
2368
+ return [3 /*break*/, 8];
2369
+ case 7:
2370
+ clearTimeout(timer);
2371
+ return [7 /*endfinally*/];
2372
+ case 8:
2373
+ lat = kwikidToolkit.isNotEmptyArray(data) ? parseFloat((_a = data[0]) === null || _a === void 0 ? void 0 : _a.lat) : NaN;
2374
+ lng = kwikidToolkit.isNotEmptyArray(data) ? parseFloat((_b = data[0]) === null || _b === void 0 ? void 0 : _b.lon) : NaN;
2375
+ return [2 /*return*/, Number.isFinite(lat) && Number.isFinite(lng)
2376
+ ? { lat: lat, lng: lng }
2377
+ : { lat: null, lng: null }];
2378
+ case 9:
2379
+ error_1 = _l.sent();
2380
+ return [2 /*return*/, { lat: null, lng: null, failed: true }];
2381
+ case 10: return [2 /*return*/];
2382
+ }
2383
+ });
2384
+ });
2385
+ };
2386
+ // Get Tasks | Markers Location Co Ordinates, in task order
2299
2387
  OpenStreetMapsService.prototype.getMarkersLocation = function (myMarker, tasks) {
2300
2388
  return __awaiter(this, void 0, void 0, function () {
2389
+ var located;
2301
2390
  var _this = this;
2302
- return __generator(this, function (_q) {
2303
- return [2 /*return*/, new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
2304
- var markers, promises;
2305
- var _this = this;
2306
- return __generator(this, function (_q) {
2307
- switch (_q.label) {
2308
- case 0:
2309
- markers = [];
2310
- markers.push(myMarker);
2311
- promises = tasks.map(function (task) { return __awaiter(_this, void 0, void 0, function () {
2312
- var marker;
2313
- return __generator(this, function (_q) {
2314
- switch (_q.label) {
2315
- case 0: return [4 /*yield*/, this.getLocation(task)];
2316
- case 1:
2317
- marker = _q.sent();
2318
- task = Object.assign(Object.assign({}, task), marker);
2319
- markers.push(task);
2320
- return [2 /*return*/];
2321
- }
2322
- });
2323
- }); });
2324
- return [4 /*yield*/, Promise.all(promises)];
2325
- case 1:
2326
- _q.sent();
2327
- resolve(markers);
2328
- return [2 /*return*/];
2329
- }
2330
- });
2331
- }); })];
2391
+ return __generator(this, function (_l) {
2392
+ switch (_l.label) {
2393
+ case 0: return [4 /*yield*/, Promise.all(tasks.map(function (task) { return __awaiter(_this, void 0, void 0, function () {
2394
+ var _l, _m, _o;
2395
+ return __generator(this, function (_p) {
2396
+ switch (_p.label) {
2397
+ case 0:
2398
+ _m = (_l = Object).assign;
2399
+ _o = [Object.assign({}, task)];
2400
+ return [4 /*yield*/, this.getLocation(task)];
2401
+ case 1: return [2 /*return*/, (_m.apply(_l, _o.concat([(_p.sent())])))];
2402
+ }
2403
+ });
2404
+ }); }))];
2405
+ case 1:
2406
+ located = _l.sent();
2407
+ return [2 /*return*/, __spreadArray([myMarker], __read(located))];
2408
+ }
2332
2409
  });
2333
2410
  });
2334
2411
  };
2335
2412
  // To Initialize Open Street Map
2336
2413
  OpenStreetMapsService.prototype.initializeMap = function () {
2337
2414
  return __awaiter(this, void 0, void 0, function () {
2338
- var _q;
2339
- return __generator(this, function (_r) {
2340
- switch (_r.label) {
2415
+ var _l;
2416
+ return __generator(this, function (_m) {
2417
+ switch (_m.label) {
2341
2418
  case 0:
2342
2419
  console.log("Running Init Open Street Maps");
2343
- _q = this;
2420
+ _l = this;
2344
2421
  return [4 /*yield*/, this.getPosition()];
2345
2422
  case 1:
2346
- _q.myPosition = _r.sent();
2423
+ _l.myPosition = _m.sent();
2347
2424
  this.map = L__namespace.map("map", {
2348
2425
  center: [this.myPosition.lat, this.myPosition.lng],
2349
2426
  zoom: 11
@@ -2355,8 +2432,11 @@
2355
2432
  });
2356
2433
  };
2357
2434
  // To Add Open Street Marker in Map
2358
- OpenStreetMapsService.prototype.addMarker = function (_q) {
2359
- var lat = _q.lat, lng = _q.lng, title = _q.title, color = _q.color;
2435
+ OpenStreetMapsService.prototype.addMarker = function (_l) {
2436
+ var lat = _l.lat, lng = _l.lng, title = _l.title, color = _l.color;
2437
+ if (!this.markersLayer) {
2438
+ this.markersLayer = L__namespace.layerGroup().addTo(this.map);
2439
+ }
2360
2440
  L__namespace.marker([lat, lng], {
2361
2441
  icon: L__namespace.icon({
2362
2442
  iconUrl: color == "red"
@@ -2364,63 +2444,100 @@
2364
2444
  : "https://kwikid.s3.ap-south-1.amazonaws.com/CONFIG/USER/assets/map-marker-1.png"
2365
2445
  })
2366
2446
  })
2367
- .addTo(this.map)
2368
- .bindPopup(title);
2447
+ .addTo(this.markersLayer)
2448
+ .bindPopup(String(title));
2449
+ };
2450
+ // Remove markers and routes from a previous plot
2451
+ OpenStreetMapsService.prototype.clearMap = function () {
2452
+ if (this.markersLayer) {
2453
+ this.markersLayer.clearLayers();
2454
+ }
2455
+ if (this.allTasksRoutes) {
2456
+ this.map.removeControl(this.allTasksRoutes);
2457
+ this.allTasksRoutes = undefined;
2458
+ }
2459
+ if (this.selectedTaskRoutes) {
2460
+ this.map.removeControl(this.selectedTaskRoutes);
2461
+ this.selectedTaskRoutes = undefined;
2462
+ }
2369
2463
  };
2370
2464
  // To Plot Open Street Directions for All Tasks
2371
2465
  OpenStreetMapsService.prototype.plotDirectionsForAllTasks = function (tasks) {
2466
+ if (!this.map || !this.myPosition) {
2467
+ return Promise.resolve(tasks);
2468
+ }
2469
+ this.plotRunId += 1;
2470
+ var plot = this.plotTasks(tasks, this.plotRunId);
2471
+ this.latestPlot = plot;
2472
+ return plot;
2473
+ };
2474
+ OpenStreetMapsService.prototype.plotTasks = function (tasks, runId) {
2475
+ var _a;
2372
2476
  return __awaiter(this, void 0, void 0, function () {
2373
- var myMarker, _q, startingPoint, unvisitedWaypoints, optimizedRoute, styles;
2477
+ var myMarker, markers, located, notLocated, optimizedRoute, styles, ordered, selectedId, selected;
2374
2478
  var _this = this;
2375
- return __generator(this, function (_r) {
2376
- switch (_r.label) {
2479
+ return __generator(this, function (_l) {
2480
+ switch (_l.label) {
2377
2481
  case 0:
2378
- if (!this.map) return [3 /*break*/, 2];
2379
- this.allMarkers = [];
2380
2482
  myMarker = {
2381
2483
  lat: this.myPosition.lat,
2382
2484
  lng: this.myPosition.lng,
2383
- title: 0,
2485
+ title: "0",
2384
2486
  color: "red"
2385
2487
  };
2386
- this.addMarker(myMarker);
2387
- this.allMarkers.push(myMarker);
2388
- // Create Markers for all Tasks
2389
- _q = this;
2390
2488
  return [4 /*yield*/, this.getMarkersLocation(myMarker, tasks)];
2391
2489
  case 1:
2392
- // Create Markers for all Tasks
2393
- _q.allMarkers = _r.sent();
2394
- startingPoint = this.allMarkers[0];
2395
- unvisitedWaypoints = this.allMarkers.slice(1);
2396
- optimizedRoute = nearestNeighborAlgorithm(startingPoint, unvisitedWaypoints);
2397
- // Sort All Markers as per optimized routes
2398
- this.allMarkers = this.sortTasksAsPerDistance(optimizedRoute, this.allMarkers, true);
2399
- // Sort All Tasks as per optimized routes
2400
- tasks = this.sortTasksAsPerDistance(optimizedRoute.slice(1), tasks, false);
2401
- // Plot Markers for All Tasks
2402
- tasks.map(function (task) {
2403
- if (task === null || task === void 0 ? void 0 : task.isValidLocation) {
2404
- var marker = _this.getLocation(task);
2405
- _this.addMarker(marker);
2406
- }
2490
+ markers = _l.sent();
2491
+ if (runId !== this.plotRunId) {
2492
+ // A newer plot owns the map; give callers its result instead of stale tasks
2493
+ return [2 /*return*/, this.latestPlot];
2494
+ }
2495
+ this.clearMap();
2496
+ this.addMarker(myMarker);
2497
+ located = markers.slice(1).filter(function (marker) { return marker.isValidLocation; });
2498
+ notLocated = markers
2499
+ .slice(1)
2500
+ .filter(function (marker) { return !marker.isValidLocation; });
2501
+ optimizedRoute = nearestNeighborAlgorithm(myMarker, located);
2502
+ optimizedRoute.slice(1).forEach(function (marker, index) {
2503
+ marker.title = String(index + 1);
2407
2504
  });
2408
- styles = [
2409
- { color: "blue", opacity: 1, weight: 8 },
2410
- { color: "white", opacity: 0.6, weight: 12 }
2411
- ];
2412
- // Set Routes for all Tasks
2413
- this.allTasksRoutes = this.setRoutes(this.allMarkers, styles);
2505
+ this.allMarkers = optimizedRoute;
2506
+ // Plot Markers for located Tasks
2507
+ located.forEach(function (marker) { return _this.addMarker(marker); });
2508
+ // Set Routes for all located Tasks
2509
+ if (located.length > 0) {
2510
+ styles = [
2511
+ { color: "blue", opacity: 1, weight: 8 },
2512
+ { color: "white", opacity: 0.6, weight: 12 }
2513
+ ];
2514
+ this.allTasksRoutes = this.setRoutes(optimizedRoute, styles);
2515
+ }
2414
2516
  this.fitMapBounds();
2415
- _r.label = 2;
2416
- case 2: return [2 /*return*/, tasks];
2517
+ ordered = __spreadArray(__spreadArray([], __read(optimizedRoute.slice(1))), __read(notLocated));
2518
+ selectedId = (_a = this.agentService.currentTaskDetails) === null || _a === void 0 ? void 0 : _a.session_id;
2519
+ selected = selectedId
2520
+ ? ordered.find(function (task) { return task.session_id === selectedId; })
2521
+ : undefined;
2522
+ if (selected === null || selected === void 0 ? void 0 : selected.isValidLocation) {
2523
+ this.agentService.currentTaskDetails = selected;
2524
+ this.plotDirectionsForSelectedTask(selected);
2525
+ }
2526
+ else {
2527
+ // Leave currentTaskDetails alone: it also drives the details panel
2528
+ this.selectedTaskDistanceAndTime = undefined;
2529
+ }
2530
+ return [2 /*return*/, ordered];
2417
2531
  }
2418
2532
  });
2419
2533
  });
2420
2534
  };
2421
2535
  // To plot Open Street Direction for selected Task
2422
2536
  OpenStreetMapsService.prototype.plotDirectionsForSelectedTask = function (task) {
2423
- if (task !== null) {
2537
+ if (!this.map) {
2538
+ return;
2539
+ }
2540
+ if (task) {
2424
2541
  // Remove Previously Selected Task Route
2425
2542
  if (this.selectedTaskRoutes) {
2426
2543
  this.map.removeControl(this.selectedTaskRoutes);
@@ -2431,7 +2548,7 @@
2431
2548
  }
2432
2549
  var taskMarker = task;
2433
2550
  // If Location is Available in Task Details
2434
- if (taskMarker.color != "red") {
2551
+ if (taskMarker === null || taskMarker === void 0 ? void 0 : taskMarker.isValidLocation) {
2435
2552
  var markers = [this.allMarkers[0], taskMarker];
2436
2553
  var styles = [
2437
2554
  { color: "green", opacity: 1, weight: 8 },
@@ -2449,7 +2566,9 @@
2449
2566
  if (this.selectedTaskRoutes) {
2450
2567
  this.map.removeControl(this.selectedTaskRoutes);
2451
2568
  }
2452
- this.map.addControl(this.allTasksRoutes);
2569
+ if (this.allTasksRoutes) {
2570
+ this.map.addControl(this.allTasksRoutes);
2571
+ }
2453
2572
  this.selectedTaskRoutes = undefined;
2454
2573
  }
2455
2574
  this.fitMapBounds();
@@ -2460,47 +2579,59 @@
2460
2579
  };
2461
2580
  // Set Distance & Time of Selected Task
2462
2581
  OpenStreetMapsService.prototype.setSelectedTaskDistanceAndTime = function () {
2582
+ var _this = this;
2583
+ this.selectedTaskDistanceAndTime = undefined;
2463
2584
  this.selectedTaskRoutes.on("routesfound", function (e) {
2464
2585
  var routes = e.routes;
2465
2586
  var summary = routes[0].summary;
2466
- var distance = summary.totalDistance / 1000;
2467
- var time = Math.round((summary.totalTime % 3600) / 60);
2468
- this.selectedTaskDistanceAndTime = {
2587
+ var METRES_PER_KM = 1000;
2588
+ var SECONDS_PER_MINUTE = 60;
2589
+ var distance = Math.round((summary.totalDistance / METRES_PER_KM) * 10) / 10; // eslint-disable-line no-magic-numbers
2590
+ var time = Math.round(summary.totalTime / SECONDS_PER_MINUTE);
2591
+ _this.selectedTaskDistanceAndTime = {
2469
2592
  distance: distance,
2470
2593
  time: time
2471
2594
  };
2472
2595
  });
2473
2596
  };
2474
- // To sort Open Street Maps Task as per nearest distance
2475
- OpenStreetMapsService.prototype.sortTasksAsPerDistance = function (order, tasks, isMarker) {
2476
- var sortedTasks = [];
2477
- for (var i = 0; i < tasks.length; i++) {
2478
- var title = isMarker ? order[i].title : order[i].title - 1;
2479
- var task = tasks[title];
2480
- sortedTasks.push(task);
2481
- }
2482
- return sortedTasks;
2483
- };
2484
2597
  // To set Open Street routes in the maps
2485
2598
  OpenStreetMapsService.prototype.setRoutes = function (markers, styles) {
2486
2599
  return L__namespace.Routing.control({
2487
- waypoints: markers,
2600
+ waypoints: markers.map(function (marker) { return L__namespace.latLng(marker.lat, marker.lng); }),
2488
2601
  lineOptions: {
2489
2602
  styles: styles
2490
2603
  },
2491
2604
  createMarker: function () {
2492
2605
  return null;
2493
2606
  },
2494
- routeWhileDragging: true
2607
+ addWaypoints: false,
2608
+ fitSelectedRoutes: false,
2609
+ show: false
2495
2610
  }).addTo(this.map);
2496
2611
  };
2497
2612
  // To set Open Street view point on the map
2498
2613
  OpenStreetMapsService.prototype.fitMapBounds = function () {
2499
- var markerLatLngs = this.allMarkers.map(function (marker) { return L__namespace.latLng(marker.lat, marker.lng); });
2500
- this.map.fitBounds(markerLatLngs);
2614
+ var _a;
2615
+ var markerLatLngs = ((_a = this.allMarkers) !== null && _a !== void 0 ? _a : [])
2616
+ .filter(function (marker) { return marker && marker.lat !== null && marker.lng !== null; })
2617
+ .map(function (marker) { return L__namespace.latLng(marker.lat, marker.lng); });
2618
+ var PADDING_PX = 40;
2619
+ var SINGLE_MARKER_ZOOM = 13;
2620
+ if (markerLatLngs.length > 1) {
2621
+ this.map.fitBounds(L__namespace.latLngBounds(markerLatLngs), {
2622
+ padding: [PADDING_PX, PADDING_PX]
2623
+ });
2624
+ }
2625
+ else if (markerLatLngs.length === 1) {
2626
+ this.map.setView(markerLatLngs[0], SINGLE_MARKER_ZOOM);
2627
+ }
2501
2628
  };
2502
2629
  return OpenStreetMapsService;
2503
2630
  }());
2631
+ // Nominatim allows at most 1 request per second
2632
+ OpenStreetMapsService.GEOCODE_INTERVAL_MS = 1100; // eslint-disable-line no-magic-numbers
2633
+ // A stalled request must not hold up the queue
2634
+ OpenStreetMapsService.GEOCODE_TIMEOUT_MS = 10000; // eslint-disable-line no-magic-numbers
2504
2635
  /** @nocollapse */ OpenStreetMapsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OpenStreetMapsService, deps: [{ token: AgentService }, { token: i2__namespace$2.MapDirectionsService }, { token: i3__namespace$2.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2505
2636
  /** @nocollapse */ OpenStreetMapsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OpenStreetMapsService, providedIn: "root" });
2506
2637
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OpenStreetMapsService, decorators: [{
@@ -2835,6 +2966,7 @@
2835
2966
  this.isMobileView = false;
2836
2967
  this.viewTaskDetails = [];
2837
2968
  this.taskId = "";
2969
+ this.headerFields = [];
2838
2970
  this.labelValuePairConfig = {};
2839
2971
  this.labelValuePairData = [];
2840
2972
  this.onClickPerformAction = new i0.EventEmitter();
@@ -2873,9 +3005,10 @@
2873
3005
  };
2874
3006
  CustomerTileComponent.prototype.parseData = function () {
2875
3007
  var _this = this;
2876
- var _a, _b, _c, _d, _e, _f;
2877
- var identifier = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.taskIdentifier) !== null && _b !== void 0 ? _b : "user_id";
3008
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
3009
+ var identifier = (_g = (_e = (_d = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.taskUI) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.taskId) === null || _d === void 0 ? void 0 : _d.path) !== null && _e !== void 0 ? _e : (_f = this.config) === null || _f === void 0 ? void 0 : _f.taskIdentifier) !== null && _g !== void 0 ? _g : "user_id";
2878
3010
  this.taskId = kwikidToolkit.getObjectValueFromPath(this.customer, identifier);
3011
+ this.headerFields = this.parseHeaderFields();
2879
3012
  var detailsConfig = [];
2880
3013
  if (kwikidToolkit.checkObjectPathExists(this.config, "taskUI.details.data") &&
2881
3014
  kwikidToolkit.isNotEmptyArray(this.config.taskUI.details.data)) {
@@ -2894,7 +3027,33 @@
2894
3027
  });
2895
3028
  this.labelValuePairData = data_1;
2896
3029
  }
2897
- this.labelValuePairConfig = (_f = (_e = (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.taskUI) === null || _d === void 0 ? void 0 : _d.details) === null || _e === void 0 ? void 0 : _e.config) !== null && _f !== void 0 ? _f : {};
3030
+ this.labelValuePairConfig = (_l = (_k = (_j = (_h = this.config) === null || _h === void 0 ? void 0 : _h.taskUI) === null || _j === void 0 ? void 0 : _j.details) === null || _k === void 0 ? void 0 : _k.config) !== null && _l !== void 0 ? _l : {};
3031
+ };
3032
+ CustomerTileComponent.prototype.parseHeaderFields = function () {
3033
+ var _this = this;
3034
+ var _a, _b, _c, _d;
3035
+ var fieldsConfig = [];
3036
+ if (kwikidToolkit.checkObjectPathExists(this.config, "taskUI.header.fields") &&
3037
+ kwikidToolkit.isNotEmptyArray(this.config.taskUI.header.fields)) {
3038
+ fieldsConfig = this.config.taskUI.header.fields;
3039
+ }
3040
+ else if ((_d = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.taskUI) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.taskName) === null || _d === void 0 ? void 0 : _d.path) {
3041
+ // Backward compatible with earlier taskName config
3042
+ fieldsConfig = [{ path: this.config.taskUI.header.taskName.path }];
3043
+ }
3044
+ return fieldsConfig
3045
+ .map(function (field) {
3046
+ var _a;
3047
+ var value = "";
3048
+ if (Array.isArray(field.path)) {
3049
+ value = ((_a = _this.getValueFromArray(field.path)) === null || _a === void 0 ? void 0 : _a.trim()) || "";
3050
+ }
3051
+ else if (field.path) {
3052
+ value = kwikidToolkit.getObjectValueFromPath(_this.customer, field.path) || "";
3053
+ }
3054
+ return Object.assign(Object.assign({}, field), { value: value });
3055
+ })
3056
+ .filter(function (field) { return field.value; });
2898
3057
  };
2899
3058
  CustomerTileComponent.prototype.openDetails = function () {
2900
3059
  var _a, _b, _c, _d;
@@ -2930,7 +3089,7 @@
2930
3089
  return CustomerTileComponent;
2931
3090
  }());
2932
3091
  /** @nocollapse */ CustomerTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, deps: [{ token: GoogleMapsService }, { token: OpenStreetMapsService }, { token: AgentService }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
2933
- /** @nocollapse */ CustomerTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerTileComponent, selector: "customer-tile", inputs: { customer: "customer", index: "index", config: "config" }, outputs: { onClickPerformAction: "onClickPerformAction", nextStep: "nextStep", removeTask: "removeTask" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n [ngClass]=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id\n ? 'customer-tile-wrapper customer-tile-active'\n : 'customer-tile-wrapper'\n \"\n>\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{ taskId }}\n </div>\n <status-pill\n *ngIf=\"config?.utilityFlags?.isShowTaskStatus\"\n [config]=\"config?.taskUI?.header?.taskStatus\"\n [status]=\"\n customer[config?.taskUI?.header?.taskStatus?.path ?? 'session_status']\n \"\n ></status-pill>\n </div>\n <kwikui-button\n *ngIf=\"!agentService.isMobileView && !agentService.showMapview\"\n [icon]=\"\n agentService.currentTaskDetails?.session_id == customer?.session_id\n ? 'tuiIconChevronLeftLarge'\n : 'tuiIconChevronRightLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"agentService.isMobileView || agentService.showMapview\"\n [icon]=\"\n agentService.currentTaskDetails?.session_id == customer?.session_id\n ? 'tuiIconChevronUpLarge'\n : 'tuiIconChevronDownLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button>\n </div>\n <div\n *ngIf=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id &&\n (agentService.isMobileView || agentService.showMapview)\n \"\n [ngClass]=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id &&\n (agentService.isMobileView || agentService.showMapview)\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <kwikui-label-value-pair\n [config]=\"labelValuePairConfig\"\n [data]=\"labelValuePairData\"\n ></kwikui-label-value-pair>\n <!-- <div\n *ngIf=\"\n agentService.config?.maps?.sho &&\n agentService.config?.isShowDistanceAndTime &&\n openStreetMapsService.getSelectedTaskDistanceAndTime()\n \"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n Distance: {{ openStreetMapsService.getSelectedTaskDistanceAndTime()?.distance }} |\n Time: {{ openStreetMapsService.getSelectedTaskDistanceAndTime()?.time }}\n </div> -->\n </div>\n <div class=\"customer-tile-secondary-container-actions\">\n <ng-container *ngFor=\"let action of config?.taskUI?.details?.action\">\n <kwikid-action-button\n [action]=\"action\"\n [config]=\"config\"\n [customer]=\"customer\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-action-button>\n </ng-container>\n <!-- <div class=\"customer-tile-secondary-container-task-buttons\">\n <kwikui-button\n *ngIf=\"config?.isAllowRemoveTask\"\n [icon]=\"'tuiIconTrash2'\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"handleOnClickRemoveTask(customer)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"config?.isShowCopyLink\"\n icon=\"tuiIconCopy\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"\n handleOnClickNext({\n customer: customer,\n stepType: 'SHARE_JOURNEY_LINK'\n })\n \"\n ></kwikui-button>\n </div>\n <div class=\"customer-tile-secondary-container-journey-buttons\">\n <kwikui-button\n *ngIf=\"config?.isShowMaps && customer?.isValidLocation\"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToMaps(customer.googleMapsUrl)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n config?.isAllowStartJourney &&\n agentService.canStartJourney(customer.session_status)\n \"\n label=\"Start Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n handleOnClickNext({ customer: customer, stepType: 'START_JOURNEY' })\n \"\n ></kwikui-button>\n </div> -->\n </div>\n </div>\n</div>\n", styles: [".customer-tile-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto;grid-gap:.5rem;gap:.5rem;margin:1rem;padding:1rem .25rem 1rem 1rem;border-radius:1rem;border:.5px solid #ddd}.customer-tile-wrapper .customer-tile-primary-container{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;width:100%;height:100%}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data{padding-left:.2rem;grid-gap:.6rem;gap:.6rem;display:flex;flex-direction:column;flex-wrap:wrap;align-content:stretch;justify-content:flex-start;align-items:flex-start}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data .customer-tile-primary-container-userid{font-weight:500;font-size:1.1rem;line-height:1rem}.customer-tile-wrapper .customer-tile-secondary-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data{padding:.4rem .2rem;display:flex;flex-direction:column;font-size:.7rem;grid-gap:.3rem;gap:.3rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data .customer-tile-secondary-container-custom-details{width:100%;height:100%;line-height:.9rem;word-wrap:break-word}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions{padding:.5rem 0;display:flex;flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:flex-start;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .data-collasped{display:none}.customer-tile-active{background-color:#dcedfd}\n"], components: [{ type: StatusPillComponent, selector: "status-pill", inputs: ["config", "status"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i1__namespace.KwikUILabelValuePairComponent, selector: "kwikui-label-value-pair", inputs: ["config", "data", "id"] }, { type: ActionButtonComponent, selector: "kwikid-action-button", inputs: ["action", "config", "customer"], outputs: ["onClickPerformAction"] }], directives: [{ type: i7__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3092
+ /** @nocollapse */ CustomerTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerTileComponent, selector: "customer-tile", inputs: { customer: "customer", index: "index", config: "config" }, outputs: { onClickPerformAction: "onClickPerformAction", nextStep: "nextStep", removeTask: "removeTask" }, host: { listeners: { "window:resize": "windowResizeWatcher($event)" } }, usesOnChanges: true, ngImport: i0__namespace, template: "<div\n [ngClass]=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id\n ? 'customer-tile-wrapper customer-tile-active'\n : 'customer-tile-wrapper'\n \"\n>\n <div class=\"customer-tile-primary-container\">\n <div class=\"customer-tile-primary-container-data\">\n <div class=\"customer-tile-primary-container-userid\">\n {{ taskId }}\n </div>\n <div\n class=\"customer-tile-primary-container-field\"\n *ngFor=\"let field of headerFields\"\n >\n {{ field.value }}\n </div>\n <status-pill\n *ngIf=\"config?.utilityFlags?.isShowTaskStatus\"\n [config]=\"config?.taskUI?.header?.taskStatus\"\n [status]=\"\n customer[config?.taskUI?.header?.taskStatus?.path ?? 'session_status']\n \"\n ></status-pill>\n </div>\n <kwikui-button\n *ngIf=\"!agentService.isMobileView && !agentService.showMapview\"\n [icon]=\"\n agentService.currentTaskDetails?.session_id == customer?.session_id\n ? 'tuiIconChevronLeftLarge'\n : 'tuiIconChevronRightLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"agentService.isMobileView || agentService.showMapview\"\n [icon]=\"\n agentService.currentTaskDetails?.session_id == customer?.session_id\n ? 'tuiIconChevronUpLarge'\n : 'tuiIconChevronDownLarge'\n \"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"openDetails()\"\n ></kwikui-button>\n </div>\n <div\n *ngIf=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id &&\n (agentService.isMobileView || agentService.showMapview)\n \"\n [ngClass]=\"\n customer?.session_id == agentService.currentTaskDetails?.session_id &&\n (agentService.isMobileView || agentService.showMapview)\n ? 'customer-tile-secondary-container'\n : 'data-collasped'\n \"\n >\n <div class=\"customer-tile-secondary-container-data\">\n <kwikui-label-value-pair\n [config]=\"labelValuePairConfig\"\n [data]=\"labelValuePairData\"\n ></kwikui-label-value-pair>\n <!-- <div\n *ngIf=\"\n agentService.config?.maps?.sho &&\n agentService.config?.isShowDistanceAndTime &&\n openStreetMapsService.getSelectedTaskDistanceAndTime()\n \"\n class=\"customer-tile-secondary-container-custom-details\"\n >\n Distance: {{ openStreetMapsService.getSelectedTaskDistanceAndTime()?.distance }} |\n Time: {{ openStreetMapsService.getSelectedTaskDistanceAndTime()?.time }}\n </div> -->\n </div>\n <div class=\"customer-tile-secondary-container-actions\">\n <ng-container *ngFor=\"let action of config?.taskUI?.details?.action\">\n <kwikid-action-button\n [action]=\"action\"\n [config]=\"config\"\n [customer]=\"customer\"\n (onClickPerformAction)=\"handleOnClickPerformAction($event)\"\n ></kwikid-action-button>\n </ng-container>\n <!-- <div class=\"customer-tile-secondary-container-task-buttons\">\n <kwikui-button\n *ngIf=\"config?.isAllowRemoveTask\"\n [icon]=\"'tuiIconTrash2'\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"handleOnClickRemoveTask(customer)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"config?.isShowCopyLink\"\n icon=\"tuiIconCopy\"\n [shape]=\"'rounded'\"\n appearance=\"icon\"\n size=\"s\"\n (onClick)=\"\n handleOnClickNext({\n customer: customer,\n stepType: 'SHARE_JOURNEY_LINK'\n })\n \"\n ></kwikui-button>\n </div>\n <div class=\"customer-tile-secondary-container-journey-buttons\">\n <kwikui-button\n *ngIf=\"config?.isShowMaps && customer?.isValidLocation\"\n label=\"Show Directions\"\n appearance=\"flat\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"goToMaps(customer.googleMapsUrl)\"\n ></kwikui-button>\n <kwikui-button\n *ngIf=\"\n config?.isAllowStartJourney &&\n agentService.canStartJourney(customer.session_status)\n \"\n label=\"Start Journey\"\n appearance=\"primary\"\n size=\"s\"\n styles=\"font-size:0.7rem;\"\n (onClick)=\"\n handleOnClickNext({ customer: customer, stepType: 'START_JOURNEY' })\n \"\n ></kwikui-button>\n </div> -->\n </div>\n </div>\n</div>\n", styles: [".customer-tile-wrapper{display:flex;flex-direction:column;align-content:center;justify-content:center;align-items:stretch;flex:1;overflow:auto;grid-gap:.5rem;gap:.5rem;margin:1rem;padding:1rem .25rem 1rem 1rem;border-radius:1rem;border:.5px solid #ddd}.customer-tile-wrapper .customer-tile-primary-container{display:flex;grid-gap:.5rem;gap:.5rem;flex-direction:row;align-content:center;justify-content:space-between;align-items:center;width:100%;height:100%}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data{padding-left:.2rem;grid-gap:.6rem;gap:.6rem;display:flex;flex-direction:column;flex-wrap:wrap;align-content:stretch;justify-content:flex-start;align-items:flex-start}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data .customer-tile-primary-container-userid{font-weight:500;font-size:1.1rem;line-height:1rem}.customer-tile-wrapper .customer-tile-primary-container .customer-tile-primary-container-data .customer-tile-primary-container-field{font-weight:400;font-size:.9rem;line-height:1rem;color:#555;word-break:break-word}.customer-tile-wrapper .customer-tile-secondary-container{width:100%;height:100%;display:flex;flex-direction:column;overflow:auto;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data{padding:.4rem .2rem;display:flex;flex-direction:column;font-size:.7rem;grid-gap:.3rem;gap:.3rem}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-data .customer-tile-secondary-container-custom-details{width:100%;height:100%;line-height:.9rem;word-wrap:break-word}.customer-tile-wrapper .customer-tile-secondary-container .customer-tile-secondary-container-actions{padding:.5rem 0;display:flex;flex-wrap:wrap;align-items:center;flex-direction:row;justify-content:flex-start;grid-gap:.5rem;gap:.5rem}.customer-tile-wrapper .data-collasped{display:none}.customer-tile-active{background-color:#dcedfd}\n"], components: [{ type: StatusPillComponent, selector: "status-pill", inputs: ["config", "status"] }, { type: i1__namespace.KwikUIButtonComponent, selector: "kwikui-button", inputs: ["appearance", "class", "disabled", "icon", "iconRight", "id", "label", "shape", "showLoader", "size", "styles", "type", "pseudoHover"], outputs: ["onClick"] }, { type: i1__namespace.KwikUILabelValuePairComponent, selector: "kwikui-label-value-pair", inputs: ["config", "data", "id"] }, { type: ActionButtonComponent, selector: "kwikid-action-button", inputs: ["action", "config", "customer"], outputs: ["onClickPerformAction"] }], directives: [{ type: i7__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2934
3093
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, decorators: [{
2935
3094
  type: i0.Component,
2936
3095
  args: [{