kwikid-agent-dashboard 0.0.48 → 0.0.49
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 +32 -4
- package/bundles/kwikid-agent-dashboard.umd.js.map +1 -1
- package/esm2015/lib/v1/components/customer-tile/customer-tile.component.js +32 -5
- package/fesm2015/kwikid-agent-dashboard.js +31 -4
- package/fesm2015/kwikid-agent-dashboard.js.map +1 -1
- package/lib/v1/components/customer-tile/customer-tile.component.d.ts +5 -0
- package/package.json +1 -1
|
@@ -2835,6 +2835,7 @@
|
|
|
2835
2835
|
this.isMobileView = false;
|
|
2836
2836
|
this.viewTaskDetails = [];
|
|
2837
2837
|
this.taskId = "";
|
|
2838
|
+
this.headerFields = [];
|
|
2838
2839
|
this.labelValuePairConfig = {};
|
|
2839
2840
|
this.labelValuePairData = [];
|
|
2840
2841
|
this.onClickPerformAction = new i0.EventEmitter();
|
|
@@ -2873,9 +2874,10 @@
|
|
|
2873
2874
|
};
|
|
2874
2875
|
CustomerTileComponent.prototype.parseData = function () {
|
|
2875
2876
|
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 &&
|
|
2877
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
2878
|
+
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
2879
|
this.taskId = kwikidToolkit.getObjectValueFromPath(this.customer, identifier);
|
|
2880
|
+
this.headerFields = this.parseHeaderFields();
|
|
2879
2881
|
var detailsConfig = [];
|
|
2880
2882
|
if (kwikidToolkit.checkObjectPathExists(this.config, "taskUI.details.data") &&
|
|
2881
2883
|
kwikidToolkit.isNotEmptyArray(this.config.taskUI.details.data)) {
|
|
@@ -2894,7 +2896,33 @@
|
|
|
2894
2896
|
});
|
|
2895
2897
|
this.labelValuePairData = data_1;
|
|
2896
2898
|
}
|
|
2897
|
-
this.labelValuePairConfig = (
|
|
2899
|
+
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 : {};
|
|
2900
|
+
};
|
|
2901
|
+
CustomerTileComponent.prototype.parseHeaderFields = function () {
|
|
2902
|
+
var _this = this;
|
|
2903
|
+
var _a, _b, _c, _d;
|
|
2904
|
+
var fieldsConfig = [];
|
|
2905
|
+
if (kwikidToolkit.checkObjectPathExists(this.config, "taskUI.header.fields") &&
|
|
2906
|
+
kwikidToolkit.isNotEmptyArray(this.config.taskUI.header.fields)) {
|
|
2907
|
+
fieldsConfig = this.config.taskUI.header.fields;
|
|
2908
|
+
}
|
|
2909
|
+
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) {
|
|
2910
|
+
// Backward compatible with earlier taskName config
|
|
2911
|
+
fieldsConfig = [{ path: this.config.taskUI.header.taskName.path }];
|
|
2912
|
+
}
|
|
2913
|
+
return fieldsConfig
|
|
2914
|
+
.map(function (field) {
|
|
2915
|
+
var _a;
|
|
2916
|
+
var value = "";
|
|
2917
|
+
if (Array.isArray(field.path)) {
|
|
2918
|
+
value = ((_a = _this.getValueFromArray(field.path)) === null || _a === void 0 ? void 0 : _a.trim()) || "";
|
|
2919
|
+
}
|
|
2920
|
+
else if (field.path) {
|
|
2921
|
+
value = kwikidToolkit.getObjectValueFromPath(_this.customer, field.path) || "";
|
|
2922
|
+
}
|
|
2923
|
+
return Object.assign(Object.assign({}, field), { value: value });
|
|
2924
|
+
})
|
|
2925
|
+
.filter(function (field) { return field.value; });
|
|
2898
2926
|
};
|
|
2899
2927
|
CustomerTileComponent.prototype.openDetails = function () {
|
|
2900
2928
|
var _a, _b, _c, _d;
|
|
@@ -2930,7 +2958,7 @@
|
|
|
2930
2958
|
return CustomerTileComponent;
|
|
2931
2959
|
}());
|
|
2932
2960
|
/** @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.
|
|
2961
|
+
/** @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
2962
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CustomerTileComponent, decorators: [{
|
|
2935
2963
|
type: i0.Component,
|
|
2936
2964
|
args: [{
|