@wertzui/ngx-restworld-client 16.1.1 → 16.1.3
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/wertzui-ngx-restworld-client.mjs +75 -18
- package/fesm2022/wertzui-ngx-restworld-client.mjs.map +1 -1
- package/lib/components/rest-world-table-column-filter-element/rest-world-table-column-filter-element.component.d.ts +1 -0
- package/lib/components/rest-world-table-column-filter-element/rest-world-table-column-filter-element.component.d.ts.map +1 -1
- package/lib/components/restworld-table/restworld-table.component.d.ts +5 -4
- package/lib/components/restworld-table/restworld-table.component.d.ts.map +1 -1
- package/lib/services/odata-filter-parser.d.ts +3 -1
- package/lib/services/odata-filter-parser.d.ts.map +1 -1
- package/lib/services/odata-visitor.d.ts.map +1 -1
- package/lib/services/odata.service.d.ts +8 -6
- package/lib/services/odata.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1480,7 +1480,7 @@ class OptionsManager {
|
|
|
1480
1480
|
const property = this.property();
|
|
1481
1481
|
if (property.cols === undefined || property.cols > 1) {
|
|
1482
1482
|
const value = this.getValue(itemOrValue);
|
|
1483
|
-
if (
|
|
1483
|
+
if (value?.toString().toUpperCase() !== label.toUpperCase())
|
|
1484
1484
|
label += ` (${value})`;
|
|
1485
1485
|
}
|
|
1486
1486
|
return label;
|
|
@@ -3350,6 +3350,7 @@ class OdataVisitor {
|
|
|
3350
3350
|
GreaterOrEqualsExpression: (node) => this.CreateFilter(this.propertyName, this.value, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO),
|
|
3351
3351
|
LesserThanExpression: (node) => this.CreateFilter(this.propertyName, this.value, FilterMatchMode.LESS_THAN),
|
|
3352
3352
|
LesserOrEqualsExpression: (node) => this.CreateFilter(this.propertyName, this.value, FilterMatchMode.LESS_THAN_OR_EQUAL_TO),
|
|
3353
|
+
HasExpression: (node) => this.CreateFilter(this.propertyName, [this.value], FilterMatchMode.EQUALS),
|
|
3353
3354
|
ODataIdentifier: (node) => this.propertyName = node.value.name,
|
|
3354
3355
|
Literal: (node) => this.value = OdataVisitor.parseLiteralValue(node),
|
|
3355
3356
|
AndExpression: (node) => this.operator = "and",
|
|
@@ -3368,6 +3369,9 @@ class OdataVisitor {
|
|
|
3368
3369
|
if (filter === undefined) {
|
|
3369
3370
|
this._filters.set(propertyName, [{ value, operator: "and", matchMode: matchMode }]);
|
|
3370
3371
|
}
|
|
3372
|
+
else if (filter.length === 1 && Array.isArray(filter[0].value) && Array.isArray(value)) {
|
|
3373
|
+
filter[0].value.push(...value); // Flags enum
|
|
3374
|
+
}
|
|
3371
3375
|
else {
|
|
3372
3376
|
filter.push({ value, operator: "and", matchMode: matchMode });
|
|
3373
3377
|
}
|
|
@@ -3399,7 +3403,7 @@ class OdataVisitor {
|
|
|
3399
3403
|
* This class is used to parse an OData $filter string into a Record of filter constraints.
|
|
3400
3404
|
*/
|
|
3401
3405
|
class ODataFilterParser {
|
|
3402
|
-
static parseFilter(filter) {
|
|
3406
|
+
static parseFilter(filter, properties) {
|
|
3403
3407
|
if (!filter)
|
|
3404
3408
|
return {};
|
|
3405
3409
|
// The parser has a bug where it does not correctly parse cast expressions, so we need to replace them with the first argument
|
|
@@ -3408,8 +3412,20 @@ class ODataFilterParser {
|
|
|
3408
3412
|
const ast = defaultParser.filter(filter);
|
|
3409
3413
|
const visitor = new OdataVisitor();
|
|
3410
3414
|
const filters = visitor.parse(ast);
|
|
3415
|
+
/// OData needs enum values in pascal case, but JSON and therefor HAL-Forms needs them in camel case
|
|
3416
|
+
ODataFilterParser.MakeEnumValuesCamelCase(filters, properties);
|
|
3411
3417
|
return Object.fromEntries(filters);
|
|
3412
3418
|
}
|
|
3419
|
+
static MakeEnumValuesCamelCase(filters, properties) {
|
|
3420
|
+
for (const [key, value] of filters) {
|
|
3421
|
+
for (const filter of value) {
|
|
3422
|
+
const options = properties[key]?.options;
|
|
3423
|
+
if (options && !options.link && typeof filter.value === "string") {
|
|
3424
|
+
filter.value = filter.value.charAt(0).toLowerCase() + filter.value.slice(1);
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
}
|
|
3413
3429
|
static replaceCastExpressions(input) {
|
|
3414
3430
|
// Regular expression to match cast(x, y) and extract x
|
|
3415
3431
|
const regex = /cast\(([^,]+),\s*[^)]+\)/g;
|
|
@@ -3432,6 +3448,9 @@ class ODataService {
|
|
|
3432
3448
|
static createFilterForProperty(property, filter) {
|
|
3433
3449
|
if (filter.matchMode == TranslationKeys.NO_FILTER)
|
|
3434
3450
|
return undefined;
|
|
3451
|
+
// Enums are handled differently
|
|
3452
|
+
if (property.options && !property.options.link)
|
|
3453
|
+
return ODataService.createFilterForEnum(property, filter);
|
|
3435
3454
|
const oDataOperator = ODataService.createODataOperator(filter.matchMode);
|
|
3436
3455
|
const comparisonValue = ODataService.createComparisonValue(property, filter.value);
|
|
3437
3456
|
switch (oDataOperator) {
|
|
@@ -3484,8 +3503,8 @@ class ODataService {
|
|
|
3484
3503
|
* @param filter The OData filter string to parse.
|
|
3485
3504
|
* @returns A record of property names to filter metadata.
|
|
3486
3505
|
*/
|
|
3487
|
-
static createFilterMetadataFromODataFilter(filter) {
|
|
3488
|
-
const filters = ODataFilterParser.parseFilter(filter);
|
|
3506
|
+
static createFilterMetadataFromODataFilter(filter, properties) {
|
|
3507
|
+
const filters = ODataFilterParser.parseFilter(filter, properties);
|
|
3489
3508
|
return filters;
|
|
3490
3509
|
}
|
|
3491
3510
|
/**
|
|
@@ -3565,10 +3584,10 @@ class ODataService {
|
|
|
3565
3584
|
static createTopFromTableLoadEvent(event) {
|
|
3566
3585
|
return event.rows === null ? undefined : event.rows;
|
|
3567
3586
|
}
|
|
3568
|
-
static createComparisonValue(property, value) {
|
|
3587
|
+
static createComparisonValue(property, value, isEnum) {
|
|
3569
3588
|
if (value === null || value === undefined)
|
|
3570
3589
|
return 'null';
|
|
3571
|
-
const type = property
|
|
3590
|
+
const type = ODataService.getPropertyType(property, value);
|
|
3572
3591
|
switch (type) {
|
|
3573
3592
|
case PropertyType.Date:
|
|
3574
3593
|
return `cast(${value.toISOString()}, Edm.DateOnly)`;
|
|
@@ -3588,8 +3607,30 @@ class ODataService {
|
|
|
3588
3607
|
case PropertyType.Percent:
|
|
3589
3608
|
return '' + (value / 100);
|
|
3590
3609
|
default:
|
|
3591
|
-
return `'${value}'`;
|
|
3610
|
+
return `'${isEnum && typeof value === "string" ? value.charAt(0).toUpperCase() + value.slice(1) : value}'`;
|
|
3611
|
+
}
|
|
3612
|
+
}
|
|
3613
|
+
static createFilterForEnum(property, filter) {
|
|
3614
|
+
if (filter.matchMode == TranslationKeys.NO_FILTER)
|
|
3615
|
+
return undefined;
|
|
3616
|
+
const options = property.options;
|
|
3617
|
+
if (options === undefined)
|
|
3618
|
+
throw Error(`Property ${property.name} has no options`);
|
|
3619
|
+
const maxItems = options.maxItems ?? Number.MAX_SAFE_INTEGER;
|
|
3620
|
+
const oDataOperator = ODataService.createODataOperator(filter.matchMode);
|
|
3621
|
+
// Normal enum
|
|
3622
|
+
if (maxItems === 1) {
|
|
3623
|
+
const comparisonValue = ODataService.createComparisonValue(property, filter.value, true);
|
|
3624
|
+
return `${property.name} ${oDataOperator} ${comparisonValue}`;
|
|
3592
3625
|
}
|
|
3626
|
+
// Flags enum
|
|
3627
|
+
if (filter.value === null || filter.value === undefined)
|
|
3628
|
+
return undefined;
|
|
3629
|
+
const values = Array.isArray(filter.value) ? filter.value : [filter.value];
|
|
3630
|
+
const comparisonValues = values.map(v => ODataService.createComparisonValue(property, v, true));
|
|
3631
|
+
const filters = comparisonValues.map(v => `${property.name} has ${v}`);
|
|
3632
|
+
const concatenatedFilters = filters.join(' and ');
|
|
3633
|
+
return `(${concatenatedFilters})`;
|
|
3593
3634
|
}
|
|
3594
3635
|
static createODataOperator(matchMode) {
|
|
3595
3636
|
switch (matchMode) {
|
|
@@ -3635,6 +3676,16 @@ class ODataService {
|
|
|
3635
3676
|
throw Error(`Unknown matchMode ${matchMode}`);
|
|
3636
3677
|
}
|
|
3637
3678
|
}
|
|
3679
|
+
static getPropertyType(property, value) {
|
|
3680
|
+
if (property.options) {
|
|
3681
|
+
if (typeof value === "string" ||
|
|
3682
|
+
Array.isArray(value) && value.every(v => typeof v === "string") ||
|
|
3683
|
+
property.options.inline?.some(o => property.options.valueField !== undefined && typeof o[property.options.valueField] === "string"))
|
|
3684
|
+
return PropertyType.Text;
|
|
3685
|
+
return PropertyType.Number;
|
|
3686
|
+
}
|
|
3687
|
+
return property.type;
|
|
3688
|
+
}
|
|
3638
3689
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ODataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3639
3690
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ODataService, providedIn: 'root' });
|
|
3640
3691
|
}
|
|
@@ -3682,10 +3733,13 @@ class RestWorldTableColumnFilterElementComponent {
|
|
|
3682
3733
|
const property = this.property();
|
|
3683
3734
|
const value = untracked(() => this.value());
|
|
3684
3735
|
const formControl = form.controls[property.name];
|
|
3685
|
-
this._formValueChangesSubscription = formControl.valueChanges.subscribe(
|
|
3736
|
+
this._formValueChangesSubscription = formControl.valueChanges.subscribe(this.setFilterValue.bind(this));
|
|
3686
3737
|
formControl.setValue(value);
|
|
3687
3738
|
});
|
|
3688
3739
|
}
|
|
3740
|
+
setFilterValue(value) {
|
|
3741
|
+
this.filterConstraint().value = value;
|
|
3742
|
+
}
|
|
3689
3743
|
ngOnDestroy() {
|
|
3690
3744
|
this._formValueChangesSubscription?.unsubscribe();
|
|
3691
3745
|
}
|
|
@@ -3769,9 +3823,10 @@ class RestWorldTableComponent {
|
|
|
3769
3823
|
editTemplate = input();
|
|
3770
3824
|
filters = computed(() => {
|
|
3771
3825
|
const filter = this.oDataParameters().$filter;
|
|
3772
|
-
|
|
3826
|
+
const properties = this.searchTemplate()?.propertiesRecord;
|
|
3827
|
+
if (filter === null || filter === undefined || typeof filter !== "string" || properties === undefined)
|
|
3773
3828
|
return {};
|
|
3774
|
-
return ODataService.createFilterMetadataFromODataFilter(filter);
|
|
3829
|
+
return ODataService.createFilterMetadataFromODataFilter(filter, properties);
|
|
3775
3830
|
});
|
|
3776
3831
|
/**
|
|
3777
3832
|
* The form array that contains the form groups for the items.
|
|
@@ -3843,9 +3898,9 @@ class RestWorldTableComponent {
|
|
|
3843
3898
|
rowsBeforeCurrentPage = computed(() => this.oDataParameters().$skip ?? 0);
|
|
3844
3899
|
/**
|
|
3845
3900
|
* The number of rows per page.
|
|
3846
|
-
* The default is
|
|
3901
|
+
* The default is the first element of rowsPerPageOptions.
|
|
3847
3902
|
*/
|
|
3848
|
-
rowsPerPage =
|
|
3903
|
+
rowsPerPage = computed(() => this.oDataParameters().$top ?? this.rowsPerPageOptions()[0]);
|
|
3849
3904
|
/**
|
|
3850
3905
|
* The possible values for the number of rows per page.
|
|
3851
3906
|
* The default is [10, 25, 50].
|
|
@@ -3912,7 +3967,8 @@ class RestWorldTableComponent {
|
|
|
3912
3967
|
text: [TranslationKeys.NO_FILTER, ...primeNGConfig.filterMatchModeOptions.text].map(o => ({ label: primeNGConfig.getTranslation(o), value: o })),
|
|
3913
3968
|
numeric: [TranslationKeys.NO_FILTER, ...primeNGConfig.filterMatchModeOptions.numeric].map(o => ({ label: primeNGConfig.getTranslation(o), value: o })),
|
|
3914
3969
|
date: [TranslationKeys.NO_FILTER, ...primeNGConfig.filterMatchModeOptions.date].map(o => ({ label: primeNGConfig.getTranslation(o), value: o })),
|
|
3915
|
-
boolean: [TranslationKeys.NO_FILTER, TranslationKeys.EQUALS, TranslationKeys.NOT_EQUALS].map(o => ({ label: primeNGConfig.getTranslation(o), value: o }))
|
|
3970
|
+
boolean: [TranslationKeys.NO_FILTER, TranslationKeys.EQUALS, TranslationKeys.NOT_EQUALS].map(o => ({ label: primeNGConfig.getTranslation(o), value: o })),
|
|
3971
|
+
enum: [TranslationKeys.NO_FILTER, TranslationKeys.EQUALS, TranslationKeys.NOT_EQUALS].map(o => ({ label: primeNGConfig.getTranslation(o), value: o })),
|
|
3916
3972
|
};
|
|
3917
3973
|
// Update the form array on changes
|
|
3918
3974
|
effect(() => {
|
|
@@ -3957,7 +4013,7 @@ class RestWorldTableComponent {
|
|
|
3957
4013
|
if (!searchTemplate || searchTemplate.properties.length === 0)
|
|
3958
4014
|
return;
|
|
3959
4015
|
const parameters = ODataService.createParametersFromTableLoadEvent(event, searchTemplate);
|
|
3960
|
-
ODataService.createFilterMetadataFromODataFilter(parameters.$filter);
|
|
4016
|
+
ODataService.createFilterMetadataFromODataFilter(parameters.$filter, searchTemplate.propertiesRecord);
|
|
3961
4017
|
if (currentParameters.$filter !== parameters.$filter || currentParameters.$orderby !== parameters.$orderby || currentParameters.$top !== parameters.$top || currentParameters.$skip !== parameters.$skip)
|
|
3962
4018
|
this.oDataParameters.set(parameters);
|
|
3963
4019
|
}
|
|
@@ -3992,7 +4048,7 @@ class RestWorldTableComponent {
|
|
|
3992
4048
|
case PropertyType.DatetimeOffset:
|
|
3993
4049
|
return ColumnFilterType.date;
|
|
3994
4050
|
default:
|
|
3995
|
-
return property.options ? ColumnFilterType.numeric : ColumnFilterType.text;
|
|
4051
|
+
return property.options ? property.options.link ? ColumnFilterType.numeric : ColumnFilterType.enum : ColumnFilterType.text;
|
|
3996
4052
|
}
|
|
3997
4053
|
}
|
|
3998
4054
|
toMatchModeOptions(property) {
|
|
@@ -4047,7 +4103,7 @@ class RestWorldTableComponent {
|
|
|
4047
4103
|
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [`${prefix}${key}`, value]));
|
|
4048
4104
|
}
|
|
4049
4105
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RestWorldTableComponent, deps: [{ token: i2$3.ControlContainer }, { token: i1$1.FormService }, { token: i3$4.Router }, { token: i3$4.ActivatedRoute }, { token: i4$2.PrimeNG }], target: i0.ɵɵFactoryTarget.Component });
|
|
4050
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: RestWorldTableComponent, isStandalone: true, selector: "rw-table", inputs: { apiName: { classPropertyName: "apiName", publicName: "apiName", isSignal: true, isRequired: true, transformFunction: null }, cellStyleClass: { classPropertyName: "cellStyleClass", publicName: "cellStyleClass", isSignal: true, isRequired: false, transformFunction: null }, editTemplate: { classPropertyName: "editTemplate", publicName: "editTemplate", isSignal: true, isRequired: false, transformFunction: null }, headerMenu: { classPropertyName: "headerMenu", publicName: "headerMenu", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, oDataParameters: { classPropertyName: "oDataParameters", publicName: "oDataParameters", isSignal: true, isRequired: false, transformFunction: null }, reflectParametersInUrl: { classPropertyName: "reflectParametersInUrl", publicName: "reflectParametersInUrl", isSignal: true, isRequired: false, transformFunction: null }, rowHover: { classPropertyName: "rowHover", publicName: "rowHover", isSignal: true, isRequired: false, transformFunction: null }, rowMenu: { classPropertyName: "rowMenu", publicName: "rowMenu", isSignal: true, isRequired: false, transformFunction: null }, rowStyleClass: { classPropertyName: "rowStyleClass", publicName: "rowStyleClass", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, rowsPerPage: { classPropertyName: "rowsPerPage", publicName: "rowsPerPage", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, searchTemplate: { classPropertyName: "searchTemplate", publicName: "searchTemplate", isSignal: true, isRequired: true, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, showRowMenuAsColumn: { classPropertyName: "showRowMenuAsColumn", publicName: "showRowMenuAsColumn", isSignal: true, isRequired: false, transformFunction: null }, showRowMenuOnRightClick: { classPropertyName: "showRowMenuOnRightClick", publicName: "showRowMenuOnRightClick", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, tableStyle: { classPropertyName: "tableStyle", publicName: "tableStyle", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, urlParameterPrefix: { classPropertyName: "urlParameterPrefix", publicName: "urlParameterPrefix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { oDataParameters: "oDataParametersChange", selectedRows: "selectedRowsChange" }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<p-table\n #table\n [value]=\"rows()\"\n [columns]=\"columns()\"\n [lazy]=\"true\"\n [lazyLoadOnInit]=\"false\"\n (onLazyLoad)=\"load($event)\"\n responsiveLayout=\"scroll\"\n [paginator]=\"true\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [rows]=\"rowsPerPage()\"\n [totalRecords]=\"totalRecords()\"\n [loading]=\"isLoading()\"\n sortMode=\"multiple\"\n [multiSortMeta]=\"multiSortMeta()\"\n [styleClass]=\"styleClass()\"\n [tableStyle]=\"tableStyle()\"\n [scrollable]=\"scrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [selectionMode]=\"selectionMode()\"\n [rowHover]=\"rowHover()\"\n [(selection)]=\"selectedRows\"\n [filters]=\"$any(filters())\"\n >\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (col of columns; track col) {\n <th [pSortableColumn]=\"col.name\">\n <div class=\"p-d-flex p-jc-between p-ai-center gap-1\">\n {{col.prompt}}\n @if(!col.readOnly) {\n <p-sortIcon [field]=\"col.name\"></p-sortIcon>\n <p-columnFilter #f\n [type]=\"toColumnFilterType(col.type)\"\n [maxFractionDigits]=\"toMaxFractionDigits(col)\"\n matchMode=\"noFilter\"\n [matchModeOptions]=\"toMatchModeOptions(col)\"\n [showMatchModes]=\"true\"\n [field]=\"col.name\"\n display=\"menu\"\n [maxConstraints]=\"100\"\n [class.has-filter]=\"f.hasFilter\">\n <ng-template #filter let-value let-filterConstraint=\"filterConstraint\" let-field=\"field\">\n <rw-table-column-filter-element [property]=\"col\" [value]=\"value\" [apiName]=\"apiName()\" [filterConstraint]=\"filterConstraint\"></rw-table-column-filter-element>\n </ng-template>\n </p-columnFilter>\n }\n </div>\n </th>\n }\n @if (showMenuColumn()) {\n <th>\n <rw-menu-button [items]=\"headerMenu()\"></rw-menu-button>\n </th>\n }\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-entity let-columns=\"columns\" let-rowIndex=\"rowIndex\">\n <tr (contextmenu)=\"openContextMenu($event, entity)\" [pSelectableRow]=\"entity\" [pSelectableRowDisabled]=\"selectionMode() === null\" [className]=\"rowStyleClasses()[rowIndex - (table.first ?? 0)]\">\n @for (col of columns; track col) {\n <td [className]=\"cellStyleClasses()[rowIndex - (table.first ?? 0)][col.name]\">\n @let fomrArray = formArray();\n @if (showInputField(col) && fomrArray) {\n <ng-container [formGroup]=\"fomrArray.controls[rowIndex - (table.first ?? 0)]\" >\n <rw-input [apiName]=\"apiName()\" [property]=\"editProperties()[col.name]\"></rw-input>\n </ng-container>\n }\n @else {\n <rw-display [property]=\"col\" [value]=\"entity[col.name]\" [apiName]=\"apiName()!\"></rw-display>\n }\n </td>\n }\n @if (showMenuColumn()) {\n <td>\n @if (showRowMenuAsColumn()) {\n <rw-menu-button [items]=\"rowMenus()[rowIndex - (table.first ?? 0)]\"></rw-menu-button>\n }\n </td>\n }\n </tr>\n </ng-template>\n</p-table>\n\n<p-contextMenu #contextMenu appendTo=\"body\" [model]=\"contextMenuItems()\"></p-contextMenu>\n", styles: [".p-tooltip{max-width:fit-content}a.p-button{text-decoration:none}::ng-deep rw-table rw-label.md\\:col-2{width:100%;font-weight:600}::ng-deep rw-table .p-d-flex{display:flex}::ng-deep rw-table .p-ai-center{align-items:center}::ng-deep rw-table .has-filter filtericon{color:var(--p-datatable-header-cell-selected-color)}::ng-deep rw-table p-columnfilter .p-datatable-column-filter-button{width:unset;height:23px!important;padding-block-end:0;padding-block-start:0}\n"], dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "component", type: i5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i5.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i5.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "component", type: RestWorldMenuButtonComponent, selector: "rw-menu-button", inputs: ["items"] }, { kind: "component", type: RestWorldInputComponent, selector: "rw-input" }, { kind: "component", type: RestWorldDisplayComponent, selector: "rw-display", inputs: ["apiName", "property", "value"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i7.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay"], outputs: ["onShow", "onHide"] }, { kind: "component", type: RestWorldTableColumnFilterElementComponent, selector: "rw-table-column-filter-element", inputs: ["filterConstraint", "property", "apiName", "value"] }], viewProviders: [{
|
|
4106
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: RestWorldTableComponent, isStandalone: true, selector: "rw-table", inputs: { apiName: { classPropertyName: "apiName", publicName: "apiName", isSignal: true, isRequired: true, transformFunction: null }, cellStyleClass: { classPropertyName: "cellStyleClass", publicName: "cellStyleClass", isSignal: true, isRequired: false, transformFunction: null }, editTemplate: { classPropertyName: "editTemplate", publicName: "editTemplate", isSignal: true, isRequired: false, transformFunction: null }, headerMenu: { classPropertyName: "headerMenu", publicName: "headerMenu", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, oDataParameters: { classPropertyName: "oDataParameters", publicName: "oDataParameters", isSignal: true, isRequired: false, transformFunction: null }, reflectParametersInUrl: { classPropertyName: "reflectParametersInUrl", publicName: "reflectParametersInUrl", isSignal: true, isRequired: false, transformFunction: null }, rowHover: { classPropertyName: "rowHover", publicName: "rowHover", isSignal: true, isRequired: false, transformFunction: null }, rowMenu: { classPropertyName: "rowMenu", publicName: "rowMenu", isSignal: true, isRequired: false, transformFunction: null }, rowStyleClass: { classPropertyName: "rowStyleClass", publicName: "rowStyleClass", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, searchTemplate: { classPropertyName: "searchTemplate", publicName: "searchTemplate", isSignal: true, isRequired: true, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, showRowMenuAsColumn: { classPropertyName: "showRowMenuAsColumn", publicName: "showRowMenuAsColumn", isSignal: true, isRequired: false, transformFunction: null }, showRowMenuOnRightClick: { classPropertyName: "showRowMenuOnRightClick", publicName: "showRowMenuOnRightClick", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, tableStyle: { classPropertyName: "tableStyle", publicName: "tableStyle", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, urlParameterPrefix: { classPropertyName: "urlParameterPrefix", publicName: "urlParameterPrefix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { oDataParameters: "oDataParametersChange", selectedRows: "selectedRowsChange" }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<p-table\n #table\n [value]=\"rows()\"\n [columns]=\"columns()\"\n [lazy]=\"true\"\n [lazyLoadOnInit]=\"false\"\n (onLazyLoad)=\"load($event)\"\n responsiveLayout=\"scroll\"\n [paginator]=\"true\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [rows]=\"rowsPerPage()\"\n [totalRecords]=\"totalRecords()\"\n [loading]=\"isLoading()\"\n sortMode=\"multiple\"\n [multiSortMeta]=\"multiSortMeta()\"\n [styleClass]=\"styleClass()\"\n [tableStyle]=\"tableStyle()\"\n [scrollable]=\"scrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [selectionMode]=\"selectionMode()\"\n [rowHover]=\"rowHover()\"\n [(selection)]=\"selectedRows\"\n [filters]=\"$any(filters())\"\n [first]=\"rowsBeforeCurrentPage()\"\n >\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (col of columns; track col) {\n <th [pSortableColumn]=\"col.name\">\n <div class=\"p-d-flex p-jc-between p-ai-center gap-1\">\n {{col.prompt}}\n @if(!col.readOnly) {\n <p-sortIcon [field]=\"col.name\"></p-sortIcon>\n <p-columnFilter #f\n [type]=\"toColumnFilterType(col.type)\"\n [maxFractionDigits]=\"toMaxFractionDigits(col)\"\n matchMode=\"noFilter\"\n [matchModeOptions]=\"toMatchModeOptions(col)\"\n [showMatchModes]=\"true\"\n [field]=\"col.name\"\n display=\"menu\"\n [maxConstraints]=\"100\"\n [class.has-filter]=\"f.hasFilter\">\n <ng-template #filter let-value let-filterConstraint=\"filterConstraint\" let-field=\"field\">\n <rw-table-column-filter-element [property]=\"col\" [value]=\"value\" [apiName]=\"apiName()\" [filterConstraint]=\"filterConstraint\"></rw-table-column-filter-element>\n </ng-template>\n </p-columnFilter>\n }\n </div>\n </th>\n }\n @if (showMenuColumn()) {\n <th>\n <rw-menu-button [items]=\"headerMenu()\"></rw-menu-button>\n </th>\n }\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-entity let-columns=\"columns\" let-rowIndex=\"rowIndex\">\n <tr (contextmenu)=\"openContextMenu($event, entity)\" [pSelectableRow]=\"entity\" [pSelectableRowDisabled]=\"selectionMode() === null\" [className]=\"rowStyleClasses()[rowIndex - (table.first ?? 0)]\">\n @for (col of columns; track col) {\n <td [className]=\"cellStyleClasses()[rowIndex - (table.first ?? 0)][col.name]\">\n @let fomrArray = formArray();\n @if (showInputField(col) && fomrArray) {\n <ng-container [formGroup]=\"fomrArray.controls[rowIndex - (table.first ?? 0)]\" >\n <rw-input [apiName]=\"apiName()\" [property]=\"editProperties()[col.name]\"></rw-input>\n </ng-container>\n }\n @else {\n <rw-display [property]=\"col\" [value]=\"entity[col.name]\" [apiName]=\"apiName()!\"></rw-display>\n }\n </td>\n }\n @if (showMenuColumn()) {\n <td>\n @if (showRowMenuAsColumn()) {\n <rw-menu-button [items]=\"rowMenus()[rowIndex - (table.first ?? 0)]\"></rw-menu-button>\n }\n </td>\n }\n </tr>\n </ng-template>\n</p-table>\n\n<p-contextMenu #contextMenu appendTo=\"body\" [model]=\"contextMenuItems()\"></p-contextMenu>\n", styles: [".p-tooltip{max-width:fit-content}a.p-button{text-decoration:none}::ng-deep rw-table rw-label.md\\:col-2{width:100%;font-weight:600}::ng-deep rw-table .p-d-flex{display:flex}::ng-deep rw-table .p-ai-center{align-items:center}::ng-deep rw-table .has-filter filtericon{color:var(--p-datatable-header-cell-selected-color)}::ng-deep rw-table p-columnfilter .p-datatable-column-filter-button{width:unset;height:23px!important;padding-block-end:0;padding-block-start:0}\n"], dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "component", type: i5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i5.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "component", type: i5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i5.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "component", type: RestWorldMenuButtonComponent, selector: "rw-menu-button", inputs: ["items"] }, { kind: "component", type: RestWorldInputComponent, selector: "rw-input" }, { kind: "component", type: RestWorldDisplayComponent, selector: "rw-display", inputs: ["apiName", "property", "value"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i7.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay"], outputs: ["onShow", "onHide"] }, { kind: "component", type: RestWorldTableColumnFilterElementComponent, selector: "rw-table-column-filter-element", inputs: ["filterConstraint", "property", "apiName", "value"] }], viewProviders: [{
|
|
4051
4107
|
provide: ControlContainer,
|
|
4052
4108
|
deps: [[Optional, FormArrayName]],
|
|
4053
4109
|
useFactory: (arrayName) => arrayName,
|
|
@@ -4059,7 +4115,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
4059
4115
|
provide: ControlContainer,
|
|
4060
4116
|
deps: [[Optional, FormArrayName]],
|
|
4061
4117
|
useFactory: (arrayName) => arrayName,
|
|
4062
|
-
}], imports: [TableModule, RestWorldMenuButtonComponent, RestWorldInputComponent, RestWorldDisplayComponent, ReactiveFormsModule, ContextMenuModule, RestWorldTableColumnFilterElementComponent, RestWorldTableColumnFilterElementComponent], template: "<p-table\n #table\n [value]=\"rows()\"\n [columns]=\"columns()\"\n [lazy]=\"true\"\n [lazyLoadOnInit]=\"false\"\n (onLazyLoad)=\"load($event)\"\n responsiveLayout=\"scroll\"\n [paginator]=\"true\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [rows]=\"rowsPerPage()\"\n [totalRecords]=\"totalRecords()\"\n [loading]=\"isLoading()\"\n sortMode=\"multiple\"\n [multiSortMeta]=\"multiSortMeta()\"\n [styleClass]=\"styleClass()\"\n [tableStyle]=\"tableStyle()\"\n [scrollable]=\"scrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [selectionMode]=\"selectionMode()\"\n [rowHover]=\"rowHover()\"\n [(selection)]=\"selectedRows\"\n [filters]=\"$any(filters())\"\n >\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (col of columns; track col) {\n <th [pSortableColumn]=\"col.name\">\n <div class=\"p-d-flex p-jc-between p-ai-center gap-1\">\n {{col.prompt}}\n @if(!col.readOnly) {\n <p-sortIcon [field]=\"col.name\"></p-sortIcon>\n <p-columnFilter #f\n [type]=\"toColumnFilterType(col.type)\"\n [maxFractionDigits]=\"toMaxFractionDigits(col)\"\n matchMode=\"noFilter\"\n [matchModeOptions]=\"toMatchModeOptions(col)\"\n [showMatchModes]=\"true\"\n [field]=\"col.name\"\n display=\"menu\"\n [maxConstraints]=\"100\"\n [class.has-filter]=\"f.hasFilter\">\n <ng-template #filter let-value let-filterConstraint=\"filterConstraint\" let-field=\"field\">\n <rw-table-column-filter-element [property]=\"col\" [value]=\"value\" [apiName]=\"apiName()\" [filterConstraint]=\"filterConstraint\"></rw-table-column-filter-element>\n </ng-template>\n </p-columnFilter>\n }\n </div>\n </th>\n }\n @if (showMenuColumn()) {\n <th>\n <rw-menu-button [items]=\"headerMenu()\"></rw-menu-button>\n </th>\n }\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-entity let-columns=\"columns\" let-rowIndex=\"rowIndex\">\n <tr (contextmenu)=\"openContextMenu($event, entity)\" [pSelectableRow]=\"entity\" [pSelectableRowDisabled]=\"selectionMode() === null\" [className]=\"rowStyleClasses()[rowIndex - (table.first ?? 0)]\">\n @for (col of columns; track col) {\n <td [className]=\"cellStyleClasses()[rowIndex - (table.first ?? 0)][col.name]\">\n @let fomrArray = formArray();\n @if (showInputField(col) && fomrArray) {\n <ng-container [formGroup]=\"fomrArray.controls[rowIndex - (table.first ?? 0)]\" >\n <rw-input [apiName]=\"apiName()\" [property]=\"editProperties()[col.name]\"></rw-input>\n </ng-container>\n }\n @else {\n <rw-display [property]=\"col\" [value]=\"entity[col.name]\" [apiName]=\"apiName()!\"></rw-display>\n }\n </td>\n }\n @if (showMenuColumn()) {\n <td>\n @if (showRowMenuAsColumn()) {\n <rw-menu-button [items]=\"rowMenus()[rowIndex - (table.first ?? 0)]\"></rw-menu-button>\n }\n </td>\n }\n </tr>\n </ng-template>\n</p-table>\n\n<p-contextMenu #contextMenu appendTo=\"body\" [model]=\"contextMenuItems()\"></p-contextMenu>\n", styles: [".p-tooltip{max-width:fit-content}a.p-button{text-decoration:none}::ng-deep rw-table rw-label.md\\:col-2{width:100%;font-weight:600}::ng-deep rw-table .p-d-flex{display:flex}::ng-deep rw-table .p-ai-center{align-items:center}::ng-deep rw-table .has-filter filtericon{color:var(--p-datatable-header-cell-selected-color)}::ng-deep rw-table p-columnfilter .p-datatable-column-filter-button{width:unset;height:23px!important;padding-block-end:0;padding-block-start:0}\n"] }]
|
|
4118
|
+
}], imports: [TableModule, RestWorldMenuButtonComponent, RestWorldInputComponent, RestWorldDisplayComponent, ReactiveFormsModule, ContextMenuModule, RestWorldTableColumnFilterElementComponent, RestWorldTableColumnFilterElementComponent], template: "<p-table\n #table\n [value]=\"rows()\"\n [columns]=\"columns()\"\n [lazy]=\"true\"\n [lazyLoadOnInit]=\"false\"\n (onLazyLoad)=\"load($event)\"\n responsiveLayout=\"scroll\"\n [paginator]=\"true\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [rows]=\"rowsPerPage()\"\n [totalRecords]=\"totalRecords()\"\n [loading]=\"isLoading()\"\n sortMode=\"multiple\"\n [multiSortMeta]=\"multiSortMeta()\"\n [styleClass]=\"styleClass()\"\n [tableStyle]=\"tableStyle()\"\n [scrollable]=\"scrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [selectionMode]=\"selectionMode()\"\n [rowHover]=\"rowHover()\"\n [(selection)]=\"selectedRows\"\n [filters]=\"$any(filters())\"\n [first]=\"rowsBeforeCurrentPage()\"\n >\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (col of columns; track col) {\n <th [pSortableColumn]=\"col.name\">\n <div class=\"p-d-flex p-jc-between p-ai-center gap-1\">\n {{col.prompt}}\n @if(!col.readOnly) {\n <p-sortIcon [field]=\"col.name\"></p-sortIcon>\n <p-columnFilter #f\n [type]=\"toColumnFilterType(col.type)\"\n [maxFractionDigits]=\"toMaxFractionDigits(col)\"\n matchMode=\"noFilter\"\n [matchModeOptions]=\"toMatchModeOptions(col)\"\n [showMatchModes]=\"true\"\n [field]=\"col.name\"\n display=\"menu\"\n [maxConstraints]=\"100\"\n [class.has-filter]=\"f.hasFilter\">\n <ng-template #filter let-value let-filterConstraint=\"filterConstraint\" let-field=\"field\">\n <rw-table-column-filter-element [property]=\"col\" [value]=\"value\" [apiName]=\"apiName()\" [filterConstraint]=\"filterConstraint\"></rw-table-column-filter-element>\n </ng-template>\n </p-columnFilter>\n }\n </div>\n </th>\n }\n @if (showMenuColumn()) {\n <th>\n <rw-menu-button [items]=\"headerMenu()\"></rw-menu-button>\n </th>\n }\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-entity let-columns=\"columns\" let-rowIndex=\"rowIndex\">\n <tr (contextmenu)=\"openContextMenu($event, entity)\" [pSelectableRow]=\"entity\" [pSelectableRowDisabled]=\"selectionMode() === null\" [className]=\"rowStyleClasses()[rowIndex - (table.first ?? 0)]\">\n @for (col of columns; track col) {\n <td [className]=\"cellStyleClasses()[rowIndex - (table.first ?? 0)][col.name]\">\n @let fomrArray = formArray();\n @if (showInputField(col) && fomrArray) {\n <ng-container [formGroup]=\"fomrArray.controls[rowIndex - (table.first ?? 0)]\" >\n <rw-input [apiName]=\"apiName()\" [property]=\"editProperties()[col.name]\"></rw-input>\n </ng-container>\n }\n @else {\n <rw-display [property]=\"col\" [value]=\"entity[col.name]\" [apiName]=\"apiName()!\"></rw-display>\n }\n </td>\n }\n @if (showMenuColumn()) {\n <td>\n @if (showRowMenuAsColumn()) {\n <rw-menu-button [items]=\"rowMenus()[rowIndex - (table.first ?? 0)]\"></rw-menu-button>\n }\n </td>\n }\n </tr>\n </ng-template>\n</p-table>\n\n<p-contextMenu #contextMenu appendTo=\"body\" [model]=\"contextMenuItems()\"></p-contextMenu>\n", styles: [".p-tooltip{max-width:fit-content}a.p-button{text-decoration:none}::ng-deep rw-table rw-label.md\\:col-2{width:100%;font-weight:600}::ng-deep rw-table .p-d-flex{display:flex}::ng-deep rw-table .p-ai-center{align-items:center}::ng-deep rw-table .has-filter filtericon{color:var(--p-datatable-header-cell-selected-color)}::ng-deep rw-table p-columnfilter .p-datatable-column-filter-button{width:unset;height:23px!important;padding-block-end:0;padding-block-start:0}\n"] }]
|
|
4063
4119
|
}], ctorParameters: () => [{ type: i2$3.ControlContainer }, { type: i1$1.FormService }, { type: i3$4.Router }, { type: i3$4.ActivatedRoute }, { type: i4$2.PrimeNG }] });
|
|
4064
4120
|
var ColumnFilterType;
|
|
4065
4121
|
(function (ColumnFilterType) {
|
|
@@ -4067,6 +4123,7 @@ var ColumnFilterType;
|
|
|
4067
4123
|
ColumnFilterType["numeric"] = "numeric";
|
|
4068
4124
|
ColumnFilterType["boolean"] = "boolean";
|
|
4069
4125
|
ColumnFilterType["date"] = "date";
|
|
4126
|
+
ColumnFilterType["enum"] = "enum";
|
|
4070
4127
|
})(ColumnFilterType || (ColumnFilterType = {}));
|
|
4071
4128
|
|
|
4072
4129
|
class RestWorldOptions {
|
|
@@ -4598,7 +4655,7 @@ class RESTworldListViewComponent {
|
|
|
4598
4655
|
}
|
|
4599
4656
|
_client = computed(() => this._clients.getClient(this.apiName()));
|
|
4600
4657
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RESTworldListViewComponent, deps: [{ token: RestWorldClientCollection }, { token: i2$1.ConfirmationService }, { token: i2$1.MessageService }, { token: AvatarGenerator }, { token: i3$4.Router }, { token: ProblemService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4601
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: RESTworldListViewComponent, isStandalone: true, selector: "rw-list", inputs: { createButtonMenu: { classPropertyName: "createButtonMenu", publicName: "createButtonMenu", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "$filter", isSignal: true, isRequired: false, transformFunction: null }, orderby: { classPropertyName: "orderby", publicName: "$orderby", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "$skip", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "$top", isSignal: true, isRequired: false, transformFunction: null }, editLink: { classPropertyName: "editLink", publicName: "editLink", isSignal: true, isRequired: false, transformFunction: null }, apiName: { classPropertyName: "apiName", publicName: "apiName", isSignal: true, isRequired: true, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { filter: "$filterChange", orderby: "$orderbyChange", skip: "$skipChange", top: "$topChange" }, ngImport: i0, template: "@let search = searchTemplate.value();\r\n@if (search) {\r\n <rw-table\r\n [apiName]=\"apiName()\"\r\n [searchTemplate]=\"search\"\r\n [rows]=\"items()\"\r\n [headerMenu]=\"headerMenu()\"\r\n [rowMenu]=\"rowMenu()\"\r\n [totalRecords]=\"totalRecords()\"\r\n [isLoading]=\"isLoading()\"\r\n >\r\n </rw-table>\r\n}\r\n<p-confirmDialog></p-confirmDialog>\r\n", styles: [".p-tooltip{max-width:fit-content}a.p-button{text-decoration:none}\n"], dependencies: [{ kind: "component", type: RestWorldTableComponent, selector: "rw-table", inputs: ["apiName", "cellStyleClass", "editTemplate", "headerMenu", "isLoading", "oDataParameters", "reflectParametersInUrl", "rowHover", "rowMenu", "rowStyleClass", "rows", "
|
|
4658
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: RESTworldListViewComponent, isStandalone: true, selector: "rw-list", inputs: { createButtonMenu: { classPropertyName: "createButtonMenu", publicName: "createButtonMenu", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "$filter", isSignal: true, isRequired: false, transformFunction: null }, orderby: { classPropertyName: "orderby", publicName: "$orderby", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "$skip", isSignal: true, isRequired: false, transformFunction: null }, top: { classPropertyName: "top", publicName: "$top", isSignal: true, isRequired: false, transformFunction: null }, editLink: { classPropertyName: "editLink", publicName: "editLink", isSignal: true, isRequired: false, transformFunction: null }, apiName: { classPropertyName: "apiName", publicName: "apiName", isSignal: true, isRequired: true, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { filter: "$filterChange", orderby: "$orderbyChange", skip: "$skipChange", top: "$topChange" }, ngImport: i0, template: "@let search = searchTemplate.value();\r\n@if (search) {\r\n <rw-table\r\n [apiName]=\"apiName()\"\r\n [searchTemplate]=\"search\"\r\n [rows]=\"items()\"\r\n [headerMenu]=\"headerMenu()\"\r\n [rowMenu]=\"rowMenu()\"\r\n [totalRecords]=\"totalRecords()\"\r\n [isLoading]=\"isLoading()\"\r\n >\r\n </rw-table>\r\n}\r\n<p-confirmDialog></p-confirmDialog>\r\n", styles: [".p-tooltip{max-width:fit-content}a.p-button{text-decoration:none}\n"], dependencies: [{ kind: "component", type: RestWorldTableComponent, selector: "rw-table", inputs: ["apiName", "cellStyleClass", "editTemplate", "headerMenu", "isLoading", "oDataParameters", "reflectParametersInUrl", "rowHover", "rowMenu", "rowStyleClass", "rows", "rowsPerPageOptions", "scrollHeight", "scrollable", "searchTemplate", "selectedRows", "selectionMode", "showRowMenuAsColumn", "showRowMenuOnRightClick", "styleClass", "tableStyle", "totalRecords", "urlParameterPrefix"], outputs: ["oDataParametersChange", "selectedRowsChange"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i7$1.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] });
|
|
4602
4659
|
}
|
|
4603
4660
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: RESTworldListViewComponent, decorators: [{
|
|
4604
4661
|
type: Component,
|