@mediusinc/mng-commons 2.1.0 → 2.2.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';
|
|
@@ -337,34 +337,40 @@ class ActionDataProviderUtil {
|
|
|
337
337
|
: throwError(() => { var _a, _b; return new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${(_a = ctx.instance.action.model) === null || _a === void 0 ? void 0 : _a.typeName}) for item id ${(_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.itemId}.`); });
|
|
338
338
|
}
|
|
339
339
|
static runFetchOrFail(ctx) {
|
|
340
|
+
var _a;
|
|
341
|
+
return ((_a = ActionDataProviderUtil.runFetch(ctx)) !== null && _a !== void 0 ? _a : throwError(() => { var _a, _b; return new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${(_a = ctx.instance.action.model) === null || _a === void 0 ? void 0 : _a.typeName}) for item id ${(_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.itemId}.`); }));
|
|
342
|
+
}
|
|
343
|
+
static runFetch(ctx, fallback) {
|
|
340
344
|
const dataProviderExec = ActionDataProviderUtil.runFetchDataProvider(ctx);
|
|
341
345
|
if (isObservable(dataProviderExec)) {
|
|
342
346
|
return dataProviderExec;
|
|
343
347
|
}
|
|
344
348
|
const serviceExec = ActionDataProviderUtil.runGetByIdService(ctx);
|
|
345
|
-
return isObservable(serviceExec)
|
|
346
|
-
? serviceExec
|
|
347
|
-
: throwError(() => { var _a, _b; return new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${(_a = ctx.instance.action.model) === null || _a === void 0 ? void 0 : _a.typeName}) for item id ${(_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.itemId}.`); });
|
|
349
|
+
return isObservable(serviceExec) ? serviceExec : fallback !== null && fallback !== void 0 ? fallback : null;
|
|
348
350
|
}
|
|
349
351
|
static runCreateOrFail(ctx) {
|
|
352
|
+
var _a;
|
|
353
|
+
return ((_a = ActionDataProviderUtil.runCreate(ctx)) !== null && _a !== void 0 ? _a : throwError(() => { var _a, _b; return new Error(`Data provider and service instance could not extract create function to execute in action ${ctx.instance.action.actionNameLong} (${(_a = ctx.instance.action.model) === null || _a === void 0 ? void 0 : _a.typeName}) for item ${(_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.item}.`); }));
|
|
354
|
+
}
|
|
355
|
+
static runCreate(ctx, fallback) {
|
|
350
356
|
const dataProviderExec = ActionDataProviderUtil.runCreateDataProvider(ctx);
|
|
351
357
|
if (isObservable(dataProviderExec)) {
|
|
352
358
|
return dataProviderExec;
|
|
353
359
|
}
|
|
354
360
|
const serviceExec = ActionDataProviderUtil.runCreateService(ctx);
|
|
355
|
-
return isObservable(serviceExec)
|
|
356
|
-
? serviceExec
|
|
357
|
-
: throwError(() => { var _a, _b; return new Error(`Data provider and service instance could not extract create function to execute in action ${ctx.instance.action.actionNameLong} (${(_a = ctx.instance.action.model) === null || _a === void 0 ? void 0 : _a.typeName}) for item ${(_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.item}.`); });
|
|
361
|
+
return isObservable(serviceExec) ? serviceExec : fallback !== null && fallback !== void 0 ? fallback : null;
|
|
358
362
|
}
|
|
359
363
|
static runUpdateOrFail(ctx) {
|
|
364
|
+
var _a;
|
|
365
|
+
return ((_a = ActionDataProviderUtil.runUpdate(ctx)) !== null && _a !== void 0 ? _a : throwError(() => { var _a, _b; return new Error(`Data provider and service instance could not extract update function to execute in action ${ctx.instance.action.actionNameLong} (${(_a = ctx.instance.action.model) === null || _a === void 0 ? void 0 : _a.typeName}) for item id ${(_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.itemId}.`); }));
|
|
366
|
+
}
|
|
367
|
+
static runUpdate(ctx, fallback) {
|
|
360
368
|
const dataProviderExec = ActionDataProviderUtil.runUpdateDataProvider(ctx);
|
|
361
369
|
if (isObservable(dataProviderExec)) {
|
|
362
370
|
return dataProviderExec;
|
|
363
371
|
}
|
|
364
372
|
const serviceExec = ActionDataProviderUtil.runUpdateService(ctx);
|
|
365
|
-
return isObservable(serviceExec)
|
|
366
|
-
? serviceExec
|
|
367
|
-
: throwError(() => { var _a, _b; return new Error(`Data provider and service instance could not extract update function to execute in action ${ctx.instance.action.actionNameLong} (${(_a = ctx.instance.action.model) === null || _a === void 0 ? void 0 : _a.typeName}) for item id ${(_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.itemId}.`); });
|
|
373
|
+
return isObservable(serviceExec) ? serviceExec : fallback !== null && fallback !== void 0 ? fallback : null;
|
|
368
374
|
}
|
|
369
375
|
static runDeleteOrFail(ctx) {
|
|
370
376
|
const dataProviderExec = ActionDataProviderUtil.runDeleteDataProvider(ctx);
|
|
@@ -1052,7 +1058,7 @@ class MediusRestUtil {
|
|
|
1052
1058
|
}
|
|
1053
1059
|
return mediusParamsBuilder.build();
|
|
1054
1060
|
}
|
|
1055
|
-
static fromPrimeLazyLoadEventToAngularQueryParams(event
|
|
1061
|
+
static fromPrimeLazyLoadEventToAngularQueryParams(event) {
|
|
1056
1062
|
var _a, _b;
|
|
1057
1063
|
const params = {
|
|
1058
1064
|
first: null,
|
|
@@ -1060,10 +1066,10 @@ class MediusRestUtil {
|
|
|
1060
1066
|
sort: null,
|
|
1061
1067
|
filter: null
|
|
1062
1068
|
};
|
|
1063
|
-
if (event.first && event.first
|
|
1069
|
+
if (event.first && event.first > 0) {
|
|
1064
1070
|
params['first'] = event.first;
|
|
1065
1071
|
}
|
|
1066
|
-
if (event.rows && event.rows
|
|
1072
|
+
if (event.rows && event.rows > 0) {
|
|
1067
1073
|
params['rows'] = event.rows;
|
|
1068
1074
|
}
|
|
1069
1075
|
if ((_a = event.multiSortMeta) === null || _a === void 0 ? void 0 : _a.length) {
|
|
@@ -2537,6 +2543,7 @@ class MngActionExecutorService {
|
|
|
2537
2543
|
* @return Action context for submit (=run) function.
|
|
2538
2544
|
*/
|
|
2539
2545
|
runActionContext(ctx) {
|
|
2546
|
+
var _a, _b;
|
|
2540
2547
|
const isMainRunFn = ctx.functionName === 'submit' || ctx.functionName === 'run';
|
|
2541
2548
|
let actionEditor;
|
|
2542
2549
|
let fnObs;
|
|
@@ -2544,13 +2551,35 @@ class MngActionExecutorService {
|
|
|
2544
2551
|
case 'submit':
|
|
2545
2552
|
actionEditor = ctx.instance.action;
|
|
2546
2553
|
if (typeof actionEditor.submitFunction !== 'function') {
|
|
2547
|
-
|
|
2554
|
+
const defaultSubmit = of(((_a = ctx.parameters) === null || _a === void 0 ? void 0 : _a.item) ? ctx.parameters.item : undefined);
|
|
2555
|
+
// return throwError(() => new Error(`Submit function for action ${actionEditor.actionNameLong} cannot be invoked.`));
|
|
2556
|
+
fnObs = ctx => {
|
|
2557
|
+
if (ctx.parameters.itemId) {
|
|
2558
|
+
return ActionDataProviderUtil.runUpdate(ctx, defaultSubmit);
|
|
2559
|
+
}
|
|
2560
|
+
else {
|
|
2561
|
+
return ActionDataProviderUtil.runCreate(ctx, defaultSubmit);
|
|
2562
|
+
}
|
|
2563
|
+
};
|
|
2564
|
+
}
|
|
2565
|
+
else {
|
|
2566
|
+
fnObs = actionEditor.submitFunction;
|
|
2548
2567
|
}
|
|
2549
|
-
fnObs = actionEditor.submitFunction;
|
|
2550
2568
|
break;
|
|
2551
2569
|
case 'fetch':
|
|
2552
2570
|
actionEditor = ctx.instance.action;
|
|
2553
|
-
|
|
2571
|
+
if (typeof actionEditor.fetchFunction !== 'function') {
|
|
2572
|
+
const defaultFetch = of(((_b = ctx.parameters) === null || _b === void 0 ? void 0 : _b.item) ? ctx.parameters.item : undefined);
|
|
2573
|
+
fnObs = ctx => {
|
|
2574
|
+
if (ctx.parameters.itemId || typeof ctx.parameters.item === 'object') {
|
|
2575
|
+
return ActionDataProviderUtil.runFetch(ctx, defaultFetch);
|
|
2576
|
+
}
|
|
2577
|
+
return defaultFetch;
|
|
2578
|
+
};
|
|
2579
|
+
}
|
|
2580
|
+
else {
|
|
2581
|
+
fnObs = actionEditor.fetchFunction;
|
|
2582
|
+
}
|
|
2554
2583
|
break;
|
|
2555
2584
|
case 'run':
|
|
2556
2585
|
default:
|
|
@@ -2950,18 +2979,11 @@ class MngActionExecutorService {
|
|
|
2950
2979
|
* @param instance Action instance.
|
|
2951
2980
|
*/
|
|
2952
2981
|
deactivateOnRouteTriggeredAction(instance) {
|
|
2953
|
-
var _a, _b;
|
|
2982
|
+
var _a, _b, _c;
|
|
2954
2983
|
if (instance.action.activationTrigger !== ActionActivationTriggerEnum.OnRoute) {
|
|
2955
2984
|
return;
|
|
2956
2985
|
}
|
|
2957
|
-
// for now, deactivation always means going back to tableview root
|
|
2958
|
-
// if (this.navigationService.getPreviousLocation()) {
|
|
2959
|
-
// // there are internal history records, so back can be normally called
|
|
2960
|
-
// this.navigationService.back();
|
|
2961
|
-
// } else {
|
|
2962
|
-
// // there is no internal history records, figure out the base url by eliminating action specific url
|
|
2963
2986
|
let url = this.navigationService.getCurrentLocation();
|
|
2964
|
-
// let previousUrl = this.navigationService.getPreviousLocation();
|
|
2965
2987
|
if (!url) {
|
|
2966
2988
|
this.navigationService.back();
|
|
2967
2989
|
}
|
|
@@ -2969,18 +2991,21 @@ class MngActionExecutorService {
|
|
|
2969
2991
|
if (url.startsWith('/')) {
|
|
2970
2992
|
url = url.substring(1);
|
|
2971
2993
|
}
|
|
2972
|
-
const
|
|
2973
|
-
|
|
2994
|
+
const splitUrlQueryParam = url.split('?');
|
|
2995
|
+
const urlPathSegments = splitUrlQueryParam[0].split('#')[0].split('/');
|
|
2996
|
+
const queryParam = (_a = splitUrlQueryParam[1]) === null || _a === void 0 ? void 0 : _a.split('#')[0];
|
|
2997
|
+
let actionUrl = (_c = (_b = instance.action) === null || _b === void 0 ? void 0 : _b.routeUrl) !== null && _c !== void 0 ? _c : '';
|
|
2974
2998
|
if (actionUrl.startsWith('/')) {
|
|
2975
2999
|
actionUrl = actionUrl.substring(1);
|
|
2976
3000
|
}
|
|
2977
3001
|
const actionUrlSegments = actionUrl.split('/');
|
|
2978
|
-
|
|
2979
|
-
|
|
3002
|
+
let redirectUrl = '/' + urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');
|
|
3003
|
+
if (typeof queryParam !== 'undefined') {
|
|
3004
|
+
redirectUrl = `${redirectUrl}?${queryParam}`;
|
|
3005
|
+
}
|
|
2980
3006
|
// No URL replaces, probably ok, to allow going back
|
|
2981
3007
|
this.router.navigateByUrl(redirectUrl);
|
|
2982
3008
|
}
|
|
2983
|
-
// }
|
|
2984
3009
|
}
|
|
2985
3010
|
/**
|
|
2986
3011
|
* Transform error of any type to mng error by using error mapper that could be provided by final project.
|
|
@@ -8096,12 +8121,6 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
8096
8121
|
throw new Error('Run function cannot be used in editor action. Use submit function instead!');
|
|
8097
8122
|
}
|
|
8098
8123
|
get fetchFunction() {
|
|
8099
|
-
if (!this._fetchFunction) {
|
|
8100
|
-
return ctx => {
|
|
8101
|
-
var _a;
|
|
8102
|
-
return of(((_a = ctx.parameters) === null || _a === void 0 ? void 0 : _a.item) ? ctx.parameters.item : {});
|
|
8103
|
-
};
|
|
8104
|
-
}
|
|
8105
8124
|
return this._fetchFunction;
|
|
8106
8125
|
}
|
|
8107
8126
|
get submitFunction() {
|
|
@@ -10016,14 +10035,14 @@ class MngActionEditorComponent {
|
|
|
10016
10035
|
}
|
|
10017
10036
|
this.toolbarRightActions = this.toolbarRightActions.reverse();
|
|
10018
10037
|
this.footerRightActions = this.footerRightActions.reverse();
|
|
10019
|
-
this.
|
|
10038
|
+
this.fetchItem();
|
|
10020
10039
|
if (typeof ((_t = this.viewContainer) === null || _t === void 0 ? void 0 : _t.getEditorReset$) === 'function') {
|
|
10021
10040
|
const viewContainerEditor = this.viewContainer;
|
|
10022
10041
|
this.subscriptions.push(viewContainerEditor.getEditorReset$().subscribe({
|
|
10023
10042
|
next: e => {
|
|
10024
10043
|
var _a, _b;
|
|
10025
10044
|
if (e.fetch) {
|
|
10026
|
-
this.
|
|
10045
|
+
this.fetchItem();
|
|
10027
10046
|
}
|
|
10028
10047
|
else if (e.item) {
|
|
10029
10048
|
(_a = this.editorComponent) === null || _a === void 0 ? void 0 : _a.resetFormModel(e.item);
|
|
@@ -10053,9 +10072,6 @@ class MngActionEditorComponent {
|
|
|
10053
10072
|
return;
|
|
10054
10073
|
}
|
|
10055
10074
|
if (event.success) {
|
|
10056
|
-
if (typeof this.action.submitFunction !== 'function') {
|
|
10057
|
-
return;
|
|
10058
|
-
}
|
|
10059
10075
|
this.submitLoadingSubject.next(true);
|
|
10060
10076
|
const actionParameters = new ActionParameters(this.itemId, event.formItem)
|
|
10061
10077
|
.withActionData(this.actionData)
|
|
@@ -10086,10 +10102,7 @@ class MngActionEditorComponent {
|
|
|
10086
10102
|
triggerSubmit() {
|
|
10087
10103
|
this.editorComponent.submit();
|
|
10088
10104
|
}
|
|
10089
|
-
|
|
10090
|
-
if (typeof this.action.fetchFunction !== 'function') {
|
|
10091
|
-
return;
|
|
10092
|
-
}
|
|
10105
|
+
fetchItem() {
|
|
10093
10106
|
this.loadingSubject.next(true);
|
|
10094
10107
|
const actionParameters = new ActionParameters(this.itemId, this.item)
|
|
10095
10108
|
.withActionData(this.actionData)
|
|
@@ -10886,22 +10899,20 @@ class MngTableComponent {
|
|
|
10886
10899
|
this.loading$ = this.loading instanceof Observable ? this.loading : of(this.loading);
|
|
10887
10900
|
}
|
|
10888
10901
|
}
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
// default sort/filters are applied, no additional filtering/sorting is specified in query param
|
|
10894
|
-
// redirect must be done at first step
|
|
10895
|
-
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(this.route.snapshot.queryParams, this.filterDescriptors, this.rowsPerPageOptions[0]);
|
|
10902
|
+
if (this.useQueryParams) {
|
|
10903
|
+
const rowParams = this.route.snapshot.queryParamMap.get('rows');
|
|
10904
|
+
const rows = rowParams ? parseInt(rowParams) : this.rows;
|
|
10905
|
+
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(this.route.snapshot.queryParams, this.filterDescriptors, this.rows);
|
|
10896
10906
|
const event = {};
|
|
10897
10907
|
event.multiSortMeta = this.createSortMeta(mediusQueryParam);
|
|
10898
10908
|
event.filters = this.createFilterMeta(mediusQueryParam);
|
|
10909
|
+
event.rows = rows;
|
|
10899
10910
|
// first navigate to correct url with default filters/sorts
|
|
10900
10911
|
this.router
|
|
10901
10912
|
.navigate([], {
|
|
10902
10913
|
relativeTo: this.route,
|
|
10903
10914
|
replaceUrl: true,
|
|
10904
|
-
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event
|
|
10915
|
+
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event)
|
|
10905
10916
|
})
|
|
10906
10917
|
.then(() => {
|
|
10907
10918
|
this.initializeDataLoadingTriggers();
|
|
@@ -10944,7 +10955,7 @@ class MngTableComponent {
|
|
|
10944
10955
|
reload(emitEvent = false, resetParams = false) {
|
|
10945
10956
|
var _a;
|
|
10946
10957
|
const queryParamsBuilder = resetParams
|
|
10947
|
-
? MediusQueryParamBuilder.create(this.
|
|
10958
|
+
? MediusQueryParamBuilder.create(this.rows, 0)
|
|
10948
10959
|
: MediusQueryParamBuilder.createFromExisting((_a = this.dataProviderLatestQueryParam) !== null && _a !== void 0 ? _a : new MediusQueryParam())
|
|
10949
10960
|
.withItemsPerPage(this.rows)
|
|
10950
10961
|
.withItemsOffset(this.offset);
|
|
@@ -10966,7 +10977,7 @@ class MngTableComponent {
|
|
|
10966
10977
|
this.router.navigate([], {
|
|
10967
10978
|
relativeTo: this.route,
|
|
10968
10979
|
replaceUrl: true,
|
|
10969
|
-
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event
|
|
10980
|
+
queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event)
|
|
10970
10981
|
});
|
|
10971
10982
|
}
|
|
10972
10983
|
}
|
|
@@ -11014,7 +11025,7 @@ class MngTableComponent {
|
|
|
11014
11025
|
(_a = this.dataProviderSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
11015
11026
|
this.dataProviderLoadingSubject.next(true);
|
|
11016
11027
|
if (!queryParam) {
|
|
11017
|
-
queryParam = MediusQueryParamBuilder.create(this.
|
|
11028
|
+
queryParam = MediusQueryParamBuilder.create(this.rows).build();
|
|
11018
11029
|
}
|
|
11019
11030
|
this.dataProviderLatestQueryParam = queryParam;
|
|
11020
11031
|
this.dataProviderLatestQueryParamVersion++;
|
|
@@ -11065,7 +11076,7 @@ class MngTableComponent {
|
|
|
11065
11076
|
}
|
|
11066
11077
|
}
|
|
11067
11078
|
loadTableFromRouteUpdate(params) {
|
|
11068
|
-
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(params, this.filterDescriptors, this.
|
|
11079
|
+
const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(params, this.filterDescriptors, this.rows);
|
|
11069
11080
|
if (this.dataProviderLatestLazyLoadEventVersion < this.dataProviderLatestQueryParamVersion + 1) {
|
|
11070
11081
|
// update only if new version from query params will be higher
|
|
11071
11082
|
this.updatePrimeSortAndFilter(mediusQueryParam);
|
|
@@ -11077,7 +11088,7 @@ class MngTableComponent {
|
|
|
11077
11088
|
var _a, _b;
|
|
11078
11089
|
this.multiSortMeta = this.createSortMeta(mediusQueryParam);
|
|
11079
11090
|
this.filterMetadata = this.createFilterMeta(mediusQueryParam);
|
|
11080
|
-
this.rows = (_a = mediusQueryParam === null || mediusQueryParam === void 0 ? void 0 : mediusQueryParam.itemsPerPage) !== null && _a !== void 0 ? _a : this.
|
|
11091
|
+
this.rows = (_a = mediusQueryParam === null || mediusQueryParam === void 0 ? void 0 : mediusQueryParam.itemsPerPage) !== null && _a !== void 0 ? _a : this.rows;
|
|
11081
11092
|
this.offset = (_b = mediusQueryParam === null || mediusQueryParam === void 0 ? void 0 : mediusQueryParam.itemsOffset) !== null && _b !== void 0 ? _b : 0;
|
|
11082
11093
|
}
|
|
11083
11094
|
createFilterMeta(mediusQueryParam) {
|
|
@@ -11309,11 +11320,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
|
|
|
11309
11320
|
}] } });
|
|
11310
11321
|
|
|
11311
11322
|
class MngTableviewComponent {
|
|
11312
|
-
constructor(route, messageService, translateService,
|
|
11323
|
+
constructor(route, messageService, translateService, confirmationService, actionExecutor, viewContainerService) {
|
|
11313
11324
|
this.route = route;
|
|
11314
11325
|
this.messageService = messageService;
|
|
11315
11326
|
this.translateService = translateService;
|
|
11316
|
-
this.dialogService = dialogService;
|
|
11317
11327
|
this.confirmationService = confirmationService;
|
|
11318
11328
|
this.actionExecutor = actionExecutor;
|
|
11319
11329
|
this.viewContainerService = viewContainerService;
|
|
@@ -11384,12 +11394,12 @@ class MngTableviewComponent {
|
|
|
11384
11394
|
this.selectedItems = selectedItems;
|
|
11385
11395
|
}
|
|
11386
11396
|
}
|
|
11387
|
-
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$1.TranslateService }, { token:
|
|
11388
|
-
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:
|
|
11397
|
+
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$1.TranslateService }, { token: i2$2.ConfirmationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11398
|
+
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$1.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"] }] });
|
|
11389
11399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
11390
11400
|
type: Component,
|
|
11391
11401
|
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" }]
|
|
11392
|
-
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$2.MessageService }, { type: i2$1.TranslateService }, { type:
|
|
11402
|
+
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$2.MessageService }, { type: i2$1.TranslateService }, { type: i2$2.ConfirmationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
|
|
11393
11403
|
type: Input
|
|
11394
11404
|
}], dataProvider: [{
|
|
11395
11405
|
type: Input
|
|
@@ -11758,7 +11768,7 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
11758
11768
|
}
|
|
11759
11769
|
}
|
|
11760
11770
|
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
11761
|
-
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$1.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$
|
|
11771
|
+
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$1.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 });
|
|
11762
11772
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
11763
11773
|
type: Component,
|
|
11764
11774
|
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" }]
|
|
@@ -12093,7 +12103,7 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
12093
12103
|
}
|
|
12094
12104
|
}
|
|
12095
12105
|
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
12096
|
-
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$1.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$
|
|
12106
|
+
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$1.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 });
|
|
12097
12107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
12098
12108
|
type: Component,
|
|
12099
12109
|
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"] }]
|