@masterteam/client-components 0.0.38 → 0.0.39

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.
@@ -3,6 +3,7 @@ import { inject, Injectable, DestroyRef, input, computed, signal, effect, Compon
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { FormControl, ReactiveFormsModule } from '@angular/forms';
6
+ import { TranslocoService, TranslocoPipe } from '@jsverse/transloco';
6
7
  import { TextFieldConfig, DateFieldConfig, TextareaFieldConfig, UploadFileFieldConfig, ValidatorConfig } from '@masterteam/components';
7
8
  import { Button } from '@masterteam/components/button';
8
9
  import { ModalRef } from '@masterteam/components/dialog';
@@ -33,16 +34,18 @@ class EscalationAddDialog {
33
34
  ref = inject(ModalRef);
34
35
  destroyRef = inject(DestroyRef);
35
36
  escalationRuntimeService = inject(EscalationRuntimeService);
37
+ transloco = inject(TranslocoService);
36
38
  startedAt = new Date();
37
39
  context = input.required(...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
38
- currentUserDisplayName = input('Current User', ...(ngDevMode ? [{ debugName: "currentUserDisplayName" }] : /* istanbul ignore next */ []));
40
+ currentUserDisplayName = input(this.transloco.translate('components.clientComponents.escalation.currentUser'), ...(ngDevMode ? [{ debugName: "currentUserDisplayName" }] : /* istanbul ignore next */ []));
39
41
  escalationFormControl = new FormControl({
40
42
  startDate: this.startedAt,
41
43
  escalatedBy: '',
42
44
  reason: '',
43
45
  attachments: null,
44
46
  }, { nonNullable: true });
45
- resolvedCurrentUserDisplayName = computed(() => this.currentUserDisplayName().trim() || 'Current User', ...(ngDevMode ? [{ debugName: "resolvedCurrentUserDisplayName" }] : /* istanbul ignore next */ []));
47
+ resolvedCurrentUserDisplayName = computed(() => this.currentUserDisplayName().trim() ||
48
+ this.transloco.translate('components.clientComponents.escalation.currentUser'), ...(ngDevMode ? [{ debugName: "resolvedCurrentUserDisplayName" }] : /* istanbul ignore next */ []));
46
49
  isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : /* istanbul ignore next */ []));
47
50
  submitError = signal(null, ...(ngDevMode ? [{ debugName: "submitError" }] : /* istanbul ignore next */ []));
48
51
  dynamicFormConfig = computed(() => ({
@@ -54,14 +57,14 @@ class EscalationAddDialog {
54
57
  fields: [
55
58
  new TextFieldConfig({
56
59
  key: 'escalatedBy',
57
- label: 'Escalated By',
60
+ label: this.transloco.translate('components.clientComponents.escalation.escalatedBy'),
58
61
  disabled: true,
59
62
  colSpan: 12,
60
63
  order: 1,
61
64
  }),
62
65
  new DateFieldConfig({
63
66
  key: 'startDate',
64
- label: 'Start Date',
67
+ label: this.transloco.translate('components.clientComponents.escalation.startDate'),
65
68
  disabled: true,
66
69
  showIcon: true,
67
70
  colSpan: 6,
@@ -69,8 +72,8 @@ class EscalationAddDialog {
69
72
  }),
70
73
  new TextareaFieldConfig({
71
74
  key: 'reason',
72
- label: 'Reason',
73
- placeholder: 'Describe the escalation reason',
75
+ label: this.transloco.translate('components.clientComponents.escalation.reason'),
76
+ placeholder: this.transloco.translate('components.clientComponents.escalation.reasonPlaceholder'),
74
77
  validators: [ValidatorConfig.required()],
75
78
  rows: 3,
76
79
  autoResize: true,
@@ -79,9 +82,9 @@ class EscalationAddDialog {
79
82
  }),
80
83
  new UploadFileFieldConfig({
81
84
  key: 'attachments',
82
- label: 'Attachments',
83
- title: 'Attachments',
84
- description: 'Upload supporting files',
85
+ label: this.transloco.translate('components.clientComponents.escalation.attachments'),
86
+ title: this.transloco.translate('components.clientComponents.escalation.attachments'),
87
+ description: this.transloco.translate('components.clientComponents.escalation.uploadHelp'),
85
88
  shape: 'card',
86
89
  colSpan: 12,
87
90
  order: 4,
@@ -110,7 +113,7 @@ class EscalationAddDialog {
110
113
  }
111
114
  const payload = this.buildPayload();
112
115
  if (!payload.reason) {
113
- this.submitError.set('Reason is required.');
116
+ this.submitError.set(this.transloco.translate('components.clientComponents.escalation.reasonRequired'));
114
117
  this.escalationFormControl.markAllAsTouched();
115
118
  return;
116
119
  }
@@ -127,7 +130,8 @@ class EscalationAddDialog {
127
130
  this.ref.close(result);
128
131
  },
129
132
  error: (error) => {
130
- this.submitError.set(error?.error?.message ?? 'Failed to create escalation.');
133
+ this.submitError.set(error?.error?.message ??
134
+ this.transloco.translate('components.clientComponents.escalation.createFailed'));
131
135
  },
132
136
  });
133
137
  }
@@ -149,11 +153,11 @@ class EscalationAddDialog {
149
153
  };
150
154
  }
151
155
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EscalationAddDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
152
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EscalationAddDialog, isStandalone: true, selector: "mt-escalation-add-dialog", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, currentUserDisplayName: { classPropertyName: "currentUserDisplayName", publicName: "currentUserDisplayName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"modal.contentClass + ' p-4 flex flex-col gap-4'\">\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfig()\"\r\n [formControl]=\"escalationFormControl\"\r\n />\r\n </form>\r\n\r\n @if (submitError(); as errorMessage) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ errorMessage }}\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\r\n <mt-button\r\n label=\"Cancel\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n label=\"Escalation Up\"\r\n [loading]=\"isSubmitting()\"\r\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\r\n (onClick)=\"createEscalation()\"\r\n />\r\n</div>\r\n", dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
156
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EscalationAddDialog, isStandalone: true, selector: "mt-escalation-add-dialog", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, currentUserDisplayName: { classPropertyName: "currentUserDisplayName", publicName: "currentUserDisplayName", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"modal.contentClass + ' p-4 flex flex-col gap-4'\">\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfig()\"\r\n [formControl]=\"escalationFormControl\"\r\n />\r\n </form>\r\n\r\n @if (submitError(); as errorMessage) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ errorMessage }}\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\r\n <mt-button\r\n [label]=\"'components.clientComponents.escalation.cancel' | transloco\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"'components.clientComponents.escalation.escalationUp' | transloco\"\r\n [loading]=\"isSubmitting()\"\r\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\r\n (onClick)=\"createEscalation()\"\r\n />\r\n</div>\r\n", dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
153
157
  }
154
158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EscalationAddDialog, decorators: [{
155
159
  type: Component,
156
- args: [{ selector: 'mt-escalation-add-dialog', standalone: true, imports: [Button, DynamicForm, ReactiveFormsModule], template: "<div [class]=\"modal.contentClass + ' p-4 flex flex-col gap-4'\">\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfig()\"\r\n [formControl]=\"escalationFormControl\"\r\n />\r\n </form>\r\n\r\n @if (submitError(); as errorMessage) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ errorMessage }}\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\r\n <mt-button\r\n label=\"Cancel\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n label=\"Escalation Up\"\r\n [loading]=\"isSubmitting()\"\r\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\r\n (onClick)=\"createEscalation()\"\r\n />\r\n</div>\r\n" }]
160
+ args: [{ selector: 'mt-escalation-add-dialog', standalone: true, imports: [Button, DynamicForm, ReactiveFormsModule, TranslocoPipe], template: "<div [class]=\"modal.contentClass + ' p-4 flex flex-col gap-4'\">\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfig()\"\r\n [formControl]=\"escalationFormControl\"\r\n />\r\n </form>\r\n\r\n @if (submitError(); as errorMessage) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ errorMessage }}\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\r\n <mt-button\r\n [label]=\"'components.clientComponents.escalation.cancel' | transloco\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"'components.clientComponents.escalation.escalationUp' | transloco\"\r\n [loading]=\"isSubmitting()\"\r\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\r\n (onClick)=\"createEscalation()\"\r\n />\r\n</div>\r\n" }]
157
161
  }], ctorParameters: () => [], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }], currentUserDisplayName: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentUserDisplayName", required: false }] }] } });
158
162
 
159
163
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-client-components-escalation-runtime.mjs","sources":["../../../../packages/masterteam/client-components/escalation-runtime/escalation-runtime.service.ts","../../../../packages/masterteam/client-components/escalation-runtime/escalation-add-dialog.ts","../../../../packages/masterteam/client-components/escalation-runtime/escalation-add-dialog.html","../../../../packages/masterteam/client-components/escalation-runtime/masterteam-client-components-escalation-runtime.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { map } from 'rxjs';\r\nimport {\r\n CreateEscalationPayload,\r\n CreateEscalationResponseData,\r\n EscalationRuntimeContext,\r\n Response,\r\n} from './escalation-runtime.model';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class EscalationRuntimeService {\r\n private readonly http = inject(HttpClient);\r\n\r\n createEscalation(\r\n context: EscalationRuntimeContext,\r\n payload: CreateEscalationPayload,\r\n ) {\r\n return this.http\r\n .post<\r\n Response<CreateEscalationResponseData>\r\n >(`levels/${context.levelId}/${context.levelDataId}/escalations`, payload)\r\n .pipe(map((response) => response.data));\r\n }\r\n}\r\n","import {\r\n Component,\r\n DestroyRef,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport {\r\n DateFieldConfig,\r\n DynamicFormConfig,\r\n TextFieldConfig,\r\n TextareaFieldConfig,\r\n UploadFileFieldConfig,\r\n ValidatorConfig,\r\n} from '@masterteam/components';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\r\nimport { finalize } from 'rxjs';\r\nimport { EscalationRuntimeService } from './escalation-runtime.service';\r\nimport {\r\n CreateEscalationPayload,\r\n EscalationCreateResult,\r\n EscalationRuntimeContext,\r\n} from './escalation-runtime.model';\r\n\r\ninterface EscalationAddFormValue {\r\n startDate: Date;\r\n escalatedBy: string;\r\n reason: string;\r\n attachments: EscalationAttachmentValue | null;\r\n}\r\n\r\ninterface EscalationAttachmentValue {\r\n fileName?: string | null;\r\n}\r\n\r\n@Component({\r\n selector: 'mt-escalation-add-dialog',\r\n standalone: true,\r\n imports: [Button, DynamicForm, ReactiveFormsModule],\r\n templateUrl: './escalation-add-dialog.html',\r\n})\r\nexport default class EscalationAddDialog {\r\n readonly modal = inject(ModalService);\r\n readonly ref = inject(ModalRef);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly escalationRuntimeService = inject(EscalationRuntimeService);\r\n private readonly startedAt = new Date();\r\n\r\n readonly context = input.required<EscalationRuntimeContext>();\r\n readonly currentUserDisplayName = input('Current User');\r\n readonly escalationFormControl = new FormControl<EscalationAddFormValue>(\r\n {\r\n startDate: this.startedAt,\r\n escalatedBy: '',\r\n reason: '',\r\n attachments: null,\r\n },\r\n { nonNullable: true },\r\n );\r\n\r\n readonly resolvedCurrentUserDisplayName = computed(\r\n () => this.currentUserDisplayName().trim() || 'Current User',\r\n );\r\n readonly isSubmitting = signal(false);\r\n readonly submitError = signal<string | null>(null);\r\n readonly dynamicFormConfig = computed<DynamicFormConfig>(() => ({\r\n sections: [\r\n {\r\n key: 'escalation-runtime',\r\n type: 'header',\r\n label: '',\r\n fields: [\r\n new TextFieldConfig({\r\n key: 'escalatedBy',\r\n label: 'Escalated By',\r\n disabled: true,\r\n colSpan: 12,\r\n order: 1,\r\n }),\r\n new DateFieldConfig({\r\n key: 'startDate',\r\n label: 'Start Date',\r\n disabled: true,\r\n showIcon: true,\r\n colSpan: 6,\r\n order: 2,\r\n }),\r\n new TextareaFieldConfig({\r\n key: 'reason',\r\n label: 'Reason',\r\n placeholder: 'Describe the escalation reason',\r\n validators: [ValidatorConfig.required()],\r\n rows: 3,\r\n autoResize: true,\r\n colSpan: 12,\r\n order: 3,\r\n }),\r\n new UploadFileFieldConfig({\r\n key: 'attachments',\r\n label: 'Attachments',\r\n title: 'Attachments',\r\n description: 'Upload supporting files',\r\n shape: 'card',\r\n colSpan: 12,\r\n order: 4,\r\n }),\r\n ],\r\n },\r\n ],\r\n }));\r\n\r\n constructor() {\r\n effect(() => {\r\n this.escalationFormControl.setValue(\r\n {\r\n ...this.escalationFormControl.getRawValue(),\r\n startDate: this.startedAt,\r\n escalatedBy: this.resolvedCurrentUserDisplayName(),\r\n },\r\n { emitEvent: false },\r\n );\r\n });\r\n }\r\n\r\n createEscalation(): void {\r\n if (this.isSubmitting()) {\r\n return;\r\n }\r\n\r\n this.submitError.set(null);\r\n\r\n if (this.escalationFormControl.invalid) {\r\n this.escalationFormControl.markAllAsTouched();\r\n return;\r\n }\r\n\r\n const payload = this.buildPayload();\r\n if (!payload.reason) {\r\n this.submitError.set('Reason is required.');\r\n this.escalationFormControl.markAllAsTouched();\r\n return;\r\n }\r\n\r\n this.isSubmitting.set(true);\r\n\r\n this.escalationRuntimeService\r\n .createEscalation(this.context(), payload)\r\n .pipe(\r\n finalize(() => this.isSubmitting.set(false)),\r\n takeUntilDestroyed(this.destroyRef),\r\n )\r\n .subscribe({\r\n next: (response) => {\r\n const result: EscalationCreateResult = {\r\n instanceId: response.instanceId,\r\n moduleDataId: payload.moduleDataId,\r\n };\r\n this.ref.close(result);\r\n },\r\n error: (error) => {\r\n this.submitError.set(\r\n error?.error?.message ?? 'Failed to create escalation.',\r\n );\r\n },\r\n });\r\n }\r\n\r\n close(): void {\r\n if (this.isSubmitting()) {\r\n return;\r\n }\r\n\r\n this.ref.close();\r\n }\r\n\r\n private buildPayload(): CreateEscalationPayload {\r\n const formValue = this.escalationFormControl.getRawValue();\r\n\r\n return {\r\n moduleDataId: this.context().moduleDataId,\r\n reason: formValue.reason.trim(),\r\n notes: '',\r\n attachments: formValue.attachments?.fileName\r\n ? [formValue.attachments.fileName]\r\n : [],\r\n };\r\n }\r\n}\r\n","<div [class]=\"modal.contentClass + ' p-4 flex flex-col gap-4'\">\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfig()\"\r\n [formControl]=\"escalationFormControl\"\r\n />\r\n </form>\r\n\r\n @if (submitError(); as errorMessage) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ errorMessage }}\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\r\n <mt-button\r\n label=\"Cancel\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n label=\"Escalation Up\"\r\n [loading]=\"isSubmitting()\"\r\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\r\n (onClick)=\"createEscalation()\"\r\n />\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAaa,wBAAwB,CAAA;AAClB,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;IAE1C,gBAAgB,CACd,OAAiC,EACjC,OAAgC,EAAA;QAEhC,OAAO,IAAI,CAAC;AACT,aAAA,IAAI,CAEH,CAAA,OAAA,EAAU,OAAO,CAAC,OAAO,CAAA,CAAA,EAAI,OAAO,CAAC,WAAW,CAAA,YAAA,CAAc,EAAE,OAAO;AACxE,aAAA,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,K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../../../packages/masterteam/client-components/escalation-runtime/escalation-runtime.service.ts","../../../../packages/masterteam/client-components/escalation-runtime/escalation-add-dialog.ts","../../../../packages/masterteam/client-components/escalation-runtime/escalation-add-dialog.html","../../../../packages/masterteam/client-components/escalation-runtime/masterteam-client-components-escalation-runtime.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { map } from 'rxjs';\r\nimport {\r\n CreateEscalationPayload,\r\n CreateEscalationResponseData,\r\n EscalationRuntimeContext,\r\n Response,\r\n} from './escalation-runtime.model';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class EscalationRuntimeService {\r\n private readonly http = inject(HttpClient);\r\n\r\n createEscalation(\r\n context: EscalationRuntimeContext,\r\n payload: CreateEscalationPayload,\r\n ) {\r\n return this.http\r\n .post<\r\n Response<CreateEscalationResponseData>\r\n >(`levels/${context.levelId}/${context.levelDataId}/escalations`, payload)\r\n .pipe(map((response) => response.data));\r\n }\r\n}\r\n","import {\r\n Component,\r\n DestroyRef,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslocoPipe, TranslocoService } from '@jsverse/transloco';\r\nimport {\r\n DateFieldConfig,\r\n DynamicFormConfig,\r\n TextFieldConfig,\r\n TextareaFieldConfig,\r\n UploadFileFieldConfig,\r\n ValidatorConfig,\r\n} from '@masterteam/components';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\r\nimport { finalize } from 'rxjs';\r\nimport { EscalationRuntimeService } from './escalation-runtime.service';\r\nimport {\r\n CreateEscalationPayload,\r\n EscalationCreateResult,\r\n EscalationRuntimeContext,\r\n} from './escalation-runtime.model';\r\n\r\ninterface EscalationAddFormValue {\r\n startDate: Date;\r\n escalatedBy: string;\r\n reason: string;\r\n attachments: EscalationAttachmentValue | null;\r\n}\r\n\r\ninterface EscalationAttachmentValue {\r\n fileName?: string | null;\r\n}\r\n\r\n@Component({\r\n selector: 'mt-escalation-add-dialog',\r\n standalone: true,\r\n imports: [Button, DynamicForm, ReactiveFormsModule, TranslocoPipe],\r\n templateUrl: './escalation-add-dialog.html',\r\n})\r\nexport default class EscalationAddDialog {\r\n readonly modal = inject(ModalService);\r\n readonly ref = inject(ModalRef);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly escalationRuntimeService = inject(EscalationRuntimeService);\r\n private readonly transloco = inject(TranslocoService);\r\n private readonly startedAt = new Date();\r\n\r\n readonly context = input.required<EscalationRuntimeContext>();\r\n readonly currentUserDisplayName = input(\r\n this.transloco.translate(\r\n 'components.clientComponents.escalation.currentUser',\r\n ),\r\n );\r\n readonly escalationFormControl = new FormControl<EscalationAddFormValue>(\r\n {\r\n startDate: this.startedAt,\r\n escalatedBy: '',\r\n reason: '',\r\n attachments: null,\r\n },\r\n { nonNullable: true },\r\n );\r\n\r\n readonly resolvedCurrentUserDisplayName = computed(\r\n () =>\r\n this.currentUserDisplayName().trim() ||\r\n this.transloco.translate(\r\n 'components.clientComponents.escalation.currentUser',\r\n ),\r\n );\r\n readonly isSubmitting = signal(false);\r\n readonly submitError = signal<string | null>(null);\r\n readonly dynamicFormConfig = computed<DynamicFormConfig>(() => ({\r\n sections: [\r\n {\r\n key: 'escalation-runtime',\r\n type: 'header',\r\n label: '',\r\n fields: [\r\n new TextFieldConfig({\r\n key: 'escalatedBy',\r\n label: this.transloco.translate(\r\n 'components.clientComponents.escalation.escalatedBy',\r\n ),\r\n disabled: true,\r\n colSpan: 12,\r\n order: 1,\r\n }),\r\n new DateFieldConfig({\r\n key: 'startDate',\r\n label: this.transloco.translate(\r\n 'components.clientComponents.escalation.startDate',\r\n ),\r\n disabled: true,\r\n showIcon: true,\r\n colSpan: 6,\r\n order: 2,\r\n }),\r\n new TextareaFieldConfig({\r\n key: 'reason',\r\n label: this.transloco.translate(\r\n 'components.clientComponents.escalation.reason',\r\n ),\r\n placeholder: this.transloco.translate(\r\n 'components.clientComponents.escalation.reasonPlaceholder',\r\n ),\r\n validators: [ValidatorConfig.required()],\r\n rows: 3,\r\n autoResize: true,\r\n colSpan: 12,\r\n order: 3,\r\n }),\r\n new UploadFileFieldConfig({\r\n key: 'attachments',\r\n label: this.transloco.translate(\r\n 'components.clientComponents.escalation.attachments',\r\n ),\r\n title: this.transloco.translate(\r\n 'components.clientComponents.escalation.attachments',\r\n ),\r\n description: this.transloco.translate(\r\n 'components.clientComponents.escalation.uploadHelp',\r\n ),\r\n shape: 'card',\r\n colSpan: 12,\r\n order: 4,\r\n }),\r\n ],\r\n },\r\n ],\r\n }));\r\n\r\n constructor() {\r\n effect(() => {\r\n this.escalationFormControl.setValue(\r\n {\r\n ...this.escalationFormControl.getRawValue(),\r\n startDate: this.startedAt,\r\n escalatedBy: this.resolvedCurrentUserDisplayName(),\r\n },\r\n { emitEvent: false },\r\n );\r\n });\r\n }\r\n\r\n createEscalation(): void {\r\n if (this.isSubmitting()) {\r\n return;\r\n }\r\n\r\n this.submitError.set(null);\r\n\r\n if (this.escalationFormControl.invalid) {\r\n this.escalationFormControl.markAllAsTouched();\r\n return;\r\n }\r\n\r\n const payload = this.buildPayload();\r\n if (!payload.reason) {\r\n this.submitError.set(\r\n this.transloco.translate(\r\n 'components.clientComponents.escalation.reasonRequired',\r\n ),\r\n );\r\n this.escalationFormControl.markAllAsTouched();\r\n return;\r\n }\r\n\r\n this.isSubmitting.set(true);\r\n\r\n this.escalationRuntimeService\r\n .createEscalation(this.context(), payload)\r\n .pipe(\r\n finalize(() => this.isSubmitting.set(false)),\r\n takeUntilDestroyed(this.destroyRef),\r\n )\r\n .subscribe({\r\n next: (response) => {\r\n const result: EscalationCreateResult = {\r\n instanceId: response.instanceId,\r\n moduleDataId: payload.moduleDataId,\r\n };\r\n this.ref.close(result);\r\n },\r\n error: (error) => {\r\n this.submitError.set(\r\n error?.error?.message ??\r\n this.transloco.translate(\r\n 'components.clientComponents.escalation.createFailed',\r\n ),\r\n );\r\n },\r\n });\r\n }\r\n\r\n close(): void {\r\n if (this.isSubmitting()) {\r\n return;\r\n }\r\n\r\n this.ref.close();\r\n }\r\n\r\n private buildPayload(): CreateEscalationPayload {\r\n const formValue = this.escalationFormControl.getRawValue();\r\n\r\n return {\r\n moduleDataId: this.context().moduleDataId,\r\n reason: formValue.reason.trim(),\r\n notes: '',\r\n attachments: formValue.attachments?.fileName\r\n ? [formValue.attachments.fileName]\r\n : [],\r\n };\r\n }\r\n}\r\n","<div [class]=\"modal.contentClass + ' p-4 flex flex-col gap-4'\">\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfig()\"\r\n [formControl]=\"escalationFormControl\"\r\n />\r\n </form>\r\n\r\n @if (submitError(); as errorMessage) {\r\n <div\r\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ errorMessage }}\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\r\n <mt-button\r\n [label]=\"'components.clientComponents.escalation.cancel' | transloco\"\r\n variant=\"outlined\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"close()\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"'components.clientComponents.escalation.escalationUp' | transloco\"\r\n [loading]=\"isSubmitting()\"\r\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\r\n (onClick)=\"createEscalation()\"\r\n />\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAaa,wBAAwB,CAAA;AAClB,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;IAE1C,gBAA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,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,sGAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAG9C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;+BACE,0BAA0B,EAAA,UAAA,EACxB,IAAI,EAAA,OAAA,EACP,CAAC,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,0gCAAA,EAAA;;;AE9CpE;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/client-components",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/client-components",
6
6
  "linkDirectory": true,
@@ -16,9 +16,9 @@
16
16
  "rxjs": "^7.8.2",
17
17
  "tailwindcss": "^4.2.2",
18
18
  "tailwindcss-primeui": "^0.6.1",
19
- "@masterteam/forms": "^0.0.73",
20
- "@masterteam/dashboard-builder": "^0.0.28",
21
- "@masterteam/components": "^0.0.164"
19
+ "@masterteam/forms": "^0.0.75",
20
+ "@masterteam/dashboard-builder": "^0.0.29",
21
+ "@masterteam/components": "^0.0.166"
22
22
  },
23
23
  "dependencies": {
24
24
  "tslib": "^2.8.1"
@@ -81,6 +81,7 @@ interface PreviewResponse {
81
81
 
82
82
  declare class ClientInstancePreview implements OnDestroy {
83
83
  private readonly clientInstancePreviewApiService;
84
+ private readonly transloco;
84
85
  private loadSub?;
85
86
  readonly config: _angular_core.InputSignal<ClientInstancePreviewConfig>;
86
87
  /** When true, suppresses the "No preview data" empty-state placeholder so the host can collapse. */
@@ -393,6 +393,7 @@ declare class ClientList implements OnDestroy {
393
393
  protected readonly state: ClientListStateService;
394
394
  private readonly runtimeActions;
395
395
  private readonly runtimeRunner;
396
+ private readonly transloco;
396
397
  readonly configurations: _angular_core.InputSignal<ClientListConfiguration[]>;
397
398
  readonly defaultTake: _angular_core.InputSignal<number>;
398
399
  readonly loaded: _angular_core.OutputEmitterRef<string>;
@@ -48,6 +48,7 @@ declare class EscalationAddDialog {
48
48
  readonly ref: ModalRef<any>;
49
49
  private readonly destroyRef;
50
50
  private readonly escalationRuntimeService;
51
+ private readonly transloco;
51
52
  private readonly startedAt;
52
53
  readonly context: _angular_core.InputSignal<EscalationRuntimeContext>;
53
54
  readonly currentUserDisplayName: _angular_core.InputSignal<string>;