@mediusinc/mng-commons 0.4.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/api/services/api.abstract.service.mjs +15 -4
- package/esm2020/lib/api/services/crud-api.abstract.service.mjs +3 -3
- package/esm2020/lib/components/action/action.component.mjs +52 -8
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +25 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +12 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +26 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.mjs +17 -0
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +8 -4
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/index.mjs +2 -1
- package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +3 -3
- package/esm2020/lib/config/formly.config.mjs +7 -2
- package/esm2020/lib/descriptors/action.descriptor.mjs +34 -6
- package/esm2020/lib/descriptors/field.descriptor.mjs +48 -10
- package/esm2020/lib/descriptors/table.descriptor.mjs +3 -13
- package/esm2020/lib/mng-commons.module.mjs +5 -2
- package/esm2020/lib/pipes/enum.pipe.mjs +2 -2
- package/esm2020/lib/services/action-executor.service.mjs +28 -5
- package/esm2020/lib/utils/editor-formly.util.mjs +5 -5
- package/fesm2015/mediusinc-mng-commons.mjs +278 -60
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +270 -59
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/services/api.abstract.service.d.ts +1 -1
- package/lib/api/services/crud-api.abstract.service.d.ts +8 -8
- package/lib/components/action/action.component.d.ts +13 -2
- package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +4 -2
- package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +7 -1
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +4 -2
- package/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.d.ts +6 -0
- package/lib/components/form/formly/fields/index.d.ts +1 -0
- package/lib/descriptors/action.descriptor.d.ts +28 -3
- package/lib/descriptors/field.descriptor.d.ts +26 -12
- package/lib/descriptors/table.descriptor.d.ts +0 -1
- package/lib/mng-commons.module.d.ts +58 -57
- package/lib/pipes/enum.pipe.d.ts +2 -1
- package/package.json +1 -1
- package/scss/mng-overrides/_layout_dialog.scss +44 -14
- package/scss/mng-overrides/_theme_dialog.scss +2 -3
|
@@ -72,7 +72,7 @@ import * as i4$3 from 'primeng/toolbar';
|
|
|
72
72
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
73
73
|
import * as i9 from 'primeng/tooltip';
|
|
74
74
|
import { TooltipModule } from 'primeng/tooltip';
|
|
75
|
-
import { throwError, of, Subject, Observable, from, combineLatest, tap, BehaviorSubject, ReplaySubject,
|
|
75
|
+
import { throwError, of, Subject, Observable, from, combineLatest, tap, BehaviorSubject, ReplaySubject, distinctUntilChanged, switchMap, mergeMap as mergeMap$1 } from 'rxjs';
|
|
76
76
|
import 'reflect-metadata';
|
|
77
77
|
import { map, mergeMap, first, catchError, filter, finalize, startWith } from 'rxjs/operators';
|
|
78
78
|
import * as i4$1 from '@angular/platform-browser';
|
|
@@ -526,6 +526,9 @@ class ActionDescriptor {
|
|
|
526
526
|
get runConfirmationRejectTitle() {
|
|
527
527
|
return this._runConfirmationRejectTitle;
|
|
528
528
|
}
|
|
529
|
+
get runConfirmationConfigMapFn() {
|
|
530
|
+
return this._runConfirmationConfigMapFn;
|
|
531
|
+
}
|
|
529
532
|
get hasRunNotificationSuccess() {
|
|
530
533
|
return this._hasRunNotificationSuccess;
|
|
531
534
|
}
|
|
@@ -617,13 +620,24 @@ class ActionDescriptor {
|
|
|
617
620
|
this._position = position;
|
|
618
621
|
return this;
|
|
619
622
|
}
|
|
620
|
-
|
|
623
|
+
/**
|
|
624
|
+
* Add a confirmation dialogue to the action
|
|
625
|
+
* @param icon the icon to display on the confirmation dialogue
|
|
626
|
+
* @param title the title of the confirmation dialogue
|
|
627
|
+
* @param message the message on the confirmation dialogue
|
|
628
|
+
* @param acceptTitle the title of the accepting button
|
|
629
|
+
* @param rejectTitle the title of the rejecting button
|
|
630
|
+
* @param runConfirmationConfigMapFn function used to generate the confirmation dialogue. **WARNING** changing the *accept* and *reject* methods of the *confirmConfig* parameter
|
|
631
|
+
* may lead to unexpected behaviour
|
|
632
|
+
*/
|
|
633
|
+
withRunConfirmation(icon = 'pi pi-exclamation-triangle', title, message, acceptTitle, rejectTitle, runConfirmationConfigMapFn) {
|
|
621
634
|
this._hasRunConfirmation = true;
|
|
622
635
|
this._runConfirmationIcon = icon;
|
|
623
636
|
this._runConfirmationTitle = title;
|
|
624
637
|
this._runConfirmationMessage = message;
|
|
625
638
|
this._runConfirmationAcceptTitle = acceptTitle;
|
|
626
639
|
this._runConfirmationRejectTitle = rejectTitle;
|
|
640
|
+
this._runConfirmationConfigMapFn = runConfirmationConfigMapFn;
|
|
627
641
|
return this;
|
|
628
642
|
}
|
|
629
643
|
withRunNotificationSuccess(title, message, hasNotification = true) {
|
|
@@ -659,7 +673,7 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
659
673
|
this._editorActions = [];
|
|
660
674
|
this._editorTitle = undefined;
|
|
661
675
|
this._hasFetchNotificationSuccess = false;
|
|
662
|
-
this.
|
|
676
|
+
this._dialogSize = ActionEditorDescriptor.DialogSizeEnum.Normal;
|
|
663
677
|
this._type = ActionTypeEnum.Editor;
|
|
664
678
|
this._editorDescriptor = editorDescriptor;
|
|
665
679
|
this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel));
|
|
@@ -670,6 +684,9 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
670
684
|
get editorDescriptor() {
|
|
671
685
|
return this._editorDescriptor;
|
|
672
686
|
}
|
|
687
|
+
get dialogSize() {
|
|
688
|
+
return this._dialogSize;
|
|
689
|
+
}
|
|
673
690
|
get dialogClassName() {
|
|
674
691
|
return this._dialogClassName;
|
|
675
692
|
}
|
|
@@ -722,6 +739,10 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
722
739
|
this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
723
740
|
return this;
|
|
724
741
|
}
|
|
742
|
+
withDialogSize(size = ActionEditorDescriptor.DialogSizeEnum.Normal) {
|
|
743
|
+
this._dialogSize = size;
|
|
744
|
+
return this;
|
|
745
|
+
}
|
|
725
746
|
withDialogClassName(className) {
|
|
726
747
|
this._dialogClassName = className;
|
|
727
748
|
return this;
|
|
@@ -756,6 +777,16 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
756
777
|
return this;
|
|
757
778
|
}
|
|
758
779
|
}
|
|
780
|
+
(function (ActionEditorDescriptor) {
|
|
781
|
+
let DialogSizeEnum;
|
|
782
|
+
(function (DialogSizeEnum) {
|
|
783
|
+
DialogSizeEnum[DialogSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
784
|
+
DialogSizeEnum[DialogSizeEnum["Small"] = 1] = "Small";
|
|
785
|
+
DialogSizeEnum[DialogSizeEnum["Normal"] = 2] = "Normal";
|
|
786
|
+
DialogSizeEnum[DialogSizeEnum["Large"] = 3] = "Large";
|
|
787
|
+
DialogSizeEnum[DialogSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
788
|
+
})(DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum || (ActionEditorDescriptor.DialogSizeEnum = {}));
|
|
789
|
+
})(ActionEditorDescriptor || (ActionEditorDescriptor = {}));
|
|
759
790
|
class ActionEditorSubmitDescriptor extends ActionDescriptor {
|
|
760
791
|
constructor(editorAction, submitType = ActionEditorSubmitDescriptor.TypeEnum.Submit) {
|
|
761
792
|
super(editorAction.model, submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'submit' : 'cancel');
|
|
@@ -787,7 +818,6 @@ class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
|
|
|
787
818
|
: throwError(new Error(`Data provider fetch function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
|
|
788
819
|
});
|
|
789
820
|
this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
|
|
790
|
-
this.withDialogClassName('mng-details-dynamic-dialog');
|
|
791
821
|
}
|
|
792
822
|
withServiceType(serviceType) {
|
|
793
823
|
return this.withServiceFetchFunction(serviceType);
|
|
@@ -810,7 +840,6 @@ class ActionEditorAddDescriptor extends ActionEditorDescriptor {
|
|
|
810
840
|
this.withSubmitFunction(ctx => { var _a, _b; return ((_a = ctx.dataProvider) === null || _a === void 0 ? void 0 : _a.create) ? ctx.dataProvider.create((_b = ctx.data) === null || _b === void 0 ? void 0 : _b.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)); });
|
|
811
841
|
this.withLevel(ActionLevelEnum.Success);
|
|
812
842
|
this.withIcon('pi pi-plus');
|
|
813
|
-
this.withDialogClassName('mng-details-dynamic-dialog');
|
|
814
843
|
}
|
|
815
844
|
withServiceType(serviceType) {
|
|
816
845
|
return this.withServiceSubmitFunction(serviceType);
|
|
@@ -847,7 +876,6 @@ class ActionEditorEditDescriptor extends ActionEditorDescriptor {
|
|
|
847
876
|
: throwError(new Error(`Data provider update function or item id ${(_d = ctx.data) === null || _d === void 0 ? void 0 : _d.itemId} is missing.`));
|
|
848
877
|
});
|
|
849
878
|
this.withIcon('pi pi-pencil');
|
|
850
|
-
this.withDialogClassName('mng-details-dynamic-dialog');
|
|
851
879
|
}
|
|
852
880
|
withServiceType(serviceType) {
|
|
853
881
|
return this.withServiceSubmitFunction(serviceType);
|
|
@@ -1681,6 +1709,9 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1681
1709
|
get className() {
|
|
1682
1710
|
return this._className;
|
|
1683
1711
|
}
|
|
1712
|
+
get fieldClassName() {
|
|
1713
|
+
return this._fieldClassName;
|
|
1714
|
+
}
|
|
1684
1715
|
get labelClassName() {
|
|
1685
1716
|
return this._labelClassName;
|
|
1686
1717
|
}
|
|
@@ -1742,10 +1773,11 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1742
1773
|
this._validators.push(new FieldValidator(name, expression, message));
|
|
1743
1774
|
return this;
|
|
1744
1775
|
}
|
|
1745
|
-
withClassName(className, labelClassName = '', inputClassName = '') {
|
|
1776
|
+
withClassName(className, labelClassName = '', inputClassName = '', fieldClassName) {
|
|
1746
1777
|
this._className = className;
|
|
1747
1778
|
this._labelClassName = labelClassName;
|
|
1748
1779
|
this._inputClassName = inputClassName;
|
|
1780
|
+
this._fieldClassName = fieldClassName;
|
|
1749
1781
|
return this;
|
|
1750
1782
|
}
|
|
1751
1783
|
withSize(size = FieldDescriptor.SizeEnum.Normal) {
|
|
@@ -1854,6 +1886,10 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1854
1886
|
this._fieldType = FieldInputDescriptor.TypeEnum.Hidden;
|
|
1855
1887
|
return this;
|
|
1856
1888
|
}
|
|
1889
|
+
asLabel() {
|
|
1890
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Label;
|
|
1891
|
+
return this;
|
|
1892
|
+
}
|
|
1857
1893
|
asText(minLength, maxLength, pattern, isEmail) {
|
|
1858
1894
|
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1859
1895
|
this._minLength = minLength;
|
|
@@ -1949,14 +1985,15 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1949
1985
|
let TypeEnum;
|
|
1950
1986
|
(function (TypeEnum) {
|
|
1951
1987
|
TypeEnum[TypeEnum["Hidden"] = 0] = "Hidden";
|
|
1952
|
-
TypeEnum[TypeEnum["
|
|
1953
|
-
TypeEnum[TypeEnum["
|
|
1954
|
-
TypeEnum[TypeEnum["
|
|
1955
|
-
TypeEnum[TypeEnum["
|
|
1956
|
-
TypeEnum[TypeEnum["
|
|
1957
|
-
TypeEnum[TypeEnum["
|
|
1958
|
-
TypeEnum[TypeEnum["
|
|
1959
|
-
TypeEnum[TypeEnum["
|
|
1988
|
+
TypeEnum[TypeEnum["Label"] = 1] = "Label";
|
|
1989
|
+
TypeEnum[TypeEnum["Text"] = 2] = "Text";
|
|
1990
|
+
TypeEnum[TypeEnum["Textarea"] = 3] = "Textarea";
|
|
1991
|
+
TypeEnum[TypeEnum["Number"] = 4] = "Number";
|
|
1992
|
+
TypeEnum[TypeEnum["Switch"] = 5] = "Switch";
|
|
1993
|
+
TypeEnum[TypeEnum["Radio"] = 6] = "Radio";
|
|
1994
|
+
TypeEnum[TypeEnum["Datepicker"] = 7] = "Datepicker";
|
|
1995
|
+
TypeEnum[TypeEnum["Mask"] = 8] = "Mask";
|
|
1996
|
+
TypeEnum[TypeEnum["Custom"] = 9] = "Custom";
|
|
1960
1997
|
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
1961
1998
|
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
1962
1999
|
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
@@ -2114,6 +2151,16 @@ class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
|
2114
2151
|
}
|
|
2115
2152
|
return this;
|
|
2116
2153
|
}
|
|
2154
|
+
withDefaultValueEnum(defaultValue) {
|
|
2155
|
+
const defaultOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, defaultValue) : defaultValue;
|
|
2156
|
+
if (defaultOptionValue) {
|
|
2157
|
+
const option = this._optionEnumValues.find(o => o.value === defaultOptionValue);
|
|
2158
|
+
if (option) {
|
|
2159
|
+
this.withDefaultValue(option);
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
return this;
|
|
2163
|
+
}
|
|
2117
2164
|
asAutocomplete(openOnFocus = true) {
|
|
2118
2165
|
super.asAutocomplete(openOnFocus, true);
|
|
2119
2166
|
return this;
|
|
@@ -2336,6 +2383,13 @@ class FieldTabGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2336
2383
|
class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
2337
2384
|
constructor(editor, name) {
|
|
2338
2385
|
super(editor, name);
|
|
2386
|
+
this._type = FieldGroupDescriptor.TypeEnum.Fieldset;
|
|
2387
|
+
if (this._default) {
|
|
2388
|
+
this.asLogical();
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
get type() {
|
|
2392
|
+
return this._type;
|
|
2339
2393
|
}
|
|
2340
2394
|
get fields() {
|
|
2341
2395
|
return this._fields;
|
|
@@ -2347,13 +2401,25 @@ class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2347
2401
|
this._fields.push(field);
|
|
2348
2402
|
return this;
|
|
2349
2403
|
}
|
|
2404
|
+
asLogical() {
|
|
2405
|
+
this._type = FieldGroupDescriptor.TypeEnum.Logical;
|
|
2406
|
+
return this;
|
|
2407
|
+
}
|
|
2350
2408
|
copy() {
|
|
2351
2409
|
const group = new FieldGroupDescriptor(this._editor, this.name.substring(this.baseName.length));
|
|
2410
|
+
group._type = this._type;
|
|
2352
2411
|
group._title = this._title;
|
|
2353
2412
|
group._fields = this.fields.map(f => f.copy());
|
|
2354
2413
|
return group;
|
|
2355
2414
|
}
|
|
2356
2415
|
}
|
|
2416
|
+
(function (FieldGroupDescriptor) {
|
|
2417
|
+
let TypeEnum;
|
|
2418
|
+
(function (TypeEnum) {
|
|
2419
|
+
TypeEnum[TypeEnum["Fieldset"] = 0] = "Fieldset";
|
|
2420
|
+
TypeEnum[TypeEnum["Logical"] = 1] = "Logical";
|
|
2421
|
+
})(TypeEnum = FieldGroupDescriptor.TypeEnum || (FieldGroupDescriptor.TypeEnum = {}));
|
|
2422
|
+
})(FieldGroupDescriptor || (FieldGroupDescriptor = {}));
|
|
2357
2423
|
|
|
2358
2424
|
class FieldValidator {
|
|
2359
2425
|
constructor(name, expression, message, options) {
|
|
@@ -2412,6 +2478,7 @@ class ModelDescriptor {
|
|
|
2412
2478
|
|
|
2413
2479
|
class TableDescriptor {
|
|
2414
2480
|
constructor(modelType, idProperty, titleProperty) {
|
|
2481
|
+
var _a;
|
|
2415
2482
|
this._filterDisplay = TableDescriptor.FilterDisplayEnum.Menu;
|
|
2416
2483
|
this._paginationMode = TableDescriptor.PaginationModeEnum.Pagination;
|
|
2417
2484
|
this._columns = [];
|
|
@@ -2422,6 +2489,7 @@ class TableDescriptor {
|
|
|
2422
2489
|
this._rowHeight = 45;
|
|
2423
2490
|
this._tableFullHeightOffset = 315;
|
|
2424
2491
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
2492
|
+
this._dataKeyProperty = (_a = idProperty !== null && idProperty !== void 0 ? idProperty : ModelUtil.findIdAttribute(modelType)) !== null && _a !== void 0 ? _a : undefined;
|
|
2425
2493
|
}
|
|
2426
2494
|
get filterDisplay() {
|
|
2427
2495
|
return this._filterDisplay;
|
|
@@ -2461,48 +2529,41 @@ class TableDescriptor {
|
|
|
2461
2529
|
}
|
|
2462
2530
|
addColumnDescriptor(column) {
|
|
2463
2531
|
this._columns.push(column);
|
|
2464
|
-
this.setDataKeyFromColumn();
|
|
2465
2532
|
return this;
|
|
2466
2533
|
}
|
|
2467
2534
|
addColumn(property) {
|
|
2468
2535
|
const column = new ColumnDescriptor(this, property);
|
|
2469
2536
|
this._columns.push(column);
|
|
2470
|
-
this.setDataKeyFromColumn();
|
|
2471
2537
|
return column;
|
|
2472
2538
|
}
|
|
2473
2539
|
addColumnNumber(property, displayFormat) {
|
|
2474
2540
|
const column = new ColumnDescriptor(this, property);
|
|
2475
2541
|
column.asNumber(displayFormat);
|
|
2476
2542
|
this._columns.push(column);
|
|
2477
|
-
this.setDataKeyFromColumn();
|
|
2478
2543
|
return column;
|
|
2479
2544
|
}
|
|
2480
2545
|
addColumnDate(property, displayFormat) {
|
|
2481
2546
|
const column = new ColumnDescriptor(this, property);
|
|
2482
2547
|
column.asDate(displayFormat);
|
|
2483
2548
|
this._columns.push(column);
|
|
2484
|
-
this.setDataKeyFromColumn();
|
|
2485
2549
|
return column;
|
|
2486
2550
|
}
|
|
2487
2551
|
addColumnBoolean(property, yes, no, asIcon = false) {
|
|
2488
2552
|
const column = new ColumnDescriptor(this, property);
|
|
2489
2553
|
column.asBoolean(yes, no, asIcon);
|
|
2490
2554
|
this._columns.push(column);
|
|
2491
|
-
this.setDataKeyFromColumn();
|
|
2492
2555
|
return column;
|
|
2493
2556
|
}
|
|
2494
2557
|
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2495
2558
|
const column = new ColumnDescriptor(this, property);
|
|
2496
2559
|
column.asEnum(enumType, nameAsValue, titlePath);
|
|
2497
2560
|
this._columns.push(column);
|
|
2498
|
-
this.setDataKeyFromColumn();
|
|
2499
2561
|
return column;
|
|
2500
2562
|
}
|
|
2501
2563
|
addColumnCustomComponent(property, customComponentType) {
|
|
2502
2564
|
const column = new ColumnDescriptor(this, property);
|
|
2503
2565
|
column.asCustomComponent(customComponentType);
|
|
2504
2566
|
this._columns.push(column);
|
|
2505
|
-
this.setDataKeyFromColumn();
|
|
2506
2567
|
return column;
|
|
2507
2568
|
}
|
|
2508
2569
|
withFilterDisplay(filterDisplayType) {
|
|
@@ -2550,11 +2611,6 @@ class TableDescriptor {
|
|
|
2550
2611
|
descriptor._filterDisplay = this._filterDisplay;
|
|
2551
2612
|
return descriptor;
|
|
2552
2613
|
}
|
|
2553
|
-
setDataKeyFromColumn() {
|
|
2554
|
-
if (!this._dataKeyProperty && this._columns.length === 1) {
|
|
2555
|
-
this._dataKeyProperty = this._columns[0].property;
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
2614
|
}
|
|
2559
2615
|
(function (TableDescriptor) {
|
|
2560
2616
|
let PaginationModeEnum;
|
|
@@ -2789,16 +2845,16 @@ class EditorFormlyUtil {
|
|
|
2789
2845
|
// assign default field width through entire row
|
|
2790
2846
|
className = 'col-12';
|
|
2791
2847
|
}
|
|
2792
|
-
if (className.indexOf('col-') < 0) {
|
|
2793
|
-
// class was provided, but does not contain col- definition
|
|
2794
|
-
className = `col-12 ${descriptor.className}`;
|
|
2795
|
-
}
|
|
2796
2848
|
field.className = className;
|
|
2797
2849
|
field.templateOptions['descriptor'] = descriptor;
|
|
2798
2850
|
if (descriptor instanceof FieldInputDescriptor) {
|
|
2799
2851
|
switch (descriptor.fieldType) {
|
|
2800
2852
|
case FieldInputDescriptor.TypeEnum.Hidden:
|
|
2801
2853
|
break;
|
|
2854
|
+
case FieldInputDescriptor.TypeEnum.Label:
|
|
2855
|
+
field.type = 'label';
|
|
2856
|
+
delete field.key;
|
|
2857
|
+
break;
|
|
2802
2858
|
case FieldInputDescriptor.TypeEnum.Textarea:
|
|
2803
2859
|
field.type = 'textarea';
|
|
2804
2860
|
break;
|
|
@@ -3920,7 +3976,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
3920
3976
|
|
|
3921
3977
|
class MngEnumPipe {
|
|
3922
3978
|
transform(value, enumObj, i18nPath, nameAsValue = false) {
|
|
3923
|
-
if (!value || !enumObj) {
|
|
3979
|
+
if (!value || (typeof value !== 'number' && typeof value !== 'string') || !enumObj) {
|
|
3924
3980
|
return value;
|
|
3925
3981
|
}
|
|
3926
3982
|
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);
|
|
@@ -4100,7 +4156,7 @@ class MngActionExecutorService {
|
|
|
4100
4156
|
throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);
|
|
4101
4157
|
}
|
|
4102
4158
|
const srcConfirmComponent = sourceComponent;
|
|
4103
|
-
|
|
4159
|
+
let confirmParams = {
|
|
4104
4160
|
key: srcConfirmComponent.getConfirmationServiceInstanceKey(action),
|
|
4105
4161
|
acceptVisible: false,
|
|
4106
4162
|
rejectVisible: false
|
|
@@ -4146,6 +4202,9 @@ class MngActionExecutorService {
|
|
|
4146
4202
|
confirmParams.reject = () => {
|
|
4147
4203
|
observer.error(new ActionRunResult(context, undefined, new ActionError(null, true)));
|
|
4148
4204
|
};
|
|
4205
|
+
if (action.runConfirmationConfigMapFn) {
|
|
4206
|
+
confirmParams = action.runConfirmationConfigMapFn(context, confirmParams);
|
|
4207
|
+
}
|
|
4149
4208
|
srcConfirmComponent.getConfirmationService().confirm(confirmParams);
|
|
4150
4209
|
});
|
|
4151
4210
|
return observable;
|
|
@@ -4263,17 +4322,38 @@ class MngActionExecutorService {
|
|
|
4263
4322
|
* @param sourceComponent Source activation component.
|
|
4264
4323
|
*/
|
|
4265
4324
|
activateAction(action, itemId, item, actionData, viewContainer, sourceComponent) {
|
|
4325
|
+
var _a;
|
|
4266
4326
|
if (action.type === ActionTypeEnum.Editor) {
|
|
4267
4327
|
let dialogComponent = this.defaultEditorDialogComponent;
|
|
4268
4328
|
let dialogClassName = '';
|
|
4269
4329
|
if (action instanceof ActionEditorDescriptor) {
|
|
4330
|
+
dialogClassName = (_a = action.dialogClassName) !== null && _a !== void 0 ? _a : 'mng-action-editor-dialog';
|
|
4331
|
+
let dialogSizeClassName = '';
|
|
4332
|
+
switch (action.dialogSize) {
|
|
4333
|
+
case ActionEditorDescriptor.DialogSizeEnum.ExtraSmall:
|
|
4334
|
+
dialogSizeClassName = 'mng-action-editor-dialog-xs';
|
|
4335
|
+
break;
|
|
4336
|
+
case ActionEditorDescriptor.DialogSizeEnum.Small:
|
|
4337
|
+
dialogSizeClassName = 'mng-action-editor-dialog-sm';
|
|
4338
|
+
break;
|
|
4339
|
+
case ActionEditorDescriptor.DialogSizeEnum.Large:
|
|
4340
|
+
dialogSizeClassName = 'mng-action-editor-dialog-lg';
|
|
4341
|
+
break;
|
|
4342
|
+
case ActionEditorDescriptor.DialogSizeEnum.ExtraLarge:
|
|
4343
|
+
dialogSizeClassName = 'mng-action-editor-dialog-xl';
|
|
4344
|
+
break;
|
|
4345
|
+
case ActionEditorDescriptor.DialogSizeEnum.Normal:
|
|
4346
|
+
default:
|
|
4347
|
+
break;
|
|
4348
|
+
}
|
|
4349
|
+
if (dialogSizeClassName.length) {
|
|
4350
|
+
dialogClassName += ` ${dialogSizeClassName}`;
|
|
4351
|
+
}
|
|
4270
4352
|
if (action.editorComponent) {
|
|
4271
4353
|
dialogComponent = action.editorComponent;
|
|
4272
4354
|
}
|
|
4273
|
-
if (action.dialogClassName) {
|
|
4274
|
-
dialogClassName = action.dialogClassName;
|
|
4275
|
-
}
|
|
4276
4355
|
}
|
|
4356
|
+
console.log(dialogClassName);
|
|
4277
4357
|
const dialogConfig = {
|
|
4278
4358
|
data: {
|
|
4279
4359
|
action
|
|
@@ -4910,18 +4990,26 @@ class MngActionComponent {
|
|
|
4910
4990
|
this.loadingSubject = new ReplaySubject(1);
|
|
4911
4991
|
this.$loading = this.loadingSubject.asObservable();
|
|
4912
4992
|
this.cmpId = Math.random().toString(36).substring(2);
|
|
4993
|
+
this.isVisibleSubject = new ReplaySubject(1);
|
|
4994
|
+
this.$isVisible = this.isVisibleSubject.asObservable().pipe(distinctUntilChanged());
|
|
4995
|
+
this.isEnabledSubject = new ReplaySubject(1);
|
|
4996
|
+
this.$isEnabled = this.isEnabledSubject.asObservable().pipe(distinctUntilChanged());
|
|
4997
|
+
this.labelSubject = new ReplaySubject(1);
|
|
4998
|
+
this.$label = this.labelSubject.asObservable().pipe(distinctUntilChanged());
|
|
4999
|
+
this.tooltipSubject = new ReplaySubject(1);
|
|
5000
|
+
this.$tooltip = this.tooltipSubject.asObservable().pipe(distinctUntilChanged());
|
|
4913
5001
|
this.hasNoTitle = false;
|
|
4914
5002
|
this.loadingSubject.next(false);
|
|
4915
5003
|
}
|
|
4916
5004
|
ngOnInit() {
|
|
4917
|
-
var _a, _b
|
|
5005
|
+
var _a, _b;
|
|
4918
5006
|
this.viewContainer = (_b = (_a = this.viewContainerInit) !== null && _a !== void 0 ? _a : this.viewContainerService) !== null && _b !== void 0 ? _b : undefined;
|
|
4919
5007
|
this.hasNoTitle = this.action.title === null;
|
|
4920
|
-
|
|
4921
|
-
this
|
|
4922
|
-
this
|
|
4923
|
-
this
|
|
4924
|
-
this
|
|
5008
|
+
this.isEnabledSubject.next(true);
|
|
5009
|
+
this.isVisibleSubject.next(true);
|
|
5010
|
+
this.labelSubject.next(null);
|
|
5011
|
+
this.tooltipSubject.next(null);
|
|
5012
|
+
this.processSubscriptions();
|
|
4925
5013
|
if (this.action instanceof ActionLinkDescriptor) {
|
|
4926
5014
|
this.actionLink = this.action;
|
|
4927
5015
|
}
|
|
@@ -4929,6 +5017,19 @@ class MngActionComponent {
|
|
|
4929
5017
|
this.hostClass = this.action.className;
|
|
4930
5018
|
}
|
|
4931
5019
|
}
|
|
5020
|
+
ngOnChanges(changes) {
|
|
5021
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5022
|
+
if (!((_b = (_a = changes['item']) === null || _a === void 0 ? void 0 : _a.firstChange) !== null && _b !== void 0 ? _b : true) || !((_d = (_c = changes['itemId']) === null || _c === void 0 ? void 0 : _c.firstChange) !== null && _d !== void 0 ? _d : true) || !((_f = (_e = changes['actionData']) === null || _e === void 0 ? void 0 : _e.firstChange) !== null && _f !== void 0 ? _f : true)) {
|
|
5023
|
+
this.processSubscriptions();
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5026
|
+
ngOnDestroy() {
|
|
5027
|
+
var _a, _b, _c, _d;
|
|
5028
|
+
(_a = this.isVisibleSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
5029
|
+
(_b = this.isEnabledSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
5030
|
+
(_c = this.labelSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
5031
|
+
(_d = this.tooltipSubscription) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
5032
|
+
}
|
|
4932
5033
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4933
5034
|
triggerAction(event) {
|
|
4934
5035
|
this.loadingSubject.next(true);
|
|
@@ -4954,9 +5055,35 @@ class MngActionComponent {
|
|
|
4954
5055
|
getConfirmationServiceInstanceKey(action) {
|
|
4955
5056
|
return `${action.actionName}_${this.cmpId}`;
|
|
4956
5057
|
}
|
|
5058
|
+
processSubscriptions() {
|
|
5059
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5060
|
+
const context = this.actionExecutor.prepareActionExecContext(this.action, this.itemId, this.item, this.dataProvider, (_a = this.viewContainer) !== null && _a !== void 0 ? _a : undefined, this, this.actionData);
|
|
5061
|
+
if (typeof this.action.isVisibleFunction === 'function') {
|
|
5062
|
+
(_b = this.isVisibleSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
5063
|
+
this.isVisibleSubscription = this.action.isVisibleFunction(context).subscribe({
|
|
5064
|
+
next: res => this.isVisibleSubject.next(res)
|
|
5065
|
+
});
|
|
5066
|
+
}
|
|
5067
|
+
if (typeof this.action.isEnabledFunction === 'function') {
|
|
5068
|
+
(_c = this.isEnabledSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
5069
|
+
this.isEnabledSubscription = this.action.isEnabledFunction(context).subscribe({
|
|
5070
|
+
next: res => this.isEnabledSubject.next(res)
|
|
5071
|
+
});
|
|
5072
|
+
}
|
|
5073
|
+
if (!this.hasNoTitle) {
|
|
5074
|
+
(_d = this.labelSubscription) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
5075
|
+
this.labelSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'title', (_f = (_e = this.action) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : undefined, this.item).subscribe({
|
|
5076
|
+
next: i18n => this.labelSubject.next(i18n)
|
|
5077
|
+
});
|
|
5078
|
+
}
|
|
5079
|
+
(_g = this.tooltipSubscription) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
5080
|
+
this.tooltipSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'tooltip', (_j = (_h = this.action) === null || _h === void 0 ? void 0 : _h.tooltip) !== null && _j !== void 0 ? _j : undefined, this.item).subscribe({
|
|
5081
|
+
next: i18n => this.tooltipSubject.next(i18n)
|
|
5082
|
+
});
|
|
5083
|
+
}
|
|
4957
5084
|
}
|
|
4958
5085
|
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1$1.TranslateService }, { token: MngActionExecutorService }, { token: i2.ConfirmationService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4959
|
-
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionComponent, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataProvider: "dataProvider", inputDisabled: ["disabled", "inputDisabled"], inputLoading: ["loading", "inputLoading"], viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { triggerEventEmitter: "trigger" }, host: { properties: { "class": "this.hostClass" } }, providers: [ConfirmationService], ngImport: i0, template: "<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : actionLink.url\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"\n ($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | linkFormatter: itemId:item:action.model:actionData)\n \"\n [queryParams]=\"actionLink.queryParams\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n </ng-template>\n <ng-template #button>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction($event)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"], components: [{ type: i5.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], pipes: { "async": i4.AsyncPipe, "linkFormatter": MngLinkFormatterPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5086
|
+
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngActionComponent, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", dataProvider: "dataProvider", inputDisabled: ["disabled", "inputDisabled"], inputLoading: ["loading", "inputLoading"], viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { triggerEventEmitter: "trigger" }, host: { properties: { "class": "this.hostClass" } }, providers: [ConfirmationService], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : actionLink.url\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"\n ($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | linkFormatter: itemId:item:action.model:actionData)\n \"\n [queryParams]=\"actionLink.queryParams\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n </ng-template>\n <ng-template #button>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction($event)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"], components: [{ type: i5.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i9.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], pipes: { "async": i4.AsyncPipe, "linkFormatter": MngLinkFormatterPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4960
5087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
4961
5088
|
type: Component,
|
|
4962
5089
|
args: [{ selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfirmationService], template: "<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : actionLink.url\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"\n ($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | linkFormatter: itemId:item:action.model:actionData)\n \"\n [queryParams]=\"actionLink.queryParams\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n </ng-template>\n <ng-template #button>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction($event)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"] }]
|
|
@@ -6014,13 +6141,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6014
6141
|
}] });
|
|
6015
6142
|
|
|
6016
6143
|
class MngFormlyFieldInputComponent extends FieldType {
|
|
6144
|
+
constructor() {
|
|
6145
|
+
super(...arguments);
|
|
6146
|
+
this.subscriptions = [];
|
|
6147
|
+
}
|
|
6017
6148
|
ngOnInit() {
|
|
6018
6149
|
this.iFormControl = this.formControl;
|
|
6019
6150
|
this.descriptor = this.to['descriptor'];
|
|
6151
|
+
// emit lifecycle event
|
|
6152
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {
|
|
6153
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6154
|
+
});
|
|
6155
|
+
// init values
|
|
6020
6156
|
if (this.to.type === 'datepicker' && typeof this.iFormControl.value === 'string') {
|
|
6021
6157
|
const dateObject = new Date(this.iFormControl.value);
|
|
6022
6158
|
this.iFormControl.setValue(dateObject);
|
|
6023
6159
|
}
|
|
6160
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
6161
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldInputComponent, this, {
|
|
6162
|
+
value: v
|
|
6163
|
+
});
|
|
6164
|
+
});
|
|
6165
|
+
this.subscriptions.push(subscription);
|
|
6166
|
+
}
|
|
6167
|
+
ngOnDestroy() {
|
|
6168
|
+
var _a;
|
|
6169
|
+
this.subscriptions.forEach(s => s.unsubscribe());
|
|
6170
|
+
// emit lifecycle event
|
|
6171
|
+
(_a = this.descriptor) === null || _a === void 0 ? void 0 : _a.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {
|
|
6172
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
6173
|
+
});
|
|
6024
6174
|
}
|
|
6025
6175
|
}
|
|
6026
6176
|
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -6030,10 +6180,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6030
6180
|
args: [{ selector: 'mng-formly-field-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
6031
6181
|
}] });
|
|
6032
6182
|
|
|
6183
|
+
class MngFormlyFieldLabelComponent {
|
|
6184
|
+
constructor() {
|
|
6185
|
+
this.className = 'hidden';
|
|
6186
|
+
}
|
|
6187
|
+
}
|
|
6188
|
+
MngFormlyFieldLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6189
|
+
MngFormlyFieldLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldLabelComponent, selector: "mng-formly-field-label", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldLabelComponent, decorators: [{
|
|
6191
|
+
type: Component,
|
|
6192
|
+
args: [{ selector: 'mng-formly-field-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
|
|
6193
|
+
}], propDecorators: { className: [{
|
|
6194
|
+
type: HostBinding,
|
|
6195
|
+
args: ['class']
|
|
6196
|
+
}] } });
|
|
6197
|
+
|
|
6033
6198
|
class MngFormlyFieldDropdownComponent extends FieldType {
|
|
6199
|
+
constructor() {
|
|
6200
|
+
super(...arguments);
|
|
6201
|
+
this.subscriptions = [];
|
|
6202
|
+
}
|
|
6034
6203
|
ngOnInit() {
|
|
6035
6204
|
this.dFormControl = this.formControl;
|
|
6036
6205
|
this.descriptor = this.to['descriptor'];
|
|
6206
|
+
// emit lifecycle event
|
|
6207
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {
|
|
6208
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6209
|
+
});
|
|
6210
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
6211
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldDropdownComponent, this, {
|
|
6212
|
+
value: v
|
|
6213
|
+
});
|
|
6214
|
+
});
|
|
6215
|
+
this.subscriptions.push(subscription);
|
|
6216
|
+
}
|
|
6217
|
+
ngOnDestroy() {
|
|
6218
|
+
var _a;
|
|
6219
|
+
this.subscriptions.forEach(s => s.unsubscribe());
|
|
6220
|
+
// emit lifecycle event
|
|
6221
|
+
(_a = this.descriptor) === null || _a === void 0 ? void 0 : _a.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {
|
|
6222
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
6223
|
+
});
|
|
6037
6224
|
}
|
|
6038
6225
|
}
|
|
6039
6226
|
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -6825,6 +7012,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6825
7012
|
}] } });
|
|
6826
7013
|
|
|
6827
7014
|
var SizeEnum = ActionDescriptor.SizeEnum;
|
|
7015
|
+
var DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum;
|
|
6828
7016
|
class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
6829
7017
|
constructor(actionExecutor) {
|
|
6830
7018
|
super();
|
|
@@ -6848,7 +7036,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6848
7036
|
const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)
|
|
6849
7037
|
.withPosition(ActionPositionEnum.RowClick)
|
|
6850
7038
|
.withTitle(null)
|
|
6851
|
-
.withDialogClassName('mng-
|
|
7039
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7040
|
+
.withDialogSize(DialogSizeEnum.Small);
|
|
6852
7041
|
viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
|
|
6853
7042
|
this.rowClickActions.push(viewAction);
|
|
6854
7043
|
}
|
|
@@ -6857,7 +7046,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6857
7046
|
.withPosition(ActionPositionEnum.ToolbarRight)
|
|
6858
7047
|
.withTitle(null)
|
|
6859
7048
|
.withIcon('pi pi-plus')
|
|
6860
|
-
.withDialogClassName('mng-
|
|
7049
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7050
|
+
.withDialogSize(DialogSizeEnum.Small)
|
|
6861
7051
|
.withSize(SizeEnum.ExtraSmall)
|
|
6862
7052
|
.withSubmitFunction(ctx => {
|
|
6863
7053
|
var _a;
|
|
@@ -6878,7 +7068,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6878
7068
|
const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)
|
|
6879
7069
|
.withTitle(null)
|
|
6880
7070
|
.withIcon('pi pi-pencil')
|
|
6881
|
-
.withDialogClassName('mng-
|
|
7071
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7072
|
+
.withDialogSize(DialogSizeEnum.Small)
|
|
6882
7073
|
.withSize(SizeEnum.ExtraSmall)
|
|
6883
7074
|
.withSubmitFunction(ctx => {
|
|
6884
7075
|
var _a, _b;
|
|
@@ -7084,10 +7275,10 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
7084
7275
|
}
|
|
7085
7276
|
}
|
|
7086
7277
|
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
7087
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-
|
|
7278
|
+
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldTableDialogMultiselectComponent, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-field-dialog mng-action-editor-dialog mng-action-editor-dialog-sm\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($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.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i1$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe, "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7088
7279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
7089
7280
|
type: Component,
|
|
7090
|
-
args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-
|
|
7281
|
+
args: [{ selector: 'mng-formly-table-multiselect-add-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-field-dialog mng-action-editor-dialog mng-action-editor-dialog-sm\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($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.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
7091
7282
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
7092
7283
|
|
|
7093
7284
|
class MngFormlyFieldTabsComponent extends FieldType {
|
|
@@ -7100,30 +7291,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
7100
7291
|
}] });
|
|
7101
7292
|
|
|
7102
7293
|
class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
7294
|
+
constructor() {
|
|
7295
|
+
super(...arguments);
|
|
7296
|
+
this.typeFieldset = FieldGroupDescriptor.TypeEnum.Fieldset;
|
|
7297
|
+
this.typeLogical = FieldGroupDescriptor.TypeEnum.Logical;
|
|
7298
|
+
}
|
|
7299
|
+
ngOnInit() {
|
|
7300
|
+
this.descriptor = this.to['descriptor'];
|
|
7301
|
+
}
|
|
7103
7302
|
}
|
|
7104
7303
|
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7105
|
-
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *
|
|
7304
|
+
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldFieldsetComponent, selector: "mng-formly-field-fieldset", usesInheritance: true, ngImport: i0, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"descriptor?.type\">\n <p-fieldset *ngSwitchCase=\"typeFieldset\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <formly-field *ngSwitchDefault [field]=\"group\"></formly-field>\n </ng-container>\n</ng-container>\n", components: [{ type: i1$5.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { type: i3$1.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7106
7305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
|
|
7107
7306
|
type: Component,
|
|
7108
|
-
args: [{ selector: 'mng-formly-field-fieldset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <p-fieldset *
|
|
7307
|
+
args: [{ selector: 'mng-formly-field-fieldset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"descriptor?.type\">\n <p-fieldset *ngSwitchCase=\"typeFieldset\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <formly-field *ngSwitchDefault [field]=\"group\"></formly-field>\n </ng-container>\n</ng-container>\n" }]
|
|
7109
7308
|
}] });
|
|
7110
7309
|
|
|
7111
7310
|
class MngFormlyFieldWrapperComponent extends FieldWrapper {
|
|
7112
7311
|
}
|
|
7113
7312
|
MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7114
|
-
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldWrapperComponent, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7313
|
+
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyFieldWrapperComponent, selector: "mng-formly-field-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field'\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7115
7314
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
7116
7315
|
type: Component,
|
|
7117
|
-
args: [{ selector: 'mng-formly-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
7316
|
+
args: [{ selector: 'mng-formly-field-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field'\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
7118
7317
|
}] });
|
|
7119
7318
|
|
|
7120
7319
|
class MngFormlyTableWrapperComponent extends FieldWrapper {
|
|
7121
7320
|
}
|
|
7122
7321
|
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7123
|
-
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7322
|
+
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngFormlyTableWrapperComponent, selector: "mng-formly-table-wrapper", usesInheritance: true, ngImport: i0, template: "<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n", components: [{ type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7124
7323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
|
|
7125
7324
|
type: Component,
|
|
7126
|
-
args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"field table\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
7325
|
+
args: [{ selector: 'mng-formly-table-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n" }]
|
|
7127
7326
|
}] });
|
|
7128
7327
|
|
|
7129
7328
|
class MngBreadcrumbComponent {
|
|
@@ -7721,6 +7920,11 @@ const formlyWrappersConfig = [
|
|
|
7721
7920
|
{ name: 'field-table', component: MngFormlyTableWrapperComponent }
|
|
7722
7921
|
];
|
|
7723
7922
|
const formlyTypesConfig = [
|
|
7923
|
+
{
|
|
7924
|
+
name: 'label',
|
|
7925
|
+
component: MngFormlyFieldLabelComponent,
|
|
7926
|
+
wrappers: ['field']
|
|
7927
|
+
},
|
|
7724
7928
|
{
|
|
7725
7929
|
name: 'input',
|
|
7726
7930
|
component: MngFormlyFieldInputComponent,
|
|
@@ -7970,6 +8174,7 @@ const declarations = [
|
|
|
7970
8174
|
MngFormlyTableWrapperComponent,
|
|
7971
8175
|
// formly fields
|
|
7972
8176
|
MngFormlyFieldInputComponent,
|
|
8177
|
+
MngFormlyFieldLabelComponent,
|
|
7973
8178
|
MngFormlyFieldDropdownComponent,
|
|
7974
8179
|
MngFormlyFieldAutocompleteComponent,
|
|
7975
8180
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -8075,6 +8280,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
8075
8280
|
MngFormlyTableWrapperComponent,
|
|
8076
8281
|
// formly fields
|
|
8077
8282
|
MngFormlyFieldInputComponent,
|
|
8283
|
+
MngFormlyFieldLabelComponent,
|
|
8078
8284
|
MngFormlyFieldDropdownComponent,
|
|
8079
8285
|
MngFormlyFieldAutocompleteComponent,
|
|
8080
8286
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -8190,6 +8396,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
8190
8396
|
MngFormlyTableWrapperComponent,
|
|
8191
8397
|
// formly fields
|
|
8192
8398
|
MngFormlyFieldInputComponent,
|
|
8399
|
+
MngFormlyFieldLabelComponent,
|
|
8193
8400
|
MngFormlyFieldDropdownComponent,
|
|
8194
8401
|
MngFormlyFieldAutocompleteComponent,
|
|
8195
8402
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -8281,11 +8488,22 @@ class AMngBaseApiService {
|
|
|
8281
8488
|
this.objectSerializer = ObjectSerializer.get();
|
|
8282
8489
|
}
|
|
8283
8490
|
getUrl(...pathSegments) {
|
|
8284
|
-
let
|
|
8285
|
-
if (
|
|
8491
|
+
let baseUrl = this.getBasePath();
|
|
8492
|
+
if (baseUrl.endsWith('/')) {
|
|
8493
|
+
baseUrl = baseUrl.substring(0, baseUrl.length - 1);
|
|
8494
|
+
}
|
|
8495
|
+
const serviceBasePath = this.getServiceBasePath();
|
|
8496
|
+
let path = [serviceBasePath, ...pathSegments].filter(s => s && s.length).join('/');
|
|
8497
|
+
// omit first and last '/'
|
|
8498
|
+
if (path.startsWith('/')) {
|
|
8286
8499
|
path = path.substring(1);
|
|
8287
8500
|
}
|
|
8288
|
-
|
|
8501
|
+
if (path.endsWith('/')) {
|
|
8502
|
+
path = path.substring(0, path.length - 1);
|
|
8503
|
+
}
|
|
8504
|
+
// replace any double '//' from path that could come from joining paths
|
|
8505
|
+
path = path.replace('//', '/');
|
|
8506
|
+
return `${baseUrl}/${path}`;
|
|
8289
8507
|
}
|
|
8290
8508
|
serializeQueryParam(queryParam, type = 'QueryParam') {
|
|
8291
8509
|
return this.objectSerializer.serialize(queryParam, type);
|
|
@@ -8345,7 +8563,7 @@ class AMngCrudApiService extends AMngGetAllApiService {
|
|
|
8345
8563
|
super(type, queryResultType, http);
|
|
8346
8564
|
}
|
|
8347
8565
|
createPost(item, params) {
|
|
8348
|
-
const url = this.getUrl(this.getCreatePostPath());
|
|
8566
|
+
const url = this.getUrl(this.getCreatePostPath(item));
|
|
8349
8567
|
return this.http
|
|
8350
8568
|
.post(url, this.serialize(item), {
|
|
8351
8569
|
withCredentials: true,
|
|
@@ -8389,7 +8607,7 @@ class AMngCrudApiService extends AMngGetAllApiService {
|
|
|
8389
8607
|
})
|
|
8390
8608
|
.pipe(map(res => this.deserialize(res)));
|
|
8391
8609
|
}
|
|
8392
|
-
getCreatePostPath() {
|
|
8610
|
+
getCreatePostPath(item) {
|
|
8393
8611
|
return '';
|
|
8394
8612
|
}
|
|
8395
8613
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -8867,5 +9085,5 @@ class RouteDataBuilder {
|
|
|
8867
9085
|
* Generated bundle index. Do not edit.
|
|
8868
9086
|
*/
|
|
8869
9087
|
|
|
8870
|
-
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionLinkDescriptor, ActionPositionEnum, ActionRunResult, ActionSimpleDescriptor, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtils, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngLinkFormatterPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, RouteBuilder, RouteDataBuilder, RoutesBuilder, TableDataProvider, TableDescriptor, TableviewDataProvider, TableviewDescriptor, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
|
|
9088
|
+
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, ActionActivationResult, ActionActivationTriggerEnum, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionExecContext, ActionLevelEnum, ActionLinkDescriptor, ActionPositionEnum, ActionRunResult, ActionSimpleDescriptor, ActionTriggerResult, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, FieldValidator, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, I18nUtils, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDropdownComponent, MngEnumPipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent, MngI18nPropertyPipe, MngLinkFormatterPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTopbarComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, RouteBuilder, RouteDataBuilder, RoutesBuilder, TableDataProvider, TableDescriptor, TableviewDataProvider, TableviewDescriptor, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
|
|
8871
9089
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|