@smallpearl/ngx-helper 0.33.17 → 0.33.18
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.
|
@@ -215,24 +215,32 @@ class SPMatEntityListComponent {
|
|
|
215
215
|
: plural(this.entityName()));
|
|
216
216
|
_httpReqContext = computed(() => {
|
|
217
217
|
let reqContext = this.httpReqContext();
|
|
218
|
+
let context = new HttpContext();
|
|
218
219
|
if (reqContext instanceof HttpContext) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
if (reqContext && Array.isArray(reqContext)) {
|
|
223
|
-
if (reqContext.length == 2 && !Array.isArray(reqContext[0])) {
|
|
224
|
-
// one dimensional array of a key, value pair.
|
|
225
|
-
context.set(reqContext[0], reqContext[1]);
|
|
220
|
+
// Copy existing context values
|
|
221
|
+
for (const key of reqContext.keys()) {
|
|
222
|
+
context.set(key, reqContext.get(key));
|
|
226
223
|
}
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
if (reqContext && Array.isArray(reqContext)) {
|
|
227
|
+
if (reqContext.length == 2 && !Array.isArray(reqContext[0])) {
|
|
228
|
+
// one dimensional array of a key, value pair.
|
|
229
|
+
context.set(reqContext[0], reqContext[1]);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
reqContext.forEach(([k, v]) => context.set(k, v));
|
|
233
|
+
}
|
|
229
234
|
}
|
|
230
235
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
// Add mandatory SP_MAT_ENTITY_LIST_HTTP_CONTEXT context token
|
|
237
|
+
if (!context.has(SP_MAT_ENTITY_LIST_HTTP_CONTEXT)) {
|
|
238
|
+
context.set(SP_MAT_ENTITY_LIST_HTTP_CONTEXT, {
|
|
239
|
+
entityName: this.entityName(),
|
|
240
|
+
entityNamePlural: this._entityNamePlural(),
|
|
241
|
+
endpoint: this.endpoint(),
|
|
242
|
+
});
|
|
243
|
+
}
|
|
236
244
|
return context;
|
|
237
245
|
});
|
|
238
246
|
deferViewInit = input(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smallpearl-ngx-helper-mat-entity-list.mjs","sources":["../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/mat-entity-list-types.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/providers.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/config.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/mat-entity-list.component.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/smallpearl-ngx-helper-mat-entity-list.ts"],"sourcesContent":["import { HttpContextToken } from \"@angular/common/http\";\nimport { Observable } from \"rxjs\";\n\nexport interface SPMatEntityListHttpContext {\n entityName: string;\n entityNamePlural: string;\n endpoint: string;\n}\n\nexport const SP_MAT_ENTITY_LIST_HTTP_CONTEXT =\n new HttpContextToken<SPMatEntityListHttpContext>(() => ({\n entityName: '',\n entityNamePlural: '',\n endpoint: '',\n }));\n\n/**\n * Pagination HTTP request params. Actually copied from Angular's HttpParams\n * declaration. The ReadonlyArray<string|number|boolean> is a bit of an\n * overkill for pagination params, but what the heck. When you copy-paste,\n * do it in full!\n */\nexport type SPPageParams = { [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>; }\n\n/**\n * An interface that the clients should provide, either via a global config\n * (see above), that handles parsing the GET response and returns the entities\n * stored therein. This class will allow the entity-list component to be\n * used across different pagination response types as long as the appropriate\n * SPMatEntityListPaginator class is provided to the component.\n */\nexport interface SPMatEntityListPaginator {\n /**\n * Return the HTTP request params for the given page index and page size as\n * an object. For example, for a REST API that supports 'skip' and 'top' params,\n * the implementation would be:\n *\n * ```typescript\n * getRequestPageParams(endpoint: string, pageIndex: number, pageSize: number): SPPageParams {\n * return {\n * skip: pageIndex * pageSize,\n * top: pageSize\n * };\n * }\n * ```\n * @param endpoint\n * @param pageIndex\n * @param pageSize\n * @returns\n */\n getRequestPageParams: (endpoint: string, pageIndex: number, pageSize: number) => SPPageParams;\n\n /**\n * Parse the HTTP response received from the GET request and return an object\n * containing the total number of entities available and the array of entities\n * for the current page. For example, for the pure DRF paginated response\n * like below:\n * ```json\n * {\n * \"count\": 102,\n * \"next\": \"http://api.example.org/entities/?page=3\",\n * \"previous\": \"http://api.example.org/entities/?page=1\",\n * \"results\": [\n * {\n * \"id\": 1,\n * \"name\": \"Entity 1\"\n * },\n * {\n * \"id\": 2,\n * \"name\": \"Entity 2\"\n * }\n * ]\n * }\n * ```\n * The implementation would be:\n * ```typescript\n * parseRequestResponse<TEntity extends { [P in IdKey]: PropertyKey }, IdKey extends string = 'id'>(\n * entityName: string,\n * entityNamePlural: string,\n * endpoint: string,\n * params: SPPageParams,\n * resp: any\n * ): { total: number; entities: TEntity[] } {\n * return {\n * total: resp.count,\n * entities: resp.results\n * };\n * }\n * ```\n * @param entityName\n * @param entityNamePlural\n * @param endpoint\n * @param params\n * @param resp\n * @returns\n */\n parseRequestResponse: <\n TEntity extends { [P in IdKey]: PropertyKey },\n IdKey extends string = 'id'\n >(\n entityName: string,\n entityNamePlural: string,\n endpoint: string,\n params: SPPageParams,\n resp: any\n ) => { total: number; entities: TEntity[] };\n}\n\n/**\n * 'entity' is really TEntity arg of SPMatEntityListComponent<TEntity>.\n * 'column' is the column name. This allows the same value function to support\n * multiple columns further enabing DRY.\n */\nexport type COLUMN_VALUE_FN = (entity: any, column: string) => string|number|Date|boolean;\n\n/**\n * Global config for SPMatEntityList component.\n */\nexport interface SPMatEntityListConfig {\n urlResolver?: (endpoint: string) => string;\n paginator?: SPMatEntityListPaginator;\n defaultPageSize?: number;\n pageSizes?: Array<number>;\n /**\n * Provide a method to return the labels for the columns. This is useful when\n * the columns are specified as the JSON object key names and the labels are\n * to be transformed into a uniform manner (uppercase) or when the labels\n * are to be dynamically localized. Note that the response can be an\n * Observable<string> if the label is to be fetched/changed asynchronously\n * (as that can happen in an app that supports dynamic changing of the UI\n * language).\n * @param entityName\n * @param columnName\n * @returns\n */\n columnLabelFn?: (entityName: string, columnName: string) => string | Observable<string>;\n}\n\n/**\n * Type for custom entities loader function, which if provided will be called\n * instead of HttpClient.get.\n */\nexport type SPMatEntityListEntityLoaderFn = (params: any) => Observable<any>;\n","import { InjectionToken } from '@angular/core';\nimport { SPMatEntityListConfig } from './mat-entity-list-types';\n\nexport const SP_MAT_ENTITY_LIST_CONFIG = new InjectionToken<SPMatEntityListConfig>(\n 'SPMatEntityListConfig'\n);\n","import { inject } from '@angular/core';\nimport { SPMatEntityListConfig } from './mat-entity-list-types';\nimport { SP_MAT_ENTITY_LIST_CONFIG } from './providers';\n\nexport const DefaultSPMatEntityListConfig: SPMatEntityListConfig = {\n urlResolver: (endpoint: string) => endpoint,\n paginator: undefined,\n defaultPageSize: 50,\n pageSizes: [10, 25, 50, 100],\n columnLabelFn: (entityName: string, columnName: string) => columnName,\n};\n\n/**\n * To be called from an object's constructor.\n */\nexport function getEntityListConfig(): SPMatEntityListConfig {\n const entityListConfig = inject(SP_MAT_ENTITY_LIST_CONFIG, {\n optional: true,\n });\n return {\n ...DefaultSPMatEntityListConfig,\n ...(entityListConfig ?? {}),\n };\n}\n","import { CommonModule } from '@angular/common';\nimport { HttpClient, HttpContext, HttpContextToken, HttpParams } from '@angular/common/http';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ContentChildren,\n Directive,\n effect,\n ElementRef,\n EventEmitter,\n inject,\n Injector,\n input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n runInInjectionContext,\n signal,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport {\n MatColumnDef,\n MatTable,\n MatTableDataSource,\n MatTableModule,\n} from '@angular/material/table';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { RouterModule } from '@angular/router';\nimport { createStore } from '@ngneat/elf';\nimport {\n addEntities,\n deleteEntities,\n getEntitiesCount,\n hasEntity,\n selectAllEntities,\n updateEntities,\n upsertEntities,\n withEntities,\n} from '@ngneat/elf-entities';\nimport {\n SP_ENTITY_FIELD_CONFIG,\n SPEntityField,\n SPEntityFieldSpec\n} from '@smallpearl/ngx-helper/entity-field';\nimport { InfiniteScrollDirective } from 'ngx-infinite-scroll';\nimport { plural } from 'pluralize';\nimport {\n distinctUntilChanged,\n filter,\n finalize,\n Observable,\n of,\n Subject,\n Subscription,\n switchMap,\n takeUntil,\n tap\n} from 'rxjs';\nimport { getEntityListConfig } from './config';\nimport {\n SP_MAT_ENTITY_LIST_HTTP_CONTEXT,\n SPMatEntityListEntityLoaderFn,\n SPMatEntityListPaginator\n} from './mat-entity-list-types';\n\n@Directive({\n selector: '[headerAlignment]',\n standalone: true\n})\nexport class HeaderAlignmentDirective implements AfterViewInit {\n\n headerAlignment = input<string>();\n\n constructor(private el: ElementRef) {\n // this.el.nativeElement.style.backgroundColor = 'yellow';\n }\n\n ngAfterViewInit(): void {\n if (this.headerAlignment()) {\n const sortHeader = this.el.nativeElement.querySelector('.mat-sort-header-container');\n if (sortHeader) {\n sortHeader.style.justifyContent = this.headerAlignment();\n } else {\n this.el.nativeElement.style.justifyContent = this.headerAlignment();\n }\n }\n }\n}\n\n/**\n * Represents a request to load entities from the remote. This is used to\n * compare two requests to determine if they are equal. This is useful to\n * prevent duplicate requests being sent to the remote.\n */\nclass LoadRequest {\n constructor(\n public endpoint: string,\n public params: HttpParams,\n public force = false\n ) {}\n\n // Returns true if two LoadRequest objects are equal and this object's\n // 'force' is not set to true.\n isEqualToAndNotForced(prev: LoadRequest): boolean {\n // console.log(\n // `isEqualToAndNotForced - ${this.endpoint}, ${this.params.toString()} ${\n // this.force\n // }, other: ${prev.endpoint}, ${prev.params.toString()}, ${prev.force}`\n // );\n return this.force\n ? false\n : this.endpoint.localeCompare(prev.endpoint) === 0 &&\n this.params.toString().localeCompare(prev.params.toString()) === 0;\n }\n}\n\n/**\n * A component to display a list of entities loaded from remote.\n */\n@Component({\n imports: [\n CommonModule,\n RouterModule,\n MatTableModule,\n MatSortModule,\n MatPaginatorModule,\n MatButtonModule,\n MatInputModule,\n MatProgressSpinnerModule,\n InfiniteScrollDirective,\n HeaderAlignmentDirective,\n ],\n selector: 'sp-mat-entity-list',\n template: `\n <div\n class=\"entities-list-wrapper\"\n infiniteScroll\n [infiniteScrollDistance]=\"infiniteScrollDistance()\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle()\"\n [infiniteScrollContainer]=\"infiniteScrollContainer()\"\n [scrollWindow]=\"infiniteScrollWindow()\"\n [infiniteScrollDisabled]=\"\n pagination() !== 'infinite' || !_paginator || !hasMore()\n \"\n (scrolled)=\"infiniteScrollLoadNextPage($event)\"\n >\n <div\n class=\"busy-overlay\"\n [ngClass]=\"{ show: pagination() === 'discrete' && loading() }\"\n >\n <ng-container *ngTemplateOutlet=\"busySpinner\"></ng-container>\n </div>\n <table mat-table [dataSource]=\"dataSource()\">\n <tr mat-header-row *matHeaderRowDef=\"_displayedColumns()\"></tr>\n <tr\n mat-row\n [class.active-row]=\"activeEntityId() === row[this.idKey()]\"\n *matRowDef=\"let row; columns: _displayedColumns()\"\n (click)=\"toggleActiveEntity(row)\"\n ></tr>\n </table>\n @if (pagination() == 'discrete' && _paginator) {\n <mat-paginator\n showFirstLastButtons\n [length]=\"entityCount()\"\n [pageSize]=\"_pageSize()\"\n [pageIndex]=\"pageIndex()\"\n [pageSizeOptions]=\"[]\"\n [hidePageSize]=\"true\"\n (page)=\"handlePageEvent($event)\"\n [disabled]=\"loading()\"\n aria-label=\"Select page\"\n ></mat-paginator>\n }\n <div\n class=\"infinite-scroll-loading\"\n [ngClass]=\"{ show: pagination() === 'infinite' && loading() }\"\n >\n <ng-container *ngTemplateOutlet=\"busySpinner\"></ng-container>\n </div>\n </div>\n <!-- We keep the column definitions outside the <table> so that they can\n be dynamically added to the MatTable. -->\n <span matSort=\"sorter()\">\n @for (column of __columns(); track $index) {\n <ng-container [matColumnDef]=\"column.spec.name\">\n @if (disableSort()) {\n <th\n [class]=\"column.class\"\n [headerAlignment]=\"column.options.alignment\"\n mat-header-cell\n *matHeaderCellDef\n >\n {{ getColumnLabel(column) | async }}\n </th>\n } @else {\n <th\n [class]=\"column.class\"\n [headerAlignment]=\"column.options.alignment\"\n mat-header-cell\n mat-sort-header\n *matHeaderCellDef\n >\n {{ getColumnLabel(column) | async }}\n </th>\n }\n <td\n [class]=\"column.class\"\n [style.text-align]=\"column.options.alignment\"\n mat-cell\n *matCellDef=\"let element\"\n [routerLink]=\"column.getRouterLink(element)\"\n >\n @if (column.hasRouterLink(element)) {\n <a [routerLink]=\"column.getRouterLink(element)\">\n <span [innerHTML]=\"column.value(element)\"></span>\n </a>\n } @else { @let val = column.value(element);\n <span [innerHTML]=\"isAsync(val) ? (val | async) : val\"></span>\n }\n </td>\n </ng-container>\n }\n </span>\n <ng-template #busySpinner>\n <div class=\"busy-spinner\">\n <mat-spinner mode=\"indeterminate\" diameter=\"28\"></mat-spinner>\n </div>\n </ng-template>\n `,\n styles: [\n `\n .entities-list-wrapper {\n position: relative;\n }\n .busy-overlay {\n display: none;\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0px;\n left: 0px;\n z-index: 1000;\n opacity: 0.6;\n background-color: transparent;\n }\n .show {\n display: block;\n }\n .busy-spinner {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .infinite-scroll-loading {\n display: none;\n width: 100%;\n padding: 8px;\n }\n .active-row {\n font-weight: bold;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SPMatEntityListComponent<\n TEntity extends { [P in IdKey]: PropertyKey },\n IdKey extends string = 'id'\n> implements OnInit, OnDestroy, AfterViewInit\n{\n /* CLIENT PROVIDED PARAMETERS */\n entityName = input.required<string>();\n entityNamePlural = input<string>();\n\n /**\n * The endpoint from where the entities are to be retrieved\n */\n endpoint = input<string>('');\n /**\n * Custom entities loader function, which if provided will be called\n * instead of HttpClient.get.\n */\n entityLoaderFn = input<SPMatEntityListEntityLoaderFn | undefined>(undefined);\n /**\n * The columns of the entity to be displayed. This is an array of\n * SPEntityFieldSpec objects. If there's a one-to-one mapping between the\n * column's field name, its title & the rendered value, a string can be\n * specified instead. That is, the value of this property is a heterogeneous\n * array consisting of SPEntityFieldSpec<> objects and strings.\n */\n columns = input<Array<SPEntityFieldSpec<TEntity, IdKey> | string>>([]);\n\n /**\n * Names of columns that are displayed. This will default to all the columns\n * listed in columns.\n */\n displayedColumns = input<string[]>([]); // ['name', 'cell', 'gender'];\n\n /**\n * Number of entities per page. If this is not set and paginator is defined,\n * the number of entities int in the first request, will be taken as the\n * page size.\n */\n pageSize = input<number>(0);\n /**\n * Entity idKey, if idKey is different from the default 'id'.\n */\n idKey = input<string>('id');\n /**\n * Type of pagination -- continuous or discrete. 'infinite' pagination\n * uses an 'infiniteScroll' and 'discrete' pagination uses a mat-paginator\n * at the bottom to navigate between pages.\n */\n pagination = input<'infinite' | 'discrete' | 'none'>('discrete');\n /**\n * Component specific paginator. Only used if pagination != 'none'.\n */\n paginator = input<SPMatEntityListPaginator>();\n /**\n *\n */\n sorter = input<MatSort>();\n /**\n * Disable sorting of rows\n */\n disableSort = input<boolean>(false);\n /**\n * Wrappers for infiniteScroll properties, for customization by the client\n */\n infiniteScrollContainer = input<any>('');\n infiniteScrollDistance = input<number>(1);\n infiniteScrollThrottle = input<number>(400);\n infiniteScrollWindow = input<boolean>(false);\n /**\n * Custom context to be set for HttpClient requests. Value for this attribute\n * can be an array of HttpContextToken key, value pairs, or an instance of\n * HttpContext.\n *\n * In the client code specify this property by initializing a member variable\n * as:\n\n ```\n Component({\n ...\n template: `\n <sp-mat-entity-list\n [httpReqContext]=\"httpReqContext\"\n ></sp-mat-entity-list>\n `\n })\n export class YourComponent {\n httpReqContext: [HttpContextToken<any>, any] = [\n MY_CONTEXT_TOKEN, 'customers'\n ];\n // Or [httpReqContext]=\"httpReqContext2\" will work too.\n httpReqContext2: HttpContext = new HttpContext().set(\n MY_CONTEXT_TOKEN, 'customers'\n );\n }\n ```\n *\n * Of course if you want to pass multiple context properties, declare the type\n * as an array of array. That is, `[[HttpContextToken<any>, any]]` and\n * initialize it appropriately.\n */\n httpReqContext = input<\n [[HttpContextToken<any>, any]] | [HttpContextToken<any>, any] | HttpContext | undefined\n >();\n /* END CLIENT PROVIDED PARAMETERS */\n\n // *** INTERNAL *** //\n _entityNamePlural = computed(() =>\n this.entityNamePlural()\n ? this.entityNamePlural()\n : plural(this.entityName())\n );\n\n _httpReqContext = computed(() => {\n let reqContext = this.httpReqContext();\n if (reqContext instanceof HttpContext) {\n return reqContext;\n }\n const context = new HttpContext();\n if (reqContext && Array.isArray(reqContext)) {\n if (reqContext.length == 2 && !Array.isArray(reqContext[0])) {\n // one dimensional array of a key, value pair.\n context.set(reqContext[0], reqContext[1]);\n } else {\n reqContext.forEach(([k, v]) => context.set(k, v));\n }\n }\n context.set(SP_MAT_ENTITY_LIST_HTTP_CONTEXT, {\n entityName: this.entityName(),\n entityNamePlural: this._entityNamePlural(),\n endpoint: this.endpoint(),\n });\n return context;\n });\n deferViewInit = input<boolean>(false);\n firstLoadDone = false;\n allColumnNames = signal<string[]>([]);\n _displayedColumns = computed(() =>\n this.displayedColumns().length > 0\n ? this.displayedColumns().filter(\n (colName) =>\n this.allColumnNames().find((name) => name === colName) !== undefined\n )\n : this.allColumnNames()\n );\n dataSource = signal<MatTableDataSource<TEntity>>(\n new MatTableDataSource<TEntity>()\n );\n\n table = viewChild(MatTable);\n sort = viewChild(MatSort);\n // These are our own <ng-container matColumnDef></ng-container>\n // which we create for each column that we create by the declaration:\n // <ng-container *ngFor=\"let column of columns()\" [matColumnDef]=\"column.name\">\n viewColumnDefs = viewChildren(MatColumnDef);\n // These are the <ng-container matColumnDef></ng-container> placed\n // inside <sp-mat-entity-list></<sp-mat-entity-list> by the client to override\n // the default <ng-container matColumnDef> created by the component.\n @ContentChildren(MatColumnDef) clientColumnDefs!: QueryList<MatColumnDef>;\n\n contentColumnDefs: MatColumnDef[] = [];\n\n subs$ = new Subscription();\n destroy$ = new Subject<void>();\n\n // Pagination state\n entityCount = signal<number>(0);\n pageIndex = signal<number>(0);\n\n // Mechanism to default pageSize to last entities length.\n lastFetchedEntitiesCount = signal<number>(0);\n _pageSize = computed<number>(() =>\n this.pageSize()\n ? this.pageSize()\n : this.entityListConfig.defaultPageSize ?? this.lastFetchedEntitiesCount()\n );\n // Effective columns, derived from columns(), which can either be an array\n // of objects of array of strings.\n _columns = computed<SPEntityFieldSpec<TEntity, IdKey>[]>(() => {\n const columns = this.columns();\n let fields: SPEntityField<TEntity, IdKey>[] = [];\n let cols: SPEntityFieldSpec<TEntity, IdKey>[] = [];\n columns.forEach((colDef) => {\n // fields.push(new SPEntityField(colDef))\n if (typeof colDef === 'string') {\n cols.push({ name: String(colDef) });\n } else if (typeof colDef === 'object') {\n cols.push(colDef as SPEntityFieldSpec<TEntity, IdKey>);\n }\n });\n return cols;\n });\n\n __columns = computed<SPEntityField<TEntity, IdKey>[]>(() =>\n this.columns().map(\n (colDef) => new SPEntityField<TEntity, IdKey>(colDef, this.fieldConfig)\n )\n );\n\n // We isolate retrieving items from the remote and providing the items\n // to the component into two distinct operations. The retrieval operation\n // retrieves data asynchronously and then stores the data in a local store.\n // The UI would be 'listening' to a reactive callback that would be triggered\n // whenever items in the store changes. This is because store is an immutable\n // data structure and any changes (addition/deletion) to it would result in\n // the entire store being replaced with a copy with the changes applied.\n\n // Ideally we should declare this as\n // store!: Store<...>. But @ngneat/elf does not provide a generic type\n // for Store<...>, which can be composed from its type arguments. Instead it\n // uses type composition using its arguments to generate store's type\n // implicitly. So we use the same mechanism to enforce type safety in our\n // code. The code below results in a type declaration for store that is\n // dependent on the components generic arguments. (Making use of TypeScript's\n // type deduction system from variable assignment). Later on in the\n // constructor we reassign this.store with a new object that uses the\n // client provided idKey() value as the identifying key for each entity in\n // the sore.\n store = createStore(\n { name: Math.random().toString(36).slice(2) },\n withEntities<TEntity, IdKey>({ idKey: this.idKey() as IdKey })\n );\n // We'll initialize this in ngOnInit() when 'store' is initialized with the\n // correct TEntity store that can be safely indexed using IdKey.\n entities$!: Observable<TEntity[]>;\n // Effective paginator, coalescing local paginator and paginator from global\n // config.\n _paginator!: SPMatEntityListPaginator | undefined;\n // We will toggle this during every entity load.\n loading = signal<boolean>(false);\n // We will update this after every load and pagination() == 'infinite'\n hasMore = signal<boolean>(true);\n\n activeEntity = signal<TEntity | undefined>(undefined);\n activeEntityId = computed(() =>\n this.activeEntity() ? (this.activeEntity() as any)[this.idKey()] : undefined\n );\n _prevActiveEntity!: TEntity | undefined;\n _activeEntityChange = effect(() => {\n runInInjectionContext(this.injector, () => {\n const activeEntity = this.activeEntity();\n // Though we can raise the selectEntity event directly from effect handler,\n // that would prevent the event handler from being able to update any\n // signals from inside it. So we generate the event asyncronously.\n // Also, this effect handler will be invoked for the initial 'undefined'\n // during which we shouldn't emit the selectEntity event. Therefore we\n // keep another state variable to filter out this state.\n if (activeEntity || this._prevActiveEntity) {\n setTimeout(() => {\n this._prevActiveEntity = activeEntity;\n this.selectEntity.emit(activeEntity);\n // if (this._prevActiveEntity && !activeEntity) {\n // this.selectEntity.emit(activeEntity);\n // } else if (activeEntity) {\n // this.selectEntity.emit(activeEntity);\n // }\n });\n }\n });\n });\n @Output() selectEntity = new EventEmitter<TEntity | undefined>();\n\n fieldConfig = inject(SP_ENTITY_FIELD_CONFIG, { optional: true })!;\n entityListConfig = getEntityListConfig();\n\n /**\n * A signal that can be used to trigger loading of more entities from the\n * remote. This can be visualized as the event loop of the entity list\n * component.\n */\n loadRequest$ = new Subject<LoadRequest>();\n\n endpointChanged = effect(() => {\n runInInjectionContext(this.injector, () => {\n if (this.endpoint()) {\n // console.log(`endpointChanged - ${this.endpoint()}`);\n setTimeout(() => {\n this.refresh();\n });\n }\n });\n });\n\n constructor(\n protected http: HttpClient,\n private sanitizer: DomSanitizer,\n private injector: Injector\n ) {}\n\n ngOnInit() {\n // This is the reactive callback that listens for changes to table entities\n // which are reflected in the mat-table.\n this.store = createStore(\n { name: Math.random().toString(36).slice(2) },\n withEntities<TEntity, IdKey>({ idKey: this.idKey() as IdKey })\n );\n this.entities$ = this.store.pipe(selectAllEntities());\n this._paginator = this.paginator()\n ? this.paginator()\n : this.entityListConfig?.paginator;\n\n this.entities$\n .pipe(\n takeUntil(this.destroy$),\n tap((entities) => {\n // .data is a setter property, which ought to trigger the necessary\n // signals resulting in mat-table picking up the changes without\n // requiring us to call cdr.detectChanges() explicitly.\n this.dataSource().data = entities;\n })\n )\n .subscribe();\n\n this.loadRequest$\n .pipe(\n takeUntil(this.destroy$),\n filter((lr) => lr.endpoint !== '' || lr.force === true),\n distinctUntilChanged((prev, current) =>\n current.isEqualToAndNotForced(prev)\n ),\n switchMap((lr: LoadRequest) => this.doActualLoad(lr))\n )\n .subscribe();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n ngAfterViewInit(): void {\n if (!this.deferViewInit()) {\n this.buildContentColumnDefs();\n this.buildColumns();\n this.setupSort();\n this.loadMoreEntities();\n }\n }\n\n /**\n * Clear all entities in store and reload them from endpoint as if\n * the entities are being loaded for the first time.\n */\n refresh(force = false) {\n this.pageIndex.set(0);\n this.loadMoreEntities(force);\n }\n\n addEntity(entity: TEntity) {\n const pagination = this.pagination();\n const count = this.store.query(getEntitiesCount());\n if (\n pagination === 'infinite' ||\n pagination === 'none' ||\n count < this._pageSize()\n ) {\n this.store.update(addEntities(entity));\n } else {\n // 'discrete' pagination, refresh the crud items from the beginning.\n // Let component client set the behavior using a property\n // this.pageIndex.set(0);\n // this.loadMoreEntities();\n }\n }\n\n /**\n * Update an entity with a modified version. Can be used by CRUD UPDATE\n * operation to update an entity in the local store that is used to as the\n * source of MatTableDataSource.\n * @param id\n * @param entity\n */\n updateEntity(id: TEntity[IdKey], entity: TEntity) {\n if (this.store.query(hasEntity(id))) {\n this.store.update(updateEntities(id, entity));\n }\n }\n\n /**\n * Clients can call this method when it has deleted and entity via a CRUD\n * operation. Depending on the pagination mode, MatEntityList implements\n * an appropriate behavior.\n *\n * If the pagination is 'infinite', the relevent entity is removed from our\n * entity list. View will be repained as data store has changed.\n *\n * If the pagination is 'discrete', the entity is removed from the page.\n * If this is the only entity in the page, the current pageNumber is\n * decremented by 1 if it's possible (if the current pageNumber > 1).\n * The page is reloaded from remote.\n */\n removeEntity(id: TEntity[IdKey]) {\n const paginator = this._paginator;\n if (paginator) {\n if (this.pagination() === 'infinite') {\n // This will cause store to mutate which will trigger this.entity$ to\n // emit which in turn will update our MatTableDataSource instance.\n this.store.update(deleteEntities(id));\n } else {\n // Logic\n this.store.update(deleteEntities(id));\n const count = this.store.query(getEntitiesCount());\n if (count == 0) {\n // No more entities in this page\n // Go back one page\n if (this.pageIndex() > 0) {\n this.pageIndex.set(this.pageIndex() - 1);\n }\n }\n // load the page again\n this.loadMoreEntities();\n }\n } else {\n // Just remove the entity that has been deleted.\n this.store.update(deleteEntities(id));\n }\n }\n\n /**\n * Build the contentColumnDefs array by enumerating all of client's projected\n * content with matColumnDef directive.\n */\n buildContentColumnDefs() {\n const clientColumnDefs = this.clientColumnDefs;\n if (clientColumnDefs) {\n this.contentColumnDefs = clientColumnDefs.toArray();\n }\n }\n\n /**\n * Build the effective columns by parsing our own <ng-container matColumnDef>\n * statements for each column in columns() property and client's\n * <ng-container matColumnDef> provided via content projection.\n */\n buildColumns() {\n const matTable = this.table();\n\n if (matTable) {\n const columnNames = new Set<string>();\n const columnDefs: MatColumnDef[] = [];\n\n this._columns().forEach((colDef) => {\n if (!columnNames.has(colDef.name)) {\n const matColDef = this.viewColumnDefs().find(\n (cd) => cd.name === colDef.name\n );\n const clientColDef = this.contentColumnDefs.find(\n (cd) => cd.name === colDef.name\n );\n const columnDef = clientColDef ? clientColDef : matColDef;\n if (columnDef) {\n columnDefs.push(columnDef);\n columnNames.add(colDef.name);\n }\n }\n });\n columnDefs.forEach((cd) => {\n matTable.addColumnDef(cd);\n });\n\n this.allColumnNames.set(Array.from(columnNames));\n // this.displayedColumns.set(Array.from(columnNames) as string[]);\n }\n }\n\n setupSort() {\n const matSort = this.sort();\n if (matSort) {\n this.dataSource().sort = matSort;\n }\n }\n\n infiniteScrollLoadNextPage(ev: any) {\n // console.log(`infiniteScrollLoadNextPage - ${JSON.stringify(ev)}`);\n if (this._paginator) {\n this.loadMoreEntities();\n }\n }\n\n loadMoreEntities(forceRefresh = false) {\n this.loadRequest$.next(this.createNextLoadRequest(forceRefresh));\n }\n\n /**\n * Creates a LoadRequest object for loading entities using the current state\n * of the component. Therefore, if the request is for next page of entities,\n * the LoadRequest object will have the updated page index. However, if\n * pagination has been reset (refer to refresh()), the LoadRequest object\n * will be for the first page of data. Note that when 'endpoint' value\n * changes, the component's pagination state is reset causing a refresh()\n * to be called, which in turn will create a new LoadRequest object for the\n * first page of data.\n * @returns LoadRequest object for the next load request.\n */\n private createNextLoadRequest(forceRefresh: boolean): LoadRequest {\n let pageParams = {};\n const parts = this.endpoint().split('?');\n const endpoint = parts[0];\n if (this._paginator) {\n pageParams = this._paginator.getRequestPageParams(\n endpoint,\n this.pageIndex(),\n this.pageSize()\n );\n }\n let httpParams = new HttpParams();\n for (const key in pageParams) {\n httpParams = httpParams.append(key, (pageParams as any)[key]);\n }\n if (parts.length > 1) {\n const embeddedParams = new HttpParams({ fromString: parts[1] });\n embeddedParams.keys().forEach((key) => {\n const value = embeddedParams.getAll(key);\n (value || []).forEach((v) => {\n httpParams = httpParams.append(key, v);\n });\n });\n }\n return new LoadRequest(\n endpoint,\n httpParams,\n forceRefresh || !!this.entityLoaderFn()\n );\n }\n\n /**\n * Does the actual load of entities from the remote or via calling the\n * entityLoaderFn. This method is the workhorse of the entity list\n * 'loader-loop'.\n * @param lr\n * @returns Observable that emits the response from the remote or from\n * entityLoaderFn().\n */\n private doActualLoad(lr: LoadRequest) {\n // console.log(`doActualLoad - endpoint: ${lr.endpoint}, params: ${lr.params.toString()}`);\n const loaderFn = this.entityLoaderFn();\n const params = lr.params;\n const obs =\n loaderFn !== undefined\n ? loaderFn({ params })\n : this.http.get<any>(this.getUrl(lr.endpoint), {\n context: this._httpReqContext(),\n params,\n });\n\n this.loading.set(true);\n return obs.pipe(\n tap((resp) => {\n // TODO: defer this to a pagination provider so that we can support\n // many types of pagination. DRF itself has different schemes. And\n // express may have yet another pagination protocol.\n this.firstLoadDone = true;\n if (this._paginator) {\n // Convert HttpParams to JS object\n const paramsObj: any = {};\n params.keys().forEach((key) => {\n paramsObj[key] = params.get(key);\n });\n const { entities, total } = this._paginator.parseRequestResponse(\n this.entityName(),\n this._entityNamePlural()!,\n this.endpoint(),\n paramsObj,\n resp\n );\n this.entityCount.set(total);\n this.lastFetchedEntitiesCount.set(entities.length);\n // this.pageIndex.set(this.pageIndex() + 1)\n // entities = this._paginator.getEntitiesFromResponse(entities);\n if (this.pagination() === 'discrete') {\n this.store.reset();\n } else if (this.pagination() === 'infinite') {\n const pageSize = this._pageSize();\n const entityCount = this.entityCount();\n if (pageSize > 0) {\n const pageCount =\n Math.floor(entityCount / pageSize) +\n (entityCount % pageSize ? 1 : 0);\n this.hasMore.set(this.pageIndex() === pageCount);\n } else {\n this.hasMore.set(false);\n }\n }\n // store the entities in the store\n // TODO: remove as any\n this.store.update(upsertEntities(entities as any));\n } else {\n this.store.update(\n upsertEntities(this.findArrayInResult(resp) as TEntity[])\n );\n }\n }),\n finalize(() => this.loading.set(false))\n );\n }\n\n private findArrayInResult(res: any): any[] | undefined {\n if (Array.isArray(res)) {\n return res;\n }\n for (const key in res) {\n if (Object.prototype.hasOwnProperty.call(res, key)) {\n const element = res[key];\n if (Array.isArray(element)) {\n return element;\n }\n }\n }\n return [];\n }\n\n handlePageEvent(e: PageEvent) {\n this.pageIndex.set(e.pageIndex);\n this.loadMoreEntities();\n }\n\n getUrl(endpoint: string) {\n return this.entityListConfig?.urlResolver\n ? this.entityListConfig?.urlResolver(endpoint)\n : endpoint;\n }\n\n toggleActiveEntity(entity: TEntity | undefined) {\n if (entity) {\n if (entity === this.activeEntity()) {\n this.activeEntity.set(undefined);\n } else {\n this.activeEntity.set(entity);\n }\n } else {\n this.activeEntity.set(undefined);\n }\n }\n\n getColumnLabel(field: SPEntityField<TEntity, IdKey>): Observable<string> {\n if (field._fieldSpec.label) {\n return field._fieldSpec.label instanceof Observable\n ? field._fieldSpec.label\n : of(field._fieldSpec.label);\n }\n if (this.entityListConfig && this.entityListConfig.columnLabelFn) {\n const label = this.entityListConfig.columnLabelFn(\n this.entityName(),\n field._fieldSpec.name\n );\n return label instanceof Observable ? label : of(label);\n }\n return of(field._fieldSpec.name);\n }\n\n isAsync(val: any) {\n return val instanceof Observable;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AASa,MAAA,+BAA+B,GAC1C,IAAI,gBAAgB,CAA6B,OAAO;AACtD,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,QAAQ,EAAE,EAAE;AACb,CAAA,CAAC;;MCXS,yBAAyB,GAAG,IAAI,cAAc,CACzD,uBAAuB;;ACAlB,MAAM,4BAA4B,GAA0B;AACjE,IAAA,WAAW,EAAE,CAAC,QAAgB,KAAK,QAAQ;AAC3C,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;IAC5B,aAAa,EAAE,CAAC,UAAkB,EAAE,UAAkB,KAAK,UAAU;CACtE;AAED;;AAEG;SACa,mBAAmB,GAAA;AACjC,IAAA,MAAM,gBAAgB,GAAG,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":["../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/mat-entity-list-types.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/providers.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/config.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/src/mat-entity-list.component.ts","../../../../projects/smallpearl/ngx-helper/mat-entity-list/smallpearl-ngx-helper-mat-entity-list.ts"],"sourcesContent":["import { HttpContextToken } from \"@angular/common/http\";\nimport { Observable } from \"rxjs\";\n\nexport interface SPMatEntityListHttpContext {\n entityName: string;\n entityNamePlural: string;\n endpoint: string;\n}\n\nexport const SP_MAT_ENTITY_LIST_HTTP_CONTEXT =\n new HttpContextToken<SPMatEntityListHttpContext>(() => ({\n entityName: '',\n entityNamePlural: '',\n endpoint: '',\n }));\n\n/**\n * Pagination HTTP request params. Actually copied from Angular's HttpParams\n * declaration. The ReadonlyArray<string|number|boolean> is a bit of an\n * overkill for pagination params, but what the heck. When you copy-paste,\n * do it in full!\n */\nexport type SPPageParams = { [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>; }\n\n/**\n * An interface that the clients should provide, either via a global config\n * (see above), that handles parsing the GET response and returns the entities\n * stored therein. This class will allow the entity-list component to be\n * used across different pagination response types as long as the appropriate\n * SPMatEntityListPaginator class is provided to the component.\n */\nexport interface SPMatEntityListPaginator {\n /**\n * Return the HTTP request params for the given page index and page size as\n * an object. For example, for a REST API that supports 'skip' and 'top' params,\n * the implementation would be:\n *\n * ```typescript\n * getRequestPageParams(endpoint: string, pageIndex: number, pageSize: number): SPPageParams {\n * return {\n * skip: pageIndex * pageSize,\n * top: pageSize\n * };\n * }\n * ```\n * @param endpoint\n * @param pageIndex\n * @param pageSize\n * @returns\n */\n getRequestPageParams: (endpoint: string, pageIndex: number, pageSize: number) => SPPageParams;\n\n /**\n * Parse the HTTP response received from the GET request and return an object\n * containing the total number of entities available and the array of entities\n * for the current page. For example, for the pure DRF paginated response\n * like below:\n * ```json\n * {\n * \"count\": 102,\n * \"next\": \"http://api.example.org/entities/?page=3\",\n * \"previous\": \"http://api.example.org/entities/?page=1\",\n * \"results\": [\n * {\n * \"id\": 1,\n * \"name\": \"Entity 1\"\n * },\n * {\n * \"id\": 2,\n * \"name\": \"Entity 2\"\n * }\n * ]\n * }\n * ```\n * The implementation would be:\n * ```typescript\n * parseRequestResponse<TEntity extends { [P in IdKey]: PropertyKey }, IdKey extends string = 'id'>(\n * entityName: string,\n * entityNamePlural: string,\n * endpoint: string,\n * params: SPPageParams,\n * resp: any\n * ): { total: number; entities: TEntity[] } {\n * return {\n * total: resp.count,\n * entities: resp.results\n * };\n * }\n * ```\n * @param entityName\n * @param entityNamePlural\n * @param endpoint\n * @param params\n * @param resp\n * @returns\n */\n parseRequestResponse: <\n TEntity extends { [P in IdKey]: PropertyKey },\n IdKey extends string = 'id'\n >(\n entityName: string,\n entityNamePlural: string,\n endpoint: string,\n params: SPPageParams,\n resp: any\n ) => { total: number; entities: TEntity[] };\n}\n\n/**\n * 'entity' is really TEntity arg of SPMatEntityListComponent<TEntity>.\n * 'column' is the column name. This allows the same value function to support\n * multiple columns further enabing DRY.\n */\nexport type COLUMN_VALUE_FN = (entity: any, column: string) => string|number|Date|boolean;\n\n/**\n * Global config for SPMatEntityList component.\n */\nexport interface SPMatEntityListConfig {\n urlResolver?: (endpoint: string) => string;\n paginator?: SPMatEntityListPaginator;\n defaultPageSize?: number;\n pageSizes?: Array<number>;\n /**\n * Provide a method to return the labels for the columns. This is useful when\n * the columns are specified as the JSON object key names and the labels are\n * to be transformed into a uniform manner (uppercase) or when the labels\n * are to be dynamically localized. Note that the response can be an\n * Observable<string> if the label is to be fetched/changed asynchronously\n * (as that can happen in an app that supports dynamic changing of the UI\n * language).\n * @param entityName\n * @param columnName\n * @returns\n */\n columnLabelFn?: (entityName: string, columnName: string) => string | Observable<string>;\n}\n\n/**\n * Type for custom entities loader function, which if provided will be called\n * instead of HttpClient.get.\n */\nexport type SPMatEntityListEntityLoaderFn = (params: any) => Observable<any>;\n","import { InjectionToken } from '@angular/core';\nimport { SPMatEntityListConfig } from './mat-entity-list-types';\n\nexport const SP_MAT_ENTITY_LIST_CONFIG = new InjectionToken<SPMatEntityListConfig>(\n 'SPMatEntityListConfig'\n);\n","import { inject } from '@angular/core';\nimport { SPMatEntityListConfig } from './mat-entity-list-types';\nimport { SP_MAT_ENTITY_LIST_CONFIG } from './providers';\n\nexport const DefaultSPMatEntityListConfig: SPMatEntityListConfig = {\n urlResolver: (endpoint: string) => endpoint,\n paginator: undefined,\n defaultPageSize: 50,\n pageSizes: [10, 25, 50, 100],\n columnLabelFn: (entityName: string, columnName: string) => columnName,\n};\n\n/**\n * To be called from an object's constructor.\n */\nexport function getEntityListConfig(): SPMatEntityListConfig {\n const entityListConfig = inject(SP_MAT_ENTITY_LIST_CONFIG, {\n optional: true,\n });\n return {\n ...DefaultSPMatEntityListConfig,\n ...(entityListConfig ?? {}),\n };\n}\n","import { CommonModule } from '@angular/common';\nimport { HttpClient, HttpContext, HttpContextToken, HttpParams } from '@angular/common/http';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ContentChildren,\n Directive,\n effect,\n ElementRef,\n EventEmitter,\n inject,\n Injector,\n input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n runInInjectionContext,\n signal,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport {\n MatColumnDef,\n MatTable,\n MatTableDataSource,\n MatTableModule,\n} from '@angular/material/table';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { RouterModule } from '@angular/router';\nimport { createStore } from '@ngneat/elf';\nimport {\n addEntities,\n deleteEntities,\n getEntitiesCount,\n hasEntity,\n selectAllEntities,\n updateEntities,\n upsertEntities,\n withEntities,\n} from '@ngneat/elf-entities';\nimport {\n SP_ENTITY_FIELD_CONFIG,\n SPEntityField,\n SPEntityFieldSpec\n} from '@smallpearl/ngx-helper/entity-field';\nimport { InfiniteScrollDirective } from 'ngx-infinite-scroll';\nimport { plural } from 'pluralize';\nimport {\n distinctUntilChanged,\n filter,\n finalize,\n Observable,\n of,\n Subject,\n Subscription,\n switchMap,\n takeUntil,\n tap\n} from 'rxjs';\nimport { getEntityListConfig } from './config';\nimport {\n SP_MAT_ENTITY_LIST_HTTP_CONTEXT,\n SPMatEntityListEntityLoaderFn,\n SPMatEntityListPaginator\n} from './mat-entity-list-types';\n\n@Directive({\n selector: '[headerAlignment]',\n standalone: true\n})\nexport class HeaderAlignmentDirective implements AfterViewInit {\n\n headerAlignment = input<string>();\n\n constructor(private el: ElementRef) {\n // this.el.nativeElement.style.backgroundColor = 'yellow';\n }\n\n ngAfterViewInit(): void {\n if (this.headerAlignment()) {\n const sortHeader = this.el.nativeElement.querySelector('.mat-sort-header-container');\n if (sortHeader) {\n sortHeader.style.justifyContent = this.headerAlignment();\n } else {\n this.el.nativeElement.style.justifyContent = this.headerAlignment();\n }\n }\n }\n}\n\n/**\n * Represents a request to load entities from the remote. This is used to\n * compare two requests to determine if they are equal. This is useful to\n * prevent duplicate requests being sent to the remote.\n */\nclass LoadRequest {\n constructor(\n public endpoint: string,\n public params: HttpParams,\n public force = false\n ) {}\n\n // Returns true if two LoadRequest objects are equal and this object's\n // 'force' is not set to true.\n isEqualToAndNotForced(prev: LoadRequest): boolean {\n // console.log(\n // `isEqualToAndNotForced - ${this.endpoint}, ${this.params.toString()} ${\n // this.force\n // }, other: ${prev.endpoint}, ${prev.params.toString()}, ${prev.force}`\n // );\n return this.force\n ? false\n : this.endpoint.localeCompare(prev.endpoint) === 0 &&\n this.params.toString().localeCompare(prev.params.toString()) === 0;\n }\n}\n\n/**\n * A component to display a list of entities loaded from remote.\n */\n@Component({\n imports: [\n CommonModule,\n RouterModule,\n MatTableModule,\n MatSortModule,\n MatPaginatorModule,\n MatButtonModule,\n MatInputModule,\n MatProgressSpinnerModule,\n InfiniteScrollDirective,\n HeaderAlignmentDirective,\n ],\n selector: 'sp-mat-entity-list',\n template: `\n <div\n class=\"entities-list-wrapper\"\n infiniteScroll\n [infiniteScrollDistance]=\"infiniteScrollDistance()\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle()\"\n [infiniteScrollContainer]=\"infiniteScrollContainer()\"\n [scrollWindow]=\"infiniteScrollWindow()\"\n [infiniteScrollDisabled]=\"\n pagination() !== 'infinite' || !_paginator || !hasMore()\n \"\n (scrolled)=\"infiniteScrollLoadNextPage($event)\"\n >\n <div\n class=\"busy-overlay\"\n [ngClass]=\"{ show: pagination() === 'discrete' && loading() }\"\n >\n <ng-container *ngTemplateOutlet=\"busySpinner\"></ng-container>\n </div>\n <table mat-table [dataSource]=\"dataSource()\">\n <tr mat-header-row *matHeaderRowDef=\"_displayedColumns()\"></tr>\n <tr\n mat-row\n [class.active-row]=\"activeEntityId() === row[this.idKey()]\"\n *matRowDef=\"let row; columns: _displayedColumns()\"\n (click)=\"toggleActiveEntity(row)\"\n ></tr>\n </table>\n @if (pagination() == 'discrete' && _paginator) {\n <mat-paginator\n showFirstLastButtons\n [length]=\"entityCount()\"\n [pageSize]=\"_pageSize()\"\n [pageIndex]=\"pageIndex()\"\n [pageSizeOptions]=\"[]\"\n [hidePageSize]=\"true\"\n (page)=\"handlePageEvent($event)\"\n [disabled]=\"loading()\"\n aria-label=\"Select page\"\n ></mat-paginator>\n }\n <div\n class=\"infinite-scroll-loading\"\n [ngClass]=\"{ show: pagination() === 'infinite' && loading() }\"\n >\n <ng-container *ngTemplateOutlet=\"busySpinner\"></ng-container>\n </div>\n </div>\n <!-- We keep the column definitions outside the <table> so that they can\n be dynamically added to the MatTable. -->\n <span matSort=\"sorter()\">\n @for (column of __columns(); track $index) {\n <ng-container [matColumnDef]=\"column.spec.name\">\n @if (disableSort()) {\n <th\n [class]=\"column.class\"\n [headerAlignment]=\"column.options.alignment\"\n mat-header-cell\n *matHeaderCellDef\n >\n {{ getColumnLabel(column) | async }}\n </th>\n } @else {\n <th\n [class]=\"column.class\"\n [headerAlignment]=\"column.options.alignment\"\n mat-header-cell\n mat-sort-header\n *matHeaderCellDef\n >\n {{ getColumnLabel(column) | async }}\n </th>\n }\n <td\n [class]=\"column.class\"\n [style.text-align]=\"column.options.alignment\"\n mat-cell\n *matCellDef=\"let element\"\n [routerLink]=\"column.getRouterLink(element)\"\n >\n @if (column.hasRouterLink(element)) {\n <a [routerLink]=\"column.getRouterLink(element)\">\n <span [innerHTML]=\"column.value(element)\"></span>\n </a>\n } @else { @let val = column.value(element);\n <span [innerHTML]=\"isAsync(val) ? (val | async) : val\"></span>\n }\n </td>\n </ng-container>\n }\n </span>\n <ng-template #busySpinner>\n <div class=\"busy-spinner\">\n <mat-spinner mode=\"indeterminate\" diameter=\"28\"></mat-spinner>\n </div>\n </ng-template>\n `,\n styles: [\n `\n .entities-list-wrapper {\n position: relative;\n }\n .busy-overlay {\n display: none;\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0px;\n left: 0px;\n z-index: 1000;\n opacity: 0.6;\n background-color: transparent;\n }\n .show {\n display: block;\n }\n .busy-spinner {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .infinite-scroll-loading {\n display: none;\n width: 100%;\n padding: 8px;\n }\n .active-row {\n font-weight: bold;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SPMatEntityListComponent<\n TEntity extends { [P in IdKey]: PropertyKey },\n IdKey extends string = 'id'\n> implements OnInit, OnDestroy, AfterViewInit\n{\n /* CLIENT PROVIDED PARAMETERS */\n entityName = input.required<string>();\n entityNamePlural = input<string>();\n\n /**\n * The endpoint from where the entities are to be retrieved\n */\n endpoint = input<string>('');\n /**\n * Custom entities loader function, which if provided will be called\n * instead of HttpClient.get.\n */\n entityLoaderFn = input<SPMatEntityListEntityLoaderFn | undefined>(undefined);\n /**\n * The columns of the entity to be displayed. This is an array of\n * SPEntityFieldSpec objects. If there's a one-to-one mapping between the\n * column's field name, its title & the rendered value, a string can be\n * specified instead. That is, the value of this property is a heterogeneous\n * array consisting of SPEntityFieldSpec<> objects and strings.\n */\n columns = input<Array<SPEntityFieldSpec<TEntity, IdKey> | string>>([]);\n\n /**\n * Names of columns that are displayed. This will default to all the columns\n * listed in columns.\n */\n displayedColumns = input<string[]>([]); // ['name', 'cell', 'gender'];\n\n /**\n * Number of entities per page. If this is not set and paginator is defined,\n * the number of entities int in the first request, will be taken as the\n * page size.\n */\n pageSize = input<number>(0);\n /**\n * Entity idKey, if idKey is different from the default 'id'.\n */\n idKey = input<string>('id');\n /**\n * Type of pagination -- continuous or discrete. 'infinite' pagination\n * uses an 'infiniteScroll' and 'discrete' pagination uses a mat-paginator\n * at the bottom to navigate between pages.\n */\n pagination = input<'infinite' | 'discrete' | 'none'>('discrete');\n /**\n * Component specific paginator. Only used if pagination != 'none'.\n */\n paginator = input<SPMatEntityListPaginator>();\n /**\n *\n */\n sorter = input<MatSort>();\n /**\n * Disable sorting of rows\n */\n disableSort = input<boolean>(false);\n /**\n * Wrappers for infiniteScroll properties, for customization by the client\n */\n infiniteScrollContainer = input<any>('');\n infiniteScrollDistance = input<number>(1);\n infiniteScrollThrottle = input<number>(400);\n infiniteScrollWindow = input<boolean>(false);\n /**\n * Custom context to be set for HttpClient requests. Value for this attribute\n * can be an array of HttpContextToken key, value pairs, or an instance of\n * HttpContext.\n *\n * In the client code specify this property by initializing a member variable\n * as:\n\n ```\n Component({\n ...\n template: `\n <sp-mat-entity-list\n [httpReqContext]=\"httpReqContext\"\n ></sp-mat-entity-list>\n `\n })\n export class YourComponent {\n httpReqContext: [HttpContextToken<any>, any] = [\n MY_CONTEXT_TOKEN, 'customers'\n ];\n // Or [httpReqContext]=\"httpReqContext2\" will work too.\n httpReqContext2: HttpContext = new HttpContext().set(\n MY_CONTEXT_TOKEN, 'customers'\n );\n }\n ```\n *\n * Of course if you want to pass multiple context properties, declare the type\n * as an array of array. That is, `[[HttpContextToken<any>, any]]` and\n * initialize it appropriately.\n */\n httpReqContext = input<\n [[HttpContextToken<any>, any]] | [HttpContextToken<any>, any] | HttpContext | undefined\n >();\n /* END CLIENT PROVIDED PARAMETERS */\n\n // *** INTERNAL *** //\n _entityNamePlural = computed(() =>\n this.entityNamePlural()\n ? this.entityNamePlural()\n : plural(this.entityName())\n );\n\n _httpReqContext = computed(() => {\n let reqContext = this.httpReqContext();\n let context = new HttpContext();\n if (reqContext instanceof HttpContext) {\n // Copy existing context values\n for (const key of reqContext.keys()) {\n context.set(key, reqContext.get(key));\n }\n } else {\n if (reqContext && Array.isArray(reqContext)) {\n if (reqContext.length == 2 && !Array.isArray(reqContext[0])) {\n // one dimensional array of a key, value pair.\n context.set(reqContext[0], reqContext[1]);\n } else {\n reqContext.forEach(([k, v]) => context.set(k, v));\n }\n }\n }\n\n // Add mandatory SP_MAT_ENTITY_LIST_HTTP_CONTEXT context token\n if (!context.has(SP_MAT_ENTITY_LIST_HTTP_CONTEXT)) {\n context.set(SP_MAT_ENTITY_LIST_HTTP_CONTEXT, {\n entityName: this.entityName(),\n entityNamePlural: this._entityNamePlural(),\n endpoint: this.endpoint(),\n });\n }\n return context;\n });\n deferViewInit = input<boolean>(false);\n firstLoadDone = false;\n allColumnNames = signal<string[]>([]);\n _displayedColumns = computed(() =>\n this.displayedColumns().length > 0\n ? this.displayedColumns().filter(\n (colName) =>\n this.allColumnNames().find((name) => name === colName) !== undefined\n )\n : this.allColumnNames()\n );\n dataSource = signal<MatTableDataSource<TEntity>>(\n new MatTableDataSource<TEntity>()\n );\n\n table = viewChild(MatTable);\n sort = viewChild(MatSort);\n // These are our own <ng-container matColumnDef></ng-container>\n // which we create for each column that we create by the declaration:\n // <ng-container *ngFor=\"let column of columns()\" [matColumnDef]=\"column.name\">\n viewColumnDefs = viewChildren(MatColumnDef);\n // These are the <ng-container matColumnDef></ng-container> placed\n // inside <sp-mat-entity-list></<sp-mat-entity-list> by the client to override\n // the default <ng-container matColumnDef> created by the component.\n @ContentChildren(MatColumnDef) clientColumnDefs!: QueryList<MatColumnDef>;\n\n contentColumnDefs: MatColumnDef[] = [];\n\n subs$ = new Subscription();\n destroy$ = new Subject<void>();\n\n // Pagination state\n entityCount = signal<number>(0);\n pageIndex = signal<number>(0);\n\n // Mechanism to default pageSize to last entities length.\n lastFetchedEntitiesCount = signal<number>(0);\n _pageSize = computed<number>(() =>\n this.pageSize()\n ? this.pageSize()\n : this.entityListConfig.defaultPageSize ?? this.lastFetchedEntitiesCount()\n );\n // Effective columns, derived from columns(), which can either be an array\n // of objects of array of strings.\n _columns = computed<SPEntityFieldSpec<TEntity, IdKey>[]>(() => {\n const columns = this.columns();\n let fields: SPEntityField<TEntity, IdKey>[] = [];\n let cols: SPEntityFieldSpec<TEntity, IdKey>[] = [];\n columns.forEach((colDef) => {\n // fields.push(new SPEntityField(colDef))\n if (typeof colDef === 'string') {\n cols.push({ name: String(colDef) });\n } else if (typeof colDef === 'object') {\n cols.push(colDef as SPEntityFieldSpec<TEntity, IdKey>);\n }\n });\n return cols;\n });\n\n __columns = computed<SPEntityField<TEntity, IdKey>[]>(() =>\n this.columns().map(\n (colDef) => new SPEntityField<TEntity, IdKey>(colDef, this.fieldConfig)\n )\n );\n\n // We isolate retrieving items from the remote and providing the items\n // to the component into two distinct operations. The retrieval operation\n // retrieves data asynchronously and then stores the data in a local store.\n // The UI would be 'listening' to a reactive callback that would be triggered\n // whenever items in the store changes. This is because store is an immutable\n // data structure and any changes (addition/deletion) to it would result in\n // the entire store being replaced with a copy with the changes applied.\n\n // Ideally we should declare this as\n // store!: Store<...>. But @ngneat/elf does not provide a generic type\n // for Store<...>, which can be composed from its type arguments. Instead it\n // uses type composition using its arguments to generate store's type\n // implicitly. So we use the same mechanism to enforce type safety in our\n // code. The code below results in a type declaration for store that is\n // dependent on the components generic arguments. (Making use of TypeScript's\n // type deduction system from variable assignment). Later on in the\n // constructor we reassign this.store with a new object that uses the\n // client provided idKey() value as the identifying key for each entity in\n // the sore.\n store = createStore(\n { name: Math.random().toString(36).slice(2) },\n withEntities<TEntity, IdKey>({ idKey: this.idKey() as IdKey })\n );\n // We'll initialize this in ngOnInit() when 'store' is initialized with the\n // correct TEntity store that can be safely indexed using IdKey.\n entities$!: Observable<TEntity[]>;\n // Effective paginator, coalescing local paginator and paginator from global\n // config.\n _paginator!: SPMatEntityListPaginator | undefined;\n // We will toggle this during every entity load.\n loading = signal<boolean>(false);\n // We will update this after every load and pagination() == 'infinite'\n hasMore = signal<boolean>(true);\n\n activeEntity = signal<TEntity | undefined>(undefined);\n activeEntityId = computed(() =>\n this.activeEntity() ? (this.activeEntity() as any)[this.idKey()] : undefined\n );\n _prevActiveEntity!: TEntity | undefined;\n _activeEntityChange = effect(() => {\n runInInjectionContext(this.injector, () => {\n const activeEntity = this.activeEntity();\n // Though we can raise the selectEntity event directly from effect handler,\n // that would prevent the event handler from being able to update any\n // signals from inside it. So we generate the event asyncronously.\n // Also, this effect handler will be invoked for the initial 'undefined'\n // during which we shouldn't emit the selectEntity event. Therefore we\n // keep another state variable to filter out this state.\n if (activeEntity || this._prevActiveEntity) {\n setTimeout(() => {\n this._prevActiveEntity = activeEntity;\n this.selectEntity.emit(activeEntity);\n // if (this._prevActiveEntity && !activeEntity) {\n // this.selectEntity.emit(activeEntity);\n // } else if (activeEntity) {\n // this.selectEntity.emit(activeEntity);\n // }\n });\n }\n });\n });\n @Output() selectEntity = new EventEmitter<TEntity | undefined>();\n\n fieldConfig = inject(SP_ENTITY_FIELD_CONFIG, { optional: true })!;\n entityListConfig = getEntityListConfig();\n\n /**\n * A signal that can be used to trigger loading of more entities from the\n * remote. This can be visualized as the event loop of the entity list\n * component.\n */\n loadRequest$ = new Subject<LoadRequest>();\n\n endpointChanged = effect(() => {\n runInInjectionContext(this.injector, () => {\n if (this.endpoint()) {\n // console.log(`endpointChanged - ${this.endpoint()}`);\n setTimeout(() => {\n this.refresh();\n });\n }\n });\n });\n\n constructor(\n protected http: HttpClient,\n private sanitizer: DomSanitizer,\n private injector: Injector\n ) {}\n\n ngOnInit() {\n // This is the reactive callback that listens for changes to table entities\n // which are reflected in the mat-table.\n this.store = createStore(\n { name: Math.random().toString(36).slice(2) },\n withEntities<TEntity, IdKey>({ idKey: this.idKey() as IdKey })\n );\n this.entities$ = this.store.pipe(selectAllEntities());\n this._paginator = this.paginator()\n ? this.paginator()\n : this.entityListConfig?.paginator;\n\n this.entities$\n .pipe(\n takeUntil(this.destroy$),\n tap((entities) => {\n // .data is a setter property, which ought to trigger the necessary\n // signals resulting in mat-table picking up the changes without\n // requiring us to call cdr.detectChanges() explicitly.\n this.dataSource().data = entities;\n })\n )\n .subscribe();\n\n this.loadRequest$\n .pipe(\n takeUntil(this.destroy$),\n filter((lr) => lr.endpoint !== '' || lr.force === true),\n distinctUntilChanged((prev, current) =>\n current.isEqualToAndNotForced(prev)\n ),\n switchMap((lr: LoadRequest) => this.doActualLoad(lr))\n )\n .subscribe();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n ngAfterViewInit(): void {\n if (!this.deferViewInit()) {\n this.buildContentColumnDefs();\n this.buildColumns();\n this.setupSort();\n this.loadMoreEntities();\n }\n }\n\n /**\n * Clear all entities in store and reload them from endpoint as if\n * the entities are being loaded for the first time.\n */\n refresh(force = false) {\n this.pageIndex.set(0);\n this.loadMoreEntities(force);\n }\n\n addEntity(entity: TEntity) {\n const pagination = this.pagination();\n const count = this.store.query(getEntitiesCount());\n if (\n pagination === 'infinite' ||\n pagination === 'none' ||\n count < this._pageSize()\n ) {\n this.store.update(addEntities(entity));\n } else {\n // 'discrete' pagination, refresh the crud items from the beginning.\n // Let component client set the behavior using a property\n // this.pageIndex.set(0);\n // this.loadMoreEntities();\n }\n }\n\n /**\n * Update an entity with a modified version. Can be used by CRUD UPDATE\n * operation to update an entity in the local store that is used to as the\n * source of MatTableDataSource.\n * @param id\n * @param entity\n */\n updateEntity(id: TEntity[IdKey], entity: TEntity) {\n if (this.store.query(hasEntity(id))) {\n this.store.update(updateEntities(id, entity));\n }\n }\n\n /**\n * Clients can call this method when it has deleted and entity via a CRUD\n * operation. Depending on the pagination mode, MatEntityList implements\n * an appropriate behavior.\n *\n * If the pagination is 'infinite', the relevent entity is removed from our\n * entity list. View will be repained as data store has changed.\n *\n * If the pagination is 'discrete', the entity is removed from the page.\n * If this is the only entity in the page, the current pageNumber is\n * decremented by 1 if it's possible (if the current pageNumber > 1).\n * The page is reloaded from remote.\n */\n removeEntity(id: TEntity[IdKey]) {\n const paginator = this._paginator;\n if (paginator) {\n if (this.pagination() === 'infinite') {\n // This will cause store to mutate which will trigger this.entity$ to\n // emit which in turn will update our MatTableDataSource instance.\n this.store.update(deleteEntities(id));\n } else {\n // Logic\n this.store.update(deleteEntities(id));\n const count = this.store.query(getEntitiesCount());\n if (count == 0) {\n // No more entities in this page\n // Go back one page\n if (this.pageIndex() > 0) {\n this.pageIndex.set(this.pageIndex() - 1);\n }\n }\n // load the page again\n this.loadMoreEntities();\n }\n } else {\n // Just remove the entity that has been deleted.\n this.store.update(deleteEntities(id));\n }\n }\n\n /**\n * Build the contentColumnDefs array by enumerating all of client's projected\n * content with matColumnDef directive.\n */\n buildContentColumnDefs() {\n const clientColumnDefs = this.clientColumnDefs;\n if (clientColumnDefs) {\n this.contentColumnDefs = clientColumnDefs.toArray();\n }\n }\n\n /**\n * Build the effective columns by parsing our own <ng-container matColumnDef>\n * statements for each column in columns() property and client's\n * <ng-container matColumnDef> provided via content projection.\n */\n buildColumns() {\n const matTable = this.table();\n\n if (matTable) {\n const columnNames = new Set<string>();\n const columnDefs: MatColumnDef[] = [];\n\n this._columns().forEach((colDef) => {\n if (!columnNames.has(colDef.name)) {\n const matColDef = this.viewColumnDefs().find(\n (cd) => cd.name === colDef.name\n );\n const clientColDef = this.contentColumnDefs.find(\n (cd) => cd.name === colDef.name\n );\n const columnDef = clientColDef ? clientColDef : matColDef;\n if (columnDef) {\n columnDefs.push(columnDef);\n columnNames.add(colDef.name);\n }\n }\n });\n columnDefs.forEach((cd) => {\n matTable.addColumnDef(cd);\n });\n\n this.allColumnNames.set(Array.from(columnNames));\n // this.displayedColumns.set(Array.from(columnNames) as string[]);\n }\n }\n\n setupSort() {\n const matSort = this.sort();\n if (matSort) {\n this.dataSource().sort = matSort;\n }\n }\n\n infiniteScrollLoadNextPage(ev: any) {\n // console.log(`infiniteScrollLoadNextPage - ${JSON.stringify(ev)}`);\n if (this._paginator) {\n this.loadMoreEntities();\n }\n }\n\n loadMoreEntities(forceRefresh = false) {\n this.loadRequest$.next(this.createNextLoadRequest(forceRefresh));\n }\n\n /**\n * Creates a LoadRequest object for loading entities using the current state\n * of the component. Therefore, if the request is for next page of entities,\n * the LoadRequest object will have the updated page index. However, if\n * pagination has been reset (refer to refresh()), the LoadRequest object\n * will be for the first page of data. Note that when 'endpoint' value\n * changes, the component's pagination state is reset causing a refresh()\n * to be called, which in turn will create a new LoadRequest object for the\n * first page of data.\n * @returns LoadRequest object for the next load request.\n */\n private createNextLoadRequest(forceRefresh: boolean): LoadRequest {\n let pageParams = {};\n const parts = this.endpoint().split('?');\n const endpoint = parts[0];\n if (this._paginator) {\n pageParams = this._paginator.getRequestPageParams(\n endpoint,\n this.pageIndex(),\n this.pageSize()\n );\n }\n let httpParams = new HttpParams();\n for (const key in pageParams) {\n httpParams = httpParams.append(key, (pageParams as any)[key]);\n }\n if (parts.length > 1) {\n const embeddedParams = new HttpParams({ fromString: parts[1] });\n embeddedParams.keys().forEach((key) => {\n const value = embeddedParams.getAll(key);\n (value || []).forEach((v) => {\n httpParams = httpParams.append(key, v);\n });\n });\n }\n return new LoadRequest(\n endpoint,\n httpParams,\n forceRefresh || !!this.entityLoaderFn()\n );\n }\n\n /**\n * Does the actual load of entities from the remote or via calling the\n * entityLoaderFn. This method is the workhorse of the entity list\n * 'loader-loop'.\n * @param lr\n * @returns Observable that emits the response from the remote or from\n * entityLoaderFn().\n */\n private doActualLoad(lr: LoadRequest) {\n // console.log(`doActualLoad - endpoint: ${lr.endpoint}, params: ${lr.params.toString()}`);\n const loaderFn = this.entityLoaderFn();\n const params = lr.params;\n const obs =\n loaderFn !== undefined\n ? loaderFn({ params })\n : this.http.get<any>(this.getUrl(lr.endpoint), {\n context: this._httpReqContext(),\n params,\n });\n\n this.loading.set(true);\n return obs.pipe(\n tap((resp) => {\n // TODO: defer this to a pagination provider so that we can support\n // many types of pagination. DRF itself has different schemes. And\n // express may have yet another pagination protocol.\n this.firstLoadDone = true;\n if (this._paginator) {\n // Convert HttpParams to JS object\n const paramsObj: any = {};\n params.keys().forEach((key) => {\n paramsObj[key] = params.get(key);\n });\n const { entities, total } = this._paginator.parseRequestResponse(\n this.entityName(),\n this._entityNamePlural()!,\n this.endpoint(),\n paramsObj,\n resp\n );\n this.entityCount.set(total);\n this.lastFetchedEntitiesCount.set(entities.length);\n // this.pageIndex.set(this.pageIndex() + 1)\n // entities = this._paginator.getEntitiesFromResponse(entities);\n if (this.pagination() === 'discrete') {\n this.store.reset();\n } else if (this.pagination() === 'infinite') {\n const pageSize = this._pageSize();\n const entityCount = this.entityCount();\n if (pageSize > 0) {\n const pageCount =\n Math.floor(entityCount / pageSize) +\n (entityCount % pageSize ? 1 : 0);\n this.hasMore.set(this.pageIndex() === pageCount);\n } else {\n this.hasMore.set(false);\n }\n }\n // store the entities in the store\n // TODO: remove as any\n this.store.update(upsertEntities(entities as any));\n } else {\n this.store.update(\n upsertEntities(this.findArrayInResult(resp) as TEntity[])\n );\n }\n }),\n finalize(() => this.loading.set(false))\n );\n }\n\n private findArrayInResult(res: any): any[] | undefined {\n if (Array.isArray(res)) {\n return res;\n }\n for (const key in res) {\n if (Object.prototype.hasOwnProperty.call(res, key)) {\n const element = res[key];\n if (Array.isArray(element)) {\n return element;\n }\n }\n }\n return [];\n }\n\n handlePageEvent(e: PageEvent) {\n this.pageIndex.set(e.pageIndex);\n this.loadMoreEntities();\n }\n\n getUrl(endpoint: string) {\n return this.entityListConfig?.urlResolver\n ? this.entityListConfig?.urlResolver(endpoint)\n : endpoint;\n }\n\n toggleActiveEntity(entity: TEntity | undefined) {\n if (entity) {\n if (entity === this.activeEntity()) {\n this.activeEntity.set(undefined);\n } else {\n this.activeEntity.set(entity);\n }\n } else {\n this.activeEntity.set(undefined);\n }\n }\n\n getColumnLabel(field: SPEntityField<TEntity, IdKey>): Observable<string> {\n if (field._fieldSpec.label) {\n return field._fieldSpec.label instanceof Observable\n ? field._fieldSpec.label\n : of(field._fieldSpec.label);\n }\n if (this.entityListConfig && this.entityListConfig.columnLabelFn) {\n const label = this.entityListConfig.columnLabelFn(\n this.entityName(),\n field._fieldSpec.name\n );\n return label instanceof Observable ? label : of(label);\n }\n return of(field._fieldSpec.name);\n }\n\n isAsync(val: any) {\n return val instanceof Observable;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AASa,MAAA,+BAA+B,GAC1C,IAAI,gBAAgB,CAA6B,OAAO;AACtD,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,QAAQ,EAAE,EAAE;AACb,CAAA,CAAC;;MCXS,yBAAyB,GAAG,IAAI,cAAc,CACzD,uBAAuB;;ACAlB,MAAM,4BAA4B,GAA0B;AACjE,IAAA,WAAW,EAAE,CAAC,QAAgB,KAAK,QAAQ;AAC3C,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;IAC5B,aAAa,EAAE,CAAC,UAAkB,EAAE,UAAkB,KAAK,UAAU;CACtE;AAED;;AAEG;SACa,mBAAmB,GAAA;AACjC,IAAA,MAAM,gBAAgB,GAAG,MAAM,CAAC,yBAAyB,E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CAAA,EAAA;iIAuKhB,gBAAgB,EAAA,CAAA;sBAA9C,eAAe;uBAAC,YAAY;gBAsGnB,YAAY,EAAA,CAAA;sBAArB;;;AChiBH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"path": "src/assets/i18n/"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
|
-
"version": "0.33.
|
|
9
|
+
"version": "0.33.18",
|
|
10
10
|
"peerDependencies": {
|
|
11
11
|
"@angular/common": "^19.1.0",
|
|
12
12
|
"@angular/core": "^19.1.0",
|
|
@@ -48,6 +48,14 @@
|
|
|
48
48
|
"types": "./entities/index.d.ts",
|
|
49
49
|
"default": "./fesm2022/smallpearl-ngx-helper-entities.mjs"
|
|
50
50
|
},
|
|
51
|
+
"./locale": {
|
|
52
|
+
"types": "./locale/index.d.ts",
|
|
53
|
+
"default": "./fesm2022/smallpearl-ngx-helper-locale.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./forms": {
|
|
56
|
+
"types": "./forms/index.d.ts",
|
|
57
|
+
"default": "./fesm2022/smallpearl-ngx-helper-forms.mjs"
|
|
58
|
+
},
|
|
51
59
|
"./hover-dropdown": {
|
|
52
60
|
"types": "./hover-dropdown/index.d.ts",
|
|
53
61
|
"default": "./fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs"
|
|
@@ -56,14 +64,6 @@
|
|
|
56
64
|
"types": "./mat-busy-wheel/index.d.ts",
|
|
57
65
|
"default": "./fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs"
|
|
58
66
|
},
|
|
59
|
-
"./forms": {
|
|
60
|
-
"types": "./forms/index.d.ts",
|
|
61
|
-
"default": "./fesm2022/smallpearl-ngx-helper-forms.mjs"
|
|
62
|
-
},
|
|
63
|
-
"./locale": {
|
|
64
|
-
"types": "./locale/index.d.ts",
|
|
65
|
-
"default": "./fesm2022/smallpearl-ngx-helper-locale.mjs"
|
|
66
|
-
},
|
|
67
67
|
"./entity-field": {
|
|
68
68
|
"types": "./entity-field/index.d.ts",
|
|
69
69
|
"default": "./fesm2022/smallpearl-ngx-helper-entity-field.mjs"
|