@smallpearl/ngx-helper 0.29.40 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs +65 -40
- package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs +23 -16
- package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs.map +1 -1
- package/mat-entity-crud/src/mat-entity-crud.component.d.ts +12 -0
- package/mat-entity-list/src/mat-entity-list-types.d.ts +13 -0
- package/mat-entity-list/src/mat-entity-list.component.d.ts +3 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1$1 from '@angular/common/http';
|
|
2
2
|
import { HttpContextToken, HttpContext } from '@angular/common/http';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, inject, input, signal, viewChild, ViewContainerRef, Component, ChangeDetectionStrategy, computed, viewChildren, EventEmitter, ContentChildren, Output, ChangeDetectorRef } from '@angular/core';
|
|
4
|
+
import { InjectionToken, inject, input, signal, viewChild, ViewContainerRef, Component, ChangeDetectionStrategy, computed, viewChildren, EventEmitter, effect, ContentChildren, Output, ChangeDetectorRef } from '@angular/core';
|
|
5
5
|
import * as i4 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i1 from '@angular/material/button';
|
|
@@ -470,7 +470,18 @@ class SPMatEntityCrudComponent extends SPMatEntityListComponent {
|
|
|
470
470
|
entityViewPaneActivated = new EventEmitter();
|
|
471
471
|
busyWheelId = `entityCrudBusyWheel-${Date.now()}`;
|
|
472
472
|
sub$ = new Subscription();
|
|
473
|
-
spEntitiesList = viewChild(
|
|
473
|
+
spEntitiesList = viewChild('entitiesList');
|
|
474
|
+
// Theoritically, we ought to be able to initialize the mat-entities-list
|
|
475
|
+
// columns from ngAfterViewInit lifecycle hook. But for some strange reason
|
|
476
|
+
// when this hook is called, sp-mat-entities-list has not been initialized.
|
|
477
|
+
// Therefore `spEntitiesList()` is null. So we have to use a computed signal,
|
|
478
|
+
// which will be triggered when spEntitiesList() is initialized and use that
|
|
479
|
+
// to initialize the columns.
|
|
480
|
+
spEntitiesListInited = effect(() => {
|
|
481
|
+
if (this.spEntitiesList()) {
|
|
482
|
+
this._initEntitiesList();
|
|
483
|
+
}
|
|
484
|
+
});
|
|
474
485
|
crudConfig;
|
|
475
486
|
// This is the internal component that will host the createEditFormTemplate
|
|
476
487
|
createEditHostComponent = viewChild(FormViewHostComponent);
|
|
@@ -500,9 +511,9 @@ class SPMatEntityCrudComponent extends SPMatEntityListComponent {
|
|
|
500
511
|
columnsWithAction = computed(() => {
|
|
501
512
|
const cols = JSON.parse(JSON.stringify(this.columns()));
|
|
502
513
|
// JSON.parse(JSON.strigify()) does not clone function objects. So
|
|
503
|
-
// explicitly copy these over. So this is really a shallow clone
|
|
504
|
-
// the cloned objects still refers to the function objects in the
|
|
505
|
-
// object.
|
|
514
|
+
// we've to explicitly copy these over. So this is really a shallow clone
|
|
515
|
+
// as the cloned objects still refers to the function objects in the
|
|
516
|
+
// original object.
|
|
506
517
|
this.columns().forEach((col, index, orgColumns) => {
|
|
507
518
|
const orgCol = orgColumns[index];
|
|
508
519
|
if (typeof orgCol !== 'string') {
|
|
@@ -557,6 +568,7 @@ class SPMatEntityCrudComponent extends SPMatEntityListComponent {
|
|
|
557
568
|
.map((col) => (typeof col === 'string' ? col : col.name))
|
|
558
569
|
.filter((name) => name !== 'action')
|
|
559
570
|
: []);
|
|
571
|
+
transloco = inject(TranslocoService);
|
|
560
572
|
constructor(http, snackBar, sanitizer, injector) {
|
|
561
573
|
super(http, sanitizer, injector);
|
|
562
574
|
this.snackBar = snackBar;
|
|
@@ -577,41 +589,15 @@ class SPMatEntityCrudComponent extends SPMatEntityListComponent {
|
|
|
577
589
|
]);
|
|
578
590
|
}
|
|
579
591
|
}
|
|
580
|
-
ngOnInit() {
|
|
592
|
+
ngOnInit() {
|
|
593
|
+
}
|
|
581
594
|
ngOnDestroy() {
|
|
582
595
|
this.sub$.unsubscribe();
|
|
583
596
|
}
|
|
597
|
+
/**
|
|
598
|
+
* Override so that we can suppress default action in SPMatEntityListComponent
|
|
599
|
+
*/
|
|
584
600
|
ngAfterViewInit() {
|
|
585
|
-
const spEntitiesList = this.spEntitiesList();
|
|
586
|
-
if (spEntitiesList) {
|
|
587
|
-
// Build contentColumnDefs using our component's content. Then add our own
|
|
588
|
-
// 'action' column definition to it. Then set this as the value of
|
|
589
|
-
// child SPMatEntityListComponent.contentColumnDef. This way we force
|
|
590
|
-
// SPMatEntityListComponent to use our component's any project MatColumnDef
|
|
591
|
-
// content in the final mat-table.
|
|
592
|
-
const clientColumnDefs = this.clientColumnDefs;
|
|
593
|
-
if (clientColumnDefs && spEntitiesList) {
|
|
594
|
-
// Note that we process any content projected matColumnDef first and
|
|
595
|
-
// our own internal content later. And when we process our own internal
|
|
596
|
-
// columns (for now only 'action'), it's not added if a column with that
|
|
597
|
-
// name has already been defined via content projection. This allows the
|
|
598
|
-
// clients to override even internal columns with their column defintion.
|
|
599
|
-
let contentColumnDefs = new Array();
|
|
600
|
-
clientColumnDefs.toArray().forEach((c) => contentColumnDefs.push(c));
|
|
601
|
-
this.componentColumns().forEach((ic) => {
|
|
602
|
-
if (!contentColumnDefs.find((c) => c.name === ic.name)) {
|
|
603
|
-
contentColumnDefs.push(ic);
|
|
604
|
-
}
|
|
605
|
-
});
|
|
606
|
-
spEntitiesList.contentColumnDefs = contentColumnDefs;
|
|
607
|
-
}
|
|
608
|
-
// This is a replication of SPMatEntityCrudList.ngAfterViewInit. That
|
|
609
|
-
// code is skipped as we declare set the _deferViewInit=true in
|
|
610
|
-
// sp-mat-entity-list declaration.
|
|
611
|
-
spEntitiesList.buildColumns();
|
|
612
|
-
spEntitiesList.setupSort();
|
|
613
|
-
spEntitiesList.loadMoreEntities();
|
|
614
|
-
}
|
|
615
601
|
}
|
|
616
602
|
/**
|
|
617
603
|
* If the create/edit entity form is active, it calls its registered
|
|
@@ -1015,8 +1001,45 @@ class SPMatEntityCrudComponent extends SPMatEntityListComponent {
|
|
|
1015
1001
|
getPreviewPaneContentClass() {
|
|
1016
1002
|
return this.previewPaneContentClass();
|
|
1017
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Initialize the columns for the mat-entities-list component. This is
|
|
1006
|
+
* called when the <sp-mat-entities-list> component has been properly
|
|
1007
|
+
* initialized.
|
|
1008
|
+
*/
|
|
1009
|
+
_initEntitiesList() {
|
|
1010
|
+
const spEntitiesList = this.spEntitiesList();
|
|
1011
|
+
if (spEntitiesList) {
|
|
1012
|
+
// Build contentColumnDefs using our component's content. Then add our own
|
|
1013
|
+
// 'action' column definition to it. Then set this as the value of
|
|
1014
|
+
// child SPMatEntityListComponent.contentColumnDef. This way we force
|
|
1015
|
+
// SPMatEntityListComponent to use our component's any project MatColumnDef
|
|
1016
|
+
// content in the final mat-table.
|
|
1017
|
+
const clientColumnDefs = this.clientColumnDefs;
|
|
1018
|
+
if (clientColumnDefs.length && spEntitiesList) {
|
|
1019
|
+
// Note that we process any content projected matColumnDef first and
|
|
1020
|
+
// our own internal content later. And when we process our own internal
|
|
1021
|
+
// columns (for now only 'action'), it's not added if a column with that
|
|
1022
|
+
// name has already been defined via content projection. This allows the
|
|
1023
|
+
// clients to override even internal columns with their column defintion.
|
|
1024
|
+
let contentColumnDefs = new Array();
|
|
1025
|
+
clientColumnDefs.toArray().forEach((c) => contentColumnDefs.push(c));
|
|
1026
|
+
this.componentColumns().forEach((ic) => {
|
|
1027
|
+
if (!contentColumnDefs.find((c) => c.name === ic.name)) {
|
|
1028
|
+
contentColumnDefs.push(ic);
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
spEntitiesList.contentColumnDefs = contentColumnDefs;
|
|
1032
|
+
}
|
|
1033
|
+
// This is a replication of SPMatEntityCrudList.ngAfterViewInit. That
|
|
1034
|
+
// code is skipped as we declare <sp-mat-entity-list> with
|
|
1035
|
+
// deferViewInit=true.
|
|
1036
|
+
spEntitiesList.buildColumns();
|
|
1037
|
+
spEntitiesList.setupSort();
|
|
1038
|
+
spEntitiesList.loadMoreEntities();
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1018
1041
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: SPMatEntityCrudComponent, deps: [{ token: i1$1.HttpClient }, { token: i2$1.MatSnackBar }, { token: i3.DomSanitizer }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1019
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: SPMatEntityCrudComponent, isStandalone: true, selector: "sp-mat-entity-crud", inputs: { itemLabel: { classPropertyName: "itemLabel", publicName: "itemLabel", isSignal: true, isRequired: false, transformFunction: null }, itemLabelPlural: { classPropertyName: "itemLabelPlural", publicName: "itemLabelPlural", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, itemActions: { classPropertyName: "itemActions", publicName: "itemActions", isSignal: true, isRequired: false, transformFunction: null }, newItemLink: { classPropertyName: "newItemLink", publicName: "newItemLink", isSignal: true, isRequired: false, transformFunction: null }, newItemLabel: { classPropertyName: "newItemLabel", publicName: "newItemLabel", isSignal: true, isRequired: false, transformFunction: null }, editItemTitle: { classPropertyName: "editItemTitle", publicName: "editItemTitle", isSignal: true, isRequired: false, transformFunction: null }, newItemSubTypes: { classPropertyName: "newItemSubTypes", publicName: "newItemSubTypes", isSignal: true, isRequired: false, transformFunction: null }, crudOpFn: { classPropertyName: "crudOpFn", publicName: "crudOpFn", isSignal: true, isRequired: false, transformFunction: null }, previewTemplate: { classPropertyName: "previewTemplate", publicName: "previewTemplate", isSignal: true, isRequired: false, transformFunction: null }, allowEntityActionFn: { classPropertyName: "allowEntityActionFn", publicName: "allowEntityActionFn", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, actionsTemplate: { classPropertyName: "actionsTemplate", publicName: "actionsTemplate", isSignal: true, isRequired: false, transformFunction: null }, crudResponseParser: { classPropertyName: "crudResponseParser", publicName: "crudResponseParser", isSignal: true, isRequired: false, transformFunction: null }, createEditFormTemplate: { classPropertyName: "createEditFormTemplate", publicName: "createEditFormTemplate", isSignal: true, isRequired: false, transformFunction: null }, disableItemActions: { classPropertyName: "disableItemActions", publicName: "disableItemActions", isSignal: true, isRequired: false, transformFunction: null }, disableCreate: { classPropertyName: "disableCreate", publicName: "disableCreate", isSignal: true, isRequired: false, transformFunction: null }, refreshAfterEdit: { classPropertyName: "refreshAfterEdit", publicName: "refreshAfterEdit", isSignal: true, isRequired: false, transformFunction: null }, crudHttpReqContext: { classPropertyName: "crudHttpReqContext", publicName: "crudHttpReqContext", isSignal: true, isRequired: false, transformFunction: null }, editPaneWidth: { classPropertyName: "editPaneWidth", publicName: "editPaneWidth", isSignal: true, isRequired: false, transformFunction: null }, previewPaneWidth: { classPropertyName: "previewPaneWidth", publicName: "previewPaneWidth", isSignal: true, isRequired: false, transformFunction: null }, listPaneWrapperClass: { classPropertyName: "listPaneWrapperClass", publicName: "listPaneWrapperClass", isSignal: true, isRequired: false, transformFunction: null }, previewPaneWrapperClass: { classPropertyName: "previewPaneWrapperClass", publicName: "previewPaneWrapperClass", isSignal: true, isRequired: false, transformFunction: null }, previewPaneContentClass: { classPropertyName: "previewPaneContentClass", publicName: "previewPaneContentClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action", entityViewPaneActivated: "entityViewPaneActivated" }, providers: [provideTranslocoScope('sp-mat-entity-crud')], queries: [{ propertyName: "_clientColumnDefs", predicate: MatColumnDef }], viewQueries: [{ propertyName: "componentColumns", predicate: MatColumnDef, descendants: true, isSignal: true }, { propertyName: "spEntitiesList", first: true, predicate:
|
|
1042
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: SPMatEntityCrudComponent, isStandalone: true, selector: "sp-mat-entity-crud", inputs: { itemLabel: { classPropertyName: "itemLabel", publicName: "itemLabel", isSignal: true, isRequired: false, transformFunction: null }, itemLabelPlural: { classPropertyName: "itemLabelPlural", publicName: "itemLabelPlural", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, itemActions: { classPropertyName: "itemActions", publicName: "itemActions", isSignal: true, isRequired: false, transformFunction: null }, newItemLink: { classPropertyName: "newItemLink", publicName: "newItemLink", isSignal: true, isRequired: false, transformFunction: null }, newItemLabel: { classPropertyName: "newItemLabel", publicName: "newItemLabel", isSignal: true, isRequired: false, transformFunction: null }, editItemTitle: { classPropertyName: "editItemTitle", publicName: "editItemTitle", isSignal: true, isRequired: false, transformFunction: null }, newItemSubTypes: { classPropertyName: "newItemSubTypes", publicName: "newItemSubTypes", isSignal: true, isRequired: false, transformFunction: null }, crudOpFn: { classPropertyName: "crudOpFn", publicName: "crudOpFn", isSignal: true, isRequired: false, transformFunction: null }, previewTemplate: { classPropertyName: "previewTemplate", publicName: "previewTemplate", isSignal: true, isRequired: false, transformFunction: null }, allowEntityActionFn: { classPropertyName: "allowEntityActionFn", publicName: "allowEntityActionFn", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, actionsTemplate: { classPropertyName: "actionsTemplate", publicName: "actionsTemplate", isSignal: true, isRequired: false, transformFunction: null }, crudResponseParser: { classPropertyName: "crudResponseParser", publicName: "crudResponseParser", isSignal: true, isRequired: false, transformFunction: null }, createEditFormTemplate: { classPropertyName: "createEditFormTemplate", publicName: "createEditFormTemplate", isSignal: true, isRequired: false, transformFunction: null }, disableItemActions: { classPropertyName: "disableItemActions", publicName: "disableItemActions", isSignal: true, isRequired: false, transformFunction: null }, disableCreate: { classPropertyName: "disableCreate", publicName: "disableCreate", isSignal: true, isRequired: false, transformFunction: null }, refreshAfterEdit: { classPropertyName: "refreshAfterEdit", publicName: "refreshAfterEdit", isSignal: true, isRequired: false, transformFunction: null }, crudHttpReqContext: { classPropertyName: "crudHttpReqContext", publicName: "crudHttpReqContext", isSignal: true, isRequired: false, transformFunction: null }, editPaneWidth: { classPropertyName: "editPaneWidth", publicName: "editPaneWidth", isSignal: true, isRequired: false, transformFunction: null }, previewPaneWidth: { classPropertyName: "previewPaneWidth", publicName: "previewPaneWidth", isSignal: true, isRequired: false, transformFunction: null }, listPaneWrapperClass: { classPropertyName: "listPaneWrapperClass", publicName: "listPaneWrapperClass", isSignal: true, isRequired: false, transformFunction: null }, previewPaneWrapperClass: { classPropertyName: "previewPaneWrapperClass", publicName: "previewPaneWrapperClass", isSignal: true, isRequired: false, transformFunction: null }, previewPaneContentClass: { classPropertyName: "previewPaneContentClass", publicName: "previewPaneContentClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action", entityViewPaneActivated: "entityViewPaneActivated" }, providers: [provideTranslocoScope('sp-mat-entity-crud')], queries: [{ propertyName: "_clientColumnDefs", predicate: MatColumnDef }], viewQueries: [{ propertyName: "componentColumns", predicate: MatColumnDef, descendants: true, isSignal: true }, { propertyName: "spEntitiesList", first: true, predicate: ["entitiesList"], descendants: true, isSignal: true }, { propertyName: "createEditHostComponent", first: true, predicate: FormViewHostComponent, descendants: true, isSignal: true }, { propertyName: "previewHostComponent", first: true, predicate: PreviewHostComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1020
1043
|
<as-split direction="horizontal" [gutterSize]="6" *transloco="let t">
|
|
1021
1044
|
<as-split-area
|
|
1022
1045
|
[size]="entitiesPaneWidth()"
|
|
@@ -1087,9 +1110,10 @@ class SPMatEntityCrudComponent extends SPMatEntityListComponent {
|
|
|
1087
1110
|
[ngTemplateOutlet]="headerTemplate() || defaultHeaderTemplate"
|
|
1088
1111
|
></ng-container>
|
|
1089
1112
|
<sp-mat-entity-list
|
|
1113
|
+
#entitiesList
|
|
1090
1114
|
[entityName]="entityName()"
|
|
1091
1115
|
[entityNamePlural]="entityNamePlural()"
|
|
1092
|
-
[
|
|
1116
|
+
[deferViewInit]="true"
|
|
1093
1117
|
[endpoint]="endpoint()"
|
|
1094
1118
|
[entityLoaderFn]="entityLoaderFn()"
|
|
1095
1119
|
[columns]="columnsWithAction()"
|
|
@@ -1151,7 +1175,7 @@ class SPMatEntityCrudComponent extends SPMatEntityListComponent {
|
|
|
1151
1175
|
</div>
|
|
1152
1176
|
</as-split-area>
|
|
1153
1177
|
</as-split>
|
|
1154
|
-
`, isInline: true, styles: [".d-none{display:none}.d-inherit{display:inherit}.action-bar{display:flex;flex-direction:row;align-items:center;padding-bottom:.5em}.action-bar-title{font-size:1.5em;font-weight:600}.spacer{flex-grow:1}.action-bar-actions{text-align:end}.active-row{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i5.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "ngmodule", type: MatSortModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatSnackBarModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i10.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: AngularSplitModule }, { kind: "component", type: i11.SplitComponent, selector: "as-split", inputs: ["gutterSize", "gutterStep", "disabled", "gutterClickDeltaPx", "direction", "dir", "unit", "gutterAriaLabel", "restrictMove", "useTransition", "gutterDblClickDuration"], outputs: ["gutterClick", "gutterDblClick", "dragStart", "dragEnd", "transitionEnd"], exportAs: ["asSplit"] }, { kind: "component", type: i11.SplitAreaComponent, selector: "as-split-area", inputs: ["size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "component", type: SPMatEntityListComponent, selector: "sp-mat-entity-list", inputs: ["entityName", "entityNamePlural", "endpoint", "entityLoaderFn", "columns", "displayedColumns", "pageSize", "idKey", "pagination", "paginator", "sorter", "disableSort", "infiniteScrollContainer", "infiniteScrollDistance", "infiniteScrollThrottle", "infiniteScrollWindow", "httpReqContext", "
|
|
1178
|
+
`, isInline: true, styles: [".d-none{display:none}.d-inherit{display:inherit}.action-bar{display:flex;flex-direction:row;align-items:center;padding-bottom:.5em}.action-bar-title{font-size:1.5em;font-weight:600}.spacer{flex-grow:1}.action-bar-actions{text-align:end}.active-row{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i5.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "ngmodule", type: MatSortModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatSnackBarModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "directive", type: i10.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: AngularSplitModule }, { kind: "component", type: i11.SplitComponent, selector: "as-split", inputs: ["gutterSize", "gutterStep", "disabled", "gutterClickDeltaPx", "direction", "dir", "unit", "gutterAriaLabel", "restrictMove", "useTransition", "gutterDblClickDuration"], outputs: ["gutterClick", "gutterDblClick", "dragStart", "dragEnd", "transitionEnd"], exportAs: ["asSplit"] }, { kind: "component", type: i11.SplitAreaComponent, selector: "as-split-area", inputs: ["size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "component", type: SPMatEntityListComponent, selector: "sp-mat-entity-list", inputs: ["entityName", "entityNamePlural", "endpoint", "entityLoaderFn", "columns", "displayedColumns", "pageSize", "idKey", "pagination", "paginator", "sorter", "disableSort", "infiniteScrollContainer", "infiniteScrollDistance", "infiniteScrollThrottle", "infiniteScrollWindow", "httpReqContext", "deferViewInit"], outputs: ["selectEntity"] }, { kind: "component", type: SPMatContextMenuComponent, selector: "sp-mat-context-menu", inputs: ["menuItems", "label", "menuIconName", "enableHover", "contextData", "hasBackdrop"], outputs: ["selected"] }, { kind: "component", type: FormViewHostComponent, selector: "sp-create-edit-entity-host", inputs: ["entityCrudComponentBase", "clientViewTemplate", "itemLabel", "itemLabelPlural"] }, { kind: "directive", type: SPMatHostBusyWheelDirective, selector: "[spHostBusyWheel]", inputs: ["spHostBusyWheel"] }, { kind: "component", type: PreviewHostComponent, selector: "sp-entity-crud-preview-host", inputs: ["entityCrudComponentBase", "clientViewTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1155
1179
|
}
|
|
1156
1180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: SPMatEntityCrudComponent, decorators: [{
|
|
1157
1181
|
type: Component,
|
|
@@ -1242,9 +1266,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
|
|
|
1242
1266
|
[ngTemplateOutlet]="headerTemplate() || defaultHeaderTemplate"
|
|
1243
1267
|
></ng-container>
|
|
1244
1268
|
<sp-mat-entity-list
|
|
1269
|
+
#entitiesList
|
|
1245
1270
|
[entityName]="entityName()"
|
|
1246
1271
|
[entityNamePlural]="entityNamePlural()"
|
|
1247
|
-
[
|
|
1272
|
+
[deferViewInit]="true"
|
|
1248
1273
|
[endpoint]="endpoint()"
|
|
1249
1274
|
[entityLoaderFn]="entityLoaderFn()"
|
|
1250
1275
|
[columns]="columnsWithAction()"
|