@masterteam/client-components 0.0.5 → 0.0.7

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.
@@ -335,6 +335,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
335
335
  const DEFAULT_GRID_COLUMNS$2 = 12;
336
336
  class ClientListTableView {
337
337
  state = input.required(...(ngDevMode ? [{ debugName: "state" }] : []));
338
+ rowActions = input([], ...(ngDevMode ? [{ debugName: "rowActions" }] : []));
338
339
  lazyLoad = output();
339
340
  table = computed(() => {
340
341
  return this.state();
@@ -344,12 +345,12 @@ class ClientListTableView {
344
345
  return `span ${span} / span ${span}`;
345
346
  }
346
347
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientListTableView, deps: [], target: i0.ɵɵFactoryTarget.Component });
347
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\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=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\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)=\"lazyLoad.emit($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]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\r\n />\r\n </div>\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: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
348
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\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=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\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 [rowActions]=\"rowActions()\"\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)=\"lazyLoad.emit($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]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\r\n />\r\n </div>\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: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
348
349
  }
349
350
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientListTableView, decorators: [{
350
351
  type: Component,
351
- args: [{ selector: 'mt-client-list-table-view', standalone: true, imports: [CommonModule, Card, Table, SkeletonModule], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\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=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\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)=\"lazyLoad.emit($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]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n" }]
352
- }], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }] } });
352
+ args: [{ selector: 'mt-client-list-table-view', standalone: true, imports: [CommonModule, Card, Table, SkeletonModule], template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\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=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\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 [rowActions]=\"rowActions()\"\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)=\"lazyLoad.emit($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]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n" }]
353
+ }], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }] } });
353
354
 
354
355
  class ClientListCardsView {
355
356
  state = input.required(...(ngDevMode ? [{ debugName: "state" }] : []));
@@ -721,6 +722,7 @@ class ClientList {
721
722
  headerEnd: config.headerEnd,
722
723
  contentStart: config.contentStart,
723
724
  contentEnd: config.contentEnd,
725
+ rowActions: config.rowActions ?? [],
724
726
  collapse: {
725
727
  enabled: collapseEnabled,
726
728
  expandedByDefault: config.collapse?.expandedByDefault ?? true,
@@ -823,7 +825,7 @@ class ClientList {
823
825
  return 'Missing identifiers: levelId, levelDataId and moduleId are required';
824
826
  }
825
827
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientList, deps: [], target: i0.ɵɵFactoryTarget.Component });
826
- 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 (item of items(); track item.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 (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view [state]=\"item\" />\r\n }\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: 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: ClientListTableView, selector: "mt-client-list-table-view", inputs: ["state"], outputs: ["lazyLoad"] }, { kind: "component", type: ClientListCardsView, selector: "mt-client-list-cards-view", inputs: ["state"] }, { kind: "component", type: ClientListInformativeView, selector: "mt-client-list-informative-view", inputs: ["state"] }] });
828
+ 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 (item of items(); track item.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 (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n [rowActions]=\"item.config.rowActions\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view [state]=\"item\" />\r\n }\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: 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: ClientListTableView, selector: "mt-client-list-table-view", inputs: ["state", "rowActions"], outputs: ["lazyLoad"] }, { kind: "component", type: ClientListCardsView, selector: "mt-client-list-cards-view", inputs: ["state"] }, { kind: "component", type: ClientListInformativeView, selector: "mt-client-list-informative-view", inputs: ["state"] }] });
827
829
  }
828
830
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientList, decorators: [{
829
831
  type: Component,
@@ -833,7 +835,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
833
835
  ClientListTableView,
834
836
  ClientListCardsView,
835
837
  ClientListInformativeView,
836
- ], providers: [ClientListStateService], template: "<div class=\"flex flex-col gap-4\">\r\n @for (item of items(); track item.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 (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view [state]=\"item\" />\r\n }\r\n }\r\n </section>\r\n }\r\n</div>\r\n" }]
838
+ ], providers: [ClientListStateService], template: "<div class=\"flex flex-col gap-4\">\r\n @for (item of items(); track item.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 (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n [rowActions]=\"item.config.rowActions\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view [state]=\"item\" />\r\n }\r\n }\r\n </section>\r\n }\r\n</div>\r\n" }]
837
839
  }], ctorParameters: () => [], propDecorators: { configurations: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurations", required: true }] }], defaultTake: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultTake", required: false }] }], loaded: [{ type: i0.Output, args: ["loaded"] }], errored: [{ type: i0.Output, args: ["errored"] }] } });
838
840
 
839
841
  /**
@@ -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/components/client-list-table-view/client-list-table-view.ts","../../../../packages/masterteam/client-components/client-list/components/client-list-table-view/client-list-table-view.html","../../../../packages/masterteam/client-components/client-list/components/client-list-cards-view/client-list-cards-view.ts","../../../../packages/masterteam/client-components/client-list/components/client-list-cards-view/client-list-cards-view.html","../../../../packages/masterteam/client-components/client-list/components/client-list-informative-view/client-list-informative-view.ts","../../../../packages/masterteam/client-components/client-list/components/client-list-informative-view/client-list-informative-view.html","../../../../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 ClientListCardsPayload,\r\n ClientListInformativeDashboardPayload,\r\n ClientListTableQuery,\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 tablesBaseUrl = 'data/tables';\r\n private readonly cardsBaseUrl = 'data/modules/cards';\r\n private readonly informativeBaseUrl = 'Modules';\r\n\r\n getRows(\r\n levelId: number,\r\n levelDataId: number,\r\n moduleId: number,\r\n query: ClientListTableQuery,\r\n ): Observable<Response<RuntimeTableRowsResponse>> {\r\n const endpoint = `${this.tablesBaseUrl}/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 getCards(\r\n levelDataId: number,\r\n moduleId: number,\r\n ): Observable<Response<ClientListCardsPayload>> {\r\n const params = new HttpParams()\r\n .set('moduleId', moduleId)\r\n .set('levelDataId', levelDataId)\r\n .append('displayAreas', 'card');\r\n\r\n return this.http.get<Response<ClientListCardsPayload>>(this.cardsBaseUrl, {\r\n params,\r\n });\r\n }\r\n\r\n getInformativeDashboard(\r\n moduleId: number,\r\n ): Observable<Response<ClientListInformativeDashboardPayload>> {\r\n return this.http.get<Response<ClientListInformativeDashboardPayload>>(\r\n `${this.informativeBaseUrl}/${moduleId}/dashboard`,\r\n );\r\n }\r\n}\r\n","import { Injectable, computed, signal } from '@angular/core';\r\nimport {\r\n DashboardBuilderData,\r\n DashboardChartItem,\r\n} from '@masterteam/dashboard-builder';\r\nimport {\r\n ClientListCard,\r\n ClientListCardDisplayConfiguration,\r\n ClientListCardDisplayProperty,\r\n ClientListCardProperty,\r\n ClientListCardsPayload,\r\n ClientListInformativeDashboardPayload,\r\n ClientListState,\r\n NormalizedClientListConfiguration,\r\n RuntimeEntityColumnDef,\r\n RuntimeTableApiRow,\r\n RuntimeTableCell,\r\n RuntimeTableColumn,\r\n RuntimeTableDisplayRow,\r\n RuntimeTableRowsResponse,\r\n} from '../models/client-list.model';\r\n\r\n@Injectable()\r\nexport class ClientListStateService {\r\n readonly itemsByKey = signal<Record<string, ClientListState>>({});\r\n\r\n readonly items = computed<ClientListState[]>(() =>\r\n Object.values(this.itemsByKey()).sort((a, b) =>\r\n a.config.moduleId === b.config.moduleId\r\n ? (a.config.levelDataId ?? 0) - (b.config.levelDataId ?? 0)\r\n : a.config.moduleId - b.config.moduleId,\r\n ),\r\n );\r\n\r\n setConfigs(configs: ClientListState[]): void {\r\n const currentItems = this.itemsByKey();\r\n const next: Record<string, ClientListState> = {};\r\n\r\n configs.forEach((item) => {\r\n next[item.key] = this.mergeItemState(item, currentItems[item.key]);\r\n });\r\n\r\n this.itemsByKey.set(next);\r\n }\r\n\r\n setLoading(key: string, loading: boolean): void {\r\n const target = this.itemsByKey()[key];\r\n if (!target) return;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\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.itemsByKey()[key];\r\n if (!target) return;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\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.itemsByKey()[key];\r\n if (\r\n !target ||\r\n target.type === 'informative' ||\r\n target.areaType !== 'table'\r\n ) {\r\n return;\r\n }\r\n\r\n const visibleColumns = this.getVisibleColumns(response.columns);\r\n const columns = this.toColumnDefs(visibleColumns);\r\n const rows = this.toDisplayRows(response.rows ?? [], visibleColumns);\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.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n title,\r\n moduleKey: response.moduleKey ?? '',\r\n columns,\r\n rows,\r\n cards: [],\r\n skip,\r\n take,\r\n totalCount,\r\n error: null,\r\n },\r\n });\r\n }\r\n\r\n setCardsResult(\r\n key: string,\r\n response: ClientListCardsPayload,\r\n config: NormalizedClientListConfiguration,\r\n ): void {\r\n const target = this.itemsByKey()[key];\r\n if (\r\n !target ||\r\n target.type === 'informative' ||\r\n target.areaType !== 'cards'\r\n ) {\r\n return;\r\n }\r\n\r\n const cards = this.toCards(response);\r\n const firstModule = response.details?.[0]?.module;\r\n const moduleKey = firstModule?.key ?? target.moduleKey ?? '';\r\n const title =\r\n (config.title ?? '').trim() ||\r\n firstModule?.name ||\r\n moduleKey ||\r\n target.title;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n title,\r\n moduleKey,\r\n columns: [],\r\n rows: [],\r\n cards,\r\n skip: 0,\r\n take: 0,\r\n totalCount: cards.length,\r\n error: null,\r\n },\r\n });\r\n }\r\n\r\n setInformativeResult(\r\n key: string,\r\n response: ClientListInformativeDashboardPayload | null,\r\n config: NormalizedClientListConfiguration,\r\n ): void {\r\n const target = this.itemsByKey()[key];\r\n if (!target || target.type !== 'informative') return;\r\n\r\n const moduleKey = target.moduleKey || `Module ${config.moduleId}`;\r\n const title =\r\n (config.title ?? '').trim() || target.title || 'Informative Dashboard';\r\n const dashboardData = response\r\n ? this.toDashboardData(response, title)\r\n : null;\r\n const chartsCount = dashboardData?.charts?.length ?? 0;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n title,\r\n moduleKey,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: 0,\r\n take: 0,\r\n totalCount: chartsCount,\r\n dashboardData,\r\n error: null,\r\n },\r\n });\r\n }\r\n\r\n toggleExpanded(key: string): void {\r\n const target = this.itemsByKey()[key];\r\n if (!target) return;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n expanded: !target.expanded,\r\n },\r\n });\r\n }\r\n\r\n private mergeItemState(\r\n item: ClientListState,\r\n existing?: ClientListState,\r\n ): ClientListState {\r\n if (\r\n !existing ||\r\n existing.type !== item.type ||\r\n existing.areaType !== item.areaType\r\n ) {\r\n return item;\r\n }\r\n\r\n return {\r\n ...item,\r\n loading: existing.loading,\r\n error: existing.error,\r\n title: item.title || existing.title,\r\n moduleKey: existing.moduleKey || item.moduleKey,\r\n totalCount: existing.totalCount,\r\n columns: existing.columns,\r\n rows: existing.rows,\r\n cards: existing.cards,\r\n skip: existing.skip,\r\n take: existing.take,\r\n expanded: existing.expanded,\r\n dashboardData: existing.dashboardData,\r\n };\r\n }\r\n\r\n private getVisibleColumns(\r\n columns: RuntimeTableColumn[],\r\n ): RuntimeTableColumn[] {\r\n return (columns ?? [])\r\n .filter((column) => column.isVisible)\r\n .sort((a, b) => a.order - b.order);\r\n }\r\n\r\n private toColumnDefs(\r\n columns: RuntimeTableColumn[],\r\n ): RuntimeEntityColumnDef[] {\r\n return columns.map((column) => ({\r\n ...column,\r\n key: column.columnKey,\r\n label: column.name || this.toLabel(column.columnKey),\r\n runtimeType: column.type,\r\n type: 'entity' as const,\r\n }));\r\n }\r\n\r\n /**\r\n * Enriches each flat API row so that every cell value becomes a\r\n * RuntimeTableCell carrying both the original value and the full\r\n * column metadata. The `Id` key is preserved as-is.\r\n */\r\n private toDisplayRows(\r\n apiRows: RuntimeTableApiRow[],\r\n columns: RuntimeTableColumn[],\r\n ): RuntimeTableDisplayRow[] {\r\n return apiRows.map((row) => {\r\n const displayRow: RuntimeTableDisplayRow = { Id: row['Id'] };\r\n\r\n for (const col of columns) {\r\n displayRow[col.columnKey] = this.toCell(row[col.columnKey], col);\r\n }\r\n\r\n return displayRow;\r\n });\r\n }\r\n\r\n private toCell(value: unknown, column: RuntimeTableColumn): RuntimeTableCell {\r\n return { ...column, value };\r\n }\r\n\r\n private toCards(data?: ClientListCardsPayload): ClientListCard[] {\r\n const details = data?.details ?? [];\r\n if (details.length === 0) {\r\n return [];\r\n }\r\n\r\n const configurationByKey = this.buildDisplayConfigurationLookup(\r\n data?.displayConfigurations ?? [],\r\n );\r\n\r\n return details.flatMap((detailsBlock) =>\r\n (detailsBlock.data ?? []).map((card) => ({\r\n ...card,\r\n module: card.module ?? detailsBlock.module,\r\n entities: this.mapEntities(card.properties ?? [], configurationByKey),\r\n })),\r\n );\r\n }\r\n\r\n private toDashboardData(\r\n data: ClientListInformativeDashboardPayload,\r\n title: string,\r\n ): DashboardBuilderData {\r\n const charts: DashboardChartItem[] = (data.chartLinks ?? []).map((link) => {\r\n const configuration = link.configuration ?? {};\r\n\r\n return {\r\n ...configuration,\r\n id: link.id,\r\n chartComponentId: link.chartComponentId,\r\n } as DashboardChartItem;\r\n });\r\n\r\n return {\r\n page: {\r\n id: data.moduleId,\r\n name: { en: title, ar: title },\r\n type: 'Dashboard',\r\n dashboardConfig: {\r\n ignoreQueryFilter: data.ignoreQueryFilter,\r\n filters: data.filters,\r\n versionNumber: data.versionNumber,\r\n extraInfo: data.extraInfo,\r\n },\r\n },\r\n charts,\r\n dialogs: [],\r\n filters: [],\r\n };\r\n }\r\n\r\n private buildDisplayConfigurationLookup(\r\n displayConfigurations: ClientListCardDisplayConfiguration[],\r\n ): Map<string, ClientListCardDisplayProperty> {\r\n const configurationsByProperty = new Map<\r\n string,\r\n ClientListCardDisplayProperty\r\n >();\r\n\r\n for (const displayConfiguration of displayConfigurations) {\r\n for (const propertyConfiguration of displayConfiguration.properties ??\r\n []) {\r\n if (\r\n propertyConfiguration.areaKey !== 'card' ||\r\n !propertyConfiguration.propertyKey\r\n ) {\r\n continue;\r\n }\r\n\r\n configurationsByProperty.set(\r\n propertyConfiguration.propertyKey.toLowerCase(),\r\n propertyConfiguration,\r\n );\r\n }\r\n }\r\n\r\n return configurationsByProperty;\r\n }\r\n\r\n private mapEntities(\r\n properties: ClientListCardProperty[],\r\n configurationByKey: Map<string, ClientListCardDisplayProperty>,\r\n ): ClientListCard['entities'] {\r\n return properties\r\n .map((property, index) => {\r\n const propertyConfiguration = this.getPropertyConfiguration(\r\n property,\r\n configurationByKey,\r\n );\r\n\r\n return {\r\n ...property,\r\n rawValue: property.rawValue ?? undefined,\r\n order: propertyConfiguration?.order ?? index + 1,\r\n configuration: propertyConfiguration?.configuration ?? { size: 4 },\r\n };\r\n })\r\n .sort((first, second) => (first.order ?? 0) - (second.order ?? 0));\r\n }\r\n\r\n private getPropertyConfiguration(\r\n property: ClientListCardProperty,\r\n configurationByKey: Map<string, ClientListCardDisplayProperty>,\r\n ): ClientListCardDisplayProperty | undefined {\r\n const propertyKeys = [property.normalizedKey, property.key, property.name];\r\n\r\n for (const propertyKey of propertyKeys) {\r\n if (!propertyKey) {\r\n continue;\r\n }\r\n\r\n const configuration = configurationByKey.get(propertyKey.toLowerCase());\r\n if (configuration) {\r\n return configuration;\r\n }\r\n }\r\n\r\n return undefined;\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 { Component, computed, input, output } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { Table } from '@masterteam/components/table';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport {\r\n ClientListLazyLoadEvent,\r\n ClientListState,\r\n ClientListTableState,\r\n} from '../../models/client-list.model';\r\n\r\nconst DEFAULT_GRID_COLUMNS = 12;\r\n\r\n@Component({\r\n selector: 'mt-client-list-table-view',\r\n standalone: true,\r\n imports: [CommonModule, Card, Table, SkeletonModule],\r\n templateUrl: './client-list-table-view.html',\r\n})\r\nexport class ClientListTableView {\r\n readonly state = input.required<ClientListState>();\r\n readonly lazyLoad = output<ClientListLazyLoadEvent>();\r\n\r\n protected readonly table = computed(() => {\r\n return this.state() as ClientListTableState;\r\n });\r\n protected readonly gridTemplateColumns = `repeat(${DEFAULT_GRID_COLUMNS}, minmax(0, 1fr))`;\r\n\r\n protected slotGridSpan(span: number): string {\r\n return `span ${span} / span ${span}`;\r\n }\r\n}\r\n","<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\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=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\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)=\"lazyLoad.emit($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]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { EntitiesPreview } from '@masterteam/components/entities';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport {\r\n ClientListCardsState,\r\n ClientListState,\r\n} from '../../models/client-list.model';\r\n\r\n@Component({\r\n selector: 'mt-client-list-cards-view',\r\n standalone: true,\r\n imports: [CommonModule, Card, EntitiesPreview, SkeletonModule],\r\n templateUrl: './client-list-cards-view.html',\r\n})\r\nexport class ClientListCardsView {\r\n readonly state = input.required<ClientListState>();\r\n\r\n protected readonly cardsState = computed(\r\n () => this.state() as ClientListCardsState,\r\n );\r\n}\r\n","@if (cardsState().loading && cardsState().cards.length === 0) {\r\n <div class=\"grid grid-cols-1 gap-6 md:grid-cols-2 xl:grid-cols-3\">\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <p-skeleton height=\"20rem\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n} @else if (cardsState().error) {\r\n <div class=\"rounded-lg border border-red-200 bg-red-50 p-6 text-red-600\">\r\n {{ cardsState().error }}\r\n </div>\r\n} @else if (cardsState().cards.length === 0) {\r\n <div class=\"p-6 text-center text-gray-400\">No cards found.</div>\r\n} @else {\r\n <div class=\"grid grid-cols-1 gap-5 md:grid-cols-2 xl:grid-cols-3\">\r\n @for (card of cardsState().cards; track card.id) {\r\n <mt-card class=\"cursor-pointer p-3\">\r\n <ng-template #headless>\r\n <mt-entities-preview [entities]=\"card.entities\" />\r\n </ng-template>\r\n </mt-card>\r\n }\r\n </div>\r\n}\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { DashboardViewer } from '@masterteam/dashboard-builder';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport {\r\n ClientListInformativeState,\r\n ClientListState,\r\n} from '../../models/client-list.model';\r\n\r\nconst DEFAULT_GRID_COLUMNS = 12;\r\n\r\n@Component({\r\n selector: 'mt-client-list-informative-view',\r\n standalone: true,\r\n imports: [CommonModule, Card, DashboardViewer, SkeletonModule],\r\n templateUrl: './client-list-informative-view.html',\r\n})\r\nexport class ClientListInformativeView {\r\n readonly state = input.required<ClientListState>();\r\n\r\n protected readonly informativeState = computed(\r\n () => this.state() as ClientListInformativeState,\r\n );\r\n protected readonly gridTemplateColumns = `repeat(${DEFAULT_GRID_COLUMNS}, minmax(0, 1fr))`;\r\n\r\n protected slotGridSpan(span: number): string {\r\n return `span ${span} / span ${span}`;\r\n }\r\n}\r\n","<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (informativeState().config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.startSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: informativeState(),\r\n table: informativeState(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.tableSpan)\r\n \"\r\n >\r\n <mt-card>\r\n @if (\r\n informativeState().loading &&\r\n !informativeState().dashboardData?.charts?.length\r\n ) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"6rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (informativeState().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ informativeState().error }}\r\n </div>\r\n } @else if (!informativeState().dashboardData?.charts?.length) {\r\n <div class=\"p-6 text-center text-gray-400\">\r\n No informative dashboard found.\r\n </div>\r\n } @else {\r\n <div class=\"min-h-[420px]\">\r\n <mt-dashboard-viewer\r\n [isPage]=\"false\"\r\n [showFilters]=\"false\"\r\n [dashboardData]=\"informativeState().dashboardData\"\r\n />\r\n </div>\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (informativeState().config.contentEnd) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.endSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: informativeState(),\r\n table: informativeState(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n</div>\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 { Button } from '@masterteam/components/button';\r\nimport { ClientListApiService } from './services/client-list-api.service';\r\nimport { ClientListStateService } from './services/client-list-state.service';\r\nimport {\r\n ClientListAreaType,\r\n ClientListConfiguration,\r\n ClientListContentTemplateContext,\r\n ClientListLazyLoadEvent,\r\n ClientListLayoutConfig,\r\n ClientListMode,\r\n ClientListState,\r\n ClientListTableQuery,\r\n ClientListType,\r\n NormalizedClientListConfiguration,\r\n} from './models/client-list.model';\r\nimport { ClientListTableView } from './components/client-list-table-view/client-list-table-view';\r\nimport { ClientListCardsView } from './components/client-list-cards-view/client-list-cards-view';\r\nimport { ClientListInformativeView } from './components/client-list-informative-view/client-list-informative-view';\r\n\r\nconst DEFAULT_AREA_TYPE: ClientListAreaType = 'table';\r\nconst DEFAULT_MODE: ClientListMode = 'auto';\r\nconst DEFAULT_TYPE: ClientListType = 'form';\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: [\r\n CommonModule,\r\n Button,\r\n ClientListTableView,\r\n ClientListCardsView,\r\n ClientListInformativeView,\r\n ],\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 items = this.state.items;\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.configureItems(configs));\r\n\r\n untracked(() => {\r\n this.state.items().forEach((item) => {\r\n this.loadItem(item);\r\n });\r\n });\r\n });\r\n }\r\n\r\n onLazyLoad(itemKey: string, event: ClientListLazyLoadEvent): void {\r\n const item = this.state.itemsByKey()[itemKey];\r\n if (\r\n !item ||\r\n item.type === 'informative' ||\r\n item.areaType !== 'table' ||\r\n !item.config.isPaginated\r\n ) {\r\n return;\r\n }\r\n\r\n const take = Number(event.pageSize ?? item.take);\r\n const skip = Number(event.first ?? 0);\r\n this.loadTable(item.key, item.config, skip, take);\r\n }\r\n\r\n reload(itemKey?: string): void {\r\n if (itemKey) {\r\n this.reloadByKey(itemKey);\r\n return;\r\n }\r\n\r\n this.items().forEach((item) => {\r\n this.loadItem(item, true);\r\n });\r\n }\r\n\r\n reloadByKey(itemKey: string): void {\r\n const item = this.state.itemsByKey()[itemKey];\r\n if (!item) return;\r\n\r\n this.loadItem(item, true);\r\n }\r\n\r\n toggleExpanded(key: string): void {\r\n this.state.toggleExpanded(key);\r\n }\r\n\r\n templateContext(item: ClientListState): ClientListContentTemplateContext {\r\n return {\r\n $implicit: item,\r\n table: item,\r\n };\r\n }\r\n\r\n defaultTitle(item: ClientListState): string {\r\n if (item.type === 'informative') {\r\n return 'Informative Dashboard';\r\n }\r\n\r\n return item.areaType === 'cards' ? 'Cards' : 'Table';\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 configureItems(configs: ClientListConfiguration[]): void {\r\n const previousItems = this.state.itemsByKey();\r\n const hasMultipleConfigs = (configs ?? []).length > 1;\r\n\r\n const normalized: ClientListState[] = (configs ?? []).map(\r\n (config, index) => {\r\n const type = this.resolveType(config.type);\r\n const isInformative = type === 'informative';\r\n const areaType = isInformative\r\n ? DEFAULT_AREA_TYPE\r\n : this.resolveAreaType(config.areaType);\r\n const mode = isInformative\r\n ? DEFAULT_MODE\r\n : this.resolveMode(config.mode, config.columnKeys);\r\n const isPaginated =\r\n !isInformative &&\r\n areaType === 'table' &&\r\n (config.isPaginated ?? true);\r\n const take =\r\n !isInformative && areaType === 'table'\r\n ? isPaginated\r\n ? (config.take ?? this.defaultTake())\r\n : LOCAL_PAGE_SIZE_SOURCE\r\n : 0;\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 existing = previousItems[key];\r\n const normalizedConfig = this.toNormalizedConfig(\r\n config,\r\n type,\r\n areaType,\r\n mode,\r\n isPaginated,\r\n take,\r\n collapseEnabled,\r\n layout,\r\n );\r\n\r\n if (isInformative) {\r\n return {\r\n key,\r\n config: normalizedConfig,\r\n type: 'informative',\r\n areaType: 'table',\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n totalCount: 0,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: 0,\r\n take: 0,\r\n expanded:\r\n existing?.expanded ?? config.collapse?.expandedByDefault ?? true,\r\n dashboardData: existing?.dashboardData ?? null,\r\n };\r\n }\r\n\r\n if (areaType === 'cards') {\r\n return {\r\n key,\r\n config: normalizedConfig,\r\n type: 'form',\r\n areaType: 'cards',\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n totalCount: 0,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: 0,\r\n take: 0,\r\n expanded:\r\n existing?.expanded ?? config.collapse?.expandedByDefault ?? true,\r\n dashboardData: null,\r\n };\r\n }\r\n\r\n return {\r\n key,\r\n config: normalizedConfig,\r\n type: 'form',\r\n areaType: 'table',\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n totalCount: 0,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: existing?.areaType === 'table' ? existing.skip : 0,\r\n take,\r\n expanded:\r\n existing?.expanded ?? config.collapse?.expandedByDefault ?? true,\r\n dashboardData: null,\r\n };\r\n },\r\n );\r\n\r\n this.state.setConfigs(normalized);\r\n this.cleanupStaleResources(new Set(normalized.map((item) => item.key)));\r\n }\r\n\r\n private loadItem(item: ClientListState, force = false): void {\r\n if (item.type === 'informative') {\r\n this.loadInformative(item.key, item.config, force);\r\n return;\r\n }\r\n\r\n if (item.areaType === 'cards') {\r\n this.loadCards(item.key, item.config, force);\r\n return;\r\n }\r\n\r\n this.loadTable(item.key, item.config, item.skip, item.take, force);\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(key, this.getMissingIdentifiersMessage(config));\r\n return;\r\n }\r\n\r\n const query = this.toTableQuery(config, skip, take);\r\n const requestSignature = this.createTableRequestSignature(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\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 loadCards(\r\n key: string,\r\n config: NormalizedClientListConfiguration,\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(key, this.getMissingIdentifiersMessage(config));\r\n return;\r\n }\r\n\r\n const requestSignature = this.createCardsRequestSignature(config);\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 .getCards(config.levelDataId, config.moduleId)\r\n .subscribe({\r\n next: (response) => {\r\n if (response.data) {\r\n this.state.setCardsResult(key, response.data, config);\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 cards';\r\n this.state.setError(key, message);\r\n this.errored.emit({ key, message });\r\n }\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 cards';\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 loadInformative(\r\n key: string,\r\n config: NormalizedClientListConfiguration,\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(key, this.getMissingIdentifiersMessage(config));\r\n return;\r\n }\r\n\r\n const requestSignature = this.createInformativeRequestSignature(config);\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.getInformativeDashboard(config.moduleId).subscribe({\r\n next: (response) => {\r\n this.state.setInformativeResult(key, response.data ?? null, config);\r\n this.fulfilledRequestSignatures.set(key, requestSignature);\r\n this.loaded.emit(key);\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n },\r\n error: (error) => {\r\n if (error?.status === 404) {\r\n this.state.setInformativeResult(key, null, config);\r\n this.fulfilledRequestSignatures.set(key, requestSignature);\r\n this.loaded.emit(key);\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n return;\r\n }\r\n\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to load informative dashboard';\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 resolveAreaType(\r\n areaType: ClientListAreaType | undefined,\r\n ): ClientListAreaType {\r\n return areaType === 'cards' ? 'cards' : DEFAULT_AREA_TYPE;\r\n }\r\n\r\n private resolveType(\r\n type: ClientListConfiguration['type'] | undefined,\r\n ): ClientListType {\r\n return type === 'informative' ? 'informative' : DEFAULT_TYPE;\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 type: ClientListType,\r\n areaType: ClientListAreaType,\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 type,\r\n areaType,\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 toTableQuery(\r\n config: NormalizedClientListConfiguration,\r\n skip: number,\r\n take: number,\r\n ): ClientListTableQuery {\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 createTableRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n query: ClientListTableQuery,\r\n ): string {\r\n return [\r\n config.type,\r\n config.areaType,\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 createCardsRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n ): string {\r\n return [\r\n config.type,\r\n config.areaType,\r\n config.levelDataId,\r\n config.moduleId,\r\n 'card',\r\n ].join('|');\r\n }\r\n\r\n private createInformativeRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n ): string {\r\n return [config.type, config.moduleId, 'dashboard'].join('|');\r\n }\r\n\r\n private hasValidIdentifiers(\r\n config: NormalizedClientListConfiguration,\r\n ): boolean {\r\n if (config.type === 'informative') {\r\n return Number.isFinite(config.moduleId) && config.moduleId > 0;\r\n }\r\n\r\n const hasLevelDataId =\r\n Number.isFinite(config.levelDataId) && config.levelDataId > 0;\r\n const hasModuleId = Number.isFinite(config.moduleId) && config.moduleId > 0;\r\n\r\n if (config.areaType === 'cards') {\r\n return hasLevelDataId && hasModuleId;\r\n }\r\n\r\n return (\r\n Number.isFinite(config.levelId) &&\r\n config.levelId > 0 &&\r\n hasLevelDataId &&\r\n hasModuleId\r\n );\r\n }\r\n\r\n private getMissingIdentifiersMessage(\r\n config: NormalizedClientListConfiguration,\r\n ): string {\r\n if (config.type === 'informative') {\r\n return 'Missing identifiers: moduleId is required';\r\n }\r\n\r\n if (config.areaType === 'cards') {\r\n return 'Missing identifiers: levelDataId and moduleId are required';\r\n }\r\n\r\n return 'Missing identifiers: levelId, levelDataId and moduleId are required';\r\n }\r\n}\r\n","<div class=\"flex flex-col gap-4\">\r\n @for (item of items(); track item.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 (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view [state]=\"item\" />\r\n }\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":["DEFAULT_GRID_COLUMNS","i1"],"mappings":";;;;;;;;;;;;;MAYa,oBAAoB,CAAA;AACd,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;IACzB,aAAa,GAAG,aAAa;IAC7B,YAAY,GAAG,oBAAoB;IACnC,kBAAkB,GAAG,SAAS;AAE/C,IAAA,OAAO,CACL,OAAe,EACf,WAAmB,EACnB,QAAgB,EAChB,KAA2B,EAAA;AAE3B,QAAA,MAAM,QAAQ,GAAG,CAAA,EAAG,IAAI,CAAC,aAAa,CAAA,OAAA,EAAU,OAAO,CAAA,YAAA,EAAe,WAAW,CAAA,QAAA,EAAW,QAAQ,OAAO;AAC3G,QAAA,IAAI,MAAM,GAAG,IAAI,UAAU;AACxB,aAAA,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI;AACtB,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AAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,MAAM;wBACN,mBAAmB;wBACnB,mBAAmB;wBACnB,yBAAyB;qBAC1B,EAAA,SAAA,EACU,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,i/DAAA,EAAA;;;AElDrC;;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/components/client-list-table-view/client-list-table-view.ts","../../../../packages/masterteam/client-components/client-list/components/client-list-table-view/client-list-table-view.html","../../../../packages/masterteam/client-components/client-list/components/client-list-cards-view/client-list-cards-view.ts","../../../../packages/masterteam/client-components/client-list/components/client-list-cards-view/client-list-cards-view.html","../../../../packages/masterteam/client-components/client-list/components/client-list-informative-view/client-list-informative-view.ts","../../../../packages/masterteam/client-components/client-list/components/client-list-informative-view/client-list-informative-view.html","../../../../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 ClientListCardsPayload,\r\n ClientListInformativeDashboardPayload,\r\n ClientListTableQuery,\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 tablesBaseUrl = 'data/tables';\r\n private readonly cardsBaseUrl = 'data/modules/cards';\r\n private readonly informativeBaseUrl = 'Modules';\r\n\r\n getRows(\r\n levelId: number,\r\n levelDataId: number,\r\n moduleId: number,\r\n query: ClientListTableQuery,\r\n ): Observable<Response<RuntimeTableRowsResponse>> {\r\n const endpoint = `${this.tablesBaseUrl}/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 getCards(\r\n levelDataId: number,\r\n moduleId: number,\r\n ): Observable<Response<ClientListCardsPayload>> {\r\n const params = new HttpParams()\r\n .set('moduleId', moduleId)\r\n .set('levelDataId', levelDataId)\r\n .append('displayAreas', 'card');\r\n\r\n return this.http.get<Response<ClientListCardsPayload>>(this.cardsBaseUrl, {\r\n params,\r\n });\r\n }\r\n\r\n getInformativeDashboard(\r\n moduleId: number,\r\n ): Observable<Response<ClientListInformativeDashboardPayload>> {\r\n return this.http.get<Response<ClientListInformativeDashboardPayload>>(\r\n `${this.informativeBaseUrl}/${moduleId}/dashboard`,\r\n );\r\n }\r\n}\r\n","import { Injectable, computed, signal } from '@angular/core';\r\nimport {\r\n DashboardBuilderData,\r\n DashboardChartItem,\r\n} from '@masterteam/dashboard-builder';\r\nimport {\r\n ClientListCard,\r\n ClientListCardDisplayConfiguration,\r\n ClientListCardDisplayProperty,\r\n ClientListCardProperty,\r\n ClientListCardsPayload,\r\n ClientListInformativeDashboardPayload,\r\n ClientListState,\r\n NormalizedClientListConfiguration,\r\n RuntimeEntityColumnDef,\r\n RuntimeTableApiRow,\r\n RuntimeTableCell,\r\n RuntimeTableColumn,\r\n RuntimeTableDisplayRow,\r\n RuntimeTableRowsResponse,\r\n} from '../models/client-list.model';\r\n\r\n@Injectable()\r\nexport class ClientListStateService {\r\n readonly itemsByKey = signal<Record<string, ClientListState>>({});\r\n\r\n readonly items = computed<ClientListState[]>(() =>\r\n Object.values(this.itemsByKey()).sort((a, b) =>\r\n a.config.moduleId === b.config.moduleId\r\n ? (a.config.levelDataId ?? 0) - (b.config.levelDataId ?? 0)\r\n : a.config.moduleId - b.config.moduleId,\r\n ),\r\n );\r\n\r\n setConfigs(configs: ClientListState[]): void {\r\n const currentItems = this.itemsByKey();\r\n const next: Record<string, ClientListState> = {};\r\n\r\n configs.forEach((item) => {\r\n next[item.key] = this.mergeItemState(item, currentItems[item.key]);\r\n });\r\n\r\n this.itemsByKey.set(next);\r\n }\r\n\r\n setLoading(key: string, loading: boolean): void {\r\n const target = this.itemsByKey()[key];\r\n if (!target) return;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\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.itemsByKey()[key];\r\n if (!target) return;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\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.itemsByKey()[key];\r\n if (\r\n !target ||\r\n target.type === 'informative' ||\r\n target.areaType !== 'table'\r\n ) {\r\n return;\r\n }\r\n\r\n const visibleColumns = this.getVisibleColumns(response.columns);\r\n const columns = this.toColumnDefs(visibleColumns);\r\n const rows = this.toDisplayRows(response.rows ?? [], visibleColumns);\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.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n title,\r\n moduleKey: response.moduleKey ?? '',\r\n columns,\r\n rows,\r\n cards: [],\r\n skip,\r\n take,\r\n totalCount,\r\n error: null,\r\n },\r\n });\r\n }\r\n\r\n setCardsResult(\r\n key: string,\r\n response: ClientListCardsPayload,\r\n config: NormalizedClientListConfiguration,\r\n ): void {\r\n const target = this.itemsByKey()[key];\r\n if (\r\n !target ||\r\n target.type === 'informative' ||\r\n target.areaType !== 'cards'\r\n ) {\r\n return;\r\n }\r\n\r\n const cards = this.toCards(response);\r\n const firstModule = response.details?.[0]?.module;\r\n const moduleKey = firstModule?.key ?? target.moduleKey ?? '';\r\n const title =\r\n (config.title ?? '').trim() ||\r\n firstModule?.name ||\r\n moduleKey ||\r\n target.title;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n title,\r\n moduleKey,\r\n columns: [],\r\n rows: [],\r\n cards,\r\n skip: 0,\r\n take: 0,\r\n totalCount: cards.length,\r\n error: null,\r\n },\r\n });\r\n }\r\n\r\n setInformativeResult(\r\n key: string,\r\n response: ClientListInformativeDashboardPayload | null,\r\n config: NormalizedClientListConfiguration,\r\n ): void {\r\n const target = this.itemsByKey()[key];\r\n if (!target || target.type !== 'informative') return;\r\n\r\n const moduleKey = target.moduleKey || `Module ${config.moduleId}`;\r\n const title =\r\n (config.title ?? '').trim() || target.title || 'Informative Dashboard';\r\n const dashboardData = response\r\n ? this.toDashboardData(response, title)\r\n : null;\r\n const chartsCount = dashboardData?.charts?.length ?? 0;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n title,\r\n moduleKey,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: 0,\r\n take: 0,\r\n totalCount: chartsCount,\r\n dashboardData,\r\n error: null,\r\n },\r\n });\r\n }\r\n\r\n toggleExpanded(key: string): void {\r\n const target = this.itemsByKey()[key];\r\n if (!target) return;\r\n\r\n this.itemsByKey.set({\r\n ...this.itemsByKey(),\r\n [key]: {\r\n ...target,\r\n expanded: !target.expanded,\r\n },\r\n });\r\n }\r\n\r\n private mergeItemState(\r\n item: ClientListState,\r\n existing?: ClientListState,\r\n ): ClientListState {\r\n if (\r\n !existing ||\r\n existing.type !== item.type ||\r\n existing.areaType !== item.areaType\r\n ) {\r\n return item;\r\n }\r\n\r\n return {\r\n ...item,\r\n loading: existing.loading,\r\n error: existing.error,\r\n title: item.title || existing.title,\r\n moduleKey: existing.moduleKey || item.moduleKey,\r\n totalCount: existing.totalCount,\r\n columns: existing.columns,\r\n rows: existing.rows,\r\n cards: existing.cards,\r\n skip: existing.skip,\r\n take: existing.take,\r\n expanded: existing.expanded,\r\n dashboardData: existing.dashboardData,\r\n };\r\n }\r\n\r\n private getVisibleColumns(\r\n columns: RuntimeTableColumn[],\r\n ): RuntimeTableColumn[] {\r\n return (columns ?? [])\r\n .filter((column) => column.isVisible)\r\n .sort((a, b) => a.order - b.order);\r\n }\r\n\r\n private toColumnDefs(\r\n columns: RuntimeTableColumn[],\r\n ): RuntimeEntityColumnDef[] {\r\n return columns.map((column) => ({\r\n ...column,\r\n key: column.columnKey,\r\n label: column.name || this.toLabel(column.columnKey),\r\n runtimeType: column.type,\r\n type: 'entity' as const,\r\n }));\r\n }\r\n\r\n /**\r\n * Enriches each flat API row so that every cell value becomes a\r\n * RuntimeTableCell carrying both the original value and the full\r\n * column metadata. The `Id` key is preserved as-is.\r\n */\r\n private toDisplayRows(\r\n apiRows: RuntimeTableApiRow[],\r\n columns: RuntimeTableColumn[],\r\n ): RuntimeTableDisplayRow[] {\r\n return apiRows.map((row) => {\r\n const displayRow: RuntimeTableDisplayRow = { Id: row['Id'] };\r\n\r\n for (const col of columns) {\r\n displayRow[col.columnKey] = this.toCell(row[col.columnKey], col);\r\n }\r\n\r\n return displayRow;\r\n });\r\n }\r\n\r\n private toCell(value: unknown, column: RuntimeTableColumn): RuntimeTableCell {\r\n return { ...column, value };\r\n }\r\n\r\n private toCards(data?: ClientListCardsPayload): ClientListCard[] {\r\n const details = data?.details ?? [];\r\n if (details.length === 0) {\r\n return [];\r\n }\r\n\r\n const configurationByKey = this.buildDisplayConfigurationLookup(\r\n data?.displayConfigurations ?? [],\r\n );\r\n\r\n return details.flatMap((detailsBlock) =>\r\n (detailsBlock.data ?? []).map((card) => ({\r\n ...card,\r\n module: card.module ?? detailsBlock.module,\r\n entities: this.mapEntities(card.properties ?? [], configurationByKey),\r\n })),\r\n );\r\n }\r\n\r\n private toDashboardData(\r\n data: ClientListInformativeDashboardPayload,\r\n title: string,\r\n ): DashboardBuilderData {\r\n const charts: DashboardChartItem[] = (data.chartLinks ?? []).map((link) => {\r\n const configuration = link.configuration ?? {};\r\n\r\n return {\r\n ...configuration,\r\n id: link.id,\r\n chartComponentId: link.chartComponentId,\r\n } as DashboardChartItem;\r\n });\r\n\r\n return {\r\n page: {\r\n id: data.moduleId,\r\n name: { en: title, ar: title },\r\n type: 'Dashboard',\r\n dashboardConfig: {\r\n ignoreQueryFilter: data.ignoreQueryFilter,\r\n filters: data.filters,\r\n versionNumber: data.versionNumber,\r\n extraInfo: data.extraInfo,\r\n },\r\n },\r\n charts,\r\n dialogs: [],\r\n filters: [],\r\n };\r\n }\r\n\r\n private buildDisplayConfigurationLookup(\r\n displayConfigurations: ClientListCardDisplayConfiguration[],\r\n ): Map<string, ClientListCardDisplayProperty> {\r\n const configurationsByProperty = new Map<\r\n string,\r\n ClientListCardDisplayProperty\r\n >();\r\n\r\n for (const displayConfiguration of displayConfigurations) {\r\n for (const propertyConfiguration of displayConfiguration.properties ??\r\n []) {\r\n if (\r\n propertyConfiguration.areaKey !== 'card' ||\r\n !propertyConfiguration.propertyKey\r\n ) {\r\n continue;\r\n }\r\n\r\n configurationsByProperty.set(\r\n propertyConfiguration.propertyKey.toLowerCase(),\r\n propertyConfiguration,\r\n );\r\n }\r\n }\r\n\r\n return configurationsByProperty;\r\n }\r\n\r\n private mapEntities(\r\n properties: ClientListCardProperty[],\r\n configurationByKey: Map<string, ClientListCardDisplayProperty>,\r\n ): ClientListCard['entities'] {\r\n return properties\r\n .map((property, index) => {\r\n const propertyConfiguration = this.getPropertyConfiguration(\r\n property,\r\n configurationByKey,\r\n );\r\n\r\n return {\r\n ...property,\r\n rawValue: property.rawValue ?? undefined,\r\n order: propertyConfiguration?.order ?? index + 1,\r\n configuration: propertyConfiguration?.configuration ?? { size: 4 },\r\n };\r\n })\r\n .sort((first, second) => (first.order ?? 0) - (second.order ?? 0));\r\n }\r\n\r\n private getPropertyConfiguration(\r\n property: ClientListCardProperty,\r\n configurationByKey: Map<string, ClientListCardDisplayProperty>,\r\n ): ClientListCardDisplayProperty | undefined {\r\n const propertyKeys = [property.normalizedKey, property.key, property.name];\r\n\r\n for (const propertyKey of propertyKeys) {\r\n if (!propertyKey) {\r\n continue;\r\n }\r\n\r\n const configuration = configurationByKey.get(propertyKey.toLowerCase());\r\n if (configuration) {\r\n return configuration;\r\n }\r\n }\r\n\r\n return undefined;\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 { Component, computed, input, output } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { Table, TableAction } from '@masterteam/components/table';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport {\r\n ClientListLazyLoadEvent,\r\n ClientListState,\r\n ClientListTableState,\r\n} from '../../models/client-list.model';\r\n\r\nconst DEFAULT_GRID_COLUMNS = 12;\r\n\r\n@Component({\r\n selector: 'mt-client-list-table-view',\r\n standalone: true,\r\n imports: [CommonModule, Card, Table, SkeletonModule],\r\n templateUrl: './client-list-table-view.html',\r\n})\r\nexport class ClientListTableView {\r\n readonly state = input.required<ClientListState>();\r\n readonly rowActions = input<TableAction[]>([]);\r\n readonly lazyLoad = output<ClientListLazyLoadEvent>();\r\n\r\n protected readonly table = computed(() => {\r\n return this.state() as ClientListTableState;\r\n });\r\n protected readonly gridTemplateColumns = `repeat(${DEFAULT_GRID_COLUMNS}, minmax(0, 1fr))`;\r\n\r\n protected slotGridSpan(span: number): string {\r\n return `span ${span} / span ${span}`;\r\n }\r\n}\r\n","<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (table().config.contentStart) {\r\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"table().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\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=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\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 [rowActions]=\"rowActions()\"\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)=\"lazyLoad.emit($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]=\"{\r\n $implicit: table(),\r\n table: table(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n</div>\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { EntitiesPreview } from '@masterteam/components/entities';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport {\r\n ClientListCardsState,\r\n ClientListState,\r\n} from '../../models/client-list.model';\r\n\r\n@Component({\r\n selector: 'mt-client-list-cards-view',\r\n standalone: true,\r\n imports: [CommonModule, Card, EntitiesPreview, SkeletonModule],\r\n templateUrl: './client-list-cards-view.html',\r\n})\r\nexport class ClientListCardsView {\r\n readonly state = input.required<ClientListState>();\r\n\r\n protected readonly cardsState = computed(\r\n () => this.state() as ClientListCardsState,\r\n );\r\n}\r\n","@if (cardsState().loading && cardsState().cards.length === 0) {\r\n <div class=\"grid grid-cols-1 gap-6 md:grid-cols-2 xl:grid-cols-3\">\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <p-skeleton height=\"20rem\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n} @else if (cardsState().error) {\r\n <div class=\"rounded-lg border border-red-200 bg-red-50 p-6 text-red-600\">\r\n {{ cardsState().error }}\r\n </div>\r\n} @else if (cardsState().cards.length === 0) {\r\n <div class=\"p-6 text-center text-gray-400\">No cards found.</div>\r\n} @else {\r\n <div class=\"grid grid-cols-1 gap-5 md:grid-cols-2 xl:grid-cols-3\">\r\n @for (card of cardsState().cards; track card.id) {\r\n <mt-card class=\"cursor-pointer p-3\">\r\n <ng-template #headless>\r\n <mt-entities-preview [entities]=\"card.entities\" />\r\n </ng-template>\r\n </mt-card>\r\n }\r\n </div>\r\n}\r\n","import { Component, computed, input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { DashboardViewer } from '@masterteam/dashboard-builder';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\nimport {\r\n ClientListInformativeState,\r\n ClientListState,\r\n} from '../../models/client-list.model';\r\n\r\nconst DEFAULT_GRID_COLUMNS = 12;\r\n\r\n@Component({\r\n selector: 'mt-client-list-informative-view',\r\n standalone: true,\r\n imports: [CommonModule, Card, DashboardViewer, SkeletonModule],\r\n templateUrl: './client-list-informative-view.html',\r\n})\r\nexport class ClientListInformativeView {\r\n readonly state = input.required<ClientListState>();\r\n\r\n protected readonly informativeState = computed(\r\n () => this.state() as ClientListInformativeState,\r\n );\r\n protected readonly gridTemplateColumns = `repeat(${DEFAULT_GRID_COLUMNS}, minmax(0, 1fr))`;\r\n\r\n protected slotGridSpan(span: number): string {\r\n return `span ${span} / span ${span}`;\r\n }\r\n}\r\n","<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\r\n @if (informativeState().config.contentStart) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.startSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentStart\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: informativeState(),\r\n table: informativeState(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.tableSpan)\r\n \"\r\n >\r\n <mt-card>\r\n @if (\r\n informativeState().loading &&\r\n !informativeState().dashboardData?.charts?.length\r\n ) {\r\n <div class=\"flex flex-col gap-3 py-3\">\r\n <p-skeleton height=\"6rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (informativeState().error) {\r\n <div\r\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n >\r\n {{ informativeState().error }}\r\n </div>\r\n } @else if (!informativeState().dashboardData?.charts?.length) {\r\n <div class=\"p-6 text-center text-gray-400\">\r\n No informative dashboard found.\r\n </div>\r\n } @else {\r\n <div class=\"min-h-[420px]\">\r\n <mt-dashboard-viewer\r\n [isPage]=\"false\"\r\n [showFilters]=\"false\"\r\n [dashboardData]=\"informativeState().dashboardData\"\r\n />\r\n </div>\r\n }\r\n </mt-card>\r\n </div>\r\n\r\n @if (informativeState().config.contentEnd) {\r\n <div\r\n [style.gridColumn]=\"\r\n slotGridSpan(informativeState().config.layout.endSpan)\r\n \"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"informativeState().config.contentEnd\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: informativeState(),\r\n table: informativeState(),\r\n }\"\r\n />\r\n </div>\r\n }\r\n</div>\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 { Button } from '@masterteam/components/button';\r\nimport { ClientListApiService } from './services/client-list-api.service';\r\nimport { ClientListStateService } from './services/client-list-state.service';\r\nimport {\r\n ClientListAreaType,\r\n ClientListConfiguration,\r\n ClientListContentTemplateContext,\r\n ClientListLazyLoadEvent,\r\n ClientListLayoutConfig,\r\n ClientListMode,\r\n ClientListState,\r\n ClientListTableQuery,\r\n ClientListType,\r\n NormalizedClientListConfiguration,\r\n} from './models/client-list.model';\r\nimport { ClientListTableView } from './components/client-list-table-view/client-list-table-view';\r\nimport { ClientListCardsView } from './components/client-list-cards-view/client-list-cards-view';\r\nimport { ClientListInformativeView } from './components/client-list-informative-view/client-list-informative-view';\r\n\r\nconst DEFAULT_AREA_TYPE: ClientListAreaType = 'table';\r\nconst DEFAULT_MODE: ClientListMode = 'auto';\r\nconst DEFAULT_TYPE: ClientListType = 'form';\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: [\r\n CommonModule,\r\n Button,\r\n ClientListTableView,\r\n ClientListCardsView,\r\n ClientListInformativeView,\r\n ],\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 items = this.state.items;\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.configureItems(configs));\r\n\r\n untracked(() => {\r\n this.state.items().forEach((item) => {\r\n this.loadItem(item);\r\n });\r\n });\r\n });\r\n }\r\n\r\n onLazyLoad(itemKey: string, event: ClientListLazyLoadEvent): void {\r\n const item = this.state.itemsByKey()[itemKey];\r\n if (\r\n !item ||\r\n item.type === 'informative' ||\r\n item.areaType !== 'table' ||\r\n !item.config.isPaginated\r\n ) {\r\n return;\r\n }\r\n\r\n const take = Number(event.pageSize ?? item.take);\r\n const skip = Number(event.first ?? 0);\r\n this.loadTable(item.key, item.config, skip, take);\r\n }\r\n\r\n reload(itemKey?: string): void {\r\n if (itemKey) {\r\n this.reloadByKey(itemKey);\r\n return;\r\n }\r\n\r\n this.items().forEach((item) => {\r\n this.loadItem(item, true);\r\n });\r\n }\r\n\r\n reloadByKey(itemKey: string): void {\r\n const item = this.state.itemsByKey()[itemKey];\r\n if (!item) return;\r\n\r\n this.loadItem(item, true);\r\n }\r\n\r\n toggleExpanded(key: string): void {\r\n this.state.toggleExpanded(key);\r\n }\r\n\r\n templateContext(item: ClientListState): ClientListContentTemplateContext {\r\n return {\r\n $implicit: item,\r\n table: item,\r\n };\r\n }\r\n\r\n defaultTitle(item: ClientListState): string {\r\n if (item.type === 'informative') {\r\n return 'Informative Dashboard';\r\n }\r\n\r\n return item.areaType === 'cards' ? 'Cards' : 'Table';\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 configureItems(configs: ClientListConfiguration[]): void {\r\n const previousItems = this.state.itemsByKey();\r\n const hasMultipleConfigs = (configs ?? []).length > 1;\r\n\r\n const normalized: ClientListState[] = (configs ?? []).map(\r\n (config, index) => {\r\n const type = this.resolveType(config.type);\r\n const isInformative = type === 'informative';\r\n const areaType = isInformative\r\n ? DEFAULT_AREA_TYPE\r\n : this.resolveAreaType(config.areaType);\r\n const mode = isInformative\r\n ? DEFAULT_MODE\r\n : this.resolveMode(config.mode, config.columnKeys);\r\n const isPaginated =\r\n !isInformative &&\r\n areaType === 'table' &&\r\n (config.isPaginated ?? true);\r\n const take =\r\n !isInformative && areaType === 'table'\r\n ? isPaginated\r\n ? (config.take ?? this.defaultTake())\r\n : LOCAL_PAGE_SIZE_SOURCE\r\n : 0;\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 existing = previousItems[key];\r\n const normalizedConfig = this.toNormalizedConfig(\r\n config,\r\n type,\r\n areaType,\r\n mode,\r\n isPaginated,\r\n take,\r\n collapseEnabled,\r\n layout,\r\n );\r\n\r\n if (isInformative) {\r\n return {\r\n key,\r\n config: normalizedConfig,\r\n type: 'informative',\r\n areaType: 'table',\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n totalCount: 0,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: 0,\r\n take: 0,\r\n expanded:\r\n existing?.expanded ?? config.collapse?.expandedByDefault ?? true,\r\n dashboardData: existing?.dashboardData ?? null,\r\n };\r\n }\r\n\r\n if (areaType === 'cards') {\r\n return {\r\n key,\r\n config: normalizedConfig,\r\n type: 'form',\r\n areaType: 'cards',\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n totalCount: 0,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: 0,\r\n take: 0,\r\n expanded:\r\n existing?.expanded ?? config.collapse?.expandedByDefault ?? true,\r\n dashboardData: null,\r\n };\r\n }\r\n\r\n return {\r\n key,\r\n config: normalizedConfig,\r\n type: 'form',\r\n areaType: 'table',\r\n loading: false,\r\n error: null,\r\n title: config.title?.trim() || '',\r\n moduleKey: '',\r\n totalCount: 0,\r\n columns: [],\r\n rows: [],\r\n cards: [],\r\n skip: existing?.areaType === 'table' ? existing.skip : 0,\r\n take,\r\n expanded:\r\n existing?.expanded ?? config.collapse?.expandedByDefault ?? true,\r\n dashboardData: null,\r\n };\r\n },\r\n );\r\n\r\n this.state.setConfigs(normalized);\r\n this.cleanupStaleResources(new Set(normalized.map((item) => item.key)));\r\n }\r\n\r\n private loadItem(item: ClientListState, force = false): void {\r\n if (item.type === 'informative') {\r\n this.loadInformative(item.key, item.config, force);\r\n return;\r\n }\r\n\r\n if (item.areaType === 'cards') {\r\n this.loadCards(item.key, item.config, force);\r\n return;\r\n }\r\n\r\n this.loadTable(item.key, item.config, item.skip, item.take, force);\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(key, this.getMissingIdentifiersMessage(config));\r\n return;\r\n }\r\n\r\n const query = this.toTableQuery(config, skip, take);\r\n const requestSignature = this.createTableRequestSignature(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\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 loadCards(\r\n key: string,\r\n config: NormalizedClientListConfiguration,\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(key, this.getMissingIdentifiersMessage(config));\r\n return;\r\n }\r\n\r\n const requestSignature = this.createCardsRequestSignature(config);\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 .getCards(config.levelDataId, config.moduleId)\r\n .subscribe({\r\n next: (response) => {\r\n if (response.data) {\r\n this.state.setCardsResult(key, response.data, config);\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 cards';\r\n this.state.setError(key, message);\r\n this.errored.emit({ key, message });\r\n }\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 cards';\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 loadInformative(\r\n key: string,\r\n config: NormalizedClientListConfiguration,\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(key, this.getMissingIdentifiersMessage(config));\r\n return;\r\n }\r\n\r\n const requestSignature = this.createInformativeRequestSignature(config);\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.getInformativeDashboard(config.moduleId).subscribe({\r\n next: (response) => {\r\n this.state.setInformativeResult(key, response.data ?? null, config);\r\n this.fulfilledRequestSignatures.set(key, requestSignature);\r\n this.loaded.emit(key);\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n },\r\n error: (error) => {\r\n if (error?.status === 404) {\r\n this.state.setInformativeResult(key, null, config);\r\n this.fulfilledRequestSignatures.set(key, requestSignature);\r\n this.loaded.emit(key);\r\n this.state.setLoading(key, false);\r\n this.inFlightRequestSignatures.delete(key);\r\n return;\r\n }\r\n\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to load informative dashboard';\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 resolveAreaType(\r\n areaType: ClientListAreaType | undefined,\r\n ): ClientListAreaType {\r\n return areaType === 'cards' ? 'cards' : DEFAULT_AREA_TYPE;\r\n }\r\n\r\n private resolveType(\r\n type: ClientListConfiguration['type'] | undefined,\r\n ): ClientListType {\r\n return type === 'informative' ? 'informative' : DEFAULT_TYPE;\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 type: ClientListType,\r\n areaType: ClientListAreaType,\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 type,\r\n areaType,\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 rowActions: config.rowActions ?? [],\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 toTableQuery(\r\n config: NormalizedClientListConfiguration,\r\n skip: number,\r\n take: number,\r\n ): ClientListTableQuery {\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 createTableRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n query: ClientListTableQuery,\r\n ): string {\r\n return [\r\n config.type,\r\n config.areaType,\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 createCardsRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n ): string {\r\n return [\r\n config.type,\r\n config.areaType,\r\n config.levelDataId,\r\n config.moduleId,\r\n 'card',\r\n ].join('|');\r\n }\r\n\r\n private createInformativeRequestSignature(\r\n config: NormalizedClientListConfiguration,\r\n ): string {\r\n return [config.type, config.moduleId, 'dashboard'].join('|');\r\n }\r\n\r\n private hasValidIdentifiers(\r\n config: NormalizedClientListConfiguration,\r\n ): boolean {\r\n if (config.type === 'informative') {\r\n return Number.isFinite(config.moduleId) && config.moduleId > 0;\r\n }\r\n\r\n const hasLevelDataId =\r\n Number.isFinite(config.levelDataId) && config.levelDataId > 0;\r\n const hasModuleId = Number.isFinite(config.moduleId) && config.moduleId > 0;\r\n\r\n if (config.areaType === 'cards') {\r\n return hasLevelDataId && hasModuleId;\r\n }\r\n\r\n return (\r\n Number.isFinite(config.levelId) &&\r\n config.levelId > 0 &&\r\n hasLevelDataId &&\r\n hasModuleId\r\n );\r\n }\r\n\r\n private getMissingIdentifiersMessage(\r\n config: NormalizedClientListConfiguration,\r\n ): string {\r\n if (config.type === 'informative') {\r\n return 'Missing identifiers: moduleId is required';\r\n }\r\n\r\n if (config.areaType === 'cards') {\r\n return 'Missing identifiers: levelDataId and moduleId are required';\r\n }\r\n\r\n return 'Missing identifiers: levelId, levelDataId and moduleId are required';\r\n }\r\n}\r\n","<div class=\"flex flex-col gap-4\">\r\n @for (item of items(); track item.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 (item.config.collapse.enabled) {\r\n <mt-button\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n [icon]=\"\r\n item.expanded\r\n ? item.config.collapse.collapseIcon\r\n : item.config.collapse.expandIcon\r\n \"\r\n (onClick)=\"toggleExpanded(item.key)\"\r\n />\r\n }\r\n <h3 class=\"m-0 text-lg font-bold\">\r\n {{ item.title || item.moduleKey || defaultTitle(item) }}\r\n </h3>\r\n @if (item.config.headerStart) {\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerStart\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n @if (item.config.headerEnd) {\r\n <div class=\"ml-auto flex shrink-0 items-center gap-2\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"item.config.headerEnd\"\r\n [ngTemplateOutletContext]=\"templateContext(item)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (item.expanded || !item.config.collapse.enabled) {\r\n @if (item.type === \"informative\") {\r\n <mt-client-list-informative-view [state]=\"item\" />\r\n } @else if (item.areaType === \"table\") {\r\n <mt-client-list-table-view\r\n [state]=\"item\"\r\n [rowActions]=\"item.config.rowActions\"\r\n (lazyLoad)=\"onLazyLoad(item.key, $event)\"\r\n />\r\n } @else {\r\n <mt-client-list-cards-view [state]=\"item\" />\r\n }\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":["DEFAULT_GRID_COLUMNS","i1"],"mappings":";;;;;;;;;;;;;MAYa,oBAAoB,CAAA;AACd,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;IACzB,aAAa,GAAG,aAAa;IAC7B,YAAY,GAAG,oBAAoB;IACnC,kBAAkB,GAAG,SAAS;AAE/C,IAAA,OAAO,CACL,OAAe,EACf,WAAmB,EACnB,QAAgB,EAChB,KAA2B,EAAA;AAE3B,QAAA,MAAM,QAAQ,GA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AAA,OAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACN,mBAAmB,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,mBAAmB,yFACnB,yBAAyB,EAAA,QAAA,EAAA,iCAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAKhB,UAAU,EAAA,UAAA,EAAA,CAAA;kBAbtB,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,MAAM;wBACN,mBAAmB;wBACnB,mBAAmB;wBACnB,yBAAyB;qBAC1B,EAAA,SAAA,EACU,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,wiEAAA,EAAA;;;AElDrC;;AAEG;;;;"}
@@ -0,0 +1,351 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, input, output, signal, computed, effect, untracked, Component } from '@angular/core';
3
+ import { EntitiesPreview } from '@masterteam/components/entities';
4
+ import { ClientFormApiService } from '@masterteam/forms/client-form';
5
+
6
+ const WIDTH_TO_ENTITY_SIZE = {
7
+ '25': 6,
8
+ '50': 12,
9
+ '100': 24,
10
+ };
11
+ class ClientModulePreview {
12
+ api = inject(ClientFormApiService);
13
+ loadSub;
14
+ moduleKey = input.required(...(ngDevMode ? [{ debugName: "moduleKey" }] : []));
15
+ operationKey = input.required(...(ngDevMode ? [{ debugName: "operationKey" }] : []));
16
+ moduleId = input(...(ngDevMode ? [undefined, { debugName: "moduleId" }] : []));
17
+ levelId = input(...(ngDevMode ? [undefined, { debugName: "levelId" }] : []));
18
+ levelDataId = input(...(ngDevMode ? [undefined, { debugName: "levelDataId" }] : []));
19
+ moduleDataId = input(...(ngDevMode ? [undefined, { debugName: "moduleDataId" }] : []));
20
+ requestSchemaId = input(...(ngDevMode ? [undefined, { debugName: "requestSchemaId" }] : []));
21
+ draftProcessId = input(...(ngDevMode ? [undefined, { debugName: "draftProcessId" }] : []));
22
+ preview = input(false, ...(ngDevMode ? [{ debugName: "preview" }] : []));
23
+ autoLoad = input(true, ...(ngDevMode ? [{ debugName: "autoLoad" }] : []));
24
+ lang = input('en', ...(ngDevMode ? [{ debugName: "lang" }] : []));
25
+ formMode = input('create', ...(ngDevMode ? [{ debugName: "formMode" }] : []));
26
+ loaded = output();
27
+ errored = output();
28
+ loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
29
+ error = signal(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
30
+ response = signal(null, ...(ngDevMode ? [{ debugName: "response" }] : []));
31
+ entities = computed(() => mapResponseToEntities(this.response(), this.lang(), this.formMode()), ...(ngDevMode ? [{ debugName: "entities" }] : []));
32
+ constructor() {
33
+ effect(() => {
34
+ const autoLoad = this.autoLoad();
35
+ const moduleKey = this.moduleKey();
36
+ const operationKey = this.operationKey();
37
+ this.moduleId();
38
+ this.levelId();
39
+ this.levelDataId();
40
+ this.moduleDataId();
41
+ this.requestSchemaId();
42
+ this.draftProcessId();
43
+ this.preview();
44
+ if (autoLoad && moduleKey && operationKey) {
45
+ untracked(() => this.load());
46
+ }
47
+ });
48
+ }
49
+ load() {
50
+ if (this.loading())
51
+ return;
52
+ this.loadSub?.unsubscribe();
53
+ this.loading.set(true);
54
+ this.error.set(null);
55
+ this.loadSub = this.api.load(this.buildLoadRequest()).subscribe({
56
+ next: (response) => {
57
+ this.loading.set(false);
58
+ if (response.code === 1 && response.data) {
59
+ this.response.set(response.data);
60
+ this.loaded.emit(response.data);
61
+ return;
62
+ }
63
+ const message = response.message ?? 'Failed to load module preview';
64
+ this.response.set(null);
65
+ this.error.set(message);
66
+ this.errored.emit(message);
67
+ },
68
+ error: (error) => {
69
+ this.loading.set(false);
70
+ this.response.set(null);
71
+ const message = error?.error?.message ??
72
+ error?.message ??
73
+ 'Failed to load module preview';
74
+ this.error.set(message);
75
+ this.errored.emit(message);
76
+ },
77
+ });
78
+ }
79
+ ngOnDestroy() {
80
+ this.loadSub?.unsubscribe();
81
+ }
82
+ buildLoadRequest() {
83
+ return {
84
+ moduleKey: this.moduleKey(),
85
+ operationKey: this.operationKey(),
86
+ moduleId: this.moduleId(),
87
+ levelId: this.levelId(),
88
+ levelDataId: this.levelDataId(),
89
+ moduleDataId: this.moduleDataId(),
90
+ requestSchemaId: this.requestSchemaId(),
91
+ draftProcessId: this.draftProcessId(),
92
+ preview: this.preview(),
93
+ };
94
+ }
95
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientModulePreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
96
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ClientModulePreview, isStandalone: true, selector: "mt-client-module-preview", inputs: { moduleKey: { classPropertyName: "moduleKey", publicName: "moduleKey", isSignal: true, isRequired: true, transformFunction: null }, operationKey: { classPropertyName: "operationKey", publicName: "operationKey", isSignal: true, isRequired: true, transformFunction: null }, moduleId: { classPropertyName: "moduleId", publicName: "moduleId", isSignal: true, isRequired: false, transformFunction: null }, levelId: { classPropertyName: "levelId", publicName: "levelId", isSignal: true, isRequired: false, transformFunction: null }, levelDataId: { classPropertyName: "levelDataId", publicName: "levelDataId", isSignal: true, isRequired: false, transformFunction: null }, moduleDataId: { classPropertyName: "moduleDataId", publicName: "moduleDataId", isSignal: true, isRequired: false, transformFunction: null }, requestSchemaId: { classPropertyName: "requestSchemaId", publicName: "requestSchemaId", isSignal: true, isRequired: false, transformFunction: null }, draftProcessId: { classPropertyName: "draftProcessId", publicName: "draftProcessId", isSignal: true, isRequired: false, transformFunction: null }, preview: { classPropertyName: "preview", publicName: "preview", isSignal: true, isRequired: false, transformFunction: null }, autoLoad: { classPropertyName: "autoLoad", publicName: "autoLoad", isSignal: true, isRequired: false, transformFunction: null }, lang: { classPropertyName: "lang", publicName: "lang", isSignal: true, isRequired: false, transformFunction: null }, formMode: { classPropertyName: "formMode", publicName: "formMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loaded: "loaded", errored: "errored" }, ngImport: i0, template: "@if (loading()) {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n @for (item of [1, 2, 3, 4]; track item) {\n <div class=\"rounded-2xl border border-surface-200 bg-surface-50 p-4\">\n <div class=\"mb-3 h-4 w-28 animate-pulse rounded bg-surface-200\"></div>\n <div class=\"h-5 w-40 animate-pulse rounded bg-surface-200\"></div>\n </div>\n }\n </div>\n} @else if (error()) {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ error() }}\n </p>\n </div>\n} @else if (entities().length) {\n <mt-entities-preview [entities]=\"entities()\" />\n} @else {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n No preview data is available for this context.\n </p>\n </div>\n}\n", dependencies: [{ kind: "component", type: EntitiesPreview, selector: "mt-entities-preview", inputs: ["entities"] }] });
97
+ }
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ClientModulePreview, decorators: [{
99
+ type: Component,
100
+ args: [{ selector: 'mt-client-module-preview', standalone: true, imports: [EntitiesPreview], template: "@if (loading()) {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n @for (item of [1, 2, 3, 4]; track item) {\n <div class=\"rounded-2xl border border-surface-200 bg-surface-50 p-4\">\n <div class=\"mb-3 h-4 w-28 animate-pulse rounded bg-surface-200\"></div>\n <div class=\"h-5 w-40 animate-pulse rounded bg-surface-200\"></div>\n </div>\n }\n </div>\n} @else if (error()) {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ error() }}\n </p>\n </div>\n} @else if (entities().length) {\n <mt-entities-preview [entities]=\"entities()\" />\n} @else {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n No preview data is available for this context.\n </p>\n </div>\n}\n" }]
101
+ }], ctorParameters: () => [], propDecorators: { moduleKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "moduleKey", required: true }] }], operationKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "operationKey", required: true }] }], moduleId: [{ type: i0.Input, args: [{ isSignal: true, alias: "moduleId", required: false }] }], levelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelId", required: false }] }], levelDataId: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelDataId", required: false }] }], moduleDataId: [{ type: i0.Input, args: [{ isSignal: true, alias: "moduleDataId", required: false }] }], requestSchemaId: [{ type: i0.Input, args: [{ isSignal: true, alias: "requestSchemaId", required: false }] }], draftProcessId: [{ type: i0.Input, args: [{ isSignal: true, alias: "draftProcessId", required: false }] }], preview: [{ type: i0.Input, args: [{ isSignal: true, alias: "preview", required: false }] }], autoLoad: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoLoad", required: false }] }], lang: [{ type: i0.Input, args: [{ isSignal: true, alias: "lang", required: false }] }], formMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "formMode", required: false }] }], loaded: [{ type: i0.Output, args: ["loaded"] }], errored: [{ type: i0.Output, args: ["errored"] }] } });
102
+ function mapResponseToEntities(response, lang, formMode) {
103
+ if (!response?.formConfiguration?.sections?.length) {
104
+ return [];
105
+ }
106
+ const valueByKey = new Map();
107
+ for (const value of response.values ?? []) {
108
+ valueByKey.set(value.propertyKey, value);
109
+ }
110
+ const entities = [];
111
+ const sections = [...response.formConfiguration.sections].sort((a, b) => a.order - b.order);
112
+ const seen = new Set();
113
+ let order = 0;
114
+ for (const section of sections) {
115
+ const fields = [...(section.fields ?? [])]
116
+ .filter((field) => isVisibleField(field, formMode))
117
+ .sort((a, b) => a.order - b.order);
118
+ for (const field of fields) {
119
+ if (!field.propertyKey || seen.has(field.propertyKey)) {
120
+ continue;
121
+ }
122
+ const property = field.propertyMetadata ?? field.property;
123
+ if (!property) {
124
+ continue;
125
+ }
126
+ seen.add(field.propertyKey);
127
+ const viewType = toEntityViewType(property.viewType);
128
+ const entityValue = mapEntityValue(valueByKey.get(field.propertyKey)?.value, viewType);
129
+ entities.push({
130
+ id: resolveNumber(property.propertyId),
131
+ propertyId: resolveNumber(property.propertyId),
132
+ key: property.key ?? field.propertyKey,
133
+ normalizedKey: readString(property, 'normalizedKey'),
134
+ name: resolvePropertyName(property, lang) || field.propertyKey,
135
+ value: entityValue.value,
136
+ rawValue: entityValue.rawValue,
137
+ viewType,
138
+ order: order++,
139
+ configuration: {
140
+ size: WIDTH_TO_ENTITY_SIZE[field.width] ?? 24,
141
+ },
142
+ });
143
+ }
144
+ }
145
+ return entities;
146
+ }
147
+ function isVisibleField(field, formMode) {
148
+ if (field.isRead === false) {
149
+ return false;
150
+ }
151
+ return formMode === 'create'
152
+ ? !field.hiddenInCreation
153
+ : !field.hiddenInEditForm;
154
+ }
155
+ function resolvePropertyName(property, lang) {
156
+ if (typeof property.name === 'string') {
157
+ return property.name;
158
+ }
159
+ const name = property.name;
160
+ if (!name || typeof name !== 'object') {
161
+ return property.key;
162
+ }
163
+ return (readString(name, 'display') ??
164
+ readString(name, lang) ??
165
+ readString(name, lang === 'en' ? 'ar' : 'en') ??
166
+ property.key);
167
+ }
168
+ function toEntityViewType(viewType) {
169
+ switch (viewType) {
170
+ case 'LongText':
171
+ case 'Date':
172
+ case 'DateTime':
173
+ case 'Percentage':
174
+ case 'Status':
175
+ case 'Currency':
176
+ case 'Checkbox':
177
+ case 'User':
178
+ case 'Lookup':
179
+ return viewType;
180
+ default:
181
+ return 'Text';
182
+ }
183
+ }
184
+ function mapEntityValue(value, viewType) {
185
+ switch (viewType) {
186
+ case 'User': {
187
+ const userValue = mapUserValue(value);
188
+ return {
189
+ value: userValue,
190
+ rawValue: userValue.displayName ?? userValue.userName ?? '',
191
+ };
192
+ }
193
+ case 'Status':
194
+ return mapStatusLikeValue(value);
195
+ case 'Lookup':
196
+ return mapLookupValue(value);
197
+ case 'Percentage':
198
+ return mapPercentageValue(value);
199
+ case 'Checkbox':
200
+ return mapCheckboxValue(value);
201
+ default: {
202
+ const displayValue = resolveDisplayValue(value);
203
+ return {
204
+ value: displayValue,
205
+ rawValue: resolveRawValue(value) ?? displayValue,
206
+ };
207
+ }
208
+ }
209
+ }
210
+ function mapUserValue(value) {
211
+ if (!value || typeof value !== 'object') {
212
+ const displayName = resolveDisplayValue(value);
213
+ return {
214
+ displayName,
215
+ userName: displayName,
216
+ };
217
+ }
218
+ return {
219
+ id: readString(value, 'id'),
220
+ userName: readString(value, 'userName'),
221
+ displayName: readString(value, 'displayName') ??
222
+ readString(value, 'fullName') ??
223
+ readNestedDisplay(value, 'name') ??
224
+ readString(value, 'userName') ??
225
+ '',
226
+ photoUrl: readString(value, 'photoUrl'),
227
+ phoneNumber: readString(value, 'phoneNumber') ?? readString(value, 'mobileNumber'),
228
+ email: readString(value, 'email') ?? readString(value, 'emailAddress'),
229
+ };
230
+ }
231
+ function mapStatusLikeValue(value) {
232
+ const display = readNestedDisplay(value, 'name') ??
233
+ readString(value, 'display') ??
234
+ resolveDisplayValue(value);
235
+ const statusValue = {
236
+ key: readString(value, 'key') ?? display,
237
+ display,
238
+ color: readString(value, 'color') ?? '#64748b',
239
+ description: readNestedDisplay(value, 'description') ?? undefined,
240
+ };
241
+ return {
242
+ value: statusValue,
243
+ rawValue: display,
244
+ };
245
+ }
246
+ function mapLookupValue(value) {
247
+ const display = readNestedDisplay(value, 'name') ??
248
+ readString(value, 'display') ??
249
+ resolveDisplayValue(value);
250
+ const lookupValue = {
251
+ key: readString(value, 'key') ?? display,
252
+ display,
253
+ color: readString(value, 'color') ?? '#64748b',
254
+ description: readNestedDisplay(value, 'description') ?? undefined,
255
+ };
256
+ return {
257
+ value: lookupValue,
258
+ rawValue: display,
259
+ };
260
+ }
261
+ function mapPercentageValue(value) {
262
+ const rawValue = resolveRawValue(value) ?? '';
263
+ const displayValue = resolveDisplayValue(value);
264
+ if (!rawValue && !displayValue) {
265
+ return { value: '', rawValue: '' };
266
+ }
267
+ const normalizedRaw = rawValue.replace(/%/g, '').trim();
268
+ const normalizedDisplay = displayValue.includes('%') || !displayValue.length
269
+ ? displayValue
270
+ : `${displayValue}%`;
271
+ return {
272
+ value: normalizedDisplay || `${normalizedRaw}%`,
273
+ rawValue: normalizedRaw || rawValue,
274
+ };
275
+ }
276
+ function mapCheckboxValue(value) {
277
+ const rawValue = resolveBooleanString(value);
278
+ return {
279
+ value: rawValue,
280
+ rawValue,
281
+ };
282
+ }
283
+ function resolveBooleanString(value) {
284
+ if (typeof value === 'boolean') {
285
+ return String(value);
286
+ }
287
+ const displayValue = resolveDisplayValue(value).trim().toLowerCase();
288
+ if (displayValue === 'true' || displayValue === 'false') {
289
+ return displayValue;
290
+ }
291
+ return '';
292
+ }
293
+ function resolveDisplayValue(value) {
294
+ if (typeof value === 'string') {
295
+ return value;
296
+ }
297
+ if (typeof value === 'number' || typeof value === 'boolean') {
298
+ return String(value);
299
+ }
300
+ if (!value || typeof value !== 'object') {
301
+ return '';
302
+ }
303
+ return (readString(value, 'display') ??
304
+ readString(value, 'displayValue') ??
305
+ readString(value, 'actualValue') ??
306
+ readString(value, 'displayName') ??
307
+ readString(value, 'fullName') ??
308
+ readString(value, 'userName') ??
309
+ readNestedDisplay(value, 'name') ??
310
+ readString(value, 'key') ??
311
+ '');
312
+ }
313
+ function resolveRawValue(value) {
314
+ if (!value || typeof value !== 'object') {
315
+ return value === null || value === undefined ? undefined : String(value);
316
+ }
317
+ return (readString(value, 'actualValue') ??
318
+ readString(value, 'value') ??
319
+ readString(value, 'displayValue') ??
320
+ undefined);
321
+ }
322
+ function readNestedDisplay(value, key) {
323
+ if (!value || typeof value !== 'object') {
324
+ return undefined;
325
+ }
326
+ const nested = value[key];
327
+ if (!nested || typeof nested !== 'object') {
328
+ return undefined;
329
+ }
330
+ return (readString(nested, 'display') ??
331
+ readString(nested, 'en') ??
332
+ readString(nested, 'ar') ??
333
+ undefined);
334
+ }
335
+ function readString(value, key) {
336
+ if (!value || typeof value !== 'object') {
337
+ return undefined;
338
+ }
339
+ const result = value[key];
340
+ return typeof result === 'string' && result.length ? result : undefined;
341
+ }
342
+ function resolveNumber(value) {
343
+ return typeof value === 'number' ? value : undefined;
344
+ }
345
+
346
+ /**
347
+ * Generated bundle index. Do not edit.
348
+ */
349
+
350
+ export { ClientModulePreview };
351
+ //# sourceMappingURL=masterteam-client-components-client-module-preview.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masterteam-client-components-client-module-preview.mjs","sources":["../../../../packages/masterteam/client-components/client-module-preview/client-module-preview.ts","../../../../packages/masterteam/client-components/client-module-preview/client-module-preview.html","../../../../packages/masterteam/client-components/client-module-preview/masterteam-client-components-client-module-preview.ts"],"sourcesContent":["import {\n Component,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n untracked,\n OnDestroy,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport {\n EntitiesPreview,\n EntityData,\n EntityLookupValue,\n EntitySize,\n EntityStatusValue,\n EntityUserValue,\n EntityViewType,\n} from '@masterteam/components/entities';\nimport {\n ClientFormApiService,\n type ClientFormField,\n type ClientPropertyItem,\n type ProcessFormLoadRequest,\n type ProcessFormLoadResponse,\n type ProcessFormValue,\n} from '@masterteam/forms/client-form';\n\nconst WIDTH_TO_ENTITY_SIZE: Record<string, EntitySize> = {\n '25': 6,\n '50': 12,\n '100': 24,\n};\n\n@Component({\n selector: 'mt-client-module-preview',\n standalone: true,\n imports: [EntitiesPreview],\n templateUrl: './client-module-preview.html',\n})\nexport class ClientModulePreview implements OnDestroy {\n private readonly api = inject(ClientFormApiService);\n private loadSub?: Subscription;\n\n readonly moduleKey = input.required<string>();\n readonly operationKey = input.required<string>();\n readonly moduleId = input<number>();\n readonly levelId = input<number>();\n readonly levelDataId = input<number>();\n readonly moduleDataId = input<number>();\n readonly requestSchemaId = input<number>();\n readonly draftProcessId = input<number>();\n readonly preview = input(false);\n\n readonly autoLoad = input(true);\n readonly lang = input<'en' | 'ar'>('en');\n readonly formMode = input<'create' | 'edit'>('create');\n\n readonly loaded = output<ProcessFormLoadResponse>();\n readonly errored = output<string>();\n\n readonly loading = signal(false);\n readonly error = signal<string | null>(null);\n readonly response = signal<ProcessFormLoadResponse | null>(null);\n\n readonly entities = computed(() =>\n mapResponseToEntities(this.response(), this.lang(), this.formMode()),\n );\n\n constructor() {\n effect(() => {\n const autoLoad = this.autoLoad();\n const moduleKey = this.moduleKey();\n const operationKey = this.operationKey();\n\n this.moduleId();\n this.levelId();\n this.levelDataId();\n this.moduleDataId();\n this.requestSchemaId();\n this.draftProcessId();\n this.preview();\n\n if (autoLoad && moduleKey && operationKey) {\n untracked(() => this.load());\n }\n });\n }\n\n load(): void {\n if (this.loading()) return;\n\n this.loadSub?.unsubscribe();\n this.loading.set(true);\n this.error.set(null);\n\n this.loadSub = this.api.load(this.buildLoadRequest()).subscribe({\n next: (response) => {\n this.loading.set(false);\n\n if (response.code === 1 && response.data) {\n this.response.set(response.data);\n this.loaded.emit(response.data);\n return;\n }\n\n const message = response.message ?? 'Failed to load module preview';\n this.response.set(null);\n this.error.set(message);\n this.errored.emit(message);\n },\n error: (error) => {\n this.loading.set(false);\n this.response.set(null);\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load module preview';\n this.error.set(message);\n this.errored.emit(message);\n },\n });\n }\n\n ngOnDestroy(): void {\n this.loadSub?.unsubscribe();\n }\n\n private buildLoadRequest(): ProcessFormLoadRequest {\n return {\n moduleKey: this.moduleKey(),\n operationKey: this.operationKey(),\n moduleId: this.moduleId(),\n levelId: this.levelId(),\n levelDataId: this.levelDataId(),\n moduleDataId: this.moduleDataId(),\n requestSchemaId: this.requestSchemaId(),\n draftProcessId: this.draftProcessId(),\n preview: this.preview(),\n };\n }\n}\n\nfunction mapResponseToEntities(\n response: ProcessFormLoadResponse | null,\n lang: 'en' | 'ar',\n formMode: 'create' | 'edit',\n): EntityData[] {\n if (!response?.formConfiguration?.sections?.length) {\n return [];\n }\n\n const valueByKey = new Map<string, ProcessFormValue>();\n for (const value of response.values ?? []) {\n valueByKey.set(value.propertyKey, value);\n }\n\n const entities: EntityData[] = [];\n const sections = [...response.formConfiguration.sections].sort(\n (a, b) => a.order - b.order,\n );\n const seen = new Set<string>();\n let order = 0;\n\n for (const section of sections) {\n const fields = [...(section.fields ?? [])]\n .filter((field) => isVisibleField(field, formMode))\n .sort((a, b) => a.order - b.order);\n\n for (const field of fields) {\n if (!field.propertyKey || seen.has(field.propertyKey)) {\n continue;\n }\n\n const property = field.propertyMetadata ?? field.property;\n if (!property) {\n continue;\n }\n\n seen.add(field.propertyKey);\n const viewType = toEntityViewType(property.viewType);\n const entityValue = mapEntityValue(\n valueByKey.get(field.propertyKey)?.value,\n viewType,\n );\n\n entities.push({\n id: resolveNumber(property.propertyId),\n propertyId: resolveNumber(property.propertyId),\n key: property.key ?? field.propertyKey,\n normalizedKey: readString(property, 'normalizedKey'),\n name: resolvePropertyName(property, lang) || field.propertyKey,\n value: entityValue.value,\n rawValue: entityValue.rawValue,\n viewType,\n order: order++,\n configuration: {\n size: WIDTH_TO_ENTITY_SIZE[field.width] ?? 24,\n },\n });\n }\n }\n\n return entities;\n}\n\nfunction isVisibleField(\n field: ClientFormField,\n formMode: 'create' | 'edit',\n): boolean {\n if (field.isRead === false) {\n return false;\n }\n\n return formMode === 'create'\n ? !field.hiddenInCreation\n : !field.hiddenInEditForm;\n}\n\nfunction resolvePropertyName(\n property: ClientPropertyItem,\n lang: 'en' | 'ar',\n): string {\n if (typeof property.name === 'string') {\n return property.name;\n }\n\n const name = property.name;\n if (!name || typeof name !== 'object') {\n return property.key;\n }\n\n return (\n readString(name, 'display') ??\n readString(name, lang) ??\n readString(name, lang === 'en' ? 'ar' : 'en') ??\n property.key\n );\n}\n\nfunction toEntityViewType(viewType?: string): EntityViewType {\n switch (viewType) {\n case 'LongText':\n case 'Date':\n case 'DateTime':\n case 'Percentage':\n case 'Status':\n case 'Currency':\n case 'Checkbox':\n case 'User':\n case 'Lookup':\n return viewType;\n default:\n return 'Text';\n }\n}\n\nfunction mapEntityValue(\n value: unknown,\n viewType: EntityViewType,\n): Pick<EntityData, 'value' | 'rawValue'> {\n switch (viewType) {\n case 'User': {\n const userValue = mapUserValue(value);\n return {\n value: userValue,\n rawValue: userValue.displayName ?? userValue.userName ?? '',\n };\n }\n case 'Status':\n return mapStatusLikeValue(value);\n case 'Lookup':\n return mapLookupValue(value);\n case 'Percentage':\n return mapPercentageValue(value);\n case 'Checkbox':\n return mapCheckboxValue(value);\n default: {\n const displayValue = resolveDisplayValue(value);\n return {\n value: displayValue,\n rawValue: resolveRawValue(value) ?? displayValue,\n };\n }\n }\n}\n\nfunction mapUserValue(value: unknown): EntityUserValue {\n if (!value || typeof value !== 'object') {\n const displayName = resolveDisplayValue(value);\n return {\n displayName,\n userName: displayName,\n };\n }\n\n return {\n id: readString(value, 'id'),\n userName: readString(value, 'userName'),\n displayName:\n readString(value, 'displayName') ??\n readString(value, 'fullName') ??\n readNestedDisplay(value, 'name') ??\n readString(value, 'userName') ??\n '',\n photoUrl: readString(value, 'photoUrl'),\n phoneNumber:\n readString(value, 'phoneNumber') ?? readString(value, 'mobileNumber'),\n email: readString(value, 'email') ?? readString(value, 'emailAddress'),\n };\n}\n\nfunction mapStatusLikeValue(\n value: unknown,\n): Pick<EntityData, 'value' | 'rawValue'> {\n const display =\n readNestedDisplay(value, 'name') ??\n readString(value, 'display') ??\n resolveDisplayValue(value);\n\n const statusValue: EntityStatusValue = {\n key: readString(value, 'key') ?? display,\n display,\n color: readString(value, 'color') ?? '#64748b',\n description: readNestedDisplay(value, 'description') ?? undefined,\n };\n\n return {\n value: statusValue,\n rawValue: display,\n };\n}\n\nfunction mapLookupValue(\n value: unknown,\n): Pick<EntityData, 'value' | 'rawValue'> {\n const display =\n readNestedDisplay(value, 'name') ??\n readString(value, 'display') ??\n resolveDisplayValue(value);\n\n const lookupValue: EntityLookupValue = {\n key: readString(value, 'key') ?? display,\n display,\n color: readString(value, 'color') ?? '#64748b',\n description: readNestedDisplay(value, 'description') ?? undefined,\n };\n\n return {\n value: lookupValue,\n rawValue: display,\n };\n}\n\nfunction mapPercentageValue(\n value: unknown,\n): Pick<EntityData, 'value' | 'rawValue'> {\n const rawValue = resolveRawValue(value) ?? '';\n const displayValue = resolveDisplayValue(value);\n\n if (!rawValue && !displayValue) {\n return { value: '', rawValue: '' };\n }\n\n const normalizedRaw = rawValue.replace(/%/g, '').trim();\n const normalizedDisplay =\n displayValue.includes('%') || !displayValue.length\n ? displayValue\n : `${displayValue}%`;\n\n return {\n value: normalizedDisplay || `${normalizedRaw}%`,\n rawValue: normalizedRaw || rawValue,\n };\n}\n\nfunction mapCheckboxValue(\n value: unknown,\n): Pick<EntityData, 'value' | 'rawValue'> {\n const rawValue = resolveBooleanString(value);\n return {\n value: rawValue,\n rawValue,\n };\n}\n\nfunction resolveBooleanString(value: unknown): string {\n if (typeof value === 'boolean') {\n return String(value);\n }\n\n const displayValue = resolveDisplayValue(value).trim().toLowerCase();\n if (displayValue === 'true' || displayValue === 'false') {\n return displayValue;\n }\n\n return '';\n}\n\nfunction resolveDisplayValue(value: unknown): string {\n if (typeof value === 'string') {\n return value;\n }\n\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value);\n }\n\n if (!value || typeof value !== 'object') {\n return '';\n }\n\n return (\n readString(value, 'display') ??\n readString(value, 'displayValue') ??\n readString(value, 'actualValue') ??\n readString(value, 'displayName') ??\n readString(value, 'fullName') ??\n readString(value, 'userName') ??\n readNestedDisplay(value, 'name') ??\n readString(value, 'key') ??\n ''\n );\n}\n\nfunction resolveRawValue(value: unknown): string | undefined {\n if (!value || typeof value !== 'object') {\n return value === null || value === undefined ? undefined : String(value);\n }\n\n return (\n readString(value, 'actualValue') ??\n readString(value, 'value') ??\n readString(value, 'displayValue') ??\n undefined\n );\n}\n\nfunction readNestedDisplay(value: unknown, key: string): string | undefined {\n if (!value || typeof value !== 'object') {\n return undefined;\n }\n\n const nested = (value as Record<string, unknown>)[key];\n if (!nested || typeof nested !== 'object') {\n return undefined;\n }\n\n return (\n readString(nested, 'display') ??\n readString(nested, 'en') ??\n readString(nested, 'ar') ??\n undefined\n );\n}\n\nfunction readString(value: unknown, key: string): string | undefined {\n if (!value || typeof value !== 'object') {\n return undefined;\n }\n\n const result = (value as Record<string, unknown>)[key];\n return typeof result === 'string' && result.length ? result : undefined;\n}\n\nfunction resolveNumber(value: unknown): number | undefined {\n return typeof value === 'number' ? value : undefined;\n}\n","@if (loading()) {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n @for (item of [1, 2, 3, 4]; track item) {\n <div class=\"rounded-2xl border border-surface-200 bg-surface-50 p-4\">\n <div class=\"mb-3 h-4 w-28 animate-pulse rounded bg-surface-200\"></div>\n <div class=\"h-5 w-40 animate-pulse rounded bg-surface-200\"></div>\n </div>\n }\n </div>\n} @else if (error()) {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ error() }}\n </p>\n </div>\n} @else if (entities().length) {\n <mt-entities-preview [entities]=\"entities()\" />\n} @else {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n No preview data is available for this context.\n </p>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AA+BA,MAAM,oBAAoB,GAA+B;AACvD,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,KAAK,EAAE,EAAE;CACV;MAQY,mBAAmB,CAAA;AACb,IAAA,GAAG,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAC3C,IAAA,OAAO;AAEN,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,oDAAU;AACpC,IAAA,YAAY,GAAG,KAAK,CAAC,QAAQ,uDAAU;IACvC,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IAC1B,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACzB,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IAC7B,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IAC9B,eAAe,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACjC,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAChC,IAAA,OAAO,GAAG,KAAK,CAAC,KAAK,mDAAC;AAE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K,CAAC;IAC1E;AAEA,IAAA,QACE,UAAU,CAAC,KAAK,EAAE,aAAa,CAAC;AAChC,QAAA,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC;AAC1B,QAAA,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC;AACjC,QAAA,SAAS;AAEb;AAEA,SAAS,iBAAiB,CAAC,KAAc,EAAE,GAAW,EAAA;IACpD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAI,KAAiC,CAAC,GAAG,CAAC;IACtD,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACzC,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,QACE,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC;AAC7B,QAAA,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC;AACxB,QAAA,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC;AACxB,QAAA,SAAS;AAEb;AAEA,SAAS,UAAU,CAAC,KAAc,EAAE,GAAW,EAAA;IAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAI,KAAiC,CAAC,GAAG,CAAC;AACtD,IAAA,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS;AACzE;AAEA,SAAS,aAAa,CAAC,KAAc,EAAA;AACnC,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,SAAS;AACtD;;AEtdA;;AAEG;;;;"}
@@ -149,7 +149,7 @@ class EscalationAddDialog {
149
149
  };
150
150
  }
151
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'\">\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 severity=\"secondary\"\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"], 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"] }] });
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'\">\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 severity=\"secondary\"\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"] }] });
153
153
  }
154
154
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationAddDialog, decorators: [{
155
155
  type: Component,
@@ -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 severity=\"secondary\"\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 />\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,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,+5BAAA,EAAA;;;AE7CrD;;AAEG;;;;"}
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 severity=\"secondary\"\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,YA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;;;AE7CrD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/client-components",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/client-components",
6
6
  "linkDirectory": true,
@@ -10,15 +10,15 @@
10
10
  "@angular/common": "^21.0.3",
11
11
  "@angular/core": "^21.0.3",
12
12
  "@angular/forms": "^21.0.3",
13
- "@masterteam/forms": "^0.0.43",
14
13
  "@tailwindcss/postcss": "^4.1.17",
15
14
  "postcss": "^8.5.6",
16
15
  "primeng": "21.0.1",
17
16
  "rxjs": "^7.8.2",
18
17
  "tailwindcss": "^4.1.17",
19
18
  "tailwindcss-primeui": "^0.6.1",
20
- "@masterteam/components": "^0.0.97",
21
- "@masterteam/dashboard-builder": "^0.0.3"
19
+ "@masterteam/forms": "^0.0.45",
20
+ "@masterteam/dashboard-builder": "^0.0.4",
21
+ "@masterteam/components": "^0.0.98"
22
22
  },
23
23
  "dependencies": {
24
24
  "tslib": "^2.8.1"
@@ -38,9 +38,13 @@
38
38
  "types": "./types/masterteam-client-components-client-list.d.ts",
39
39
  "default": "./fesm2022/masterteam-client-components-client-list.mjs"
40
40
  },
41
+ "./client-module-preview": {
42
+ "types": "./types/masterteam-client-components-client-module-preview.d.ts",
43
+ "default": "./fesm2022/masterteam-client-components-client-module-preview.mjs"
44
+ },
41
45
  "./escalation-runtime": {
42
46
  "types": "./types/masterteam-client-components-escalation-runtime.d.ts",
43
47
  "default": "./fesm2022/masterteam-client-components-escalation-runtime.mjs"
44
48
  }
45
49
  }
46
- }
50
+ }
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { TemplateRef, OnDestroy } from '@angular/core';
3
3
  import { DashboardBuilderData } from '@masterteam/dashboard-builder';
4
4
  import { EntityData, EntityConfiguration } from '@masterteam/components/entities';
5
- import { ColumnDef } from '@masterteam/components/table';
5
+ import { TableAction, ColumnDef } from '@masterteam/components/table';
6
6
  import { Observable } from 'rxjs';
7
7
 
8
8
  type ClientListMode = 'auto' | 'override';
@@ -36,6 +36,7 @@ interface ClientListConfiguration {
36
36
  headerEnd?: TemplateRef<ClientListContentTemplateContext>;
37
37
  contentStart?: TemplateRef<ClientListContentTemplateContext>;
38
38
  contentEnd?: TemplateRef<ClientListContentTemplateContext>;
39
+ rowActions?: TableAction[];
39
40
  }
40
41
  interface ClientListCollapseConfig {
41
42
  enabled?: boolean;
@@ -210,6 +211,7 @@ interface NormalizedClientListConfiguration {
210
211
  headerEnd?: TemplateRef<ClientListContentTemplateContext>;
211
212
  contentStart?: TemplateRef<ClientListContentTemplateContext>;
212
213
  contentEnd?: TemplateRef<ClientListContentTemplateContext>;
214
+ rowActions: TableAction[];
213
215
  }
214
216
  interface ClientListContentTemplateContext {
215
217
  $implicit: ClientListState;
@@ -0,0 +1,35 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy } from '@angular/core';
3
+ import { EntityData } from '@masterteam/components/entities';
4
+ import { ProcessFormLoadResponse } from '@masterteam/forms/client-form';
5
+
6
+ declare class ClientModulePreview implements OnDestroy {
7
+ private readonly api;
8
+ private loadSub?;
9
+ readonly moduleKey: _angular_core.InputSignal<string>;
10
+ readonly operationKey: _angular_core.InputSignal<string>;
11
+ readonly moduleId: _angular_core.InputSignal<number | undefined>;
12
+ readonly levelId: _angular_core.InputSignal<number | undefined>;
13
+ readonly levelDataId: _angular_core.InputSignal<number | undefined>;
14
+ readonly moduleDataId: _angular_core.InputSignal<number | undefined>;
15
+ readonly requestSchemaId: _angular_core.InputSignal<number | undefined>;
16
+ readonly draftProcessId: _angular_core.InputSignal<number | undefined>;
17
+ readonly preview: _angular_core.InputSignal<boolean>;
18
+ readonly autoLoad: _angular_core.InputSignal<boolean>;
19
+ readonly lang: _angular_core.InputSignal<"en" | "ar">;
20
+ readonly formMode: _angular_core.InputSignal<"create" | "edit">;
21
+ readonly loaded: _angular_core.OutputEmitterRef<ProcessFormLoadResponse>;
22
+ readonly errored: _angular_core.OutputEmitterRef<string>;
23
+ readonly loading: _angular_core.WritableSignal<boolean>;
24
+ readonly error: _angular_core.WritableSignal<string | null>;
25
+ readonly response: _angular_core.WritableSignal<ProcessFormLoadResponse | null>;
26
+ readonly entities: _angular_core.Signal<EntityData[]>;
27
+ constructor();
28
+ load(): void;
29
+ ngOnDestroy(): void;
30
+ private buildLoadRequest;
31
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClientModulePreview, never>;
32
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClientModulePreview, "mt-client-module-preview", never, { "moduleKey": { "alias": "moduleKey"; "required": true; "isSignal": true; }; "operationKey": { "alias": "operationKey"; "required": true; "isSignal": true; }; "moduleId": { "alias": "moduleId"; "required": false; "isSignal": true; }; "levelId": { "alias": "levelId"; "required": false; "isSignal": true; }; "levelDataId": { "alias": "levelDataId"; "required": false; "isSignal": true; }; "moduleDataId": { "alias": "moduleDataId"; "required": false; "isSignal": true; }; "requestSchemaId": { "alias": "requestSchemaId"; "required": false; "isSignal": true; }; "draftProcessId": { "alias": "draftProcessId"; "required": false; "isSignal": true; }; "preview": { "alias": "preview"; "required": false; "isSignal": true; }; "autoLoad": { "alias": "autoLoad"; "required": false; "isSignal": true; }; "lang": { "alias": "lang"; "required": false; "isSignal": true; }; "formMode": { "alias": "formMode"; "required": false; "isSignal": true; }; }, { "loaded": "loaded"; "errored": "errored"; }, never, never, true, never>;
33
+ }
34
+
35
+ export { ClientModulePreview };