kwikid-agent-dashboard 0.0.31 → 0.0.32
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.
- package/bundles/kwikid-agent-dashboard.umd.js +26 -24
- package/bundles/kwikid-agent-dashboard.umd.js.map +1 -1
- package/esm2015/lib/components/customer-list/customer-list.component.js +8 -6
- package/fesm2015/kwikid-agent-dashboard.js +8 -6
- package/fesm2015/kwikid-agent-dashboard.js.map +1 -1
- package/lib/components/customer-list/customer-list.component.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1558,6 +1558,7 @@
|
|
|
1558
1558
|
this.filterTaskList = new i0.EventEmitter();
|
|
1559
1559
|
this.filteredData = [];
|
|
1560
1560
|
this.formGroup = new i7.FormGroup({});
|
|
1561
|
+
this.max = new i10.TuiDay(new Date().getFullYear(), new Date().getMonth(), new Date().getDate());
|
|
1561
1562
|
this.fromDate = this.getDate(null);
|
|
1562
1563
|
this.toDate = this.getDate(null);
|
|
1563
1564
|
this.dateRangeFormControl = new i7.FormControl({
|
|
@@ -1568,34 +1569,35 @@
|
|
|
1568
1569
|
this.searchFormControl = new i7.FormControl('');
|
|
1569
1570
|
this.formGroup.addControl('search', this.searchFormControl);
|
|
1570
1571
|
}
|
|
1571
|
-
CustomerListComponent.prototype.ngOnInit = function () {
|
|
1572
|
-
};
|
|
1572
|
+
CustomerListComponent.prototype.ngOnInit = function () { };
|
|
1573
1573
|
CustomerListComponent.prototype.ngAfterViewInit = function () {
|
|
1574
1574
|
var _this = this;
|
|
1575
|
+
var _a, _b;
|
|
1576
|
+
this.maxLength = (_b = (_a = this.config.dashboard) === null || _a === void 0 ? void 0 : _a.searchDateRange) !== null && _b !== void 0 ? _b : this.maxLength;
|
|
1575
1577
|
setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
1576
|
-
var
|
|
1577
|
-
return __generator(this, function (
|
|
1578
|
-
switch (
|
|
1578
|
+
var _c, _d;
|
|
1579
|
+
return __generator(this, function (_e) {
|
|
1580
|
+
switch (_e.label) {
|
|
1579
1581
|
case 0:
|
|
1580
1582
|
if (!this.config.dashboard.isShowMaps) return [3 /*break*/, 6];
|
|
1581
|
-
if (!(((
|
|
1583
|
+
if (!(((_c = this.config.dashboard) === null || _c === void 0 ? void 0 : _c.mapType) == 'open-street')) return [3 /*break*/, 2];
|
|
1582
1584
|
return [4 /*yield*/, this.openStreetMapsService.initializeMap()];
|
|
1583
1585
|
case 1:
|
|
1584
|
-
|
|
1586
|
+
_e.sent();
|
|
1585
1587
|
return [3 /*break*/, 4];
|
|
1586
1588
|
case 2: return [4 /*yield*/, this.googleMapsService.initializeMap()];
|
|
1587
1589
|
case 3:
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
+
_e.sent();
|
|
1591
|
+
_e.label = 4;
|
|
1590
1592
|
case 4:
|
|
1591
|
-
|
|
1593
|
+
_d = this;
|
|
1592
1594
|
return [4 /*yield*/, this.plotMarkers(this.customers)];
|
|
1593
1595
|
case 5:
|
|
1594
|
-
|
|
1596
|
+
_d.filteredData = _e.sent();
|
|
1595
1597
|
return [3 /*break*/, 7];
|
|
1596
1598
|
case 6:
|
|
1597
1599
|
this.filteredData = this.customers;
|
|
1598
|
-
|
|
1600
|
+
_e.label = 7;
|
|
1599
1601
|
case 7: return [2 /*return*/];
|
|
1600
1602
|
}
|
|
1601
1603
|
});
|
|
@@ -1603,20 +1605,20 @@
|
|
|
1603
1605
|
};
|
|
1604
1606
|
CustomerListComponent.prototype.ngOnChanges = function () {
|
|
1605
1607
|
return __awaiter(this, void 0, void 0, function () {
|
|
1606
|
-
var
|
|
1607
|
-
return __generator(this, function (
|
|
1608
|
-
switch (
|
|
1608
|
+
var _d;
|
|
1609
|
+
return __generator(this, function (_e) {
|
|
1610
|
+
switch (_e.label) {
|
|
1609
1611
|
case 0:
|
|
1610
1612
|
if (!(this.config.dashboard.isShowMaps &&
|
|
1611
1613
|
(this.googleMapsService.map || this.openStreetMapsService.map))) return [3 /*break*/, 2];
|
|
1612
|
-
|
|
1614
|
+
_d = this;
|
|
1613
1615
|
return [4 /*yield*/, this.plotMarkers(this.customers)];
|
|
1614
1616
|
case 1:
|
|
1615
|
-
|
|
1617
|
+
_d.filteredData = _e.sent();
|
|
1616
1618
|
return [3 /*break*/, 3];
|
|
1617
1619
|
case 2:
|
|
1618
1620
|
this.filteredData = this.customers;
|
|
1619
|
-
|
|
1621
|
+
_e.label = 3;
|
|
1620
1622
|
case 3: return [2 /*return*/];
|
|
1621
1623
|
}
|
|
1622
1624
|
});
|
|
@@ -1641,8 +1643,8 @@
|
|
|
1641
1643
|
var _a, _b;
|
|
1642
1644
|
return __awaiter(this, void 0, void 0, function () {
|
|
1643
1645
|
var _this = this;
|
|
1644
|
-
return __generator(this, function (
|
|
1645
|
-
switch (
|
|
1646
|
+
return __generator(this, function (_d) {
|
|
1647
|
+
switch (_d.label) {
|
|
1646
1648
|
case 0:
|
|
1647
1649
|
if (!((_a = this.config.dashboard) === null || _a === void 0 ? void 0 : _a.isPlotCompletedTaskMarkers)) {
|
|
1648
1650
|
customers = customers.filter(function (customer) {
|
|
@@ -1652,12 +1654,12 @@
|
|
|
1652
1654
|
if (!(((_b = this.config.dashboard) === null || _b === void 0 ? void 0 : _b.mapType) == 'open-street')) return [3 /*break*/, 2];
|
|
1653
1655
|
return [4 /*yield*/, this.openStreetMapsService.plotDirectionsForAllTasks(customers)];
|
|
1654
1656
|
case 1:
|
|
1655
|
-
customers =
|
|
1657
|
+
customers = _d.sent();
|
|
1656
1658
|
return [3 /*break*/, 4];
|
|
1657
1659
|
case 2: return [4 /*yield*/, this.googleMapsService.plotDirectionsForAllTasks(customers)];
|
|
1658
1660
|
case 3:
|
|
1659
|
-
customers =
|
|
1660
|
-
|
|
1661
|
+
customers = _d.sent();
|
|
1662
|
+
_d.label = 4;
|
|
1661
1663
|
case 4: return [2 /*return*/, customers];
|
|
1662
1664
|
}
|
|
1663
1665
|
});
|
|
@@ -1691,7 +1693,7 @@
|
|
|
1691
1693
|
return CustomerListComponent;
|
|
1692
1694
|
}());
|
|
1693
1695
|
/** @nocollapse */ CustomerListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, deps: [{ token: GoogleMapsService }, { token: OpenStreetMapsService }, { token: AgentService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1694
|
-
/** @nocollapse */ CustomerListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerListComponent, selector: "customer-list", inputs: { customers: "customers", config: "config" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", filterTaskList: "filterTaskList" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-list-wrapper\">\n <div class=\"customer-list-filter\" [formGroup]=\"formGroup\">\n <kwikui-input-date-range\n *ngIf=\"config?.dashboard?.isAllowDateFilter\"\n [label]=\"'Date Range'\"\n [id]=\"'dateRange'\"\n [size]=\"'m'\"\n [formControlName]=\"'dateRange'\"\n [formControl]=\"dateRangeFormControl\"\n (getKeyValue)=\"onDateRangeChange($event)\"\n ></kwikui-input-date-range>\n <kwikui-input\n *ngIf=\"config?.dashboard?.isAllowSearchFilter\"\n [label]=\"'Search'\"\n [id]=\"'search'\"\n icon=\"tuiIconSearch\"\n size=\"m\"\n placeholder=\"Search Any Task\"\n [formControlName]=\"'search'\"\n [formControl]=\"searchFormControl\"\n (getKeyValue)=\"onSearchFilter($event)\"\n ></kwikui-input>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport itemSize=\"1\" class=\"customer-task-list-scroll\">\n <div\n *cdkVirtualFor=\"\n let customer of filteredData | filter: searchText;\n index as index\n \"\n >\n <customer-tile\n class=\"example-item\"\n [customer]=\"customer\"\n [config]=\"config\"\n [index]=\"index\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div class=\"customer-list-empty\" *ngIf=\"filteredData.length === 0\">\n {{config?.dashboard?.emptyTaskListMessage ?? '0 Tasks for the given Date.'}}\n </div>\n</div>\n", styles: [".customer-list-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.customer-list-filter{height:-moz-fit-content;height:fit-content;width:100%;display:flex;flex-direction:column;padding:1rem;grid-gap:.8rem;gap:.8rem;border-bottom:.5px solid #ddd}.customer-list-empty{height:100%;width:100%;margin-top:.5rem;font-size:1rem;text-align:center}.customer-task-list{height:100%}.customer-task-list-scroll{height:100%;width:100%}.cdk-virtual-scroll-spacer{height:0!important}.example-item{height:50px}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i4__namespace.KwikUIInputDateRangeComponent, selector: "kwikui-input-date-range", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxLength", "min", "minLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i4__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i5__namespace.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: CustomerTileComponent, selector: "customer-tile", inputs: ["customer", "index", "config"], outputs: ["nextStep", "removeTask"] }], directives: [{ type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i5__namespace.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], pipes: { "filter": Ng2SearchPipe } });
|
|
1696
|
+
/** @nocollapse */ CustomerListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomerListComponent, selector: "customer-list", inputs: { customers: "customers", config: "config" }, outputs: { nextStep: "nextStep", removeTask: "removeTask", filterTaskList: "filterTaskList" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"customer-list-wrapper\">\n <div class=\"customer-list-filter\" [formGroup]=\"formGroup\">\n <kwikui-input-date-range\n *ngIf=\"config?.dashboard?.isAllowDateFilter\"\n [label]=\"'Date Range'\"\n [id]=\"'dateRange'\"\n [size]=\"'m'\"\n [max]=\"max\"\n [maxLength]=\"maxLength\"\n [formControlName]=\"'dateRange'\"\n [formControl]=\"dateRangeFormControl\"\n (getKeyValue)=\"onDateRangeChange($event)\"\n ></kwikui-input-date-range>\n <kwikui-input\n *ngIf=\"config?.dashboard?.isAllowSearchFilter\"\n [label]=\"'Search'\"\n [id]=\"'search'\"\n icon=\"tuiIconSearch\"\n size=\"m\"\n placeholder=\"Search Any Task\"\n [formControlName]=\"'search'\"\n [formControl]=\"searchFormControl\"\n (getKeyValue)=\"onSearchFilter($event)\"\n ></kwikui-input>\n </div>\n\n <div class=\"customer-task-list\">\n <cdk-virtual-scroll-viewport itemSize=\"1\" class=\"customer-task-list-scroll\">\n <div\n *cdkVirtualFor=\"\n let customer of filteredData | filter: searchText;\n index as index\n \"\n >\n <customer-tile\n class=\"example-item\"\n [customer]=\"customer\"\n [config]=\"config\"\n [index]=\"index\"\n (nextStep)=\"handleOnClickNext($event)\"\n (removeTask)=\"handleOnClickRemoveTask($event)\"\n ></customer-tile>\n </div>\n </cdk-virtual-scroll-viewport>\n </div>\n\n <div class=\"customer-list-empty\" *ngIf=\"filteredData.length === 0\">\n {{config?.dashboard?.emptyTaskListMessage ?? '0 Tasks for the given Date.'}}\n </div>\n</div>\n", styles: [".customer-list-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.customer-list-filter{height:-moz-fit-content;height:fit-content;width:100%;display:flex;flex-direction:column;padding:1rem;grid-gap:.8rem;gap:.8rem;border-bottom:.5px solid #ddd}.customer-list-empty{height:100%;width:100%;margin-top:.5rem;font-size:1rem;text-align:center}.customer-task-list{height:100%}.customer-task-list-scroll{height:100%;width:100%}.cdk-virtual-scroll-spacer{height:0!important}.example-item{height:50px}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{border-radius:10px}::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:gray}\n"], components: [{ type: i4__namespace.KwikUIInputDateRangeComponent, selector: "kwikui-input-date-range", inputs: ["disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "max", "maxLength", "min", "minLength", "placeholder", "postfix", "prefix", "properties", "size", "validators"], outputs: ["getKeyValue"] }, { type: i4__namespace.KwikUIInputComponent, selector: "kwikui-input", inputs: ["case", "disabled", "focus", "formControl", "formControlName", "hintContent", "icon", "id", "invalid", "label", "placeholder", "postfix", "prefix", "properties", "size", "type", "validators"], outputs: ["getKeyValue"] }, { type: i5__namespace.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { type: CustomerTileComponent, selector: "customer-tile", inputs: ["customer", "index", "config"], outputs: ["nextStep", "removeTask"] }], directives: [{ type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5__namespace.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i5__namespace.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], pipes: { "filter": Ng2SearchPipe } });
|
|
1695
1697
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerListComponent, decorators: [{
|
|
1696
1698
|
type: i0.Component,
|
|
1697
1699
|
args: [{
|