cax-design-system 2.7.2 → 2.7.4
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/README.md +1 -1
- package/accordion/accordion.d.ts +5 -1
- package/calendar/calendar.d.ts +8 -1
- package/esm2022/accordion/accordion.mjs +11 -4
- package/esm2022/calendar/calendar.mjs +35 -3
- package/esm2022/commentbox/commentbox.mjs +1 -1
- package/esm2022/dropdown/dropdown.mjs +3 -3
- package/esm2022/inputtextarea/inputtextarea.component.mjs +16 -4
- package/esm2022/navigation/navigation.mjs +72 -31
- package/esm2022/sidebar/sidebar.mjs +11 -3
- package/esm2022/table/components/column-filter/column-filter.mjs +2 -2
- package/esm2022/table/components/column-filter-form-element/column-filter-form-element.mjs +2 -2
- package/esm2022/tree/tree.mjs +5 -5
- package/fesm2022/cax-design-system-accordion.mjs +10 -3
- package/fesm2022/cax-design-system-accordion.mjs.map +1 -1
- package/fesm2022/cax-design-system-calendar.mjs +34 -2
- package/fesm2022/cax-design-system-calendar.mjs.map +1 -1
- package/fesm2022/cax-design-system-commentbox.mjs +1 -1
- package/fesm2022/cax-design-system-commentbox.mjs.map +1 -1
- package/fesm2022/cax-design-system-dropdown.mjs +2 -2
- package/fesm2022/cax-design-system-dropdown.mjs.map +1 -1
- package/fesm2022/cax-design-system-inputtextarea.mjs +15 -3
- package/fesm2022/cax-design-system-inputtextarea.mjs.map +1 -1
- package/fesm2022/cax-design-system-navigation.mjs +71 -30
- package/fesm2022/cax-design-system-navigation.mjs.map +1 -1
- package/fesm2022/cax-design-system-sidebar.mjs +10 -2
- package/fesm2022/cax-design-system-sidebar.mjs.map +1 -1
- package/fesm2022/cax-design-system-table.mjs +2 -2
- package/fesm2022/cax-design-system-table.mjs.map +1 -1
- package/fesm2022/cax-design-system-tree.mjs +4 -4
- package/fesm2022/cax-design-system-tree.mjs.map +1 -1
- package/inputtextarea/inputtextarea.component.d.ts +7 -1
- package/navigation/navigation.d.ts +3 -1
- package/package.json +177 -177
- package/resources/cax.min.scss +1 -1
- package/resources/cax.scss +237 -205
- package/resources/components/calendar/calendar.scss +220 -190
- package/resources/components/common/common.scss +1 -0
- package/resources/components/dropdown/dropdown.scss +8 -0
- package/resources/components/navigation/navigation.scss +27 -2
- package/resources/components/sidebar/sidebar.scss +67 -14
- package/resources/components/tree/tree.scss +0 -4
- package/sidebar/sidebar.d.ts +4 -2
|
@@ -505,7 +505,7 @@ class CommentboxComponent {
|
|
|
505
505
|
return namePart.substring(0, 4) + '..' + extension;
|
|
506
506
|
}
|
|
507
507
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CommentboxComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
508
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: CommentboxComponent, selector: "cax-comments", inputs: { comments: "comments", mentionSuggestions: "mentionSuggestions", hashtagSuggestions: "hashtagSuggestions", sidebarHeader: "sidebarHeader", isAdmin: "isAdmin", visible: "visible" }, outputs: { commentAdded: "commentAdded", fileSelected: "fileSelected", fileDownload: "fileDownload", visibleChange: "visibleChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "suggestionPanel", first: true, predicate: ["suggestionPanel"], descendants: true }, { propertyName: "inputText", first: true, predicate: ["inputText"], descendants: true }, { propertyName: "commentsList", first: true, predicate: ["commentsList"], descendants: true }, { propertyName: "countChip", first: true, predicate: ["countChip"], descendants: true }], ngImport: i0, template: "<cax-sidebar [(visible)]=\"visible\" [position]=\"'right'\" [baseZIndex]=\"10000\" (onHide)=\"onSidebarHide()\" [headerText]=\"sidebarHeader\">\r\n <ng-template caxTemplate=\"content\">\r\n <div class=\"cax-comments-container\">\r\n <div class=\"cax-comments-list\" #commentsList>\r\n <ng-container *ngFor=\"let group of groupedComments\">\r\n <div class=\"cax-date-header\">{{ formatDate(group.date) }}</div>\r\n <div\r\n class=\"cax-comment-item\"\r\n *ngFor=\"let comment of group.items; let i = index\"\r\n [ngClass]=\"{\r\n 'cax-user-comment': !comment.isAdmin,\r\n 'cax-admin-comment': comment.isAdmin,\r\n 'consecutive-message': i > 0 && comment.isAdmin === group.items[i-1].isAdmin && comment.sender === group.items[i-1].sender,\r\n 'new-sender': i > 0 && comment.sender !== group.items[i-1].sender,\r\n 'new-date': i === 0 && group.items.length > 0\r\n }\"\r\n >\r\n <!-- User Message (Left Aligned) -->\r\n <ng-container *ngIf=\"!comment.isAdmin\">\r\n <div class=\"cax-commentbox-avatar-container\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">\r\n <cax-avatar [label]=\"comment.sender?.substring(0, 2).toUpperCase() || 'U'\" [avatarSize]=\"'xs'\" [shape]=\"'circle'\" styleclass=\"cax-commentbox-avatar\"> </cax-avatar>\r\n </div>\r\n <div class=\"cax-comment-content\" [class.no-avatar]=\"i > 0 && group.items[i-1].sender === comment.sender\">\r\n <div class=\"cax-comment-sender\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">{{comment.sender}}</div>\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Admin Message (Right Aligned) -->\r\n <ng-container *ngIf=\"comment.isAdmin\">\r\n <div class=\"cax-comment-content admin\">\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <cax-overlay #suggestionPanel [(visible)]=\"overlayVisible\" [appendTo]=\"inputText\" (onHide)=\"onSuggestionPanelHide()\" [styleClass]=\"'suggestion-panel'\">\r\n <div class=\"suggestion-list\">\r\n <div *ngFor=\"let item of filteredSuggestions; let i = index\" class=\"suggestion-item\" [ngClass]=\"{'selected': selectedSuggestionIndex === i}\" (click)=\"onSuggestionSelect(item)\" (mouseenter)=\"selectedSuggestionIndex = i\">\r\n <span class=\"suggestion-label\">{{item.name}}</span>\r\n <small class=\"suggestion-id\" *ngIf=\"currentTokenType === 'mention'\">{{item.id}}</small>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n <cax-overlay\r\n [(visible)]=\"filesOverlayVisible\"\r\n [appendTo]=\"countChip\"\r\n [showTransitionOptions]=\"'0.12s ease-out'\"\r\n [hideTransitionOptions]=\"'0.1s ease-in'\"\r\n [style]=\"{ width: '224px', right: '5%' }\"\r\n styleClass=\"files-list-overlay\"\r\n (onHide)=\"hideFilesOverlay()\"\r\n >\r\n <div class=\"files-overlay-content\">\r\n <div *ngFor=\"let file of selectedFiles.slice(4); let i = index\" class=\"file-item\">\r\n <span class=\"file-name\">{{getShortFileName(file.name)}}</span>\r\n <i class=\"cax cax-close-circle\" (click)=\"removeFile(i + 4)\"></i>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n\r\n <ng-template caxTemplate=\"footer\">\r\n <div class=\"chat-footer\">\r\n <div class=\"selected-files\" *ngIf=\"selectedFiles.length > 0\">\r\n <cax-chip *ngFor=\"let file of selectedFiles.slice(0, 4); let i = index\" [label]=\"getShortFileName(file.name)\" [removable]=\"true\" [size]=\"'lg'\" (onRemove)=\"removeFile(i, true)\">\r\n <ng-template caxTemplate=\"content\">\r\n <i class=\"cax cax-paperclip\"></i>\r\n </ng-template>\r\n </cax-chip>\r\n <cax-chip #countChip *ngIf=\"selectedFiles.length > 4\" [label]=\"'+' + getOverflowCount()\" [size]=\"'lg'\" (mouseenter)=\"showFilesOverlay($event)\"> </cax-chip>\r\n </div>\r\n <div class=\"cax-chat-input-container\">\r\n <div class=\"input-wrapper\">\r\n <cax-inputtext\r\n [(ngModel)]=\"newComment\"\r\n [size]=\"'lg'\"\r\n [rightIcon]=\"true\"\r\n [clearIcon]=\"false\"\r\n [rightIconClass]=\"'cax cax-paperclip'\"\r\n [rightIconClickable]=\"true\"\r\n (rightIconClick)=\"onFileIconClick($event)\"\r\n placeholder=\"Comment or mention others with @, \u2018#\u2019 for columns\"\r\n (keyup)=\"handleKeyUp($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [class]=\"{'chat-input': true, 'admin-input': isAdminSender}\"\r\n [style]=\"{'border-radius': '8px', background: '#ffffff'}\"\r\n #inputText\r\n >\r\n </cax-inputtext>\r\n </div>\r\n\r\n <cax-button [icon]=\"'cax cax-plain'\" [severity]=\"'primary'\" [size]=\"'large'\" (click)=\"addComment()\" [disabled]=\"!newComment.trim() && selectedFiles.length === 0\" class=\"send-button\"> </cax-button>\r\n </div>\r\n\r\n <input #fileInput type=\"file\" (change)=\"onFileSelect($event)\" style=\"display: none\" accept=\"*/*\" multiple />\r\n </div>\r\n </ng-template>\r\n</cax-sidebar>\r\n", styles: ["@layer cax{.cax-comments-list{display:flex;flex-direction:column;gap:4px;flex:1;overflow-y:auto;overflow-x:hidden;height:100%;padding-bottom:0;will-change:transform;transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;scrollbar-width:thin;scrollbar-color:rgba(94,92,92,.3) transparent}.cax-comments-list:after{content:\"\";display:block;min-height:20px;scroll-snap-align:end}.cax-comments-list::-webkit-scrollbar-track{background:transparent}.cax-comments-list::-webkit-scrollbar-thumb{background-color:#5553531a;border-radius:4px;border:2px solid transparent;background-clip:padding-box}.cax-comment-item{display:flex;align-items:flex-end;max-width:85%;gap:4px}.cax-comment-item.consecutive-message{margin-top:0}.cax-comment-item.new-sender{margin-top:12px}.cax-comment-item.new-date{margin-top:0}.cax-user-comment{align-self:flex-start;display:flex;flex-direction:row;text-align:left}.cax-user-comment .cax-commentbox-avatar-container{display:flex;align-items:flex-end}.cax-user-comment .cax-comment-content{margin-bottom:0;display:flex;flex-direction:column;border-radius:12px 12px 12px 0}.cax-user-comment .cax-comment-content.no-avatar{border-radius:12px;margin-left:25px}.cax-user-comment .cax-comment-content .cax-comment-sender{font-size:14px;font-weight:600;color:var(--neutral-900);margin-bottom:0;line-height:20px}.cax-user-comment.consecutive-message .cax-comment-content{border-radius:12px}.cax-admin-comment{align-self:flex-end;display:flex;flex-direction:row;justify-content:flex-end;text-align:right}.cax-admin-comment .cax-commentbox-avatar-container{display:flex;align-items:flex-end}.cax-admin-comment .cax-comment-content{margin-bottom:0;display:flex;flex-direction:column;border-radius:12px 12px 0;text-align:left}.cax-admin-comment .cax-comment-content .cax-comment-sender{font-size:14px;font-weight:600;color:var(--neutral-900);margin-bottom:0;line-height:20px}.cax-admin-comment.consecutive-message .cax-comment-content{border-radius:12px}.cax-commentbox-avatar{width:32px;height:32px;border-radius:50%;margin:0 8px}.cax-comment-content{background:var(--white-100);border-radius:12px 12px 12px 0;padding:8px;max-width:100%;word-wrap:break-word;display:flex;flex-direction:column;box-shadow:0 2px 4px #0000000d}.cax-comment-content .cax-comment-text{font-weight:400;font-size:14px;line-height:20px}.cax-comment-content .cax-comment-text ::ng-deep .mention{display:inline-block;font-weight:600;color:var(--primary-500)}.cax-comment-content .cax-comment-text ::ng-deep .hashtag{display:inline-block;font-weight:600;color:var(--primary-500)}.cax-comment-content .cax-comment-sender{font-size:14px;font-weight:600;color:var(--neutral-900);margin-bottom:0;line-height:20px}.cax-file-attachment{margin-bottom:12px}.cax-file-attachment .file-item{display:flex;align-items:center;gap:12px;border-color:1px solid var(--neutral-150);padding:10px 16px;background:var(--neutral-75);border-radius:8px;cursor:pointer;margin-bottom:8px}.cax-file-attachment .file-item .file-details{display:flex;flex:1;align-items:center;gap:12px}.cax-file-attachment .file-item .file-name{color:var(--neutral-900);font-weight:500;font-size:14px;line-height:20px;flex:1;white-space:nowrap;overflow:hidden}.cax-file-attachment .file-item .file-size{color:var(--neutral-600);font-weight:400;font-size:12px;line-height:18px;margin-right:8px}.cax-file-attachment .file-item i{color:var(--neutral-900);font-size:1.1rem;margin-left:auto;order:2}.cax-file-attachment .file-item i.cax-download{cursor:pointer;transition:color .2s ease}.cax-file-attachment .file-item i.cax-download:hover{color:var(--primary-600)}.cax-file-attachment .file-item i.cax-download:active{color:var(--primary-700)}.cax-file-attachment .file-item:last-child{margin-bottom:0}.cax-file-attachment:last-child{margin-bottom:0}.cax-comment-date{font-weight:400;font-size:12px;line-height:18px;color:var(--neutral-600);align-self:flex-end}.cax-chat-input-container{display:flex;gap:.5rem}.cax-chat-input-container .chat-input{flex:1}.cax-chat-input-container .send-button{cursor:pointer}.input-wrapper{position:relative;flex:1;display:flex;flex-direction:column}.cax-date-header{text-align:center;font-size:12px;font-weight:500;line-height:18px;color:var(--neutral-700);background:var(--neutral-100);align-self:center;width:fit-content;padding:4px 12px;border-radius:4px;margin:11px 0;position:relative;z-index:1}.cax-date-header:first-child{margin-top:0}.cax-comments-container{display:flex;flex-direction:column;height:calc(100vh - 200px);overflow:hidden;position:relative;transform:translateZ(0);backface-visibility:hidden}.selected-files{display:flex;flex-wrap:wrap;gap:.5rem;padding:0 0 5px;position:relative}.selected-files .cax-chip{background:var(--neutral-100)}.selected-files .cax-chip i{margin-right:.5rem}.selected-files .files-overlay{position:absolute;background:var(--white-100);border-radius:8px;box-shadow:0 4px 12px #00000026;width:300px;max-height:400px;z-index:1000;overflow:hidden;border:1px solid var(--neutral-200)}.selected-files .files-overlay .files-overlay-header{padding:12px 16px;font-weight:600;font-size:14px;border-bottom:1px solid var(--neutral-100);background:var(--neutral-50)}.selected-files .files-overlay .files-overlay-content{max-height:350px;overflow-y:auto;padding:8px 0}.selected-files .files-overlay .files-overlay-content .file-item{display:flex;align-items:center;padding:8px 16px;transition:background-color .2s ease}.selected-files .files-overlay .files-overlay-content .file-item:hover{background-color:var(--neutral-50)}.selected-files .files-overlay .files-overlay-content .file-item i.cax-paperclip{color:var(--neutral-600);margin-right:8px}.selected-files .files-overlay .files-overlay-content .file-item .file-name{flex:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:8px}.selected-files .files-overlay .files-overlay-content .file-item .file-size{color:var(--neutral-600);font-size:12px;margin-right:8px}.selected-files .files-overlay .files-overlay-content .file-item i.cax-times{color:var(--neutral-600);cursor:pointer;transition:color .2s ease}.selected-files .files-overlay .files-overlay-content .file-item i.cax-times:hover{color:var --error-500}.selected-files :deep(.file-chip){background:var(--neutral-50);border:1px solid var(--neutral-100)}.selected-files :deep(.file-chip) .file-details{display:flex;align-items:center;gap:8px}.selected-files :deep(.file-chip) i{color:var(--primary-500);margin-right:8px}.selected-files :deep(.file-chip) .file-name{font-weight:500}.selected-files :deep(.file-chip) .file-size{color:var(--neutral-600);font-size:.8rem}:host ::ng-deep .cax-sidebar{width:589px!important;border:1px solid var(--neutral-200)!important}:host ::ng-deep .cax-sidebar .cax-sidebar-content{display:flex;flex-direction:column;background:var(--neutral-25);padding:24px 8px!important}:host ::ng-deep .cax-sidebar .cax-sidebar-footer{padding:12px!important;background:var(--neutral-50);border-top:1px solid var(--neutral-200)}:host ::ng-deep .cax-sidebar .cax-sidebar-header{border-bottom:1px solid var(--neutral-200);background:var(--neutral-50);padding:16px 24px!important}:host ::ng-deep .cax-overlay{position:absolute;bottom:0!important;top:unset!important;left:unset!important}:host ::ng-deep .suggestion-panel{background:var(--white-100);box-shadow:0 2px 8px #0000001a;z-index:9999;padding:12px 4px;margin-left:20px;width:224px;border-radius:8px;border:1px solid var(--neutral-200)}:host ::ng-deep .suggestion-panel .suggestion-list{max-height:200px;overflow-y:auto;will-change:transform;transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;scrollbar-width:thin;scrollbar-color:rgba(94,92,92,.3) transparent}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item{padding:6px 8px;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease;align-items:center}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item:hover{background-color:var(--neutral-50)}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item.selected{background-color:var(--neutral-50)}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item .suggestion-label{font-weight:500}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item .suggestion-id{color:var(--neutral-600);font-size:.85em}:host ::ng-deep .suggestion-panel .suggestion-list:after{content:\"\";display:block;min-height:20px;scroll-snap-align:end}:host ::ng-deep .suggestion-panel .suggestion-list::-webkit-scrollbar-track{background:transparent}:host ::ng-deep .suggestion-panel .suggestion-list::-webkit-scrollbar-thumb{background-color:#5553531a;border-radius:4px;border:2px solid transparent;background-clip:padding-box}:host ::ng-deep .chat-footer{position:relative;z-index:1}:host ::ng-deep .cax-chat-input-container .chat-input .cax-paperclip{color:var(--neutral-900)!important}:host ::ng-deep .files-list-overlay{border:1px solid var(--neutral-200);background:var(--white-100);box-shadow:0 2px 8px #0000001a;z-index:9999;padding:12px 4px;width:224px;border-radius:8px}:host ::ng-deep .files-list-overlay.cax-overlay{transform-origin:right center!important}:host ::ng-deep .files-list-overlay .files-overlay-content{max-height:200px;overflow-y:auto}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item{transition:background-color .2s ease;padding:6px 8px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;will-change:transform;transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;scrollbar-width:thin;scrollbar-color:rgba(94,92,92,.3) transparent}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item:hover{background-color:var(--neutral-50)}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item .file-name{flex:1;font-size:14px;font-weight:500;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:8px}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item .file-size{color:var(--neutral-600);font-size:12px;margin-right:8px}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item i.cax-times{color:var(--neutral-600);cursor:pointer;border:1.1rem solid var(--neutral-200);transition:color .2s ease}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item:after{content:\"\";display:block;min-height:20px;scroll-snap-align:end}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item::-webkit-scrollbar-track{background:transparent}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item::-webkit-scrollbar-thumb{background-color:#5553531a;border-radius:4px;border:2px solid transparent;background-clip:padding-box}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.Sidebar, selector: "cax-sidebar", inputs: ["headerText", "appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "contentTemplate", "headerTemplate", "headlessTemplate", "footerTemplate", "closeIconTemplate", "headerStyle"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i5.InputTextComponent, selector: "cax-inputtext", inputs: ["value", "placeholder", "disabled", "maxlength", "successText", "errorText", "showLabel", "leftIcon", "rightIcon", "rightIconClickable", "clearIcon", "label", "iconPath", "disabledIcon", "showIcon", "iconClass", "leftIconClass", "rightIconClass", "invalid", "required", "style", "size", "styleClass"], outputs: ["valueChange", "rightIconClick"] }, { kind: "component", type: i6.Button, selector: "cax-button", inputs: ["type", "iconPos", "icon", "badge", "rightIcon", "leftIcon", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i7.CaxTemplate, selector: "[caxTemplate]", inputs: ["type", "caxTemplate"] }, { kind: "component", type: i8.Chip, selector: "cax-chip", inputs: ["label", "icon", "image", "alt", "style", "styleClass", "removable", "removeIcon", "size", "severity"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: i9.Overlay, selector: "cax-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "component", type: i10.Avatar, selector: "cax-avatar", inputs: ["label", "icon", "image", "avatarSize", "shape", "style", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }] });
|
|
508
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: CommentboxComponent, selector: "cax-comments", inputs: { comments: "comments", mentionSuggestions: "mentionSuggestions", hashtagSuggestions: "hashtagSuggestions", sidebarHeader: "sidebarHeader", isAdmin: "isAdmin", visible: "visible" }, outputs: { commentAdded: "commentAdded", fileSelected: "fileSelected", fileDownload: "fileDownload", visibleChange: "visibleChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "suggestionPanel", first: true, predicate: ["suggestionPanel"], descendants: true }, { propertyName: "inputText", first: true, predicate: ["inputText"], descendants: true }, { propertyName: "commentsList", first: true, predicate: ["commentsList"], descendants: true }, { propertyName: "countChip", first: true, predicate: ["countChip"], descendants: true }], ngImport: i0, template: "<cax-sidebar [(visible)]=\"visible\" [position]=\"'right'\" [baseZIndex]=\"10000\" (onHide)=\"onSidebarHide()\" [headerText]=\"sidebarHeader\">\r\n <ng-template caxTemplate=\"content\">\r\n <div class=\"cax-comments-container\">\r\n <div class=\"cax-comments-list\" #commentsList>\r\n <ng-container *ngFor=\"let group of groupedComments\">\r\n <div class=\"cax-date-header\">{{ formatDate(group.date) }}</div>\r\n <div\r\n class=\"cax-comment-item\"\r\n *ngFor=\"let comment of group.items; let i = index\"\r\n [ngClass]=\"{\r\n 'cax-user-comment': !comment.isAdmin,\r\n 'cax-admin-comment': comment.isAdmin,\r\n 'consecutive-message': i > 0 && comment.isAdmin === group.items[i-1].isAdmin && comment.sender === group.items[i-1].sender,\r\n 'new-sender': i > 0 && comment.sender !== group.items[i-1].sender,\r\n 'new-date': i === 0 && group.items.length > 0\r\n }\"\r\n >\r\n <!-- User Message (Left Aligned) -->\r\n <ng-container *ngIf=\"!comment.isAdmin\">\r\n <div class=\"cax-commentbox-avatar-container\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">\r\n <cax-avatar [label]=\"comment.sender?.substring(0, 2).toUpperCase() || 'U'\" [avatarSize]=\"'xs'\" [shape]=\"'circle'\" styleclass=\"cax-commentbox-avatar\"> </cax-avatar>\r\n </div>\r\n <div class=\"cax-comment-content\" [class.no-avatar]=\"i > 0 && group.items[i-1].sender === comment.sender\">\r\n <div class=\"cax-comment-sender\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">{{comment.sender}}</div>\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Admin Message (Right Aligned) -->\r\n <ng-container *ngIf=\"comment.isAdmin\">\r\n <div class=\"cax-comment-content admin\">\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <cax-overlay #suggestionPanel [(visible)]=\"overlayVisible\" [appendTo]=\"inputText\" (onHide)=\"onSuggestionPanelHide()\" [styleClass]=\"'suggestion-panel'\">\r\n <div class=\"suggestion-list\">\r\n <div *ngFor=\"let item of filteredSuggestions; let i = index\" class=\"suggestion-item\" [ngClass]=\"{'selected': selectedSuggestionIndex === i}\" (click)=\"onSuggestionSelect(item)\" (mouseenter)=\"selectedSuggestionIndex = i\">\r\n <span class=\"suggestion-label\">{{item.name}}</span>\r\n <small class=\"suggestion-id\" *ngIf=\"currentTokenType === 'mention'\">{{item.id}}</small>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n <cax-overlay\r\n [(visible)]=\"filesOverlayVisible\"\r\n [appendTo]=\"countChip\"\r\n [showTransitionOptions]=\"'0.12s ease-out'\"\r\n [hideTransitionOptions]=\"'0.1s ease-in'\"\r\n [style]=\"{ width: '224px', right: '5%' }\"\r\n styleClass=\"files-list-overlay\"\r\n (onHide)=\"hideFilesOverlay()\"\r\n >\r\n <div class=\"files-overlay-content\">\r\n <div *ngFor=\"let file of selectedFiles.slice(4); let i = index\" class=\"file-item\">\r\n <span class=\"file-name\">{{getShortFileName(file.name)}}</span>\r\n <i class=\"cax cax-close-circle\" (click)=\"removeFile(i + 4)\"></i>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n\r\n <ng-template caxTemplate=\"footer\">\r\n <div class=\"chat-footer\">\r\n <div class=\"selected-files\" *ngIf=\"selectedFiles.length > 0\">\r\n <cax-chip *ngFor=\"let file of selectedFiles.slice(0, 4); let i = index\" [label]=\"getShortFileName(file.name)\" [removable]=\"true\" [size]=\"'lg'\" (onRemove)=\"removeFile(i, true)\">\r\n <ng-template caxTemplate=\"content\">\r\n <i class=\"cax cax-paperclip\"></i>\r\n </ng-template>\r\n </cax-chip>\r\n <cax-chip #countChip *ngIf=\"selectedFiles.length > 4\" [label]=\"'+' + getOverflowCount()\" [size]=\"'lg'\" (mouseenter)=\"showFilesOverlay($event)\"> </cax-chip>\r\n </div>\r\n <div class=\"cax-chat-input-container\">\r\n <div class=\"input-wrapper\">\r\n <cax-inputtext\r\n [(ngModel)]=\"newComment\"\r\n [size]=\"'lg'\"\r\n [rightIcon]=\"true\"\r\n [clearIcon]=\"false\"\r\n [rightIconClass]=\"'cax cax-paperclip'\"\r\n [rightIconClickable]=\"true\"\r\n (rightIconClick)=\"onFileIconClick($event)\"\r\n placeholder=\"Comment or mention others with @, \u2018#\u2019 for columns\"\r\n (keyup)=\"handleKeyUp($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [class]=\"{'chat-input': true, 'admin-input': isAdminSender}\"\r\n [style]=\"{'border-radius': '8px', background: '#ffffff'}\"\r\n #inputText\r\n >\r\n </cax-inputtext>\r\n </div>\r\n\r\n <cax-button [icon]=\"'cax cax-plain'\" [severity]=\"'primary'\" [size]=\"'large'\" (click)=\"addComment()\" [disabled]=\"!newComment.trim() && selectedFiles.length === 0\" class=\"send-button\"> </cax-button>\r\n </div>\r\n\r\n <input #fileInput type=\"file\" (change)=\"onFileSelect($event)\" style=\"display: none\" accept=\"*/*\" multiple />\r\n </div>\r\n </ng-template>\r\n</cax-sidebar>\r\n", styles: ["@layer cax{.cax-comments-list{display:flex;flex-direction:column;gap:4px;flex:1;overflow-y:auto;overflow-x:hidden;height:100%;padding-bottom:0;will-change:transform;transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;scrollbar-width:thin;scrollbar-color:rgba(94,92,92,.3) transparent}.cax-comments-list:after{content:\"\";display:block;min-height:20px;scroll-snap-align:end}.cax-comments-list::-webkit-scrollbar-track{background:transparent}.cax-comments-list::-webkit-scrollbar-thumb{background-color:#5553531a;border-radius:4px;border:2px solid transparent;background-clip:padding-box}.cax-comment-item{display:flex;align-items:flex-end;max-width:85%;gap:4px}.cax-comment-item.consecutive-message{margin-top:0}.cax-comment-item.new-sender{margin-top:12px}.cax-comment-item.new-date{margin-top:0}.cax-user-comment{align-self:flex-start;display:flex;flex-direction:row;text-align:left}.cax-user-comment .cax-commentbox-avatar-container{display:flex;align-items:flex-end}.cax-user-comment .cax-comment-content{margin-bottom:0;display:flex;flex-direction:column;border-radius:12px 12px 12px 0}.cax-user-comment .cax-comment-content.no-avatar{border-radius:12px;margin-left:25px}.cax-user-comment .cax-comment-content .cax-comment-sender{font-size:14px;font-weight:600;color:var(--neutral-900);margin-bottom:0;line-height:20px}.cax-user-comment.consecutive-message .cax-comment-content{border-radius:12px}.cax-admin-comment{align-self:flex-end;display:flex;flex-direction:row;justify-content:flex-end;text-align:right}.cax-admin-comment .cax-commentbox-avatar-container{display:flex;align-items:flex-end}.cax-admin-comment .cax-comment-content{margin-bottom:0;display:flex;flex-direction:column;border-radius:12px 12px 0;text-align:left}.cax-admin-comment .cax-comment-content .cax-comment-sender{font-size:14px;font-weight:600;color:var(--neutral-900);margin-bottom:0;line-height:20px}.cax-admin-comment.consecutive-message .cax-comment-content{border-radius:12px}.cax-commentbox-avatar{width:32px;height:32px;border-radius:50%;margin:0 8px}.cax-comment-content{background:var(--white-100);border-radius:12px 12px 12px 0;padding:8px;max-width:100%;word-wrap:break-word;display:flex;flex-direction:column;box-shadow:0 2px 4px #0000000d}.cax-comment-content .cax-comment-text{font-weight:400;font-size:14px;line-height:20px}.cax-comment-content .cax-comment-text ::ng-deep .mention{display:inline-block;font-weight:600;color:var(--primary-500)}.cax-comment-content .cax-comment-text ::ng-deep .hashtag{display:inline-block;font-weight:600;color:var(--primary-500)}.cax-comment-content .cax-comment-sender{font-size:14px;font-weight:600;color:var(--neutral-900);margin-bottom:0;line-height:20px}.cax-file-attachment{margin-bottom:12px}.cax-file-attachment .file-item{display:flex;align-items:center;gap:12px;border-color:1px solid var(--neutral-150);padding:10px 16px;background:var(--neutral-75);border-radius:8px;cursor:pointer;margin-bottom:8px}.cax-file-attachment .file-item .file-details{display:flex;flex:1;align-items:center;gap:12px}.cax-file-attachment .file-item .file-name{color:var(--neutral-900);font-weight:500;font-size:14px;line-height:20px;flex:1;white-space:nowrap;overflow:hidden}.cax-file-attachment .file-item .file-size{color:var(--neutral-600);font-weight:400;font-size:12px;line-height:18px;margin-right:8px}.cax-file-attachment .file-item i{color:var(--neutral-900);font-size:1.1rem;margin-left:auto;order:2}.cax-file-attachment .file-item i.cax-download{cursor:pointer;transition:color .2s ease}.cax-file-attachment .file-item i.cax-download:hover{color:var(--primary-600)}.cax-file-attachment .file-item i.cax-download:active{color:var(--primary-700)}.cax-file-attachment .file-item:last-child{margin-bottom:0}.cax-file-attachment:last-child{margin-bottom:0}.cax-comment-date{font-weight:400;font-size:12px;line-height:18px;color:var(--neutral-600);align-self:flex-end}.cax-chat-input-container{display:flex;gap:.5rem}.cax-chat-input-container .chat-input{flex:1}.cax-chat-input-container .send-button{cursor:pointer}.input-wrapper{position:relative;flex:1;display:flex;flex-direction:column}.cax-date-header{text-align:center;font-size:12px;font-weight:500;line-height:18px;color:var(--neutral-700);background:var(--neutral-100);align-self:center;width:fit-content;padding:4px 12px;border-radius:4px;margin:11px 0;position:relative;z-index:1}.cax-date-header:first-child{margin-top:0}.cax-comments-container{display:flex;flex-direction:column;height:calc(100vh - 200px);overflow:hidden;position:relative;transform:translateZ(0);backface-visibility:hidden}.selected-files{display:flex;flex-wrap:wrap;gap:.5rem;padding:0 0 5px;position:relative}.selected-files .cax-chip{background:var(--neutral-100)}.selected-files .cax-chip i{margin-right:.5rem}.selected-files .files-overlay{position:absolute;background:var(--white-100);border-radius:8px;box-shadow:0 4px 12px #00000026;width:300px;max-height:400px;z-index:1000;overflow:hidden;border:1px solid var(--neutral-200)}.selected-files .files-overlay .files-overlay-header{padding:12px 16px;font-weight:600;font-size:14px;border-bottom:1px solid var(--neutral-100);background:var(--neutral-50)}.selected-files .files-overlay .files-overlay-content{max-height:350px;overflow-y:auto;padding:8px 0}.selected-files .files-overlay .files-overlay-content .file-item{display:flex;align-items:center;padding:8px 16px;transition:background-color .2s ease}.selected-files .files-overlay .files-overlay-content .file-item:hover{background-color:var(--neutral-50)}.selected-files .files-overlay .files-overlay-content .file-item i.cax-paperclip{color:var(--neutral-600);margin-right:8px}.selected-files .files-overlay .files-overlay-content .file-item .file-name{flex:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:8px}.selected-files .files-overlay .files-overlay-content .file-item .file-size{color:var(--neutral-600);font-size:12px;margin-right:8px}.selected-files .files-overlay .files-overlay-content .file-item i.cax-times{color:var(--neutral-600);cursor:pointer;transition:color .2s ease}.selected-files .files-overlay .files-overlay-content .file-item i.cax-times:hover{color:var --error-500}.selected-files :deep(.file-chip){background:var(--neutral-50);border:1px solid var(--neutral-100)}.selected-files :deep(.file-chip) .file-details{display:flex;align-items:center;gap:8px}.selected-files :deep(.file-chip) i{color:var(--primary-500);margin-right:8px}.selected-files :deep(.file-chip) .file-name{font-weight:500}.selected-files :deep(.file-chip) .file-size{color:var(--neutral-600);font-size:.8rem}:host ::ng-deep .cax-sidebar{width:589px!important;border:1px solid var(--neutral-200)!important}:host ::ng-deep .cax-sidebar .cax-sidebar-content{display:flex;flex-direction:column;background:var(--neutral-25);padding:24px 8px!important}:host ::ng-deep .cax-sidebar .cax-sidebar-footer{padding:12px!important;background:var(--neutral-50);border-top:1px solid var(--neutral-200)}:host ::ng-deep .cax-sidebar .cax-sidebar-header{border-bottom:1px solid var(--neutral-200);background:var(--neutral-50);padding:16px 24px!important}:host ::ng-deep .cax-overlay{position:absolute;bottom:0!important;top:unset!important;left:unset!important}:host ::ng-deep .suggestion-panel{background:var(--white-100);box-shadow:0 2px 8px #0000001a;z-index:9999;padding:12px 4px;margin-left:20px;width:224px;border-radius:8px;border:1px solid var(--neutral-200)}:host ::ng-deep .suggestion-panel .suggestion-list{max-height:200px;overflow-y:auto;will-change:transform;transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;scrollbar-width:thin;scrollbar-color:rgba(94,92,92,.3) transparent}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item{padding:6px 8px;cursor:pointer;display:flex;justify-content:space-between;transition:background-color .2s ease;align-items:center}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item:hover{background-color:var(--neutral-50)}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item.selected{background-color:var(--neutral-50)}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item .suggestion-label{font-weight:500}:host ::ng-deep .suggestion-panel .suggestion-list .suggestion-item .suggestion-id{color:var(--neutral-600);font-size:.85em}:host ::ng-deep .suggestion-panel .suggestion-list:after{content:\"\";display:block;min-height:20px;scroll-snap-align:end}:host ::ng-deep .suggestion-panel .suggestion-list::-webkit-scrollbar-track{background:transparent}:host ::ng-deep .suggestion-panel .suggestion-list::-webkit-scrollbar-thumb{background-color:#5553531a;border-radius:4px;border:2px solid transparent;background-clip:padding-box}:host ::ng-deep .chat-footer{position:relative;z-index:1}:host ::ng-deep .cax-chat-input-container .chat-input .cax-paperclip{color:var(--neutral-900)!important}:host ::ng-deep .files-list-overlay{border:1px solid var(--neutral-200);background:var(--white-100);box-shadow:0 2px 8px #0000001a;z-index:9999;padding:12px 4px;width:224px;border-radius:8px}:host ::ng-deep .files-list-overlay.cax-overlay{transform-origin:right center!important}:host ::ng-deep .files-list-overlay .files-overlay-content{max-height:200px;overflow-y:auto}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item{transition:background-color .2s ease;padding:6px 8px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;will-change:transform;transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;scrollbar-width:thin;scrollbar-color:rgba(94,92,92,.3) transparent}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item:hover{background-color:var(--neutral-50)}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item .file-name{flex:1;font-size:14px;font-weight:500;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:8px}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item .file-size{color:var(--neutral-600);font-size:12px;margin-right:8px}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item i.cax-times{color:var(--neutral-600);cursor:pointer;border:1.1rem solid var(--neutral-200);transition:color .2s ease}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item:after{content:\"\";display:block;min-height:20px;scroll-snap-align:end}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item::-webkit-scrollbar-track{background:transparent}:host ::ng-deep .files-list-overlay .files-overlay-content .file-item::-webkit-scrollbar-thumb{background-color:#5553531a;border-radius:4px;border:2px solid transparent;background-clip:padding-box}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.Sidebar, selector: "cax-sidebar", inputs: ["headerText", "appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "mode", "contentTemplate", "headerTemplate", "headlessTemplate", "footerTemplate", "closeIconTemplate", "headerStyle"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i5.InputTextComponent, selector: "cax-inputtext", inputs: ["value", "placeholder", "disabled", "maxlength", "successText", "errorText", "showLabel", "leftIcon", "rightIcon", "rightIconClickable", "clearIcon", "label", "iconPath", "disabledIcon", "showIcon", "iconClass", "leftIconClass", "rightIconClass", "invalid", "required", "style", "size", "styleClass"], outputs: ["valueChange", "rightIconClick"] }, { kind: "component", type: i6.Button, selector: "cax-button", inputs: ["type", "iconPos", "icon", "badge", "rightIcon", "leftIcon", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i7.CaxTemplate, selector: "[caxTemplate]", inputs: ["type", "caxTemplate"] }, { kind: "component", type: i8.Chip, selector: "cax-chip", inputs: ["label", "icon", "image", "alt", "style", "styleClass", "removable", "removeIcon", "size", "severity"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: i9.Overlay, selector: "cax-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "component", type: i10.Avatar, selector: "cax-avatar", inputs: ["label", "icon", "image", "avatarSize", "shape", "style", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }] });
|
|
509
509
|
}
|
|
510
510
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CommentboxComponent, decorators: [{
|
|
511
511
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cax-design-system-commentbox.mjs","sources":["../../src/app/components/commentbox/commentbox.ts","../../src/app/components/commentbox/commentbox.html","../../src/app/components/commentbox/commentbox.module.ts","../../src/app/components/commentbox/cax-design-system-commentbox.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter, ViewChild, ElementRef, HostListener } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n// Add this interface at the top of the file\ninterface Comment {\n text: string;\n date: Date;\n files?: Array<{ name: string; size: string }>;\n isAdmin?: boolean;\n sender?: string;\n}\n\ninterface GroupedComments {\n date: Date;\n items: Comment[];\n}\n\n@Component({\n selector: 'cax-comments',\n templateUrl: './commentbox.html',\n styleUrls: ['./commentbox.scss']\n})\nexport class CommentboxComponent {\n @Input() comments: Comment[] = [];\n @Input() mentionSuggestions: any[] = [];\n @Input() hashtagSuggestions: any[] = [];\n @Input() sidebarHeader: string;\n @Input() isAdmin: boolean = true;\n @Output() commentAdded = new EventEmitter<any>();\n @Output() fileSelected = new EventEmitter<File>();\n @Output() fileDownload = new EventEmitter<{ name: string; size: string }>();\n @Output() visibleChange = new EventEmitter<boolean>();\n newComment: string = '';\n\n isMentioning: boolean = false;\n isHashtagging: boolean = false;\n suggestions: any[] = [];\n selectedSuggestion: any = null;\n selectedSuggestionIndex: number = -1;\n filteredSuggestions: any[] = [];\n currentTokenType: 'mention' | 'hashtag' | null = null;\n cursorPosition: number = 0;\n\n @ViewChild('fileInput') fileInput!: ElementRef<HTMLInputElement>;\n @ViewChild('suggestionPanel') suggestionPanel!: ElementRef;\n @ViewChild('inputText') inputText!: ElementRef;\n @ViewChild('commentsList') private commentsList!: ElementRef;\n @ViewChild('countChip') countChip!: ElementRef;\n selectedFiles: Array<{ name: string; size: string }> = [];\n selectedFilesMap: Map<number, { name: string; size: string }> = new Map();\n\n today: Date = new Date();\n\n overlayVisible: boolean = false;\n filesOverlayVisible: boolean = false;\n overlayPosition = { top: 0, left: 0 };\n\n private dateUpdateInterval: any;\n\n // Keep track of should auto scroll\n private shouldAutoScroll = true;\n private isUserScrolling = false;\n\n // Add new property for mutation observer\n private observer: MutationObserver;\n\n constructor(private sanitizer: DomSanitizer) {\n this.updateCurrentDate();\n this.dateUpdateInterval = setInterval(() => this.updateCurrentDate(), 60000);\n\n // Initialize observer\n this.observer = new MutationObserver(() => this.forceScrollToBottom());\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n this.forceScrollToBottom();\n }, 100);\n\n // Set up observer to auto-scroll when content changes\n if (this.commentsList?.nativeElement) {\n this.observer.observe(this.commentsList.nativeElement, {\n childList: true,\n subtree: true,\n characterData: true\n });\n }\n }\n\n ngOnDestroy() {\n if (this.dateUpdateInterval) {\n clearInterval(this.dateUpdateInterval);\n }\n // Disconnect the observer\n this.observer.disconnect();\n\n // Remove event listeners\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n private updateCurrentDate(): void {\n this.today = new Date();\n }\n\n formatDate(date: Date): string {\n return date.toLocaleDateString(undefined, {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone\n });\n }\n\n formatMessageWithTags(text: string): SafeHtml {\n if (!text) return '';\n const sanitizedText = text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const htmlContent = sanitizedText.replace(/(@\\w+|#\\w+)/g, (match) => {\n if (match.startsWith('@')) {\n return `<span class=\"mention\" style=\"color: #0C4AF3; font-weight: 600;\">${match}</span>`;\n } else if (match.startsWith('#')) {\n return `<span class=\"hashtag\" style=\"color: #0C4AF3; font-weight: 600;\">${match}</span>`;\n }\n return match;\n });\n\n return this.sanitizer.bypassSecurityTrustHtml(htmlContent);\n }\n\n addComment() {\n if (this.newComment.trim() || this.selectedFiles.length > 0) {\n const newComment: Comment = {\n text: this.newComment,\n date: new Date(),\n files: this.selectedFiles.length > 0 ? [...this.selectedFiles] : undefined,\n isAdmin: this.isAdmin,\n sender: this.isAdmin ? 'System Admin' : 'User'\n };\n\n this.comments = [...this.comments, newComment];\n this.commentAdded.emit(newComment);\n this.newComment = '';\n this.selectedFiles = [];\n this.selectedFilesMap.clear();\n this.filesOverlayVisible = false;\n\n if (this.suggestionPanel?.nativeElement) {\n this.suggestionPanel.nativeElement.style.display = 'none';\n }\n\n // Always scroll to bottom immediately\n this.scrollToBottom(true);\n }\n }\n\n private forceScrollToBottom(): void {\n if (!this.commentsList?.nativeElement) return;\n\n const element = this.commentsList.nativeElement;\n requestAnimationFrame(() => {\n try {\n // Force immediate scroll\n element.scrollTop = element.scrollHeight;\n } catch (err) {\n console.error('Scroll error:', err);\n }\n });\n }\n\n private scrollToBottom(force = false): void {\n if (force) {\n this.forceScrollToBottom();\n return;\n }\n if (!this.commentsList?.nativeElement) return;\n\n const element = this.commentsList.nativeElement;\n\n // Use double RAF for reliable scrolling\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n try {\n // Force immediate scroll for new comments\n element.scrollTop = element.scrollHeight;\n\n // Use smooth scrolling after initial jump\n element.scrollTo({\n top: element.scrollHeight,\n behavior: 'smooth'\n });\n } catch (err) {\n element.scrollTop = element.scrollHeight;\n }\n });\n });\n }\n\n @Input() set visible(value: boolean) {\n if (this._visible !== value) {\n this._visible = value;\n this.visibleChange.emit(this._visible);\n\n if (this._visible) {\n this.shouldAutoScroll = true;\n setTimeout(() => this.scrollToBottom(true), 300);\n }\n }\n }\n\n get visible(): boolean {\n return this._visible;\n }\n\n private _visible: boolean = false;\n\n toggleComments() {\n this.visible = !this.visible;\n }\n\n onSidebarHide() {\n this._visible = false;\n this.visibleChange.emit(false);\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const isInputClick = this.inputText?.nativeElement?.contains(target);\n const isPanelClick = this.suggestionPanel?.nativeElement?.contains(target);\n\n if (!isInputClick && !isPanelClick) {\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n }\n }\n\n handleKeyUp(event: any): void {\n // Update cursor position on every key press\n const input = event.target;\n this.cursorPosition = input.selectionStart || 0;\n\n if (event.key === 'Escape') {\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n return;\n }\n\n if (event.key === '@' || event.key === '#') {\n this.currentTokenType = event.key === '@' ? 'mention' : 'hashtag';\n this.filteredSuggestions = this.currentTokenType === 'mention' ? this.mentionSuggestions : this.hashtagSuggestions;\n this.selectedSuggestionIndex = 0;\n\n const rect = input.getBoundingClientRect();\n const cursorPosition = this.getCursorPosition(input);\n\n this.overlayVisible = true;\n setTimeout(() => {\n const panel = this.suggestionPanel?.nativeElement;\n if (panel) {\n panel.style.left = `${rect.left + cursorPosition.left}px`;\n panel.style.top = `${rect.top - 10}px`;\n }\n });\n }\n\n if (this.currentTokenType) {\n const token = this.getTokenAtCursor(input.value, this.cursorPosition);\n if (token) {\n const searchTerm = token.slice(1).toLowerCase();\n this.filteredSuggestions = (this.currentTokenType === 'mention' ? this.mentionSuggestions : this.hashtagSuggestions).filter((item) => item.name.toLowerCase().includes(searchTerm) || item.id.toLowerCase().includes(searchTerm));\n\n if (this.filteredSuggestions.length > 0) {\n this.overlayVisible = true;\n // Only reset selection index if we have new suggestions\n if (this.selectedSuggestionIndex < 0 || this.selectedSuggestionIndex >= this.filteredSuggestions.length) {\n this.selectedSuggestionIndex = 0;\n }\n } else {\n this.overlayVisible = false;\n this.selectedSuggestionIndex = -1;\n }\n } else {\n this.overlayVisible = false;\n this.currentTokenType = null;\n }\n }\n }\n\n getTokenAtCursor(text: string, cursorPos: number): string | null {\n const beforeCursor = text.slice(0, cursorPos);\n const match = beforeCursor.match(/[@#][^\\s]*$/);\n return match ? match[0] : null;\n }\n\n getWordAtPosition(text: string, position: number): string {\n const left = text.slice(0, position).search(/[@#][^\\s]*$/);\n if (left === -1) return '';\n return text.slice(left, position);\n }\n\n selectSuggestion(suggestion: any) {\n const input = this.newComment;\n const wordStart = input.slice(0, this.cursorPosition).search(/[@#][^\\s]*$/);\n\n this.newComment = input.slice(0, wordStart) + suggestion.value + ' ' + input.slice(this.cursorPosition);\n\n this.isMentioning = false;\n this.isHashtagging = false;\n }\n\n onSuggestionSelect(item: any) {\n const input = this.newComment;\n const beforeCursor = input.slice(0, this.cursorPosition);\n const afterCursor = input.slice(this.cursorPosition);\n const lastTokenIndex = Math.max(beforeCursor.lastIndexOf('@'), beforeCursor.lastIndexOf('#'));\n\n if (lastTokenIndex >= 0) {\n // Insert the suggestion at the cursor position\n this.newComment = beforeCursor.slice(0, lastTokenIndex) + item.id + ' ' + afterCursor;\n }\n\n this.suggestionPanel.nativeElement.style.display = 'none';\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n this.selectedSuggestionIndex = -1;\n\n setTimeout(() => {\n const inputEl = this.inputText.nativeElement.querySelector('input');\n if (inputEl) {\n inputEl.focus();\n }\n });\n }\n\n onSuggestionPanelHide() {\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n this.selectedSuggestionIndex = -1;\n }\n\n getCursorPosition(input: HTMLInputElement): { left: number; top: number } {\n const selectionStart = input.selectionStart || 0;\n const textBeforeCursor = input.value.substring(0, selectionStart);\n const span = document.createElement('span');\n span.textContent = textBeforeCursor;\n span.style.cssText = window.getComputedStyle(input, null).cssText;\n span.style.visibility = 'hidden';\n document.body.appendChild(span);\n const position = {\n left: span.offsetWidth,\n top: span.offsetHeight\n };\n document.body.removeChild(span);\n return position;\n }\n\n onFileIconClick(event: Event): void {\n event?.preventDefault();\n event?.stopPropagation();\n if (this.fileInput?.nativeElement) {\n this.fileInput.nativeElement.click();\n }\n }\n\n onFileSelect(event: Event) {\n const input = event.target as HTMLInputElement;\n if (input.files && input.files.length > 0) {\n Array.from(input.files).forEach((file) => {\n // Check if file already exists in selection\n const fileExists = this.selectedFiles.some((existingFile) => existingFile.name === file.name && existingFile.size === this.formatFileSize(file.size));\n\n if (!fileExists) {\n const fileInfo = {\n name: file.name,\n size: this.formatFileSize(file.size)\n };\n this.selectedFiles.push(fileInfo);\n this.selectedFilesMap.set(this.selectedFiles.length - 1, fileInfo);\n this.fileSelected.emit(file);\n }\n });\n\n input.value = '';\n const inputEl = document.querySelector('.chat-input input');\n if (inputEl instanceof HTMLElement) {\n inputEl.focus();\n }\n }\n }\n\n private updateFileState(index: number, fromChip: boolean = true) {\n const actualIndex = fromChip ? index : index + 4;\n this.selectedFiles = this.selectedFiles.filter((_, i) => i !== actualIndex);\n this.selectedFilesMap.clear();\n this.selectedFiles.forEach((file, i) => {\n this.selectedFilesMap.set(i, file);\n });\n }\n\n removeFile(index: number, fromChip: boolean = true) {\n this.updateFileState(index, fromChip);\n if (this.selectedFiles.length <= 4) {\n this.hideFilesOverlay();\n }\n }\n\n getOverflowCount(): number {\n // Return count of files beyond the first 4\n return Math.max(0, this.selectedFiles.length - 4);\n }\n\n showFilesOverlay(event: MouseEvent) {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n\n // Position the overlay below the count chip\n this.overlayPosition = {\n top: rect.bottom + 5,\n left: rect.left - 250 + rect.width / 2 // Center the overlay horizontally\n };\n\n this.filesOverlayVisible = true;\n\n // Add a click outside listener to close the overlay\n setTimeout(() => {\n document.addEventListener('click', this.handleClickOutside);\n });\n }\n\n hideFilesOverlay() {\n this.filesOverlayVisible = false;\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n private handleClickOutside = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const overlay = document.querySelector('.files-overlay');\n const countChip = document.querySelector('.count-chip');\n\n if (overlay && !overlay.contains(target) && countChip && !countChip.contains(target)) {\n this.hideFilesOverlay();\n }\n };\n\n formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 Bytes';\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n\n showSuggestions(_event: any, type: 'mention' | 'hashtag') {\n this.currentTokenType = type;\n this.filteredSuggestions = type === 'mention' ? this.mentionSuggestions : this.hashtagSuggestions;\n if (this.suggestionPanel) {\n this.suggestionPanel.nativeElement.style.display = 'block';\n }\n }\n onKeyDown(event: KeyboardEvent) {\n // If suggestions are visible, handle keyboard navigation\n if (this.overlayVisible && this.filteredSuggestions.length > 0) {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.selectedSuggestionIndex = Math.min(this.selectedSuggestionIndex + 1, this.filteredSuggestions.length - 1);\n this.scrollSuggestionIntoView();\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.selectedSuggestionIndex = Math.max(this.selectedSuggestionIndex - 1, 0);\n this.scrollSuggestionIntoView();\n break;\n case 'Tab':\n event.preventDefault();\n if (event.shiftKey) {\n // Shift+Tab - move up\n this.selectedSuggestionIndex = Math.max(this.selectedSuggestionIndex - 1, 0);\n } else {\n // Tab - move down\n this.selectedSuggestionIndex = Math.min(this.selectedSuggestionIndex + 1, this.filteredSuggestions.length - 1);\n }\n this.scrollSuggestionIntoView();\n break;\n case 'Enter':\n event.preventDefault();\n if (this.selectedSuggestionIndex >= 0) {\n this.onSuggestionSelect(this.filteredSuggestions[this.selectedSuggestionIndex]);\n }\n break;\n case 'Escape':\n event.preventDefault();\n this.onSuggestionPanelHide();\n break;\n }\n return;\n }\n\n // If no suggestions are visible, handle normal enter key press\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n this.addComment();\n }\n }\n\n // Helper method to scroll the selected suggestion into view\n private scrollSuggestionIntoView(): void {\n setTimeout(() => {\n const suggestionList = this.suggestionPanel?.nativeElement.querySelector('.suggestion-list');\n const selectedItem = suggestionList?.querySelector('.suggestion-item.selected');\n\n if (suggestionList && selectedItem) {\n const listRect = suggestionList.getBoundingClientRect();\n const itemRect = selectedItem.getBoundingClientRect();\n\n // Check if the selected item is outside the visible area\n if (itemRect.bottom > listRect.bottom) {\n // Item is below the visible area\n selectedItem.scrollIntoView({ block: 'end', behavior: 'smooth' });\n } else if (itemRect.top < listRect.top) {\n // Item is above the visible area\n selectedItem.scrollIntoView({ block: 'start', behavior: 'smooth' });\n }\n }\n });\n }\n\n onFileDownload(file: { name: string; size: string }) {\n this.fileDownload.emit(file);\n }\n\n get groupedComments(): GroupedComments[] {\n return this.comments\n .reduce((groups: GroupedComments[], comment: Comment) => {\n const commentDate = new Date(comment.date);\n commentDate.setHours(0, 0, 0, 0);\n\n const existingGroup = groups.find((group) => {\n const groupDate = new Date(group.date);\n groupDate.setHours(0, 0, 0, 0);\n return groupDate.getTime() === commentDate.getTime();\n });\n\n if (existingGroup) {\n existingGroup.items.push(comment);\n } else {\n groups.push({\n date: commentDate,\n items: [comment]\n });\n }\n\n return groups;\n }, [])\n .sort((a, b) => a.date.getTime() - b.date.getTime());\n }\n\n getShortFileName(filename: string): string {\n if (filename.length <= 4) return filename;\n\n // Get file extension\n const lastDotIndex = filename.lastIndexOf('.');\n const extension = lastDotIndex !== -1 ? filename.substring(lastDotIndex) : '';\n\n // Truncate the name part and add the extension\n const namePart = filename.substring(0, lastDotIndex !== -1 ? lastDotIndex : filename.length);\n return namePart.substring(0, 4) + '..' + extension;\n }\n}\n","<cax-sidebar [(visible)]=\"visible\" [position]=\"'right'\" [baseZIndex]=\"10000\" (onHide)=\"onSidebarHide()\" [headerText]=\"sidebarHeader\">\r\n <ng-template caxTemplate=\"content\">\r\n <div class=\"cax-comments-container\">\r\n <div class=\"cax-comments-list\" #commentsList>\r\n <ng-container *ngFor=\"let group of groupedComments\">\r\n <div class=\"cax-date-header\">{{ formatDate(group.date) }}</div>\r\n <div\r\n class=\"cax-comment-item\"\r\n *ngFor=\"let comment of group.items; let i = index\"\r\n [ngClass]=\"{\r\n 'cax-user-comment': !comment.isAdmin,\r\n 'cax-admin-comment': comment.isAdmin,\r\n 'consecutive-message': i > 0 && comment.isAdmin === group.items[i-1].isAdmin && comment.sender === group.items[i-1].sender,\r\n 'new-sender': i > 0 && comment.sender !== group.items[i-1].sender,\r\n 'new-date': i === 0 && group.items.length > 0\r\n }\"\r\n >\r\n <!-- User Message (Left Aligned) -->\r\n <ng-container *ngIf=\"!comment.isAdmin\">\r\n <div class=\"cax-commentbox-avatar-container\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">\r\n <cax-avatar [label]=\"comment.sender?.substring(0, 2).toUpperCase() || 'U'\" [avatarSize]=\"'xs'\" [shape]=\"'circle'\" styleclass=\"cax-commentbox-avatar\"> </cax-avatar>\r\n </div>\r\n <div class=\"cax-comment-content\" [class.no-avatar]=\"i > 0 && group.items[i-1].sender === comment.sender\">\r\n <div class=\"cax-comment-sender\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">{{comment.sender}}</div>\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Admin Message (Right Aligned) -->\r\n <ng-container *ngIf=\"comment.isAdmin\">\r\n <div class=\"cax-comment-content admin\">\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <cax-overlay #suggestionPanel [(visible)]=\"overlayVisible\" [appendTo]=\"inputText\" (onHide)=\"onSuggestionPanelHide()\" [styleClass]=\"'suggestion-panel'\">\r\n <div class=\"suggestion-list\">\r\n <div *ngFor=\"let item of filteredSuggestions; let i = index\" class=\"suggestion-item\" [ngClass]=\"{'selected': selectedSuggestionIndex === i}\" (click)=\"onSuggestionSelect(item)\" (mouseenter)=\"selectedSuggestionIndex = i\">\r\n <span class=\"suggestion-label\">{{item.name}}</span>\r\n <small class=\"suggestion-id\" *ngIf=\"currentTokenType === 'mention'\">{{item.id}}</small>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n <cax-overlay\r\n [(visible)]=\"filesOverlayVisible\"\r\n [appendTo]=\"countChip\"\r\n [showTransitionOptions]=\"'0.12s ease-out'\"\r\n [hideTransitionOptions]=\"'0.1s ease-in'\"\r\n [style]=\"{ width: '224px', right: '5%' }\"\r\n styleClass=\"files-list-overlay\"\r\n (onHide)=\"hideFilesOverlay()\"\r\n >\r\n <div class=\"files-overlay-content\">\r\n <div *ngFor=\"let file of selectedFiles.slice(4); let i = index\" class=\"file-item\">\r\n <span class=\"file-name\">{{getShortFileName(file.name)}}</span>\r\n <i class=\"cax cax-close-circle\" (click)=\"removeFile(i + 4)\"></i>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n\r\n <ng-template caxTemplate=\"footer\">\r\n <div class=\"chat-footer\">\r\n <div class=\"selected-files\" *ngIf=\"selectedFiles.length > 0\">\r\n <cax-chip *ngFor=\"let file of selectedFiles.slice(0, 4); let i = index\" [label]=\"getShortFileName(file.name)\" [removable]=\"true\" [size]=\"'lg'\" (onRemove)=\"removeFile(i, true)\">\r\n <ng-template caxTemplate=\"content\">\r\n <i class=\"cax cax-paperclip\"></i>\r\n </ng-template>\r\n </cax-chip>\r\n <cax-chip #countChip *ngIf=\"selectedFiles.length > 4\" [label]=\"'+' + getOverflowCount()\" [size]=\"'lg'\" (mouseenter)=\"showFilesOverlay($event)\"> </cax-chip>\r\n </div>\r\n <div class=\"cax-chat-input-container\">\r\n <div class=\"input-wrapper\">\r\n <cax-inputtext\r\n [(ngModel)]=\"newComment\"\r\n [size]=\"'lg'\"\r\n [rightIcon]=\"true\"\r\n [clearIcon]=\"false\"\r\n [rightIconClass]=\"'cax cax-paperclip'\"\r\n [rightIconClickable]=\"true\"\r\n (rightIconClick)=\"onFileIconClick($event)\"\r\n placeholder=\"Comment or mention others with @, ‘#’ for columns\"\r\n (keyup)=\"handleKeyUp($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [class]=\"{'chat-input': true, 'admin-input': isAdminSender}\"\r\n [style]=\"{'border-radius': '8px', background: '#ffffff'}\"\r\n #inputText\r\n >\r\n </cax-inputtext>\r\n </div>\r\n\r\n <cax-button [icon]=\"'cax cax-plain'\" [severity]=\"'primary'\" [size]=\"'large'\" (click)=\"addComment()\" [disabled]=\"!newComment.trim() && selectedFiles.length === 0\" class=\"send-button\"> </cax-button>\r\n </div>\r\n\r\n <input #fileInput type=\"file\" (change)=\"onFileSelect($event)\" style=\"display: none\" accept=\"*/*\" multiple />\r\n </div>\r\n </ng-template>\r\n</cax-sidebar>\r\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { CommentboxComponent } from './commentbox';\nimport { InputTextModule } from 'cax-design-system/inputtext';\nimport { ButtonModule } from 'cax-design-system/button';\nimport { ChipModule } from 'cax-design-system/chip';\nimport { OverlayModule } from 'cax-design-system/overlay';\nimport { AvatarModule } from 'cax-design-system/avatar';\nimport { SharedModule } from 'cax-design-system/api';\nimport { RippleModule } from 'cax-design-system/ripple';\nimport { Sidebar } from 'cax-design-system/sidebar';\n\n@NgModule({\n declarations: [CommentboxComponent],\n imports: [CommonModule, FormsModule, Sidebar, InputTextModule, ButtonModule, ChipModule, OverlayModule, AvatarModule, RippleModule, SharedModule],\n exports: [CommentboxComponent]\n})\nexport class CommentboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\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mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHf,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGvI,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;oBACjJ,OAAO,EAAE,CAAC,mBAAmB,CAAC;AACjC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cax-design-system-commentbox.mjs","sources":["../../src/app/components/commentbox/commentbox.ts","../../src/app/components/commentbox/commentbox.html","../../src/app/components/commentbox/commentbox.module.ts","../../src/app/components/commentbox/cax-design-system-commentbox.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter, ViewChild, ElementRef, HostListener } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n// Add this interface at the top of the file\ninterface Comment {\n text: string;\n date: Date;\n files?: Array<{ name: string; size: string }>;\n isAdmin?: boolean;\n sender?: string;\n}\n\ninterface GroupedComments {\n date: Date;\n items: Comment[];\n}\n\n@Component({\n selector: 'cax-comments',\n templateUrl: './commentbox.html',\n styleUrls: ['./commentbox.scss']\n})\nexport class CommentboxComponent {\n @Input() comments: Comment[] = [];\n @Input() mentionSuggestions: any[] = [];\n @Input() hashtagSuggestions: any[] = [];\n @Input() sidebarHeader: string;\n @Input() isAdmin: boolean = true;\n @Output() commentAdded = new EventEmitter<any>();\n @Output() fileSelected = new EventEmitter<File>();\n @Output() fileDownload = new EventEmitter<{ name: string; size: string }>();\n @Output() visibleChange = new EventEmitter<boolean>();\n newComment: string = '';\n\n isMentioning: boolean = false;\n isHashtagging: boolean = false;\n suggestions: any[] = [];\n selectedSuggestion: any = null;\n selectedSuggestionIndex: number = -1;\n filteredSuggestions: any[] = [];\n currentTokenType: 'mention' | 'hashtag' | null = null;\n cursorPosition: number = 0;\n\n @ViewChild('fileInput') fileInput!: ElementRef<HTMLInputElement>;\n @ViewChild('suggestionPanel') suggestionPanel!: ElementRef;\n @ViewChild('inputText') inputText!: ElementRef;\n @ViewChild('commentsList') private commentsList!: ElementRef;\n @ViewChild('countChip') countChip!: ElementRef;\n selectedFiles: Array<{ name: string; size: string }> = [];\n selectedFilesMap: Map<number, { name: string; size: string }> = new Map();\n\n today: Date = new Date();\n\n overlayVisible: boolean = false;\n filesOverlayVisible: boolean = false;\n overlayPosition = { top: 0, left: 0 };\n\n private dateUpdateInterval: any;\n\n // Keep track of should auto scroll\n private shouldAutoScroll = true;\n private isUserScrolling = false;\n\n // Add new property for mutation observer\n private observer: MutationObserver;\n\n constructor(private sanitizer: DomSanitizer) {\n this.updateCurrentDate();\n this.dateUpdateInterval = setInterval(() => this.updateCurrentDate(), 60000);\n\n // Initialize observer\n this.observer = new MutationObserver(() => this.forceScrollToBottom());\n }\n\n ngAfterViewInit() {\n setTimeout(() => {\n this.forceScrollToBottom();\n }, 100);\n\n // Set up observer to auto-scroll when content changes\n if (this.commentsList?.nativeElement) {\n this.observer.observe(this.commentsList.nativeElement, {\n childList: true,\n subtree: true,\n characterData: true\n });\n }\n }\n\n ngOnDestroy() {\n if (this.dateUpdateInterval) {\n clearInterval(this.dateUpdateInterval);\n }\n // Disconnect the observer\n this.observer.disconnect();\n\n // Remove event listeners\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n private updateCurrentDate(): void {\n this.today = new Date();\n }\n\n formatDate(date: Date): string {\n return date.toLocaleDateString(undefined, {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone\n });\n }\n\n formatMessageWithTags(text: string): SafeHtml {\n if (!text) return '';\n const sanitizedText = text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');\n const htmlContent = sanitizedText.replace(/(@\\w+|#\\w+)/g, (match) => {\n if (match.startsWith('@')) {\n return `<span class=\"mention\" style=\"color: #0C4AF3; font-weight: 600;\">${match}</span>`;\n } else if (match.startsWith('#')) {\n return `<span class=\"hashtag\" style=\"color: #0C4AF3; font-weight: 600;\">${match}</span>`;\n }\n return match;\n });\n\n return this.sanitizer.bypassSecurityTrustHtml(htmlContent);\n }\n\n addComment() {\n if (this.newComment.trim() || this.selectedFiles.length > 0) {\n const newComment: Comment = {\n text: this.newComment,\n date: new Date(),\n files: this.selectedFiles.length > 0 ? [...this.selectedFiles] : undefined,\n isAdmin: this.isAdmin,\n sender: this.isAdmin ? 'System Admin' : 'User'\n };\n\n this.comments = [...this.comments, newComment];\n this.commentAdded.emit(newComment);\n this.newComment = '';\n this.selectedFiles = [];\n this.selectedFilesMap.clear();\n this.filesOverlayVisible = false;\n\n if (this.suggestionPanel?.nativeElement) {\n this.suggestionPanel.nativeElement.style.display = 'none';\n }\n\n // Always scroll to bottom immediately\n this.scrollToBottom(true);\n }\n }\n\n private forceScrollToBottom(): void {\n if (!this.commentsList?.nativeElement) return;\n\n const element = this.commentsList.nativeElement;\n requestAnimationFrame(() => {\n try {\n // Force immediate scroll\n element.scrollTop = element.scrollHeight;\n } catch (err) {\n console.error('Scroll error:', err);\n }\n });\n }\n\n private scrollToBottom(force = false): void {\n if (force) {\n this.forceScrollToBottom();\n return;\n }\n if (!this.commentsList?.nativeElement) return;\n\n const element = this.commentsList.nativeElement;\n\n // Use double RAF for reliable scrolling\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n try {\n // Force immediate scroll for new comments\n element.scrollTop = element.scrollHeight;\n\n // Use smooth scrolling after initial jump\n element.scrollTo({\n top: element.scrollHeight,\n behavior: 'smooth'\n });\n } catch (err) {\n element.scrollTop = element.scrollHeight;\n }\n });\n });\n }\n\n @Input() set visible(value: boolean) {\n if (this._visible !== value) {\n this._visible = value;\n this.visibleChange.emit(this._visible);\n\n if (this._visible) {\n this.shouldAutoScroll = true;\n setTimeout(() => this.scrollToBottom(true), 300);\n }\n }\n }\n\n get visible(): boolean {\n return this._visible;\n }\n\n private _visible: boolean = false;\n\n toggleComments() {\n this.visible = !this.visible;\n }\n\n onSidebarHide() {\n this._visible = false;\n this.visibleChange.emit(false);\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const isInputClick = this.inputText?.nativeElement?.contains(target);\n const isPanelClick = this.suggestionPanel?.nativeElement?.contains(target);\n\n if (!isInputClick && !isPanelClick) {\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n }\n }\n\n handleKeyUp(event: any): void {\n // Update cursor position on every key press\n const input = event.target;\n this.cursorPosition = input.selectionStart || 0;\n\n if (event.key === 'Escape') {\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n return;\n }\n\n if (event.key === '@' || event.key === '#') {\n this.currentTokenType = event.key === '@' ? 'mention' : 'hashtag';\n this.filteredSuggestions = this.currentTokenType === 'mention' ? this.mentionSuggestions : this.hashtagSuggestions;\n this.selectedSuggestionIndex = 0;\n\n const rect = input.getBoundingClientRect();\n const cursorPosition = this.getCursorPosition(input);\n\n this.overlayVisible = true;\n setTimeout(() => {\n const panel = this.suggestionPanel?.nativeElement;\n if (panel) {\n panel.style.left = `${rect.left + cursorPosition.left}px`;\n panel.style.top = `${rect.top - 10}px`;\n }\n });\n }\n\n if (this.currentTokenType) {\n const token = this.getTokenAtCursor(input.value, this.cursorPosition);\n if (token) {\n const searchTerm = token.slice(1).toLowerCase();\n this.filteredSuggestions = (this.currentTokenType === 'mention' ? this.mentionSuggestions : this.hashtagSuggestions).filter((item) => item.name.toLowerCase().includes(searchTerm) || item.id.toLowerCase().includes(searchTerm));\n\n if (this.filteredSuggestions.length > 0) {\n this.overlayVisible = true;\n // Only reset selection index if we have new suggestions\n if (this.selectedSuggestionIndex < 0 || this.selectedSuggestionIndex >= this.filteredSuggestions.length) {\n this.selectedSuggestionIndex = 0;\n }\n } else {\n this.overlayVisible = false;\n this.selectedSuggestionIndex = -1;\n }\n } else {\n this.overlayVisible = false;\n this.currentTokenType = null;\n }\n }\n }\n\n getTokenAtCursor(text: string, cursorPos: number): string | null {\n const beforeCursor = text.slice(0, cursorPos);\n const match = beforeCursor.match(/[@#][^\\s]*$/);\n return match ? match[0] : null;\n }\n\n getWordAtPosition(text: string, position: number): string {\n const left = text.slice(0, position).search(/[@#][^\\s]*$/);\n if (left === -1) return '';\n return text.slice(left, position);\n }\n\n selectSuggestion(suggestion: any) {\n const input = this.newComment;\n const wordStart = input.slice(0, this.cursorPosition).search(/[@#][^\\s]*$/);\n\n this.newComment = input.slice(0, wordStart) + suggestion.value + ' ' + input.slice(this.cursorPosition);\n\n this.isMentioning = false;\n this.isHashtagging = false;\n }\n\n onSuggestionSelect(item: any) {\n const input = this.newComment;\n const beforeCursor = input.slice(0, this.cursorPosition);\n const afterCursor = input.slice(this.cursorPosition);\n const lastTokenIndex = Math.max(beforeCursor.lastIndexOf('@'), beforeCursor.lastIndexOf('#'));\n\n if (lastTokenIndex >= 0) {\n // Insert the suggestion at the cursor position\n this.newComment = beforeCursor.slice(0, lastTokenIndex) + item.id + ' ' + afterCursor;\n }\n\n this.suggestionPanel.nativeElement.style.display = 'none';\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n this.selectedSuggestionIndex = -1;\n\n setTimeout(() => {\n const inputEl = this.inputText.nativeElement.querySelector('input');\n if (inputEl) {\n inputEl.focus();\n }\n });\n }\n\n onSuggestionPanelHide() {\n this.overlayVisible = false;\n this.currentTokenType = null;\n this.filteredSuggestions = [];\n this.selectedSuggestionIndex = -1;\n }\n\n getCursorPosition(input: HTMLInputElement): { left: number; top: number } {\n const selectionStart = input.selectionStart || 0;\n const textBeforeCursor = input.value.substring(0, selectionStart);\n const span = document.createElement('span');\n span.textContent = textBeforeCursor;\n span.style.cssText = window.getComputedStyle(input, null).cssText;\n span.style.visibility = 'hidden';\n document.body.appendChild(span);\n const position = {\n left: span.offsetWidth,\n top: span.offsetHeight\n };\n document.body.removeChild(span);\n return position;\n }\n\n onFileIconClick(event: Event): void {\n event?.preventDefault();\n event?.stopPropagation();\n if (this.fileInput?.nativeElement) {\n this.fileInput.nativeElement.click();\n }\n }\n\n onFileSelect(event: Event) {\n const input = event.target as HTMLInputElement;\n if (input.files && input.files.length > 0) {\n Array.from(input.files).forEach((file) => {\n // Check if file already exists in selection\n const fileExists = this.selectedFiles.some((existingFile) => existingFile.name === file.name && existingFile.size === this.formatFileSize(file.size));\n\n if (!fileExists) {\n const fileInfo = {\n name: file.name,\n size: this.formatFileSize(file.size)\n };\n this.selectedFiles.push(fileInfo);\n this.selectedFilesMap.set(this.selectedFiles.length - 1, fileInfo);\n this.fileSelected.emit(file);\n }\n });\n\n input.value = '';\n const inputEl = document.querySelector('.chat-input input');\n if (inputEl instanceof HTMLElement) {\n inputEl.focus();\n }\n }\n }\n\n private updateFileState(index: number, fromChip: boolean = true) {\n const actualIndex = fromChip ? index : index + 4;\n this.selectedFiles = this.selectedFiles.filter((_, i) => i !== actualIndex);\n this.selectedFilesMap.clear();\n this.selectedFiles.forEach((file, i) => {\n this.selectedFilesMap.set(i, file);\n });\n }\n\n removeFile(index: number, fromChip: boolean = true) {\n this.updateFileState(index, fromChip);\n if (this.selectedFiles.length <= 4) {\n this.hideFilesOverlay();\n }\n }\n\n getOverflowCount(): number {\n // Return count of files beyond the first 4\n return Math.max(0, this.selectedFiles.length - 4);\n }\n\n showFilesOverlay(event: MouseEvent) {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n\n // Position the overlay below the count chip\n this.overlayPosition = {\n top: rect.bottom + 5,\n left: rect.left - 250 + rect.width / 2 // Center the overlay horizontally\n };\n\n this.filesOverlayVisible = true;\n\n // Add a click outside listener to close the overlay\n setTimeout(() => {\n document.addEventListener('click', this.handleClickOutside);\n });\n }\n\n hideFilesOverlay() {\n this.filesOverlayVisible = false;\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n private handleClickOutside = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const overlay = document.querySelector('.files-overlay');\n const countChip = document.querySelector('.count-chip');\n\n if (overlay && !overlay.contains(target) && countChip && !countChip.contains(target)) {\n this.hideFilesOverlay();\n }\n };\n\n formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 Bytes';\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n\n showSuggestions(_event: any, type: 'mention' | 'hashtag') {\n this.currentTokenType = type;\n this.filteredSuggestions = type === 'mention' ? this.mentionSuggestions : this.hashtagSuggestions;\n if (this.suggestionPanel) {\n this.suggestionPanel.nativeElement.style.display = 'block';\n }\n }\n onKeyDown(event: KeyboardEvent) {\n // If suggestions are visible, handle keyboard navigation\n if (this.overlayVisible && this.filteredSuggestions.length > 0) {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.selectedSuggestionIndex = Math.min(this.selectedSuggestionIndex + 1, this.filteredSuggestions.length - 1);\n this.scrollSuggestionIntoView();\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.selectedSuggestionIndex = Math.max(this.selectedSuggestionIndex - 1, 0);\n this.scrollSuggestionIntoView();\n break;\n case 'Tab':\n event.preventDefault();\n if (event.shiftKey) {\n // Shift+Tab - move up\n this.selectedSuggestionIndex = Math.max(this.selectedSuggestionIndex - 1, 0);\n } else {\n // Tab - move down\n this.selectedSuggestionIndex = Math.min(this.selectedSuggestionIndex + 1, this.filteredSuggestions.length - 1);\n }\n this.scrollSuggestionIntoView();\n break;\n case 'Enter':\n event.preventDefault();\n if (this.selectedSuggestionIndex >= 0) {\n this.onSuggestionSelect(this.filteredSuggestions[this.selectedSuggestionIndex]);\n }\n break;\n case 'Escape':\n event.preventDefault();\n this.onSuggestionPanelHide();\n break;\n }\n return;\n }\n\n // If no suggestions are visible, handle normal enter key press\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n this.addComment();\n }\n }\n\n // Helper method to scroll the selected suggestion into view\n private scrollSuggestionIntoView(): void {\n setTimeout(() => {\n const suggestionList = this.suggestionPanel?.nativeElement.querySelector('.suggestion-list');\n const selectedItem = suggestionList?.querySelector('.suggestion-item.selected');\n\n if (suggestionList && selectedItem) {\n const listRect = suggestionList.getBoundingClientRect();\n const itemRect = selectedItem.getBoundingClientRect();\n\n // Check if the selected item is outside the visible area\n if (itemRect.bottom > listRect.bottom) {\n // Item is below the visible area\n selectedItem.scrollIntoView({ block: 'end', behavior: 'smooth' });\n } else if (itemRect.top < listRect.top) {\n // Item is above the visible area\n selectedItem.scrollIntoView({ block: 'start', behavior: 'smooth' });\n }\n }\n });\n }\n\n onFileDownload(file: { name: string; size: string }) {\n this.fileDownload.emit(file);\n }\n\n get groupedComments(): GroupedComments[] {\n return this.comments\n .reduce((groups: GroupedComments[], comment: Comment) => {\n const commentDate = new Date(comment.date);\n commentDate.setHours(0, 0, 0, 0);\n\n const existingGroup = groups.find((group) => {\n const groupDate = new Date(group.date);\n groupDate.setHours(0, 0, 0, 0);\n return groupDate.getTime() === commentDate.getTime();\n });\n\n if (existingGroup) {\n existingGroup.items.push(comment);\n } else {\n groups.push({\n date: commentDate,\n items: [comment]\n });\n }\n\n return groups;\n }, [])\n .sort((a, b) => a.date.getTime() - b.date.getTime());\n }\n\n getShortFileName(filename: string): string {\n if (filename.length <= 4) return filename;\n\n // Get file extension\n const lastDotIndex = filename.lastIndexOf('.');\n const extension = lastDotIndex !== -1 ? filename.substring(lastDotIndex) : '';\n\n // Truncate the name part and add the extension\n const namePart = filename.substring(0, lastDotIndex !== -1 ? lastDotIndex : filename.length);\n return namePart.substring(0, 4) + '..' + extension;\n }\n}\n","<cax-sidebar [(visible)]=\"visible\" [position]=\"'right'\" [baseZIndex]=\"10000\" (onHide)=\"onSidebarHide()\" [headerText]=\"sidebarHeader\">\r\n <ng-template caxTemplate=\"content\">\r\n <div class=\"cax-comments-container\">\r\n <div class=\"cax-comments-list\" #commentsList>\r\n <ng-container *ngFor=\"let group of groupedComments\">\r\n <div class=\"cax-date-header\">{{ formatDate(group.date) }}</div>\r\n <div\r\n class=\"cax-comment-item\"\r\n *ngFor=\"let comment of group.items; let i = index\"\r\n [ngClass]=\"{\r\n 'cax-user-comment': !comment.isAdmin,\r\n 'cax-admin-comment': comment.isAdmin,\r\n 'consecutive-message': i > 0 && comment.isAdmin === group.items[i-1].isAdmin && comment.sender === group.items[i-1].sender,\r\n 'new-sender': i > 0 && comment.sender !== group.items[i-1].sender,\r\n 'new-date': i === 0 && group.items.length > 0\r\n }\"\r\n >\r\n <!-- User Message (Left Aligned) -->\r\n <ng-container *ngIf=\"!comment.isAdmin\">\r\n <div class=\"cax-commentbox-avatar-container\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">\r\n <cax-avatar [label]=\"comment.sender?.substring(0, 2).toUpperCase() || 'U'\" [avatarSize]=\"'xs'\" [shape]=\"'circle'\" styleclass=\"cax-commentbox-avatar\"> </cax-avatar>\r\n </div>\r\n <div class=\"cax-comment-content\" [class.no-avatar]=\"i > 0 && group.items[i-1].sender === comment.sender\">\r\n <div class=\"cax-comment-sender\" *ngIf=\"i === 0 || group.items[i-1].sender !== comment.sender\">{{comment.sender}}</div>\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Admin Message (Right Aligned) -->\r\n <ng-container *ngIf=\"comment.isAdmin\">\r\n <div class=\"cax-comment-content admin\">\r\n <div class=\"cax-file-attachment\" *ngIf=\"comment.files?.length\">\r\n <div *ngFor=\"let file of comment.files\" class=\"file-item\">\r\n <div class=\"file-details\">\r\n <span class=\"file-name\">{{ file.name.slice(0, 20) }}{{ file.name.includes('.') ? '.' + file.name.split('.').pop() : '' }}</span>\r\n <span class=\"file-size\">{{file.size}}</span>\r\n </div>\r\n <i class=\"cax cax-download\" (click)=\"onFileDownload(file)\" role=\"button\" tabindex=\"0\"></i>\r\n </div>\r\n </div>\r\n <div class=\"cax-comment-text\" [innerHTML]=\"formatMessageWithTags(comment.text)\"></div>\r\n <span class=\"cax-comment-date\">{{ comment.date | date: 'shortTime' }}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <cax-overlay #suggestionPanel [(visible)]=\"overlayVisible\" [appendTo]=\"inputText\" (onHide)=\"onSuggestionPanelHide()\" [styleClass]=\"'suggestion-panel'\">\r\n <div class=\"suggestion-list\">\r\n <div *ngFor=\"let item of filteredSuggestions; let i = index\" class=\"suggestion-item\" [ngClass]=\"{'selected': selectedSuggestionIndex === i}\" (click)=\"onSuggestionSelect(item)\" (mouseenter)=\"selectedSuggestionIndex = i\">\r\n <span class=\"suggestion-label\">{{item.name}}</span>\r\n <small class=\"suggestion-id\" *ngIf=\"currentTokenType === 'mention'\">{{item.id}}</small>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n <cax-overlay\r\n [(visible)]=\"filesOverlayVisible\"\r\n [appendTo]=\"countChip\"\r\n [showTransitionOptions]=\"'0.12s ease-out'\"\r\n [hideTransitionOptions]=\"'0.1s ease-in'\"\r\n [style]=\"{ width: '224px', right: '5%' }\"\r\n styleClass=\"files-list-overlay\"\r\n (onHide)=\"hideFilesOverlay()\"\r\n >\r\n <div class=\"files-overlay-content\">\r\n <div *ngFor=\"let file of selectedFiles.slice(4); let i = index\" class=\"file-item\">\r\n <span class=\"file-name\">{{getShortFileName(file.name)}}</span>\r\n <i class=\"cax cax-close-circle\" (click)=\"removeFile(i + 4)\"></i>\r\n </div>\r\n </div>\r\n </cax-overlay>\r\n\r\n <ng-template caxTemplate=\"footer\">\r\n <div class=\"chat-footer\">\r\n <div class=\"selected-files\" *ngIf=\"selectedFiles.length > 0\">\r\n <cax-chip *ngFor=\"let file of selectedFiles.slice(0, 4); let i = index\" [label]=\"getShortFileName(file.name)\" [removable]=\"true\" [size]=\"'lg'\" (onRemove)=\"removeFile(i, true)\">\r\n <ng-template caxTemplate=\"content\">\r\n <i class=\"cax cax-paperclip\"></i>\r\n </ng-template>\r\n </cax-chip>\r\n <cax-chip #countChip *ngIf=\"selectedFiles.length > 4\" [label]=\"'+' + getOverflowCount()\" [size]=\"'lg'\" (mouseenter)=\"showFilesOverlay($event)\"> </cax-chip>\r\n </div>\r\n <div class=\"cax-chat-input-container\">\r\n <div class=\"input-wrapper\">\r\n <cax-inputtext\r\n [(ngModel)]=\"newComment\"\r\n [size]=\"'lg'\"\r\n [rightIcon]=\"true\"\r\n [clearIcon]=\"false\"\r\n [rightIconClass]=\"'cax cax-paperclip'\"\r\n [rightIconClickable]=\"true\"\r\n (rightIconClick)=\"onFileIconClick($event)\"\r\n placeholder=\"Comment or mention others with @, ‘#’ for columns\"\r\n (keyup)=\"handleKeyUp($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [class]=\"{'chat-input': true, 'admin-input': isAdminSender}\"\r\n [style]=\"{'border-radius': '8px', background: '#ffffff'}\"\r\n #inputText\r\n >\r\n </cax-inputtext>\r\n </div>\r\n\r\n <cax-button [icon]=\"'cax cax-plain'\" [severity]=\"'primary'\" [size]=\"'large'\" (click)=\"addComment()\" [disabled]=\"!newComment.trim() && selectedFiles.length === 0\" class=\"send-button\"> </cax-button>\r\n </div>\r\n\r\n <input #fileInput type=\"file\" (change)=\"onFileSelect($event)\" style=\"display: none\" accept=\"*/*\" multiple />\r\n </div>\r\n </ng-template>\r\n</cax-sidebar>\r\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { CommentboxComponent } from './commentbox';\nimport { InputTextModule } from 'cax-design-system/inputtext';\nimport { ButtonModule } from 'cax-design-system/button';\nimport { ChipModule } from 'cax-design-system/chip';\nimport { OverlayModule } from 'cax-design-system/overlay';\nimport { AvatarModule } from 'cax-design-system/avatar';\nimport { SharedModule } from 'cax-design-system/api';\nimport { RippleModule } from 'cax-design-system/ripple';\nimport { Sidebar } from 'cax-design-system/sidebar';\n\n@NgModule({\n declarations: [CommentboxComponent],\n imports: [CommonModule, FormsModule, Sidebar, InputTextModule, ButtonModule, ChipModule, OverlayModule, AvatarModule, RippleModule, SharedModule],\n exports: [CommentboxComponent]\n})\nexport class CommentboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAsBa,mBAAmB,CAAA;AA4CR,IAAA,SAAA,CAAA;IA3CX,QAAQ,GAAc,EAAE,CAAC;IACzB,kBAAkB,GAAU,EAAE,CAAC;IAC/B,kBAAkB,GAAU,EAAE,CAAC;AAC/B,IAAA,aAAa,CAAS;IACtB,OAAO,GAAY,IAAI,CAAC;AACvB,IAAA,YAAY,GAAG,IAAI,YAAY,EAAO,CAAC;AACvC,IAAA,YAAY,GAAG,IAAI,YAAY,EAAQ,C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