@mediusinc/mng-commons 2.1.0-rc.0 → 2.2.0-rc.0
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/esm2020/lib/api/utils/medius-rest.util.mjs +4 -4
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +4 -10
- package/esm2020/lib/components/tableview/table/table.component.mjs +12 -14
- package/esm2020/lib/components/tableview/tableview.component.mjs +8 -11
- package/esm2020/lib/descriptors/action/action.descriptor.mjs +1 -6
- package/esm2020/lib/services/action-executor.service.mjs +35 -17
- package/esm2020/lib/services/providers/config-service.provider.mjs +1 -1
- package/esm2020/lib/utils/action-data-provider.util.mjs +16 -10
- package/fesm2015/mediusinc-mng-commons.mjs +75 -65
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +72 -62
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/utils/medius-rest.util.d.ts +1 -1
- package/lib/components/action/editor/action-editor.component.d.ts +1 -1
- package/lib/components/tableview/tableview.component.d.ts +1 -3
- package/lib/descriptors/action/action.descriptor.d.ts +1 -1
- package/lib/services/providers/config-service.provider.d.ts +1 -1
- package/lib/utils/action-data-provider.util.d.ts +6 -0
- package/package.json +1 -1
- package/scss/mng-overrides/_theme_input.scss +4 -0
- package/scss/mng-overrides/_theme_styles.scss +1 -0
|
@@ -26,7 +26,7 @@ import { ChipModule } from 'primeng/chip';
|
|
|
26
26
|
import * as i9 from 'primeng/confirmdialog';
|
|
27
27
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
28
28
|
import { ConfirmPopupModule } from 'primeng/confirmpopup';
|
|
29
|
-
import * as i6$
|
|
29
|
+
import * as i6$3 from 'primeng/dialog';
|
|
30
30
|
import { DialogModule } from 'primeng/dialog';
|
|
31
31
|
import * as i3$2 from 'primeng/dropdown';
|
|
32
32
|
import { Dropdown, DropdownModule } from 'primeng/dropdown';
|
|
@@ -70,7 +70,7 @@ import { ColumnFilter, TableModule, Table } from 'primeng/table';
|
|
|
70
70
|
import * as i1$2 from 'primeng/tabview';
|
|
71
71
|
import { TabViewModule } from 'primeng/tabview';
|
|
72
72
|
import { TagModule } from 'primeng/tag';
|
|
73
|
-
import * as
|
|
73
|
+
import * as i5$4 from 'primeng/toast';
|
|
74
74
|
import { ToastModule } from 'primeng/toast';
|
|
75
75
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
76
76
|
import * as i4$3 from 'primeng/toolbar';
|
|
@@ -336,34 +336,40 @@ class ActionDataProviderUtil {
|
|
|
336
336
|
: throwError(() => new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`));
|
|
337
337
|
}
|
|
338
338
|
static runFetchOrFail(ctx) {
|
|
339
|
+
return (ActionDataProviderUtil.runFetch(ctx) ??
|
|
340
|
+
throwError(() => new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`)));
|
|
341
|
+
}
|
|
342
|
+
static runFetch(ctx, fallback) {
|
|
339
343
|
const dataProviderExec = ActionDataProviderUtil.runFetchDataProvider(ctx);
|
|
340
344
|
if (isObservable(dataProviderExec)) {
|
|
341
345
|
return dataProviderExec;
|
|
342
346
|
}
|
|
343
347
|
const serviceExec = ActionDataProviderUtil.runGetByIdService(ctx);
|
|
344
|
-
return isObservable(serviceExec)
|
|
345
|
-
? serviceExec
|
|
346
|
-
: throwError(() => new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`));
|
|
348
|
+
return isObservable(serviceExec) ? serviceExec : fallback ?? null;
|
|
347
349
|
}
|
|
348
350
|
static runCreateOrFail(ctx) {
|
|
351
|
+
return (ActionDataProviderUtil.runCreate(ctx) ??
|
|
352
|
+
throwError(() => new Error(`Data provider and service instance could not extract create function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item ${ctx.parameters?.item}.`)));
|
|
353
|
+
}
|
|
354
|
+
static runCreate(ctx, fallback) {
|
|
349
355
|
const dataProviderExec = ActionDataProviderUtil.runCreateDataProvider(ctx);
|
|
350
356
|
if (isObservable(dataProviderExec)) {
|
|
351
357
|
return dataProviderExec;
|
|
352
358
|
}
|
|
353
359
|
const serviceExec = ActionDataProviderUtil.runCreateService(ctx);
|
|
354
|
-
return isObservable(serviceExec)
|
|
355
|
-
? serviceExec
|
|
356
|
-
: throwError(() => new Error(`Data provider and service instance could not extract create function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item ${ctx.parameters?.item}.`));
|
|
360
|
+
return isObservable(serviceExec) ? serviceExec : fallback ?? null;
|
|
357
361
|
}
|
|
358
362
|
static runUpdateOrFail(ctx) {
|
|
363
|
+
return (ActionDataProviderUtil.runUpdate(ctx) ??
|
|
364
|
+
throwError(() => new Error(`Data provider and service instance could not extract update function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`)));
|
|
365
|
+
}
|
|
366
|
+
static runUpdate(ctx, fallback) {
|
|
359
367
|
const dataProviderExec = ActionDataProviderUtil.runUpdateDataProvider(ctx);
|
|
360
368
|
if (isObservable(dataProviderExec)) {
|
|
361
369
|
return dataProviderExec;
|
|
362
370
|
}
|
|
363
371
|
const serviceExec = ActionDataProviderUtil.runUpdateService(ctx);
|
|
364
|
-
return isObservable(serviceExec)
|
|
365
|
-
? serviceExec
|
|
366
|
-
: throwError(() => new Error(`Data provider and service instance could not extract update function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`));
|
|
372
|
+
return isObservable(serviceExec) ? serviceExec : fallback ?? null;
|
|
367
373
|
}
|
|
368
374
|
static runDeleteOrFail(ctx) {
|
|
369
375
|
const dataProviderExec = ActionDataProviderUtil.runDeleteDataProvider(ctx);
|
|
@@ -1044,17 +1050,17 @@ class MediusRestUtil {
|
|
|
1044
1050
|
}
|
|
1045
1051
|
return mediusParamsBuilder.build();
|
|
1046
1052
|
}
|
|
1047
|
-
static fromPrimeLazyLoadEventToAngularQueryParams(event
|
|
1053
|
+
static fromPrimeLazyLoadEventToAngularQueryParams(event) {
|
|
1048
1054
|
const params = {
|
|
1049
1055
|
first: null,
|
|
1050
1056
|
rows: null,
|
|
1051
1057
|
sort: null,
|
|
1052
1058
|
filter: null
|
|
1053
1059
|
};
|
|
1054
|
-
if (event.first && event.first
|
|
1060
|
+
if (event.first && event.first > 0) {
|
|
1055
1061
|
params['first'] = event.first;
|
|
1056
1062
|
}
|
|
1057
|
-
if (event.rows && event.rows
|
|
1063
|
+
if (event.rows && event.rows > 0) {
|
|
1058
1064
|
params['rows'] = event.rows;
|
|
1059
1065
|
}
|
|
1060
1066
|
if (event.multiSortMeta?.length) {
|
|
@@ -2533,13 +2539,35 @@ class MngActionExecutorService {
|
|
|
2533
2539
|
case 'submit':
|
|
2534
2540
|
actionEditor = ctx.instance.action;
|
|
2535
2541
|
if (typeof actionEditor.submitFunction !== 'function') {
|
|
2536
|
-
|
|
2542
|
+
const defaultSubmit = of(ctx.parameters?.item ? ctx.parameters.item : undefined);
|
|
2543
|
+
// return throwError(() => new Error(`Submit function for action ${actionEditor.actionNameLong} cannot be invoked.`));
|
|
2544
|
+
fnObs = ctx => {
|
|
2545
|
+
if (ctx.parameters.itemId) {
|
|
2546
|
+
return ActionDataProviderUtil.runUpdate(ctx, defaultSubmit);
|
|
2547
|
+
}
|
|
2548
|
+
else {
|
|
2549
|
+
return ActionDataProviderUtil.runCreate(ctx, defaultSubmit);
|
|
2550
|
+
}
|
|
2551
|
+
};
|
|
2552
|
+
}
|
|
2553
|
+
else {
|
|
2554
|
+
fnObs = actionEditor.submitFunction;
|
|
2537
2555
|
}
|
|
2538
|
-
fnObs = actionEditor.submitFunction;
|
|
2539
2556
|
break;
|
|
2540
2557
|
case 'fetch':
|
|
2541
2558
|
actionEditor = ctx.instance.action;
|
|
2542
|
-
|
|
2559
|
+
if (typeof actionEditor.fetchFunction !== 'function') {
|
|
2560
|
+
const defaultFetch = of(ctx.parameters?.item ? ctx.parameters.item : undefined);
|
|
2561
|
+
fnObs = ctx => {
|
|
2562
|
+
if (ctx.parameters.itemId || typeof ctx.parameters.item === 'object') {
|
|
2563
|
+
return ActionDataProviderUtil.runFetch(ctx, defaultFetch);
|
|
2564
|
+
}
|
|
2565
|
+
return defaultFetch;
|
|
2566
|
+
};
|
|
2567
|
+
}
|
|
2568
|
+
else {
|
|
2569
|
+
fnObs = actionEditor.fetchFunction;
|
|
2570
|
+
}
|
|
2543
2571
|
break;
|
|
2544
2572
|
case 'run':
|
|
2545
2573
|
default:
|
|
@@ -2940,14 +2968,7 @@ class MngActionExecutorService {
|
|
|
2940
2968
|
if (instance.action.activationTrigger !== ActionActivationTriggerEnum.OnRoute) {
|
|
2941
2969
|
return;
|
|
2942
2970
|
}
|
|
2943
|
-
// for now, deactivation always means going back to tableview root
|
|
2944
|
-
// if (this.navigationService.getPreviousLocation()) {
|
|
2945
|
-
// // there are internal history records, so back can be normally called
|
|
2946
|
-
// this.navigationService.back();
|
|
2947
|
-
// } else {
|
|
2948
|
-
// // there is no internal history records, figure out the base url by eliminating action specific url
|
|
2949
2971
|
let url = this.navigationService.getCurrentLocation();
|
|
2950
|
-
// let previousUrl = this.navigationService.getPreviousLocation();
|
|
2951
2972
|
if (!url) {
|
|
2952
2973
|
this.navigationService.back();
|
|
2953
2974
|
}
|
|
@@ -2955,18 +2976,21 @@ class MngActionExecutorService {
|
|
|
2955
2976
|
if (url.startsWith('/')) {
|
|
2956
2977
|
url = url.substring(1);
|
|
2957
2978
|
}
|
|
2958
|
-
const
|
|
2979
|
+
const splitUrlQueryParam = url.split('?');
|
|
2980
|
+
const urlPathSegments = splitUrlQueryParam[0].split('#')[0].split('/');
|
|
2981
|
+
const queryParam = splitUrlQueryParam[1]?.split('#')[0];
|
|
2959
2982
|
let actionUrl = instance.action?.routeUrl ?? '';
|
|
2960
2983
|
if (actionUrl.startsWith('/')) {
|
|
2961
2984
|
actionUrl = actionUrl.substring(1);
|
|
2962
2985
|
}
|
|
2963
2986
|
const actionUrlSegments = actionUrl.split('/');
|
|
2964
|
-
|
|
2965
|
-
|
|
2987
|
+
let redirectUrl = '/' + urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');
|
|
2988
|
+
if (typeof queryParam !== 'undefined') {
|
|
2989
|
+
redirectUrl = `${redirectUrl}?${queryParam}`;
|
|
2990
|
+
}
|
|
2966
2991
|
// No URL replaces, probably ok, to allow going back
|
|
2967
2992
|
this.router.navigateByUrl(redirectUrl);
|
|
2968
2993
|
}
|
|
2969
|
-
// }
|
|
2970
2994
|
}
|
|
2971
2995
|
/**
|
|
2972
2996
|
* Transform error of any type to mng error by using error mapper that could be provided by final project.
|
|
@@ -8037,11 +8061,6 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
8037
8061
|
throw new Error('Run function cannot be used in editor action. Use submit function instead!');
|
|
8038
8062
|
}
|
|
8039
8063
|
get fetchFunction() {
|
|
8040
|
-
if (!this._fetchFunction) {
|
|
8041
|
-
return ctx => {
|
|
8042
|
-
return of(ctx.parameters?.item ? ctx.parameters.item : {});
|
|
8043
|
-
};
|
|
8044
|
-
}
|
|
8045
8064
|
return this._fetchFunction;
|
|
8046
8065
|
}
|
|
8047
8066
|
get submitFunction() {
|
|
@@ -9919,13 +9938,13 @@ class MngActionEditorComponent {
|
|
|
9919
9938
|
}
|
|
9920
9939
|
this.toolbarRightActions = this.toolbarRightActions.reverse();
|
|
9921
9940
|
this.footerRightActions = this.footerRightActions.reverse();
|
|
9922
|
-
this.
|
|
9941
|
+
this.fetchItem();
|
|
9923
9942
|
if (typeof this.viewContainer?.getEditorReset$ === 'function') {
|
|
9924
9943
|
const viewContainerEditor = this.viewContainer;
|
|
9925
9944
|
this.subscriptions.push(viewContainerEditor.getEditorReset$().subscribe({
|
|
9926
9945
|
next: e => {
|
|
9927
9946
|
if (e.fetch) {
|
|
9928
|
-
this.
|
|
9947
|
+
this.fetchItem();
|
|
9929
9948
|
}
|
|
9930
9949
|
else if (e.item) {
|
|
9931
9950
|
this.editorComponent?.resetFormModel(e.item);
|
|
@@ -9955,9 +9974,6 @@ class MngActionEditorComponent {
|
|
|
9955
9974
|
return;
|
|
9956
9975
|
}
|
|
9957
9976
|
if (event.success) {
|
|
9958
|
-
if (typeof this.action.submitFunction !== 'function') {
|
|
9959
|
-
return;
|
|
9960
|
-
}
|
|
9961
9977
|
this.submitLoadingSubject.next(true);
|
|
9962
9978
|
const actionParameters = new ActionParameters(this.itemId, event.formItem)
|
|
9963
9979
|
.withActionData(this.actionData)
|
|
@@ -9988,10 +10004,7 @@ class MngActionEditorComponent {
|
|
|
9988
10004
|
triggerSubmit() {
|
|
9989
10005
|
this.editorComponent.submit();
|
|
9990
10006
|
}
|
|
9991
|
-
|
|
9992
|
-
if (typeof this.action.fetchFunction !== 'function') {
|
|
9993
|
-
return;
|
|
9994
|
-
}
|
|
10007
|
+
fetchItem() {
|
|
9995
10008
|
this.loadingSubject.next(true);
|
|
9996
10009
|
const actionParameters = new ActionParameters(this.itemId, this.item)
|
|
9997
10010
|
.withActionData(this.actionData)
|
|
@@ -10771,22 +10784,20 @@ class MngTableComponent {
|
|
|
10771
10784
|
this.loading$ = this.loading instanceof Observable ? this.loading : of(this.loading);
|
|
10772
10785
|
}
|
|
10773
10786
|
}
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
(
|
|
10777
|
-
|
|
10778
|
-
// default sort/filters are applied, no additional filtering/sorting is specified in query param
|
|
10779
|
-
// redirect must be done at first step
|
|
10780
|
-
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(this.route.snapshot.queryParams, this.filterDescriptors, this.rowsPerPageOptions[0]);
|
|
10787
|
+
if (this.useQueryParams) {
|
|
10788
|
+
const rowParams = this.route.snapshot.queryParamMap.get('rows');
|
|
10789
|
+
const rows = rowParams ? parseInt(rowParams) : this.rows;
|
|
10790
|
+
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(this.route.snapshot.queryParams, this.filterDescriptors, this.rows);
|
|
10781
10791
|
const event = {};
|
|
10782
10792
|
event.multiSortMeta = this.createSortMeta(mediusQueryParam);
|
|
10783
10793
|
event.filters = this.createFilterMeta(mediusQueryParam);
|
|
10794
|
+
event.rows = rows;
|
|
10784
10795
|
// first navigate to correct url with default filters/sorts
|
|
10785
10796
|
this.router
|
|
10786
10797
|
.navigate([], {
|
|
10787
10798
|
relativeTo: this.route,
|
|
10788
10799
|
replaceUrl: true,
|
|
10789
|
-
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event
|
|
10800
|
+
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event)
|
|
10790
10801
|
})
|
|
10791
10802
|
.then(() => {
|
|
10792
10803
|
this.initializeDataLoadingTriggers();
|
|
@@ -10827,7 +10838,7 @@ class MngTableComponent {
|
|
|
10827
10838
|
}
|
|
10828
10839
|
reload(emitEvent = false, resetParams = false) {
|
|
10829
10840
|
const queryParamsBuilder = resetParams
|
|
10830
|
-
? MediusQueryParamBuilder.create(this.
|
|
10841
|
+
? MediusQueryParamBuilder.create(this.rows, 0)
|
|
10831
10842
|
: MediusQueryParamBuilder.createFromExisting(this.dataProviderLatestQueryParam ?? new MediusQueryParam())
|
|
10832
10843
|
.withItemsPerPage(this.rows)
|
|
10833
10844
|
.withItemsOffset(this.offset);
|
|
@@ -10849,7 +10860,7 @@ class MngTableComponent {
|
|
|
10849
10860
|
this.router.navigate([], {
|
|
10850
10861
|
relativeTo: this.route,
|
|
10851
10862
|
replaceUrl: true,
|
|
10852
|
-
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event
|
|
10863
|
+
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event)
|
|
10853
10864
|
});
|
|
10854
10865
|
}
|
|
10855
10866
|
}
|
|
@@ -10896,7 +10907,7 @@ class MngTableComponent {
|
|
|
10896
10907
|
this.dataProviderSubscription?.unsubscribe();
|
|
10897
10908
|
this.dataProviderLoadingSubject.next(true);
|
|
10898
10909
|
if (!queryParam) {
|
|
10899
|
-
queryParam = MediusQueryParamBuilder.create(this.
|
|
10910
|
+
queryParam = MediusQueryParamBuilder.create(this.rows).build();
|
|
10900
10911
|
}
|
|
10901
10912
|
this.dataProviderLatestQueryParam = queryParam;
|
|
10902
10913
|
this.dataProviderLatestQueryParamVersion++;
|
|
@@ -10948,7 +10959,7 @@ class MngTableComponent {
|
|
|
10948
10959
|
}
|
|
10949
10960
|
}
|
|
10950
10961
|
loadTableFromRouteUpdate(params) {
|
|
10951
|
-
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(params, this.filterDescriptors, this.
|
|
10962
|
+
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(params, this.filterDescriptors, this.rows);
|
|
10952
10963
|
if (this.dataProviderLatestLazyLoadEventVersion < this.dataProviderLatestQueryParamVersion + 1) {
|
|
10953
10964
|
// update only if new version from query params will be higher
|
|
10954
10965
|
this.updatePrimeSortAndFilter(mediusQueryParam);
|
|
@@ -10959,7 +10970,7 @@ class MngTableComponent {
|
|
|
10959
10970
|
updatePrimeSortAndFilter(mediusQueryParam) {
|
|
10960
10971
|
this.multiSortMeta = this.createSortMeta(mediusQueryParam);
|
|
10961
10972
|
this.filterMetadata = this.createFilterMeta(mediusQueryParam);
|
|
10962
|
-
this.rows = mediusQueryParam?.itemsPerPage ?? this.
|
|
10973
|
+
this.rows = mediusQueryParam?.itemsPerPage ?? this.rows;
|
|
10963
10974
|
this.offset = mediusQueryParam?.itemsOffset ?? 0;
|
|
10964
10975
|
}
|
|
10965
10976
|
createFilterMeta(mediusQueryParam) {
|
|
@@ -11184,11 +11195,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
|
|
|
11184
11195
|
}] } });
|
|
11185
11196
|
|
|
11186
11197
|
class MngTableviewComponent {
|
|
11187
|
-
constructor(route, messageService, translateService,
|
|
11198
|
+
constructor(route, messageService, translateService, confirmationService, actionExecutor, viewContainerService) {
|
|
11188
11199
|
this.route = route;
|
|
11189
11200
|
this.messageService = messageService;
|
|
11190
11201
|
this.translateService = translateService;
|
|
11191
|
-
this.dialogService = dialogService;
|
|
11192
11202
|
this.confirmationService = confirmationService;
|
|
11193
11203
|
this.actionExecutor = actionExecutor;
|
|
11194
11204
|
this.viewContainerService = viewContainerService;
|
|
@@ -11258,12 +11268,12 @@ class MngTableviewComponent {
|
|
|
11258
11268
|
this.selectedItems = selectedItems;
|
|
11259
11269
|
}
|
|
11260
11270
|
}
|
|
11261
|
-
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$2.MessageService }, { token: i2.TranslateService }, { token:
|
|
11262
|
-
MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type:
|
|
11271
|
+
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$2.MessageService }, { token: i2.TranslateService }, { token: i2$2.ConfirmationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11272
|
+
MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i5$4.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
11263
11273
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
11264
11274
|
type: Component,
|
|
11265
11275
|
args: [{ standalone: true, selector: 'mng-tableview', imports: [ToastModule, ToolbarModule, NgForOf, TranslateModule, NgTemplateOutlet, NgIf, MngActionComponent, MngTableComponent, MngTemplateDirective, RouterOutlet], providers: [MessageService, ConfirmationService, MngViewContainerComponentService], template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
|
|
11266
|
-
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$2.MessageService }, { type: i2.TranslateService }, { type:
|
|
11276
|
+
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$2.MessageService }, { type: i2.TranslateService }, { type: i2$2.ConfirmationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
|
|
11267
11277
|
type: Input
|
|
11268
11278
|
}], dataProvider: [{
|
|
11269
11279
|
type: Input
|
|
@@ -11619,7 +11629,7 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
11619
11629
|
}
|
|
11620
11630
|
}
|
|
11621
11631
|
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
11622
|
-
MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$
|
|
11632
|
+
MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i5$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11623
11633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
11624
11634
|
type: Component,
|
|
11625
11635
|
args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [TranslateModule, FormlyModule, ReactiveFormsModule, ButtonModule, RippleModule, DialogModule, AsyncPipe, NgIf, MngTableComponent, MessagesModule, InputTextModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
@@ -11947,7 +11957,7 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
11947
11957
|
}
|
|
11948
11958
|
}
|
|
11949
11959
|
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
11950
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$
|
|
11960
|
+
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11951
11961
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
11952
11962
|
type: Component,
|
|
11953
11963
|
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, NgIf, AsyncPipe, MngTableComponent, DialogModule, ButtonModule, RippleModule, MngTemplateDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
|