@weaver-apps/service-desk 0.3.0 → 0.3.2

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.
@@ -6,7 +6,7 @@ import { toSignal } from "@angular/core/rxjs-interop";
6
6
  import { ActivatedRoute } from "@angular/router";
7
7
  import { map } from "rxjs";
8
8
  import { DialogRef } from "@loomweaver/plugin-sdk";
9
- import { DataGrid, ListFilter, listingDatasource } from "@weaver-apps/data-grid";
9
+ import { DataGrid, ListFilter, listingDatasource, openOnRow } from "@weaver-apps/data-grid";
10
10
  function activeLocale() {
11
11
  const transloco = inject(TranslocoService);
12
12
  return toSignal(transloco.langChanges$, { initialValue: transloco.getActiveLang() });
@@ -242,8 +242,7 @@ var RequestCell = class RequestCell {
242
242
  const request = this.request();
243
243
  if (request) this.params?.actions({
244
244
  request,
245
- x: event.clientX,
246
- y: event.clientY
245
+ ...menuAnchor(event)
247
246
  });
248
247
  }
249
248
  static ɵfac = i0.ɵɵngDeclareFactory({
@@ -286,6 +285,17 @@ i0.ɵɵngDeclareClassMetadata({
286
285
  }]
287
286
  }]
288
287
  });
288
+ function menuAnchor(event) {
289
+ if (event.detail > 0) return {
290
+ x: event.clientX,
291
+ y: event.clientY
292
+ };
293
+ const bounds = event.currentTarget.getBoundingClientRect();
294
+ return {
295
+ x: bounds.left,
296
+ y: bounds.bottom
297
+ };
298
+ }
289
299
  const requestColumn = {
290
300
  title: "title",
291
301
  type: "type",
@@ -352,6 +362,7 @@ var RequestGrid = class RequestGrid {
352
362
  fetch = input.required(...ngDevMode ? [{ debugName: "fetch" }] : /* istanbul ignore next */ []);
353
363
  locale = input.required(...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
354
364
  requestActions = output();
365
+ openRequest = output();
355
366
  counted = output();
356
367
  failed = output();
357
368
  translated = computed(() => typeof this.table() === "object" && typeof this.table()["title"] === "string", ...ngDevMode ? [{ debugName: "translated" }] : /* istanbul ignore next */ []);
@@ -374,7 +385,8 @@ var RequestGrid = class RequestGrid {
374
385
  }] },
375
386
  filter: { filterModel: { ...defaultRequestFilter } }
376
387
  },
377
- rowClassRules: { "text-content-faint": (params) => !!params.data && isClosed(params.data.status) }
388
+ rowClassRules: { "text-content-faint": (params) => !!params.data && isClosed(params.data.status) },
389
+ ...openOnRow((request) => this.openRequest.emit(request), { except: [requestColumn.actions] })
378
390
  }), ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
379
391
  reload() {
380
392
  this.api?.refreshInfiniteCache();
@@ -444,7 +456,8 @@ var RequestGrid = class RequestGrid {
444
456
  ...this.cell(requestColumn.actions, "actions", ""),
445
457
  width: actionsWidthPx,
446
458
  resizable: false,
447
- sortable: false
459
+ sortable: false,
460
+ pinned: "right"
448
461
  }
449
462
  ];
450
463
  }
@@ -498,6 +511,7 @@ var RequestGrid = class RequestGrid {
498
511
  },
499
512
  outputs: {
500
513
  requestActions: "requestActions",
514
+ openRequest: "openRequest",
501
515
  counted: "counted",
502
516
  failed: "failed"
503
517
  },
@@ -550,6 +564,10 @@ i0.ɵɵngDeclareClassMetadata({
550
564
  type: i0.Output,
551
565
  args: ["requestActions"]
552
566
  }],
567
+ openRequest: [{
568
+ type: i0.Output,
569
+ args: ["openRequest"]
570
+ }],
553
571
  counted: [{
554
572
  type: i0.Output,
555
573
  args: ["counted"]
@@ -719,7 +737,7 @@ var DeskPage = class DeskPage {
719
737
  isSignal: true
720
738
  }],
721
739
  ngImport: i0,
722
- template: "<div class=\"flex h-full flex-col gap-4 p-6\">\n <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <h2 class=\"text-lg font-semibold text-content\">{{ desk.value()?.name ?? ('weaver-apps-service-desk.title' | transloco) }}</h2>\n <div class=\"flex flex-wrap items-center gap-3\">\n @if (count() !== null) {\n <span class=\"text-sm text-content-faint\" data-testid=\"request-count\">{{ 'weaver-apps-service-desk.table.count' | transloco: { count: count() } }}</span>\n }\n <button type=\"button\" class=\"lw-btn lw-btn--primary\" (click)=\"add()\">\n <lw-icon name=\"add\" size=\"1rem\"></lw-icon>\n {{ 'weaver-apps-service-desk.actions.add' | transloco }}\n </button>\n </div>\n </div>\n\n @if (loadFailed()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ 'weaver-apps-service-desk.errors.load' | transloco }}</p>\n }\n <div class=\"min-h-80 flex-1\">\n <wa-request-grid [fetch]=\"fetch()\" [locale]=\"locale()\" (requestActions)=\"actions($event)\" (counted)=\"counted($event)\" (failed)=\"failed()\" />\n </div>\n</div>\n",
740
+ template: "<div class=\"flex h-full flex-col gap-4 p-6\">\n <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <h2 class=\"text-lg font-semibold text-content\">{{ desk.value()?.name ?? ('weaver-apps-service-desk.title' | transloco) }}</h2>\n <div class=\"flex flex-wrap items-center gap-3\">\n @if (count() !== null) {\n <span class=\"text-sm text-content-faint\" data-testid=\"request-count\">{{ 'weaver-apps-service-desk.table.count' | transloco: { count: count() } }}</span>\n }\n <button type=\"button\" class=\"lw-btn lw-btn--primary\" (click)=\"add()\">\n <lw-icon name=\"add\" size=\"1rem\"></lw-icon>\n {{ 'weaver-apps-service-desk.actions.add' | transloco }}\n </button>\n </div>\n </div>\n\n @if (loadFailed()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ 'weaver-apps-service-desk.errors.load' | transloco }}</p>\n }\n <div class=\"min-h-80 flex-1\">\n <wa-request-grid [fetch]=\"fetch()\" [locale]=\"locale()\" (requestActions)=\"actions($event)\" (openRequest)=\"open($event)\" (counted)=\"counted($event)\" (failed)=\"failed()\" />\n </div>\n</div>\n",
723
741
  dependencies: [{
724
742
  kind: "component",
725
743
  type: RequestGrid,
@@ -727,6 +745,7 @@ var DeskPage = class DeskPage {
727
745
  inputs: ["fetch", "locale"],
728
746
  outputs: [
729
747
  "requestActions",
748
+ "openRequest",
730
749
  "counted",
731
750
  "failed"
732
751
  ]
@@ -750,7 +769,7 @@ i0.ɵɵngDeclareClassMetadata({
750
769
  imports: [TranslocoPipe, RequestGrid],
751
770
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
752
771
  changeDetection: ChangeDetectionStrategy.OnPush,
753
- template: "<div class=\"flex h-full flex-col gap-4 p-6\">\n <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <h2 class=\"text-lg font-semibold text-content\">{{ desk.value()?.name ?? ('weaver-apps-service-desk.title' | transloco) }}</h2>\n <div class=\"flex flex-wrap items-center gap-3\">\n @if (count() !== null) {\n <span class=\"text-sm text-content-faint\" data-testid=\"request-count\">{{ 'weaver-apps-service-desk.table.count' | transloco: { count: count() } }}</span>\n }\n <button type=\"button\" class=\"lw-btn lw-btn--primary\" (click)=\"add()\">\n <lw-icon name=\"add\" size=\"1rem\"></lw-icon>\n {{ 'weaver-apps-service-desk.actions.add' | transloco }}\n </button>\n </div>\n </div>\n\n @if (loadFailed()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ 'weaver-apps-service-desk.errors.load' | transloco }}</p>\n }\n <div class=\"min-h-80 flex-1\">\n <wa-request-grid [fetch]=\"fetch()\" [locale]=\"locale()\" (requestActions)=\"actions($event)\" (counted)=\"counted($event)\" (failed)=\"failed()\" />\n </div>\n</div>\n"
772
+ template: "<div class=\"flex h-full flex-col gap-4 p-6\">\n <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <h2 class=\"text-lg font-semibold text-content\">{{ desk.value()?.name ?? ('weaver-apps-service-desk.title' | transloco) }}</h2>\n <div class=\"flex flex-wrap items-center gap-3\">\n @if (count() !== null) {\n <span class=\"text-sm text-content-faint\" data-testid=\"request-count\">{{ 'weaver-apps-service-desk.table.count' | transloco: { count: count() } }}</span>\n }\n <button type=\"button\" class=\"lw-btn lw-btn--primary\" (click)=\"add()\">\n <lw-icon name=\"add\" size=\"1rem\"></lw-icon>\n {{ 'weaver-apps-service-desk.actions.add' | transloco }}\n </button>\n </div>\n </div>\n\n @if (loadFailed()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ 'weaver-apps-service-desk.errors.load' | transloco }}</p>\n }\n <div class=\"min-h-80 flex-1\">\n <wa-request-grid [fetch]=\"fetch()\" [locale]=\"locale()\" (requestActions)=\"actions($event)\" (openRequest)=\"open($event)\" (counted)=\"counted($event)\" (failed)=\"failed()\" />\n </div>\n</div>\n"
754
773
  }]
755
774
  }],
756
775
  propDecorators: { grid: [{
@@ -760,4 +779,4 @@ i0.ɵɵngDeclareClassMetadata({
760
779
  });
761
780
  export { DeskPage };
762
781
 
763
- //# sourceMappingURL=weaver-apps-service-desk-desk-page-CgKsdNiZ.mjs.map
782
+ //# sourceMappingURL=weaver-apps-service-desk-desk-page-BWqYIYd1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaver-apps-service-desk-desk-page-BWqYIYd1.mjs","names":[],"sources":["../../../../libs/service-desk/src/lib/views/active-locale.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestOrigin.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestPriority.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestStatus.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestType.ts","../../../../libs/service-desk/src/lib/views/vocabulary.ts","../../../../libs/service-desk/src/lib/views/request-dialog.ts","../../../../libs/service-desk/src/lib/views/request-dialog.html","../../../../libs/service-desk/src/lib/views/request-cell.ts","../../../../libs/service-desk/src/lib/views/request-cell.html","../../../../libs/service-desk/src/lib/views/request-listing.ts","../../../../libs/service-desk/src/lib/views/request-grid.ts","../../../../libs/service-desk/src/lib/views/request-grid.html","../../../../libs/service-desk/src/lib/views/desk-page.ts","../../../../libs/service-desk/src/lib/views/desk-page.html"],"sourcesContent":["import { inject, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { TranslocoService } from '@jsverse/transloco';\n\nexport function activeLocale(): Signal<string> {\n const transloco = inject(TranslocoService);\n return toSignal(transloco.langChanges$, { initialValue: transloco.getActiveLang() });\n}\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * How a service request came about.\n */\nexport type ServiceRequestOrigin = typeof ServiceRequestOrigin[keyof typeof ServiceRequestOrigin];\n\n\nexport const ServiceRequestOrigin = {\n manual: 'manual',\n voiceChat: 'voiceChat',\n textChat: 'textChat',\n widget: 'widget',\n email: 'email',\n phone: 'phone',\n} as const;\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * How urgent a service request is.\n */\nexport type ServiceRequestPriority = typeof ServiceRequestPriority[keyof typeof ServiceRequestPriority];\n\n\nexport const ServiceRequestPriority = {\n low: 'low',\n normal: 'normal',\n high: 'high',\n urgent: 'urgent',\n} as const;\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * Where a service request stands.\n */\nexport type ServiceRequestStatus = typeof ServiceRequestStatus[keyof typeof ServiceRequestStatus];\n\n\nexport const ServiceRequestStatus = {\n open: 'open',\n inProgress: 'inProgress',\n completed: 'completed',\n cancelled: 'cancelled',\n} as const;\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * What kind of matter a service request is.\n */\nexport type ServiceRequestType = typeof ServiceRequestType[keyof typeof ServiceRequestType];\n\n\nexport const ServiceRequestType = {\n inquiry: 'inquiry',\n task: 'task',\n callbackRequest: 'callbackRequest',\n conversationSummary: 'conversationSummary',\n complaint: 'complaint',\n quote: 'quote',\n} as const;\n","import {\n ServiceRequestOrigin,\n ServiceRequestPriority,\n ServiceRequestStatus,\n ServiceRequestType,\n} from '../api/models';\n\nexport const requestTypes: readonly ServiceRequestType[] = Object.values(ServiceRequestType);\nexport const requestPriorities: readonly ServiceRequestPriority[] = Object.values(ServiceRequestPriority);\nexport const requestOrigins: readonly ServiceRequestOrigin[] = Object.values(ServiceRequestOrigin);\nexport const settableStatuses: readonly ServiceRequestStatus[] = [ServiceRequestStatus.open, ServiceRequestStatus.inProgress];\n\nexport function isClosed(status: ServiceRequestStatus): boolean {\n return status === ServiceRequestStatus.completed || status === ServiceRequestStatus.cancelled;\n}\n\nexport function localDate(value: Date): string {\n const pad = (part: number) => `${part}`.padStart(2, '0');\n return `${value.getFullYear()}-${pad(value.getMonth() + 1)}-${pad(value.getDate())}`;\n}\n\nexport function pick<T extends string>(choices: readonly T[], value: string): T | undefined {\n return choices.find((choice) => choice === value);\n}\n","import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { DialogRef } from '@loomweaver/plugin-sdk';\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport {\n ServiceRequestOrigin,\n ServiceRequestPriority,\n ServiceRequestType,\n type ServiceRequestChanges,\n type ServiceRequestResponse,\n type ServiceRequestStatus,\n} from '../api/models';\nimport { SERVICE_DESK_GATEWAY, ServiceRequestOutcome } from '../gateway/service-desk-gateway';\nimport { isClosed, localDate, pick, requestOrigins, requestPriorities, requestTypes, settableStatuses } from './vocabulary';\n\nexport interface RequestDialogData {\n readonly deskId: string;\n readonly request: ServiceRequestResponse | null;\n}\n\n@Component({\n selector: 'wa-request-dialog',\n imports: [TranslocoPipe],\n templateUrl: './request-dialog.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RequestDialog {\n private readonly dialog = inject<DialogRef<boolean>>(DialogRef);\n private readonly gateway = inject(SERVICE_DESK_GATEWAY);\n private readonly data = this.dialog.data as RequestDialogData;\n private existing = this.data.request;\n\n protected readonly editing = this.existing !== null;\n protected readonly closed = this.existing !== null && isClosed(this.existing.status);\n protected readonly types = requestTypes;\n protected readonly priorities = requestPriorities;\n protected readonly origins = requestOrigins;\n protected readonly statuses = settableStatuses;\n\n protected readonly title = signal(this.existing?.title ?? '');\n protected readonly type = signal<ServiceRequestType>(this.existing?.type ?? ServiceRequestType.inquiry);\n protected readonly priority = signal<ServiceRequestPriority>(this.existing?.priority ?? ServiceRequestPriority.normal);\n protected readonly origin = signal<ServiceRequestOrigin>(this.existing?.origin ?? ServiceRequestOrigin.manual);\n protected readonly status = signal<ServiceRequestStatus>(this.existing?.status ?? 'open');\n protected readonly contactName = signal(this.existing?.contactName ?? '');\n protected readonly contactPhone = signal(this.existing?.contactPhone ?? '');\n protected readonly contactEmail = signal(this.existing?.contactEmail ?? '');\n protected readonly assignee = signal(this.existing?.assignee ?? '');\n protected readonly dueDate = signal(this.existing?.dueAt ? localDate(new Date(this.existing.dueAt)) : '');\n protected readonly description = signal(this.existing?.description ?? '');\n protected readonly cancellationReason = this.existing?.cancellationReason ?? null;\n protected readonly saving = signal(false);\n protected readonly problem = signal('');\n private persisted = false;\n\n protected bind(target: { set(value: string): void }, event: Event): void {\n target.set((event.target as HTMLInputElement).value);\n }\n\n protected chooseType(event: Event): void {\n this.choose(this.type, requestTypes, event);\n }\n\n protected choosePriority(event: Event): void {\n this.choose(this.priority, requestPriorities, event);\n }\n\n protected chooseOrigin(event: Event): void {\n this.choose(this.origin, requestOrigins, event);\n }\n\n protected chooseStatus(event: Event): void {\n this.choose(this.status, settableStatuses, event);\n }\n\n protected close(): void {\n this.dialog.close(this.persisted);\n }\n\n protected async save(): Promise<void> {\n if (!this.title().trim()) {\n this.problem.set('weaver-apps-service-desk.dialog.titleRequired');\n return;\n }\n this.saving.set(true);\n try {\n const changes = this.changes();\n const outcome = this.existing\n ? await this.gateway.edit(this.data.deskId, this.existing.id, changes)\n : await this.gateway.raise(this.data.deskId, { ...changes, origin: this.origin() });\n this.settle(await this.applyStatus(outcome));\n } catch {\n this.problem.set('weaver-apps-service-desk.errors.save');\n } finally {\n this.saving.set(false);\n }\n }\n\n private changes(): ServiceRequestChanges {\n const keptDue = this.existing?.dueAt && localDate(new Date(this.existing.dueAt)) === this.dueDate() ? this.existing.dueAt : null;\n if (keptDue) {\n return { ...this.fields(), dueAt: keptDue };\n }\n const due = this.dueDate() ? new Date(`${this.dueDate()}T12:00`) : null;\n return { ...this.fields(), dueAt: due && !Number.isNaN(due.getTime()) ? due.toISOString() : null };\n }\n\n private fields(): Omit<ServiceRequestChanges, 'dueAt'> {\n return {\n title: this.title().trim(),\n description: this.optional(this.description()),\n type: this.type(),\n priority: this.priority(),\n contactName: this.optional(this.contactName()),\n contactPhone: this.optional(this.contactPhone()),\n contactEmail: this.optional(this.contactEmail()),\n assignee: this.optional(this.assignee()),\n };\n }\n\n private async applyStatus(outcome: ServiceRequestOutcome): Promise<ServiceRequestOutcome> {\n if (outcome.kind === 'saved') {\n this.existing = outcome.request;\n this.persisted = true;\n }\n if (outcome.kind !== 'saved' || outcome.request.status === this.status()) {\n return outcome;\n }\n return this.gateway.setStatus(this.data.deskId, outcome.request.id, this.status());\n }\n\n private settle(outcome: ServiceRequestOutcome): void {\n const messages: Record<Exclude<ServiceRequestOutcome['kind'], 'saved'>, string> = {\n closed: 'weaver-apps-service-desk.dialog.closed',\n changed: 'weaver-apps-service-desk.dialog.changed',\n invalid: 'weaver-apps-service-desk.dialog.invalid',\n missing: 'weaver-apps-service-desk.dialog.missing',\n };\n if (outcome.kind === 'saved') {\n this.dialog.close(true);\n return;\n }\n this.problem.set(messages[outcome.kind]);\n }\n\n private choose<T extends string>(target: { set(value: T): void }, choices: readonly T[], event: Event): void {\n const chosen = pick(choices, (event.target as HTMLSelectElement).value);\n if (chosen) {\n target.set(chosen);\n }\n }\n\n private optional(value: string): string | null {\n return value.trim() ? value.trim() : null;\n }\n}\n","<form class=\"flex flex-col gap-4\" (submit)=\"$event.preventDefault(); save()\">\n @if (closed) {\n <p class=\"text-sm text-content-faint\" role=\"status\">\n {{ 'weaver-apps-service-desk.dialog.closedNote' | transloco }}\n @if (cancellationReason) {\n {{ 'weaver-apps-service-desk.dialog.reason' | transloco: { reason: cancellationReason } }}\n }\n </p>\n }\n\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.title' | transloco }}\n <input class=\"lw-field\" required [disabled]=\"closed\" [value]=\"title()\" (input)=\"bind(title, $event)\" />\n </label>\n\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.type' | transloco }}\n <select class=\"lw-field\" [disabled]=\"closed\" (change)=\"chooseType($event)\">\n @for (choice of types; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === type()\">{{ 'weaver-apps-service-desk.type.' + choice | transloco }}</option>\n }\n </select>\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.priority' | transloco }}\n <select class=\"lw-field\" [disabled]=\"closed\" (change)=\"choosePriority($event)\">\n @for (choice of priorities; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === priority()\">{{ 'weaver-apps-service-desk.priority.' + choice | transloco }}</option>\n }\n </select>\n </label>\n @if (editing) {\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.status' | transloco }}\n <select class=\"lw-field\" [disabled]=\"closed\" (change)=\"chooseStatus($event)\">\n @if (closed) {\n <option selected>{{ 'weaver-apps-service-desk.status.' + status() | transloco }}</option>\n } @else {\n @for (choice of statuses; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === status()\">{{ 'weaver-apps-service-desk.status.' + choice | transloco }}</option>\n }\n }\n </select>\n </label>\n } @else {\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.origin' | transloco }}\n <select class=\"lw-field\" (change)=\"chooseOrigin($event)\">\n @for (choice of origins; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === origin()\">{{ 'weaver-apps-service-desk.origin.' + choice | transloco }}</option>\n }\n </select>\n </label>\n }\n </div>\n\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.contactName' | transloco }}\n <input class=\"lw-field\" [disabled]=\"closed\" [value]=\"contactName()\" (input)=\"bind(contactName, $event)\" />\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.contactPhone' | transloco }}\n <input class=\"lw-field\" type=\"tel\" [disabled]=\"closed\" [value]=\"contactPhone()\" (input)=\"bind(contactPhone, $event)\" />\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.contactEmail' | transloco }}\n <input class=\"lw-field\" type=\"email\" [disabled]=\"closed\" [value]=\"contactEmail()\" (input)=\"bind(contactEmail, $event)\" />\n </label>\n </div>\n\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.assignee' | transloco }}\n <input class=\"lw-field\" [disabled]=\"closed\" [value]=\"assignee()\" (input)=\"bind(assignee, $event)\" />\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.due' | transloco }}\n <input class=\"lw-field\" type=\"date\" [disabled]=\"closed\" [value]=\"dueDate()\" (input)=\"bind(dueDate, $event)\" />\n </label>\n </div>\n\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.description' | transloco }}\n <textarea class=\"lw-field\" rows=\"3\" [disabled]=\"closed\" [value]=\"description()\" (input)=\"bind(description, $event)\"></textarea>\n </label>\n\n @if (problem()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ problem() | transloco }}</p>\n }\n\n <div class=\"flex justify-end gap-2\">\n <button type=\"button\" class=\"lw-btn lw-btn--default\" (click)=\"close()\">{{ (closed ? 'weaver-apps-service-desk.dialog.close' : 'weaver-apps-service-desk.dialog.cancel') | transloco }}</button>\n @if (!closed) {\n <button type=\"submit\" class=\"lw-btn lw-btn--primary\" [disabled]=\"saving()\">{{ 'weaver-apps-service-desk.dialog.save' | transloco }}</button>\n }\n </div>\n</form>\n","import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, computed, signal } from '@angular/core';\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport type { ICellRendererAngularComp } from 'ag-grid-angular';\nimport type { ICellRendererParams } from 'ag-grid-community';\nimport type { ServiceRequestResponse } from '../api/models';\nimport { isClosed } from './vocabulary';\n\nexport interface RequestActions {\n readonly request: ServiceRequestResponse;\n readonly x: number;\n readonly y: number;\n}\n\nexport type RequestCellKind = 'title' | 'type' | 'priority' | 'status' | 'contact' | 'raised' | 'due' | 'actions';\n\nexport interface RequestCellParams {\n readonly kind: RequestCellKind;\n readonly locale: () => string;\n readonly actions: (actions: RequestActions) => void;\n}\n\ntype Params = ICellRendererParams<ServiceRequestResponse> & RequestCellParams;\n\n@Component({\n selector: 'wa-request-cell',\n imports: [TranslocoPipe],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './request-cell.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RequestCell implements ICellRendererAngularComp {\n private params: Params | null = null;\n\n protected readonly kind = signal<RequestCellKind>('title');\n protected readonly request = signal<ServiceRequestResponse | null>(null);\n private readonly locale = signal('en');\n protected readonly closed = computed(() => {\n const request = this.request();\n return request !== null && isClosed(request.status);\n });\n protected readonly dates = computed(() => {\n const request = this.request();\n const date = new Intl.DateTimeFormat(this.locale(), { day: '2-digit', month: '2-digit', year: 'numeric' });\n return {\n raised: request ? date.format(new Date(request.raisedAt)) : '',\n due: request?.dueAt ? date.format(new Date(request.dueAt)) : '',\n };\n });\n\n agInit(params: Params): void {\n this.params = params;\n this.kind.set(params.kind);\n this.request.set(params.data ?? null);\n this.locale.set(params.locale());\n }\n\n refresh(params: Params): boolean {\n this.agInit(params);\n return true;\n }\n\n protected openActions(event: MouseEvent): void {\n const request = this.request();\n if (request) {\n this.params?.actions({ request, ...menuAnchor(event) });\n }\n }\n}\n\nfunction menuAnchor(event: MouseEvent): { readonly x: number; readonly y: number } {\n if (event.detail > 0) {\n return { x: event.clientX, y: event.clientY };\n }\n const bounds = (event.currentTarget as HTMLElement).getBoundingClientRect();\n return { x: bounds.left, y: bounds.bottom };\n}\n","@if (request(); as request) {\n @switch (kind()) {\n @case ('title') {\n <span class=\"font-medium\" [class.text-content]=\"!closed()\" [class.line-through]=\"request.status === 'cancelled'\" data-testid=\"request-title\">{{ request.title }}</span>\n }\n @case ('type') {\n <span class=\"rounded-full border border-border px-2 py-0.5 text-xs text-content\">{{ 'weaver-apps-service-desk.type.' + request.type | transloco }}</span>\n }\n @case ('priority') {\n <span class=\"rounded-full border border-border px-2 py-0.5 text-xs\" [class.text-negative]=\"request.priority === 'urgent'\" [class.font-semibold]=\"request.priority === 'urgent' || request.priority === 'high'\" data-testid=\"request-priority\">{{ 'weaver-apps-service-desk.priority.' + request.priority | transloco }}</span>\n }\n @case ('status') {\n <span class=\"rounded-full border border-border px-2 py-0.5 text-xs text-content\" data-testid=\"request-status\">{{ 'weaver-apps-service-desk.status.' + request.status | transloco }}</span>\n }\n @case ('contact') {\n <span>{{ request.contactName ?? '–' }}</span>\n @if (request.contactPhone ?? request.contactEmail; as reach) {\n <span class=\"ml-2 text-content-faint\">{{ reach }}</span>\n }\n }\n @case ('raised') {\n <span>{{ dates().raised }}</span>\n }\n @case ('due') {\n <span>{{ dates().due }}</span>\n }\n @case ('actions') {\n <button type=\"button\" class=\"relative lw-btn lw-btn--ghost lw-btn--sm lw-btn--icon\" [attr.aria-label]=\"'weaver-apps-service-desk.actions.more' | transloco\" (click)=\"openActions($event)\">\n <lw-icon name=\"more\" size=\"1rem\"></lw-icon>\n </button>\n }\n }\n}\n","import type { ListFilterModel, ListingRequest } from '@weaver-apps/data-grid';\nimport { ServiceRequestStatus, type ServiceDeskRequestsListParams } from '../api/models';\n\nexport const requestColumn = {\n title: 'title',\n type: 'type',\n priority: 'priority',\n status: 'status',\n contact: 'contact',\n raised: 'raisedAt',\n due: 'dueAt',\n actions: 'actions',\n} as const;\n\nexport interface TextFilterModel {\n readonly filterType: 'text';\n readonly type: 'contains';\n readonly filter?: string | null;\n}\n\nexport interface RequestFilterModel {\n readonly [requestColumn.title]?: TextFilterModel;\n readonly [requestColumn.contact]?: TextFilterModel;\n readonly [requestColumn.type]?: ListFilterModel;\n readonly [requestColumn.status]?: ListFilterModel;\n readonly [requestColumn.priority]?: ListFilterModel;\n}\n\nexport const defaultStatuses: readonly ServiceRequestStatus[] = [\n ServiceRequestStatus.open,\n ServiceRequestStatus.inProgress,\n ServiceRequestStatus.completed,\n];\n\nexport const defaultRequestFilter: RequestFilterModel = {\n [requestColumn.status]: { values: [...defaultStatuses] },\n};\n\nconst sortableColumns: ReadonlySet<string> = new Set([\n requestColumn.title,\n requestColumn.priority,\n requestColumn.status,\n requestColumn.raised,\n requestColumn.due,\n]);\n\nexport function listingOf(request: ListingRequest<RequestFilterModel>): ServiceDeskRequestsListParams {\n const { filters, sort } = request;\n const sorted = sort && sortableColumns.has(sort.column) ? { sort: sort.column, descending: sort.descending } : {};\n return {\n ...sorted,\n ...textOf('text', filters[requestColumn.title]),\n ...textOf('contact', filters[requestColumn.contact]),\n ...valuesOf('type', filters[requestColumn.type]),\n ...valuesOf('status', filters[requestColumn.status]),\n ...valuesOf('priority', filters[requestColumn.priority]),\n offset: request.offset,\n limit: request.limit,\n };\n}\n\nfunction textOf(key: 'text' | 'contact', filter: TextFilterModel | undefined): ServiceDeskRequestsListParams {\n const text = filter?.filter?.trim();\n return text ? { [key]: text } : {};\n}\n\nfunction valuesOf(key: 'type' | 'status' | 'priority', filter: ListFilterModel | undefined): ServiceDeskRequestsListParams {\n const values = filter?.values ?? [];\n return values.length > 0 ? { [key]: [...values] } : {};\n}\n","import { ChangeDetectionStrategy, Component, computed, input, output, type Signal } from '@angular/core';\nimport { translateObjectSignal } from '@jsverse/transloco';\nimport { DataGrid, ListFilter, type ListFilterParams, type ListingFetch, listingDatasource, openOnRow } from '@weaver-apps/data-grid';\nimport type { ColDef, GridApi, GridOptions } from 'ag-grid-community';\nimport type { ServiceRequestResponse } from '../api/models';\nimport { RequestCell, type RequestActions, type RequestCellKind, type RequestCellParams } from './request-cell';\nimport { defaultRequestFilter, requestColumn, type RequestFilterModel } from './request-listing';\nimport { isClosed, requestPriorities, requestTypes } from './vocabulary';\n\ntype Texts = Readonly<Record<string, string>>;\n\nconst allStatuses = ['open', 'inProgress', 'completed', 'cancelled'] as const;\nconst actionsWidthPx = 72;\nconst titleMinWidthPx = 160;\nconst contactMinWidthPx = 140;\nconst narrowMinWidthPx = 112;\n\n@Component({\n selector: 'wa-request-grid',\n imports: [DataGrid],\n templateUrl: './request-grid.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block h-full w-full' },\n})\nexport class RequestGrid {\n private readonly table = translateObjectSignal('weaver-apps-service-desk.table') as Signal<Texts>;\n private readonly types = translateObjectSignal('weaver-apps-service-desk.type') as Signal<Texts>;\n private readonly statuses = translateObjectSignal('weaver-apps-service-desk.status') as Signal<Texts>;\n private readonly priorities = translateObjectSignal('weaver-apps-service-desk.priority') as Signal<Texts>;\n private api: GridApi<ServiceRequestResponse> | null = null;\n\n readonly fetch = input.required<ListingFetch<ServiceRequestResponse, RequestFilterModel>>();\n readonly locale = input.required<string>();\n\n readonly requestActions = output<RequestActions>();\n readonly openRequest = output<ServiceRequestResponse>();\n readonly counted = output<number>();\n readonly failed = output<void>();\n\n protected readonly translated = computed(() => typeof this.table() === 'object' && typeof this.table()['title'] === 'string');\n\n protected readonly empty = computed(() => ({ noRowsToShow: this.table()['empty'] ?? '' }));\n\n protected readonly options = computed<GridOptions<ServiceRequestResponse>>(() => ({\n columnDefs: this.columns(this.table()),\n defaultColDef: { sortable: false, resizable: true, suppressHeaderMenuButton: true },\n datasource: listingDatasource(this.fetch(), {\n answered: (answer) => this.counted.emit(answer.total),\n failed: () => this.failed.emit(),\n }),\n initialState: {\n sort: { sortModel: [{ colId: requestColumn.raised, sort: 'desc' }] },\n filter: { filterModel: { ...defaultRequestFilter } },\n },\n rowClassRules: { 'text-content-faint': (params) => !!params.data && isClosed(params.data.status) },\n ...openOnRow<ServiceRequestResponse>((request) => this.openRequest.emit(request), { except: [requestColumn.actions] }),\n }));\n\n reload(): void {\n this.api?.refreshInfiniteCache();\n }\n\n protected ready(api: GridApi<ServiceRequestResponse>): void {\n this.api = api;\n }\n\n private columns(table: Texts): ColDef<ServiceRequestResponse>[] {\n const narrow: ColDef<ServiceRequestResponse> = { flex: 1, minWidth: narrowMinWidthPx };\n return [\n {\n ...this.cell(requestColumn.title, 'title', table['title']),\n sortable: true,\n flex: 3,\n minWidth: titleMinWidthPx,\n filter: 'agTextColumnFilter',\n filterParams: { filterOptions: ['contains'], maxNumConditions: 1 },\n },\n {\n ...this.cell(requestColumn.type, 'type', table['type']),\n ...narrow,\n filter: ListFilter,\n filterParams: this.choices(requestTypes, this.types),\n },\n {\n ...this.cell(requestColumn.priority, 'priority', table['priority']),\n ...narrow,\n sortable: true,\n filter: ListFilter,\n filterParams: this.choices(requestPriorities, this.priorities),\n },\n {\n ...this.cell(requestColumn.status, 'status', table['status']),\n ...narrow,\n sortable: true,\n filter: ListFilter,\n filterParams: this.choices(allStatuses, this.statuses),\n },\n {\n ...this.cell(requestColumn.contact, 'contact', table['contact']),\n flex: 2,\n minWidth: contactMinWidthPx,\n filter: 'agTextColumnFilter',\n filterParams: { filterOptions: ['contains'], maxNumConditions: 1 },\n },\n { ...this.cell(requestColumn.raised, 'raised', table['raised']), ...narrow, sortable: true, sortingOrder: ['desc', 'asc'] },\n { ...this.cell(requestColumn.due, 'due', table['due']), ...narrow, sortable: true },\n { ...this.cell(requestColumn.actions, 'actions', ''), width: actionsWidthPx, resizable: false, sortable: false, pinned: 'right' },\n ];\n }\n\n private cell(colId: string, kind: RequestCellKind, headerName: string | undefined): ColDef<ServiceRequestResponse> {\n const params: RequestCellParams = {\n kind,\n locale: () => this.locale(),\n actions: (actions) => this.requestActions.emit(actions),\n };\n return { colId, headerName: headerName ?? '', cellRenderer: RequestCell, cellRendererParams: params };\n }\n\n private choices(values: readonly string[], labels: Signal<Texts>): ListFilterParams {\n return { options: () => values.map((value) => ({ value, label: labels()[value] ?? value })) };\n }\n}\n","@if (translated()) {\n <wa-data-grid [options]=\"options()\" [localeOverrides]=\"empty()\" (ready)=\"ready($event)\" />\n}\n","import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, computed, inject, resource, signal, viewChild } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute } from '@angular/router';\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport type { ListingAnswer, ListingFetch, ListingRequest } from '@weaver-apps/data-grid';\nimport { map } from 'rxjs';\nimport type { ServiceRequestResponse } from '../api/models';\nimport { SERVICE_DESK_GATEWAY, ServiceRequestOutcome } from '../gateway/service-desk-gateway';\nimport { serviceDeskHost } from '../plugin/service-desk-host';\nimport { serviceDeskIconNames } from '../plugin/service-desk-ids';\nimport { activeLocale } from './active-locale';\nimport type { RequestActions } from './request-cell';\nimport { RequestDialog, RequestDialogData } from './request-dialog';\nimport { RequestGrid } from './request-grid';\nimport { listingOf, type RequestFilterModel } from './request-listing';\nimport { isClosed } from './vocabulary';\n\n@Component({\n selector: 'wa-desk-page',\n imports: [TranslocoPipe, RequestGrid],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './desk-page.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DeskPage {\n private readonly gateway = inject(SERVICE_DESK_GATEWAY);\n private readonly route = inject(ActivatedRoute);\n private readonly grid = viewChild(RequestGrid);\n\n protected readonly locale = activeLocale();\n protected readonly deskId = toSignal(this.route.paramMap.pipe(map((params) => params.get('deskId') ?? '')), {\n initialValue: this.route.snapshot.paramMap.get('deskId') ?? '',\n });\n protected readonly count = signal<number | null>(null);\n protected readonly loadFailed = signal(false);\n\n protected readonly desk = resource({\n params: () => this.deskId(),\n loader: ({ params }) => this.gateway.desk(params),\n });\n\n protected readonly fetch = computed<ListingFetch<ServiceRequestResponse, RequestFilterModel>>(() => {\n const deskId = this.deskId();\n return async (request: ListingRequest<RequestFilterModel>): Promise<ListingAnswer<ServiceRequestResponse>> => {\n const page = await this.gateway.requests(deskId, listingOf(request));\n return { items: page.items, total: Number(page.total) };\n };\n });\n\n protected counted(total: number): void {\n this.loadFailed.set(false);\n this.count.set(total);\n }\n\n protected failed(): void {\n this.loadFailed.set(true);\n }\n\n protected add(): void {\n this.openDialog({ deskId: this.deskId(), request: null }, 'weaver-apps-service-desk.dialog.addTitle');\n }\n\n protected actions({ request, x, y }: RequestActions): void {\n const closed = isClosed(request.status);\n serviceDeskHost.ui.openMenu(\n [\n { label: closed ? 'weaver-apps-service-desk.actions.view' : 'weaver-apps-service-desk.actions.edit', icon: closed ? 'preview' : 'edit', run: () => this.open(request) },\n ...(closed\n ? []\n : [\n { label: 'weaver-apps-service-desk.actions.complete', icon: serviceDeskIconNames.complete, run: () => void this.complete(request) },\n { label: 'weaver-apps-service-desk.actions.cancel', icon: serviceDeskIconNames.cancel, run: () => void this.cancel(request) },\n ]),\n { label: 'weaver-apps-service-desk.actions.delete', icon: 'trash', run: () => void this.remove(request) },\n ],\n { x, y },\n );\n }\n\n protected open(request: ServiceRequestResponse): void {\n const closed = isClosed(request.status);\n this.openDialog({ deskId: this.deskId(), request }, closed ? 'weaver-apps-service-desk.dialog.viewTitle' : 'weaver-apps-service-desk.dialog.editTitle');\n }\n\n protected async complete(request: ServiceRequestResponse): Promise<void> {\n await this.attempt(async () => this.report(await this.gateway.complete(this.deskId(), request.id), 'weaver-apps-service-desk.complete.done'));\n }\n\n protected async cancel(request: ServiceRequestResponse): Promise<void> {\n const reason = await serviceDeskHost.ui.prompt({\n title: 'weaver-apps-service-desk.cancel.title',\n message: 'weaver-apps-service-desk.cancel.message',\n confirmLabel: 'weaver-apps-service-desk.cancel.confirm',\n tone: 'warning',\n });\n if (reason === null) {\n return;\n }\n await this.attempt(async () =>\n this.report(await this.gateway.cancel(this.deskId(), request.id, reason.trim() || null), 'weaver-apps-service-desk.cancel.done'),\n );\n }\n\n protected async remove(request: ServiceRequestResponse): Promise<void> {\n const confirmed = await serviceDeskHost.ui.confirm({\n title: 'weaver-apps-service-desk.delete.title',\n message: 'weaver-apps-service-desk.delete.message',\n confirmLabel: 'weaver-apps-service-desk.delete.confirm',\n tone: 'danger',\n });\n if (!confirmed) {\n return;\n }\n await this.attempt(async () => {\n await this.gateway.remove(this.deskId(), request.id);\n serviceDeskHost.ui.toast({ message: 'weaver-apps-service-desk.delete.done', kind: 'success' });\n this.reload();\n });\n }\n\n private reload(): void {\n this.grid()?.reload();\n }\n\n private async attempt(work: () => Promise<void>): Promise<void> {\n try {\n await work();\n } catch {\n serviceDeskHost.ui.toast({ message: 'weaver-apps-service-desk.errors.save', kind: 'error' });\n this.reload();\n }\n }\n\n private openDialog(data: RequestDialogData, title: string): void {\n const dialog = serviceDeskHost.ui.open<boolean>(RequestDialog, { data, title, size: 'lg', dismiss: 'explicit' });\n void dialog.closed.then((saved) => {\n if (saved) {\n serviceDeskHost.ui.toast({ message: 'weaver-apps-service-desk.dialog.saved', kind: 'success' });\n this.reload();\n }\n });\n }\n\n private report(outcome: ServiceRequestOutcome, done: string): void {\n const saved = outcome.kind === 'saved';\n serviceDeskHost.ui.toast({ message: saved ? done : 'weaver-apps-service-desk.errors.save', kind: saved ? 'success' : 'error' });\n this.reload();\n }\n}\n","<div class=\"flex h-full flex-col gap-4 p-6\">\n <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <h2 class=\"text-lg font-semibold text-content\">{{ desk.value()?.name ?? ('weaver-apps-service-desk.title' | transloco) }}</h2>\n <div class=\"flex flex-wrap items-center gap-3\">\n @if (count() !== null) {\n <span class=\"text-sm text-content-faint\" data-testid=\"request-count\">{{ 'weaver-apps-service-desk.table.count' | transloco: { count: count() } }}</span>\n }\n <button type=\"button\" class=\"lw-btn lw-btn--primary\" (click)=\"add()\">\n <lw-icon name=\"add\" size=\"1rem\"></lw-icon>\n {{ 'weaver-apps-service-desk.actions.add' | transloco }}\n </button>\n </div>\n </div>\n\n @if (loadFailed()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ 'weaver-apps-service-desk.errors.load' | transloco }}</p>\n }\n <div class=\"min-h-80 flex-1\">\n <wa-request-grid [fetch]=\"fetch()\" [locale]=\"locale()\" (requestActions)=\"actions($event)\" (openRequest)=\"open($event)\" (counted)=\"counted($event)\" (failed)=\"failed()\" />\n </div>\n</div>\n"],"mappings":";;;;;;;;;AAIA,SAAgB,eAAY;CAC1B,MAAM,YAAY,OAAO,gBAAgB;CACzC,OAAO,SAAS,UAAU,cAAc,EAAE,cAAc,UAAU,cAAa,EAAE,CAAE;AACrF;ACMA,MAAa,uBAAuB;CAClC,QAAQ;CACR,WAAW;CACX,UAAU;CACV,QAAQ;CACR,OAAO;CACP,OAAO;AACC;ACPV,MAAa,yBAAyB;CACpC,KAAK;CACL,QAAQ;CACR,MAAM;CACN,QAAQ;AACA;ACLV,MAAa,uBAAuB;CAClC,MAAM;CACN,YAAY;CACZ,WAAW;CACX,WAAW;AACH;ACLV,MAAa,qBAAqB;CAChC,SAAS;CACT,MAAM;CACN,iBAAiB;CACjB,qBAAqB;CACrB,WAAW;CACX,OAAO;AACC;ACbV,MAAa,eAA8C,OAAO,OAAO,kBAAkB;AAC3F,MAAa,oBAAuD,OAAO,OAAO,sBAAsB;AACxG,MAAa,iBAAkD,OAAO,OAAO,oBAAoB;AACjG,MAAa,mBAAoD,CAAC,qBAAqB,MAAM,qBAAqB,UAAU;AAE5H,SAAgB,SAAS,QAA4B;CACnD,OAAO,WAAW,qBAAqB,aAAa,WAAW,qBAAqB;AACtF;AAEA,SAAgB,UAAU,OAAW;CACnC,MAAM,OAAO,SAAiB,GAAG,OAAO,SAAS,GAAG,GAAG;CACvD,OAAO,GAAG,MAAM,YAAW,EAAE,GAAI,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,sBAAsB;GAAC,iBAEhB,wBAAwB;GAAM,UAAA;EAAA,CAAA;CAKb,CAAA;CAAA,gBAAA,EAAA,MAAA,CAAA;EAAA,MAAA,GAAA;EAAA,MAAA,CAAA,GAAA,iBAAA,WAAW,GAAA,EAAA,UAAA,KAAA,CAAA;CAAA,CAAA,EAAA;AAAA,CAAA"}
@@ -34,7 +34,7 @@ function createServiceDeskPlugin(options = {}) {
34
34
  title: "weaver-apps-service-desk.title",
35
35
  icon: serviceDeskIconNames.desk,
36
36
  routable: { path: `${deskListPath}/:deskId` },
37
- loadComponent: () => import("./weaver-apps-service-desk-desk-page-CgKsdNiZ.mjs").then((module) => module.DeskPage)
37
+ loadComponent: () => import("./weaver-apps-service-desk-desk-page-BWqYIYd1.mjs").then((module) => module.DeskPage)
38
38
  });
39
39
  if (options.railItem) ctx.registerRailItem({
40
40
  id: serviceDeskContributionIds.rail,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weaver-apps/service-desk",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "The service-desk app's weaver for a LoomWeaver distribution: a desk's service requests, filtered and paged, raising, editing, completing, cancelling and deleting, behind a gateway the host supplies.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "sideEffects": false,
21
21
  "dependencies": {
22
- "@weaver-apps/data-grid": "0.3.0",
22
+ "@weaver-apps/data-grid": "0.3.2",
23
23
  "tslib": "^2.3.0"
24
24
  },
25
25
  "module": "fesm2022/weaver-apps-service-desk.mjs",
@@ -1 +0,0 @@
1
- {"version":3,"file":"weaver-apps-service-desk-desk-page-CgKsdNiZ.mjs","names":[],"sources":["../../../../libs/service-desk/src/lib/views/active-locale.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestOrigin.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestPriority.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestStatus.ts","../../../../libs/service-desk/src/lib/api/models/serviceRequestType.ts","../../../../libs/service-desk/src/lib/views/vocabulary.ts","../../../../libs/service-desk/src/lib/views/request-dialog.ts","../../../../libs/service-desk/src/lib/views/request-dialog.html","../../../../libs/service-desk/src/lib/views/request-cell.ts","../../../../libs/service-desk/src/lib/views/request-cell.html","../../../../libs/service-desk/src/lib/views/request-listing.ts","../../../../libs/service-desk/src/lib/views/request-grid.ts","../../../../libs/service-desk/src/lib/views/request-grid.html","../../../../libs/service-desk/src/lib/views/desk-page.ts","../../../../libs/service-desk/src/lib/views/desk-page.html"],"sourcesContent":["import { inject, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { TranslocoService } from '@jsverse/transloco';\n\nexport function activeLocale(): Signal<string> {\n const transloco = inject(TranslocoService);\n return toSignal(transloco.langChanges$, { initialValue: transloco.getActiveLang() });\n}\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * How a service request came about.\n */\nexport type ServiceRequestOrigin = typeof ServiceRequestOrigin[keyof typeof ServiceRequestOrigin];\n\n\nexport const ServiceRequestOrigin = {\n manual: 'manual',\n voiceChat: 'voiceChat',\n textChat: 'textChat',\n widget: 'widget',\n email: 'email',\n phone: 'phone',\n} as const;\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * How urgent a service request is.\n */\nexport type ServiceRequestPriority = typeof ServiceRequestPriority[keyof typeof ServiceRequestPriority];\n\n\nexport const ServiceRequestPriority = {\n low: 'low',\n normal: 'normal',\n high: 'high',\n urgent: 'urgent',\n} as const;\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * Where a service request stands.\n */\nexport type ServiceRequestStatus = typeof ServiceRequestStatus[keyof typeof ServiceRequestStatus];\n\n\nexport const ServiceRequestStatus = {\n open: 'open',\n inProgress: 'inProgress',\n completed: 'completed',\n cancelled: 'cancelled',\n} as const;\n","/**\n * Generated by orval 🍺\n * Do not edit manually.\n * Weaver Apps\n * OpenAPI spec version: 1.0.0\n */\n\n/**\n * What kind of matter a service request is.\n */\nexport type ServiceRequestType = typeof ServiceRequestType[keyof typeof ServiceRequestType];\n\n\nexport const ServiceRequestType = {\n inquiry: 'inquiry',\n task: 'task',\n callbackRequest: 'callbackRequest',\n conversationSummary: 'conversationSummary',\n complaint: 'complaint',\n quote: 'quote',\n} as const;\n","import {\n ServiceRequestOrigin,\n ServiceRequestPriority,\n ServiceRequestStatus,\n ServiceRequestType,\n} from '../api/models';\n\nexport const requestTypes: readonly ServiceRequestType[] = Object.values(ServiceRequestType);\nexport const requestPriorities: readonly ServiceRequestPriority[] = Object.values(ServiceRequestPriority);\nexport const requestOrigins: readonly ServiceRequestOrigin[] = Object.values(ServiceRequestOrigin);\nexport const settableStatuses: readonly ServiceRequestStatus[] = [ServiceRequestStatus.open, ServiceRequestStatus.inProgress];\n\nexport function isClosed(status: ServiceRequestStatus): boolean {\n return status === ServiceRequestStatus.completed || status === ServiceRequestStatus.cancelled;\n}\n\nexport function localDate(value: Date): string {\n const pad = (part: number) => `${part}`.padStart(2, '0');\n return `${value.getFullYear()}-${pad(value.getMonth() + 1)}-${pad(value.getDate())}`;\n}\n\nexport function pick<T extends string>(choices: readonly T[], value: string): T | undefined {\n return choices.find((choice) => choice === value);\n}\n","import { ChangeDetectionStrategy, Component, inject, signal } from '@angular/core';\nimport { DialogRef } from '@loomweaver/plugin-sdk';\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport {\n ServiceRequestOrigin,\n ServiceRequestPriority,\n ServiceRequestType,\n type ServiceRequestChanges,\n type ServiceRequestResponse,\n type ServiceRequestStatus,\n} from '../api/models';\nimport { SERVICE_DESK_GATEWAY, ServiceRequestOutcome } from '../gateway/service-desk-gateway';\nimport { isClosed, localDate, pick, requestOrigins, requestPriorities, requestTypes, settableStatuses } from './vocabulary';\n\nexport interface RequestDialogData {\n readonly deskId: string;\n readonly request: ServiceRequestResponse | null;\n}\n\n@Component({\n selector: 'wa-request-dialog',\n imports: [TranslocoPipe],\n templateUrl: './request-dialog.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RequestDialog {\n private readonly dialog = inject<DialogRef<boolean>>(DialogRef);\n private readonly gateway = inject(SERVICE_DESK_GATEWAY);\n private readonly data = this.dialog.data as RequestDialogData;\n private existing = this.data.request;\n\n protected readonly editing = this.existing !== null;\n protected readonly closed = this.existing !== null && isClosed(this.existing.status);\n protected readonly types = requestTypes;\n protected readonly priorities = requestPriorities;\n protected readonly origins = requestOrigins;\n protected readonly statuses = settableStatuses;\n\n protected readonly title = signal(this.existing?.title ?? '');\n protected readonly type = signal<ServiceRequestType>(this.existing?.type ?? ServiceRequestType.inquiry);\n protected readonly priority = signal<ServiceRequestPriority>(this.existing?.priority ?? ServiceRequestPriority.normal);\n protected readonly origin = signal<ServiceRequestOrigin>(this.existing?.origin ?? ServiceRequestOrigin.manual);\n protected readonly status = signal<ServiceRequestStatus>(this.existing?.status ?? 'open');\n protected readonly contactName = signal(this.existing?.contactName ?? '');\n protected readonly contactPhone = signal(this.existing?.contactPhone ?? '');\n protected readonly contactEmail = signal(this.existing?.contactEmail ?? '');\n protected readonly assignee = signal(this.existing?.assignee ?? '');\n protected readonly dueDate = signal(this.existing?.dueAt ? localDate(new Date(this.existing.dueAt)) : '');\n protected readonly description = signal(this.existing?.description ?? '');\n protected readonly cancellationReason = this.existing?.cancellationReason ?? null;\n protected readonly saving = signal(false);\n protected readonly problem = signal('');\n private persisted = false;\n\n protected bind(target: { set(value: string): void }, event: Event): void {\n target.set((event.target as HTMLInputElement).value);\n }\n\n protected chooseType(event: Event): void {\n this.choose(this.type, requestTypes, event);\n }\n\n protected choosePriority(event: Event): void {\n this.choose(this.priority, requestPriorities, event);\n }\n\n protected chooseOrigin(event: Event): void {\n this.choose(this.origin, requestOrigins, event);\n }\n\n protected chooseStatus(event: Event): void {\n this.choose(this.status, settableStatuses, event);\n }\n\n protected close(): void {\n this.dialog.close(this.persisted);\n }\n\n protected async save(): Promise<void> {\n if (!this.title().trim()) {\n this.problem.set('weaver-apps-service-desk.dialog.titleRequired');\n return;\n }\n this.saving.set(true);\n try {\n const changes = this.changes();\n const outcome = this.existing\n ? await this.gateway.edit(this.data.deskId, this.existing.id, changes)\n : await this.gateway.raise(this.data.deskId, { ...changes, origin: this.origin() });\n this.settle(await this.applyStatus(outcome));\n } catch {\n this.problem.set('weaver-apps-service-desk.errors.save');\n } finally {\n this.saving.set(false);\n }\n }\n\n private changes(): ServiceRequestChanges {\n const keptDue = this.existing?.dueAt && localDate(new Date(this.existing.dueAt)) === this.dueDate() ? this.existing.dueAt : null;\n if (keptDue) {\n return { ...this.fields(), dueAt: keptDue };\n }\n const due = this.dueDate() ? new Date(`${this.dueDate()}T12:00`) : null;\n return { ...this.fields(), dueAt: due && !Number.isNaN(due.getTime()) ? due.toISOString() : null };\n }\n\n private fields(): Omit<ServiceRequestChanges, 'dueAt'> {\n return {\n title: this.title().trim(),\n description: this.optional(this.description()),\n type: this.type(),\n priority: this.priority(),\n contactName: this.optional(this.contactName()),\n contactPhone: this.optional(this.contactPhone()),\n contactEmail: this.optional(this.contactEmail()),\n assignee: this.optional(this.assignee()),\n };\n }\n\n private async applyStatus(outcome: ServiceRequestOutcome): Promise<ServiceRequestOutcome> {\n if (outcome.kind === 'saved') {\n this.existing = outcome.request;\n this.persisted = true;\n }\n if (outcome.kind !== 'saved' || outcome.request.status === this.status()) {\n return outcome;\n }\n return this.gateway.setStatus(this.data.deskId, outcome.request.id, this.status());\n }\n\n private settle(outcome: ServiceRequestOutcome): void {\n const messages: Record<Exclude<ServiceRequestOutcome['kind'], 'saved'>, string> = {\n closed: 'weaver-apps-service-desk.dialog.closed',\n changed: 'weaver-apps-service-desk.dialog.changed',\n invalid: 'weaver-apps-service-desk.dialog.invalid',\n missing: 'weaver-apps-service-desk.dialog.missing',\n };\n if (outcome.kind === 'saved') {\n this.dialog.close(true);\n return;\n }\n this.problem.set(messages[outcome.kind]);\n }\n\n private choose<T extends string>(target: { set(value: T): void }, choices: readonly T[], event: Event): void {\n const chosen = pick(choices, (event.target as HTMLSelectElement).value);\n if (chosen) {\n target.set(chosen);\n }\n }\n\n private optional(value: string): string | null {\n return value.trim() ? value.trim() : null;\n }\n}\n","<form class=\"flex flex-col gap-4\" (submit)=\"$event.preventDefault(); save()\">\n @if (closed) {\n <p class=\"text-sm text-content-faint\" role=\"status\">\n {{ 'weaver-apps-service-desk.dialog.closedNote' | transloco }}\n @if (cancellationReason) {\n {{ 'weaver-apps-service-desk.dialog.reason' | transloco: { reason: cancellationReason } }}\n }\n </p>\n }\n\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.title' | transloco }}\n <input class=\"lw-field\" required [disabled]=\"closed\" [value]=\"title()\" (input)=\"bind(title, $event)\" />\n </label>\n\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.type' | transloco }}\n <select class=\"lw-field\" [disabled]=\"closed\" (change)=\"chooseType($event)\">\n @for (choice of types; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === type()\">{{ 'weaver-apps-service-desk.type.' + choice | transloco }}</option>\n }\n </select>\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.priority' | transloco }}\n <select class=\"lw-field\" [disabled]=\"closed\" (change)=\"choosePriority($event)\">\n @for (choice of priorities; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === priority()\">{{ 'weaver-apps-service-desk.priority.' + choice | transloco }}</option>\n }\n </select>\n </label>\n @if (editing) {\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.status' | transloco }}\n <select class=\"lw-field\" [disabled]=\"closed\" (change)=\"chooseStatus($event)\">\n @if (closed) {\n <option selected>{{ 'weaver-apps-service-desk.status.' + status() | transloco }}</option>\n } @else {\n @for (choice of statuses; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === status()\">{{ 'weaver-apps-service-desk.status.' + choice | transloco }}</option>\n }\n }\n </select>\n </label>\n } @else {\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.origin' | transloco }}\n <select class=\"lw-field\" (change)=\"chooseOrigin($event)\">\n @for (choice of origins; track choice) {\n <option [value]=\"choice\" [selected]=\"choice === origin()\">{{ 'weaver-apps-service-desk.origin.' + choice | transloco }}</option>\n }\n </select>\n </label>\n }\n </div>\n\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.contactName' | transloco }}\n <input class=\"lw-field\" [disabled]=\"closed\" [value]=\"contactName()\" (input)=\"bind(contactName, $event)\" />\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.contactPhone' | transloco }}\n <input class=\"lw-field\" type=\"tel\" [disabled]=\"closed\" [value]=\"contactPhone()\" (input)=\"bind(contactPhone, $event)\" />\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.contactEmail' | transloco }}\n <input class=\"lw-field\" type=\"email\" [disabled]=\"closed\" [value]=\"contactEmail()\" (input)=\"bind(contactEmail, $event)\" />\n </label>\n </div>\n\n <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.assignee' | transloco }}\n <input class=\"lw-field\" [disabled]=\"closed\" [value]=\"assignee()\" (input)=\"bind(assignee, $event)\" />\n </label>\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.due' | transloco }}\n <input class=\"lw-field\" type=\"date\" [disabled]=\"closed\" [value]=\"dueDate()\" (input)=\"bind(dueDate, $event)\" />\n </label>\n </div>\n\n <label class=\"flex flex-col gap-1 text-sm text-content\">\n {{ 'weaver-apps-service-desk.fields.description' | transloco }}\n <textarea class=\"lw-field\" rows=\"3\" [disabled]=\"closed\" [value]=\"description()\" (input)=\"bind(description, $event)\"></textarea>\n </label>\n\n @if (problem()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ problem() | transloco }}</p>\n }\n\n <div class=\"flex justify-end gap-2\">\n <button type=\"button\" class=\"lw-btn lw-btn--default\" (click)=\"close()\">{{ (closed ? 'weaver-apps-service-desk.dialog.close' : 'weaver-apps-service-desk.dialog.cancel') | transloco }}</button>\n @if (!closed) {\n <button type=\"submit\" class=\"lw-btn lw-btn--primary\" [disabled]=\"saving()\">{{ 'weaver-apps-service-desk.dialog.save' | transloco }}</button>\n }\n </div>\n</form>\n","import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, computed, signal } from '@angular/core';\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport type { ICellRendererAngularComp } from 'ag-grid-angular';\nimport type { ICellRendererParams } from 'ag-grid-community';\nimport type { ServiceRequestResponse } from '../api/models';\nimport { isClosed } from './vocabulary';\n\nexport interface RequestActions {\n readonly request: ServiceRequestResponse;\n readonly x: number;\n readonly y: number;\n}\n\nexport type RequestCellKind = 'title' | 'type' | 'priority' | 'status' | 'contact' | 'raised' | 'due' | 'actions';\n\nexport interface RequestCellParams {\n readonly kind: RequestCellKind;\n readonly locale: () => string;\n readonly actions: (actions: RequestActions) => void;\n}\n\ntype Params = ICellRendererParams<ServiceRequestResponse> & RequestCellParams;\n\n@Component({\n selector: 'wa-request-cell',\n imports: [TranslocoPipe],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './request-cell.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RequestCell implements ICellRendererAngularComp {\n private params: Params | null = null;\n\n protected readonly kind = signal<RequestCellKind>('title');\n protected readonly request = signal<ServiceRequestResponse | null>(null);\n private readonly locale = signal('en');\n protected readonly closed = computed(() => {\n const request = this.request();\n return request !== null && isClosed(request.status);\n });\n protected readonly dates = computed(() => {\n const request = this.request();\n const date = new Intl.DateTimeFormat(this.locale(), { day: '2-digit', month: '2-digit', year: 'numeric' });\n return {\n raised: request ? date.format(new Date(request.raisedAt)) : '',\n due: request?.dueAt ? date.format(new Date(request.dueAt)) : '',\n };\n });\n\n agInit(params: Params): void {\n this.params = params;\n this.kind.set(params.kind);\n this.request.set(params.data ?? null);\n this.locale.set(params.locale());\n }\n\n refresh(params: Params): boolean {\n this.agInit(params);\n return true;\n }\n\n protected openActions(event: MouseEvent): void {\n const request = this.request();\n if (request) {\n this.params?.actions({ request, x: event.clientX, y: event.clientY });\n }\n }\n}\n","@if (request(); as request) {\n @switch (kind()) {\n @case ('title') {\n <span class=\"font-medium\" [class.text-content]=\"!closed()\" [class.line-through]=\"request.status === 'cancelled'\" data-testid=\"request-title\">{{ request.title }}</span>\n }\n @case ('type') {\n <span class=\"rounded-full border border-border px-2 py-0.5 text-xs text-content\">{{ 'weaver-apps-service-desk.type.' + request.type | transloco }}</span>\n }\n @case ('priority') {\n <span class=\"rounded-full border border-border px-2 py-0.5 text-xs\" [class.text-negative]=\"request.priority === 'urgent'\" [class.font-semibold]=\"request.priority === 'urgent' || request.priority === 'high'\" data-testid=\"request-priority\">{{ 'weaver-apps-service-desk.priority.' + request.priority | transloco }}</span>\n }\n @case ('status') {\n <span class=\"rounded-full border border-border px-2 py-0.5 text-xs text-content\" data-testid=\"request-status\">{{ 'weaver-apps-service-desk.status.' + request.status | transloco }}</span>\n }\n @case ('contact') {\n <span>{{ request.contactName ?? '–' }}</span>\n @if (request.contactPhone ?? request.contactEmail; as reach) {\n <span class=\"ml-2 text-content-faint\">{{ reach }}</span>\n }\n }\n @case ('raised') {\n <span>{{ dates().raised }}</span>\n }\n @case ('due') {\n <span>{{ dates().due }}</span>\n }\n @case ('actions') {\n <button type=\"button\" class=\"relative lw-btn lw-btn--ghost lw-btn--sm lw-btn--icon\" [attr.aria-label]=\"'weaver-apps-service-desk.actions.more' | transloco\" (click)=\"openActions($event)\">\n <lw-icon name=\"more\" size=\"1rem\"></lw-icon>\n </button>\n }\n }\n}\n","import type { ListFilterModel, ListingRequest } from '@weaver-apps/data-grid';\nimport { ServiceRequestStatus, type ServiceDeskRequestsListParams } from '../api/models';\n\nexport const requestColumn = {\n title: 'title',\n type: 'type',\n priority: 'priority',\n status: 'status',\n contact: 'contact',\n raised: 'raisedAt',\n due: 'dueAt',\n actions: 'actions',\n} as const;\n\nexport interface TextFilterModel {\n readonly filterType: 'text';\n readonly type: 'contains';\n readonly filter?: string | null;\n}\n\nexport interface RequestFilterModel {\n readonly [requestColumn.title]?: TextFilterModel;\n readonly [requestColumn.contact]?: TextFilterModel;\n readonly [requestColumn.type]?: ListFilterModel;\n readonly [requestColumn.status]?: ListFilterModel;\n readonly [requestColumn.priority]?: ListFilterModel;\n}\n\nexport const defaultStatuses: readonly ServiceRequestStatus[] = [\n ServiceRequestStatus.open,\n ServiceRequestStatus.inProgress,\n ServiceRequestStatus.completed,\n];\n\nexport const defaultRequestFilter: RequestFilterModel = {\n [requestColumn.status]: { values: [...defaultStatuses] },\n};\n\nconst sortableColumns: ReadonlySet<string> = new Set([\n requestColumn.title,\n requestColumn.priority,\n requestColumn.status,\n requestColumn.raised,\n requestColumn.due,\n]);\n\nexport function listingOf(request: ListingRequest<RequestFilterModel>): ServiceDeskRequestsListParams {\n const { filters, sort } = request;\n const sorted = sort && sortableColumns.has(sort.column) ? { sort: sort.column, descending: sort.descending } : {};\n return {\n ...sorted,\n ...textOf('text', filters[requestColumn.title]),\n ...textOf('contact', filters[requestColumn.contact]),\n ...valuesOf('type', filters[requestColumn.type]),\n ...valuesOf('status', filters[requestColumn.status]),\n ...valuesOf('priority', filters[requestColumn.priority]),\n offset: request.offset,\n limit: request.limit,\n };\n}\n\nfunction textOf(key: 'text' | 'contact', filter: TextFilterModel | undefined): ServiceDeskRequestsListParams {\n const text = filter?.filter?.trim();\n return text ? { [key]: text } : {};\n}\n\nfunction valuesOf(key: 'type' | 'status' | 'priority', filter: ListFilterModel | undefined): ServiceDeskRequestsListParams {\n const values = filter?.values ?? [];\n return values.length > 0 ? { [key]: [...values] } : {};\n}\n","import { ChangeDetectionStrategy, Component, computed, input, output, type Signal } from '@angular/core';\nimport { translateObjectSignal } from '@jsverse/transloco';\nimport { DataGrid, ListFilter, type ListFilterParams, type ListingFetch, listingDatasource } from '@weaver-apps/data-grid';\nimport type { ColDef, GridApi, GridOptions } from 'ag-grid-community';\nimport type { ServiceRequestResponse } from '../api/models';\nimport { RequestCell, type RequestActions, type RequestCellKind, type RequestCellParams } from './request-cell';\nimport { defaultRequestFilter, requestColumn, type RequestFilterModel } from './request-listing';\nimport { isClosed, requestPriorities, requestTypes } from './vocabulary';\n\ntype Texts = Readonly<Record<string, string>>;\n\nconst allStatuses = ['open', 'inProgress', 'completed', 'cancelled'] as const;\nconst actionsWidthPx = 72;\nconst titleMinWidthPx = 160;\nconst contactMinWidthPx = 140;\nconst narrowMinWidthPx = 112;\n\n@Component({\n selector: 'wa-request-grid',\n imports: [DataGrid],\n templateUrl: './request-grid.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block h-full w-full' },\n})\nexport class RequestGrid {\n private readonly table = translateObjectSignal('weaver-apps-service-desk.table') as Signal<Texts>;\n private readonly types = translateObjectSignal('weaver-apps-service-desk.type') as Signal<Texts>;\n private readonly statuses = translateObjectSignal('weaver-apps-service-desk.status') as Signal<Texts>;\n private readonly priorities = translateObjectSignal('weaver-apps-service-desk.priority') as Signal<Texts>;\n private api: GridApi<ServiceRequestResponse> | null = null;\n\n readonly fetch = input.required<ListingFetch<ServiceRequestResponse, RequestFilterModel>>();\n readonly locale = input.required<string>();\n\n readonly requestActions = output<RequestActions>();\n readonly counted = output<number>();\n readonly failed = output<void>();\n\n protected readonly translated = computed(() => typeof this.table() === 'object' && typeof this.table()['title'] === 'string');\n\n protected readonly empty = computed(() => ({ noRowsToShow: this.table()['empty'] ?? '' }));\n\n protected readonly options = computed<GridOptions<ServiceRequestResponse>>(() => ({\n columnDefs: this.columns(this.table()),\n defaultColDef: { sortable: false, resizable: true, suppressHeaderMenuButton: true },\n datasource: listingDatasource(this.fetch(), {\n answered: (answer) => this.counted.emit(answer.total),\n failed: () => this.failed.emit(),\n }),\n initialState: {\n sort: { sortModel: [{ colId: requestColumn.raised, sort: 'desc' }] },\n filter: { filterModel: { ...defaultRequestFilter } },\n },\n rowClassRules: { 'text-content-faint': (params) => !!params.data && isClosed(params.data.status) },\n }));\n\n reload(): void {\n this.api?.refreshInfiniteCache();\n }\n\n protected ready(api: GridApi<ServiceRequestResponse>): void {\n this.api = api;\n }\n\n private columns(table: Texts): ColDef<ServiceRequestResponse>[] {\n const narrow: ColDef<ServiceRequestResponse> = { flex: 1, minWidth: narrowMinWidthPx };\n return [\n {\n ...this.cell(requestColumn.title, 'title', table['title']),\n sortable: true,\n flex: 3,\n minWidth: titleMinWidthPx,\n filter: 'agTextColumnFilter',\n filterParams: { filterOptions: ['contains'], maxNumConditions: 1 },\n },\n {\n ...this.cell(requestColumn.type, 'type', table['type']),\n ...narrow,\n filter: ListFilter,\n filterParams: this.choices(requestTypes, this.types),\n },\n {\n ...this.cell(requestColumn.priority, 'priority', table['priority']),\n ...narrow,\n sortable: true,\n filter: ListFilter,\n filterParams: this.choices(requestPriorities, this.priorities),\n },\n {\n ...this.cell(requestColumn.status, 'status', table['status']),\n ...narrow,\n sortable: true,\n filter: ListFilter,\n filterParams: this.choices(allStatuses, this.statuses),\n },\n {\n ...this.cell(requestColumn.contact, 'contact', table['contact']),\n flex: 2,\n minWidth: contactMinWidthPx,\n filter: 'agTextColumnFilter',\n filterParams: { filterOptions: ['contains'], maxNumConditions: 1 },\n },\n { ...this.cell(requestColumn.raised, 'raised', table['raised']), ...narrow, sortable: true, sortingOrder: ['desc', 'asc'] },\n { ...this.cell(requestColumn.due, 'due', table['due']), ...narrow, sortable: true },\n { ...this.cell(requestColumn.actions, 'actions', ''), width: actionsWidthPx, resizable: false, sortable: false },\n ];\n }\n\n private cell(colId: string, kind: RequestCellKind, headerName: string | undefined): ColDef<ServiceRequestResponse> {\n const params: RequestCellParams = {\n kind,\n locale: () => this.locale(),\n actions: (actions) => this.requestActions.emit(actions),\n };\n return { colId, headerName: headerName ?? '', cellRenderer: RequestCell, cellRendererParams: params };\n }\n\n private choices(values: readonly string[], labels: Signal<Texts>): ListFilterParams {\n return { options: () => values.map((value) => ({ value, label: labels()[value] ?? value })) };\n }\n}\n","@if (translated()) {\n <wa-data-grid [options]=\"options()\" [localeOverrides]=\"empty()\" (ready)=\"ready($event)\" />\n}\n","import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, computed, inject, resource, signal, viewChild } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute } from '@angular/router';\nimport { TranslocoPipe } from '@jsverse/transloco';\nimport type { ListingAnswer, ListingFetch, ListingRequest } from '@weaver-apps/data-grid';\nimport { map } from 'rxjs';\nimport type { ServiceRequestResponse } from '../api/models';\nimport { SERVICE_DESK_GATEWAY, ServiceRequestOutcome } from '../gateway/service-desk-gateway';\nimport { serviceDeskHost } from '../plugin/service-desk-host';\nimport { serviceDeskIconNames } from '../plugin/service-desk-ids';\nimport { activeLocale } from './active-locale';\nimport type { RequestActions } from './request-cell';\nimport { RequestDialog, RequestDialogData } from './request-dialog';\nimport { RequestGrid } from './request-grid';\nimport { listingOf, type RequestFilterModel } from './request-listing';\nimport { isClosed } from './vocabulary';\n\n@Component({\n selector: 'wa-desk-page',\n imports: [TranslocoPipe, RequestGrid],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n templateUrl: './desk-page.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DeskPage {\n private readonly gateway = inject(SERVICE_DESK_GATEWAY);\n private readonly route = inject(ActivatedRoute);\n private readonly grid = viewChild(RequestGrid);\n\n protected readonly locale = activeLocale();\n protected readonly deskId = toSignal(this.route.paramMap.pipe(map((params) => params.get('deskId') ?? '')), {\n initialValue: this.route.snapshot.paramMap.get('deskId') ?? '',\n });\n protected readonly count = signal<number | null>(null);\n protected readonly loadFailed = signal(false);\n\n protected readonly desk = resource({\n params: () => this.deskId(),\n loader: ({ params }) => this.gateway.desk(params),\n });\n\n protected readonly fetch = computed<ListingFetch<ServiceRequestResponse, RequestFilterModel>>(() => {\n const deskId = this.deskId();\n return async (request: ListingRequest<RequestFilterModel>): Promise<ListingAnswer<ServiceRequestResponse>> => {\n const page = await this.gateway.requests(deskId, listingOf(request));\n return { items: page.items, total: Number(page.total) };\n };\n });\n\n protected counted(total: number): void {\n this.loadFailed.set(false);\n this.count.set(total);\n }\n\n protected failed(): void {\n this.loadFailed.set(true);\n }\n\n protected add(): void {\n this.openDialog({ deskId: this.deskId(), request: null }, 'weaver-apps-service-desk.dialog.addTitle');\n }\n\n protected actions({ request, x, y }: RequestActions): void {\n const closed = isClosed(request.status);\n serviceDeskHost.ui.openMenu(\n [\n { label: closed ? 'weaver-apps-service-desk.actions.view' : 'weaver-apps-service-desk.actions.edit', icon: closed ? 'preview' : 'edit', run: () => this.open(request) },\n ...(closed\n ? []\n : [\n { label: 'weaver-apps-service-desk.actions.complete', icon: serviceDeskIconNames.complete, run: () => void this.complete(request) },\n { label: 'weaver-apps-service-desk.actions.cancel', icon: serviceDeskIconNames.cancel, run: () => void this.cancel(request) },\n ]),\n { label: 'weaver-apps-service-desk.actions.delete', icon: 'trash', run: () => void this.remove(request) },\n ],\n { x, y },\n );\n }\n\n protected open(request: ServiceRequestResponse): void {\n const closed = isClosed(request.status);\n this.openDialog({ deskId: this.deskId(), request }, closed ? 'weaver-apps-service-desk.dialog.viewTitle' : 'weaver-apps-service-desk.dialog.editTitle');\n }\n\n protected async complete(request: ServiceRequestResponse): Promise<void> {\n await this.attempt(async () => this.report(await this.gateway.complete(this.deskId(), request.id), 'weaver-apps-service-desk.complete.done'));\n }\n\n protected async cancel(request: ServiceRequestResponse): Promise<void> {\n const reason = await serviceDeskHost.ui.prompt({\n title: 'weaver-apps-service-desk.cancel.title',\n message: 'weaver-apps-service-desk.cancel.message',\n confirmLabel: 'weaver-apps-service-desk.cancel.confirm',\n tone: 'warning',\n });\n if (reason === null) {\n return;\n }\n await this.attempt(async () =>\n this.report(await this.gateway.cancel(this.deskId(), request.id, reason.trim() || null), 'weaver-apps-service-desk.cancel.done'),\n );\n }\n\n protected async remove(request: ServiceRequestResponse): Promise<void> {\n const confirmed = await serviceDeskHost.ui.confirm({\n title: 'weaver-apps-service-desk.delete.title',\n message: 'weaver-apps-service-desk.delete.message',\n confirmLabel: 'weaver-apps-service-desk.delete.confirm',\n tone: 'danger',\n });\n if (!confirmed) {\n return;\n }\n await this.attempt(async () => {\n await this.gateway.remove(this.deskId(), request.id);\n serviceDeskHost.ui.toast({ message: 'weaver-apps-service-desk.delete.done', kind: 'success' });\n this.reload();\n });\n }\n\n private reload(): void {\n this.grid()?.reload();\n }\n\n private async attempt(work: () => Promise<void>): Promise<void> {\n try {\n await work();\n } catch {\n serviceDeskHost.ui.toast({ message: 'weaver-apps-service-desk.errors.save', kind: 'error' });\n this.reload();\n }\n }\n\n private openDialog(data: RequestDialogData, title: string): void {\n const dialog = serviceDeskHost.ui.open<boolean>(RequestDialog, { data, title, size: 'lg', dismiss: 'explicit' });\n void dialog.closed.then((saved) => {\n if (saved) {\n serviceDeskHost.ui.toast({ message: 'weaver-apps-service-desk.dialog.saved', kind: 'success' });\n this.reload();\n }\n });\n }\n\n private report(outcome: ServiceRequestOutcome, done: string): void {\n const saved = outcome.kind === 'saved';\n serviceDeskHost.ui.toast({ message: saved ? done : 'weaver-apps-service-desk.errors.save', kind: saved ? 'success' : 'error' });\n this.reload();\n }\n}\n","<div class=\"flex h-full flex-col gap-4 p-6\">\n <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <h2 class=\"text-lg font-semibold text-content\">{{ desk.value()?.name ?? ('weaver-apps-service-desk.title' | transloco) }}</h2>\n <div class=\"flex flex-wrap items-center gap-3\">\n @if (count() !== null) {\n <span class=\"text-sm text-content-faint\" data-testid=\"request-count\">{{ 'weaver-apps-service-desk.table.count' | transloco: { count: count() } }}</span>\n }\n <button type=\"button\" class=\"lw-btn lw-btn--primary\" (click)=\"add()\">\n <lw-icon name=\"add\" size=\"1rem\"></lw-icon>\n {{ 'weaver-apps-service-desk.actions.add' | transloco }}\n </button>\n </div>\n </div>\n\n @if (loadFailed()) {\n <p class=\"text-sm text-negative\" role=\"alert\">{{ 'weaver-apps-service-desk.errors.load' | transloco }}</p>\n }\n <div class=\"min-h-80 flex-1\">\n <wa-request-grid [fetch]=\"fetch()\" [locale]=\"locale()\" (requestActions)=\"actions($event)\" (counted)=\"counted($event)\" (failed)=\"failed()\" />\n </div>\n</div>\n"],"mappings":";;;;;;;;;AAIA,SAAgB,eAAY;CAC1B,MAAM,YAAY,OAAO,gBAAgB;CACzC,OAAO,SAAS,UAAU,cAAc,EAAE,cAAc,UAAU,cAAa,EAAE,CAAE;AACrF;ACMA,MAAa,uBAAuB;CAClC,QAAQ;CACR,WAAW;CACX,UAAU;CACV,QAAQ;CACR,OAAO;CACP,OAAO;AACC;ACPV,MAAa,yBAAyB;CACpC,KAAK;CACL,QAAQ;CACR,MAAM;CACN,QAAQ;AACA;ACLV,MAAa,uBAAuB;CAClC,MAAM;CACN,YAAY;CACZ,WAAW;CACX,WAAW;AACH;ACLV,MAAa,qBAAqB;CAChC,SAAS;CACT,MAAM;CACN,iBAAiB;CACjB,qBAAqB;CACrB,WAAW;CACX,OAAO;AACC;ACbV,MAAa,eAA8C,OAAO,OAAO,kBAAkB;AAC3F,MAAa,oBAAuD,OAAO,OAAO,sBAAsB;AACxG,MAAa,iBAAkD,OAAO,OAAO,oBAAoB;AACjG,MAAa,mBAAoD,CAAC,qBAAq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