raise-common-lib 0.0.134 → 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.
Files changed (44) hide show
  1. package/bundles/raise-common-lib.umd.js +129 -25
  2. package/bundles/raise-common-lib.umd.js.map +1 -1
  3. package/bundles/raise-common-lib.umd.min.js +1 -1
  4. package/bundles/raise-common-lib.umd.min.js.map +1 -1
  5. package/esm2015/lib/commentary/constants.js +10 -10
  6. package/esm2015/lib/commentary/index.component.js +36 -20
  7. package/esm2015/lib/common-grid/index.component.js +6 -2
  8. package/esm2015/lib/raise-common-lib.module.js +9 -5
  9. package/esm2015/lib/truncated-text-toggle/index.component.js +67 -0
  10. package/esm2015/public-api.js +2 -1
  11. package/esm2015/raise-common-lib.js +2 -2
  12. package/esm5/lib/commentary/constants.js +10 -10
  13. package/esm5/lib/commentary/index.component.js +43 -23
  14. package/esm5/lib/common-grid/index.component.js +6 -2
  15. package/esm5/lib/raise-common-lib.module.js +9 -5
  16. package/esm5/lib/truncated-text-toggle/index.component.js +78 -0
  17. package/esm5/public-api.js +2 -1
  18. package/esm5/raise-common-lib.js +2 -2
  19. package/fesm2015/raise-common-lib.js +113 -24
  20. package/fesm2015/raise-common-lib.js.map +1 -1
  21. package/fesm5/raise-common-lib.js +130 -27
  22. package/fesm5/raise-common-lib.js.map +1 -1
  23. package/lib/commentary/constants.d.ts +9 -9
  24. package/lib/commentary/index.component.d.ts +7 -0
  25. package/lib/common-grid/index.component.d.ts +1 -0
  26. package/lib/truncated-text-toggle/index.component.d.ts +12 -0
  27. package/package.json +1 -1
  28. package/public-api.d.ts +1 -0
  29. package/raise-common-lib.metadata.json +1 -1
  30. package/src/assets/img/click_show_more_icon.svg +3 -0
  31. package/src/assets/img/comment-cancel.svg +4 -4
  32. package/src/assets/img/comment-check.svg +5 -5
  33. package/src/assets/img/drawer-back.svg +4 -4
  34. package/src/assets/img/eye-close.svg +4 -4
  35. package/src/assets/img/eye-open.svg +4 -4
  36. package/src/assets/img/toolbar-action-add.svg +4 -4
  37. package/src/assets/img/toolbar-action-delete.svg +14 -14
  38. package/src/assets/img/toolbar-action-download.svg +5 -5
  39. package/src/assets/img/toolbar-action-duplicate.svg +6 -6
  40. package/src/assets/img/toolbar-action-export.svg +5 -5
  41. package/src/assets/img/toolbar-action-import.svg +5 -5
  42. package/src/assets/img/toolbar-action-refresh.svg +14 -14
  43. package/src/assets/img/toolbar-action-upload.svg +5 -5
  44. package/src/assets/style/reset/grid.scss +3 -1
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __decorate, __metadata, __read, __values, __spread } from 'tslib';
2
2
  import { EventEmitter, Component, ChangeDetectorRef, ViewChild, Input, Output, HostBinding, Injectable, ɵɵdefineInjectable, Inject, ɵɵinject, ContentChild, HostListener, ComponentFactoryResolver, ViewContainerRef, ViewChildren, ElementRef, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
- import { GridComponent, GridModule, PagerModule, GridAllModule, PageService, SortService, FilterService, ExcelExportService, EditService, ResizeService, ToolbarService, ColumnChooserService, AggregateService, ColumnMenuService, DetailRowService, SelectionService, GroupService } from '@syncfusion/ej2-angular-grids';
3
+ import { GridComponent, GridModule, PagerModule, GridAllModule, PageService, RowDDService, SortService, FilterService, ExcelExportService, EditService, ResizeService, ToolbarService, ColumnChooserService, AggregateService, ColumnMenuService, DetailRowService, SelectionService, GroupService } from '@syncfusion/ej2-angular-grids';
4
4
  import { times, debounce } from 'lodash';
5
5
  import { Subject, BehaviorSubject } from 'rxjs';
6
6
  import { MAT_SNACK_BAR_DATA, MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
@@ -55,6 +55,7 @@ var CommonGridComponent = /** @class */ (function () {
55
55
  this.fields = [];
56
56
  this.dataSource = [];
57
57
  this.allowPaging = true;
58
+ this.allowRowDragAndDrop = false;
58
59
  this.clipMode = "EllipsisWithTooltip";
59
60
  this.checkBoxWidth = 32; // col 数量过少的时候,check宽度会拉伸,这时候设置null
60
61
  /**
@@ -760,7 +761,7 @@ var CommonGridComponent = /** @class */ (function () {
760
761
  CommonGridComponent.decorators = [
761
762
  { type: Component, args: [{
762
763
  selector: "rs-common-grid",
763
- template: "<ejs-grid\r\n\t#grid\r\n\t[id]=\"gridId\"\r\n\t[ngClass]=\"{\r\n\t\t'hide-Check-box': !alwaysShowCheckbox,\r\n\t\t'grid-loading': className === 'grid-loading'\r\n\t}\"\r\n\t[dataSource]=\"dataSource\"\r\n\t[allowPaging]=\"allowPaging && pageSettings\"\r\n\t[allowResizing]=\"true\"\r\n\t[pageSettings]=\"pageSettings\"\r\n\t[showColumnMenu]=\"true\"\r\n\t[allowSorting]=\"true\"\r\n\t[allowFiltering]=\"true\"\r\n\t[allowExcelExport]=\"true\"\r\n\t[filterSettings]=\"filterSettings\"\r\n\t[resizeSettings]=\"resizeSettings\"\r\n\t[allowSelection]=\"true\"\r\n\t[editSettings]=\"editSettings\"\r\n\t[childGrid]=\"childGrid\"\r\n\t[contextMenuItems]=\"\r\n\t\tdataSource && dataSource.length ? contextMenuItems : null\r\n\t\"\r\n\t[selectionSettings]=\"selectionSettings\"\r\n\t(recordClick)=\"_recordClick($event)\"\r\n\t(recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n\t(actionBegin)=\"_actionBegin($event)\"\r\n\t(actionComplete)=\"_actionHandler($event)\"\r\n\t(rowSelected)=\"_rowSelected($event)\"\r\n\t(rowDeselected)=\"_rowDeselected($event)\"\r\n\tstyle=\"border: none\"\r\n\t(contextMenuClick)=\"_onContextMenu($event)\"\r\n\t(contextMenuOpen)=\"contextMenuOpen($event)\"\r\n\t(queryCellInfo)=\"customiseCell($event)\"\r\n\t(dataBound)=\"_dataBound($event)\"\r\n\t(rowDataBound)=\"_rowDataBound($event)\"\r\n\t(rowSelecting)=\"_rowSelecting($event)\"\r\n\t(excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n\t(load)=\"_load()\"\r\n\t[frozenColumns]=\"frozenColumns\"\r\n\t[columnChooserSettings]=\"columnChooserSettings\"\r\n\r\n>\r\n\t<e-columns>\r\n\t\t<e-column\r\n\t\t\t*ngIf=\"showCheckBox\"\r\n\t\t\ttype=\"checkbox\"\r\n\t\t\t[width]=\"checkBoxWidth\"\r\n\t\t\t[showColumnMenu]=\"false\"\r\n\t\t\t[allowResizing]=\"false\"\r\n\t\t></e-column>\r\n\t\t<e-column\r\n\t\t\t*ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n\t\t\t[field]=\"item.columnName\"\r\n\t\t\t[filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n\t\t\t[customAttributes]=\"\r\n\t\t\t\titem.colName === 'entityUserList' ||\r\n\t\t\t\titem.colName === 'kycProgress'\r\n\t\t\t\t\t? { class: 'hideColumnFilterClass' }\r\n\t\t\t\t\t: {}\r\n\t\t\t\"\r\n\t\t\t[headerText]=\"item.columnDisplayName\"\r\n\t\t\t[textAlign]=\"item.textAlign\"\r\n\t\t\t[showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n\t\t\t[allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n\t\t\t[allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n\t\t\t[editType]=\"item.editType\"\r\n\t\t\t[validationRules]=\"item.validationRules\"\r\n\t\t\t[type]=\"item.dataType || 'string'\"\r\n\t\t\t[width]=\"item.width\"\r\n\t\t\t[minWidth]=\"item.minWidth\"\r\n\t\t\t[format]=\"item.format\"\r\n\t\t\t[visible]=\"item.visible\"\r\n\t\t\t[template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n\t\t\t[clipMode]=\"\r\n\t\t\t\titem.clipMode\r\n\t\t\t\t\t? item.clipMode\r\n\t\t\t\t\t: clipMode || 'EllipsisWithTooltip'\r\n\t\t\t\"\r\n\t\t\t[sortComparer]=\"item.dateComparer\"\r\n\t\t\t[allowResizing]=\"!last\"\r\n\t\t>\r\n\t\t</e-column>\r\n\t</e-columns>\r\n</ejs-grid>\r\n",
764
+ 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",
764
765
  styles: [""]
765
766
  }] }
766
767
  ];
@@ -786,6 +787,7 @@ var CommonGridComponent = /** @class */ (function () {
786
787
  columnTemplate: [{ type: Input }],
787
788
  pageSettings: [{ type: Input }],
788
789
  allowPaging: [{ type: Input }],
790
+ allowRowDragAndDrop: [{ type: Input }],
789
791
  clipMode: [{ type: Input }],
790
792
  checkBoxWidth: [{ type: Input }],
791
793
  childGrid: [{ type: Input }],
@@ -848,6 +850,8 @@ if (false) {
848
850
  /** @type {?} */
849
851
  CommonGridComponent.prototype.allowPaging;
850
852
  /** @type {?} */
853
+ CommonGridComponent.prototype.allowRowDragAndDrop;
854
+ /** @type {?} */
851
855
  CommonGridComponent.prototype.clipMode;
852
856
  /** @type {?} */
853
857
  CommonGridComponent.prototype.checkBoxWidth;
@@ -2099,6 +2103,13 @@ var RsCommentaryComponent = /** @class */ (function () {
2099
2103
  this.deletePermission = true; // delete权限
2100
2104
  // delete权限
2101
2105
  this.isReadOnly = false;
2106
+ this.filedsKey = {
2107
+ commentaries: "commentaries",
2108
+ messageId: "messageId",
2109
+ ownerName: "ownerName",
2110
+ lastModifiedOn: "lastModifiedOn",
2111
+ messageBody: "messageBody",
2112
+ };
2102
2113
  this.actionComplete = new EventEmitter();
2103
2114
  this.commentVal = "";
2104
2115
  this.replyVal = "";
@@ -2139,13 +2150,14 @@ var RsCommentaryComponent = /** @class */ (function () {
2139
2150
  * @return {?}
2140
2151
  */
2141
2152
  function (res) {
2142
- _this.commentData.unshift({
2143
- messageId: res.messageId,
2144
- commentaries: [],
2145
- ownerName: _this.displayName,
2146
- lastModifiedOn: Date.now(),
2147
- messageBody: _this.commentVal,
2148
- });
2153
+ var _a;
2154
+ _this.commentData.unshift((_a = {},
2155
+ _a["" + _this.filedsKey["messageId"]] = res.messageId,
2156
+ _a["" + _this.filedsKey["commentaries"]] = [],
2157
+ _a["" + _this.filedsKey["ownerName"]] = _this.displayName,
2158
+ _a["" + _this.filedsKey["lastModifiedOn"]] = Date.now(),
2159
+ _a["" + _this.filedsKey["messageBody"]] = _this.commentVal,
2160
+ _a));
2149
2161
  _this.commentVal = "";
2150
2162
  }),
2151
2163
  });
@@ -2159,7 +2171,7 @@ var RsCommentaryComponent = /** @class */ (function () {
2159
2171
  * @return {?}
2160
2172
  */
2161
2173
  function (item) {
2162
- this.editCommentVal = item.messageBody;
2174
+ this.editCommentVal = item[this.filedsKey["messageBody"]];
2163
2175
  item.showCommentEdit = true;
2164
2176
  };
2165
2177
  /**
@@ -2182,7 +2194,7 @@ var RsCommentaryComponent = /** @class */ (function () {
2182
2194
  * @return {?}
2183
2195
  */
2184
2196
  function (res) {
2185
- item.messageBody = _this.editCommentVal;
2197
+ item[_this.filedsKey["messageBody"]] = _this.editCommentVal;
2186
2198
  item.showCommentEdit = false;
2187
2199
  _this.ref.markForCheck();
2188
2200
  }),
@@ -2220,7 +2232,9 @@ var RsCommentaryComponent = /** @class */ (function () {
2220
2232
  * @param {?} ele
2221
2233
  * @return {?}
2222
2234
  */
2223
- function (ele) { return ele.messageId === item.messageId; }));
2235
+ function (ele) {
2236
+ return ele[_this.filedsKey.messageId] === item[_this.filedsKey.messageId];
2237
+ }));
2224
2238
  _this.actionComplete.emit({
2225
2239
  action: "deleteComment",
2226
2240
  data: item,
@@ -2254,13 +2268,14 @@ var RsCommentaryComponent = /** @class */ (function () {
2254
2268
  * @return {?}
2255
2269
  */
2256
2270
  function (res) {
2257
- item.commentaries.unshift({
2258
- messageId: res.messageId,
2259
- commentaries: [],
2260
- ownerName: _this.displayName,
2261
- lastModifiedOn: Date.now(),
2262
- messageBody: _this.replyVal,
2263
- });
2271
+ var _a;
2272
+ item[_this.filedsKey["commentaries"]].unshift((_a = {},
2273
+ _a["" + _this.filedsKey["messageId"]] = res[_this.filedsKey["messageId"]],
2274
+ _a["" + _this.filedsKey["commentaries"]] = [],
2275
+ _a["" + _this.filedsKey["ownerName"]] = _this.displayName,
2276
+ _a["" + _this.filedsKey["lastModifiedOn"]] = Date.now(),
2277
+ _a["" + _this.filedsKey["messageBody"]] = _this.replyVal,
2278
+ _a));
2264
2279
  _this.replyVal = "";
2265
2280
  item.showReplyInput = false;
2266
2281
  _this.ref.detectChanges();
@@ -2279,14 +2294,20 @@ var RsCommentaryComponent = /** @class */ (function () {
2279
2294
  function (e) {
2280
2295
  /** @type {?} */
2281
2296
  var textarea = e.target;
2282
- textarea.style.height = "auto";
2283
- textarea.style.height = textarea.scrollHeight + "px";
2297
+ if (e.type === "focus" && textarea.value) {
2298
+ textarea.style.height = "auto";
2299
+ textarea.style.height = textarea.scrollHeight + "px";
2300
+ }
2301
+ else if (e.type === "input") {
2302
+ textarea.style.height = "auto";
2303
+ textarea.style.height = textarea.scrollHeight + "px";
2304
+ }
2284
2305
  };
2285
2306
  RsCommentaryComponent.decorators = [
2286
2307
  { type: Component, args: [{
2287
2308
  selector: "rs-commentary",
2288
- 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.commentaries\r\n : item.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.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.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=\"2\"\r\n [(ngModel)]=\"commentVal\"\r\n (input)=\"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=\"2\"\r\n [(ngModel)]=\"replyVal\"\r\n (input)=\"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=\"2\"\r\n [(ngModel)]=\"editCommentVal\"\r\n (input)=\"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.ownerName) }}\r\n </div>\r\n <div class=\"owner-wrap\">\r\n <div class=\"owner-info\">\r\n <div class=\"name\">\r\n {{ item.ownerName }}\r\n </div>\r\n <div class=\"time\">\r\n {{ item.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.messageBody }}\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",
2289
- 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:44px}.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:12px}.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:8px 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}.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}"]
2309
+ 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",
2310
+ 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}"]
2290
2311
  }] }
2291
2312
  ];
2292
2313
  /** @nocollapse */
@@ -2301,6 +2322,7 @@ var RsCommentaryComponent = /** @class */ (function () {
2301
2322
  editPermission: [{ type: Input }],
2302
2323
  deletePermission: [{ type: Input }],
2303
2324
  isReadOnly: [{ type: Input }],
2325
+ filedsKey: [{ type: Input }],
2304
2326
  actionComplete: [{ type: Output }]
2305
2327
  };
2306
2328
  __decorate([
@@ -2322,7 +2344,7 @@ var RsCommentaryComponent = /** @class */ (function () {
2322
2344
  __metadata("design:returntype", void 0)
2323
2345
  ], RsCommentaryComponent.prototype, "addReply", null);
2324
2346
  __decorate([
2325
- Debounce(300),
2347
+ Debounce(100),
2326
2348
  __metadata("design:type", Function),
2327
2349
  __metadata("design:paramtypes", [Object]),
2328
2350
  __metadata("design:returntype", void 0)
@@ -2341,6 +2363,8 @@ if (false) {
2341
2363
  /** @type {?} */
2342
2364
  RsCommentaryComponent.prototype.isReadOnly;
2343
2365
  /** @type {?} */
2366
+ RsCommentaryComponent.prototype.filedsKey;
2367
+ /** @type {?} */
2344
2368
  RsCommentaryComponent.prototype.actionComplete;
2345
2369
  /** @type {?} */
2346
2370
  RsCommentaryComponent.prototype.commentVal;
@@ -2366,6 +2390,82 @@ if (false) {
2366
2390
  RsCommentaryComponent.prototype.ref;
2367
2391
  }
2368
2392
 
2393
+ /**
2394
+ * @fileoverview added by tsickle
2395
+ * Generated from: lib/truncated-text-toggle/index.component.ts
2396
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2397
+ */
2398
+ var TruncatedTextToggleComponent = /** @class */ (function () {
2399
+ function TruncatedTextToggleComponent() {
2400
+ this.showData = "";
2401
+ this.showExpandMoreBtn = false;
2402
+ this.showCollapseBtn = false;
2403
+ }
2404
+ /**
2405
+ * @return {?}
2406
+ */
2407
+ TruncatedTextToggleComponent.prototype.ngOnInit = /**
2408
+ * @return {?}
2409
+ */
2410
+ function () {
2411
+ if (this.data.length > this.maximum) {
2412
+ this.showExpandMoreBtn = true;
2413
+ this.showData = this.data.substring(0, this.maximum) + "...";
2414
+ }
2415
+ else {
2416
+ this.showData = this.data;
2417
+ }
2418
+ };
2419
+ /**
2420
+ * @return {?}
2421
+ */
2422
+ TruncatedTextToggleComponent.prototype.showAll = /**
2423
+ * @return {?}
2424
+ */
2425
+ function () {
2426
+ this.showExpandMoreBtn = false;
2427
+ this.showCollapseBtn = true;
2428
+ this.showData = this.data;
2429
+ };
2430
+ /**
2431
+ * @return {?}
2432
+ */
2433
+ TruncatedTextToggleComponent.prototype.collapse = /**
2434
+ * @return {?}
2435
+ */
2436
+ function () {
2437
+ this.showExpandMoreBtn = true;
2438
+ this.showCollapseBtn = false;
2439
+ this.showData = this.data.substring(0, this.maximum) + "...";
2440
+ };
2441
+ TruncatedTextToggleComponent.decorators = [
2442
+ { type: Component, args: [{
2443
+ selector: "truncated-text-toggle",
2444
+ 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",
2445
+ 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)}"]
2446
+ }] }
2447
+ ];
2448
+ /** @nocollapse */
2449
+ TruncatedTextToggleComponent.ctorParameters = function () { return []; };
2450
+ TruncatedTextToggleComponent.propDecorators = {
2451
+ data: [{ type: Input }],
2452
+ maximum: [{ type: Input }]
2453
+ };
2454
+ return TruncatedTextToggleComponent;
2455
+ }());
2456
+ if (false) {
2457
+ /** @type {?} */
2458
+ TruncatedTextToggleComponent.prototype.data;
2459
+ /** @type {?} */
2460
+ TruncatedTextToggleComponent.prototype.maximum;
2461
+ /** @type {?} */
2462
+ TruncatedTextToggleComponent.prototype.showData;
2463
+ /** @type {?} */
2464
+ TruncatedTextToggleComponent.prototype.showExpandMoreBtn;
2465
+ /** @type {?} */
2466
+ TruncatedTextToggleComponent.prototype.showCollapseBtn;
2467
+ }
2468
+
2369
2469
  /**
2370
2470
  * @fileoverview added by tsickle
2371
2471
  * Generated from: lib/layout/page-list/index.component.ts
@@ -22831,7 +22931,8 @@ var RaiseCommonLibModule = /** @class */ (function () {
22831
22931
  ToolbarItemComponent,
22832
22932
  RsCommentaryComponent,
22833
22933
  RSNavCardGroupComponent,
22834
- RSToolbarComponent
22934
+ RSToolbarComponent,
22935
+ TruncatedTextToggleComponent
22835
22936
  ],
22836
22937
  imports: [
22837
22938
  CommonModule,
@@ -22882,6 +22983,7 @@ var RaiseCommonLibModule = /** @class */ (function () {
22882
22983
  ],
22883
22984
  providers: [
22884
22985
  PageService,
22986
+ RowDDService,
22885
22987
  SortService,
22886
22988
  FilterService,
22887
22989
  ExcelExportService,
@@ -22982,7 +23084,8 @@ var RaiseCommonLibModule = /** @class */ (function () {
22982
23084
  ToolbarItemComponent,
22983
23085
  RsCommentaryComponent,
22984
23086
  RSNavCardGroupComponent,
22985
- RSToolbarComponent
23087
+ RSToolbarComponent,
23088
+ TruncatedTextToggleComponent
22986
23089
  ],
22987
23090
  entryComponents: [
22988
23091
  NewActionNotificationComponent,
@@ -23007,5 +23110,5 @@ var RaiseCommonLibModule = /** @class */ (function () {
23007
23110
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23008
23111
  */
23009
23112
 
23010
- export { CheckboxGroupComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, filterShowSection, Debounce as ɵa, NewActionNotificationComponent as ɵb, CommonDialogComponent as ɵc, CommonDeleteComponent as ɵd };
23113
+ export { CheckboxGroupComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, NewActionNotificationComponent as ɵb, CommonDialogComponent as ɵc, CommonDeleteComponent as ɵd };
23011
23114
  //# sourceMappingURL=raise-common-lib.js.map