@mediusinc/mng-commons 5.1.0 → 5.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/esm2022/table/api/descriptors/table.descriptor.mjs +11 -1
- package/esm2022/table/components/table/table.component.mjs +15 -12
- package/esm2022/table/services/data-list.service.mjs +9 -3
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +7 -3
- package/esm2022/tableview/action/components/table/action-table.component.mjs +8 -3
- package/esm2022/tableview/action/models/execution/action-context.model.mjs +9 -1
- package/esm2022/tableview/action/services/action-executor.service.mjs +69 -12
- package/esm2022/tableview/api/action/descriptors/action-editor.descriptor.mjs +2 -1
- package/esm2022/tableview/api/action/descriptors/action.descriptor.mjs +1 -1
- package/esm2022/tableview/api/action/models/action-descriptor.types.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.event.mjs +2 -1
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-options.model.mjs +1 -1
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +16 -10
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +2 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +2 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +2 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +2 -3
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -4
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +21 -9
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +17 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +18 -3
- package/esm2022/tableview/editor/services/form-editor.service.mjs +3 -3
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +2 -2
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +10 -0
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +22 -13
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +2 -0
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +149 -48
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/package.json +7 -7
- package/table/api/descriptors/table.descriptor.d.ts +3 -0
- package/table/components/table/table.component.d.ts +7 -2
- package/table/services/data-list.service.d.ts +5 -2
- package/tableview/action/components/action/action.component.d.ts +1 -1
- package/tableview/action/components/editor/action-editor.component.d.ts +1 -1
- package/tableview/action/components/editor/injector-context/action-editor-injector-context.component.d.ts +7 -5
- package/tableview/action/components/localization/data-language-dropdown.component.d.ts +1 -1
- package/tableview/action/components/table/action-table.component.d.ts +8 -4
- package/tableview/action/models/execution/action-context.model.d.ts +7 -0
- package/tableview/action/services/action-executor.service.d.ts +0 -1
- package/tableview/action/services/view-container.service.d.ts +1 -1
- package/tableview/api/action/descriptors/action-editor.descriptor.d.ts +2 -2
- package/tableview/api/action/descriptors/action.descriptor.d.ts +38 -38
- package/tableview/api/action/models/action-descriptor.types.d.ts +2 -2
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +1 -1
- package/tableview/api/editor/models/form-editor.event.d.ts +4 -0
- package/tableview/api/editor/models/form-editor.interface.d.ts +4 -1
- package/tableview/api/editor/models/formly-options.model.d.ts +4 -4
- package/tableview/editor/components/editor/form-editor.component.d.ts +6 -2
- package/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +0 -1
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +3 -1
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +3 -1
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +5 -1
- package/tableview/editor/services/form-editor.service.d.ts +2 -2
- package/tableview/tableview/components/tableview/tableview.component.d.ts +4 -4
- package/version-info.json +6 -6
|
@@ -20,7 +20,7 @@ import { TooltipModule } from 'primeng/tooltip';
|
|
|
20
20
|
import { ReplaySubject, BehaviorSubject, distinctUntilChanged, Subject, take, of, switchMap, mergeMap as mergeMap$1, from, timeout, combineLatest, debounceTime, combineLatestWith, isObservable, throwError, filter as filter$1 } from 'rxjs';
|
|
21
21
|
import * as i3 from '@mediusinc/mng-commons/core';
|
|
22
22
|
import { getI18n, getI18nAsync, toastMessage, getI18nForError, LoggerService, CommonsService, ParametrizePipe, escapeHtmlAny, toObservable, CommonsInternalError, StyleSizeEnum, CommonsHttpError, Permissions, ComponentDirective, objectDeepCopy, Styles, TemplateDirective, findTemplateByName, fromSubscribeError, getErrorLogLevel, StyleLevelEnum, getObjectPropertyByPath, FilterMatchMode, COMMONS_MODULE_CONFIG_IT, dateToIsoString, RouteBuilder, createLazyRoute, CommonsFeatureTypeEnum } from '@mediusinc/mng-commons/core';
|
|
23
|
-
import { ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptorInst, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FieldValidationDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, actionEditorCancel, ActionDescriptorInst, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
|
|
23
|
+
import { ActionActivationTriggerEnum, ActionTypeEnum, DataProviderExecutor, ActionDeleteDescriptorInst, ActionEditorEditDescriptorInst, ActionEditorDetailsDescriptorInst, ActionEditorAddDescriptorInst, ActionEditorDescriptorInst, CommonsActionError, ActionLinkDescriptorInst, TableviewEditorTypeEnum, TableviewDescriptorInst, FieldInputDescriptor, FieldInputTypeEnum, FieldActionDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldLookupDescriptor, FieldManyToManyEditorDescriptor, FieldManyEditorDescriptor, FieldValidationDescriptor, FormEventTypeEnum, FormFieldEventComponentSubtype, ActionEditorSubmitTypeEnum, ActionEditorSubmitDescriptorInst, ActionPositionEnum, runFnFromDataProviderOrFallback, runGetAllFromDataProvider, runFetchFromDataProvider, runCreateFromDataProvider, runUpdateFromDataProvider, runDeleteFromDataProvider, FormFieldEventTypeEnum, FieldGroupTypeEnum, FormFieldEventDialogSubtype, FieldManyEditorActionEnum, ActionEditorDescriptor, actionEditorCancel, ActionDescriptorInst, FieldManyToManyEditorActionEnum, TableviewActionDefaultCategories, DATA_LANGUAGE_DROPDOWN_COMPONENT_IT } from '@mediusinc/mng-commons/tableview/api';
|
|
24
24
|
import { mergeMap, map, filter, startWith, catchError, first, take as take$1 } from 'rxjs/operators';
|
|
25
25
|
import { getI18nModelParams, getI18nModelParamsAsync, type } from '@mediusinc/mng-commons/model';
|
|
26
26
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
@@ -213,6 +213,7 @@ class ActionContext {
|
|
|
213
213
|
this.executionSubject = executionSubject;
|
|
214
214
|
this.executionIsRunningSubject = executionIsRunningSubject;
|
|
215
215
|
this.logger = LoggerService.get().create('ActionContext');
|
|
216
|
+
this.dataProviderSource = ActionDataProviderSource.Undefined;
|
|
216
217
|
this.contextLongName = `${this.instance.instanceLongName}_${functionName}`;
|
|
217
218
|
}
|
|
218
219
|
get execution$() {
|
|
@@ -251,6 +252,13 @@ class ActionContext {
|
|
|
251
252
|
return this.executionSubject.isStopped && this.executionIsRunningSubject.isStopped && (this.runSubscription?.closed ?? true);
|
|
252
253
|
}
|
|
253
254
|
}
|
|
255
|
+
var ActionDataProviderSource;
|
|
256
|
+
(function (ActionDataProviderSource) {
|
|
257
|
+
ActionDataProviderSource[ActionDataProviderSource["Undefined"] = 0] = "Undefined";
|
|
258
|
+
ActionDataProviderSource[ActionDataProviderSource["ViewContainer"] = 1] = "ViewContainer";
|
|
259
|
+
ActionDataProviderSource[ActionDataProviderSource["Descriptor"] = 2] = "Descriptor";
|
|
260
|
+
ActionDataProviderSource[ActionDataProviderSource["ParameterOrInput"] = 3] = "ParameterOrInput";
|
|
261
|
+
})(ActionDataProviderSource || (ActionDataProviderSource = {}));
|
|
254
262
|
|
|
255
263
|
/**
|
|
256
264
|
* Action execution instance containing data about execution state of action
|
|
@@ -651,9 +659,9 @@ class ActionExecutorService {
|
|
|
651
659
|
else if (actionEditor instanceof ActionEditorEditDescriptorInst) {
|
|
652
660
|
fnObs = this.dataProviderExecutor.runUpdateOrFail.bind(this.dataProviderExecutor);
|
|
653
661
|
}
|
|
654
|
-
else {
|
|
655
|
-
//
|
|
656
|
-
const defaultSubmit = of(ctx.parameters?.item
|
|
662
|
+
else if (ctx.dataProviderSource > ActionDataProviderSource.ViewContainer) {
|
|
663
|
+
// if data provider is given directly on descriptor or as input, use it
|
|
664
|
+
const defaultSubmit = of(ctx.parameters?.item ?? undefined);
|
|
657
665
|
fnObs = ctx => {
|
|
658
666
|
if (ctx.parameters.itemId) {
|
|
659
667
|
return this.dataProviderExecutor.runUpdate(ctx, defaultSubmit);
|
|
@@ -663,6 +671,9 @@ class ActionExecutorService {
|
|
|
663
671
|
}
|
|
664
672
|
};
|
|
665
673
|
}
|
|
674
|
+
else {
|
|
675
|
+
fnObs = ctx => ctx.parameters?.item ?? undefined;
|
|
676
|
+
}
|
|
666
677
|
}
|
|
667
678
|
else {
|
|
668
679
|
fnObs = actionEditor.submitFunction;
|
|
@@ -671,10 +682,10 @@ class ActionExecutorService {
|
|
|
671
682
|
case 'fetch':
|
|
672
683
|
actionEditor = ctx.instance.action;
|
|
673
684
|
if (typeof actionEditor.fetchFunction !== 'function') {
|
|
674
|
-
if (actionEditor instanceof ActionEditorEditDescriptorInst) {
|
|
685
|
+
if (actionEditor instanceof ActionEditorEditDescriptorInst || actionEditor instanceof ActionEditorDetailsDescriptorInst) {
|
|
675
686
|
fnObs = this.dataProviderExecutor.runFetchOrFail.bind(this.dataProviderExecutor);
|
|
676
687
|
}
|
|
677
|
-
else {
|
|
688
|
+
else if (ctx.dataProviderSource > ActionDataProviderSource.ViewContainer) {
|
|
678
689
|
const defaultFetch = of(ctx.parameters?.item ? ctx.parameters.item : undefined);
|
|
679
690
|
fnObs = ctx => {
|
|
680
691
|
if (ctx.parameters.itemId || typeof ctx.parameters.item === 'object') {
|
|
@@ -683,6 +694,9 @@ class ActionExecutorService {
|
|
|
683
694
|
return defaultFetch;
|
|
684
695
|
};
|
|
685
696
|
}
|
|
697
|
+
else {
|
|
698
|
+
fnObs = ctx => ctx.parameters?.item ?? undefined;
|
|
699
|
+
}
|
|
686
700
|
}
|
|
687
701
|
else {
|
|
688
702
|
fnObs = actionEditor.fetchFunction;
|
|
@@ -698,6 +712,42 @@ class ActionExecutorService {
|
|
|
698
712
|
}
|
|
699
713
|
break;
|
|
700
714
|
}
|
|
715
|
+
// switch (ctx.functionName) {
|
|
716
|
+
// case 'submit':
|
|
717
|
+
// actionEditor = ctx.instance.action as ActionEditorDescriptorInst<Item>;
|
|
718
|
+
// if (typeof actionEditor.submitFunction !== 'function') {
|
|
719
|
+
// if (actionEditor instanceof ActionEditorAddDescriptorInst) {
|
|
720
|
+
// fnObs = this.dataProviderExecutor.runCreateOrFail.bind(this.dataProviderExecutor);
|
|
721
|
+
// } else if (actionEditor instanceof ActionEditorEditDescriptorInst) {
|
|
722
|
+
// fnObs = this.dataProviderExecutor.runUpdateOrFail.bind(this.dataProviderExecutor);
|
|
723
|
+
// } else {
|
|
724
|
+
// fnObs = ctx => ctx.parameters?.item ?? undefined;
|
|
725
|
+
// }
|
|
726
|
+
// } else {
|
|
727
|
+
// fnObs = actionEditor.submitFunction;
|
|
728
|
+
// }
|
|
729
|
+
// break;
|
|
730
|
+
// case 'fetch':
|
|
731
|
+
// actionEditor = ctx.instance.action as ActionEditorDescriptorInst<Item>;
|
|
732
|
+
// if (typeof actionEditor.fetchFunction !== 'function') {
|
|
733
|
+
// if (actionEditor instanceof ActionEditorEditDescriptorInst || actionEditor instanceof ActionEditorDetailsDescriptorInst) {
|
|
734
|
+
// fnObs = this.dataProviderExecutor.runFetchOrFail.bind(this.dataProviderExecutor);
|
|
735
|
+
// } else {
|
|
736
|
+
// fnObs = ctx => ctx.parameters?.item ?? undefined;
|
|
737
|
+
// }
|
|
738
|
+
// } else {
|
|
739
|
+
// fnObs = actionEditor.fetchFunction;
|
|
740
|
+
// }
|
|
741
|
+
// break;
|
|
742
|
+
// case 'run':
|
|
743
|
+
// default:
|
|
744
|
+
// if (!ctx.instance.action.hasRunFunction && ctx.instance.action instanceof ActionDeleteDescriptorInst) {
|
|
745
|
+
// fnObs = this.dataProviderExecutor.runDeleteOrFail.bind(this.dataProviderExecutor);
|
|
746
|
+
// } else {
|
|
747
|
+
// fnObs = ctx.instance.action.runFunction;
|
|
748
|
+
// }
|
|
749
|
+
// break;
|
|
750
|
+
// }
|
|
701
751
|
const retObs = of(void 0).pipe(take(1), switchMap(() => {
|
|
702
752
|
if (isMainRunFn) {
|
|
703
753
|
// if main run function, also set loading to true
|
|
@@ -863,16 +913,23 @@ class ActionExecutorService {
|
|
|
863
913
|
}
|
|
864
914
|
const editorAction = instance.action;
|
|
865
915
|
let ctxDataProvider = dataProvider;
|
|
916
|
+
let dataProviderSource = ActionDataProviderSource.ParameterOrInput;
|
|
866
917
|
if (!ctxDataProvider && editorAction.dataProvider) {
|
|
867
918
|
ctxDataProvider = editorAction.dataProvider;
|
|
919
|
+
dataProviderSource = ActionDataProviderSource.Descriptor;
|
|
868
920
|
}
|
|
869
921
|
if (!ctxDataProvider) {
|
|
870
922
|
const viewContainerDataProvider = this.viewContainer?.dataProvider();
|
|
871
923
|
if (viewContainerDataProvider) {
|
|
872
924
|
ctxDataProvider = viewContainerDataProvider;
|
|
925
|
+
dataProviderSource = ActionDataProviderSource.ViewContainer;
|
|
926
|
+
}
|
|
927
|
+
else {
|
|
928
|
+
dataProviderSource = ActionDataProviderSource.Undefined;
|
|
873
929
|
}
|
|
874
930
|
}
|
|
875
931
|
const ctx = new ActionContext(this.injector, instance, parameters, functionName, this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider) ?? undefined, ctxDataProvider, this.viewContainer ?? undefined);
|
|
932
|
+
ctx.dataProviderSource = dataProviderSource;
|
|
876
933
|
ctx.previousActionInstance = previousActionInstance;
|
|
877
934
|
instance.newContext(ctx);
|
|
878
935
|
return ctx;
|
|
@@ -882,15 +939,19 @@ class ActionExecutorService {
|
|
|
882
939
|
*
|
|
883
940
|
* @param action Action descriptor.
|
|
884
941
|
* @param parameters Action parameters for context run.
|
|
885
|
-
* @param dataProvider Data provider for context run.
|
|
886
942
|
* @param instance Optional existing action instance (if non provided, new will be created).
|
|
887
943
|
* @param previousActionInstance Optional previous action instance to link in next instance.
|
|
888
944
|
*
|
|
889
945
|
* @returns Action context for run function.
|
|
890
946
|
*/
|
|
891
|
-
prepareContext(action, parameters,
|
|
947
|
+
prepareContext(action, parameters, instance, previousActionInstance) {
|
|
892
948
|
instance = this.getOrCreateInstance(instance, action, parameters, ActionInstanceStateEnum.ActivationEnd);
|
|
893
|
-
|
|
949
|
+
let ctxDataProvider = instance.action.dataProvider;
|
|
950
|
+
let dataProviderSource = ActionDataProviderSource.Descriptor;
|
|
951
|
+
if (!ctxDataProvider) {
|
|
952
|
+
ctxDataProvider = this.viewContainer?.dataProvider();
|
|
953
|
+
dataProviderSource = ActionDataProviderSource.ViewContainer;
|
|
954
|
+
}
|
|
894
955
|
let service = undefined;
|
|
895
956
|
if (ctxDataProvider != null) {
|
|
896
957
|
const dataProviderService = this.dataProviderExecutor.getDataProviderService(this.injector, ctxDataProvider);
|
|
@@ -899,7 +960,11 @@ class ActionExecutorService {
|
|
|
899
960
|
}
|
|
900
961
|
service = dataProviderService;
|
|
901
962
|
}
|
|
963
|
+
else {
|
|
964
|
+
dataProviderSource = ActionDataProviderSource.Undefined;
|
|
965
|
+
}
|
|
902
966
|
const ctx = new ActionContext(this.injector, instance, parameters, 'run', service, ctxDataProvider, this.viewContainer ?? undefined);
|
|
967
|
+
ctx.dataProviderSource = dataProviderSource;
|
|
903
968
|
ctx.previousActionInstance = previousActionInstance;
|
|
904
969
|
instance.newContext(ctx);
|
|
905
970
|
return ctx;
|
|
@@ -973,7 +1038,7 @@ class ActionExecutorService {
|
|
|
973
1038
|
else {
|
|
974
1039
|
// directly execute action
|
|
975
1040
|
instance.state = ActionInstanceStateEnum.ActivationEnd;
|
|
976
|
-
const context = this.prepareContext(action, parameters,
|
|
1041
|
+
const context = this.prepareContext(action, parameters, instance, previousActionInstance);
|
|
977
1042
|
if (runContext) {
|
|
978
1043
|
this.run(context);
|
|
979
1044
|
}
|
|
@@ -2000,8 +2065,8 @@ class FormEditorService {
|
|
|
2000
2065
|
submit() {
|
|
2001
2066
|
this.formComponent.submit();
|
|
2002
2067
|
}
|
|
2003
|
-
getFormValue() {
|
|
2004
|
-
return this.formComponent.getFormValue();
|
|
2068
|
+
getFormValue(opts) {
|
|
2069
|
+
return this.formComponent.getFormValue(opts);
|
|
2005
2070
|
}
|
|
2006
2071
|
resetFormModel(item, opts) {
|
|
2007
2072
|
this.formComponent.resetFormModel(item, opts);
|
|
@@ -2088,6 +2153,7 @@ class FormEditorComponent {
|
|
|
2088
2153
|
this.isFormDisabled = input(false);
|
|
2089
2154
|
// event outputs
|
|
2090
2155
|
this.formSubmit = output();
|
|
2156
|
+
this.valueChange = output();
|
|
2091
2157
|
// content and view queries
|
|
2092
2158
|
this.submitButtonElementRef = viewChild('submitButton');
|
|
2093
2159
|
// formly specifics
|
|
@@ -2103,6 +2169,7 @@ class FormEditorComponent {
|
|
|
2103
2169
|
};
|
|
2104
2170
|
this._formlyFields = []; // initialized in ngOnInit, should not be changed after
|
|
2105
2171
|
this._formlyInitialItem = {}; // initialized in ngOnInit, should not be changed after
|
|
2172
|
+
this.setterFields = computed(() => this.descriptor().fields.filter(f => typeof f.setter === 'function'));
|
|
2106
2173
|
this.formMessages = signal([]);
|
|
2107
2174
|
this.formService.init(this);
|
|
2108
2175
|
effect(() => {
|
|
@@ -2152,7 +2219,10 @@ class FormEditorComponent {
|
|
|
2152
2219
|
this.descriptor().nextEvent(FormEventTypeEnum.ComponentLifecycle, this, {
|
|
2153
2220
|
eventSubtype: FormFieldEventComponentSubtype.ON_INIT
|
|
2154
2221
|
});
|
|
2155
|
-
this._form.valueChanges
|
|
2222
|
+
this._form.valueChanges
|
|
2223
|
+
.pipe(debounceTime(100), distinctUntilChanged(), map(() => this._form.getRawValue()), takeUntilDestroyed(this.destroyRef))
|
|
2224
|
+
.subscribe(v => {
|
|
2225
|
+
this.valueChange?.emit(v);
|
|
2156
2226
|
this.descriptor().nextEvent(FormEventTypeEnum.ValueChange, this, {
|
|
2157
2227
|
value: v,
|
|
2158
2228
|
formValue: () => this.getFormValue()
|
|
@@ -2205,10 +2275,10 @@ class FormEditorComponent {
|
|
|
2205
2275
|
});
|
|
2206
2276
|
}
|
|
2207
2277
|
}
|
|
2208
|
-
getFormValue() {
|
|
2278
|
+
getFormValue(opts) {
|
|
2209
2279
|
const formValue = objectDeepCopy(this._form.getRawValue(), { mapGettersToProperties: true });
|
|
2210
|
-
|
|
2211
|
-
|
|
2280
|
+
if (opts?.omitSetters !== true) {
|
|
2281
|
+
this.setterFields().forEach(field => {
|
|
2212
2282
|
const splitPath = field.property.split('.');
|
|
2213
2283
|
let fieldValue = formValue;
|
|
2214
2284
|
for (let i = 0; i < splitPath.length - 1; i++) {
|
|
@@ -2219,9 +2289,9 @@ class FormEditorComponent {
|
|
|
2219
2289
|
fieldValue = fieldValue[currentSubPath];
|
|
2220
2290
|
}
|
|
2221
2291
|
fieldValue = fieldValue[splitPath[splitPath.length - 1]];
|
|
2222
|
-
field.setter(formValue, fieldValue);
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2292
|
+
field.setter?.(formValue, fieldValue);
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2225
2295
|
return formValue;
|
|
2226
2296
|
}
|
|
2227
2297
|
resetFormModel(item, opts) {
|
|
@@ -2342,7 +2412,7 @@ class FormEditorComponent {
|
|
|
2342
2412
|
return false;
|
|
2343
2413
|
}
|
|
2344
2414
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2345
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.0.5", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formSubmit: "formSubmit" }, providers: [provideFormComponent()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2415
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.0.5", type: FormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, submitLoading: { classPropertyName: "submitLoading", publicName: "submitLoading", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, isFormDisabled: { classPropertyName: "isFormDisabled", publicName: "isFormDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formSubmit: "formSubmit", valueChange: "valueChange" }, providers: [provideFormComponent()], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formlyFields\" [options]=\"formlyOptions\" [model]=\"formlyInitialItem\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"submitLoading()\" loadingIcon=\"pi pi-spin pi-spinner\"></button>\n</form>\n<p-messages [value]=\"formMessages()\" [enableService]=\"false\"></p-messages>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2346
2416
|
}
|
|
2347
2417
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2348
2418
|
type: Component,
|
|
@@ -2417,6 +2487,7 @@ class ActionEditorInjectorContextComponent {
|
|
|
2417
2487
|
.reverse());
|
|
2418
2488
|
this.dataProvider = computed(() => this.data().dataProvider ?? this.viewContainer?.dataProvider());
|
|
2419
2489
|
this.loading = signal(false);
|
|
2490
|
+
this.formValue = signal(undefined);
|
|
2420
2491
|
this.submitLoading = signal(false);
|
|
2421
2492
|
// updates for title
|
|
2422
2493
|
effect(() => {
|
|
@@ -2532,6 +2603,9 @@ class ActionEditorInjectorContextComponent {
|
|
|
2532
2603
|
triggerSubmit() {
|
|
2533
2604
|
this.formEditorCmp()?.submit();
|
|
2534
2605
|
}
|
|
2606
|
+
onValueChange(value) {
|
|
2607
|
+
this.formValue.set(value);
|
|
2608
|
+
}
|
|
2535
2609
|
fetchItem() {
|
|
2536
2610
|
if (!this.instance) {
|
|
2537
2611
|
throw new CommonsInternalError(`Action is not instantiated in action editor for action ${this.editorAction().actionName}.`);
|
|
@@ -2690,11 +2764,11 @@ class ActionEditorInjectorContextComponent {
|
|
|
2690
2764
|
return subject.asObservable();
|
|
2691
2765
|
}
|
|
2692
2766
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ActionEditorInjectorContextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2693
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionRun: "actionRun", actionCancel: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"
|
|
2767
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: ActionEditorInjectorContextComponent, isStandalone: true, selector: "mng-action-editor-injector-context", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionRun: "actionRun", actionCancel: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, providers: [provideActionExecutor()], viewQueries: [{ propertyName: "formEditorCmp", first: true, predicate: FormEditorComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [item]=\"item()\"\n [isFormDisabled]=\"isFormDisabled()\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$3.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: FormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isFormDisabled"], outputs: ["formSubmit", "valueChange"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2694
2768
|
}
|
|
2695
2769
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ActionEditorInjectorContextComponent, decorators: [{
|
|
2696
2770
|
type: Component,
|
|
2697
|
-
args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent, ComponentDirective, ToolbarModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"
|
|
2771
|
+
args: [{ standalone: true, selector: 'mng-action-editor-injector-context', imports: [ActionComponent, ProgressSpinnerModule, FormEditorComponent, ComponentDirective, ToolbarModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideActionExecutor()], template: "@if (!data().isDialog && title()) {\n <h5>{{ title() }}</h5>\n}\n@if (data().isDialog && editorAction().activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n <span class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </span>\n}\n<div class=\"h-full flex flex-column\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n </div>\n }\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n @if (loading()) {\n <div class=\"text-center\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n }\n @if (editorAction().editorDescriptor && !loading()) {\n <mng-form-editor\n [descriptor]=\"editorAction().editorDescriptor\"\n [item]=\"item()\"\n [isFormDisabled]=\"isFormDisabled()\"\n (valueChange)=\"onValueChange($event)\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n }\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n @for (action of footerLeftActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n <div>\n @for (action of footerRightActions(); track action) {\n <mng-action\n [action]=\"action\"\n [disabled]=\"submitLoading()\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading() : false\"\n [hostComponent]=\"this\"\n [item]=\"formValue()\"\n [itemId]=\"itemId()\"></mng-action>\n }\n </div>\n </div>\n</div>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"] }]
|
|
2698
2772
|
}], ctorParameters: () => [], propDecorators: { beforeWindowUnload: [{
|
|
2699
2773
|
type: HostListener,
|
|
2700
2774
|
args: ['window:beforeunload']
|
|
@@ -2997,6 +3071,7 @@ class ActionTableComponent {
|
|
|
2997
3071
|
this.selectionMode = input('multiple');
|
|
2998
3072
|
this.selectionEnabled = input(false);
|
|
2999
3073
|
this.globalFilterFields = input();
|
|
3074
|
+
this.rowReorderEnabled = input(true);
|
|
3000
3075
|
// actions
|
|
3001
3076
|
this.actions = input([]); // can be anything
|
|
3002
3077
|
// component inputs
|
|
@@ -3011,6 +3086,7 @@ class ActionTableComponent {
|
|
|
3011
3086
|
this.selectionChange = output();
|
|
3012
3087
|
this.captionComponentInstance = output();
|
|
3013
3088
|
this.columnActionComponentInstance = output();
|
|
3089
|
+
this.rowReorder = output();
|
|
3014
3090
|
// content and view queries
|
|
3015
3091
|
this.templates = contentChildren(TemplateDirective);
|
|
3016
3092
|
this.components = viewChildren((QueryList));
|
|
@@ -3051,17 +3127,20 @@ class ActionTableComponent {
|
|
|
3051
3127
|
onSelectionChange(items) {
|
|
3052
3128
|
this.selectionChange.emit(items);
|
|
3053
3129
|
}
|
|
3130
|
+
onRowReorder(event) {
|
|
3131
|
+
this.rowReorder.emit(event);
|
|
3132
|
+
}
|
|
3054
3133
|
onActionFinish(runResult) {
|
|
3055
3134
|
if (!runResult.error) {
|
|
3056
3135
|
this.reload();
|
|
3057
3136
|
}
|
|
3058
3137
|
}
|
|
3059
3138
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ActionTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3060
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: ActionTableComponent, isStandalone: true, selector: "mng-action-table", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, useQueryParams: { classPropertyName: "useQueryParams", publicName: "useQueryParams", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectionEnabled: { classPropertyName: "selectionEnabled", publicName: "selectionEnabled", isSignal: true, isRequired: false, transformFunction: null }, globalFilterFields: { classPropertyName: "globalFilterFields", publicName: "globalFilterFields", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, captionComponent: { classPropertyName: "captionComponent", publicName: "captionComponent", isSignal: true, isRequired: false, transformFunction: null }, columnActionComponent: { classPropertyName: "columnActionComponent", publicName: "columnActionComponent", isSignal: true, isRequired: false, transformFunction: null }, columnActionMinWidthInput: { classPropertyName: "columnActionMinWidthInput", publicName: "columnActionMinWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tableLoad: "tableLoad", selectionChange: "selectionChange", captionComponentInstance: "captionComponentInstance", columnActionComponentInstance: "columnActionComponentInstance" }, providers: [provideActionExecutor()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "components", predicate: (QueryList), descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: TableComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<mng-table\n [descriptor]=\"descriptor()\"\n [items]=\"items()\"\n [result]=\"result()\"\n [loading]=\"loading()\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"useQueryParams()\"\n [selectionMode]=\"selectionMode()\"\n [selectionEnabled]=\"selectionEnabled()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [captionComponent]=\"captionComponent()\"\n [columnCustomLastComponent]=\"columnActionComponent()\"\n [columnLastMinWidth]=\"columnActionMinWidth()\"\n [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionComponentInstance.emit($event)\"\n (columnCustomLastComponentInstance)=\"columnActionComponentInstance.emit($event)\">\n
|
|
3139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: ActionTableComponent, isStandalone: true, selector: "mng-action-table", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, useQueryParams: { classPropertyName: "useQueryParams", publicName: "useQueryParams", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectionEnabled: { classPropertyName: "selectionEnabled", publicName: "selectionEnabled", isSignal: true, isRequired: false, transformFunction: null }, globalFilterFields: { classPropertyName: "globalFilterFields", publicName: "globalFilterFields", isSignal: true, isRequired: false, transformFunction: null }, rowReorderEnabled: { classPropertyName: "rowReorderEnabled", publicName: "rowReorderEnabled", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, captionComponent: { classPropertyName: "captionComponent", publicName: "captionComponent", isSignal: true, isRequired: false, transformFunction: null }, columnActionComponent: { classPropertyName: "columnActionComponent", publicName: "columnActionComponent", isSignal: true, isRequired: false, transformFunction: null }, columnActionMinWidthInput: { classPropertyName: "columnActionMinWidthInput", publicName: "columnActionMinWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tableLoad: "tableLoad", selectionChange: "selectionChange", captionComponentInstance: "captionComponentInstance", columnActionComponentInstance: "columnActionComponentInstance", rowReorder: "rowReorder" }, providers: [provideActionExecutor()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "components", predicate: (QueryList), descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: TableComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<mng-table\n [descriptor]=\"descriptor()\"\n [items]=\"items()\"\n [result]=\"result()\"\n [loading]=\"loading()\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"useQueryParams()\"\n [selectionMode]=\"selectionMode()\"\n [selectionEnabled]=\"selectionEnabled()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [captionComponent]=\"captionComponent()\"\n [columnCustomLastComponent]=\"columnActionComponent()\"\n [columnLastMinWidth]=\"columnActionMinWidth()\"\n [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n [rowReorderEnabled]=\"rowReorderEnabled()\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionComponentInstance.emit($event)\"\n (columnCustomLastComponentInstance)=\"columnActionComponentInstance.emit($event)\"\n (rowReorder)=\"onRowReorder($event)\">\n@if (!columnActionComponent() && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor().model.idProperty ? item[descriptor().model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent()) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()\"></ng-container>\n </ng-template>\n }\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n</mng-table>\n", dependencies: [{ kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3061
3140
|
}
|
|
3062
3141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ActionTableComponent, decorators: [{
|
|
3063
3142
|
type: Component,
|
|
3064
|
-
args: [{ standalone: true, selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TemplateDirective, NgTemplateOutlet, AsyncPipe], providers: [provideActionExecutor()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table\n [descriptor]=\"descriptor()\"\n [items]=\"items()\"\n [result]=\"result()\"\n [loading]=\"loading()\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"useQueryParams()\"\n [selectionMode]=\"selectionMode()\"\n [selectionEnabled]=\"selectionEnabled()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [captionComponent]=\"captionComponent()\"\n [columnCustomLastComponent]=\"columnActionComponent()\"\n [columnLastMinWidth]=\"columnActionMinWidth()\"\n [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionComponentInstance.emit($event)\"\n (columnCustomLastComponentInstance)=\"columnActionComponentInstance.emit($event)\">\n
|
|
3143
|
+
args: [{ standalone: true, selector: 'mng-action-table', imports: [TableComponent, ActionComponent, TemplateDirective, NgTemplateOutlet, AsyncPipe], providers: [provideActionExecutor()], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table\n [descriptor]=\"descriptor()\"\n [items]=\"items()\"\n [result]=\"result()\"\n [loading]=\"loading()\"\n [dataProvider]=\"dataProvider()\"\n [useQueryParams]=\"useQueryParams()\"\n [selectionMode]=\"selectionMode()\"\n [selectionEnabled]=\"selectionEnabled()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [captionComponent]=\"captionComponent()\"\n [columnCustomLastComponent]=\"columnActionComponent()\"\n [columnLastMinWidth]=\"columnActionMinWidth()\"\n [cellClickEnabled]=\"this.rowClickActions().length > 0\"\n [rowReorderEnabled]=\"rowReorderEnabled()\"\n (tableLoad)=\"tableLoad.emit($event)\"\n (cellClick)=\"onCellClick($event)\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"captionComponentInstance.emit($event)\"\n (columnCustomLastComponentInstance)=\"columnActionComponentInstance.emit($event)\"\n (rowReorder)=\"onRowReorder($event)\">\n@if (!columnActionComponent() && rowInlineActions().length > 0) {\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n @for (action of rowInlineActions(); track action.actionNameLong) {\n <mng-action\n [action]=\"action\"\n [item]=\"item\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor().model.idProperty ? item[descriptor().model.idProperty!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n }\n </ng-template>\n }\n @if (captionTemplate() && !captionComponent()) {\n <ng-template mngTemplate=\"caption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate()\"></ng-container>\n </ng-template>\n }\n @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n</mng-table>\n" }]
|
|
3065
3144
|
}], ctorParameters: () => [] });
|
|
3066
3145
|
|
|
3067
3146
|
const unsavedChangesGuard = (component) => {
|
|
@@ -3107,6 +3186,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
3107
3186
|
}] });
|
|
3108
3187
|
|
|
3109
3188
|
class ACommonsFormlyFieldType extends FieldType {
|
|
3189
|
+
constructor() {
|
|
3190
|
+
super(...arguments);
|
|
3191
|
+
this.destroyRef = inject(DestroyRef);
|
|
3192
|
+
this.formStateDisabledSubject = new BehaviorSubject(false);
|
|
3193
|
+
this.formStateDisabled$ = this.formStateDisabledSubject.asObservable();
|
|
3194
|
+
}
|
|
3110
3195
|
get descriptor() {
|
|
3111
3196
|
return this.props.descriptor;
|
|
3112
3197
|
}
|
|
@@ -3114,10 +3199,15 @@ class ACommonsFormlyFieldType extends FieldType {
|
|
|
3114
3199
|
return this.field.options;
|
|
3115
3200
|
}
|
|
3116
3201
|
get formState() {
|
|
3117
|
-
return this.options?.formState
|
|
3202
|
+
return this.options?.formState ?? {};
|
|
3118
3203
|
}
|
|
3119
3204
|
ngOnInit() {
|
|
3120
3205
|
this.props.fieldComponent = this;
|
|
3206
|
+
if (!this.formState.disabled$)
|
|
3207
|
+
throw new CommonsInternalError('formState.disabled$ must be defined');
|
|
3208
|
+
this.formState.disabled$
|
|
3209
|
+
.pipe(startWith(this.formState.disabled ?? false), takeUntilDestroyed(this.destroyRef))
|
|
3210
|
+
.subscribe(value => this.formStateDisabledSubject.next(value));
|
|
3121
3211
|
}
|
|
3122
3212
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ACommonsFormlyFieldType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3123
3213
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: ACommonsFormlyFieldType, usesInheritance: true, ngImport: i0 }); }
|
|
@@ -3176,10 +3266,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
3176
3266
|
}] });
|
|
3177
3267
|
|
|
3178
3268
|
class FormlyFieldAutocompleteComponent extends ACommonsFormlyFieldType {
|
|
3179
|
-
constructor() {
|
|
3180
|
-
super(...arguments);
|
|
3181
|
-
this.destroyRef = inject(DestroyRef);
|
|
3182
|
-
}
|
|
3183
3269
|
ngOnInit() {
|
|
3184
3270
|
super.ngOnInit();
|
|
3185
3271
|
// emit lifecycle event
|
|
@@ -3248,10 +3334,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImpor
|
|
|
3248
3334
|
}] });
|
|
3249
3335
|
|
|
3250
3336
|
class FormlyFieldDropdownComponent extends ACommonsFormlyFieldType {
|
|
3251
|
-
constructor() {
|
|
3252
|
-
super(...arguments);
|
|
3253
|
-
this.destroyRef = inject(DestroyRef);
|
|
3254
|
-
}
|
|
3255
3337
|
ngOnInit() {
|
|
3256
3338
|
super.ngOnInit();
|
|
3257
3339
|
// emit lifecycle event
|
|
@@ -3303,7 +3385,6 @@ class FormlyFieldInputComponent extends ACommonsFormlyFieldType {
|
|
|
3303
3385
|
this.NUMBER_MAX_SAFE = Number.MAX_SAFE_INTEGER;
|
|
3304
3386
|
this.DESC_INPUT_TYPE_IMAGE_FILE = FieldInputTypeEnum.ImageFile;
|
|
3305
3387
|
this.applicationLocale = inject(LOCALE_ID);
|
|
3306
|
-
this.destroyRef = inject(DestroyRef);
|
|
3307
3388
|
this.formBuilder = inject(FormBuilder);
|
|
3308
3389
|
this.translateService = inject(TranslateService);
|
|
3309
3390
|
this.numberFieldMode = 'decimal';
|
|
@@ -3488,7 +3569,6 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
3488
3569
|
constructor(injector) {
|
|
3489
3570
|
super();
|
|
3490
3571
|
this.injector = injector;
|
|
3491
|
-
this.destroyRef = inject(DestroyRef);
|
|
3492
3572
|
this.logger = inject(LoggerService).create('FormlyFieldLookupDialogComponent');
|
|
3493
3573
|
this.fieldLabelFormControl = new FormControl();
|
|
3494
3574
|
this.addItems = signal({ data: [], totalCount: 0 });
|
|
@@ -3643,7 +3723,7 @@ class FormlyFieldLookupDialogComponent extends ACommonsFormlyFieldType {
|
|
|
3643
3723
|
}
|
|
3644
3724
|
}
|
|
3645
3725
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3646
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, 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 @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\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\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"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)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "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: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3726
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "table", first: true, predicate: TableComponent, 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 @if (!props.required && formControl.value && !formControl.disabled) {\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\"></i>\n }\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\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading()\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnCustomLastComponent]=\"config.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnCustomLastComponentInstance)=\"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)=\"onAddItem()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "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: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i3$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3647
3727
|
}
|
|
3648
3728
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldLookupDialogComponent, decorators: [{
|
|
3649
3729
|
type: Component,
|
|
@@ -3657,12 +3737,12 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
3657
3737
|
constructor() {
|
|
3658
3738
|
super(...arguments);
|
|
3659
3739
|
this.injector = inject(Injector);
|
|
3660
|
-
this.destroyRef = inject(DestroyRef);
|
|
3661
3740
|
this.items = signal([]);
|
|
3662
3741
|
this.actions = [];
|
|
3663
3742
|
this.toolbarRightActions = [];
|
|
3664
3743
|
this.isDisabledSubject = new BehaviorSubject(false);
|
|
3665
3744
|
this.isEnabled$ = this.isDisabledSubject.asObservable().pipe(distinctUntilChanged(), map(e => !e));
|
|
3745
|
+
this.disableRowReorder = toSignal(this.formStateDisabled$);
|
|
3666
3746
|
}
|
|
3667
3747
|
ngOnInit() {
|
|
3668
3748
|
super.ngOnInit();
|
|
@@ -3711,7 +3791,7 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
3711
3791
|
})
|
|
3712
3792
|
.withRunNotificationSuccess(undefined, undefined, false)
|
|
3713
3793
|
.withRunNotificationError(undefined, undefined, false)
|
|
3714
|
-
.withIsVisibleFunction(() => this.
|
|
3794
|
+
.withIsVisibleFunction(() => this.formStateDisabled$.pipe(map(v => !v)))
|
|
3715
3795
|
.withIsEnabledFunction(() => this.isEnabled$);
|
|
3716
3796
|
addAction.button.withLabel(null).withIcon('pi pi-plus');
|
|
3717
3797
|
this.actions.push(addAction);
|
|
@@ -3742,7 +3822,7 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
3742
3822
|
})
|
|
3743
3823
|
.withRunNotificationSuccess(undefined, undefined, false)
|
|
3744
3824
|
.withRunNotificationError(undefined, undefined, false)
|
|
3745
|
-
.withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.
|
|
3825
|
+
.withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.formStateDisabled$.pipe(map(v => !v))))
|
|
3746
3826
|
.withIsEnabledFunction(() => this.isEnabled$);
|
|
3747
3827
|
editAction.button.withLabel(null).withIcon('pi pi-pencil');
|
|
3748
3828
|
this.actions.push(editAction);
|
|
@@ -3784,7 +3864,7 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
3784
3864
|
})
|
|
3785
3865
|
.withRunNotificationSuccess(undefined, undefined, false)
|
|
3786
3866
|
.withRunNotificationError(undefined, undefined, false)
|
|
3787
|
-
.withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.
|
|
3867
|
+
.withIsVisibleFunction(ctx => (this.hideActionsForRowWithDefaultLocalization(ctx) ? of(false) : this.formStateDisabled$.pipe(map(v => !v))))
|
|
3788
3868
|
.withIsEnabledFunction(() => this.isEnabled$);
|
|
3789
3869
|
deleteAction.button.withLabel(null).withIcon('pi pi-trash');
|
|
3790
3870
|
this.actions.push(deleteAction);
|
|
@@ -3823,6 +3903,17 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
3823
3903
|
}
|
|
3824
3904
|
});
|
|
3825
3905
|
}
|
|
3906
|
+
onRowReorder(event) {
|
|
3907
|
+
if (event.dragIndex === undefined || event.dropIndex === undefined)
|
|
3908
|
+
return;
|
|
3909
|
+
// update formControl
|
|
3910
|
+
const newValue = [...this.formControl.value];
|
|
3911
|
+
const draggedItem = newValue[event.dragIndex];
|
|
3912
|
+
newValue.splice(event.dragIndex, 1);
|
|
3913
|
+
newValue.splice(event.dropIndex, 0, draggedItem);
|
|
3914
|
+
this.formControl.setValue(newValue);
|
|
3915
|
+
this.descriptor.nextEvent(FormFieldEventTypeEnum.RowReorder, this, { dragIndex: event.dragIndex, dropIndex: event.dropIndex });
|
|
3916
|
+
}
|
|
3826
3917
|
ngAfterViewInit() {
|
|
3827
3918
|
this.descriptor.nextEvent(FormFieldEventTypeEnum.ComponentLifecycle, this, {
|
|
3828
3919
|
eventSubtype: FormFieldEventComponentSubtype.ON_VIEW_INIT
|
|
@@ -3843,18 +3934,17 @@ class FormlyFieldTableDialogFormComponent extends ACommonsFormlyFieldType {
|
|
|
3843
3934
|
return false;
|
|
3844
3935
|
}
|
|
3845
3936
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTableDialogFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3846
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3937
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", providers: [provideViewContainer(false)], usesInheritance: true, ngImport: i0, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance", "rowReorder"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3847
3938
|
}
|
|
3848
3939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTableDialogFormComponent, decorators: [{
|
|
3849
3940
|
type: Component,
|
|
3850
|
-
args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, ActionComponent, ActionTableComponent, TemplateDirective], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
3941
|
+
args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, ActionComponent, ActionTableComponent, TemplateDirective, AsyncPipe], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-action-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items()\" [actions]=\"actions\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @for (action of toolbarRightActions; track action) {\n <mng-action [action]=\"action\"></mng-action>\n }\n </div>\n </ng-template>\n</mng-action-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
3851
3942
|
}] });
|
|
3852
3943
|
|
|
3853
3944
|
class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType {
|
|
3854
3945
|
constructor() {
|
|
3855
3946
|
super(...arguments);
|
|
3856
3947
|
this.injector = inject(Injector);
|
|
3857
|
-
this.destroyRef = inject(DestroyRef);
|
|
3858
3948
|
this.logger = inject(LoggerService).create('FormlyFieldTableDialogMultiselectComponent');
|
|
3859
3949
|
this.items = signal([]);
|
|
3860
3950
|
this.addItems = signal({ data: [], totalCount: 0 });
|
|
@@ -3866,6 +3956,7 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
3866
3956
|
this.hasAddAction = false;
|
|
3867
3957
|
this.hasDeleteAction = false;
|
|
3868
3958
|
this.searchDebounceSubject = new Subject();
|
|
3959
|
+
this.disableRowReorder = toSignal(this.formStateDisabled$);
|
|
3869
3960
|
}
|
|
3870
3961
|
ngOnInit() {
|
|
3871
3962
|
super.ngOnInit();
|
|
@@ -4007,12 +4098,23 @@ class FormlyFieldTableDialogMultiselectComponent extends ACommonsFormlyFieldType
|
|
|
4007
4098
|
const query = event.target.value;
|
|
4008
4099
|
this.searchDebounceSubject.next(query);
|
|
4009
4100
|
}
|
|
4101
|
+
onRowReorder(event) {
|
|
4102
|
+
if (event.dragIndex === undefined || event.dropIndex === undefined)
|
|
4103
|
+
return;
|
|
4104
|
+
// update formControl
|
|
4105
|
+
const newValue = [...this.formControl.value];
|
|
4106
|
+
const draggedItem = newValue[event.dragIndex];
|
|
4107
|
+
newValue.splice(event.dragIndex, 1);
|
|
4108
|
+
newValue.splice(event.dropIndex, 0, draggedItem);
|
|
4109
|
+
this.formControl.setValue(newValue);
|
|
4110
|
+
this.descriptor.nextEvent(FormFieldEventTypeEnum.RowReorder, this, { dragIndex: event.dragIndex, dropIndex: event.dropIndex });
|
|
4111
|
+
}
|
|
4010
4112
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4011
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\">\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 }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\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 }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\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 }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\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\" mngDialogKeydownHandler>\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 #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\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)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\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: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "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$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: FormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", providers: [provideViewContainer(false)], viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\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 }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\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 }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\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 }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\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\" mngDialogKeydownHandler>\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 #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\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)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\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: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: TableComponent, selector: "mng-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "cellClickEnabled", "selectionMode", "selectionEnabled", "rowReorderEnabled", "columnLastMinWidth", "captionComponent", "columnCustomLastComponent", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnCustomLastComponentInstance", "rowReorder"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i7$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "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$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i7.Ripple, selector: "[pRipple]" }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4012
4114
|
}
|
|
4013
4115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: FormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
4014
4116
|
type: Component,
|
|
4015
|
-
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\">\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 }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\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 }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\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 }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\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\" mngDialogKeydownHandler>\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 #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\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)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\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"] }]
|
|
4117
|
+
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, AsyncPipe, TableComponent, DialogModule, ButtonModule, RippleModule, TemplateDirective, InputTextModule, NgStyle], providers: [provideViewContainer(false)], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"items()\" [rowReorderEnabled]=\"!disableRowReorder()\" (rowReorder)=\"onRowReorder($event)\">\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 }}\n @if (props.required && props['hideRequiredMarker'] !== true) {\n <span>*</span>\n }\n </label>\n @if (hasAddAction && !options.formState?.disabled) {\n <button\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 }\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnCustomLast\" let-item=\"rowItem\">\n @if (hasDeleteAction && !options.formState?.disabled) {\n <button\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 }\n </ng-template>\n</mng-table>\n\n@if (hasAddAction) {\n <p-dialog\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\" mngDialogKeydownHandler>\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 #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [result]=\"addItems()\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading()\"\n (selectionChange)=\"onSelectionChange($event)\">\n @if (descriptor.searchEnabled) {\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n }\n </mng-table>\n </div>\n </div>\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)=\"onAddItems()\"\n [loading]=\"dialogIsLoading()\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n </p-dialog>\n}\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"] }]
|
|
4016
4118
|
}], propDecorators: { addTableComponent: [{
|
|
4017
4119
|
type: ViewChild,
|
|
4018
4120
|
args: ['addTableComponent']
|
|
@@ -4084,7 +4186,6 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4084
4186
|
this.dpFormControl = new FormControl();
|
|
4085
4187
|
this.styleClass = signal('');
|
|
4086
4188
|
this.moduleConfig = inject(COMMONS_MODULE_CONFIG_IT, { optional: true });
|
|
4087
|
-
this.destroyRef = inject(DestroyRef);
|
|
4088
4189
|
this.dateTimeInUtc = this.moduleConfig?.serialization?.dateTimeInUtc ?? false;
|
|
4089
4190
|
this.dateTimeWithTimezone = this.moduleConfig?.serialization?.dateTimeWithTimezone ?? true;
|
|
4090
4191
|
this.dateTimeWithMillis = this.moduleConfig?.serialization?.dateTimeWithMillis ?? true;
|
|
@@ -4523,7 +4624,7 @@ class TableviewComponent {
|
|
|
4523
4624
|
return actions.filter(action => (action.positionTableviewCategories?.includes(TableviewActionDefaultCategories.READ) ?? true) && actionPositions.includes(action.position));
|
|
4524
4625
|
}
|
|
4525
4626
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: TableviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4526
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideViewContainer()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-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 @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4627
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: TableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: { classPropertyName: "descriptor", publicName: "descriptor", isSignal: true, isRequired: true, transformFunction: null }, dataProvider: { classPropertyName: "dataProvider", publicName: "dataProvider", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideViewContainer()], queries: [{ propertyName: "templates", predicate: TemplateDirective, isSignal: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <div class=\"card\">\n @if (toolbarLeftActions().length > 0 || toolbarRightActions().length > 0) {\n <p-toolbar styleClass=\"mb-4\">\n <ng-template pTemplate=\"left\">\n @for (action of toolbarLeftActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @for (action of toolbarRightActions(); track action) {\n <mng-action [action]=\"action\" [dataListParams]=\"tableParams()\" [hostComponent]=\"this\" [selectedItems]=\"selectedItems()\"></mng-action>\n }\n </ng-template>\n </p-toolbar>\n }\n\n <mng-action-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 @if (rowExpandTemplate()) {\n <ng-template mngTemplate=\"rowExpandContent\" let-item=\"rowItem\">\n <ng-container *ngTemplateOutlet=\"rowExpandTemplate(); context: {rowItem: item}\"></ng-container>\n </ng-template>\n }\n\n @if (footerTemplate()) {\n <ng-template mngTemplate=\"footer\" let-data=\"data\" let-totalCount=\"totalCount\">\n <ng-container *ngTemplateOutlet=\"footerTemplate(); context: {data, totalCount}\"></ng-container>\n </ng-template>\n }\n </mng-action-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i2$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataListParams", "dataProvider", "hostComponent", "route", "disabled", "loading", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: ActionTableComponent, selector: "mng-action-table", inputs: ["descriptor", "items", "result", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "globalFilterFields", "rowReorderEnabled", "actions", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "selectionChange", "captionComponentInstance", "columnActionComponentInstance", "rowReorder"] }, { kind: "directive", type: TemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4527
4628
|
}
|
|
4528
4629
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: TableviewComponent, decorators: [{
|
|
4529
4630
|
type: Component,
|
|
@@ -4767,5 +4868,5 @@ function withTableview(config) {
|
|
|
4767
4868
|
* Generated bundle index. Do not edit.
|
|
4768
4869
|
*/
|
|
4769
4870
|
|
|
4770
|
-
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionInstanceStateEnum, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, FormEditorComponent, FormEditorService, FormlyFieldActionComponent, FormlyFieldAutocompleteComponent, FormlyFieldCustomComponent, FormlyFieldDropdownComponent, FormlyFieldFieldsetComponent, FormlyFieldInputComponent, FormlyFieldLabelComponent, FormlyFieldLookupDialogComponent, FormlyFieldNoLabelWrapperComponent, FormlyFieldTableDialogFormComponent, FormlyFieldTableDialogMultiselectComponent, FormlyFieldTabsComponent, FormlyFieldWrapperComponent, NavigationService, RootActionExecutorService, TableviewComponent, TableviewRouteBuilder, TableviewRouteComponent, ViewContainer, actionNotificationError, actionNotificationSuccess, addAsyncValidationsToFormlyField, addValidationsToFormlyField, calculateTableColumnActionWidth, commonsFormlyConfigProvider, createFormlyConfigFromDescriptor, createFormlyField, createFormlyFields, createFormlyGroupType, createFormlyLocalizationsTab, createFormlyTabType, createFormlyValidation, createTableviewLazyRoute, createTableviewRoute, emailValidationName, emailValidator, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getI18nActionEditorTitleAsync, getI18nActionParams, getI18nActionParamsAsync, getI18nActionTitleAsync, getI18nForAction, getI18nForActionAsync, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, maxDateValidationName, maxDateValidator, minDateValidationName, minDateValidator, populateI18nActionParams, provideActionExecutor, provideFormComponent, provideViewContainer, unsavedChangesGuard, withTableview };
|
|
4871
|
+
export { ACTION_EDITOR_COMPONENT_IT, ActionComponent, ActionContext, ActionDataProviderSource, ActionEditorComponent, ActionErrorMapperService, ActionExecutorService, ActionInstance, ActionInstanceStateEnum, ActionTableComponent, COMMONS_TABLEVIEW_FEATURE_CONFIG_IT, ComponentActionExecutorService, DataLanguageDropdownComponent, DefaultActionErrorMapperService, DefaultDataProviderExecutor, FormEditorComponent, FormEditorService, FormlyFieldActionComponent, FormlyFieldAutocompleteComponent, FormlyFieldCustomComponent, FormlyFieldDropdownComponent, FormlyFieldFieldsetComponent, FormlyFieldInputComponent, FormlyFieldLabelComponent, FormlyFieldLookupDialogComponent, FormlyFieldNoLabelWrapperComponent, FormlyFieldTableDialogFormComponent, FormlyFieldTableDialogMultiselectComponent, FormlyFieldTabsComponent, FormlyFieldWrapperComponent, NavigationService, RootActionExecutorService, TableviewComponent, TableviewRouteBuilder, TableviewRouteComponent, ViewContainer, actionNotificationError, actionNotificationSuccess, addAsyncValidationsToFormlyField, addValidationsToFormlyField, calculateTableColumnActionWidth, commonsFormlyConfigProvider, createFormlyConfigFromDescriptor, createFormlyField, createFormlyFields, createFormlyGroupType, createFormlyLocalizationsTab, createFormlyTabType, createFormlyValidation, createTableviewLazyRoute, createTableviewRoute, emailValidationName, emailValidator, formlyTypesConfig, formlyWrappersConfig, getActionButtonRoundedWidth, getEmailValidationMessage, getFormEditorInfoMessage, getFormEditorWarningMessage, getFormlyValidationMessages, getI18nActionEditorTitleAsync, getI18nActionParams, getI18nActionParamsAsync, getI18nActionTitleAsync, getI18nForAction, getI18nForActionAsync, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTableCellPaddingX, getTextPatternValidationMessage, maxDateValidationName, maxDateValidator, minDateValidationName, minDateValidator, populateI18nActionParams, provideActionExecutor, provideFormComponent, provideViewContainer, unsavedChangesGuard, withTableview };
|
|
4771
4872
|
//# sourceMappingURL=mediusinc-mng-commons-tableview.mjs.map
|