raise-common-lib 0.0.135 → 0.0.136
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/raise-common-lib.umd.js +101 -9
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/commentary/index.component.js +12 -6
- package/esm2015/lib/common-grid/index.component.js +6 -2
- package/esm2015/lib/raise-common-lib.module.js +9 -5
- package/esm2015/lib/truncated-text-toggle/index.component.js +67 -0
- package/esm2015/public-api.js +2 -1
- package/esm2015/raise-common-lib.js +2 -2
- package/esm5/lib/commentary/index.component.js +15 -7
- package/esm5/lib/common-grid/index.component.js +6 -2
- package/esm5/lib/raise-common-lib.module.js +9 -5
- package/esm5/lib/truncated-text-toggle/index.component.js +78 -0
- package/esm5/public-api.js +2 -1
- package/esm5/raise-common-lib.js +2 -2
- package/fesm2015/raise-common-lib.js +89 -10
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +102 -11
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/common-grid/index.component.d.ts +1 -0
- package/lib/truncated-text-toggle/index.component.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/raise-common-lib.metadata.json +1 -1
- package/src/assets/img/click_show_more_icon.svg +3 -0
- package/src/assets/img/comment-cancel.svg +4 -4
- package/src/assets/img/comment-check.svg +5 -5
- package/src/assets/img/drawer-back.svg +4 -4
- package/src/assets/img/eye-close.svg +4 -4
- package/src/assets/img/eye-open.svg +4 -4
- package/src/assets/img/toolbar-action-add.svg +4 -4
- package/src/assets/img/toolbar-action-delete.svg +14 -14
- package/src/assets/img/toolbar-action-download.svg +5 -5
- package/src/assets/img/toolbar-action-duplicate.svg +6 -6
- package/src/assets/img/toolbar-action-export.svg +5 -5
- package/src/assets/img/toolbar-action-import.svg +5 -5
- package/src/assets/img/toolbar-action-refresh.svg +14 -14
- package/src/assets/img/toolbar-action-upload.svg +5 -5
- package/src/assets/style/reset/grid.scss +3 -1
|
@@ -248,6 +248,7 @@
|
|
|
248
248
|
this.fields = [];
|
|
249
249
|
this.dataSource = [];
|
|
250
250
|
this.allowPaging = true;
|
|
251
|
+
this.allowRowDragAndDrop = false;
|
|
251
252
|
this.clipMode = "EllipsisWithTooltip";
|
|
252
253
|
this.checkBoxWidth = 32; // col 数量过少的时候,check宽度会拉伸,这时候设置null
|
|
253
254
|
/**
|
|
@@ -953,7 +954,7 @@
|
|
|
953
954
|
CommonGridComponent.decorators = [
|
|
954
955
|
{ type: core.Component, args: [{
|
|
955
956
|
selector: "rs-common-grid",
|
|
956
|
-
template: "<ejs-grid\r\n
|
|
957
|
+
template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer\"\r\n [allowResizing]=\"!last\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
|
|
957
958
|
styles: [""]
|
|
958
959
|
}] }
|
|
959
960
|
];
|
|
@@ -979,6 +980,7 @@
|
|
|
979
980
|
columnTemplate: [{ type: core.Input }],
|
|
980
981
|
pageSettings: [{ type: core.Input }],
|
|
981
982
|
allowPaging: [{ type: core.Input }],
|
|
983
|
+
allowRowDragAndDrop: [{ type: core.Input }],
|
|
982
984
|
clipMode: [{ type: core.Input }],
|
|
983
985
|
checkBoxWidth: [{ type: core.Input }],
|
|
984
986
|
childGrid: [{ type: core.Input }],
|
|
@@ -1041,6 +1043,8 @@
|
|
|
1041
1043
|
/** @type {?} */
|
|
1042
1044
|
CommonGridComponent.prototype.allowPaging;
|
|
1043
1045
|
/** @type {?} */
|
|
1046
|
+
CommonGridComponent.prototype.allowRowDragAndDrop;
|
|
1047
|
+
/** @type {?} */
|
|
1044
1048
|
CommonGridComponent.prototype.clipMode;
|
|
1045
1049
|
/** @type {?} */
|
|
1046
1050
|
CommonGridComponent.prototype.checkBoxWidth;
|
|
@@ -2421,7 +2425,9 @@
|
|
|
2421
2425
|
* @param {?} ele
|
|
2422
2426
|
* @return {?}
|
|
2423
2427
|
*/
|
|
2424
|
-
function (ele) {
|
|
2428
|
+
function (ele) {
|
|
2429
|
+
return ele[_this.filedsKey.messageId] === item[_this.filedsKey.messageId];
|
|
2430
|
+
}));
|
|
2425
2431
|
_this.actionComplete.emit({
|
|
2426
2432
|
action: "deleteComment",
|
|
2427
2433
|
data: item,
|
|
@@ -2481,14 +2487,20 @@
|
|
|
2481
2487
|
function (e) {
|
|
2482
2488
|
/** @type {?} */
|
|
2483
2489
|
var textarea = e.target;
|
|
2484
|
-
|
|
2485
|
-
|
|
2490
|
+
if (e.type === "focus" && textarea.value) {
|
|
2491
|
+
textarea.style.height = "auto";
|
|
2492
|
+
textarea.style.height = textarea.scrollHeight + "px";
|
|
2493
|
+
}
|
|
2494
|
+
else if (e.type === "input") {
|
|
2495
|
+
textarea.style.height = "auto";
|
|
2496
|
+
textarea.style.height = textarea.scrollHeight + "px";
|
|
2497
|
+
}
|
|
2486
2498
|
};
|
|
2487
2499
|
RsCommentaryComponent.decorators = [
|
|
2488
2500
|
{ type: core.Component, args: [{
|
|
2489
2501
|
selector: "rs-commentary",
|
|
2490
|
-
template: "<div class=\"rs-commentary-wrap\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"commentBoxTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'comment' }\"\r\n ></ng-container>\r\n <div class=\"reply-box\">\r\n <div *ngFor=\"let item of commentData\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"replyItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'comment', item: item }\"\r\n ></ng-container>\r\n <div class=\"sub-reply-list\">\r\n <ng-container\r\n *ngFor=\"\r\n let sub of item.isExpanded\r\n ? item[filedsKey.commentaries]\r\n : item[filedsKey.commentaries].slice(0, 3)\r\n \"\r\n [ngTemplateOutlet]=\"replyItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'sub', item: sub }\"\r\n ></ng-container>\r\n </div>\r\n <button\r\n class=\"e-btn text\"\r\n *ngIf=\"item[filedsKey.commentaries].length > 3\"\r\n (click)=\"item.isExpanded = !item.isExpanded\"\r\n style=\"margin-bottom: 8px\"\r\n >\r\n {{\r\n item.isExpanded\r\n ? \"Collapse\"\r\n : \"View All \" + item[filedsKey.commentaries].length + \" Replies\"\r\n }}\r\n <img\r\n class=\"arrow\"\r\n [ngClass]=\"{ collapse: item.isExpanded }\"\r\n src=\"../../assets/img/dropdown-arrow.svg\"\r\n alt=\"\"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #commentBoxTemplate let-type=\"type\" let-item=\"item\">\r\n <div class=\"comment-box\">\r\n <div class=\"comment-input-wrap\">\r\n <div class=\"avatar\" *ngIf=\"type !== 'editComment'\">\r\n {{ cf.rtn(displayName) }}\r\n </div>\r\n <textarea\r\n *ngIf=\"type === 'comment'\"\r\n class=\"e-input\"\r\n rows=\"
|
|
2491
|
-
styles: [".rs-commentary-wrap{width:100%;height:100%;padding:32px;display:flex;flex-direction:column}.rs-commentary-wrap .comment-box{width:100%}.rs-commentary-wrap .comment-box .comment-input-wrap{margin-bottom:12px;display:flex;gap:12px}.rs-commentary-wrap .comment-box .comment-input-wrap .e-input{flex:1;width:0;height:
|
|
2502
|
+
template: "<div class=\"rs-commentary-wrap\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"commentBoxTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'comment' }\"\r\n ></ng-container>\r\n <div class=\"reply-box\">\r\n <div *ngFor=\"let item of commentData\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"replyItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'comment', item: item }\"\r\n ></ng-container>\r\n <div class=\"sub-reply-list\">\r\n <ng-container\r\n *ngFor=\"\r\n let sub of item.isExpanded\r\n ? item[filedsKey.commentaries]\r\n : item[filedsKey.commentaries].slice(0, 3)\r\n \"\r\n [ngTemplateOutlet]=\"replyItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'sub', item: sub }\"\r\n ></ng-container>\r\n </div>\r\n <button\r\n class=\"e-btn text\"\r\n *ngIf=\"item[filedsKey.commentaries].length > 3\"\r\n (click)=\"item.isExpanded = !item.isExpanded\"\r\n style=\"margin-bottom: 8px\"\r\n >\r\n {{\r\n item.isExpanded\r\n ? \"Collapse\"\r\n : \"View All \" + item[filedsKey.commentaries].length + \" Replies\"\r\n }}\r\n <img\r\n class=\"arrow\"\r\n [ngClass]=\"{ collapse: item.isExpanded }\"\r\n src=\"../../assets/img/dropdown-arrow.svg\"\r\n alt=\"\"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #commentBoxTemplate let-type=\"type\" let-item=\"item\">\r\n <div class=\"comment-box\">\r\n <div class=\"comment-input-wrap\">\r\n <div class=\"avatar\" *ngIf=\"type !== 'editComment'\">\r\n {{ cf.rtn(displayName) }}\r\n </div>\r\n <textarea\r\n *ngIf=\"type === 'comment'\"\r\n class=\"e-input\"\r\n rows=\"3\"\r\n [(ngModel)]=\"commentVal\"\r\n (input)=\"adjustTextareaHeight($event)\"\r\n (focus)=\"adjustTextareaHeight($event)\"\r\n [disabled]=\"isReadOnly || !editPermission\"\r\n placeholder=\"Write your comment...\"\r\n ></textarea>\r\n <textarea\r\n *ngIf=\"type === 'reply'\"\r\n class=\"e-input\"\r\n rows=\"3\"\r\n [(ngModel)]=\"replyVal\"\r\n (input)=\"adjustTextareaHeight($event)\"\r\n (focus)=\"adjustTextareaHeight($event)\"\r\n placeholder=\"Write your comment...\"\r\n ></textarea>\r\n <textarea\r\n *ngIf=\"type === 'editComment'\"\r\n class=\"e-input\"\r\n rows=\"3\"\r\n [(ngModel)]=\"editCommentVal\"\r\n (input)=\"adjustTextareaHeight($event)\"\r\n (focus)=\"adjustTextareaHeight($event)\"\r\n placeholder=\"Write your comment...\"\r\n ></textarea>\r\n </div>\r\n <div class=\"btn-wrap\">\r\n <button\r\n *ngIf=\"type === 'comment'\"\r\n class=\"e-btn e-primary small\"\r\n [disabled]=\"commentVal === '' || isReadOnly || !editPermission\"\r\n (click)=\"addComment()\"\r\n >\r\n {{ translation.COMMENT || \".COMMENT\" }}\r\n </button>\r\n <ng-container *ngIf=\"type === 'reply'\">\r\n <button\r\n class=\"e-btn small\"\r\n (click)=\"item.showReplyInput = false; replyVal = ''\"\r\n >\r\n {{ translation.CANCEL || \".CANCEL\" }}\r\n </button>\r\n <button\r\n class=\"e-btn e-primary small\"\r\n [disabled]=\"replyVal === ''\"\r\n (click)=\"addReply(item)\"\r\n >\r\n {{ translation.REPLY || \".REPLY\" }}\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"type === 'editComment'\">\r\n <button class=\"e-btn text\" (click)=\"item.showCommentEdit = false\">\r\n <img src=\"../../assets/img/comment-cancel.svg\" alt=\"\" />\r\n </button>\r\n <button\r\n class=\"e-btn text\"\r\n [disabled]=\"editCommentVal === ''\"\r\n (click)=\"updateComment(item)\"\r\n >\r\n <img src=\"../../assets/img/comment-check.svg\" alt=\"\" />\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<ng-template #replyItemTemplate let-type=\"type\" let-item=\"item\">\r\n <div class=\"reply-item\" [ngClass]=\"{ comment: type === 'comment' }\">\r\n <div class=\"avatar\">\r\n {{ cf.rtn(item[filedsKey.ownerName]) }}\r\n </div>\r\n <div class=\"owner-wrap\">\r\n <div class=\"owner-info\">\r\n <div class=\"name\">\r\n {{ item[filedsKey.ownerName] }}\r\n </div>\r\n <div class=\"time\">\r\n {{ item[filedsKey.lastModifiedOn] | date : dateTimePipeFormat }}\r\n </div>\r\n </div>\r\n <div class=\"message-wrap\">\r\n <div class=\"message\" *ngIf=\"!item.showCommentEdit\">\r\n <!-- {{ item[filedsKey.messageBody] }} -->\r\n <truncated-text-toggle\r\n [maximum]=\"1050\"\r\n [data]=\"item[filedsKey.messageBody]\"\r\n >\r\n </truncated-text-toggle>\r\n </div>\r\n <ng-container\r\n *ngIf=\"item.showCommentEdit\"\r\n [ngTemplateOutlet]=\"commentBoxTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'editComment', item: item }\"\r\n ></ng-container>\r\n </div>\r\n\r\n <button\r\n *ngIf=\"\r\n type === 'comment' && !item.showReplyInput && !item.showCommentEdit\r\n \"\r\n class=\"e-btn text\"\r\n (click)=\"item.showReplyInput = true\"\r\n [disabled]=\"isReadOnly || !editPermission\"\r\n >\r\n {{ translation.REPLY || \".REPLY\" }}\r\n </button>\r\n <ng-container\r\n *ngIf=\"item.showReplyInput\"\r\n [ngTemplateOutlet]=\"commentBoxTemplate\"\r\n [ngTemplateOutletContext]=\"{ type: 'reply', item: item }\"\r\n ></ng-container>\r\n\r\n <rs-grid-action *ngIf=\"type === 'comment'\">\r\n <rs-grid-action-item\r\n image=\"Edit\"\r\n [text]=\"translation.EDIT\"\r\n [disabled]=\"isReadOnly || !editPermission\"\r\n (click)=\"editComment(item)\"\r\n ></rs-grid-action-item>\r\n <rs-grid-action-item\r\n image=\"Delete\"\r\n [text]=\"translation.DELETE\"\r\n [disabled]=\"isReadOnly || !deletePermission\"\r\n (click)=\"deleteComment(item)\"\r\n ></rs-grid-action-item>\r\n </rs-grid-action>\r\n </div>\r\n </div>\r\n</ng-template>\r\n",
|
|
2503
|
+
styles: [".rs-commentary-wrap{width:100%;height:100%;padding:32px;display:flex;flex-direction:column}.rs-commentary-wrap .comment-box{width:100%}.rs-commentary-wrap .comment-box .comment-input-wrap{margin-bottom:12px;display:flex;gap:12px}.rs-commentary-wrap .comment-box .comment-input-wrap .e-input{flex:1;width:0;height:62px}.rs-commentary-wrap .comment-box .btn-wrap{display:flex;justify-content:flex-end;gap:12px}.rs-commentary-wrap .comment-box .btn-wrap .e-btn.text{padding:4px}.rs-commentary-wrap .reply-box{height:0;flex:1;overflow:auto;margin-top:16px;margin-right:-32px;padding-right:32px}.rs-commentary-wrap .reply-box .sub-reply-list{padding-left:40px}.rs-commentary-wrap .reply-box .e-btn.text{padding:0!important;min-width:auto;height:auto;color:#6c7c90!important}.rs-commentary-wrap .reply-box .e-btn.text:hover{background:0 0!important;color:#1364b3!important}.rs-commentary-wrap .reply-box .e-btn.text:focus{background:0 0!important;color:#6c7c90!important}.rs-commentary-wrap .reply-box .arrow.collapse{transform:rotate(180deg)}.rs-commentary-wrap .reply-box .reply-item{display:flex;gap:12px;padding:12px 0}.rs-commentary-wrap .reply-box .reply-item.comment{border-top:1px solid #eaedf0}.rs-commentary-wrap .reply-box .reply-item.comment:hover{background-color:#f6faff}.rs-commentary-wrap .reply-box .reply-item.comment:hover rs-grid-action{display:block}.rs-commentary-wrap .reply-box .reply-item rs-grid-action{display:none;position:absolute;cursor:pointer;top:-4px;right:8px}.rs-commentary-wrap .reply-box .owner-wrap{flex:1;width:0;position:relative}.rs-commentary-wrap .reply-box .owner-wrap .owner-info{display:flex;align-items:center;gap:8px;height:28px}.rs-commentary-wrap .reply-box .owner-wrap .owner-info .name{color:#44566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:700;line-height:14px}.rs-commentary-wrap .reply-box .owner-wrap .owner-info .time{color:#6c7c90;font-family:Arial;font-size:10px;font-style:normal;font-weight:400;line-height:12px}.rs-commentary-wrap .reply-box .owner-wrap .message-wrap{padding:12px 0}.rs-commentary-wrap .reply-box .owner-wrap .message-wrap .message{color:#44566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:16px;padding-right:8px;white-space:pre-wrap}.rs-commentary-wrap .avatar{width:32px;height:32px;border-radius:100%;border:1px solid rgba(108,124,144,.4);color:#44566c;display:flex;align-items:center;justify-content:center;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px}"]
|
|
2492
2504
|
}] }
|
|
2493
2505
|
];
|
|
2494
2506
|
/** @nocollapse */
|
|
@@ -2525,7 +2537,7 @@
|
|
|
2525
2537
|
__metadata("design:returntype", void 0)
|
|
2526
2538
|
], RsCommentaryComponent.prototype, "addReply", null);
|
|
2527
2539
|
__decorate([
|
|
2528
|
-
Debounce(
|
|
2540
|
+
Debounce(100),
|
|
2529
2541
|
__metadata("design:type", Function),
|
|
2530
2542
|
__metadata("design:paramtypes", [Object]),
|
|
2531
2543
|
__metadata("design:returntype", void 0)
|
|
@@ -2571,6 +2583,82 @@
|
|
|
2571
2583
|
RsCommentaryComponent.prototype.ref;
|
|
2572
2584
|
}
|
|
2573
2585
|
|
|
2586
|
+
/**
|
|
2587
|
+
* @fileoverview added by tsickle
|
|
2588
|
+
* Generated from: lib/truncated-text-toggle/index.component.ts
|
|
2589
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2590
|
+
*/
|
|
2591
|
+
var TruncatedTextToggleComponent = /** @class */ (function () {
|
|
2592
|
+
function TruncatedTextToggleComponent() {
|
|
2593
|
+
this.showData = "";
|
|
2594
|
+
this.showExpandMoreBtn = false;
|
|
2595
|
+
this.showCollapseBtn = false;
|
|
2596
|
+
}
|
|
2597
|
+
/**
|
|
2598
|
+
* @return {?}
|
|
2599
|
+
*/
|
|
2600
|
+
TruncatedTextToggleComponent.prototype.ngOnInit = /**
|
|
2601
|
+
* @return {?}
|
|
2602
|
+
*/
|
|
2603
|
+
function () {
|
|
2604
|
+
if (this.data.length > this.maximum) {
|
|
2605
|
+
this.showExpandMoreBtn = true;
|
|
2606
|
+
this.showData = this.data.substring(0, this.maximum) + "...";
|
|
2607
|
+
}
|
|
2608
|
+
else {
|
|
2609
|
+
this.showData = this.data;
|
|
2610
|
+
}
|
|
2611
|
+
};
|
|
2612
|
+
/**
|
|
2613
|
+
* @return {?}
|
|
2614
|
+
*/
|
|
2615
|
+
TruncatedTextToggleComponent.prototype.showAll = /**
|
|
2616
|
+
* @return {?}
|
|
2617
|
+
*/
|
|
2618
|
+
function () {
|
|
2619
|
+
this.showExpandMoreBtn = false;
|
|
2620
|
+
this.showCollapseBtn = true;
|
|
2621
|
+
this.showData = this.data;
|
|
2622
|
+
};
|
|
2623
|
+
/**
|
|
2624
|
+
* @return {?}
|
|
2625
|
+
*/
|
|
2626
|
+
TruncatedTextToggleComponent.prototype.collapse = /**
|
|
2627
|
+
* @return {?}
|
|
2628
|
+
*/
|
|
2629
|
+
function () {
|
|
2630
|
+
this.showExpandMoreBtn = true;
|
|
2631
|
+
this.showCollapseBtn = false;
|
|
2632
|
+
this.showData = this.data.substring(0, this.maximum) + "...";
|
|
2633
|
+
};
|
|
2634
|
+
TruncatedTextToggleComponent.decorators = [
|
|
2635
|
+
{ type: core.Component, args: [{
|
|
2636
|
+
selector: "truncated-text-toggle",
|
|
2637
|
+
template: "<div class=\"click-show-more-content\">\r\n <span>{{ showData }}</span>\r\n <span *ngIf=\"showExpandMoreBtn\" class=\"show-more\" (click)=\"showAll()\">\r\n Read More\r\n <img src=\"./assets/img/click_show_more_icon.svg\" alt=\"\" />\r\n </span>\r\n <div\r\n class=\"show-more collapse-btn\"\r\n (click)=\"collapse()\"\r\n *ngIf=\"showCollapseBtn\"\r\n >\r\n Collapse\r\n <img src=\"./assets/img/click_show_more_icon.svg\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
|
|
2638
|
+
styles: [".click-show-more-content{word-wrap:break-word}.click-show-more-content .show-more{cursor:pointer;color:#1364b3;font-size:11px;margin-left:4px;vertical-align:middle}.click-show-more-content .show-more img{margin-left:2px;vertical-align:middle}.click-show-more-content .collapse-btn{display:flex;align-items:center;justify-content:flex-end}.click-show-more-content .collapse-btn img{transform:rotate(-180deg)}"]
|
|
2639
|
+
}] }
|
|
2640
|
+
];
|
|
2641
|
+
/** @nocollapse */
|
|
2642
|
+
TruncatedTextToggleComponent.ctorParameters = function () { return []; };
|
|
2643
|
+
TruncatedTextToggleComponent.propDecorators = {
|
|
2644
|
+
data: [{ type: core.Input }],
|
|
2645
|
+
maximum: [{ type: core.Input }]
|
|
2646
|
+
};
|
|
2647
|
+
return TruncatedTextToggleComponent;
|
|
2648
|
+
}());
|
|
2649
|
+
if (false) {
|
|
2650
|
+
/** @type {?} */
|
|
2651
|
+
TruncatedTextToggleComponent.prototype.data;
|
|
2652
|
+
/** @type {?} */
|
|
2653
|
+
TruncatedTextToggleComponent.prototype.maximum;
|
|
2654
|
+
/** @type {?} */
|
|
2655
|
+
TruncatedTextToggleComponent.prototype.showData;
|
|
2656
|
+
/** @type {?} */
|
|
2657
|
+
TruncatedTextToggleComponent.prototype.showExpandMoreBtn;
|
|
2658
|
+
/** @type {?} */
|
|
2659
|
+
TruncatedTextToggleComponent.prototype.showCollapseBtn;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2574
2662
|
/**
|
|
2575
2663
|
* @fileoverview added by tsickle
|
|
2576
2664
|
* Generated from: lib/layout/page-list/index.component.ts
|
|
@@ -23036,7 +23124,8 @@
|
|
|
23036
23124
|
ToolbarItemComponent,
|
|
23037
23125
|
RsCommentaryComponent,
|
|
23038
23126
|
RSNavCardGroupComponent,
|
|
23039
|
-
RSToolbarComponent
|
|
23127
|
+
RSToolbarComponent,
|
|
23128
|
+
TruncatedTextToggleComponent
|
|
23040
23129
|
],
|
|
23041
23130
|
imports: [
|
|
23042
23131
|
common.CommonModule,
|
|
@@ -23087,6 +23176,7 @@
|
|
|
23087
23176
|
],
|
|
23088
23177
|
providers: [
|
|
23089
23178
|
ej2AngularGrids.PageService,
|
|
23179
|
+
ej2AngularGrids.RowDDService,
|
|
23090
23180
|
ej2AngularGrids.SortService,
|
|
23091
23181
|
ej2AngularGrids.FilterService,
|
|
23092
23182
|
ej2AngularGrids.ExcelExportService,
|
|
@@ -23187,7 +23277,8 @@
|
|
|
23187
23277
|
ToolbarItemComponent,
|
|
23188
23278
|
RsCommentaryComponent,
|
|
23189
23279
|
RSNavCardGroupComponent,
|
|
23190
|
-
RSToolbarComponent
|
|
23280
|
+
RSToolbarComponent,
|
|
23281
|
+
TruncatedTextToggleComponent
|
|
23191
23282
|
],
|
|
23192
23283
|
entryComponents: [
|
|
23193
23284
|
NewActionNotificationComponent,
|
|
@@ -23233,6 +23324,7 @@
|
|
|
23233
23324
|
exports.TagInputComponent = TagInputComponent;
|
|
23234
23325
|
exports.ToolbarItemComponent = ToolbarItemComponent;
|
|
23235
23326
|
exports.TranslationService = TranslationService;
|
|
23327
|
+
exports.TruncatedTextToggleComponent = TruncatedTextToggleComponent;
|
|
23236
23328
|
exports.filterShowSection = filterShowSection;
|
|
23237
23329
|
exports.ɵa = Debounce;
|
|
23238
23330
|
exports.ɵb = NewActionNotificationComponent;
|