verben-workflow-ui 0.8.0 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/esm2022/public-api.mjs +3 -1
  2. package/esm2022/src/lib/components/file-render/excel-parser.util.mjs +239 -0
  3. package/esm2022/src/lib/components/file-render/file-preview.component.mjs +383 -0
  4. package/esm2022/src/lib/components/file-render/file-render.component.mjs +78 -10
  5. package/esm2022/src/lib/components/file-render/file-render.module.mjs +11 -7
  6. package/esm2022/src/lib/components/file-render/public-api.mjs +2 -1
  7. package/esm2022/src/lib/components/file-upload/file-upload.component.mjs +37 -3
  8. package/esm2022/src/lib/components/form-control/form-control.component.mjs +1 -1
  9. package/esm2022/src/lib/components/task-history/task-history.component.mjs +5 -4
  10. package/esm2022/src/lib/components/task-history/task-history.module.mjs +19 -4
  11. package/fesm2022/verben-workflow-ui-src-lib-components-file-render.mjs +703 -17
  12. package/fesm2022/verben-workflow-ui-src-lib-components-file-render.mjs.map +1 -1
  13. package/fesm2022/verben-workflow-ui-src-lib-components-file-upload.mjs +36 -2
  14. package/fesm2022/verben-workflow-ui-src-lib-components-file-upload.mjs.map +1 -1
  15. package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs +1 -1
  16. package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs.map +1 -1
  17. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs +22 -6
  18. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs.map +1 -1
  19. package/fesm2022/verben-workflow-ui.mjs +2 -0
  20. package/fesm2022/verben-workflow-ui.mjs.map +1 -1
  21. package/package.json +13 -13
  22. package/public-api.d.ts +2 -0
  23. package/src/lib/components/file-render/excel-parser.util.d.ts +12 -0
  24. package/src/lib/components/file-render/file-preview.component.d.ts +68 -0
  25. package/src/lib/components/file-render/file-render.component.d.ts +17 -4
  26. package/src/lib/components/file-render/file-render.module.d.ts +5 -4
  27. package/src/lib/components/file-render/public-api.d.ts +1 -0
  28. package/src/lib/components/file-upload/file-upload.component.d.ts +7 -1
  29. package/src/lib/components/task-history/task-history.module.d.ts +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"verben-workflow-ui-src-lib-components-task-history.mjs","sources":["../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.service.ts","../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.component.ts","../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.component.html","../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.module.ts","../../../projects/verben-workflow-ui/src/lib/components/task-history/verben-workflow-ui-src-lib-components-task-history.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ActionHistory } from 'verben-workflow-ui/src/lib/models';\nimport { EnvironmentService, HttpWebRequestService } from 'verben-workflow-ui/src/lib/services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TaskHistoryService {\n constructor(\n private httpService: HttpWebRequestService,\n private envSvc: EnvironmentService\n ) { }\n\n getTaskHistory(taskCode: string): Promise<any> {\n const url = `GetTaskHistory/${taskCode}`;\n return this.httpService.get(url) as Promise<ActionHistory[]>;\n }\n\n saveActionHistory(actionHistory: ActionHistory[]): Promise<any> {\n const url = `SaveActionHistories`;\n return this.httpService.post(url, actionHistory);\n }\n\n uploadFiles(files: any[]): Promise<any> {\n const url = `SaveFiles`;\n return this.httpService.post(\n url,\n files,\n this.envSvc.environment.FILE_BASE_URL\n );\n }\n}\n","import { Location } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n input,\n OnInit,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { EditorConfig, EditorMode } from 'verben-reporting-ui';\nimport {\n ActionHistory,\n ActionType,\n Actor,\n ErrorResponse,\n File as FileData,\n Form,\n ObjectState,\n OperationType,\n Paged,\n Workflow,\n WorkflowAction,\n} from 'verben-workflow-ui/src/lib/models';\nimport {\n EnvironmentService,\n HttpWebRequestService,\n resolveHistoryForm,\n UtilService,\n} from 'verben-workflow-ui/src/lib/services';\nimport { TaskHistoryService } from './task-history.service';\nimport { VerbenPopUpComponent } from 'verben-ng-ui';\n\n@Component({\n selector: 'lib-task-history',\n templateUrl: './task-history.component.html',\n styleUrl: './task-history.component.css',\n})\nexport class TaskHistoryComponent implements OnInit {\n taskCode = input.required<string>();\n operationType = OperationType;\n active: number = 0;\n showCommentBox: boolean = false;\n newComment: string = '';\n isRichEditor: boolean = false;\n editorMode: EditorMode = EditorMode.Designer;\n editorConfig: EditorConfig = {\n editable: true,\n height: '240px',\n width: '100%',\n showToolbar: true,\n menuItems: [],\n };\n selectedFiles: FileData[] = [];\n activeForm: Form | null = null;\n // ActionType = ActionType;\n isFormViewerVisible: boolean = false;\n private workflowActionsCache = new Map<string, WorkflowAction[]>();\n\n constructor(\n private _location: Location,\n private service: TaskHistoryService,\n private envSvc: EnvironmentService,\n private utilService: UtilService,\n private server: HttpWebRequestService,\n private sanitizer: DomSanitizer,\n private cdr: ChangeDetectorRef,\n ) {}\n // singleHistory: TimelineEvent[] = [\n // {\n // Date: '4:05 PM',\n // Operation: OperationType.Comment,\n // Details: {},\n // Actions: [\n // { Label: 'View Comments', Type: 'button', Action: 'viewComments' },\n // ],\n // },\n // {\n // Date: 'Yesterday',\n // Operation: OperationType.Comment,\n // Details: {},\n // Actions: [\n // { Label: 'View Comments', Type: 'button', Action: 'viewComments' },\n // ],\n // },\n // {\n // Date: 'Mar 2',\n // Operation: OperationType.Forms,\n // Details: {\n // FilledBy: 'Anonymous',\n // },\n // Actions: [{ Label: 'View Form', Type: 'button', Action: 'viewForm' }],\n // },\n // {\n // Date: 'Nov 4',\n // Operation: OperationType.Assignment,\n // Details: {\n // From: 'John Doe',\n // To: 'Jane Doe',\n // },\n // Actions: [],\n // },\n // {\n // Date: 'Nov 6',\n // Operation: OperationType.Comment,\n // Details: {},\n // Actions: [\n // { Label: 'View Comments', Type: 'button', Action: 'viewComments' },\n // ],\n // },\n // ];\n\n history: ActionHistory[] = [];\n activeFormattedComment: SafeHtml = '';\n activeDecodedComment: string = '';\n isActiveHtml: boolean = false;\n\n private formattedCommentCache = new Map<string, SafeHtml>();\n private decodedCommentCache = new Map<string, string>();\n private isHtmlCache = new Map<string, boolean>();\n\n ngOnInit(): void {\n this.service.getTaskHistory(this.taskCode()).then((res) => {\n this.history = res;\n this.updateActiveComment();\n });\n }\n\n goBack() {\n this._location.back();\n }\n\n setActive(i: number) {\n this.active = i;\n this.updateActiveComment();\n }\n\n updateActiveComment() {\n if (this.active >= 0 && this.history && this.history[this.active]) {\n const raw = this.history[this.active].Description;\n this.activeDecodedComment = this.decodeComment(raw);\n this.isActiveHtml = this.isHtml(raw);\n this.activeFormattedComment = this.isActiveHtml\n ? this.getFormattedComment(raw)\n : '';\n } else {\n this.activeDecodedComment = '';\n this.isActiveHtml = false;\n this.activeFormattedComment = '';\n }\n this.cdr.markForCheck();\n }\n\n getTagsFromActor(actor: Actor) {\n return actor.Tags.map((tag) => tag.Name).join(', ');\n }\n\n setEditorMode(rich: boolean) {\n if (this.isRichEditor === rich) return;\n this.isRichEditor = rich;\n this.newComment = '';\n }\n\n isCommentValid(): boolean {\n if (!this.newComment) return false;\n const stripped = this.newComment\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;/g, ' ')\n .trim();\n if (\n this.newComment.includes('<table') ||\n this.newComment.includes('<img')\n ) {\n return true;\n }\n return stripped.length > 0;\n }\n\n copyStatusText: string = 'Copy';\n\n decodeComment(content: string | null | undefined): string {\n if (!content) return '';\n const cached = this.decodedCommentCache.get(content);\n if (cached !== undefined) return cached;\n let result = content;\n try {\n while (/%[0-9A-Fa-f]{2}/.test(result)) {\n const decoded = decodeURIComponent(result);\n if (decoded === result) break;\n result = decoded;\n }\n } catch {\n try {\n result = result.replace(/%([0-9A-Fa-f]{2})/g, (_, hex) => {\n try {\n return decodeURIComponent('%' + hex);\n } catch {\n return '%' + hex;\n }\n });\n } catch {\n result = content;\n }\n }\n this.decodedCommentCache.set(content, result);\n return result;\n }\n\n isHtml(content: string | null | undefined): boolean {\n if (!content) return false;\n const cached = this.isHtmlCache.get(content);\n if (cached !== undefined) return cached;\n const decoded = this.decodeComment(content).trim();\n const res = /<\\s*(p|div|span|table|tr|td|th|tbody|thead|tfoot|strong|em|b|i|u|s|strike|ul|ol|li|h[1-6]|br|hr|img|a|blockquote|pre|code)(\\s+[^>]*)?>/i.test(\n decoded,\n );\n this.isHtmlCache.set(content, res);\n return res;\n }\n\n getFormattedComment(content: string | null | undefined): SafeHtml {\n if (!content) return '';\n const cached = this.formattedCommentCache.get(content);\n if (cached !== undefined) return cached;\n const decoded = this.decodeComment(content);\n const safe = this.sanitizer.bypassSecurityTrustHtml(decoded);\n this.formattedCommentCache.set(content, safe);\n return safe;\n }\n\n async copyCommentText(content: string | null | undefined) {\n if (!content) return;\n const decoded = this.decodeComment(content);\n const textToCopy = this.isHtml(decoded)\n ? decoded\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;/g, ' ')\n .trim()\n : decoded;\n\n try {\n if (navigator.clipboard && navigator.clipboard.writeText) {\n await navigator.clipboard.writeText(textToCopy);\n } else {\n const textarea = document.createElement('textarea');\n textarea.value = textToCopy;\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n }\n this.copyStatusText = 'Copied!';\n setTimeout(() => {\n this.copyStatusText = 'Copy';\n }, 2000);\n this.utilService.showSuccess('Comment copied to clipboard');\n } catch {\n this.utilService.showError('Could not copy comment');\n }\n }\n\n addComment() {\n this.showCommentBox = !this.showCommentBox;\n if (!this.showCommentBox) {\n this.newComment = '';\n this.isRichEditor = false;\n this.selectedFiles = [];\n }\n }\n\n async saveComment() {\n if (!this.isCommentValid() && this.selectedFiles.length === 0) {\n return;\n }\n\n let uploadedFiles: string[] = [];\n if (this.selectedFiles.length > 0) {\n try {\n this.utilService.sendBI(true);\n const res = await this.service.uploadFiles(this.selectedFiles);\n if (res) {\n uploadedFiles = res;\n }\n } catch (error) {\n this.utilService.sendBI(false);\n return;\n } finally {\n this.utilService.sendBI(false);\n }\n }\n\n const actionHistory = {\n TaskCode: this.taskCode() ?? '',\n Description: this.newComment,\n ActionType: ActionType.Comment,\n DataState: ObjectState.New,\n Files: uploadedFiles,\n // Actor: {\n // Id: this.selectedDetail.ActorId,\n // Name: this.selectedDetail.ActorName,\n // Tags: this.selectedDetail.Tags,\n // },\n Workflow: '',\n FromStage: '',\n ToStage: '',\n Code: '',\n TenantId: '',\n } as ActionHistory;\n\n this.service.saveActionHistory([actionHistory]).then(() => {\n this.newComment = '';\n this.isRichEditor = false;\n this.selectedFiles = [];\n this.showCommentBox = false;\n this.service.getTaskHistory(this.taskCode()).then((res) => {\n this.history = res;\n this.setActive(0);\n });\n });\n }\n\n onFileSelect(data: any): void {\n const files: any = data;\n\n if (!files || files.length === 0) return;\n\n const fileArray: FileData[] = [];\n const readers: Promise<void>[] = [];\n\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const reader = new FileReader();\n\n const promise = new Promise<void>((resolve, reject) => {\n reader.onload = () => {\n const base64 = reader.result as string;\n fileArray.push({\n Extension: file.name.split('.').pop(),\n Name: this.generateRandomCode(),\n Data: base64,\n DataState: ObjectState.New,\n });\n resolve();\n };\n\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(file);\n });\n\n readers.push(promise);\n }\n\n Promise.all(readers).then(() => {\n this.selectedFiles = fileArray;\n });\n }\n\n private generateRandomCode(length: number = 10): string {\n const chars =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return result;\n }\n\n getFileExtension(fileUrl: string): string {\n const parts = fileUrl.split('.');\n return parts[parts.length - 1].toLowerCase();\n }\n\n setPreview(val: string): string {\n if (!val) return '';\n const first = val.split(',')[0].trim();\n\n if (first.startsWith('http') || first.startsWith('data:')) {\n return first;\n }\n return `${this.envSvc.environment.FILE_URL}/${first}`;\n }\n\n showFromAndTo(actionType: ActionType): boolean {\n switch (actionType) {\n case ActionType.PassOn:\n case ActionType.PassBack:\n case ActionType.SkipForward:\n case ActionType.SkipBackward:\n return true;\n case ActionType.Comment:\n case ActionType.FormFilling:\n case ActionType.StatusChange:\n return false;\n }\n }\n\n getFileName(fileUrl: string): string {\n if (!fileUrl) return '';\n return fileUrl.split('/').pop() || '';\n }\n\n openFile(fileUrl: string) {\n if (!fileUrl) {\n return;\n }\n window.open(`${this.envSvc.environment.FILE_URL}${fileUrl}`, '_blank');\n // this.utilService.openFullRouteInNewWindow(\n // `${this.envSvc.environment.FILE_BASE_URL}${fileUrl}`\n // );\n }\n\n async loadFormIfExists(\n stage: string | undefined,\n historyItem?: ActionHistory,\n ) {\n if (!this.taskCode || !stage) {\n return;\n }\n this.utilService.sendBI(true);\n const res = await this.server.get(\n `GetCurrentFormsForTask/${this.taskCode()}/${stage}`,\n );\n this.utilService.sendBI(false);\n if (res instanceof ErrorResponse) {\n this.activeForm = null;\n this.utilService.showInfo('Could not load form for selected stage');\n return;\n }\n\n const result = (res as Form[]) || [];\n if (result.length > 0) {\n const workflowCode =\n historyItem?.Workflow || this.history?.[0]?.Workflow;\n const workflowActions = await this.getWorkflowActions(workflowCode);\n const resolvedForm = resolveHistoryForm(\n historyItem,\n stage,\n workflowActions,\n result,\n );\n if (resolvedForm) {\n this.activeForm = resolvedForm;\n this.isFormViewerVisible = true;\n } else {\n this.activeForm = null;\n }\n } else {\n this.activeForm = null;\n }\n this.cdr.markForCheck();\n }\n\n private async getWorkflowActions(\n workflowCode?: string,\n ): Promise<WorkflowAction[]> {\n if (!workflowCode) {\n return [];\n }\n const cached = this.workflowActionsCache.get(workflowCode);\n if (cached) {\n return cached;\n }\n const res = await this.server.get<Paged<Workflow>>(\n `GetWorkflowsWithParam/${workflowCode}/0/1/CreatedAt/Asc`,\n );\n if (!(res instanceof ErrorResponse)) {\n const actions = res?.Result?.[0]?.Actions || [];\n this.workflowActionsCache.set(workflowCode, actions);\n return actions;\n }\n return [];\n }\n\n onFormViewerOpen() {}\n\n onFormViewerClose() {\n this.isFormViewerVisible = false;\n this.activeForm = null;\n }\n}\n","<div class=\"bg-[var(--vbn-color-surface-alt)]\">\n <header\n class=\"mx-8 rounded-lg shadow-lg flex justify-between items-center px-6 py-2 bg-[#D4A00773]\"\n >\n <h4 class=\"font-semibold\">{{ taskCode() }}</h4>\n <div class=\"flex gap-4 items-center\">\n <verbena-button\n (click)=\"addComment()\"\n text=\"+ Add Comment\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n <verben-svg\n (click)=\"goBack()\"\n class=\"cursor-pointer\"\n [width]=\"17\"\n [height]=\"17\"\n [icon]=\"'go-back'\"\n ></verben-svg>\n </div>\n </header>\n <section class=\"grid grid-cols-12 gap-6 min-h-[calc(100vh-80px)]\">\n <div\n class=\"timeline-section bg-[var(--vbn-color-surface)] col-span-12 lg:col-span-5 px-3 sm:px-6 pt-8 relative\"\n >\n <div\n *ngIf=\"showCommentBox\"\n class=\"mb-6 p-4 sm:p-5 bg-white border border-gray-200 rounded-lg shadow-sm\"\n >\n <div class=\"flex items-center justify-between mb-3\">\n <h4 class=\"font-bold text-base text-gray-800\">Add Comment</h4>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setEditorMode(false)\"\n [ngClass]=\"\n !isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2.5 py-1 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setEditorMode(true)\"\n [ngClass]=\"\n isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2.5 py-1 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"newComment\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div *ngIf=\"isRichEditor\" class=\"workflow-comment-editor w-full\">\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"newComment\"\n ></lib-editor>\n </div>\n\n <div class=\"mt-4\">\n <file-upload\n (selectedFilesChange)=\"onFileSelect($event)\"\n [multiple]=\"true\"\n label=\"Attach Files\"\n >\n </file-upload>\n <div\n *ngIf=\"selectedFiles.length > 0\"\n class=\"flex flex-wrap gap-3 mt-3\"\n >\n <div *ngFor=\"let file of selectedFiles\">\n <ng-container [ngSwitch]=\"file.Extension\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"file.Data\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"file.Data\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"file.Data\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"file.Data\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"flex justify-end gap-2 mt-4 pt-2 border-t border-gray-100\">\n <verbena-button\n (click)=\"addComment()\"\n text=\"Cancel\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n (click)=\"saveComment()\"\n text=\"Save\"\n [disable]=\"!isCommentValid() && selectedFiles.length === 0\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n </div>\n <div class=\"timeline-list flex flex-col w-full\">\n <div\n *ngFor=\"let timeline of history; let i = index; let isLast = last; let isFirst = first\"\n class=\"timeline-row flex group relative\"\n >\n <!-- Left: Timestamp -->\n <div\n class=\"w-[75px] sm:w-[90px] flex-shrink-0 pt-1 text-right pr-3 cursor-pointer select-none\"\n (click)=\"setActive(i)\"\n >\n <span class=\"text-xs font-semibold text-gray-700 block leading-tight\">\n {{ timeline?.CreatedAt | date: 'mediumDate' }}\n </span>\n <span class=\"text-[11px] text-[var(--vbn-color-text-muted)] block font-mono mt-0.5\">\n {{ timeline?.CreatedAt | date: 'shortTime' }}\n </span>\n </div>\n\n <!-- Center: Timeline Rail (Connector line + Milestone Dot) -->\n <div class=\"flex flex-col items-center flex-shrink-0 w-5 self-stretch\">\n <!-- Top connector line -->\n <div\n class=\"w-0.5\"\n [ngClass]=\"isFirst ? 'h-2 bg-transparent' : 'h-2 bg-gray-200 group-hover:bg-gray-300'\"\n ></div>\n\n <!-- Milestone Dot -->\n <div\n (click)=\"setActive(i)\"\n class=\"w-3.5 h-3.5 rounded-full border-2 transition-all duration-200 cursor-pointer z-10 flex items-center justify-center flex-shrink-0\"\n [ngClass]=\"active === i\n ? 'bg-[var(--vbn-color-primary,#d4a007)] border-white shadow-sm ring-4 ring-amber-100 scale-110'\n : 'bg-white border-gray-300 group-hover:border-gray-400 group-hover:scale-105'\"\n [title]=\"timeline.ActionName || timeline.ActionType\"\n >\n <span *ngIf=\"active === i\" class=\"w-1 h-1 rounded-full bg-white block\"></span>\n </div>\n\n <!-- Bottom connector line that dynamically extends with card height -->\n <div\n *ngIf=\"!isLast\"\n class=\"w-0.5 flex-1 bg-gray-200 group-hover:bg-gray-300 min-h-[24px]\"\n ></div>\n </div>\n\n <!-- Right: Card -->\n <div class=\"flex-1 min-w-0 pl-3 pb-6\">\n <div\n class=\"w-full cursor-pointer p-4 rounded-lg border-l-4 transition-all duration-150\"\n [ngClass]=\"{\n 'bg-[#FEFAF1] border-l-[var(--vbn-color-primary)]': active === i,\n 'bg-transparent border-l-transparent hover:bg-[var(--vbn-color-surface-alt)]':\n active !== i\n }\"\n (click)=\"setActive(i)\"\n >\n <!-- ActionName as primary heading -->\n <h4 class=\"font-bold text-base text-[var(--vbn-color-text)] mb-2 leading-snug\">\n {{ timeline.ActionName || timeline.ActionType }}\n </h4>\n\n <!-- Actor information with tooltip -->\n <div class=\"mb-3\">\n <verben-tooltip\n [top]=\"'0px'\"\n [left]=\"'0px'\"\n [padding]=\"'0px'\"\n [backgroundColor]=\"'transparent'\"\n [border]=\"'none'\"\n [borderRadius]=\"'0px'\"\n [tooltipContent]=\"actorTooltipTemplate\"\n >\n <p\n class=\"text-sm text-[var(--vbn-color-text-muted)] cursor-help inline-flex items-center gap-2\"\n >\n <verben-svg\n [width]=\"14\"\n [height]=\"14\"\n [icon]=\"'user'\"\n stroke=\"var(--vbn-color-text-muted)\"\n ></verben-svg>\n <span class=\"font-medium text-[var(--vbn-color-text)]\">{{\n timeline?.Actor?.Name\n }}</span>\n </p>\n </verben-tooltip>\n\n <ng-template #actorTooltipTemplate>\n <div\n class=\"bg-white border border-[var(--vbn-color-border)] rounded-lg p-4 shadow-lg w-[280px]\"\n >\n <div class=\"flex gap-3 items-start\">\n <div\n class=\"w-[40px] h-[40px] rounded-full bg-gradient-to-r from-[#D9AEAE] via-[#E3C79F] to-[var(--vbn-color-primary)] flex-shrink-0\"\n ></div>\n <div class=\"flex-1 min-w-0\">\n <p\n class=\"font-bold text-sm text-[var(--vbn-color-text)] mb-1\"\n >\n {{ timeline?.Actor?.Name }}\n </p>\n <p\n class=\"text-xs text-[var(--vbn-color-text-muted)] break-words flex items-start gap-1\"\n >\n <verben-svg\n [width]=\"12\"\n [height]=\"12\"\n [icon]=\"'mail'\"\n stroke=\"var(--vbn-color-text-muted)\"\n ></verben-svg>\n <span>{{ timeline?.Actor?.Identifier }}</span>\n </p>\n <p\n *ngIf=\"\n timeline.Actor && getTagsFromActor(timeline.Actor)\n \"\n class=\"text-xs text-[var(--vbn-color-text-muted)] mt-2\"\n >\n <span class=\"font-medium\">Tags:</span>\n {{ getTagsFromActor(timeline.Actor) }}\n </p>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n\n <!-- Action Type (if different from ActionName) -->\n <p\n *ngIf=\"timeline.ActionName\"\n class=\"text-sm text-[var(--vbn-color-text-muted)] mb-2\"\n >\n <span class=\"font-medium\">Operation:</span>\n {{ timeline.ActionType }}\n </p>\n\n <!-- Stage information for transfer actions -->\n @if (showFromAndTo(timeline.ActionType)) {\n <div\n class=\"bg-[var(--vbn-color-surface-alt)] rounded-md p-3 mt-2 space-y-1.5\"\n >\n <p class=\"text-sm flex items-center gap-2\">\n <span class=\"text-[var(--vbn-color-text-muted)] font-medium\"\n >From:</span\n >\n <span\n class=\"text-[var(--vbn-color-border-focus)] font-mono text-xs\"\n >{{ timeline.FromStage }}</span\n >\n </p>\n <p class=\"text-sm flex items-center gap-2\">\n <span class=\"text-[var(--vbn-color-text-muted)] font-medium\"\n >To:</span\n >\n <span\n class=\"text-[var(--vbn-color-border-focus)] font-mono text-xs\"\n >{{ timeline.ToStage }}</span\n >\n </p>\n </div>\n }\n\n <!-- Action buttons -->\n <div class=\"flex gap-3 items-center mt-3 pt-2 border-t border-gray-100\">\n <button\n (click)=\"\n loadFormIfExists(timeline.FromStage, timeline);\n $event.stopPropagation()\n \"\n class=\"flex gap-2 items-center w-fit text-[var(--vbn-color-text-muted)] text-sm border px-3 py-1.5 rounded-lg bg-[var(--vbn-color-surface-alt)] border-[var(--vbn-color-border)] hover:bg-[var(--vbn-color-surface-alt)] hover:border-[var(--vbn-color-border)] transition-colors cursor-pointer\"\n >\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n [icon]=\"'chat'\"\n ></verben-svg>\n Load Stage Form\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"col-span-12 lg:col-span-7 pt-12 pr-6 lg:pr-10 pl-4 sticky top-4 self-start\"\n >\n <div\n *ngIf=\"\n active >= 0 && !!history && history.length > 0;\n else noActiveSelection\n \"\n class=\"w-full\"\n >\n <div class=\"flex items-center justify-between mb-3\">\n <div class=\"flex items-center gap-3\">\n <h1 class=\"font-bold text-lg text-gray-800\">Comments</h1>\n <button\n *ngIf=\"history[active]?.Description\"\n type=\"button\"\n (click)=\"copyCommentText(history[active].Description)\"\n class=\"text-xs px-2.5 py-1 rounded bg-gray-100 hover:bg-gray-200 text-gray-700 transition-colors cursor-pointer flex items-center gap-1.5 border border-gray-200 select-none\"\n title=\"Copy comment to clipboard\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect>\n <path\n d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"\n ></path>\n </svg>\n <span>{{ copyStatusText }}</span>\n </button>\n </div>\n <p class=\"text-xs text-[var(--vbn-color-text-muted)]\">\n {{ history[active].CreatedAt | date: \"medium\" }}\n </p>\n </div>\n\n <div\n class=\"comment-card bg-[var(--vbn-color-surface)] text-[var(--vbn-color-text)] leading-relaxed p-6 lg:p-8 shadow-md rounded-lg w-full border border-gray-100 select-text\"\n >\n <!-- Comment Description rendered presentably (HTML or plain text) -->\n <div\n *ngIf=\"isActiveHtml; else plainComment\"\n class=\"comment-html-content w-full overflow-x-auto\"\n [innerHTML]=\"activeFormattedComment\"\n ></div>\n <ng-template #plainComment>\n <p\n *ngIf=\"activeDecodedComment; else emptyComment\"\n class=\"whitespace-pre-wrap break-words text-sm leading-relaxed\"\n >\n {{ activeDecodedComment }}\n </p>\n <ng-template #emptyComment>\n <p\n class=\"text-xs italic text-[var(--vbn-color-text-muted)] py-4 text-center\"\n >\n No comment recorded for this action.\n </p>\n </ng-template>\n </ng-template>\n\n <div\n *ngIf=\"history[active]?.Files?.length\"\n class=\"mt-6 border-t border-gray-100 pt-4\"\n >\n <h5\n class=\"font-bold text-xs uppercase tracking-wider text-gray-500 mb-3\"\n >\n Attachments\n </h5>\n <div class=\"grid grid-cols-1 sm:grid-cols-2 gap-2\">\n <div\n *ngFor=\"let file of history[active]?.Files\"\n class=\"file-container p-2.5 flex items-center justify-between gap-3 border rounded-lg bg-gray-50/80 hover:bg-gray-100/80 transition-colors\"\n >\n <div\n class=\"text-xs font-medium truncate\"\n [title]=\"getFileName(file)\"\n >\n {{ getFileName(file) }}\n </div>\n <span\n (click)=\"openFile(file)\"\n class=\"cursor-pointer text-gray-500 hover:text-primary transition-colors flex-shrink-0\"\n title=\"Download\"\n >\n <verben-svg\n [icon]=\"'download-icon'\"\n [width]=\"18\"\n [height]=\"18\"\n ></verben-svg>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template #noActiveSelection>\n <div\n class=\"w-full pt-16 flex flex-col items-center justify-center text-center text-[var(--vbn-color-text-muted)]\"\n >\n <verben-svg\n [icon]=\"'chat'\"\n [width]=\"40\"\n [height]=\"40\"\n class=\"opacity-30 mb-3\"\n ></verben-svg>\n <p class=\"text-sm font-medium\">\n Select a stage from the timeline to view details\n </p>\n </div>\n </ng-template>\n </div>\n </section>\n</div>\n\n<app-form-viewer\n [form]=\"activeForm\"\n [isVisible]=\"isFormViewerVisible\"\n (onOpen)=\"onFormViewerOpen()\"\n (onClose)=\"onFormViewerClose()\"\n></app-form-viewer>\n","import { NgModule } from '@angular/core';\nimport { TooltipModule } from 'verben-ng-ui';\nimport { FileUploadModule } from 'verben-workflow-ui/src/lib/components/file-upload';\nimport { SharedModule } from 'verben-workflow-ui/src/lib/shared';\nimport { TaskHistoryComponent } from './task-history.component';\nimport { FormViewerLibModule } from 'verben-workflow-ui/src/lib/components/form-viewer';\n@NgModule({\n declarations: [TaskHistoryComponent],\n imports: [SharedModule, FileUploadModule, TooltipModule, FormViewerLibModule],\n exports: [TaskHistoryComponent],\n})\nexport class TaskHistoryModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.TaskHistoryService"],"mappings":";;;;;;;;;;;;;;;;;;MAOa,kBAAkB,CAAA;AAEnB,IAAA,WAAA,CAAA;AACA,IAAA,MAAA,CAAA;IAFV,WACU,CAAA,WAAkC,EAClC,MAA0B,EAAA;QAD1B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAuB;QAClC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoB;KAC/B;AAEL,IAAA,cAAc,CAAC,QAAgB,EAAA;AAC7B,QAAA,MAAM,GAAG,GAAG,CAAkB,eAAA,EAAA,QAAQ,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAA6B,CAAC;KAC9D;AAED,IAAA,iBAAiB,CAAC,aAA8B,EAAA;QAC9C,MAAM,GAAG,GAAG,CAAA,mBAAA,CAAqB,CAAC;QAClC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;KAClD;AAED,IAAA,WAAW,CAAC,KAAY,EAAA;QACtB,MAAM,GAAG,GAAG,CAAA,SAAA,CAAW,CAAC;AACxB,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAC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AA;;4FD/aa,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,SAAS;+BACE,kBAAkB,EAAA,QAAA,EAAA,i+kBAAA,EAAA,MAAA,EAAA,CAAA,42NAAA,CAAA,EAAA,CAAA;;;MEvBjB,iBAAiB,CAAA;wGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAjB,iBAAiB,EAAA,YAAA,EAAA,CAJb,oBAAoB,CAAA,EAAA,OAAA,EAAA,CACzB,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAClE,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAEnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHlB,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;4FAGjE,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,CAAC;oBAC7E,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"verben-workflow-ui-src-lib-components-task-history.mjs","sources":["../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.service.ts","../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.component.ts","../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.component.html","../../../projects/verben-workflow-ui/src/lib/components/task-history/task-history.module.ts","../../../projects/verben-workflow-ui/src/lib/components/task-history/verben-workflow-ui-src-lib-components-task-history.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { ActionHistory } from 'verben-workflow-ui/src/lib/models';\nimport { EnvironmentService, HttpWebRequestService } from 'verben-workflow-ui/src/lib/services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TaskHistoryService {\n constructor(\n private httpService: HttpWebRequestService,\n private envSvc: EnvironmentService\n ) { }\n\n getTaskHistory(taskCode: string): Promise<any> {\n const url = `GetTaskHistory/${taskCode}`;\n return this.httpService.get(url) as Promise<ActionHistory[]>;\n }\n\n saveActionHistory(actionHistory: ActionHistory[]): Promise<any> {\n const url = `SaveActionHistories`;\n return this.httpService.post(url, actionHistory);\n }\n\n uploadFiles(files: any[]): Promise<any> {\n const url = `SaveFiles`;\n return this.httpService.post(\n url,\n files,\n this.envSvc.environment.FILE_BASE_URL\n );\n }\n}\n","import { Location } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n input,\n OnInit,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { EditorConfig, EditorMode } from 'verben-reporting-ui';\nimport {\n ActionHistory,\n ActionType,\n Actor,\n ErrorResponse,\n File as FileData,\n Form,\n ObjectState,\n OperationType,\n Paged,\n Workflow,\n WorkflowAction,\n} from 'verben-workflow-ui/src/lib/models';\nimport {\n EnvironmentService,\n HttpWebRequestService,\n resolveHistoryForm,\n UtilService,\n} from 'verben-workflow-ui/src/lib/services';\nimport { TaskHistoryService } from './task-history.service';\nimport { VerbenPopUpComponent } from 'verben-ng-ui';\n\n@Component({\n selector: 'lib-task-history',\n templateUrl: './task-history.component.html',\n styleUrl: './task-history.component.css',\n})\nexport class TaskHistoryComponent implements OnInit {\n taskCode = input.required<string>();\n operationType = OperationType;\n active: number = 0;\n showCommentBox: boolean = false;\n newComment: string = '';\n isRichEditor: boolean = false;\n editorMode: EditorMode = EditorMode.Designer;\n editorConfig: EditorConfig = {\n editable: true,\n height: '240px',\n width: '100%',\n showToolbar: true,\n menuItems: [],\n };\n selectedFiles: FileData[] = [];\n activeForm: Form | null = null;\n // ActionType = ActionType;\n isFormViewerVisible: boolean = false;\n private workflowActionsCache = new Map<string, WorkflowAction[]>();\n\n constructor(\n private _location: Location,\n private service: TaskHistoryService,\n private envSvc: EnvironmentService,\n private utilService: UtilService,\n private server: HttpWebRequestService,\n private sanitizer: DomSanitizer,\n private cdr: ChangeDetectorRef,\n ) {}\n // singleHistory: TimelineEvent[] = [\n // {\n // Date: '4:05 PM',\n // Operation: OperationType.Comment,\n // Details: {},\n // Actions: [\n // { Label: 'View Comments', Type: 'button', Action: 'viewComments' },\n // ],\n // },\n // {\n // Date: 'Yesterday',\n // Operation: OperationType.Comment,\n // Details: {},\n // Actions: [\n // { Label: 'View Comments', Type: 'button', Action: 'viewComments' },\n // ],\n // },\n // {\n // Date: 'Mar 2',\n // Operation: OperationType.Forms,\n // Details: {\n // FilledBy: 'Anonymous',\n // },\n // Actions: [{ Label: 'View Form', Type: 'button', Action: 'viewForm' }],\n // },\n // {\n // Date: 'Nov 4',\n // Operation: OperationType.Assignment,\n // Details: {\n // From: 'John Doe',\n // To: 'Jane Doe',\n // },\n // Actions: [],\n // },\n // {\n // Date: 'Nov 6',\n // Operation: OperationType.Comment,\n // Details: {},\n // Actions: [\n // { Label: 'View Comments', Type: 'button', Action: 'viewComments' },\n // ],\n // },\n // ];\n\n history: ActionHistory[] = [];\n activeFormattedComment: SafeHtml = '';\n activeDecodedComment: string = '';\n isActiveHtml: boolean = false;\n\n private formattedCommentCache = new Map<string, SafeHtml>();\n private decodedCommentCache = new Map<string, string>();\n private isHtmlCache = new Map<string, boolean>();\n\n ngOnInit(): void {\n this.service.getTaskHistory(this.taskCode()).then((res) => {\n this.history = res;\n this.updateActiveComment();\n });\n }\n\n goBack() {\n this._location.back();\n }\n\n setActive(i: number) {\n this.active = i;\n this.updateActiveComment();\n }\n\n updateActiveComment() {\n if (this.active >= 0 && this.history && this.history[this.active]) {\n const raw = this.history[this.active].Description;\n this.activeDecodedComment = this.decodeComment(raw);\n this.isActiveHtml = this.isHtml(raw);\n this.activeFormattedComment = this.isActiveHtml\n ? this.getFormattedComment(raw)\n : '';\n } else {\n this.activeDecodedComment = '';\n this.isActiveHtml = false;\n this.activeFormattedComment = '';\n }\n this.cdr.markForCheck();\n }\n\n getTagsFromActor(actor: Actor) {\n return actor.Tags.map((tag) => tag.Name).join(', ');\n }\n\n setEditorMode(rich: boolean) {\n if (this.isRichEditor === rich) return;\n this.isRichEditor = rich;\n this.newComment = '';\n }\n\n isCommentValid(): boolean {\n if (!this.newComment) return false;\n const stripped = this.newComment\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;/g, ' ')\n .trim();\n if (\n this.newComment.includes('<table') ||\n this.newComment.includes('<img')\n ) {\n return true;\n }\n return stripped.length > 0;\n }\n\n copyStatusText: string = 'Copy';\n\n decodeComment(content: string | null | undefined): string {\n if (!content) return '';\n const cached = this.decodedCommentCache.get(content);\n if (cached !== undefined) return cached;\n let result = content;\n try {\n while (/%[0-9A-Fa-f]{2}/.test(result)) {\n const decoded = decodeURIComponent(result);\n if (decoded === result) break;\n result = decoded;\n }\n } catch {\n try {\n result = result.replace(/%([0-9A-Fa-f]{2})/g, (_, hex) => {\n try {\n return decodeURIComponent('%' + hex);\n } catch {\n return '%' + hex;\n }\n });\n } catch {\n result = content;\n }\n }\n this.decodedCommentCache.set(content, result);\n return result;\n }\n\n isHtml(content: string | null | undefined): boolean {\n if (!content) return false;\n const cached = this.isHtmlCache.get(content);\n if (cached !== undefined) return cached;\n const decoded = this.decodeComment(content).trim();\n const res = /<\\s*(p|div|span|table|tr|td|th|tbody|thead|tfoot|strong|em|b|i|u|s|strike|ul|ol|li|h[1-6]|br|hr|img|a|blockquote|pre|code)(\\s+[^>]*)?>/i.test(\n decoded,\n );\n this.isHtmlCache.set(content, res);\n return res;\n }\n\n getFormattedComment(content: string | null | undefined): SafeHtml {\n if (!content) return '';\n const cached = this.formattedCommentCache.get(content);\n if (cached !== undefined) return cached;\n const decoded = this.decodeComment(content);\n const safe = this.sanitizer.bypassSecurityTrustHtml(decoded);\n this.formattedCommentCache.set(content, safe);\n return safe;\n }\n\n async copyCommentText(content: string | null | undefined) {\n if (!content) return;\n const decoded = this.decodeComment(content);\n const textToCopy = this.isHtml(decoded)\n ? decoded\n .replace(/<[^>]*>/g, '')\n .replace(/&nbsp;/g, ' ')\n .trim()\n : decoded;\n\n try {\n if (navigator.clipboard && navigator.clipboard.writeText) {\n await navigator.clipboard.writeText(textToCopy);\n } else {\n const textarea = document.createElement('textarea');\n textarea.value = textToCopy;\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n }\n this.copyStatusText = 'Copied!';\n setTimeout(() => {\n this.copyStatusText = 'Copy';\n }, 2000);\n this.utilService.showSuccess('Comment copied to clipboard');\n } catch {\n this.utilService.showError('Could not copy comment');\n }\n }\n\n addComment() {\n this.showCommentBox = !this.showCommentBox;\n if (!this.showCommentBox) {\n this.newComment = '';\n this.isRichEditor = false;\n this.selectedFiles = [];\n }\n }\n\n async saveComment() {\n if (!this.isCommentValid() && this.selectedFiles.length === 0) {\n return;\n }\n\n let uploadedFiles: string[] = [];\n if (this.selectedFiles.length > 0) {\n try {\n this.utilService.sendBI(true);\n const res = await this.service.uploadFiles(this.selectedFiles);\n if (res) {\n uploadedFiles = res;\n }\n } catch (error) {\n this.utilService.sendBI(false);\n return;\n } finally {\n this.utilService.sendBI(false);\n }\n }\n\n const actionHistory = {\n TaskCode: this.taskCode() ?? '',\n Description: this.newComment,\n ActionType: ActionType.Comment,\n DataState: ObjectState.New,\n Files: uploadedFiles,\n // Actor: {\n // Id: this.selectedDetail.ActorId,\n // Name: this.selectedDetail.ActorName,\n // Tags: this.selectedDetail.Tags,\n // },\n Workflow: '',\n FromStage: '',\n ToStage: '',\n Code: '',\n TenantId: '',\n } as ActionHistory;\n\n this.service.saveActionHistory([actionHistory]).then(() => {\n this.newComment = '';\n this.isRichEditor = false;\n this.selectedFiles = [];\n this.showCommentBox = false;\n this.service.getTaskHistory(this.taskCode()).then((res) => {\n this.history = res;\n this.setActive(0);\n });\n });\n }\n\n onFileSelect(data: any): void {\n const files: any = data;\n\n if (!files || files.length === 0) return;\n\n const fileArray: FileData[] = [];\n const readers: Promise<void>[] = [];\n\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const reader = new FileReader();\n\n const promise = new Promise<void>((resolve, reject) => {\n reader.onload = () => {\n const base64 = reader.result as string;\n fileArray.push({\n Extension: file.name.split('.').pop(),\n Name: this.generateRandomCode(),\n Data: base64,\n DataState: ObjectState.New,\n });\n resolve();\n };\n\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(file);\n });\n\n readers.push(promise);\n }\n\n Promise.all(readers).then(() => {\n this.selectedFiles = fileArray;\n });\n }\n\n private generateRandomCode(length: number = 10): string {\n const chars =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return result;\n }\n\n getFileExtension(fileUrl: string): string {\n const parts = fileUrl.split('.');\n return parts[parts.length - 1].toLowerCase();\n }\n\n setPreview(val: string): string {\n if (!val) return '';\n const first = val.split(',')[0].trim();\n\n if (first.startsWith('http') || first.startsWith('data:')) {\n return first;\n }\n return `${this.envSvc.environment.FILE_URL}/${first}`;\n }\n\n showFromAndTo(actionType: ActionType): boolean {\n switch (actionType) {\n case ActionType.PassOn:\n case ActionType.PassBack:\n case ActionType.SkipForward:\n case ActionType.SkipBackward:\n return true;\n case ActionType.Comment:\n case ActionType.FormFilling:\n case ActionType.StatusChange:\n return false;\n }\n }\n\n getFileName(fileUrl: string): string {\n if (!fileUrl) return '';\n return fileUrl.split('/').pop() || '';\n }\n\n openFile(fileUrl: string) {\n if (!fileUrl) {\n return;\n }\n window.open(`${this.envSvc.environment.FILE_URL}${fileUrl}`, '_blank');\n // this.utilService.openFullRouteInNewWindow(\n // `${this.envSvc.environment.FILE_BASE_URL}${fileUrl}`\n // );\n }\n\n async loadFormIfExists(\n stage: string | undefined,\n historyItem?: ActionHistory,\n ) {\n if (!this.taskCode || !stage) {\n return;\n }\n this.utilService.sendBI(true);\n const res = await this.server.get(\n `GetCurrentFormsForTask/${this.taskCode()}/${stage}`,\n );\n this.utilService.sendBI(false);\n if (res instanceof ErrorResponse) {\n this.activeForm = null;\n this.utilService.showInfo('Could not load form for selected stage');\n return;\n }\n\n const result = (res as Form[]) || [];\n if (result.length > 0) {\n const workflowCode =\n historyItem?.Workflow || this.history?.[0]?.Workflow;\n const workflowActions = await this.getWorkflowActions(workflowCode);\n const resolvedForm = resolveHistoryForm(\n historyItem,\n stage,\n workflowActions,\n result,\n );\n if (resolvedForm) {\n this.activeForm = resolvedForm;\n this.isFormViewerVisible = true;\n } else {\n this.activeForm = null;\n }\n } else {\n this.activeForm = null;\n }\n this.cdr.markForCheck();\n }\n\n private async getWorkflowActions(\n workflowCode?: string,\n ): Promise<WorkflowAction[]> {\n if (!workflowCode) {\n return [];\n }\n const cached = this.workflowActionsCache.get(workflowCode);\n if (cached) {\n return cached;\n }\n const res = await this.server.get<Paged<Workflow>>(\n `GetWorkflowsWithParam/${workflowCode}/0/1/CreatedAt/Asc`,\n );\n if (!(res instanceof ErrorResponse)) {\n const actions = res?.Result?.[0]?.Actions || [];\n this.workflowActionsCache.set(workflowCode, actions);\n return actions;\n }\n return [];\n }\n\n onFormViewerOpen() {}\n\n onFormViewerClose() {\n this.isFormViewerVisible = false;\n this.activeForm = null;\n }\n}\n","<div class=\"bg-[var(--vbn-color-surface-alt)]\">\n <header\n class=\"mx-8 rounded-lg shadow-lg flex justify-between items-center px-6 py-2 bg-[#D4A00773]\"\n >\n <h4 class=\"font-semibold\">{{ taskCode() }}</h4>\n <div class=\"flex gap-4 items-center\">\n <verbena-button\n (click)=\"addComment()\"\n text=\"+ Add Comment\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n <verben-svg\n (click)=\"goBack()\"\n class=\"cursor-pointer\"\n [width]=\"17\"\n [height]=\"17\"\n [icon]=\"'go-back'\"\n ></verben-svg>\n </div>\n </header>\n <section class=\"grid grid-cols-12 gap-6 min-h-[calc(100vh-80px)]\">\n <div\n class=\"timeline-section bg-[var(--vbn-color-surface)] col-span-12 lg:col-span-5 px-3 sm:px-6 pt-8 relative\"\n >\n <div\n *ngIf=\"showCommentBox\"\n class=\"mb-6 p-4 sm:p-5 bg-white border border-gray-200 rounded-lg shadow-sm\"\n >\n <div class=\"flex items-center justify-between mb-3\">\n <h4 class=\"font-bold text-base text-gray-800\">Add Comment</h4>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setEditorMode(false)\"\n [ngClass]=\"\n !isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2.5 py-1 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setEditorMode(true)\"\n [ngClass]=\"\n isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2.5 py-1 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"newComment\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div *ngIf=\"isRichEditor\" class=\"workflow-comment-editor w-full\">\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"newComment\"\n ></lib-editor>\n </div>\n\n <div class=\"mt-4\">\n <file-upload\n (selectedFilesChange)=\"onFileSelect($event)\"\n [multiple]=\"true\"\n label=\"Attach Files\"\n >\n </file-upload>\n <div\n *ngIf=\"selectedFiles.length > 0\"\n class=\"flex flex-wrap gap-3 mt-3\"\n >\n <div *ngFor=\"let file of selectedFiles\">\n <ng-container [ngSwitch]=\"file.Extension\">\n <img\n *ngSwitchCase=\"'jpg'\"\n [src]=\"file.Data\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <img\n *ngSwitchCase=\"'png'\"\n [src]=\"file.Data\"\n class=\"w-[100px] h-[100px] object-cover rounded-md border\"\n />\n <video\n *ngSwitchCase=\"'mp4'\"\n [src]=\"file.Data\"\n class=\"w-[150px] rounded-md shadow\"\n controls\n ></video>\n <audio\n *ngSwitchCase=\"'mp3'\"\n [src]=\"file.Data\"\n controls\n class=\"w-[150px]\"\n ></audio>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"flex justify-end gap-2 mt-4 pt-2 border-t border-gray-100\">\n <verbena-button\n (click)=\"addComment()\"\n text=\"Cancel\"\n styleType=\"ylw-outline\"\n ></verbena-button>\n <verbena-button\n (click)=\"saveComment()\"\n text=\"Save\"\n [disable]=\"!isCommentValid() && selectedFiles.length === 0\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n ></verbena-button>\n </div>\n </div>\n <div class=\"timeline-list flex flex-col w-full\">\n <div\n *ngFor=\"let timeline of history; let i = index; let isLast = last; let isFirst = first\"\n class=\"timeline-row flex group relative\"\n >\n <!-- Left: Timestamp -->\n <div\n class=\"w-[75px] sm:w-[90px] flex-shrink-0 pt-1 text-right pr-3 cursor-pointer select-none\"\n (click)=\"setActive(i)\"\n >\n <span class=\"text-xs font-semibold text-gray-700 block leading-tight\">\n {{ timeline?.CreatedAt | date: 'mediumDate' }}\n </span>\n <span class=\"text-[11px] text-[var(--vbn-color-text-muted)] block font-mono mt-0.5\">\n {{ timeline?.CreatedAt | date: 'shortTime' }}\n </span>\n </div>\n\n <!-- Center: Timeline Rail (Connector line + Milestone Dot) -->\n <div class=\"flex flex-col items-center flex-shrink-0 w-5 self-stretch\">\n <!-- Top connector line -->\n <div\n class=\"w-0.5\"\n [ngClass]=\"isFirst ? 'h-2 bg-transparent' : 'h-2 bg-gray-200 group-hover:bg-gray-300'\"\n ></div>\n\n <!-- Milestone Dot -->\n <div\n (click)=\"setActive(i)\"\n class=\"w-3.5 h-3.5 rounded-full border-2 transition-all duration-200 cursor-pointer z-10 flex items-center justify-center flex-shrink-0\"\n [ngClass]=\"active === i\n ? 'bg-[var(--vbn-color-primary,#d4a007)] border-white shadow-sm ring-4 ring-amber-100 scale-110'\n : 'bg-white border-gray-300 group-hover:border-gray-400 group-hover:scale-105'\"\n [title]=\"timeline.ActionName || timeline.ActionType\"\n >\n <span *ngIf=\"active === i\" class=\"w-1 h-1 rounded-full bg-white block\"></span>\n </div>\n\n <!-- Bottom connector line that dynamically extends with card height -->\n <div\n *ngIf=\"!isLast\"\n class=\"w-0.5 flex-1 bg-gray-200 group-hover:bg-gray-300 min-h-[24px]\"\n ></div>\n </div>\n\n <!-- Right: Card -->\n <div class=\"flex-1 min-w-0 pl-3 pb-6\">\n <div\n class=\"w-full cursor-pointer p-4 rounded-lg border-l-4 transition-all duration-150\"\n [ngClass]=\"{\n 'bg-[#FEFAF1] border-l-[var(--vbn-color-primary)]': active === i,\n 'bg-transparent border-l-transparent hover:bg-[var(--vbn-color-surface-alt)]':\n active !== i\n }\"\n (click)=\"setActive(i)\"\n >\n <!-- ActionName as primary heading -->\n <h4 class=\"font-bold text-base text-[var(--vbn-color-text)] mb-2 leading-snug\">\n {{ timeline.ActionName || timeline.ActionType }}\n </h4>\n\n <!-- Actor information with tooltip -->\n <div class=\"mb-3\">\n <verben-tooltip\n [top]=\"'0px'\"\n [left]=\"'0px'\"\n [padding]=\"'0px'\"\n [backgroundColor]=\"'transparent'\"\n [border]=\"'none'\"\n [borderRadius]=\"'0px'\"\n [tooltipContent]=\"actorTooltipTemplate\"\n >\n <p\n class=\"text-sm text-[var(--vbn-color-text-muted)] cursor-help inline-flex items-center gap-2\"\n >\n <verben-svg\n [width]=\"14\"\n [height]=\"14\"\n [icon]=\"'user'\"\n stroke=\"var(--vbn-color-text-muted)\"\n ></verben-svg>\n <span class=\"font-medium text-[var(--vbn-color-text)]\">{{\n timeline?.Actor?.Name\n }}</span>\n </p>\n </verben-tooltip>\n\n <ng-template #actorTooltipTemplate>\n <div\n class=\"bg-white border border-[var(--vbn-color-border)] rounded-lg p-4 shadow-lg w-[280px]\"\n >\n <div class=\"flex gap-3 items-start\">\n <div\n class=\"w-[40px] h-[40px] rounded-full bg-gradient-to-r from-[#D9AEAE] via-[#E3C79F] to-[var(--vbn-color-primary)] flex-shrink-0\"\n ></div>\n <div class=\"flex-1 min-w-0\">\n <p\n class=\"font-bold text-sm text-[var(--vbn-color-text)] mb-1\"\n >\n {{ timeline?.Actor?.Name }}\n </p>\n <p\n class=\"text-xs text-[var(--vbn-color-text-muted)] break-words flex items-start gap-1\"\n >\n <verben-svg\n [width]=\"12\"\n [height]=\"12\"\n [icon]=\"'mail'\"\n stroke=\"var(--vbn-color-text-muted)\"\n ></verben-svg>\n <span>{{ timeline?.Actor?.Identifier }}</span>\n </p>\n <p\n *ngIf=\"\n timeline.Actor && getTagsFromActor(timeline.Actor)\n \"\n class=\"text-xs text-[var(--vbn-color-text-muted)] mt-2\"\n >\n <span class=\"font-medium\">Tags:</span>\n {{ getTagsFromActor(timeline.Actor) }}\n </p>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n\n <!-- Action Type (if different from ActionName) -->\n <p\n *ngIf=\"timeline.ActionName\"\n class=\"text-sm text-[var(--vbn-color-text-muted)] mb-2\"\n >\n <span class=\"font-medium\">Operation:</span>\n {{ timeline.ActionType }}\n </p>\n\n <!-- Stage information for transfer actions -->\n @if (showFromAndTo(timeline.ActionType)) {\n <div\n class=\"bg-[var(--vbn-color-surface-alt)] rounded-md p-3 mt-2 space-y-1.5\"\n >\n <p class=\"text-sm flex items-center gap-2\">\n <span class=\"text-[var(--vbn-color-text-muted)] font-medium\"\n >From:</span\n >\n <span\n class=\"text-[var(--vbn-color-border-focus)] font-mono text-xs\"\n >{{ timeline.FromStage }}</span\n >\n </p>\n <p class=\"text-sm flex items-center gap-2\">\n <span class=\"text-[var(--vbn-color-text-muted)] font-medium\"\n >To:</span\n >\n <span\n class=\"text-[var(--vbn-color-border-focus)] font-mono text-xs\"\n >{{ timeline.ToStage }}</span\n >\n </p>\n </div>\n }\n\n <!-- Action buttons -->\n <div class=\"flex gap-3 items-center mt-3 pt-2 border-t border-gray-100\">\n <button\n (click)=\"\n loadFormIfExists(timeline.FromStage, timeline);\n $event.stopPropagation()\n \"\n class=\"flex gap-2 items-center w-fit text-[var(--vbn-color-text-muted)] text-sm border px-3 py-1.5 rounded-lg bg-[var(--vbn-color-surface-alt)] border-[var(--vbn-color-border)] hover:bg-[var(--vbn-color-surface-alt)] hover:border-[var(--vbn-color-border)] transition-colors cursor-pointer\"\n >\n <verben-svg\n [width]=\"15\"\n [height]=\"15\"\n [icon]=\"'chat'\"\n ></verben-svg>\n Load Stage Form\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"col-span-12 lg:col-span-7 pt-12 pr-6 lg:pr-10 pl-4 sticky top-4 self-start\"\n >\n <div\n *ngIf=\"\n active >= 0 && !!history && history.length > 0;\n else noActiveSelection\n \"\n class=\"w-full\"\n >\n <div class=\"flex items-center justify-between mb-3\">\n <div class=\"flex items-center gap-3\">\n <h1 class=\"font-bold text-lg text-gray-800\">Comments</h1>\n <button\n *ngIf=\"history[active]?.Description\"\n type=\"button\"\n (click)=\"copyCommentText(history[active].Description)\"\n class=\"text-xs px-2.5 py-1 rounded bg-gray-100 hover:bg-gray-200 text-gray-700 transition-colors cursor-pointer flex items-center gap-1.5 border border-gray-200 select-none\"\n title=\"Copy comment to clipboard\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect>\n <path\n d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"\n ></path>\n </svg>\n <span>{{ copyStatusText }}</span>\n </button>\n </div>\n <p class=\"text-xs text-[var(--vbn-color-text-muted)]\">\n {{ history[active].CreatedAt | date: \"medium\" }}\n </p>\n </div>\n\n <div\n class=\"comment-card bg-[var(--vbn-color-surface)] text-[var(--vbn-color-text)] leading-relaxed p-6 lg:p-8 shadow-md rounded-lg w-full border border-gray-100 select-text\"\n >\n <!-- Comment Description rendered presentably (HTML or plain text) -->\n <div\n *ngIf=\"isActiveHtml; else plainComment\"\n class=\"comment-html-content w-full overflow-x-auto\"\n [innerHTML]=\"activeFormattedComment\"\n ></div>\n <ng-template #plainComment>\n <p\n *ngIf=\"activeDecodedComment; else emptyComment\"\n class=\"whitespace-pre-wrap break-words text-sm leading-relaxed\"\n >\n {{ activeDecodedComment }}\n </p>\n <ng-template #emptyComment>\n <p\n class=\"text-xs italic text-[var(--vbn-color-text-muted)] py-4 text-center\"\n >\n No comment recorded for this action.\n </p>\n </ng-template>\n </ng-template>\n\n <div\n *ngIf=\"history[active]?.Files?.length\"\n class=\"mt-6 border-t border-gray-100 pt-4\"\n >\n <h5\n class=\"font-bold text-xs uppercase tracking-wider text-gray-500 mb-3\"\n >\n Attachments\n </h5>\n <div class=\"grid grid-cols-1 sm:grid-cols-2 gap-2\">\n <verben-file-render\n *ngFor=\"let file of history[active]?.Files\"\n [fileUrl]=\"file\"\n ></verben-file-render>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template #noActiveSelection>\n <div\n class=\"w-full pt-16 flex flex-col items-center justify-center text-center text-[var(--vbn-color-text-muted)]\"\n >\n <verben-svg\n [icon]=\"'chat'\"\n [width]=\"40\"\n [height]=\"40\"\n class=\"opacity-30 mb-3\"\n ></verben-svg>\n <p class=\"text-sm font-medium\">\n Select a stage from the timeline to view details\n </p>\n </div>\n </ng-template>\n </div>\n </section>\n</div>\n\n<app-form-viewer\n [form]=\"activeForm\"\n [isVisible]=\"isFormViewerVisible\"\n (onOpen)=\"onFormViewerOpen()\"\n (onClose)=\"onFormViewerClose()\"\n></app-form-viewer>\n","import { NgModule } from '@angular/core';\nimport { TooltipModule } from 'verben-ng-ui';\nimport { FileUploadModule } from 'verben-workflow-ui/src/lib/components/file-upload';\nimport { FileRenderModule } from 'verben-workflow-ui/src/lib/components/file-render';\nimport { SharedModule } from 'verben-workflow-ui/src/lib/shared';\nimport { TaskHistoryComponent } from './task-history.component';\nimport { FormViewerLibModule } from 'verben-workflow-ui/src/lib/components/form-viewer';\n@NgModule({\n declarations: [TaskHistoryComponent],\n imports: [\n SharedModule,\n FileUploadModule,\n FileRenderModule,\n TooltipModule,\n FormViewerLibModule,\n ],\n exports: [TaskHistoryComponent],\n})\nexport class TaskHistoryModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.TaskHistoryService"],"mappings":";;;;;;;;;;;;;;;;;;;;MAOa,kBAAkB,CAAA;AAEnB,IAAA,WAAA,CAAA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B,EAAA,YAAA,EAAA,CAVb,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEjC,YAAY;YACZ,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;AACb,YAAA,mBAAmB,aAEX,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAEnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAR1B,YAAY;YACZ,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,mBAAmB,CAAA,EAAA,CAAA,CAAA;;4FAIV,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAX7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,mBAAmB;AACpB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
@@ -21,6 +21,8 @@ export * from 'verben-workflow-ui/src/lib/components/actors';
21
21
  export * from 'verben-workflow-ui/src/lib/components/flowable-status';
22
22
  export * from 'verben-workflow-ui/src/lib/components/form-viewer';
23
23
  export * from 'verben-workflow-ui/src/lib/components/workflow-stage';
24
+ export * from 'verben-workflow-ui/src/lib/components/file-render';
25
+ export * from 'verben-workflow-ui/src/lib/components/file-upload';
24
26
 
25
27
  /*
26
28
  * Public API Surface of verben-ng-ui
@@ -1 +1 @@
1
- {"version":3,"file":"verben-workflow-ui.mjs","sources":["../../../projects/verben-workflow-ui/src/public-api.ts","../../../projects/verben-workflow-ui/src/verben-workflow-ui.ts"],"sourcesContent":["/*\n * Public API Surface of verben-ng-ui\n */\n\n// export * from './lib/verben-ng-ui.service';\n// export * from './lib/verben-ng-ui.component';\n\n// Exporting modules\n\nexport * from 'verben-workflow-ui/src/lib/services';\n\nexport * from 'verben-workflow-ui/src/lib/models';\n\nexport * from 'verben-workflow-ui/src/lib/shared';\n\nexport * from 'verben-workflow-ui/src/lib/components/tasks';\n\nexport * from 'verben-workflow-ui/src/lib/components/my-queue';\n\nexport * from 'verben-workflow-ui/src/lib/components/workflow';\nexport * from 'verben-workflow-ui/src/lib/components/workflows';\n\nexport * from 'verben-workflow-ui/src/lib/components/wf';\n\nexport * from 'verben-workflow-ui/src/lib/components/workflow-designer';\n\nexport * from 'verben-workflow-ui/src/lib/components/designer';\n\n//task history\nexport * from 'verben-workflow-ui/src/lib/components/task-history';\n//forms\nexport * from 'verben-workflow-ui/src/lib/components/forms';\n//form group\nexport * from 'verben-workflow-ui/src/lib/components/form-group';\n//form response\nexport * from 'verben-workflow-ui/src/lib/components/form-response';\n//form values\nexport * from 'verben-workflow-ui/src/lib/components/form-values';\n//stage details\nexport * from 'verben-workflow-ui/src/lib/components/stage-details';\n//expiration\nexport * from 'verben-workflow-ui/src/lib/components/expiration';\n\n//journal\nexport * from 'verben-workflow-ui/src/lib/components/journal';\n\nexport * from 'verben-workflow-ui/src/lib/components/task-notification';\n\n//actors\nexport * from 'verben-workflow-ui/src/lib/components/actors';\n// export * from 'verben-workflow-ui/src/lib/components/actors-v2';\n// export * from 'verben-workflow-ui/src/lib/components/actors-v3';\n// export * from 'verben-workflow-ui/src/lib/components/actors-readonly';\n\n//flowable-status\nexport * from 'verben-workflow-ui/src/lib/components/flowable-status';\nexport * from 'verben-workflow-ui/src/lib/components/form-viewer';\nexport * from 'verben-workflow-ui/src/lib/components/workflow-stage';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;AAEH;AACA;AAEA;;ACPA;;AAEG"}
1
+ {"version":3,"file":"verben-workflow-ui.mjs","sources":["../../../projects/verben-workflow-ui/src/public-api.ts","../../../projects/verben-workflow-ui/src/verben-workflow-ui.ts"],"sourcesContent":["/*\n * Public API Surface of verben-ng-ui\n */\n\n// export * from './lib/verben-ng-ui.service';\n// export * from './lib/verben-ng-ui.component';\n\n// Exporting modules\n\nexport * from 'verben-workflow-ui/src/lib/services';\n\nexport * from 'verben-workflow-ui/src/lib/models';\n\nexport * from 'verben-workflow-ui/src/lib/shared';\n\nexport * from 'verben-workflow-ui/src/lib/components/tasks';\n\nexport * from 'verben-workflow-ui/src/lib/components/my-queue';\n\nexport * from 'verben-workflow-ui/src/lib/components/workflow';\nexport * from 'verben-workflow-ui/src/lib/components/workflows';\n\nexport * from 'verben-workflow-ui/src/lib/components/wf';\n\nexport * from 'verben-workflow-ui/src/lib/components/workflow-designer';\n\nexport * from 'verben-workflow-ui/src/lib/components/designer';\n\n//task history\nexport * from 'verben-workflow-ui/src/lib/components/task-history';\n//forms\nexport * from 'verben-workflow-ui/src/lib/components/forms';\n//form group\nexport * from 'verben-workflow-ui/src/lib/components/form-group';\n//form response\nexport * from 'verben-workflow-ui/src/lib/components/form-response';\n//form values\nexport * from 'verben-workflow-ui/src/lib/components/form-values';\n//stage details\nexport * from 'verben-workflow-ui/src/lib/components/stage-details';\n//expiration\nexport * from 'verben-workflow-ui/src/lib/components/expiration';\n\n//journal\nexport * from 'verben-workflow-ui/src/lib/components/journal';\n\nexport * from 'verben-workflow-ui/src/lib/components/task-notification';\n\n//actors\nexport * from 'verben-workflow-ui/src/lib/components/actors';\n// export * from 'verben-workflow-ui/src/lib/components/actors-v2';\n// export * from 'verben-workflow-ui/src/lib/components/actors-v3';\n// export * from 'verben-workflow-ui/src/lib/components/actors-readonly';\n\n//flowable-status\nexport * from 'verben-workflow-ui/src/lib/components/flowable-status';\nexport * from 'verben-workflow-ui/src/lib/components/form-viewer';\nexport * from 'verben-workflow-ui/src/lib/components/workflow-stage';\nexport * from 'verben-workflow-ui/src/lib/components/file-render';\nexport * from 'verben-workflow-ui/src/lib/components/file-upload';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG;AAEH;AACA;AAEA;;ACPA;;AAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verben-workflow-ui",
3
- "version": "0.8.0",
3
+ "version": "0.8.3",
4
4
  "style": "styles/styles.css",
5
5
  "exports": {
6
6
  "./styles": {
@@ -81,6 +81,18 @@
81
81
  "esm": "./esm2022/src/lib/components/flowable-status/verben-workflow-ui-src-lib-components-flowable-status.mjs",
82
82
  "default": "./fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs"
83
83
  },
84
+ "./src/lib/components/form-group": {
85
+ "types": "./src/lib/components/form-group/index.d.ts",
86
+ "esm2022": "./esm2022/src/lib/components/form-group/verben-workflow-ui-src-lib-components-form-group.mjs",
87
+ "esm": "./esm2022/src/lib/components/form-group/verben-workflow-ui-src-lib-components-form-group.mjs",
88
+ "default": "./fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs"
89
+ },
90
+ "./src/lib/components/form-response": {
91
+ "types": "./src/lib/components/form-response/index.d.ts",
92
+ "esm2022": "./esm2022/src/lib/components/form-response/verben-workflow-ui-src-lib-components-form-response.mjs",
93
+ "esm": "./esm2022/src/lib/components/form-response/verben-workflow-ui-src-lib-components-form-response.mjs",
94
+ "default": "./fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs"
95
+ },
84
96
  "./src/lib/components/form-control": {
85
97
  "types": "./src/lib/components/form-control/index.d.ts",
86
98
  "esm2022": "./esm2022/src/lib/components/form-control/verben-workflow-ui-src-lib-components-form-control.mjs",
@@ -93,24 +105,12 @@
93
105
  "esm": "./esm2022/src/lib/components/form-timer/verben-workflow-ui-src-lib-components-form-timer.mjs",
94
106
  "default": "./fesm2022/verben-workflow-ui-src-lib-components-form-timer.mjs"
95
107
  },
96
- "./src/lib/components/form-response": {
97
- "types": "./src/lib/components/form-response/index.d.ts",
98
- "esm2022": "./esm2022/src/lib/components/form-response/verben-workflow-ui-src-lib-components-form-response.mjs",
99
- "esm": "./esm2022/src/lib/components/form-response/verben-workflow-ui-src-lib-components-form-response.mjs",
100
- "default": "./fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs"
101
- },
102
108
  "./src/lib/components/form-values": {
103
109
  "types": "./src/lib/components/form-values/index.d.ts",
104
110
  "esm2022": "./esm2022/src/lib/components/form-values/verben-workflow-ui-src-lib-components-form-values.mjs",
105
111
  "esm": "./esm2022/src/lib/components/form-values/verben-workflow-ui-src-lib-components-form-values.mjs",
106
112
  "default": "./fesm2022/verben-workflow-ui-src-lib-components-form-values.mjs"
107
113
  },
108
- "./src/lib/components/form-group": {
109
- "types": "./src/lib/components/form-group/index.d.ts",
110
- "esm2022": "./esm2022/src/lib/components/form-group/verben-workflow-ui-src-lib-components-form-group.mjs",
111
- "esm": "./esm2022/src/lib/components/form-group/verben-workflow-ui-src-lib-components-form-group.mjs",
112
- "default": "./fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs"
113
- },
114
114
  "./src/lib/components/form-viewer": {
115
115
  "types": "./src/lib/components/form-viewer/index.d.ts",
116
116
  "esm2022": "./esm2022/src/lib/components/form-viewer/verben-workflow-ui-src-lib-components-form-viewer.mjs",
package/public-api.d.ts CHANGED
@@ -21,3 +21,5 @@ export * from 'verben-workflow-ui/src/lib/components/actors';
21
21
  export * from 'verben-workflow-ui/src/lib/components/flowable-status';
22
22
  export * from 'verben-workflow-ui/src/lib/components/form-viewer';
23
23
  export * from 'verben-workflow-ui/src/lib/components/workflow-stage';
24
+ export * from 'verben-workflow-ui/src/lib/components/file-render';
25
+ export * from 'verben-workflow-ui/src/lib/components/file-upload';
@@ -0,0 +1,12 @@
1
+ export interface ParsedSheet {
2
+ name: string;
3
+ rows: string[][];
4
+ }
5
+ /**
6
+ * Parses CSV or TSV text into a single-sheet table using RFC-4180 quoting rules.
7
+ */
8
+ export declare function parseDelimitedText(text: string, delimiter?: string, sheetName?: string): ParsedSheet[];
9
+ /**
10
+ * Parses an OOXML `.xlsx` ArrayBuffer into worksheets without external dependencies.
11
+ */
12
+ export declare function parseXlsxBuffer(buffer: ArrayBuffer): Promise<ParsedSheet[]>;
@@ -0,0 +1,68 @@
1
+ import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
3
+ import { EnvironmentService } from 'verben-workflow-ui/src/lib/services';
4
+ import { ParsedSheet } from './excel-parser.util';
5
+ import * as i0 from "@angular/core";
6
+ export type PreviewKind = 'image' | 'excel' | 'pdf' | 'text' | 'unsupported';
7
+ export declare class FilePreviewComponent implements OnChanges, OnDestroy {
8
+ private envService;
9
+ private sanitizer;
10
+ isVisible: boolean;
11
+ file: File | null;
12
+ files: File[];
13
+ initialIndex: number;
14
+ fileUrl: string | null;
15
+ fileName: string | null;
16
+ confirmMode: boolean;
17
+ confirmText: string;
18
+ closed: EventEmitter<void>;
19
+ confirmed: EventEmitter<void>;
20
+ openExternal: EventEmitter<void>;
21
+ activeIndex: number;
22
+ isLoading: boolean;
23
+ errorMessage: string | null;
24
+ previewKind: PreviewKind;
25
+ resolvedName: string;
26
+ fileSizeLabel: string;
27
+ extensionLabel: string;
28
+ imageSrc: string | null;
29
+ safePdfUrl: SafeResourceUrl | null;
30
+ textContent: string;
31
+ sheets: ParsedSheet[];
32
+ activeSheetIndex: number;
33
+ imageZoom: number;
34
+ private objectUrl;
35
+ private lastLoadedKey;
36
+ constructor(envService: EnvironmentService, sanitizer: DomSanitizer);
37
+ ngOnChanges(changes: SimpleChanges): void;
38
+ private computeTargetKey;
39
+ private isRealFile;
40
+ get currentEntry(): any;
41
+ get currentFile(): File | null;
42
+ get currentSavedPath(): string | null;
43
+ get hasMultipleFiles(): boolean;
44
+ selectFile(index: number): void;
45
+ prevFile(): void;
46
+ nextFile(): void;
47
+ ngOnDestroy(): void;
48
+ get activeSheet(): ParsedSheet | null;
49
+ get isSavedFile(): boolean;
50
+ get canOpenExternal(): boolean;
51
+ close(): void;
52
+ confirm(): void;
53
+ onModalClose(): void;
54
+ openInNewTab(): void;
55
+ zoomIn(): void;
56
+ zoomOut(): void;
57
+ resetZoom(): void;
58
+ selectSheet(index: number): void;
59
+ private loadPreview;
60
+ private readAsArrayBuffer;
61
+ private resolveTargetUrl;
62
+ private revokeObjectUrl;
63
+ private getExtension;
64
+ private detectKind;
65
+ private formatBytes;
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilePreviewComponent, never>;
67
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilePreviewComponent, "verben-file-preview", never, { "isVisible": { "alias": "isVisible"; "required": false; }; "file": { "alias": "file"; "required": false; }; "files": { "alias": "files"; "required": false; }; "initialIndex": { "alias": "initialIndex"; "required": false; }; "fileUrl": { "alias": "fileUrl"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "confirmMode": { "alias": "confirmMode"; "required": false; }; "confirmText": { "alias": "confirmText"; "required": false; }; }, { "closed": "closed"; "confirmed": "confirmed"; "openExternal": "openExternal"; }, never, never, false, never>;
68
+ }
@@ -1,17 +1,30 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { EnvironmentService } from 'verben-workflow-ui/src/lib/services';
3
3
  import * as i0 from "@angular/core";
4
- export declare class FileRenderComponent {
4
+ export declare class FileRenderComponent implements OnInit, OnChanges, OnDestroy {
5
5
  private envService;
6
+ file: File | null;
7
+ files: File[];
8
+ fileIndex: number;
6
9
  fileUrl: string | null;
7
- multiple: boolean;
8
10
  fileName: string | null;
11
+ multiple: boolean;
9
12
  disabled: boolean;
10
13
  showCancel: boolean;
14
+ showPreview: boolean;
11
15
  onCancelClicked: EventEmitter<Event>;
16
+ resolvedFileName: string | null;
17
+ isPreviewVisible: boolean;
18
+ private tempObjectUrl;
12
19
  constructor(envService: EnvironmentService);
13
20
  ngOnInit(): void;
21
+ ngOnChanges(changes: SimpleChanges): void;
22
+ ngOnDestroy(): void;
23
+ private isRealFile;
24
+ private syncFileName;
25
+ openPreview(): void;
26
+ closePreview(): void;
14
27
  openFile(): void;
15
28
  static ɵfac: i0.ɵɵFactoryDeclaration<FileRenderComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<FileRenderComponent, "verben-file-render", never, { "fileUrl": { "alias": "fileUrl"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showCancel": { "alias": "showCancel"; "required": false; }; }, { "onCancelClicked": "onCancelClicked"; }, never, never, false, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileRenderComponent, "verben-file-render", never, { "file": { "alias": "file"; "required": false; }; "files": { "alias": "files"; "required": false; }; "fileIndex": { "alias": "fileIndex"; "required": false; }; "fileUrl": { "alias": "fileUrl"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showCancel": { "alias": "showCancel"; "required": false; }; "showPreview": { "alias": "showPreview"; "required": false; }; }, { "onCancelClicked": "onCancelClicked"; }, never, never, false, never>;
17
30
  }
@@ -1,10 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./file-render.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/forms";
5
- import * as i4 from "verben-ng-ui";
3
+ import * as i2 from "./file-preview.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "verben-ng-ui";
6
7
  export declare class FileRenderModule {
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<FileRenderModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<FileRenderModule, [typeof i1.FileRenderComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.SvgModule, typeof i4.VerbenaButtonModule], [typeof i1.FileRenderComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FileRenderModule, [typeof i1.FileRenderComponent, typeof i2.FilePreviewComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.SvgModule, typeof i5.VerbenaButtonModule, typeof i5.VerbenDialogueModule], [typeof i1.FileRenderComponent, typeof i2.FilePreviewComponent]>;
9
10
  static ɵinj: i0.ɵɵInjectorDeclaration<FileRenderModule>;
10
11
  }
@@ -1,2 +1,3 @@
1
1
  export * from './file-render.component';
2
+ export * from './file-preview.component';
2
3
  export * from './file-render.module';
@@ -7,16 +7,22 @@ export declare class FileUploadComponent {
7
7
  accept: string;
8
8
  selectedFiles: File[];
9
9
  disabled: boolean;
10
+ previewOnUpload: boolean;
10
11
  selectedFilesChange: EventEmitter<File[]>;
11
12
  fileInput: ElementRef<HTMLInputElement>;
12
13
  readonly MAX_FILE_SIZE: number;
14
+ pendingFiles: File[];
15
+ isUploadPreviewVisible: boolean;
13
16
  constructor(zone: NgZone);
14
17
  onFileSelected(event: any): void;
15
18
  onDrop(event: DragEvent): void;
16
19
  onDragOver(event: DragEvent): void;
17
20
  processFiles(files: File[]): void;
21
+ onUploadPreviewConfirmed(): void;
22
+ onUploadPreviewClosed(): void;
23
+ private commitFiles;
18
24
  removeFile(index: number): void;
19
25
  trackByFile(index: number, file: File): string;
20
26
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "file-upload", never, { "multiple": { "alias": "multiple"; "required": false; }; "label": { "alias": "label"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "selectedFiles": { "alias": "selectedFiles"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectedFilesChange": "selectedFilesChange"; }, never, never, false, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "file-upload", never, { "multiple": { "alias": "multiple"; "required": false; }; "label": { "alias": "label"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "selectedFiles": { "alias": "selectedFiles"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "previewOnUpload": { "alias": "previewOnUpload"; "required": false; }; }, { "selectedFilesChange": "selectedFilesChange"; }, never, never, false, never>;
22
28
  }
@@ -2,10 +2,11 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./task-history.component";
3
3
  import * as i2 from "verben-workflow-ui/src/lib/shared";
4
4
  import * as i3 from "verben-workflow-ui/src/lib/components/file-upload";
5
- import * as i4 from "verben-ng-ui";
6
- import * as i5 from "verben-workflow-ui/src/lib/components/form-viewer";
5
+ import * as i4 from "verben-workflow-ui/src/lib/components/file-render";
6
+ import * as i5 from "verben-ng-ui";
7
+ import * as i6 from "verben-workflow-ui/src/lib/components/form-viewer";
7
8
  export declare class TaskHistoryModule {
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<TaskHistoryModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<TaskHistoryModule, [typeof i1.TaskHistoryComponent], [typeof i2.SharedModule, typeof i3.FileUploadModule, typeof i4.TooltipModule, typeof i5.FormViewerLibModule], [typeof i1.TaskHistoryComponent]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TaskHistoryModule, [typeof i1.TaskHistoryComponent], [typeof i2.SharedModule, typeof i3.FileUploadModule, typeof i4.FileRenderModule, typeof i5.TooltipModule, typeof i6.FormViewerLibModule], [typeof i1.TaskHistoryComponent]>;
10
11
  static ɵinj: i0.ɵɵInjectorDeclaration<TaskHistoryModule>;
11
12
  }