@masterteam/client-components 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/masterteam-client-components-client-list.mjs +1 -1
- package/fesm2022/masterteam-client-components-client-list.mjs.map +1 -1
- package/fesm2022/masterteam-client-components-escalation-runtime.mjs +164 -0
- package/fesm2022/masterteam-client-components-escalation-runtime.mjs.map +1 -0
- package/package.json +17 -12
- package/types/masterteam-client-components-escalation-runtime.d.ts +75 -0
|
@@ -384,7 +384,7 @@ class ClientList {
|
|
|
384
384
|
config.moduleId > 0);
|
|
385
385
|
}
|
|
386
386
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
387
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ClientList, isStandalone: true, selector: "mt-client-list", inputs: { configurations: { classPropertyName: "configurations", publicName: "configurations", isSignal: true, isRequired: true, transformFunction: null }, defaultTake: { classPropertyName: "defaultTake", publicName: "defaultTake", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loaded: "loaded", errored: "errored" }, providers: [ClientListStateService], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\r\n @for (table of tables(); track table.key) {\r\n <section class=\"flex flex-col gap-4\">\r\n <div class=\"flex w-full items-center gap-2\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n @if (table.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n table.expanded\r\n ? table.config.collapse.collapseIcon\r\n : table.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(table.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ table.title || table.moduleKey || \"Table\" }}\r\n </h3>\r\n @if (table.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (table.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (table.expanded || !table.config.collapse.enabled) {\r\n <div\r\n class=\"grid gap-4\"\r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n >\r\n @if (table.config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"slotGridSpan(table.config.layout.startSpan)\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.tableSpan)\">\r\n <mt-card>\r\n @if (table.loading && table.rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table.error) {\r\n <div\r\n class=\"p-3 rounded-lg bg-red-50 text-red-700 border border-red-200 text-sm\"\r\n >\r\n {{ table.error }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [data]=\"table.rows\"\r\n [columns]=\"table.columns\"\r\n [loading]=\"table.loading\"\r\n [lazy]=\"table.config.isPaginated\"\r\n [lazyTotalRecords]=\"table.totalCount\"\r\n [pageSize]=\"table.config.isPaginated ? table.take : 10\"\r\n (lazyLoad)=\"onLazyLoad(table.key, $event)\"\r\n />\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (table.config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "generalSearch", "showFilters", "loading", "updating", "lazy", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "exportable", "exportFilename", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { 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: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
387
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ClientList, isStandalone: true, selector: "mt-client-list", inputs: { configurations: { classPropertyName: "configurations", publicName: "configurations", isSignal: true, isRequired: true, transformFunction: null }, defaultTake: { classPropertyName: "defaultTake", publicName: "defaultTake", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loaded: "loaded", errored: "errored" }, providers: [ClientListStateService], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\r\n @for (table of tables(); track table.key) {\r\n <section class=\"flex flex-col gap-4\">\r\n <div class=\"flex w-full items-center gap-2\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n @if (table.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n table.expanded\r\n ? table.config.collapse.collapseIcon\r\n : table.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(table.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ table.title || table.moduleKey || \"Table\" }}\r\n </h3>\r\n @if (table.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (table.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (table.expanded || !table.config.collapse.enabled) {\r\n <div\r\n class=\"grid gap-4\"\r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n >\r\n @if (table.config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"slotGridSpan(table.config.layout.startSpan)\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.tableSpan)\">\r\n <mt-card>\r\n @if (table.loading && table.rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table.error) {\r\n <div\r\n class=\"p-3 rounded-lg bg-red-50 text-red-700 border border-red-200 text-sm\"\r\n >\r\n {{ table.error }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [data]=\"table.rows\"\r\n [columns]=\"table.columns\"\r\n [loading]=\"table.loading\"\r\n [lazy]=\"table.config.isPaginated\"\r\n [lazyTotalRecords]=\"table.totalCount\"\r\n [pageSize]=\"table.config.isPaginated ? table.take : 10\"\r\n (lazyLoad)=\"onLazyLoad(table.key, $event)\"\r\n />\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (table.config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "showFilters", "loading", "updating", "lazy", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "exportable", "exportFilename", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { 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: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
388
388
|
}
|
|
389
389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientList, decorators: [{
|
|
390
390
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-client-components-client-list.mjs","sources":["../../../../packages/masterteam/client-components/client-list/services/client-list-api.service.ts","../../../../packages/masterteam/client-components/client-list/services/client-list-state.service.ts","../../../../packages/masterteam/client-components/client-list/client-list.ts","../../../../packages/masterteam/client-components/client-list/client-list.html","../../../../packages/masterteam/client-components/client-list/masterteam-client-components-client-list.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport {\n ClientListQuery,\n Response,\n RuntimeTableRowsResponse,\n} from '../models/client-list.model';\n\n@Injectable({ providedIn: 'root' })\nexport class ClientListApiService {\n private readonly http = inject(HttpClient);\n private readonly baseUrl = 'data/tables';\n\n getRows(\n levelId: number,\n levelDataId: number,\n moduleId: number,\n query: ClientListQuery,\n ): Observable<Response<RuntimeTableRowsResponse>> {\n const endpoint = `${this.baseUrl}/level/${levelId}/level-data/${levelDataId}/module/${moduleId}/rows`;\n let params = new HttpParams()\n .set('mode', query.mode)\n .set('skip', query.skip)\n .set('take', query.take);\n\n (query.columnKeys ?? []).forEach((columnKey) => {\n params = params.append('columnKeys', columnKey);\n });\n\n return this.http.get<Response<RuntimeTableRowsResponse>>(endpoint, {\n params,\n });\n }\n}\n","import { Injectable, computed, signal } from '@angular/core';\nimport {\n NormalizedClientListConfiguration,\n ClientListTableState,\n RuntimeTableRowsResponse,\n} from '../models/client-list.model';\nimport { ColumnDef } from '@masterteam/components/table';\n\n@Injectable()\nexport class ClientListStateService {\n readonly tablesByKey = signal<Record<string, ClientListTableState>>({});\n\n readonly tables = computed<ClientListTableState[]>(() =>\n Object.values(this.tablesByKey()).sort((a, b) =>\n a.config.moduleId === b.config.moduleId\n ? a.config.levelDataId - b.config.levelDataId\n : a.config.moduleId - b.config.moduleId,\n ),\n );\n\n setConfigs(configs: ClientListTableState[]): void {\n const next: Record<string, ClientListTableState> = {};\n configs.forEach((table) => {\n const current = this.tablesByKey()[table.key];\n next[table.key] = {\n ...table,\n loading: current?.loading ?? false,\n error: current?.error ?? null,\n title: current?.title ?? table.title,\n moduleKey: current?.moduleKey ?? table.moduleKey,\n columns: current?.columns ?? table.columns,\n rows: current?.rows ?? table.rows,\n skip: current?.skip ?? table.skip,\n take: current?.take ?? table.take,\n totalCount: current?.totalCount ?? table.totalCount,\n expanded: current?.expanded ?? table.expanded,\n };\n });\n this.tablesByKey.set(next);\n }\n\n setLoading(key: string, loading: boolean): void {\n const target = this.tablesByKey()[key];\n if (!target) return;\n this.tablesByKey.set({\n ...this.tablesByKey(),\n [key]: {\n ...target,\n loading,\n },\n });\n }\n\n setError(key: string, message: string | null): void {\n const target = this.tablesByKey()[key];\n if (!target) return;\n this.tablesByKey.set({\n ...this.tablesByKey(),\n [key]: {\n ...target,\n error: message,\n },\n });\n }\n\n setRowsResult(\n key: string,\n response: RuntimeTableRowsResponse,\n config: NormalizedClientListConfiguration,\n skip: number,\n take: number,\n ): void {\n const target = this.tablesByKey()[key];\n if (!target) return;\n\n const columns = this.toColumnDefs(response.columns);\n const rows = response.rows ?? [];\n const title = (config.title ?? '').trim() || response.moduleKey;\n const totalCount =\n config.isPaginated === false\n ? rows.length\n : (response.pagination?.totalCount ?? rows.length);\n\n this.tablesByKey.set({\n ...this.tablesByKey(),\n [key]: {\n ...target,\n title,\n moduleKey: response.moduleKey ?? '',\n columns,\n rows,\n skip,\n take,\n totalCount,\n error: null,\n },\n });\n }\n\n toggleExpanded(key: string): void {\n const target = this.tablesByKey()[key];\n if (!target) return;\n this.tablesByKey.set({\n ...this.tablesByKey(),\n [key]: {\n ...target,\n expanded: !target.expanded,\n },\n });\n }\n\n private toColumnDefs(\n columns: RuntimeTableRowsResponse['columns'],\n ): ColumnDef[] {\n return (columns ?? [])\n .filter((column) => column.isVisible)\n .sort((a, b) => a.order - b.order)\n .map((column) => ({\n key: column.columnKey,\n label: this.toLabel(column.columnKey),\n }));\n }\n\n private toLabel(key: string): string {\n return key\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n .replace(/[_-]+/g, ' ')\n .split(' ')\n .filter(Boolean)\n .map((word) => word[0].toUpperCase() + word.slice(1))\n .join(' ');\n }\n}\n","import {\r\n Component,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n untracked,\r\n OnDestroy,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Subscription } from 'rxjs';\r\nimport { Table } from '@masterteam/components/table';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport { ClientListApiService } from './services/client-list-api.service';\r\nimport { ClientListStateService } from './services/client-list-state.service';\r\nimport {\r\n ClientListConfiguration,\r\n ClientListContentTemplateContext,\r\n ClientListLazyLoadEvent,\r\n ClientListLayoutConfig,\r\n ClientListMode,\r\n NormalizedClientListConfiguration,\r\n ClientListQuery,\r\n ClientListTableState,\r\n} from './models/client-list.model';\r\nimport { Card } from '@masterteam/components/card';\r\n\r\nconst DEFAULT_MODE: ClientListMode = 'auto';\r\nconst DEFAULT_SERVER_PAGE_SIZE = 50;\r\nconst LOCAL_PAGE_SIZE_SOURCE = 100000;\r\nconst DEFAULT_COLLAPSE_ICON = 'arrow.chevron-up';\r\nconst DEFAULT_EXPAND_ICON = 'arrow.chevron-down';\r\nconst DEFAULT_SIDE_CONTENT_SPAN = 3;\r\nconst DEFAULT_GRID_COLUMNS = 12;\r\n\r\n@Component({\r\n selector: 'mt-client-list',\r\n standalone: true,\r\n imports: [CommonModule, Card, Table, Button, SkeletonModule],\r\n providers: [ClientListStateService],\r\n templateUrl: './client-list.html',\r\n})\r\nexport class ClientList implements OnDestroy {\r\n private readonly api = inject(ClientListApiService);\r\n protected readonly state = inject(ClientListStateService);\r\n\r\n readonly configurations = input.required<ClientListConfiguration[]>();\r\n readonly defaultTake = input(DEFAULT_SERVER_PAGE_SIZE);\r\n\r\n readonly loaded = output<string>();\r\n readonly errored = output<{ key: string; message: string }>();\r\n\r\n protected readonly tables = this.state.tables;\r\n protected readonly gridTemplateColumns = `repeat(${DEFAULT_GRID_COLUMNS}, minmax(0, 1fr))`;\r\n private readonly subscriptions = new Map<string, Subscription>();\r\n private readonly inFlightRequestSignatures = new Map<string, string>();\r\n private readonly fulfilledRequestSignatures = new Map<string, string>();\r\n\r\n constructor() {\r\n effect(() => {\r\n const configs = this.configurations();\r\n untracked(() => this.configureTables(configs));\r\n\r\n untracked(() => {\r\n this.state.tables().forEach((table) => {\r\n this.loadTable(table.key, table.config, table.skip, table.take);\r\n });\r\n });\r\n });\r\n }\r\n\r\n onLazyLoad(tableKey: string, event: ClientListLazyLoadEvent): void {\r\n const table = this.state.tablesByKey()[tableKey];\r\n if (!table || !table.config.isPaginated) return;\r\n\r\n const take = Number(event.pageSize ?? table.take);\r\n const skip = Number(event.first ?? 0);\r\n this.loadTable(table.key, table.config, skip, take);\r\n }\r\n\r\n reload(tableKey?: string): void {\r\n if (tableKey) {\r\n this.reloadByKey(tableKey);\r\n return;\r\n }\r\n\r\n this.tables().forEach((table) => {\r\n this.loadTable(table.key, table.config, table.skip, table.take, true);\r\n });\r\n }\r\n\r\n reloadByKey(tableKey: string): void {\r\n const table = this.state.tablesByKey()[tableKey];\r\n if (!table) return;\r\n\r\n this.loadTable(table.key, table.config, table.skip, table.take, true);\r\n }\r\n\r\n toggleExpanded(key: string): void {\r\n this.state.toggleExpanded(key);\r\n }\r\n\r\n slotGridSpan(span: number): string {\r\n return `span ${span} / span ${span}`;\r\n }\r\n\r\n templateContext(\r\n table: ClientListTableState,\r\n ): ClientListContentTemplateContext {\r\n return {\r\n $implicit: table,\r\n table,\r\n };\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((sub) => sub.unsubscribe());\r\n this.subscriptions.clear();\r\n }\r\n\r\n private configureTables(configs: ClientListConfiguration[]): void {\r\n const previousTables = this.state.tablesByKey();\r\n const hasMultipleConfigs = (configs ?? []).length > 1;\r\n const normalized: ClientListTableState[] = (configs ?? []).map(\r\n (config, index) => {\r\n const mode = this.resolveMode(config.mode, config.columnKeys);\r\n const isPaginated = config.isPaginated ?? true;\r\n const take = isPaginated\r\n ? (config.take ?? this.defaultTake())\r\n : LOCAL_PAGE_SIZE_SOURCE;\r\n const collapseEnabled =\r\n (config.collapse?.enabled ?? true) && hasMultipleConfigs;\r\n const layout = this.resolveLayout(config);\r\n const key =\r\n config.key ??\r\n `${config.levelId ?? 'x'}-${config.levelDataId ?? 'x'}-${config.moduleId ?? 'x'}-${index}`;\r\n const current = previousTables[key];\r\n return {\r\n key,\r\n config: this.toNormalizedConfig(\r\n config,\r\n mode,\r\n isPaginated,\r\n take,\r\n collapseEnabled,\r\n layout,\r\n ),\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n columns: [],\r\n rows: [],\r\n skip: current?.skip ?? 0,\r\n take,\r\n totalCount: 0,\r\n expanded: config.collapse?.expandedByDefault ?? true,\r\n };\r\n },\r\n );\r\n\r\n this.state.setConfigs(normalized);\r\n this.cleanupStaleResources(new Set(normalized.map((table) => table.key)));\r\n }\r\n\r\n private loadTable(\r\n key: string,\r\n config: NormalizedClientListConfiguration,\r\n skip: number,\r\n take: number,\r\n force = false,\r\n ): void {\r\n if (!this.hasValidIdentifiers(config)) {\r\n this.state.setLoading(key, false);\r\n this.state.setError(\r\n key,\r\n 'Missing identifiers: levelId, levelDataId and moduleId are required',\r\n );\r\n return;\r\n }\r\n\r\n const query = this.toQuery(config, skip, take);\r\n const requestSignature = this.createRequestSignature(config, query);\r\n\r\n if (force) {\r\n this.inFlightRequestSignatures.delete(key);\r\n this.fulfilledRequestSignatures.delete(key);\r\n } else if (\r\n this.inFlightRequestSignatures.get(key) === requestSignature ||\r\n this.fulfilledRequestSignatures.get(key) === requestSignature\r\n ) {\r\n return;\r\n }\r\n\r\n this.subscriptions.get(key)?.unsubscribe();\r\n this.inFlightRequestSignatures.set(key, requestSignature);\r\n this.state.setLoading(key, true);\r\n this.state.setError(key, null);\r\n\r\n const sub = this.api\r\n .getRows(config.levelId, config.levelDataId, config.moduleId, query)\r\n .subscribe({\r\n next: (response) => {\r\n if (response.data) {\r\n this.state.setRowsResult(\r\n key,\r\n response.data,\r\n config,\r\n query.skip,\r\n query.take,\r\n );\r\n this.fulfilledRequestSignatures.set(key, requestSignature);\r\n this.loaded.emit(key);\r\n } else {\r\n const message = response.message ?? 'Failed to load table rows';\r\n this.state.setError(key, message);\r\n this.errored.emit({ key, message });\r\n }\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n },\r\n error: (error) => {\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to load rows';\r\n this.state.setError(key, message);\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n this.errored.emit({ key, message });\r\n },\r\n });\r\n\r\n this.subscriptions.set(key, sub);\r\n }\r\n\r\n private resolveMode(\r\n mode: ClientListMode | undefined,\r\n columnKeys: string[] | undefined,\r\n ): ClientListMode {\r\n if (mode !== 'override') return DEFAULT_MODE;\r\n return (columnKeys ?? []).length > 0 ? 'override' : DEFAULT_MODE;\r\n }\r\n\r\n private toNormalizedConfig(\r\n config: ClientListConfiguration,\r\n mode: ClientListMode,\r\n isPaginated: boolean,\r\n take: number,\r\n collapseEnabled: boolean,\r\n layout: Required<ClientListLayoutConfig>,\r\n ): NormalizedClientListConfiguration {\r\n return {\r\n levelId: config.levelId as number,\r\n levelDataId: config.levelDataId as number,\r\n moduleId: config.moduleId as number,\r\n mode,\r\n isPaginated,\r\n take,\r\n title: config.title,\r\n columnKeys: config.columnKeys ?? [],\r\n headerStart: config.headerStart,\r\n headerEnd: config.headerEnd,\r\n contentStart: config.contentStart,\r\n contentEnd: config.contentEnd,\r\n collapse: {\r\n enabled: collapseEnabled,\r\n expandedByDefault: config.collapse?.expandedByDefault ?? true,\r\n collapseIcon: config.collapse?.collapseIcon ?? DEFAULT_COLLAPSE_ICON,\r\n expandIcon: config.collapse?.expandIcon ?? DEFAULT_EXPAND_ICON,\r\n },\r\n layout,\r\n };\r\n }\r\n\r\n private resolveLayout(\r\n config: ClientListConfiguration,\r\n ): Required<ClientListLayoutConfig> {\r\n const hasStart = !!config.contentStart;\r\n const hasEnd = !!config.contentEnd;\r\n\r\n const startSpan = hasStart\r\n ? this.clampSpan(config.layout?.startSpan ?? DEFAULT_SIDE_CONTENT_SPAN)\r\n : 0;\r\n let endSpan = hasEnd\r\n ? this.clampSpan(config.layout?.endSpan ?? DEFAULT_SIDE_CONTENT_SPAN)\r\n : 0;\r\n\r\n if (startSpan + endSpan >= DEFAULT_GRID_COLUMNS) {\r\n endSpan = Math.max(0, DEFAULT_GRID_COLUMNS - startSpan - 1);\r\n }\r\n\r\n const availableForTable = Math.max(\r\n 1,\r\n DEFAULT_GRID_COLUMNS - startSpan - endSpan,\r\n );\r\n const tableSpan = this.clampSpan(\r\n config.layout?.tableSpan ?? availableForTable,\r\n 1,\r\n availableForTable,\r\n );\r\n\r\n return {\r\n startSpan,\r\n tableSpan,\r\n endSpan,\r\n };\r\n }\r\n\r\n private clampSpan(\r\n value: number | undefined,\r\n min = 0,\r\n max = DEFAULT_GRID_COLUMNS,\r\n ): number {\r\n const normalized = Number(value ?? min);\r\n if (!Number.isFinite(normalized)) return min;\r\n return Math.min(max, Math.max(min, Math.trunc(normalized)));\r\n }\r\n\r\n private cleanupStaleResources(activeKeys: Set<string>): void {\r\n for (const [key, sub] of this.subscriptions.entries()) {\r\n if (!activeKeys.has(key)) {\r\n sub.unsubscribe();\r\n this.subscriptions.delete(key);\r\n this.inFlightRequestSignatures.delete(key);\r\n this.fulfilledRequestSignatures.delete(key);\r\n }\r\n }\r\n }\r\n\r\n private toQuery(\r\n config: NormalizedClientListConfiguration,\r\n skip: number,\r\n take: number,\r\n ): ClientListQuery {\r\n return {\r\n mode: config.mode,\r\n columnKeys: config.mode === 'override' ? config.columnKeys : undefined,\r\n skip: config.isPaginated ? skip : 0,\r\n take: config.isPaginated ? take : LOCAL_PAGE_SIZE_SOURCE,\r\n };\r\n }\r\n\r\n private createRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n query: ClientListQuery,\r\n ): string {\r\n return [\r\n config.levelId,\r\n config.levelDataId,\r\n config.moduleId,\r\n query.mode,\r\n query.skip,\r\n query.take,\r\n ...(query.columnKeys ?? []),\r\n ].join('|');\r\n }\r\n\r\n private hasValidIdentifiers(\r\n config: NormalizedClientListConfiguration,\r\n ): boolean {\r\n return (\r\n Number.isFinite(config.levelId) &&\r\n config.levelId > 0 &&\r\n Number.isFinite(config.levelDataId) &&\r\n config.levelDataId > 0 &&\r\n Number.isFinite(config.moduleId) &&\r\n config.moduleId > 0\r\n );\r\n }\r\n}\r\n","<div class=\"flex flex-col gap-4\">\r\n @for (table of tables(); track table.key) {\r\n <section class=\"flex flex-col gap-4\">\r\n <div class=\"flex w-full items-center gap-2\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n @if (table.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n table.expanded\r\n ? table.config.collapse.collapseIcon\r\n : table.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(table.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ table.title || table.moduleKey || \"Table\" }}\r\n </h3>\r\n @if (table.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (table.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (table.expanded || !table.config.collapse.enabled) {\r\n <div\r\n class=\"grid gap-4\"\r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n >\r\n @if (table.config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"slotGridSpan(table.config.layout.startSpan)\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.tableSpan)\">\r\n <mt-card>\r\n @if (table.loading && table.rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table.error) {\r\n <div\r\n class=\"p-3 rounded-lg bg-red-50 text-red-700 border border-red-200 text-sm\"\r\n >\r\n {{ table.error }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [data]=\"table.rows\"\r\n [columns]=\"table.columns\"\r\n [loading]=\"table.loading\"\r\n [lazy]=\"table.config.isPaginated\"\r\n [lazyTotalRecords]=\"table.totalCount\"\r\n [pageSize]=\"table.config.isPaginated ? table.take : 10\"\r\n (lazyLoad)=\"onLazyLoad(table.key, $event)\"\r\n />\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (table.config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAUa,oBAAoB,CAAA;AACd,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;IACzB,OAAO,GAAG,aAAa;AAExC,IAAA,OAAO,CACL,OAAe,EACf,WAAmB,EACnB,QAAgB,EAChB,KAAsB,EAAA;AAEtB,QAAA,MAAM,QAAQ,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,CAAA,OAAA,EAAU,OAAO,CAAA,YAAA,EAAe,WAAW,CAAA,QAAA,EAAW,QAAQ,OAAO;AACrG,QAAA,IAAI,MAAM,GAAG,IAAI,UAAU;AACxB,aAAA,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI;AACtB,aAAA,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI;AACtB,aAAA,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC;AAE1B,QAAA,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,SAAS,KAAI;YAC7C,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC;AACjD,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAqC,QAAQ,EAAE;YACjE,MAAM;AACP,SAAA,CAAC;IACJ;uGAvBW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAApB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QA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AA,WAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIhD,UAAU,EAAA,UAAA,EAAA,CAAA;kBAPtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,cACd,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAA,SAAA,EACjD,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,8qHAAA,EAAA;;;AExCrC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-client-components-client-list.mjs","sources":["../../../../packages/masterteam/client-components/client-list/services/client-list-api.service.ts","../../../../packages/masterteam/client-components/client-list/services/client-list-state.service.ts","../../../../packages/masterteam/client-components/client-list/client-list.ts","../../../../packages/masterteam/client-components/client-list/client-list.html","../../../../packages/masterteam/client-components/client-list/masterteam-client-components-client-list.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\r\nimport { HttpClient, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport {\r\n ClientListQuery,\r\n Response,\r\n RuntimeTableRowsResponse,\r\n} from '../models/client-list.model';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ClientListApiService {\r\n private readonly http = inject(HttpClient);\r\n private readonly baseUrl = 'data/tables';\r\n\r\n getRows(\r\n levelId: number,\r\n levelDataId: number,\r\n moduleId: number,\r\n query: ClientListQuery,\r\n ): Observable<Response<RuntimeTableRowsResponse>> {\r\n const endpoint = `${this.baseUrl}/level/${levelId}/level-data/${levelDataId}/module/${moduleId}/rows`;\r\n let params = new HttpParams()\r\n .set('mode', query.mode)\r\n .set('skip', query.skip)\r\n .set('take', query.take);\r\n\r\n (query.columnKeys ?? []).forEach((columnKey) => {\r\n params = params.append('columnKeys', columnKey);\r\n });\r\n\r\n return this.http.get<Response<RuntimeTableRowsResponse>>(endpoint, {\r\n params,\r\n });\r\n }\r\n}\r\n","import { Injectable, computed, signal } from '@angular/core';\r\nimport {\r\n NormalizedClientListConfiguration,\r\n ClientListTableState,\r\n RuntimeTableRowsResponse,\r\n} from '../models/client-list.model';\r\nimport { ColumnDef } from '@masterteam/components/table';\r\n\r\n@Injectable()\r\nexport class ClientListStateService {\r\n readonly tablesByKey = signal<Record<string, ClientListTableState>>({});\r\n\r\n readonly tables = computed<ClientListTableState[]>(() =>\r\n Object.values(this.tablesByKey()).sort((a, b) =>\r\n a.config.moduleId === b.config.moduleId\r\n ? a.config.levelDataId - b.config.levelDataId\r\n : a.config.moduleId - b.config.moduleId,\r\n ),\r\n );\r\n\r\n setConfigs(configs: ClientListTableState[]): void {\r\n const next: Record<string, ClientListTableState> = {};\r\n configs.forEach((table) => {\r\n const current = this.tablesByKey()[table.key];\r\n next[table.key] = {\r\n ...table,\r\n loading: current?.loading ?? false,\r\n error: current?.error ?? null,\r\n title: current?.title ?? table.title,\r\n moduleKey: current?.moduleKey ?? table.moduleKey,\r\n columns: current?.columns ?? table.columns,\r\n rows: current?.rows ?? table.rows,\r\n skip: current?.skip ?? table.skip,\r\n take: current?.take ?? table.take,\r\n totalCount: current?.totalCount ?? table.totalCount,\r\n expanded: current?.expanded ?? table.expanded,\r\n };\r\n });\r\n this.tablesByKey.set(next);\r\n }\r\n\r\n setLoading(key: string, loading: boolean): void {\r\n const target = this.tablesByKey()[key];\r\n if (!target) return;\r\n this.tablesByKey.set({\r\n ...this.tablesByKey(),\r\n [key]: {\r\n ...target,\r\n loading,\r\n },\r\n });\r\n }\r\n\r\n setError(key: string, message: string | null): void {\r\n const target = this.tablesByKey()[key];\r\n if (!target) return;\r\n this.tablesByKey.set({\r\n ...this.tablesByKey(),\r\n [key]: {\r\n ...target,\r\n error: message,\r\n },\r\n });\r\n }\r\n\r\n setRowsResult(\r\n key: string,\r\n response: RuntimeTableRowsResponse,\r\n config: NormalizedClientListConfiguration,\r\n skip: number,\r\n take: number,\r\n ): void {\r\n const target = this.tablesByKey()[key];\r\n if (!target) return;\r\n\r\n const columns = this.toColumnDefs(response.columns);\r\n const rows = response.rows ?? [];\r\n const title = (config.title ?? '').trim() || response.moduleKey;\r\n const totalCount =\r\n config.isPaginated === false\r\n ? rows.length\r\n : (response.pagination?.totalCount ?? rows.length);\r\n\r\n this.tablesByKey.set({\r\n ...this.tablesByKey(),\r\n [key]: {\r\n ...target,\r\n title,\r\n moduleKey: response.moduleKey ?? '',\r\n columns,\r\n rows,\r\n skip,\r\n take,\r\n totalCount,\r\n error: null,\r\n },\r\n });\r\n }\r\n\r\n toggleExpanded(key: string): void {\r\n const target = this.tablesByKey()[key];\r\n if (!target) return;\r\n this.tablesByKey.set({\r\n ...this.tablesByKey(),\r\n [key]: {\r\n ...target,\r\n expanded: !target.expanded,\r\n },\r\n });\r\n }\r\n\r\n private toColumnDefs(\r\n columns: RuntimeTableRowsResponse['columns'],\r\n ): ColumnDef[] {\r\n return (columns ?? [])\r\n .filter((column) => column.isVisible)\r\n .sort((a, b) => a.order - b.order)\r\n .map((column) => ({\r\n key: column.columnKey,\r\n label: this.toLabel(column.columnKey),\r\n }));\r\n }\r\n\r\n private toLabel(key: string): string {\r\n return key\r\n .replace(/([a-z])([A-Z])/g, '$1 $2')\r\n .replace(/[_-]+/g, ' ')\r\n .split(' ')\r\n .filter(Boolean)\r\n .map((word) => word[0].toUpperCase() + word.slice(1))\r\n .join(' ');\r\n }\r\n}\r\n","import {\r\n Component,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n untracked,\r\n OnDestroy,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Subscription } from 'rxjs';\r\nimport { Table } from '@masterteam/components/table';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport { ClientListApiService } from './services/client-list-api.service';\r\nimport { ClientListStateService } from './services/client-list-state.service';\r\nimport {\r\n ClientListConfiguration,\r\n ClientListContentTemplateContext,\r\n ClientListLazyLoadEvent,\r\n ClientListLayoutConfig,\r\n ClientListMode,\r\n NormalizedClientListConfiguration,\r\n ClientListQuery,\r\n ClientListTableState,\r\n} from './models/client-list.model';\r\nimport { Card } from '@masterteam/components/card';\r\n\r\nconst DEFAULT_MODE: ClientListMode = 'auto';\r\nconst DEFAULT_SERVER_PAGE_SIZE = 50;\r\nconst LOCAL_PAGE_SIZE_SOURCE = 100000;\r\nconst DEFAULT_COLLAPSE_ICON = 'arrow.chevron-up';\r\nconst DEFAULT_EXPAND_ICON = 'arrow.chevron-down';\r\nconst DEFAULT_SIDE_CONTENT_SPAN = 3;\r\nconst DEFAULT_GRID_COLUMNS = 12;\r\n\r\n@Component({\r\n selector: 'mt-client-list',\r\n standalone: true,\r\n imports: [CommonModule, Card, Table, Button, SkeletonModule],\r\n providers: [ClientListStateService],\r\n templateUrl: './client-list.html',\r\n})\r\nexport class ClientList implements OnDestroy {\r\n private readonly api = inject(ClientListApiService);\r\n protected readonly state = inject(ClientListStateService);\r\n\r\n readonly configurations = input.required<ClientListConfiguration[]>();\r\n readonly defaultTake = input(DEFAULT_SERVER_PAGE_SIZE);\r\n\r\n readonly loaded = output<string>();\r\n readonly errored = output<{ key: string; message: string }>();\r\n\r\n protected readonly tables = this.state.tables;\r\n protected readonly gridTemplateColumns = `repeat(${DEFAULT_GRID_COLUMNS}, minmax(0, 1fr))`;\r\n private readonly subscriptions = new Map<string, Subscription>();\r\n private readonly inFlightRequestSignatures = new Map<string, string>();\r\n private readonly fulfilledRequestSignatures = new Map<string, string>();\r\n\r\n constructor() {\r\n effect(() => {\r\n const configs = this.configurations();\r\n untracked(() => this.configureTables(configs));\r\n\r\n untracked(() => {\r\n this.state.tables().forEach((table) => {\r\n this.loadTable(table.key, table.config, table.skip, table.take);\r\n });\r\n });\r\n });\r\n }\r\n\r\n onLazyLoad(tableKey: string, event: ClientListLazyLoadEvent): void {\r\n const table = this.state.tablesByKey()[tableKey];\r\n if (!table || !table.config.isPaginated) return;\r\n\r\n const take = Number(event.pageSize ?? table.take);\r\n const skip = Number(event.first ?? 0);\r\n this.loadTable(table.key, table.config, skip, take);\r\n }\r\n\r\n reload(tableKey?: string): void {\r\n if (tableKey) {\r\n this.reloadByKey(tableKey);\r\n return;\r\n }\r\n\r\n this.tables().forEach((table) => {\r\n this.loadTable(table.key, table.config, table.skip, table.take, true);\r\n });\r\n }\r\n\r\n reloadByKey(tableKey: string): void {\r\n const table = this.state.tablesByKey()[tableKey];\r\n if (!table) return;\r\n\r\n this.loadTable(table.key, table.config, table.skip, table.take, true);\r\n }\r\n\r\n toggleExpanded(key: string): void {\r\n this.state.toggleExpanded(key);\r\n }\r\n\r\n slotGridSpan(span: number): string {\r\n return `span ${span} / span ${span}`;\r\n }\r\n\r\n templateContext(\r\n table: ClientListTableState,\r\n ): ClientListContentTemplateContext {\r\n return {\r\n $implicit: table,\r\n table,\r\n };\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.forEach((sub) => sub.unsubscribe());\r\n this.subscriptions.clear();\r\n }\r\n\r\n private configureTables(configs: ClientListConfiguration[]): void {\r\n const previousTables = this.state.tablesByKey();\r\n const hasMultipleConfigs = (configs ?? []).length > 1;\r\n const normalized: ClientListTableState[] = (configs ?? []).map(\r\n (config, index) => {\r\n const mode = this.resolveMode(config.mode, config.columnKeys);\r\n const isPaginated = config.isPaginated ?? true;\r\n const take = isPaginated\r\n ? (config.take ?? this.defaultTake())\r\n : LOCAL_PAGE_SIZE_SOURCE;\r\n const collapseEnabled =\r\n (config.collapse?.enabled ?? true) && hasMultipleConfigs;\r\n const layout = this.resolveLayout(config);\r\n const key =\r\n config.key ??\r\n `${config.levelId ?? 'x'}-${config.levelDataId ?? 'x'}-${config.moduleId ?? 'x'}-${index}`;\r\n const current = previousTables[key];\r\n return {\r\n key,\r\n config: this.toNormalizedConfig(\r\n config,\r\n mode,\r\n isPaginated,\r\n take,\r\n collapseEnabled,\r\n layout,\r\n ),\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n columns: [],\r\n rows: [],\r\n skip: current?.skip ?? 0,\r\n take,\r\n totalCount: 0,\r\n expanded: config.collapse?.expandedByDefault ?? true,\r\n };\r\n },\r\n );\r\n\r\n this.state.setConfigs(normalized);\r\n this.cleanupStaleResources(new Set(normalized.map((table) => table.key)));\r\n }\r\n\r\n private loadTable(\r\n key: string,\r\n config: NormalizedClientListConfiguration,\r\n skip: number,\r\n take: number,\r\n force = false,\r\n ): void {\r\n if (!this.hasValidIdentifiers(config)) {\r\n this.state.setLoading(key, false);\r\n this.state.setError(\r\n key,\r\n 'Missing identifiers: levelId, levelDataId and moduleId are required',\r\n );\r\n return;\r\n }\r\n\r\n const query = this.toQuery(config, skip, take);\r\n const requestSignature = this.createRequestSignature(config, query);\r\n\r\n if (force) {\r\n this.inFlightRequestSignatures.delete(key);\r\n this.fulfilledRequestSignatures.delete(key);\r\n } else if (\r\n this.inFlightRequestSignatures.get(key) === requestSignature ||\r\n this.fulfilledRequestSignatures.get(key) === requestSignature\r\n ) {\r\n return;\r\n }\r\n\r\n this.subscriptions.get(key)?.unsubscribe();\r\n this.inFlightRequestSignatures.set(key, requestSignature);\r\n this.state.setLoading(key, true);\r\n this.state.setError(key, null);\r\n\r\n const sub = this.api\r\n .getRows(config.levelId, config.levelDataId, config.moduleId, query)\r\n .subscribe({\r\n next: (response) => {\r\n if (response.data) {\r\n this.state.setRowsResult(\r\n key,\r\n response.data,\r\n config,\r\n query.skip,\r\n query.take,\r\n );\r\n this.fulfilledRequestSignatures.set(key, requestSignature);\r\n this.loaded.emit(key);\r\n } else {\r\n const message = response.message ?? 'Failed to load table rows';\r\n this.state.setError(key, message);\r\n this.errored.emit({ key, message });\r\n }\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n },\r\n error: (error) => {\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to load rows';\r\n this.state.setError(key, message);\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n this.errored.emit({ key, message });\r\n },\r\n });\r\n\r\n this.subscriptions.set(key, sub);\r\n }\r\n\r\n private resolveMode(\r\n mode: ClientListMode | undefined,\r\n columnKeys: string[] | undefined,\r\n ): ClientListMode {\r\n if (mode !== 'override') return DEFAULT_MODE;\r\n return (columnKeys ?? []).length > 0 ? 'override' : DEFAULT_MODE;\r\n }\r\n\r\n private toNormalizedConfig(\r\n config: ClientListConfiguration,\r\n mode: ClientListMode,\r\n isPaginated: boolean,\r\n take: number,\r\n collapseEnabled: boolean,\r\n layout: Required<ClientListLayoutConfig>,\r\n ): NormalizedClientListConfiguration {\r\n return {\r\n levelId: config.levelId as number,\r\n levelDataId: config.levelDataId as number,\r\n moduleId: config.moduleId as number,\r\n mode,\r\n isPaginated,\r\n take,\r\n title: config.title,\r\n columnKeys: config.columnKeys ?? [],\r\n headerStart: config.headerStart,\r\n headerEnd: config.headerEnd,\r\n contentStart: config.contentStart,\r\n contentEnd: config.contentEnd,\r\n collapse: {\r\n enabled: collapseEnabled,\r\n expandedByDefault: config.collapse?.expandedByDefault ?? true,\r\n collapseIcon: config.collapse?.collapseIcon ?? DEFAULT_COLLAPSE_ICON,\r\n expandIcon: config.collapse?.expandIcon ?? DEFAULT_EXPAND_ICON,\r\n },\r\n layout,\r\n };\r\n }\r\n\r\n private resolveLayout(\r\n config: ClientListConfiguration,\r\n ): Required<ClientListLayoutConfig> {\r\n const hasStart = !!config.contentStart;\r\n const hasEnd = !!config.contentEnd;\r\n\r\n const startSpan = hasStart\r\n ? this.clampSpan(config.layout?.startSpan ?? DEFAULT_SIDE_CONTENT_SPAN)\r\n : 0;\r\n let endSpan = hasEnd\r\n ? this.clampSpan(config.layout?.endSpan ?? DEFAULT_SIDE_CONTENT_SPAN)\r\n : 0;\r\n\r\n if (startSpan + endSpan >= DEFAULT_GRID_COLUMNS) {\r\n endSpan = Math.max(0, DEFAULT_GRID_COLUMNS - startSpan - 1);\r\n }\r\n\r\n const availableForTable = Math.max(\r\n 1,\r\n DEFAULT_GRID_COLUMNS - startSpan - endSpan,\r\n );\r\n const tableSpan = this.clampSpan(\r\n config.layout?.tableSpan ?? availableForTable,\r\n 1,\r\n availableForTable,\r\n );\r\n\r\n return {\r\n startSpan,\r\n tableSpan,\r\n endSpan,\r\n };\r\n }\r\n\r\n private clampSpan(\r\n value: number | undefined,\r\n min = 0,\r\n max = DEFAULT_GRID_COLUMNS,\r\n ): number {\r\n const normalized = Number(value ?? min);\r\n if (!Number.isFinite(normalized)) return min;\r\n return Math.min(max, Math.max(min, Math.trunc(normalized)));\r\n }\r\n\r\n private cleanupStaleResources(activeKeys: Set<string>): void {\r\n for (const [key, sub] of this.subscriptions.entries()) {\r\n if (!activeKeys.has(key)) {\r\n sub.unsubscribe();\r\n this.subscriptions.delete(key);\r\n this.inFlightRequestSignatures.delete(key);\r\n this.fulfilledRequestSignatures.delete(key);\r\n }\r\n }\r\n }\r\n\r\n private toQuery(\r\n config: NormalizedClientListConfiguration,\r\n skip: number,\r\n take: number,\r\n ): ClientListQuery {\r\n return {\r\n mode: config.mode,\r\n columnKeys: config.mode === 'override' ? config.columnKeys : undefined,\r\n skip: config.isPaginated ? skip : 0,\r\n take: config.isPaginated ? take : LOCAL_PAGE_SIZE_SOURCE,\r\n };\r\n }\r\n\r\n private createRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n query: ClientListQuery,\r\n ): string {\r\n return [\r\n config.levelId,\r\n config.levelDataId,\r\n config.moduleId,\r\n query.mode,\r\n query.skip,\r\n query.take,\r\n ...(query.columnKeys ?? []),\r\n ].join('|');\r\n }\r\n\r\n private hasValidIdentifiers(\r\n config: NormalizedClientListConfiguration,\r\n ): boolean {\r\n return (\r\n Number.isFinite(config.levelId) &&\r\n config.levelId > 0 &&\r\n Number.isFinite(config.levelDataId) &&\r\n config.levelDataId > 0 &&\r\n Number.isFinite(config.moduleId) &&\r\n config.moduleId > 0\r\n );\r\n }\r\n}\r\n","<div class=\"flex flex-col gap-4\">\r\n @for (table of tables(); track table.key) {\r\n <section class=\"flex flex-col gap-4\">\r\n <div class=\"flex w-full items-center gap-2\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-2\">\r\n @if (table.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n table.expanded\r\n ? table.config.collapse.collapseIcon\r\n : table.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(table.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ table.title || table.moduleKey || \"Table\" }}\r\n </h3>\r\n @if (table.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (table.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (table.expanded || !table.config.collapse.enabled) {\r\n <div\r\n class=\"grid gap-4\"\r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n >\r\n @if (table.config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"slotGridSpan(table.config.layout.startSpan)\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentStart\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.tableSpan)\">\r\n <mt-card>\r\n @if (table.loading && table.rows.length === 0) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n <p-skeleton height=\"3rem\" />\r\n </div>\r\n } @else if (table.error) {\r\n <div\r\n class=\"p-3 rounded-lg bg-red-50 text-red-700 border border-red-200 text-sm\"\r\n >\r\n {{ table.error }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [data]=\"table.rows\"\r\n [columns]=\"table.columns\"\r\n [loading]=\"table.loading\"\r\n [lazy]=\"table.config.isPaginated\"\r\n [lazyTotalRecords]=\"table.totalCount\"\r\n [pageSize]=\"table.config.isPaginated ? table.take : 10\"\r\n (lazyLoad)=\"onLazyLoad(table.key, $event)\"\r\n />\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (table.config.contentEnd) {\r\n <div [style.gridColumn]=\"slotGridSpan(table.config.layout.endSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table.config.contentEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(table)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAUa,oBAAoB,CAAA;AACd,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;IACzB,OAAO,GAAG,aAAa;AAExC,IAAA,OAAO,CACL,OAAe,EACf,WAAmB,EACnB,QAAgB,EAChB,KAAsB,EAAA;AAEtB,QAAA,MAAM,QAAQ,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,CAAA,OAAA,EAAU,OAAO,CAAA,YAAA,EAAe,WAAW,CAAA,QAAA,EAAW,QAAQ,OAAO;AACrG,QAAA,IAAI,MAAM,GAAG,IAAI,UAAU;AACxB,aAAA,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI;AACtB,aAAA,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI;AACtB,aAAA,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC;AAE1B,QAAA,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,SAAS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A,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,eAAA,EAAA,YAAA,EAAA,UAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,mBAAA,EAAA,aAAA,EAAA,kBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,MAAM,2VAAE,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,OAAA,EAAA,WAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIhD,UAAU,EAAA,UAAA,EAAA,CAAA;kBAPtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,cACd,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAA,SAAA,EACjD,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,8qHAAA,EAAA;;;AExCrC;;AAEG;;;;"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable, DestroyRef, input, computed, signal, effect, Component } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import { TextFieldConfig, DateFieldConfig, TextareaFieldConfig, UploadFileFieldConfig, ValidatorConfig } from '@masterteam/components';
|
|
7
|
+
import { Button } from '@masterteam/components/button';
|
|
8
|
+
import { ModalRef } from '@masterteam/components/dialog';
|
|
9
|
+
import { ModalService } from '@masterteam/components/modal';
|
|
10
|
+
import { DynamicForm } from '@masterteam/forms/dynamic-form';
|
|
11
|
+
import { map, finalize } from 'rxjs';
|
|
12
|
+
import { HttpClient } from '@angular/common/http';
|
|
13
|
+
|
|
14
|
+
class EscalationRuntimeService {
|
|
15
|
+
http = inject(HttpClient);
|
|
16
|
+
createEscalation(context, payload) {
|
|
17
|
+
return this.http
|
|
18
|
+
.post(`levels/${context.levelId}/${context.levelDataId}/escalations`, payload)
|
|
19
|
+
.pipe(map((response) => response.data));
|
|
20
|
+
}
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationRuntimeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationRuntimeService, providedIn: 'root' });
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationRuntimeService, decorators: [{
|
|
25
|
+
type: Injectable,
|
|
26
|
+
args: [{
|
|
27
|
+
providedIn: 'root',
|
|
28
|
+
}]
|
|
29
|
+
}] });
|
|
30
|
+
|
|
31
|
+
class EscalationAddDialog {
|
|
32
|
+
modal = inject(ModalService);
|
|
33
|
+
ref = inject(ModalRef);
|
|
34
|
+
destroyRef = inject(DestroyRef);
|
|
35
|
+
escalationRuntimeService = inject(EscalationRuntimeService);
|
|
36
|
+
startedAt = new Date();
|
|
37
|
+
context = input.required(...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
38
|
+
currentUserDisplayName = input('Current User', ...(ngDevMode ? [{ debugName: "currentUserDisplayName" }] : []));
|
|
39
|
+
escalationFormControl = new FormControl({
|
|
40
|
+
startDate: this.startedAt,
|
|
41
|
+
escalatedBy: '',
|
|
42
|
+
reason: '',
|
|
43
|
+
attachments: null,
|
|
44
|
+
}, { nonNullable: true });
|
|
45
|
+
resolvedCurrentUserDisplayName = computed(() => this.currentUserDisplayName().trim() || 'Current User', ...(ngDevMode ? [{ debugName: "resolvedCurrentUserDisplayName" }] : []));
|
|
46
|
+
isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
|
|
47
|
+
submitError = signal(null, ...(ngDevMode ? [{ debugName: "submitError" }] : []));
|
|
48
|
+
dynamicFormConfig = computed(() => ({
|
|
49
|
+
sections: [
|
|
50
|
+
{
|
|
51
|
+
key: 'escalation-runtime',
|
|
52
|
+
type: 'header',
|
|
53
|
+
label: '',
|
|
54
|
+
fields: [
|
|
55
|
+
new TextFieldConfig({
|
|
56
|
+
key: 'escalatedBy',
|
|
57
|
+
label: 'Escalated By',
|
|
58
|
+
disabled: true,
|
|
59
|
+
colSpan: 12,
|
|
60
|
+
order: 1,
|
|
61
|
+
}),
|
|
62
|
+
new DateFieldConfig({
|
|
63
|
+
key: 'startDate',
|
|
64
|
+
label: 'Start Date',
|
|
65
|
+
disabled: true,
|
|
66
|
+
showIcon: true,
|
|
67
|
+
colSpan: 6,
|
|
68
|
+
order: 2,
|
|
69
|
+
}),
|
|
70
|
+
new TextareaFieldConfig({
|
|
71
|
+
key: 'reason',
|
|
72
|
+
label: 'Reason',
|
|
73
|
+
placeholder: 'Describe the escalation reason',
|
|
74
|
+
validators: [ValidatorConfig.required()],
|
|
75
|
+
rows: 3,
|
|
76
|
+
autoResize: true,
|
|
77
|
+
colSpan: 12,
|
|
78
|
+
order: 3,
|
|
79
|
+
}),
|
|
80
|
+
new UploadFileFieldConfig({
|
|
81
|
+
key: 'attachments',
|
|
82
|
+
label: 'Attachments',
|
|
83
|
+
title: 'Attachments',
|
|
84
|
+
description: 'Upload supporting files',
|
|
85
|
+
shape: 'card',
|
|
86
|
+
colSpan: 12,
|
|
87
|
+
order: 4,
|
|
88
|
+
}),
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
}), ...(ngDevMode ? [{ debugName: "dynamicFormConfig" }] : []));
|
|
93
|
+
constructor() {
|
|
94
|
+
effect(() => {
|
|
95
|
+
this.escalationFormControl.setValue({
|
|
96
|
+
...this.escalationFormControl.getRawValue(),
|
|
97
|
+
startDate: this.startedAt,
|
|
98
|
+
escalatedBy: this.resolvedCurrentUserDisplayName(),
|
|
99
|
+
}, { emitEvent: false });
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
createEscalation() {
|
|
103
|
+
if (this.isSubmitting()) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.submitError.set(null);
|
|
107
|
+
if (this.escalationFormControl.invalid) {
|
|
108
|
+
this.escalationFormControl.markAllAsTouched();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const payload = this.buildPayload();
|
|
112
|
+
if (!payload.reason) {
|
|
113
|
+
this.submitError.set('Reason is required.');
|
|
114
|
+
this.escalationFormControl.markAllAsTouched();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this.isSubmitting.set(true);
|
|
118
|
+
this.escalationRuntimeService
|
|
119
|
+
.createEscalation(this.context(), payload)
|
|
120
|
+
.pipe(finalize(() => this.isSubmitting.set(false)), takeUntilDestroyed(this.destroyRef))
|
|
121
|
+
.subscribe({
|
|
122
|
+
next: (response) => {
|
|
123
|
+
const result = {
|
|
124
|
+
instanceId: response.instanceId,
|
|
125
|
+
moduleDataId: payload.moduleDataId,
|
|
126
|
+
};
|
|
127
|
+
this.ref.close(result);
|
|
128
|
+
},
|
|
129
|
+
error: (error) => {
|
|
130
|
+
this.submitError.set(error?.error?.message ?? 'Failed to create escalation.');
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
close() {
|
|
135
|
+
if (this.isSubmitting()) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
this.ref.close();
|
|
139
|
+
}
|
|
140
|
+
buildPayload() {
|
|
141
|
+
const formValue = this.escalationFormControl.getRawValue();
|
|
142
|
+
return {
|
|
143
|
+
moduleDataId: this.context().moduleDataId,
|
|
144
|
+
reason: formValue.reason.trim(),
|
|
145
|
+
notes: '',
|
|
146
|
+
attachments: formValue.attachments?.fileName
|
|
147
|
+
? [formValue.attachments.fileName]
|
|
148
|
+
: [],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationAddDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
152
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", 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'\">\n <form class=\"col-span-1\">\n <mt-dynamic-form\n [formConfig]=\"dynamicFormConfig()\"\n [formControl]=\"escalationFormControl\"\n />\n </form>\n\n @if (submitError(); as errorMessage) {\n <div\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\n role=\"alert\"\n >\n {{ errorMessage }}\n </div>\n }\n</div>\n\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\n <mt-button\n label=\"Cancel\"\n severity=\"secondary\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"close()\"\n />\n\n <mt-button\n label=\"Escalation Up\"\n [loading]=\"isSubmitting()\"\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\n (onClick)=\"createEscalation()\"\n />\n</div>\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"], 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"] }] });
|
|
153
|
+
}
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationAddDialog, decorators: [{
|
|
155
|
+
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'\">\n <form class=\"col-span-1\">\n <mt-dynamic-form\n [formConfig]=\"dynamicFormConfig()\"\n [formControl]=\"escalationFormControl\"\n />\n </form>\n\n @if (submitError(); as errorMessage) {\n <div\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\n role=\"alert\"\n >\n {{ errorMessage }}\n </div>\n }\n</div>\n\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\n <mt-button\n label=\"Cancel\"\n severity=\"secondary\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"close()\"\n />\n\n <mt-button\n label=\"Escalation Up\"\n [loading]=\"isSubmitting()\"\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\n (onClick)=\"createEscalation()\"\n />\n</div>\n" }]
|
|
157
|
+
}], 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
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Generated bundle index. Do not edit.
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
export { EscalationAddDialog, EscalationRuntimeService };
|
|
164
|
+
//# sourceMappingURL=masterteam-client-components-escalation-runtime.mjs.map
|
|
@@ -0,0 +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';\nimport { Injectable, inject } from '@angular/core';\nimport { map } from 'rxjs';\nimport {\n CreateEscalationPayload,\n CreateEscalationResponseData,\n EscalationRuntimeContext,\n Response,\n} from './escalation-runtime.model';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EscalationRuntimeService {\n private readonly http = inject(HttpClient);\n\n createEscalation(\n context: EscalationRuntimeContext,\n payload: CreateEscalationPayload,\n ) {\n return this.http\n .post<\n Response<CreateEscalationResponseData>\n >(`levels/${context.levelId}/${context.levelDataId}/escalations`, payload)\n .pipe(map((response) => response.data));\n }\n}\n","import {\n Component,\n DestroyRef,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport {\n DateFieldConfig,\n DynamicFormConfig,\n TextFieldConfig,\n TextareaFieldConfig,\n UploadFileFieldConfig,\n ValidatorConfig,\n} from '@masterteam/components';\nimport { Button } from '@masterteam/components/button';\nimport { ModalRef } from '@masterteam/components/dialog';\nimport { ModalService } from '@masterteam/components/modal';\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\nimport { finalize } from 'rxjs';\nimport { EscalationRuntimeService } from './escalation-runtime.service';\nimport {\n CreateEscalationPayload,\n EscalationCreateResult,\n EscalationRuntimeContext,\n} from './escalation-runtime.model';\n\ninterface EscalationAddFormValue {\n startDate: Date;\n escalatedBy: string;\n reason: string;\n attachments: EscalationAttachmentValue | null;\n}\n\ninterface EscalationAttachmentValue {\n fileName?: string | null;\n}\n\n@Component({\n selector: 'mt-escalation-add-dialog',\n standalone: true,\n imports: [Button, DynamicForm, ReactiveFormsModule],\n templateUrl: './escalation-add-dialog.html',\n})\nexport default class EscalationAddDialog {\n readonly modal = inject(ModalService);\n readonly ref = inject(ModalRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly escalationRuntimeService = inject(EscalationRuntimeService);\n private readonly startedAt = new Date();\n\n readonly context = input.required<EscalationRuntimeContext>();\n readonly currentUserDisplayName = input('Current User');\n readonly escalationFormControl = new FormControl<EscalationAddFormValue>(\n {\n startDate: this.startedAt,\n escalatedBy: '',\n reason: '',\n attachments: null,\n },\n { nonNullable: true },\n );\n\n readonly resolvedCurrentUserDisplayName = computed(\n () => this.currentUserDisplayName().trim() || 'Current User',\n );\n readonly isSubmitting = signal(false);\n readonly submitError = signal<string | null>(null);\n readonly dynamicFormConfig = computed<DynamicFormConfig>(() => ({\n sections: [\n {\n key: 'escalation-runtime',\n type: 'header',\n label: '',\n fields: [\n new TextFieldConfig({\n key: 'escalatedBy',\n label: 'Escalated By',\n disabled: true,\n colSpan: 12,\n order: 1,\n }),\n new DateFieldConfig({\n key: 'startDate',\n label: 'Start Date',\n disabled: true,\n showIcon: true,\n colSpan: 6,\n order: 2,\n }),\n new TextareaFieldConfig({\n key: 'reason',\n label: 'Reason',\n placeholder: 'Describe the escalation reason',\n validators: [ValidatorConfig.required()],\n rows: 3,\n autoResize: true,\n colSpan: 12,\n order: 3,\n }),\n new UploadFileFieldConfig({\n key: 'attachments',\n label: 'Attachments',\n title: 'Attachments',\n description: 'Upload supporting files',\n shape: 'card',\n colSpan: 12,\n order: 4,\n }),\n ],\n },\n ],\n }));\n\n constructor() {\n effect(() => {\n this.escalationFormControl.setValue(\n {\n ...this.escalationFormControl.getRawValue(),\n startDate: this.startedAt,\n escalatedBy: this.resolvedCurrentUserDisplayName(),\n },\n { emitEvent: false },\n );\n });\n }\n\n createEscalation(): void {\n if (this.isSubmitting()) {\n return;\n }\n\n this.submitError.set(null);\n\n if (this.escalationFormControl.invalid) {\n this.escalationFormControl.markAllAsTouched();\n return;\n }\n\n const payload = this.buildPayload();\n if (!payload.reason) {\n this.submitError.set('Reason is required.');\n this.escalationFormControl.markAllAsTouched();\n return;\n }\n\n this.isSubmitting.set(true);\n\n this.escalationRuntimeService\n .createEscalation(this.context(), payload)\n .pipe(\n finalize(() => this.isSubmitting.set(false)),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe({\n next: (response) => {\n const result: EscalationCreateResult = {\n instanceId: response.instanceId,\n moduleDataId: payload.moduleDataId,\n };\n this.ref.close(result);\n },\n error: (error) => {\n this.submitError.set(\n error?.error?.message ?? 'Failed to create escalation.',\n );\n },\n });\n }\n\n close(): void {\n if (this.isSubmitting()) {\n return;\n }\n\n this.ref.close();\n }\n\n private buildPayload(): CreateEscalationPayload {\n const formValue = this.escalationFormControl.getRawValue();\n\n return {\n moduleDataId: this.context().moduleDataId,\n reason: formValue.reason.trim(),\n notes: '',\n attachments: formValue.attachments?.fileName\n ? [formValue.attachments.fileName]\n : [],\n };\n }\n}\n","<div [class]=\"modal.contentClass + ' p-4 flex flex-col gap-4'\">\n <form class=\"col-span-1\">\n <mt-dynamic-form\n [formConfig]=\"dynamicFormConfig()\"\n [formControl]=\"escalationFormControl\"\n />\n </form>\n\n @if (submitError(); as errorMessage) {\n <div\n class=\"rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700\"\n role=\"alert\"\n >\n {{ errorMessage }}\n </div>\n }\n</div>\n\n<div [class]=\"modal.footerClass + ' flex items-center justify-end gap-2'\">\n <mt-button\n label=\"Cancel\"\n severity=\"secondary\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"close()\"\n />\n\n <mt-button\n label=\"Escalation Up\"\n [loading]=\"isSubmitting()\"\n [disabled]=\"isSubmitting() || !escalationFormControl.valid\"\n (onClick)=\"createEscalation()\"\n />\n</div>\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,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3C;uGAZW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACoCa,MAAO,mBAAmB,CAAA;AAC7B,IAAA,KAAK,GAAG,MA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AAA,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,CAAA,EAAA,CAAA;;2FAG/B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;+BACE,0BAA0B,EAAA,UAAA,EACxB,IAAI,EAAA,OAAA,EACP,CAAC,MAAM,EAAE,WAAW,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,61BAAA,EAAA;;;AE7CrD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/client-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/client-components",
|
|
6
6
|
"linkDirectory": true,
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@angular/common": "
|
|
11
|
-
"@angular/core": "
|
|
12
|
-
"@angular/forms": "
|
|
13
|
-
"@
|
|
14
|
-
"postcss": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"tailwindcss
|
|
19
|
-
"
|
|
10
|
+
"@angular/common": "^21.0.3",
|
|
11
|
+
"@angular/core": "^21.0.3",
|
|
12
|
+
"@angular/forms": "^21.0.3",
|
|
13
|
+
"@masterteam/forms": "^0.0.42",
|
|
14
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
15
|
+
"postcss": "^8.5.6",
|
|
16
|
+
"primeng": "21.0.1",
|
|
17
|
+
"rxjs": "^7.8.2",
|
|
18
|
+
"tailwindcss": "^4.1.17",
|
|
19
|
+
"tailwindcss-primeui": "^0.6.1",
|
|
20
|
+
"@masterteam/components": "^0.0.95"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"tslib": "^2.8.1"
|
|
@@ -35,6 +36,10 @@
|
|
|
35
36
|
"./client-list": {
|
|
36
37
|
"types": "./types/masterteam-client-components-client-list.d.ts",
|
|
37
38
|
"default": "./fesm2022/masterteam-client-components-client-list.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./escalation-runtime": {
|
|
41
|
+
"types": "./types/masterteam-client-components-escalation-runtime.d.ts",
|
|
42
|
+
"default": "./fesm2022/masterteam-client-components-escalation-runtime.mjs"
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
|
-
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { DynamicFormConfig } from '@masterteam/components';
|
|
4
|
+
import { ModalRef } from '@masterteam/components/dialog';
|
|
5
|
+
import { ModalService } from '@masterteam/components/modal';
|
|
6
|
+
import * as rxjs from 'rxjs';
|
|
7
|
+
|
|
8
|
+
interface Response<T> {
|
|
9
|
+
endpoint: string;
|
|
10
|
+
status: number;
|
|
11
|
+
code: number;
|
|
12
|
+
locale: string;
|
|
13
|
+
message?: string | null;
|
|
14
|
+
errors?: unknown | null;
|
|
15
|
+
data: T;
|
|
16
|
+
cacheSession?: string;
|
|
17
|
+
}
|
|
18
|
+
interface EscalationRuntimeContext {
|
|
19
|
+
levelId: number;
|
|
20
|
+
levelDataId: number;
|
|
21
|
+
moduleDataId: number;
|
|
22
|
+
}
|
|
23
|
+
interface CreateEscalationPayload {
|
|
24
|
+
moduleDataId: number;
|
|
25
|
+
reason: string;
|
|
26
|
+
notes: string;
|
|
27
|
+
attachments: string[];
|
|
28
|
+
}
|
|
29
|
+
interface CreateEscalationResponseData {
|
|
30
|
+
instanceId: number;
|
|
31
|
+
}
|
|
32
|
+
interface EscalationCreateResult {
|
|
33
|
+
instanceId: number;
|
|
34
|
+
moduleDataId: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface EscalationAddFormValue {
|
|
38
|
+
startDate: Date;
|
|
39
|
+
escalatedBy: string;
|
|
40
|
+
reason: string;
|
|
41
|
+
attachments: EscalationAttachmentValue | null;
|
|
42
|
+
}
|
|
43
|
+
interface EscalationAttachmentValue {
|
|
44
|
+
fileName?: string | null;
|
|
45
|
+
}
|
|
46
|
+
declare class EscalationAddDialog {
|
|
47
|
+
readonly modal: ModalService;
|
|
48
|
+
readonly ref: ModalRef<any>;
|
|
49
|
+
private readonly destroyRef;
|
|
50
|
+
private readonly escalationRuntimeService;
|
|
51
|
+
private readonly startedAt;
|
|
52
|
+
readonly context: _angular_core.InputSignal<EscalationRuntimeContext>;
|
|
53
|
+
readonly currentUserDisplayName: _angular_core.InputSignal<string>;
|
|
54
|
+
readonly escalationFormControl: FormControl<EscalationAddFormValue>;
|
|
55
|
+
readonly resolvedCurrentUserDisplayName: _angular_core.Signal<string>;
|
|
56
|
+
readonly isSubmitting: _angular_core.WritableSignal<boolean>;
|
|
57
|
+
readonly submitError: _angular_core.WritableSignal<string | null>;
|
|
58
|
+
readonly dynamicFormConfig: _angular_core.Signal<DynamicFormConfig>;
|
|
59
|
+
constructor();
|
|
60
|
+
createEscalation(): void;
|
|
61
|
+
close(): void;
|
|
62
|
+
private buildPayload;
|
|
63
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationAddDialog, never>;
|
|
64
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EscalationAddDialog, "mt-escalation-add-dialog", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; "currentUserDisplayName": { "alias": "currentUserDisplayName"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class EscalationRuntimeService {
|
|
68
|
+
private readonly http;
|
|
69
|
+
createEscalation(context: EscalationRuntimeContext, payload: CreateEscalationPayload): rxjs.Observable<CreateEscalationResponseData>;
|
|
70
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationRuntimeService, never>;
|
|
71
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EscalationRuntimeService>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { EscalationAddDialog, EscalationRuntimeService };
|
|
75
|
+
export type { CreateEscalationPayload, CreateEscalationResponseData, EscalationCreateResult, EscalationRuntimeContext, Response };
|