@mediusinc/mng-commons 0.4.5 → 0.6.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/assets/i18n/en.json +2 -2
- package/assets/i18n/sl.json +2 -2
- 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 +54 -10
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +3 -3
- package/esm2020/lib/components/action/route/action-route.component.mjs +3 -3
- package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +3 -3
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +28 -4
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +14 -5
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +29 -4
- 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-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +11 -7
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +5 -5
- package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.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 +5 -5
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +5 -5
- package/esm2020/lib/components/layout/breadcrumb.component.mjs +3 -3
- package/esm2020/lib/components/layout/footer.component.mjs +3 -3
- package/esm2020/lib/components/layout/main-layout.component.mjs +3 -3
- package/esm2020/lib/components/layout/menu-item.component.mjs +3 -3
- package/esm2020/lib/components/layout/menu.component.mjs +3 -3
- package/esm2020/lib/components/layout/services/main-layout.component.service.mjs +3 -3
- package/esm2020/lib/components/layout/topbar.component.mjs +3 -3
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +3 -3
- package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +3 -3
- package/esm2020/lib/components/tableview/table/table.component.mjs +6 -7
- package/esm2020/lib/components/tableview/tableview.component.mjs +3 -3
- package/esm2020/lib/config/formly.config.mjs +9 -4
- package/esm2020/lib/descriptors/action.descriptor.mjs +34 -6
- package/esm2020/lib/descriptors/editor.descriptor.mjs +3 -3
- package/esm2020/lib/descriptors/field-validation.descriptor.mjs +21 -0
- package/esm2020/lib/descriptors/field.descriptor.mjs +61 -23
- package/esm2020/lib/descriptors/index.mjs +2 -2
- package/esm2020/lib/descriptors/table.descriptor.mjs +23 -13
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +4 -4
- package/esm2020/lib/directives/component.directive.mjs +3 -3
- package/esm2020/lib/directives/template.directive.mjs +3 -3
- package/esm2020/lib/mng-commons.module.mjs +13 -8
- package/esm2020/lib/pipes/boolean.pipe.mjs +3 -3
- package/esm2020/lib/pipes/enum.pipe.mjs +5 -5
- package/esm2020/lib/pipes/i18n-property.pipe.mjs +3 -3
- package/esm2020/lib/pipes/json-path.pipe.mjs +3 -3
- package/esm2020/lib/pipes/link-formatter.pipe.mjs +3 -3
- package/esm2020/lib/services/action-executor.service.mjs +31 -8
- package/esm2020/lib/services/commons.service.mjs +57 -83
- package/esm2020/lib/services/internal/commons-init.provider.mjs +4 -0
- package/esm2020/lib/services/internal/commons-init.service.mjs +44 -0
- package/esm2020/lib/services/internal/index.mjs +3 -0
- package/esm2020/lib/services/navigation.service.mjs +3 -3
- package/esm2020/lib/services/providers/index.mjs +1 -2
- package/esm2020/lib/services/view-container.component.service.mjs +3 -3
- package/esm2020/lib/types/type.model.mjs +1 -1
- package/esm2020/lib/utils/editor-formly.util.mjs +75 -15
- package/fesm2015/mediusinc-mng-commons.mjs +607 -296
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +596 -294
- 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/components/tableview/table/table.component.d.ts +1 -1
- package/lib/descriptors/action.descriptor.d.ts +28 -3
- package/lib/descriptors/editor.descriptor.d.ts +2 -3
- package/lib/descriptors/field-validation.descriptor.d.ts +18 -0
- package/lib/descriptors/field.descriptor.d.ts +34 -21
- package/lib/descriptors/index.d.ts +1 -1
- package/lib/descriptors/table.descriptor.d.ts +5 -1
- package/lib/descriptors/tableview.descriptor.d.ts +2 -2
- package/lib/mng-commons.module.d.ts +58 -57
- package/lib/pipes/enum.pipe.d.ts +2 -1
- package/lib/services/commons.service.d.ts +5 -7
- package/lib/services/internal/commons-init.provider.d.ts +3 -0
- package/lib/services/internal/commons-init.service.d.ts +16 -0
- package/lib/services/internal/index.d.ts +2 -0
- package/lib/services/providers/index.d.ts +0 -1
- package/lib/types/type.model.d.ts +7 -0
- package/lib/utils/editor-formly.util.d.ts +2 -1
- package/package.json +6 -6
- package/scss/mng-overrides/_layout_dialog.scss +44 -14
- package/scss/mng-overrides/_theme_dialog.scss +2 -3
- package/esm2020/lib/descriptors/field.validator.mjs +0 -21
- package/esm2020/lib/services/providers/commons-init.provider.mjs +0 -4
- package/lib/descriptors/field.validator.d.ts +0 -18
- package/lib/services/providers/commons-init.provider.d.ts +0 -3
|
@@ -2,7 +2,7 @@ import * as i4 from '@angular/common';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { HttpErrorResponse, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, Injectable, Pipe, Inject,
|
|
5
|
+
import { InjectionToken, Injectable, Pipe, Inject, EventEmitter, Component, ChangeDetectionStrategy, Optional, HostBinding, Input, Output, Directive, ContentChildren, ViewChild, forwardRef, ViewChildren, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
6
6
|
import * as i4$2 from '@angular/forms';
|
|
7
7
|
import { Validators, FormGroup, FormArray, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import * as i1 from '@angular/router';
|
|
@@ -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, mergeMap as mergeMap$1
|
|
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);
|
|
@@ -1514,9 +1542,9 @@ class EditorDescriptor {
|
|
|
1514
1542
|
this._disabled = disabled;
|
|
1515
1543
|
return this;
|
|
1516
1544
|
}
|
|
1517
|
-
|
|
1545
|
+
addValidation(name, validator, message) {
|
|
1518
1546
|
if (this._currentGroup) {
|
|
1519
|
-
this._currentGroup.
|
|
1547
|
+
this._currentGroup.withValidation(name, validator, message);
|
|
1520
1548
|
}
|
|
1521
1549
|
}
|
|
1522
1550
|
copy() {
|
|
@@ -1627,7 +1655,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1627
1655
|
super(editor);
|
|
1628
1656
|
this._required = false;
|
|
1629
1657
|
this._disabled = false;
|
|
1630
|
-
this.
|
|
1658
|
+
this._validations = [];
|
|
1631
1659
|
this._className = '';
|
|
1632
1660
|
this._labelClassName = '';
|
|
1633
1661
|
this._inputClassName = '';
|
|
@@ -1666,8 +1694,8 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1666
1694
|
get setter() {
|
|
1667
1695
|
return this._setter;
|
|
1668
1696
|
}
|
|
1669
|
-
get
|
|
1670
|
-
return this.
|
|
1697
|
+
get validations() {
|
|
1698
|
+
return this._validations;
|
|
1671
1699
|
}
|
|
1672
1700
|
get requiredExpression() {
|
|
1673
1701
|
return this._requiredExpression;
|
|
@@ -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
|
}
|
|
@@ -1738,14 +1769,15 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1738
1769
|
this._setter = setter;
|
|
1739
1770
|
return this;
|
|
1740
1771
|
}
|
|
1741
|
-
|
|
1742
|
-
this.
|
|
1772
|
+
withValidation(name, validator, message) {
|
|
1773
|
+
this._validations.push(new FieldValidationDescriptor(name, validator, 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) {
|
|
@@ -1772,7 +1804,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1772
1804
|
obj._size = this.size;
|
|
1773
1805
|
obj._getter = this._getter;
|
|
1774
1806
|
obj._setter = this._setter;
|
|
1775
|
-
obj.
|
|
1807
|
+
obj._validations = this._validations;
|
|
1776
1808
|
}
|
|
1777
1809
|
}
|
|
1778
1810
|
var FieldDescriptor;
|
|
@@ -1854,13 +1886,17 @@ 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;
|
|
1860
1896
|
this._maxLength = maxLength;
|
|
1861
1897
|
this._pattern = pattern;
|
|
1862
1898
|
if (isEmail) {
|
|
1863
|
-
this.
|
|
1899
|
+
this.withValidation('email', control => Validators.email(control));
|
|
1864
1900
|
}
|
|
1865
1901
|
return this;
|
|
1866
1902
|
}
|
|
@@ -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;
|
|
@@ -2284,15 +2331,15 @@ class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
|
2284
2331
|
constructor(editor, name) {
|
|
2285
2332
|
super(editor);
|
|
2286
2333
|
this._fields = [];
|
|
2287
|
-
this.
|
|
2334
|
+
this._validations = [];
|
|
2288
2335
|
this._name = `${this.baseName}${name}`;
|
|
2289
2336
|
this._default = name === EditorDescriptor.defaultGroupName;
|
|
2290
2337
|
}
|
|
2291
2338
|
get title() {
|
|
2292
2339
|
return this._title;
|
|
2293
2340
|
}
|
|
2294
|
-
get
|
|
2295
|
-
return this.
|
|
2341
|
+
get validations() {
|
|
2342
|
+
return this._validations;
|
|
2296
2343
|
}
|
|
2297
2344
|
get baseName() {
|
|
2298
2345
|
return `${this.groupName()}_`;
|
|
@@ -2307,8 +2354,8 @@ class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
|
2307
2354
|
this._title = title;
|
|
2308
2355
|
return this;
|
|
2309
2356
|
}
|
|
2310
|
-
|
|
2311
|
-
this.
|
|
2357
|
+
withValidation(name, validator, message) {
|
|
2358
|
+
this._validations.push(new FieldValidationDescriptor(name, validator, message));
|
|
2312
2359
|
return this;
|
|
2313
2360
|
}
|
|
2314
2361
|
}
|
|
@@ -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,26 +2401,38 @@ 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
|
-
class
|
|
2359
|
-
constructor(name,
|
|
2424
|
+
class FieldValidationDescriptor {
|
|
2425
|
+
constructor(name, validator, message, options) {
|
|
2360
2426
|
this._name = name;
|
|
2361
|
-
this.
|
|
2427
|
+
this._validator = validator;
|
|
2362
2428
|
this._message = message;
|
|
2363
2429
|
this._options = options;
|
|
2364
2430
|
}
|
|
2365
2431
|
get name() {
|
|
2366
2432
|
return this._name;
|
|
2367
2433
|
}
|
|
2368
|
-
get
|
|
2369
|
-
return this.
|
|
2434
|
+
get validator() {
|
|
2435
|
+
return this._validator;
|
|
2370
2436
|
}
|
|
2371
2437
|
get message() {
|
|
2372
2438
|
return this._message;
|
|
@@ -2412,8 +2478,11 @@ 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;
|
|
2484
|
+
this._rowsPerPageOptions = [25, 50, 100];
|
|
2485
|
+
this._defaultNumRows = this._rowsPerPageOptions[0];
|
|
2417
2486
|
this._columns = [];
|
|
2418
2487
|
this._hideHeader = false;
|
|
2419
2488
|
this._hasDefaultSort = false;
|
|
@@ -2422,6 +2491,7 @@ class TableDescriptor {
|
|
|
2422
2491
|
this._rowHeight = 45;
|
|
2423
2492
|
this._tableFullHeightOffset = 315;
|
|
2424
2493
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
2494
|
+
this._dataKeyProperty = (_a = idProperty !== null && idProperty !== void 0 ? idProperty : ModelUtil.findIdAttribute(modelType)) !== null && _a !== void 0 ? _a : undefined;
|
|
2425
2495
|
}
|
|
2426
2496
|
get filterDisplay() {
|
|
2427
2497
|
return this._filterDisplay;
|
|
@@ -2429,6 +2499,12 @@ class TableDescriptor {
|
|
|
2429
2499
|
get paginationMode() {
|
|
2430
2500
|
return this._paginationMode;
|
|
2431
2501
|
}
|
|
2502
|
+
get rowsPerPageOptions() {
|
|
2503
|
+
return this._rowsPerPageOptions;
|
|
2504
|
+
}
|
|
2505
|
+
get defaultNumRows() {
|
|
2506
|
+
return this._defaultNumRows;
|
|
2507
|
+
}
|
|
2432
2508
|
get columns() {
|
|
2433
2509
|
return this._columns;
|
|
2434
2510
|
}
|
|
@@ -2461,48 +2537,41 @@ class TableDescriptor {
|
|
|
2461
2537
|
}
|
|
2462
2538
|
addColumnDescriptor(column) {
|
|
2463
2539
|
this._columns.push(column);
|
|
2464
|
-
this.setDataKeyFromColumn();
|
|
2465
2540
|
return this;
|
|
2466
2541
|
}
|
|
2467
2542
|
addColumn(property) {
|
|
2468
2543
|
const column = new ColumnDescriptor(this, property);
|
|
2469
2544
|
this._columns.push(column);
|
|
2470
|
-
this.setDataKeyFromColumn();
|
|
2471
2545
|
return column;
|
|
2472
2546
|
}
|
|
2473
2547
|
addColumnNumber(property, displayFormat) {
|
|
2474
2548
|
const column = new ColumnDescriptor(this, property);
|
|
2475
2549
|
column.asNumber(displayFormat);
|
|
2476
2550
|
this._columns.push(column);
|
|
2477
|
-
this.setDataKeyFromColumn();
|
|
2478
2551
|
return column;
|
|
2479
2552
|
}
|
|
2480
2553
|
addColumnDate(property, displayFormat) {
|
|
2481
2554
|
const column = new ColumnDescriptor(this, property);
|
|
2482
2555
|
column.asDate(displayFormat);
|
|
2483
2556
|
this._columns.push(column);
|
|
2484
|
-
this.setDataKeyFromColumn();
|
|
2485
2557
|
return column;
|
|
2486
2558
|
}
|
|
2487
2559
|
addColumnBoolean(property, yes, no, asIcon = false) {
|
|
2488
2560
|
const column = new ColumnDescriptor(this, property);
|
|
2489
2561
|
column.asBoolean(yes, no, asIcon);
|
|
2490
2562
|
this._columns.push(column);
|
|
2491
|
-
this.setDataKeyFromColumn();
|
|
2492
2563
|
return column;
|
|
2493
2564
|
}
|
|
2494
2565
|
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2495
2566
|
const column = new ColumnDescriptor(this, property);
|
|
2496
2567
|
column.asEnum(enumType, nameAsValue, titlePath);
|
|
2497
2568
|
this._columns.push(column);
|
|
2498
|
-
this.setDataKeyFromColumn();
|
|
2499
2569
|
return column;
|
|
2500
2570
|
}
|
|
2501
2571
|
addColumnCustomComponent(property, customComponentType) {
|
|
2502
2572
|
const column = new ColumnDescriptor(this, property);
|
|
2503
2573
|
column.asCustomComponent(customComponentType);
|
|
2504
2574
|
this._columns.push(column);
|
|
2505
|
-
this.setDataKeyFromColumn();
|
|
2506
2575
|
return column;
|
|
2507
2576
|
}
|
|
2508
2577
|
withFilterDisplay(filterDisplayType) {
|
|
@@ -2513,6 +2582,18 @@ class TableDescriptor {
|
|
|
2513
2582
|
this._paginationMode = paginationMode;
|
|
2514
2583
|
return this;
|
|
2515
2584
|
}
|
|
2585
|
+
withRowsPerPage(rows, options) {
|
|
2586
|
+
if (options) {
|
|
2587
|
+
this._rowsPerPageOptions = options;
|
|
2588
|
+
}
|
|
2589
|
+
if (!this._rowsPerPageOptions.includes(rows)) {
|
|
2590
|
+
this._defaultNumRows = this._rowsPerPageOptions[0];
|
|
2591
|
+
}
|
|
2592
|
+
else {
|
|
2593
|
+
this._defaultNumRows = rows;
|
|
2594
|
+
}
|
|
2595
|
+
return this;
|
|
2596
|
+
}
|
|
2516
2597
|
withTitle(title) {
|
|
2517
2598
|
this._title = title;
|
|
2518
2599
|
return this;
|
|
@@ -2550,11 +2631,6 @@ class TableDescriptor {
|
|
|
2550
2631
|
descriptor._filterDisplay = this._filterDisplay;
|
|
2551
2632
|
return descriptor;
|
|
2552
2633
|
}
|
|
2553
|
-
setDataKeyFromColumn() {
|
|
2554
|
-
if (!this._dataKeyProperty && this._columns.length === 1) {
|
|
2555
|
-
this._dataKeyProperty = this._columns[0].property;
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
2634
|
}
|
|
2559
2635
|
(function (TableDescriptor) {
|
|
2560
2636
|
let PaginationModeEnum;
|
|
@@ -2619,9 +2695,9 @@ class TableviewDescriptor {
|
|
|
2619
2695
|
return this;
|
|
2620
2696
|
}
|
|
2621
2697
|
withValidator(name, expression) {
|
|
2622
|
-
this._viewEditor.
|
|
2623
|
-
this._addEditor.
|
|
2624
|
-
this._editEditor.
|
|
2698
|
+
this._viewEditor.addValidation(name, expression);
|
|
2699
|
+
this._addEditor.addValidation(name, expression);
|
|
2700
|
+
this._editEditor.addValidation(name, expression);
|
|
2625
2701
|
return this;
|
|
2626
2702
|
}
|
|
2627
2703
|
addColumnDescriptor(column) {
|
|
@@ -2769,36 +2845,32 @@ class EditorFormlyUtil {
|
|
|
2769
2845
|
// wrap in group to be able to use flex grid
|
|
2770
2846
|
const wrapperGroup = {
|
|
2771
2847
|
fieldGroupClassName: 'p-fluid formgrid grid',
|
|
2772
|
-
fieldGroup: fields
|
|
2773
|
-
validators: {}
|
|
2848
|
+
fieldGroup: fields
|
|
2774
2849
|
};
|
|
2775
|
-
|
|
2776
|
-
wrapperGroup.validators[validator.name] = { expression: validator.expression, message: validator.message };
|
|
2777
|
-
}
|
|
2850
|
+
EditorFormlyUtil.addValidationsToFormlyField(wrapperGroup, descriptor.validations);
|
|
2778
2851
|
return [wrapperGroup];
|
|
2779
2852
|
}
|
|
2780
2853
|
static createFormlyField(descriptor) {
|
|
2781
2854
|
const field = {
|
|
2782
2855
|
key: descriptor.property,
|
|
2783
2856
|
expressionProperties: {},
|
|
2784
|
-
templateOptions: {}
|
|
2785
|
-
validators: {}
|
|
2857
|
+
templateOptions: {}
|
|
2786
2858
|
};
|
|
2787
2859
|
let className = descriptor.className;
|
|
2788
2860
|
if (!className) {
|
|
2789
2861
|
// assign default field width through entire row
|
|
2790
2862
|
className = 'col-12';
|
|
2791
2863
|
}
|
|
2792
|
-
if (className.indexOf('col-') < 0) {
|
|
2793
|
-
// class was provided, but does not contain col- definition
|
|
2794
|
-
className = `col-12 ${descriptor.className}`;
|
|
2795
|
-
}
|
|
2796
2864
|
field.className = className;
|
|
2797
2865
|
field.templateOptions['descriptor'] = descriptor;
|
|
2798
2866
|
if (descriptor instanceof FieldInputDescriptor) {
|
|
2799
2867
|
switch (descriptor.fieldType) {
|
|
2800
2868
|
case FieldInputDescriptor.TypeEnum.Hidden:
|
|
2801
2869
|
break;
|
|
2870
|
+
case FieldInputDescriptor.TypeEnum.Label:
|
|
2871
|
+
field.type = 'label';
|
|
2872
|
+
delete field.key;
|
|
2873
|
+
break;
|
|
2802
2874
|
case FieldInputDescriptor.TypeEnum.Textarea:
|
|
2803
2875
|
field.type = 'textarea';
|
|
2804
2876
|
break;
|
|
@@ -2877,11 +2949,75 @@ class EditorFormlyUtil {
|
|
|
2877
2949
|
if (typeof descriptor.defaultValue !== 'undefined') {
|
|
2878
2950
|
field.defaultValue = descriptor.defaultValue;
|
|
2879
2951
|
}
|
|
2880
|
-
|
|
2881
|
-
field.validators[validator.name] = { expression: validator.expression, message: validator.message };
|
|
2882
|
-
}
|
|
2952
|
+
EditorFormlyUtil.addValidationsToFormlyField(field, descriptor.validations);
|
|
2883
2953
|
return field;
|
|
2884
2954
|
}
|
|
2955
|
+
static addValidationsToFormlyField(config, validations) {
|
|
2956
|
+
if (!config.validators) {
|
|
2957
|
+
config.validators = {};
|
|
2958
|
+
}
|
|
2959
|
+
for (const validation of validations) {
|
|
2960
|
+
if (typeof validation.validator === 'function') {
|
|
2961
|
+
config.validators[validation.name] = {
|
|
2962
|
+
expression: (control, field, options) => {
|
|
2963
|
+
const validatorRes = validation.validator(control, field, options);
|
|
2964
|
+
// formly validator only excepts true/false for validation
|
|
2965
|
+
// map possible angular validator result to true/false
|
|
2966
|
+
const res = typeof validatorRes === 'boolean' ? validatorRes : validatorRes === null;
|
|
2967
|
+
console.log('mapper', config.key, validatorRes, res);
|
|
2968
|
+
return res;
|
|
2969
|
+
}
|
|
2970
|
+
};
|
|
2971
|
+
if (typeof validation.message === 'function') {
|
|
2972
|
+
config.validators[validation.name].message = validation.message;
|
|
2973
|
+
}
|
|
2974
|
+
// if (typeof validation.validator === 'function' && typeof validation.message === 'function') {
|
|
2975
|
+
// config.validators[validation.name] = {
|
|
2976
|
+
// expression: (
|
|
2977
|
+
// control: AbstractControl,
|
|
2978
|
+
// field: FormlyFieldConfig,
|
|
2979
|
+
// options?: {
|
|
2980
|
+
// [id: string]: any;
|
|
2981
|
+
// }
|
|
2982
|
+
// ) => {
|
|
2983
|
+
// const validatorRes = validation.validator!(control, field, options);
|
|
2984
|
+
// // formly validator only excepts true/false for validation
|
|
2985
|
+
// // map possible angular validator result to true/false
|
|
2986
|
+
// const res = typeof validatorRes === 'boolean' ? validatorRes : validatorRes === null;
|
|
2987
|
+
// console.log('mapper', config.key, validatorRes, res);
|
|
2988
|
+
// return res;
|
|
2989
|
+
// },
|
|
2990
|
+
// message: validation.message
|
|
2991
|
+
// };
|
|
2992
|
+
// } else if (typeof validation.validator === 'function') {
|
|
2993
|
+
// config.validators[validation.name] = {
|
|
2994
|
+
// expression: (
|
|
2995
|
+
// control: AbstractControl,
|
|
2996
|
+
// field: FormlyFieldConfig,
|
|
2997
|
+
// options?: {
|
|
2998
|
+
// [id: string]: any;
|
|
2999
|
+
// }
|
|
3000
|
+
// ) => {
|
|
3001
|
+
// const validatorRes = validation.validator!(control, field, options);
|
|
3002
|
+
// // formly validator only excepts true/false for validation
|
|
3003
|
+
// // map possible angular validator result to true/false
|
|
3004
|
+
// const res = typeof validatorRes === 'boolean' ? (validatorRes === false ? {[validation.name]: true} : null) : validatorRes;
|
|
3005
|
+
// console.log('mapper', config.key, validatorRes, res);
|
|
3006
|
+
// return res;
|
|
3007
|
+
// }
|
|
3008
|
+
// };
|
|
3009
|
+
}
|
|
3010
|
+
else {
|
|
3011
|
+
if (!Array.isArray(config.validators.validation)) {
|
|
3012
|
+
config.validators.validation = [];
|
|
3013
|
+
}
|
|
3014
|
+
config.validators.validation.push(validation.name);
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
if (validations.length > 0) {
|
|
3018
|
+
console.log(config.validators);
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
2885
3021
|
}
|
|
2886
3022
|
|
|
2887
3023
|
class EnumUtil {
|
|
@@ -3872,9 +4008,9 @@ class MngNavigationService {
|
|
|
3872
4008
|
}
|
|
3873
4009
|
}
|
|
3874
4010
|
}
|
|
3875
|
-
MngNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3876
|
-
MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
3877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4011
|
+
MngNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngNavigationService, deps: [{ token: i1.Router }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4012
|
+
MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngNavigationService });
|
|
4013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngNavigationService, decorators: [{
|
|
3878
4014
|
type: Injectable
|
|
3879
4015
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i4.Location }]; } });
|
|
3880
4016
|
|
|
@@ -3908,9 +4044,9 @@ class MngBooleanPipe {
|
|
|
3908
4044
|
}
|
|
3909
4045
|
}
|
|
3910
4046
|
}
|
|
3911
|
-
MngBooleanPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3912
|
-
MngBooleanPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4047
|
+
MngBooleanPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBooleanPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4048
|
+
MngBooleanPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBooleanPipe, name: "boolean" });
|
|
4049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBooleanPipe, decorators: [{
|
|
3914
4050
|
type: Pipe,
|
|
3915
4051
|
args: [{
|
|
3916
4052
|
name: 'boolean',
|
|
@@ -3920,7 +4056,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
3920
4056
|
|
|
3921
4057
|
class MngEnumPipe {
|
|
3922
4058
|
transform(value, enumObj, i18nPath, nameAsValue = false) {
|
|
3923
|
-
if (!value || !enumObj) {
|
|
4059
|
+
if (!value || (typeof value !== 'number' && typeof value !== 'string') || !enumObj) {
|
|
3924
4060
|
return value;
|
|
3925
4061
|
}
|
|
3926
4062
|
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);
|
|
@@ -3930,9 +4066,9 @@ class MngEnumPipe {
|
|
|
3930
4066
|
return i18nPath ? `${i18nPath}.${enumConstantName}` : enumConstantName;
|
|
3931
4067
|
}
|
|
3932
4068
|
}
|
|
3933
|
-
MngEnumPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3934
|
-
MngEnumPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4069
|
+
MngEnumPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngEnumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4070
|
+
MngEnumPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngEnumPipe, name: "enum" });
|
|
4071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngEnumPipe, decorators: [{
|
|
3936
4072
|
type: Pipe,
|
|
3937
4073
|
args: [{
|
|
3938
4074
|
name: 'enum',
|
|
@@ -3945,9 +4081,9 @@ class MngI18nPropertyPipe {
|
|
|
3945
4081
|
return I18nUtils.Type.getPropertyKey(model.typeName, property);
|
|
3946
4082
|
}
|
|
3947
4083
|
}
|
|
3948
|
-
MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3949
|
-
MngI18nPropertyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3950
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4084
|
+
MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngI18nPropertyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4085
|
+
MngI18nPropertyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngI18nPropertyPipe, name: "i18nProperty" });
|
|
4086
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngI18nPropertyPipe, decorators: [{
|
|
3951
4087
|
type: Pipe,
|
|
3952
4088
|
args: [{
|
|
3953
4089
|
name: 'i18nProperty',
|
|
@@ -3983,9 +4119,9 @@ class MngLinkFormatterPipe {
|
|
|
3983
4119
|
}
|
|
3984
4120
|
}
|
|
3985
4121
|
}
|
|
3986
|
-
MngLinkFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3987
|
-
MngLinkFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4122
|
+
MngLinkFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngLinkFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4123
|
+
MngLinkFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngLinkFormatterPipe, name: "linkFormatter" });
|
|
4124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngLinkFormatterPipe, decorators: [{
|
|
3989
4125
|
type: Pipe,
|
|
3990
4126
|
args: [{
|
|
3991
4127
|
name: 'linkFormatter',
|
|
@@ -4061,9 +4197,9 @@ class JsonPathPipe {
|
|
|
4061
4197
|
}
|
|
4062
4198
|
}
|
|
4063
4199
|
}
|
|
4064
|
-
JsonPathPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4065
|
-
JsonPathPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
4066
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4200
|
+
JsonPathPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: JsonPathPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4201
|
+
JsonPathPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: JsonPathPipe, name: "jsonPath" });
|
|
4202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: JsonPathPipe, decorators: [{
|
|
4067
4203
|
type: Pipe,
|
|
4068
4204
|
args: [{
|
|
4069
4205
|
name: 'jsonPath',
|
|
@@ -4100,7 +4236,7 @@ class MngActionExecutorService {
|
|
|
4100
4236
|
throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);
|
|
4101
4237
|
}
|
|
4102
4238
|
const srcConfirmComponent = sourceComponent;
|
|
4103
|
-
|
|
4239
|
+
let confirmParams = {
|
|
4104
4240
|
key: srcConfirmComponent.getConfirmationServiceInstanceKey(action),
|
|
4105
4241
|
acceptVisible: false,
|
|
4106
4242
|
rejectVisible: false
|
|
@@ -4146,6 +4282,9 @@ class MngActionExecutorService {
|
|
|
4146
4282
|
confirmParams.reject = () => {
|
|
4147
4283
|
observer.error(new ActionRunResult(context, undefined, new ActionError(null, true)));
|
|
4148
4284
|
};
|
|
4285
|
+
if (action.runConfirmationConfigMapFn) {
|
|
4286
|
+
confirmParams = action.runConfirmationConfigMapFn(context, confirmParams);
|
|
4287
|
+
}
|
|
4149
4288
|
srcConfirmComponent.getConfirmationService().confirm(confirmParams);
|
|
4150
4289
|
});
|
|
4151
4290
|
return observable;
|
|
@@ -4263,17 +4402,38 @@ class MngActionExecutorService {
|
|
|
4263
4402
|
* @param sourceComponent Source activation component.
|
|
4264
4403
|
*/
|
|
4265
4404
|
activateAction(action, itemId, item, actionData, viewContainer, sourceComponent) {
|
|
4405
|
+
var _a;
|
|
4266
4406
|
if (action.type === ActionTypeEnum.Editor) {
|
|
4267
4407
|
let dialogComponent = this.defaultEditorDialogComponent;
|
|
4268
4408
|
let dialogClassName = '';
|
|
4269
4409
|
if (action instanceof ActionEditorDescriptor) {
|
|
4410
|
+
dialogClassName = (_a = action.dialogClassName) !== null && _a !== void 0 ? _a : 'mng-action-editor-dialog';
|
|
4411
|
+
let dialogSizeClassName = '';
|
|
4412
|
+
switch (action.dialogSize) {
|
|
4413
|
+
case ActionEditorDescriptor.DialogSizeEnum.ExtraSmall:
|
|
4414
|
+
dialogSizeClassName = 'mng-action-editor-dialog-xs';
|
|
4415
|
+
break;
|
|
4416
|
+
case ActionEditorDescriptor.DialogSizeEnum.Small:
|
|
4417
|
+
dialogSizeClassName = 'mng-action-editor-dialog-sm';
|
|
4418
|
+
break;
|
|
4419
|
+
case ActionEditorDescriptor.DialogSizeEnum.Large:
|
|
4420
|
+
dialogSizeClassName = 'mng-action-editor-dialog-lg';
|
|
4421
|
+
break;
|
|
4422
|
+
case ActionEditorDescriptor.DialogSizeEnum.ExtraLarge:
|
|
4423
|
+
dialogSizeClassName = 'mng-action-editor-dialog-xl';
|
|
4424
|
+
break;
|
|
4425
|
+
case ActionEditorDescriptor.DialogSizeEnum.Normal:
|
|
4426
|
+
default:
|
|
4427
|
+
break;
|
|
4428
|
+
}
|
|
4429
|
+
if (dialogSizeClassName.length) {
|
|
4430
|
+
dialogClassName += ` ${dialogSizeClassName}`;
|
|
4431
|
+
}
|
|
4270
4432
|
if (action.editorComponent) {
|
|
4271
4433
|
dialogComponent = action.editorComponent;
|
|
4272
4434
|
}
|
|
4273
|
-
if (action.dialogClassName) {
|
|
4274
|
-
dialogClassName = action.dialogClassName;
|
|
4275
|
-
}
|
|
4276
4435
|
}
|
|
4436
|
+
console.log(dialogClassName);
|
|
4277
4437
|
const dialogConfig = {
|
|
4278
4438
|
data: {
|
|
4279
4439
|
action
|
|
@@ -4391,9 +4551,9 @@ class MngActionExecutorService {
|
|
|
4391
4551
|
return this.errorMapper.toMngError(error, actionError);
|
|
4392
4552
|
}
|
|
4393
4553
|
}
|
|
4394
|
-
MngActionExecutorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4395
|
-
MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4554
|
+
MngActionExecutorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionExecutorService, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i3.DialogService }, { token: i2.ConfirmationService }, { token: i1$1.TranslateService }, { token: MngNavigationService }, { token: MngErrorMapperService }, { token: MngLinkFormatterPipe }, { token: ACTION_EDITOR_DIALOG_COMPONENT_SETTING }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4555
|
+
MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionExecutorService });
|
|
4556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionExecutorService, decorators: [{
|
|
4397
4557
|
type: Injectable
|
|
4398
4558
|
}], ctorParameters: function () {
|
|
4399
4559
|
return [{ type: i0.Injector }, { type: i1.Router }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: i1$1.TranslateService }, { type: MngNavigationService }, { type: MngErrorMapperService }, { type: MngLinkFormatterPipe }, { type: i0.Type, decorators: [{
|
|
@@ -4514,17 +4674,13 @@ class MngConfigurationService {
|
|
|
4514
4674
|
MngConfigurationService._instance = null;
|
|
4515
4675
|
|
|
4516
4676
|
class MngCommonsService {
|
|
4517
|
-
constructor(router, primengConfig, translate, titleService,
|
|
4677
|
+
constructor(router, primengConfig, translate, titleService, moduleConfig, localStorage) {
|
|
4518
4678
|
this.router = router;
|
|
4519
4679
|
this.primengConfig = primengConfig;
|
|
4520
4680
|
this.translate = translate;
|
|
4521
4681
|
this.titleService = titleService;
|
|
4522
|
-
this.configurationService = configurationService;
|
|
4523
4682
|
this.moduleConfig = moduleConfig;
|
|
4524
4683
|
this.localStorage = localStorage;
|
|
4525
|
-
this.commonsInitializers = commonsInitializers;
|
|
4526
|
-
// internal
|
|
4527
|
-
this.isInitialized = false;
|
|
4528
4684
|
// menu
|
|
4529
4685
|
this._menuMode = 'sidebar';
|
|
4530
4686
|
this._menuModeSubject = new BehaviorSubject(this._menuMode);
|
|
@@ -4659,71 +4815,55 @@ class MngCommonsService {
|
|
|
4659
4815
|
get user$() {
|
|
4660
4816
|
return this.userSubject.asObservable();
|
|
4661
4817
|
}
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
this.
|
|
4709
|
-
this.
|
|
4710
|
-
|
|
4711
|
-
this.router.events
|
|
4712
|
-
.pipe(
|
|
4713
|
-
// Filter the NavigationEnd events as the breadcrumb is updated only when the route reaches its end
|
|
4714
|
-
filter(event => event instanceof NavigationEnd))
|
|
4715
|
-
.subscribe(() => {
|
|
4716
|
-
this.updateBreadcrumbs();
|
|
4717
|
-
this.setPageTitle();
|
|
4718
|
-
});
|
|
4719
|
-
this.translate.onLangChange.subscribe(() => {
|
|
4720
|
-
this.updateBreadcrumbs();
|
|
4721
|
-
this.setPageTitle();
|
|
4722
|
-
});
|
|
4723
|
-
console.debug(`@mediusinc/mng-commons initialization complete.`);
|
|
4724
|
-
return true;
|
|
4725
|
-
}));
|
|
4726
|
-
this.isInitialized = true;
|
|
4818
|
+
reset() {
|
|
4819
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
4820
|
+
this._menuMode = (_c = (_b = (_a = this.moduleConfig) === null || _a === void 0 ? void 0 : _a.menu) === null || _b === void 0 ? void 0 : _b.mode) !== null && _c !== void 0 ? _c : 'sidebar';
|
|
4821
|
+
this._menuModeSubject.next(this._menuMode);
|
|
4822
|
+
this._menuItems = (_f = (_e = (_d = this.moduleConfig) === null || _d === void 0 ? void 0 : _d.menu) === null || _e === void 0 ? void 0 : _e.menuItems) !== null && _f !== void 0 ? _f : [];
|
|
4823
|
+
this._menuPinEnabled = (_j = (_h = (_g = this.moduleConfig) === null || _g === void 0 ? void 0 : _g.menu) === null || _h === void 0 ? void 0 : _h.pinEnabled) !== null && _j !== void 0 ? _j : false;
|
|
4824
|
+
// visual
|
|
4825
|
+
this._colorScheme = (_m = (_l = (_k = this.moduleConfig) === null || _k === void 0 ? void 0 : _k.app) === null || _l === void 0 ? void 0 : _l.colorScheme) !== null && _m !== void 0 ? _m : 'light';
|
|
4826
|
+
// ripple
|
|
4827
|
+
this.primengConfig.ripple = true;
|
|
4828
|
+
this.primengConfig.filterMatchModeOptions = {
|
|
4829
|
+
text: [
|
|
4830
|
+
FilterDescriptor.MatchModeEnum.Contains,
|
|
4831
|
+
FilterDescriptor.MatchModeEnum.Equals,
|
|
4832
|
+
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
4833
|
+
FilterDescriptor.MatchModeEnum.StartsWith,
|
|
4834
|
+
FilterDescriptor.MatchModeEnum.EndsWith
|
|
4835
|
+
],
|
|
4836
|
+
numeric: [
|
|
4837
|
+
FilterDescriptor.MatchModeEnum.Equals,
|
|
4838
|
+
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
4839
|
+
FilterDescriptor.MatchModeEnum.LessThanOrEqualTo,
|
|
4840
|
+
FilterDescriptor.MatchModeEnum.GreaterThanOrEqualTo
|
|
4841
|
+
],
|
|
4842
|
+
date: [
|
|
4843
|
+
FilterDescriptor.MatchModeEnum.DateIs,
|
|
4844
|
+
FilterDescriptor.MatchModeEnum.DateIsNot,
|
|
4845
|
+
FilterDescriptor.MatchModeEnum.DateBefore,
|
|
4846
|
+
FilterDescriptor.MatchModeEnum.DateAfter
|
|
4847
|
+
]
|
|
4848
|
+
};
|
|
4849
|
+
// translate
|
|
4850
|
+
this.translate.langs = this.appLanguages;
|
|
4851
|
+
this.translate.use(this.appLanguage);
|
|
4852
|
+
this.translate.get('mngPrime').subscribe(value => this.primengConfig.setTranslation(value));
|
|
4853
|
+
(_o = this.routerEventsSubscription) === null || _o === void 0 ? void 0 : _o.unsubscribe();
|
|
4854
|
+
this.routerEventsSubscription = this.router.events
|
|
4855
|
+
.pipe(
|
|
4856
|
+
// Filter the NavigationEnd events as the breadcrumb is updated only when the route reaches its end
|
|
4857
|
+
filter(event => event instanceof NavigationEnd))
|
|
4858
|
+
.subscribe(() => {
|
|
4859
|
+
this.updateBreadcrumbs();
|
|
4860
|
+
this.setPageTitle();
|
|
4861
|
+
});
|
|
4862
|
+
(_p = this.translateLangChangeSubscription) === null || _p === void 0 ? void 0 : _p.unsubscribe();
|
|
4863
|
+
this.translateLangChangeSubscription = this.translate.onLangChange.subscribe(() => {
|
|
4864
|
+
this.updateBreadcrumbs();
|
|
4865
|
+
this.setPageTitle();
|
|
4866
|
+
});
|
|
4727
4867
|
}
|
|
4728
4868
|
// MENU actions
|
|
4729
4869
|
menuChangeActiveKey(key) {
|
|
@@ -4863,22 +5003,17 @@ class MngCommonsService {
|
|
|
4863
5003
|
return titlePieces.join(' - ');
|
|
4864
5004
|
}
|
|
4865
5005
|
}
|
|
4866
|
-
MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4867
|
-
MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4868
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5006
|
+
MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsService, deps: [{ token: i1.Router }, { token: i2.PrimeNGConfig }, { token: i1$1.TranslateService }, { token: i4$1.Title }, { token: MNG_MODULE_CONFIG_IT }, { token: MNG_BROWSER_STORAGE_IT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5007
|
+
MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsService });
|
|
5008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsService, decorators: [{
|
|
4869
5009
|
type: Injectable
|
|
4870
5010
|
}], ctorParameters: function () {
|
|
4871
|
-
return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i1$1.TranslateService }, { type: i4$1.Title }, { type:
|
|
5011
|
+
return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i1$1.TranslateService }, { type: i4$1.Title }, { type: undefined, decorators: [{
|
|
4872
5012
|
type: Inject,
|
|
4873
5013
|
args: [MNG_MODULE_CONFIG_IT]
|
|
4874
5014
|
}] }, { type: Storage, decorators: [{
|
|
4875
5015
|
type: Inject,
|
|
4876
5016
|
args: [MNG_BROWSER_STORAGE_IT]
|
|
4877
|
-
}] }, { type: undefined, decorators: [{
|
|
4878
|
-
type: Inject,
|
|
4879
|
-
args: [MNG_COMMONS_INITIALIZER_IT]
|
|
4880
|
-
}, {
|
|
4881
|
-
type: Optional
|
|
4882
5017
|
}] }];
|
|
4883
5018
|
} });
|
|
4884
5019
|
|
|
@@ -4907,9 +5042,9 @@ class MngViewContainerComponentService {
|
|
|
4907
5042
|
return this._dataProvider;
|
|
4908
5043
|
}
|
|
4909
5044
|
}
|
|
4910
|
-
MngViewContainerComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4911
|
-
MngViewContainerComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5045
|
+
MngViewContainerComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngViewContainerComponentService, deps: [{ token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5046
|
+
MngViewContainerComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngViewContainerComponentService });
|
|
5047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngViewContainerComponentService, decorators: [{
|
|
4913
5048
|
type: Injectable
|
|
4914
5049
|
}], ctorParameters: function () { return [{ type: i2.MessageService }]; } });
|
|
4915
5050
|
|
|
@@ -4935,18 +5070,26 @@ class MngActionComponent {
|
|
|
4935
5070
|
this.loadingSubject = new ReplaySubject(1);
|
|
4936
5071
|
this.$loading = this.loadingSubject.asObservable();
|
|
4937
5072
|
this.cmpId = Math.random().toString(36).substring(2);
|
|
5073
|
+
this.isVisibleSubject = new ReplaySubject(1);
|
|
5074
|
+
this.$isVisible = this.isVisibleSubject.asObservable().pipe(distinctUntilChanged());
|
|
5075
|
+
this.isEnabledSubject = new ReplaySubject(1);
|
|
5076
|
+
this.$isEnabled = this.isEnabledSubject.asObservable().pipe(distinctUntilChanged());
|
|
5077
|
+
this.labelSubject = new ReplaySubject(1);
|
|
5078
|
+
this.$label = this.labelSubject.asObservable().pipe(distinctUntilChanged());
|
|
5079
|
+
this.tooltipSubject = new ReplaySubject(1);
|
|
5080
|
+
this.$tooltip = this.tooltipSubject.asObservable().pipe(distinctUntilChanged());
|
|
4938
5081
|
this.hasNoTitle = false;
|
|
4939
5082
|
this.loadingSubject.next(false);
|
|
4940
5083
|
}
|
|
4941
5084
|
ngOnInit() {
|
|
4942
|
-
var _a, _b
|
|
5085
|
+
var _a, _b;
|
|
4943
5086
|
this.viewContainer = (_b = (_a = this.viewContainerInit) !== null && _a !== void 0 ? _a : this.viewContainerService) !== null && _b !== void 0 ? _b : undefined;
|
|
4944
5087
|
this.hasNoTitle = this.action.title === null;
|
|
4945
|
-
|
|
4946
|
-
this
|
|
4947
|
-
this
|
|
4948
|
-
this
|
|
4949
|
-
this
|
|
5088
|
+
this.isEnabledSubject.next(true);
|
|
5089
|
+
this.isVisibleSubject.next(true);
|
|
5090
|
+
this.labelSubject.next(null);
|
|
5091
|
+
this.tooltipSubject.next(null);
|
|
5092
|
+
this.processSubscriptions();
|
|
4950
5093
|
if (this.action instanceof ActionLinkDescriptor) {
|
|
4951
5094
|
this.actionLink = this.action;
|
|
4952
5095
|
}
|
|
@@ -4954,6 +5097,19 @@ class MngActionComponent {
|
|
|
4954
5097
|
this.hostClass = this.action.className;
|
|
4955
5098
|
}
|
|
4956
5099
|
}
|
|
5100
|
+
ngOnChanges(changes) {
|
|
5101
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5102
|
+
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)) {
|
|
5103
|
+
this.processSubscriptions();
|
|
5104
|
+
}
|
|
5105
|
+
}
|
|
5106
|
+
ngOnDestroy() {
|
|
5107
|
+
var _a, _b, _c, _d;
|
|
5108
|
+
(_a = this.isVisibleSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
5109
|
+
(_b = this.isEnabledSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
5110
|
+
(_c = this.labelSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
5111
|
+
(_d = this.tooltipSubscription) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
5112
|
+
}
|
|
4957
5113
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4958
5114
|
triggerAction(event) {
|
|
4959
5115
|
this.loadingSubject.next(true);
|
|
@@ -4979,10 +5135,36 @@ class MngActionComponent {
|
|
|
4979
5135
|
getConfirmationServiceInstanceKey(action) {
|
|
4980
5136
|
return `${action.actionName}_${this.cmpId}`;
|
|
4981
5137
|
}
|
|
5138
|
+
processSubscriptions() {
|
|
5139
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5140
|
+
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);
|
|
5141
|
+
if (typeof this.action.isVisibleFunction === 'function') {
|
|
5142
|
+
(_b = this.isVisibleSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
5143
|
+
this.isVisibleSubscription = this.action.isVisibleFunction(context).subscribe({
|
|
5144
|
+
next: res => this.isVisibleSubject.next(res)
|
|
5145
|
+
});
|
|
5146
|
+
}
|
|
5147
|
+
if (typeof this.action.isEnabledFunction === 'function') {
|
|
5148
|
+
(_c = this.isEnabledSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
|
5149
|
+
this.isEnabledSubscription = this.action.isEnabledFunction(context).subscribe({
|
|
5150
|
+
next: res => this.isEnabledSubject.next(res)
|
|
5151
|
+
});
|
|
5152
|
+
}
|
|
5153
|
+
if (!this.hasNoTitle) {
|
|
5154
|
+
(_d = this.labelSubscription) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
|
5155
|
+
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({
|
|
5156
|
+
next: i18n => this.labelSubject.next(i18n)
|
|
5157
|
+
});
|
|
5158
|
+
}
|
|
5159
|
+
(_g = this.tooltipSubscription) === null || _g === void 0 ? void 0 : _g.unsubscribe();
|
|
5160
|
+
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({
|
|
5161
|
+
next: i18n => this.tooltipSubject.next(i18n)
|
|
5162
|
+
});
|
|
5163
|
+
}
|
|
4982
5164
|
}
|
|
4983
|
-
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4984
|
-
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
4985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5165
|
+
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", 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 });
|
|
5166
|
+
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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 });
|
|
5167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
4986
5168
|
type: Component,
|
|
4987
5169
|
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"] }]
|
|
4988
5170
|
}], ctorParameters: function () {
|
|
@@ -5130,9 +5312,9 @@ class MngActionRouteComponent {
|
|
|
5130
5312
|
return null;
|
|
5131
5313
|
}
|
|
5132
5314
|
}
|
|
5133
|
-
MngActionRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5134
|
-
MngActionRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5315
|
+
MngActionRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionRouteComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.ConfirmationService }, { token: MngNavigationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
5316
|
+
MngActionRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngActionRouteComponent, selector: "mng-action-route", providers: [MessageService, ConfirmationService], ngImport: i0, template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionRouteComponent, decorators: [{
|
|
5136
5318
|
type: Component,
|
|
5137
5319
|
args: [{ selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [MessageService, ConfirmationService], template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n" }]
|
|
5138
5320
|
}], ctorParameters: function () {
|
|
@@ -5166,9 +5348,9 @@ class MngComponentDirective {
|
|
|
5166
5348
|
return typeof cmp.setColumnValue === 'function';
|
|
5167
5349
|
}
|
|
5168
5350
|
}
|
|
5169
|
-
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5170
|
-
MngComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
5171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5351
|
+
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5352
|
+
MngComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: MngComponentDirective, selector: "[mngComponent]", inputs: { component: ["mngComponent", "component"], inputs: "inputs" }, outputs: { componentInstanceEventEmitter: "instanceCreated" }, ngImport: i0 });
|
|
5353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngComponentDirective, decorators: [{
|
|
5172
5354
|
type: Directive,
|
|
5173
5355
|
args: [{
|
|
5174
5356
|
selector: '[mngComponent]'
|
|
@@ -5195,9 +5377,9 @@ class MngTemplateDirective {
|
|
|
5195
5377
|
return this.viewContainerRef;
|
|
5196
5378
|
}
|
|
5197
5379
|
}
|
|
5198
|
-
MngTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5199
|
-
MngTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
5200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5380
|
+
MngTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTemplateDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5381
|
+
MngTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: { type: "type", name: ["mngTemplate", "name"] }, ngImport: i0 });
|
|
5382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTemplateDirective, decorators: [{
|
|
5201
5383
|
type: Directive,
|
|
5202
5384
|
args: [{
|
|
5203
5385
|
selector: '[mngTemplate]'
|
|
@@ -5363,9 +5545,9 @@ class MngFormEditorComponent {
|
|
|
5363
5545
|
this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;
|
|
5364
5546
|
}
|
|
5365
5547
|
}
|
|
5366
|
-
MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5367
|
-
MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5548
|
+
MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormEditorComponent, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5549
|
+
MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", isSubmitButtonVisible: "isSubmitButtonVisible", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", components: [{ type: i3$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormEditorComponent, decorators: [{
|
|
5369
5551
|
type: Component,
|
|
5370
5552
|
args: [{ selector: 'mng-form-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n" }]
|
|
5371
5553
|
}], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; }, propDecorators: { descriptor: [{
|
|
@@ -5614,9 +5796,9 @@ class MngAutocompleteComponent {
|
|
|
5614
5796
|
}
|
|
5615
5797
|
}
|
|
5616
5798
|
}
|
|
5617
|
-
MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5618
|
-
MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5799
|
+
MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngAutocompleteComponent, deps: [{ token: i0.Injector }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5800
|
+
MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", inlineSearch: "inlineSearch", openOnFocus: "openOnFocus", multiselect: "multiselect", placeholder: "placeholder", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", components: [{ type: i2$1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngAutocompleteComponent, decorators: [{
|
|
5620
5802
|
type: Component,
|
|
5621
5803
|
args: [{ selector: 'mng-autocomplete', providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
|
|
5622
5804
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }]; }, propDecorators: { dataProvider: [{
|
|
@@ -5764,9 +5946,9 @@ class MngDropdownComponent {
|
|
|
5764
5946
|
this.dropdownFormControl.setValue(obj, { emitEvent: false });
|
|
5765
5947
|
}
|
|
5766
5948
|
}
|
|
5767
|
-
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5768
|
-
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5769
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5949
|
+
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5950
|
+
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngDropdownComponent, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsDisabledProperty: "itemsDisabledProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n", components: [{ type: i2$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i3$3.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "virtualScroll", "itemSize", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "scrollHeight", "defaultLabel", "placeholder", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onPanelShow", "onPanelHide"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngDropdownComponent, decorators: [{
|
|
5770
5952
|
type: Component,
|
|
5771
5953
|
args: [{ selector: 'mng-dropdown', providers: [MNG_DROPDOWN_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n" }]
|
|
5772
5954
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }]; }, propDecorators: { dataProvider: [{
|
|
@@ -5985,9 +6167,9 @@ class MngActionEditorComponent {
|
|
|
5985
6167
|
this.subscriptions.push(subscription);
|
|
5986
6168
|
}
|
|
5987
6169
|
}
|
|
5988
|
-
MngActionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5989
|
-
MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6170
|
+
MngActionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionEditorComponent, deps: [{ token: i0.Injector }, { token: i1$1.TranslateService }, { token: MngActionExecutorService }, { token: MngCommonsService }, { token: MngNavigationService }, { token: i3.DynamicDialogRef, optional: true }, { token: i3.DynamicDialogConfig, optional: true }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
6171
|
+
MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngActionEditorComponent, selector: "mng-action-editor", inputs: { action: "action", itemId: "itemId", item: "item", actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], ngImport: i0, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n", components: [{ type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }, { type: i6.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { type: MngFormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "isSubmitButtonVisible", "isFormDisabled"], outputs: ["formSubmit"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionEditorComponent, decorators: [{
|
|
5991
6173
|
type: Component,
|
|
5992
6174
|
args: [{ selector: 'mng-action-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n" }]
|
|
5993
6175
|
}], ctorParameters: function () {
|
|
@@ -6031,39 +6213,99 @@ class MngFormlyFieldAutocompleteComponent extends FieldType {
|
|
|
6031
6213
|
this.descriptor = this.to['descriptor'];
|
|
6032
6214
|
}
|
|
6033
6215
|
}
|
|
6034
|
-
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6035
|
-
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6036
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6216
|
+
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6217
|
+
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldAutocompleteComponent, selector: "mng-formly-field-autocomplete", usesInheritance: true, ngImport: i0, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n", components: [{ type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
|
|
6037
6219
|
type: Component,
|
|
6038
6220
|
args: [{ selector: 'mng-formly-field-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n" }]
|
|
6039
6221
|
}] });
|
|
6040
6222
|
|
|
6041
6223
|
class MngFormlyFieldInputComponent extends FieldType {
|
|
6224
|
+
constructor() {
|
|
6225
|
+
super(...arguments);
|
|
6226
|
+
this.subscriptions = [];
|
|
6227
|
+
}
|
|
6042
6228
|
ngOnInit() {
|
|
6043
6229
|
this.iFormControl = this.formControl;
|
|
6044
6230
|
this.descriptor = this.to['descriptor'];
|
|
6231
|
+
// emit lifecycle event
|
|
6232
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {
|
|
6233
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6234
|
+
});
|
|
6235
|
+
// init values
|
|
6045
6236
|
if (this.to.type === 'datepicker' && typeof this.iFormControl.value === 'string') {
|
|
6046
6237
|
const dateObject = new Date(this.iFormControl.value);
|
|
6047
6238
|
this.iFormControl.setValue(dateObject);
|
|
6048
6239
|
}
|
|
6240
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
6241
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldInputComponent, this, {
|
|
6242
|
+
value: v
|
|
6243
|
+
});
|
|
6244
|
+
});
|
|
6245
|
+
this.subscriptions.push(subscription);
|
|
6246
|
+
}
|
|
6247
|
+
ngOnDestroy() {
|
|
6248
|
+
var _a;
|
|
6249
|
+
this.subscriptions.forEach(s => s.unsubscribe());
|
|
6250
|
+
// emit lifecycle event
|
|
6251
|
+
(_a = this.descriptor) === null || _a === void 0 ? void 0 : _a.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {
|
|
6252
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
6253
|
+
});
|
|
6049
6254
|
}
|
|
6050
6255
|
}
|
|
6051
|
-
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6052
|
-
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6256
|
+
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6257
|
+
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldInputComponent, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, 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", components: [{ type: i1$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i2$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabelledBy"], outputs: ["onChange"] }, { type: i3$1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i4$4.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }], directives: [{ type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$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]" }, { type: i9$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i10.InputText, selector: "[pInputText]" }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
6054
6259
|
type: Component,
|
|
6055
6260
|
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" }]
|
|
6056
6261
|
}] });
|
|
6057
6262
|
|
|
6263
|
+
class MngFormlyFieldLabelComponent {
|
|
6264
|
+
constructor() {
|
|
6265
|
+
this.className = 'hidden';
|
|
6266
|
+
}
|
|
6267
|
+
}
|
|
6268
|
+
MngFormlyFieldLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6269
|
+
MngFormlyFieldLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldLabelComponent, selector: "mng-formly-field-label", host: { properties: { "class": "this.className" } }, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLabelComponent, decorators: [{
|
|
6271
|
+
type: Component,
|
|
6272
|
+
args: [{ selector: 'mng-formly-field-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
|
|
6273
|
+
}], propDecorators: { className: [{
|
|
6274
|
+
type: HostBinding,
|
|
6275
|
+
args: ['class']
|
|
6276
|
+
}] } });
|
|
6277
|
+
|
|
6058
6278
|
class MngFormlyFieldDropdownComponent extends FieldType {
|
|
6279
|
+
constructor() {
|
|
6280
|
+
super(...arguments);
|
|
6281
|
+
this.subscriptions = [];
|
|
6282
|
+
}
|
|
6059
6283
|
ngOnInit() {
|
|
6060
6284
|
this.dFormControl = this.formControl;
|
|
6061
6285
|
this.descriptor = this.to['descriptor'];
|
|
6286
|
+
// emit lifecycle event
|
|
6287
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {
|
|
6288
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6289
|
+
});
|
|
6290
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
6291
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldDropdownComponent, this, {
|
|
6292
|
+
value: v
|
|
6293
|
+
});
|
|
6294
|
+
});
|
|
6295
|
+
this.subscriptions.push(subscription);
|
|
6296
|
+
}
|
|
6297
|
+
ngOnDestroy() {
|
|
6298
|
+
var _a;
|
|
6299
|
+
this.subscriptions.forEach(s => s.unsubscribe());
|
|
6300
|
+
// emit lifecycle event
|
|
6301
|
+
(_a = this.descriptor) === null || _a === void 0 ? void 0 : _a.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {
|
|
6302
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
6303
|
+
});
|
|
6062
6304
|
}
|
|
6063
6305
|
}
|
|
6064
|
-
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6065
|
-
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6066
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6306
|
+
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6307
|
+
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldDropdownComponent, selector: "mng-formly-field-dropdown", usesInheritance: true, ngImport: i0, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n", components: [{ type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
|
|
6067
6309
|
type: Component,
|
|
6068
6310
|
args: [{ selector: 'mng-formly-field-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n" }]
|
|
6069
6311
|
}] });
|
|
@@ -6148,9 +6390,9 @@ class MngTableColumnFilterComponent {
|
|
|
6148
6390
|
return this.lookupDescriptor.dataKeyProperty && value ? { [this.lookupDescriptor.dataKeyProperty]: value } : value;
|
|
6149
6391
|
}
|
|
6150
6392
|
}
|
|
6151
|
-
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6152
|
-
MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6393
|
+
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
6394
|
+
MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: { descriptor: "descriptor", display: "display" }, ngImport: i0, template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n", components: [{ type: i4$5.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping"] }, { type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName"], outputs: ["valueChange"] }, { type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName"], outputs: ["valueChange"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1$1.TranslatePipe } });
|
|
6395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
|
|
6154
6396
|
type: Component,
|
|
6155
6397
|
args: [{ selector: 'mng-table-column-filter', template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n" }]
|
|
6156
6398
|
}], ctorParameters: function () { return [{ type: i2.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
|
|
@@ -6181,9 +6423,9 @@ class MngTableColumnValueComponent {
|
|
|
6181
6423
|
}
|
|
6182
6424
|
}
|
|
6183
6425
|
}
|
|
6184
|
-
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6185
|
-
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6426
|
+
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6427
|
+
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n", directives: [{ type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }], pipes: { "jsonPath": JsonPathPipe, "number": i4.DecimalPipe, "date": i4.DatePipe, "boolean": MngBooleanPipe, "translate": i1$1.TranslatePipe, "enum": MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
6187
6429
|
type: Component,
|
|
6188
6430
|
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n" }]
|
|
6189
6431
|
}], propDecorators: { descriptor: [{
|
|
@@ -6219,9 +6461,6 @@ class MngTableComponent {
|
|
|
6219
6461
|
this.useDataProvider = false;
|
|
6220
6462
|
this.useQueryParamsInitialized = false;
|
|
6221
6463
|
this.dataProviderInfiniteScrollItems = [];
|
|
6222
|
-
// pagination, sort and filters
|
|
6223
|
-
this.rowsPerPageOptions = [25, 50, 100];
|
|
6224
|
-
this.rows = this.rowsPerPageOptions[0];
|
|
6225
6464
|
this.offset = 0;
|
|
6226
6465
|
this.multiSortMeta = null;
|
|
6227
6466
|
this.filterMetadata = {};
|
|
@@ -6247,6 +6486,8 @@ class MngTableComponent {
|
|
|
6247
6486
|
var _a, _b;
|
|
6248
6487
|
this.viewContainer = (_b = (_a = this.viewContainerInit) !== null && _a !== void 0 ? _a : this.viewContainerService) !== null && _b !== void 0 ? _b : undefined;
|
|
6249
6488
|
this.filterDescriptors = this.descriptor.columns.filter(c => typeof c.filterDescriptor !== 'undefined').map(c => c.filterDescriptor);
|
|
6489
|
+
this.rows = this.descriptor.defaultNumRows;
|
|
6490
|
+
this.rowsPerPageOptions = this.descriptor.rowsPerPageOptions;
|
|
6250
6491
|
if (this.descriptor.paginationMode === PaginationModeEnum.InfiniteScroll) {
|
|
6251
6492
|
this.infiniteScroll = true;
|
|
6252
6493
|
this.scrollHeight = 'flex';
|
|
@@ -6459,9 +6700,9 @@ class MngTableComponent {
|
|
|
6459
6700
|
}
|
|
6460
6701
|
}
|
|
6461
6702
|
}
|
|
6462
|
-
MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6463
|
-
MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MngTableComponent, selector: "mng-table", inputs: { descriptor: "descriptor", items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], ngImport: i0, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", components: [{ type: i4$5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$5.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$5.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$5.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6703
|
+
MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i1$1.TranslateService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
6704
|
+
MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTableComponent, selector: "mng-table", inputs: { descriptor: "descriptor", items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], ngImport: i0, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", components: [{ type: i4$5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i4$5.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { type: i4$5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { type: i4$5.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { type: i4$5.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { type: i7$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe, "i18nProperty": MngI18nPropertyPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableComponent, decorators: [{
|
|
6465
6706
|
type: Component,
|
|
6466
6707
|
args: [{ selector: 'mng-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n" }]
|
|
6467
6708
|
}], ctorParameters: function () {
|
|
@@ -6584,9 +6825,9 @@ class MngTableviewComponent {
|
|
|
6584
6825
|
}
|
|
6585
6826
|
}
|
|
6586
6827
|
}
|
|
6587
|
-
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6588
|
-
MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6828
|
+
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.MessageService }, { token: i1$1.TranslateService }, { token: i3.DialogService }, { token: i2.ConfirmationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6829
|
+
MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTableviewComponent, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowClickActions.length > 0\">\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 <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\">\n </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", components: [{ type: i6$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }, { type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "translate": i1$1.TranslatePipe } });
|
|
6830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
6590
6831
|
type: Component,
|
|
6591
6832
|
args: [{ selector: 'mng-tableview', providers: [MessageService, ConfirmationService, MngViewContainerComponentService], template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowClickActions.length > 0\">\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 <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\">\n </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
|
|
6592
6833
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.MessageService }, { type: i1$1.TranslateService }, { type: i3.DialogService }, { type: i2.ConfirmationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
|
|
@@ -6627,9 +6868,9 @@ class AMngTableviewRouteComponent {
|
|
|
6627
6868
|
return new ActionDeleteDescriptor(descriptor);
|
|
6628
6869
|
}
|
|
6629
6870
|
}
|
|
6630
|
-
AMngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6631
|
-
AMngTableviewRouteComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
6632
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6871
|
+
AMngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AMngTableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6872
|
+
AMngTableviewRouteComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: AMngTableviewRouteComponent, ngImport: i0 });
|
|
6873
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AMngTableviewRouteComponent, decorators: [{
|
|
6633
6874
|
type: Directive
|
|
6634
6875
|
}] });
|
|
6635
6876
|
|
|
@@ -6669,9 +6910,9 @@ class MngTableviewRouteComponent extends AMngTableviewRouteComponent {
|
|
|
6669
6910
|
return (_b = (_a = routeData === null || routeData === void 0 ? void 0 : routeData.tableview) === null || _a === void 0 ? void 0 : _a.actions) !== null && _b !== void 0 ? _b : super.createActionDescriptors();
|
|
6670
6911
|
}
|
|
6671
6912
|
}
|
|
6672
|
-
MngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6673
|
-
MngTableviewRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6674
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6913
|
+
MngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableviewRouteComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
6914
|
+
MngTableviewRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTableviewRouteComponent, selector: "mng-tableview-route", inputs: { descriptorInit: ["descriptor", "descriptorInit"], dataProviderInit: ["dataProvider", "dataProviderInit"], actionsInit: ["actions", "actionsInit"] }, usesInheritance: true, ngImport: i0, template: "<div class=\"grid\">\n <div class=\"col-12\">\n <mng-tableview [descriptor]=\"descriptor\" [dataProvider]=\"dataProvider\" [actions]=\"actions\"></mng-tableview>\n </div>\n</div>\n", components: [{ type: MngTableviewComponent, selector: "mng-tableview", inputs: ["descriptor", "dataProvider", "actions"] }] });
|
|
6915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableviewRouteComponent, decorators: [{
|
|
6675
6916
|
type: Component,
|
|
6676
6917
|
args: [{ selector: 'mng-tableview-route', template: "<div class=\"grid\">\n <div class=\"col-12\">\n <mng-tableview [descriptor]=\"descriptor\" [dataProvider]=\"dataProvider\" [actions]=\"actions\"></mng-tableview>\n </div>\n</div>\n" }]
|
|
6677
6918
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }]; }, propDecorators: { descriptorInit: [{
|
|
@@ -6839,9 +7080,9 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
6839
7080
|
}
|
|
6840
7081
|
}
|
|
6841
7082
|
}
|
|
6842
|
-
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6843
|
-
MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6844
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7083
|
+
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
7084
|
+
MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldLookupDialogComponent, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl?.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", components: [{ 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: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { type: i3$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], directives: [{ type: i4$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]" }, { type: i10.InputText, selector: "[pInputText]" }, { type: i3$1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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 });
|
|
7085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
6845
7086
|
type: Component,
|
|
6846
7087
|
args: [{ selector: 'mng-formly-field-lookup-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl?.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
6847
7088
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
|
|
@@ -6850,6 +7091,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6850
7091
|
}] } });
|
|
6851
7092
|
|
|
6852
7093
|
var SizeEnum = ActionDescriptor.SizeEnum;
|
|
7094
|
+
var DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum;
|
|
6853
7095
|
class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
6854
7096
|
constructor(actionExecutor) {
|
|
6855
7097
|
super();
|
|
@@ -6873,7 +7115,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6873
7115
|
const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)
|
|
6874
7116
|
.withPosition(ActionPositionEnum.RowClick)
|
|
6875
7117
|
.withTitle(null)
|
|
6876
|
-
.withDialogClassName('mng-
|
|
7118
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7119
|
+
.withDialogSize(DialogSizeEnum.Small);
|
|
6877
7120
|
viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
|
|
6878
7121
|
this.rowClickActions.push(viewAction);
|
|
6879
7122
|
}
|
|
@@ -6882,7 +7125,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6882
7125
|
.withPosition(ActionPositionEnum.ToolbarRight)
|
|
6883
7126
|
.withTitle(null)
|
|
6884
7127
|
.withIcon('pi pi-plus')
|
|
6885
|
-
.withDialogClassName('mng-
|
|
7128
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7129
|
+
.withDialogSize(DialogSizeEnum.Small)
|
|
6886
7130
|
.withSize(SizeEnum.ExtraSmall)
|
|
6887
7131
|
.withSubmitFunction(ctx => {
|
|
6888
7132
|
var _a;
|
|
@@ -6903,7 +7147,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6903
7147
|
const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)
|
|
6904
7148
|
.withTitle(null)
|
|
6905
7149
|
.withIcon('pi pi-pencil')
|
|
6906
|
-
.withDialogClassName('mng-
|
|
7150
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7151
|
+
.withDialogSize(DialogSizeEnum.Small)
|
|
6907
7152
|
.withSize(SizeEnum.ExtraSmall)
|
|
6908
7153
|
.withSubmitFunction(ctx => {
|
|
6909
7154
|
var _a, _b;
|
|
@@ -6994,9 +7239,9 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6994
7239
|
}
|
|
6995
7240
|
}
|
|
6996
7241
|
}
|
|
6997
|
-
MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6998
|
-
MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7242
|
+
MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: MngActionExecutorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7243
|
+
MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldTableDialogFormComponent, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\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 <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\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: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "dataProvider", "disabled", "loading", "viewContainer"], outputs: ["trigger"] }], directives: [{ type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
|
|
7000
7245
|
type: Component,
|
|
7001
7246
|
args: [{ selector: 'mng-formly-table-dialog-form-field', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\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 <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
|
|
7002
7247
|
}], ctorParameters: function () { return [{ type: MngActionExecutorService }]; } });
|
|
@@ -7108,47 +7353,55 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
7108
7353
|
}
|
|
7109
7354
|
}
|
|
7110
7355
|
}
|
|
7111
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7112
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7356
|
+
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
7357
|
+
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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 });
|
|
7358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
7114
7359
|
type: Component,
|
|
7115
|
-
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-
|
|
7360
|
+
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" }]
|
|
7116
7361
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
7117
7362
|
|
|
7118
7363
|
class MngFormlyFieldTabsComponent extends FieldType {
|
|
7119
7364
|
}
|
|
7120
|
-
MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7121
|
-
MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7365
|
+
MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7366
|
+
MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFormlyFieldTabsComponent, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", components: [{ type: i1$4.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i1$4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i3$1.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
|
|
7123
7368
|
type: Component,
|
|
7124
7369
|
args: [{ selector: 'mng-formly-field-tabs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n" }]
|
|
7125
7370
|
}] });
|
|
7126
7371
|
|
|
7127
7372
|
class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
7373
|
+
constructor() {
|
|
7374
|
+
super(...arguments);
|
|
7375
|
+
this.typeFieldset = FieldGroupDescriptor.TypeEnum.Fieldset;
|
|
7376
|
+
this.typeLogical = FieldGroupDescriptor.TypeEnum.Logical;
|
|
7377
|
+
}
|
|
7378
|
+
ngOnInit() {
|
|
7379
|
+
this.descriptor = this.to['descriptor'];
|
|
7380
|
+
}
|
|
7128
7381
|
}
|
|
7129
|
-
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7130
|
-
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7382
|
+
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7383
|
+
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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]=\"group?.templateOptions?.['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 });
|
|
7384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
|
|
7132
7385
|
type: Component,
|
|
7133
|
-
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 <
|
|
7386
|
+
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]=\"group?.templateOptions?.['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" }]
|
|
7134
7387
|
}] });
|
|
7135
7388
|
|
|
7136
7389
|
class MngFormlyFieldWrapperComponent extends FieldWrapper {
|
|
7137
7390
|
}
|
|
7138
|
-
MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7139
|
-
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7391
|
+
MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7392
|
+
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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 });
|
|
7393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
7141
7394
|
type: Component,
|
|
7142
|
-
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" }]
|
|
7395
|
+
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" }]
|
|
7143
7396
|
}] });
|
|
7144
7397
|
|
|
7145
7398
|
class MngFormlyTableWrapperComponent extends FieldWrapper {
|
|
7146
7399
|
}
|
|
7147
|
-
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7148
|
-
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7400
|
+
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7401
|
+
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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 });
|
|
7402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
|
|
7150
7403
|
type: Component,
|
|
7151
|
-
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" }]
|
|
7404
|
+
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" }]
|
|
7152
7405
|
}] });
|
|
7153
7406
|
|
|
7154
7407
|
class MngBreadcrumbComponent {
|
|
@@ -7156,9 +7409,9 @@ class MngBreadcrumbComponent {
|
|
|
7156
7409
|
this.mngCommons = mngCommons;
|
|
7157
7410
|
}
|
|
7158
7411
|
}
|
|
7159
|
-
MngBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7160
|
-
MngBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7412
|
+
MngBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBreadcrumbComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7413
|
+
MngBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngBreadcrumbComponent, selector: "mng-breadcrumb", ngImport: i0, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n", components: [{ type: i2$4.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBreadcrumbComponent, decorators: [{
|
|
7162
7415
|
type: Component,
|
|
7163
7416
|
args: [{ selector: 'mng-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n" }]
|
|
7164
7417
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
@@ -7169,9 +7422,9 @@ class MngFooterComponent {
|
|
|
7169
7422
|
this.currentYear = new Date().getFullYear();
|
|
7170
7423
|
}
|
|
7171
7424
|
}
|
|
7172
|
-
MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7173
|
-
MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7425
|
+
MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFooterComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7426
|
+
MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngFooterComponent, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", pipes: { "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFooterComponent, decorators: [{
|
|
7175
7428
|
type: Component,
|
|
7176
7429
|
args: [{ selector: 'mng-footer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n" }]
|
|
7177
7430
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
@@ -7358,9 +7611,9 @@ class MngMainLayoutComponentService {
|
|
|
7358
7611
|
return width <= 991;
|
|
7359
7612
|
}
|
|
7360
7613
|
}
|
|
7361
|
-
MngMainLayoutComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7362
|
-
MngMainLayoutComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
7363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7614
|
+
MngMainLayoutComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponentService, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7615
|
+
MngMainLayoutComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponentService });
|
|
7616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponentService, decorators: [{
|
|
7364
7617
|
type: Injectable
|
|
7365
7618
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
7366
7619
|
|
|
@@ -7507,8 +7760,8 @@ class MngMenuItemComponent {
|
|
|
7507
7760
|
}
|
|
7508
7761
|
}
|
|
7509
7762
|
}
|
|
7510
|
-
MngMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7511
|
-
MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7763
|
+
MngMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMenuItemComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7764
|
+
MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active" } }, ngImport: i0, template: "<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i8.Ripple, selector: "[pRipple]" }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe }, animations: [
|
|
7512
7765
|
trigger('children', [
|
|
7513
7766
|
state('void', style({
|
|
7514
7767
|
height: '0px'
|
|
@@ -7532,7 +7785,7 @@ MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
7532
7785
|
transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
7533
7786
|
])
|
|
7534
7787
|
] });
|
|
7535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMenuItemComponent, decorators: [{
|
|
7536
7789
|
type: Component,
|
|
7537
7790
|
args: [{ selector: '[mng-menuitem]', host: {
|
|
7538
7791
|
'[class.layout-root-menuitem]': 'root',
|
|
@@ -7577,9 +7830,9 @@ class MngMenuComponent {
|
|
|
7577
7830
|
this.mainLayoutService = mainLayoutService;
|
|
7578
7831
|
}
|
|
7579
7832
|
}
|
|
7580
|
-
MngMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7581
|
-
MngMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7833
|
+
MngMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMenuComponent, deps: [{ token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7834
|
+
MngMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngMenuComponent, selector: "mng-menu", ngImport: i0, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of mngCommons.menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n</div>\n", components: [{ type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"] }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMenuComponent, decorators: [{
|
|
7583
7836
|
type: Component,
|
|
7584
7837
|
args: [{ selector: 'mng-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of mngCommons.menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n</div>\n" }]
|
|
7585
7838
|
}], ctorParameters: function () { return [{ type: MngCommonsService }, { type: MngMainLayoutComponentService }]; } });
|
|
@@ -7619,9 +7872,9 @@ class MngTopbarComponent {
|
|
|
7619
7872
|
}
|
|
7620
7873
|
}
|
|
7621
7874
|
}
|
|
7622
|
-
MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7623
|
-
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7875
|
+
MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTopbarComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7876
|
+
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTopbarComponent, selector: "mng-topbar", viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", components: [{ type: i2$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i4.AsyncPipe, "translate": i1$1.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
7625
7878
|
type: Component,
|
|
7626
7879
|
args: [{ selector: 'mng-topbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n" }]
|
|
7627
7880
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; }, propDecorators: { templates: [{
|
|
@@ -7657,9 +7910,9 @@ class MngMainLayoutComponent {
|
|
|
7657
7910
|
this.mainLayoutService.innerWidth = (_a = target === null || target === void 0 ? void 0 : target.innerWidth) !== null && _a !== void 0 ? _a : window.innerWidth;
|
|
7658
7911
|
}
|
|
7659
7912
|
}
|
|
7660
|
-
MngMainLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7661
|
-
MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7662
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7913
|
+
MngMainLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7914
|
+
MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngMainLayoutComponent, selector: "mng-main-layout", host: { listeners: { "window:resize": "onWindowResize($event)" } }, providers: [MngMainLayoutComponentService], viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n", directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponent, decorators: [{
|
|
7663
7916
|
type: Component,
|
|
7664
7917
|
args: [{ selector: 'mng-main-layout', providers: [MngMainLayoutComponentService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n" }]
|
|
7665
7918
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; }, propDecorators: { templates: [{
|
|
@@ -7670,9 +7923,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
7670
7923
|
args: ['window:resize', ['$event']]
|
|
7671
7924
|
}] } });
|
|
7672
7925
|
|
|
7673
|
-
function mngCommonsInitializerProvider(
|
|
7674
|
-
return () =>
|
|
7926
|
+
function mngCommonsInitializerProvider(mngCommonsInit) {
|
|
7927
|
+
return () => mngCommonsInit.initialize();
|
|
7928
|
+
}
|
|
7929
|
+
|
|
7930
|
+
class MngCommonsInitService {
|
|
7931
|
+
constructor(translate, configurationService, mngCommons, commonsInitializers) {
|
|
7932
|
+
this.translate = translate;
|
|
7933
|
+
this.configurationService = configurationService;
|
|
7934
|
+
this.mngCommons = mngCommons;
|
|
7935
|
+
this.commonsInitializers = commonsInitializers;
|
|
7936
|
+
this.isInitialized = false;
|
|
7937
|
+
}
|
|
7938
|
+
initialize() {
|
|
7939
|
+
if (this.isInitialized) {
|
|
7940
|
+
return of(void 0);
|
|
7941
|
+
}
|
|
7942
|
+
console.debug(`Initializing @mediusinc/mng-commons.`);
|
|
7943
|
+
return this.configurationService.loadJsonSources().pipe(mergeMap$1(() => {
|
|
7944
|
+
if (this.commonsInitializers) {
|
|
7945
|
+
console.debug(`Module initializers for @mediusinc/mng-commons.`);
|
|
7946
|
+
return combineLatest(this.commonsInitializers.map(ci => ci())).pipe(map(res => res));
|
|
7947
|
+
}
|
|
7948
|
+
else {
|
|
7949
|
+
return of(true);
|
|
7950
|
+
}
|
|
7951
|
+
}), map(() => this.mngCommons.reset()));
|
|
7952
|
+
this.isInitialized = true;
|
|
7953
|
+
}
|
|
7675
7954
|
}
|
|
7955
|
+
MngCommonsInitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsInitService, deps: [{ token: i1$1.TranslateService }, { token: MngConfigurationService }, { token: MngCommonsService }, { token: MNG_COMMONS_INITIALIZER_IT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7956
|
+
MngCommonsInitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsInitService });
|
|
7957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsInitService, decorators: [{
|
|
7958
|
+
type: Injectable
|
|
7959
|
+
}], ctorParameters: function () {
|
|
7960
|
+
return [{ type: i1$1.TranslateService }, { type: MngConfigurationService }, { type: MngCommonsService }, { type: undefined, decorators: [{
|
|
7961
|
+
type: Inject,
|
|
7962
|
+
args: [MNG_COMMONS_INITIALIZER_IT]
|
|
7963
|
+
}, {
|
|
7964
|
+
type: Optional
|
|
7965
|
+
}] }];
|
|
7966
|
+
} });
|
|
7676
7967
|
|
|
7677
7968
|
const mngConfigurationServiceProvider = (httpClient, moduleConfig) => {
|
|
7678
7969
|
var _a;
|
|
@@ -7708,6 +7999,11 @@ const formlyWrappersConfig = [
|
|
|
7708
7999
|
{ name: 'field-table', component: MngFormlyTableWrapperComponent }
|
|
7709
8000
|
];
|
|
7710
8001
|
const formlyTypesConfig = [
|
|
8002
|
+
{
|
|
8003
|
+
name: 'label',
|
|
8004
|
+
component: MngFormlyFieldLabelComponent,
|
|
8005
|
+
wrappers: ['field']
|
|
8006
|
+
},
|
|
7711
8007
|
{
|
|
7712
8008
|
name: 'input',
|
|
7713
8009
|
component: MngFormlyFieldInputComponent,
|
|
@@ -7827,7 +8123,7 @@ function getMinLengthValidationMessage(translate) {
|
|
|
7827
8123
|
var _a, _b;
|
|
7828
8124
|
const fieldLabel = ((_a = field.templateOptions) === null || _a === void 0 ? void 0 : _a.label) || 'field';
|
|
7829
8125
|
const fieldName = translate.instant(fieldLabel);
|
|
7830
|
-
return translate.instant('mngEditor.validation.minLength', { field: fieldName,
|
|
8126
|
+
return translate.instant('mngEditor.validation.minLength', { field: fieldName, minLength: (_b = field.templateOptions) === null || _b === void 0 ? void 0 : _b.minLength });
|
|
7831
8127
|
};
|
|
7832
8128
|
}
|
|
7833
8129
|
function getMaxLengthValidationMessage(translate) {
|
|
@@ -7835,7 +8131,7 @@ function getMaxLengthValidationMessage(translate) {
|
|
|
7835
8131
|
var _a, _b;
|
|
7836
8132
|
const fieldLabel = ((_a = field.templateOptions) === null || _a === void 0 ? void 0 : _a.label) || 'field';
|
|
7837
8133
|
const fieldName = translate.instant(fieldLabel);
|
|
7838
|
-
return translate.instant('mngEditor.validation.maxLength', { field: fieldName,
|
|
8134
|
+
return translate.instant('mngEditor.validation.maxLength', { field: fieldName, maxLength: (_b = field.templateOptions) === null || _b === void 0 ? void 0 : _b.maxLength });
|
|
7839
8135
|
};
|
|
7840
8136
|
}
|
|
7841
8137
|
function getTextPatternValidationMessage(translate) {
|
|
@@ -7957,6 +8253,7 @@ const declarations = [
|
|
|
7957
8253
|
MngFormlyTableWrapperComponent,
|
|
7958
8254
|
// formly fields
|
|
7959
8255
|
MngFormlyFieldInputComponent,
|
|
8256
|
+
MngFormlyFieldLabelComponent,
|
|
7960
8257
|
MngFormlyFieldDropdownComponent,
|
|
7961
8258
|
MngFormlyFieldAutocompleteComponent,
|
|
7962
8259
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -7985,6 +8282,7 @@ class MngCommonsModule {
|
|
|
7985
8282
|
DialogService,
|
|
7986
8283
|
MessageService,
|
|
7987
8284
|
ConfirmationService,
|
|
8285
|
+
MngCommonsInitService,
|
|
7988
8286
|
MngActionExecutorService,
|
|
7989
8287
|
MngNavigationService,
|
|
7990
8288
|
MngCommonsService,
|
|
@@ -8014,7 +8312,7 @@ class MngCommonsModule {
|
|
|
8014
8312
|
{
|
|
8015
8313
|
provide: APP_INITIALIZER,
|
|
8016
8314
|
useFactory: mngCommonsInitializerProvider,
|
|
8017
|
-
deps: [
|
|
8315
|
+
deps: [MngCommonsInitService],
|
|
8018
8316
|
multi: true
|
|
8019
8317
|
},
|
|
8020
8318
|
{
|
|
@@ -8035,8 +8333,8 @@ class MngCommonsModule {
|
|
|
8035
8333
|
};
|
|
8036
8334
|
}
|
|
8037
8335
|
}
|
|
8038
|
-
MngCommonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
8039
|
-
MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
8336
|
+
MngCommonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8337
|
+
MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, declarations: [
|
|
8040
8338
|
// directives
|
|
8041
8339
|
MngComponentDirective,
|
|
8042
8340
|
MngTemplateDirective,
|
|
@@ -8061,6 +8359,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
8061
8359
|
MngFormlyTableWrapperComponent,
|
|
8062
8360
|
// formly fields
|
|
8063
8361
|
MngFormlyFieldInputComponent,
|
|
8362
|
+
MngFormlyFieldLabelComponent,
|
|
8064
8363
|
MngFormlyFieldDropdownComponent,
|
|
8065
8364
|
MngFormlyFieldAutocompleteComponent,
|
|
8066
8365
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -8176,6 +8475,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
8176
8475
|
MngFormlyTableWrapperComponent,
|
|
8177
8476
|
// formly fields
|
|
8178
8477
|
MngFormlyFieldInputComponent,
|
|
8478
|
+
MngFormlyFieldLabelComponent,
|
|
8179
8479
|
MngFormlyFieldDropdownComponent,
|
|
8180
8480
|
MngFormlyFieldAutocompleteComponent,
|
|
8181
8481
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -8194,7 +8494,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
8194
8494
|
MngActionComponent,
|
|
8195
8495
|
MngActionEditorComponent,
|
|
8196
8496
|
MngActionRouteComponent] });
|
|
8197
|
-
MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
8497
|
+
MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, imports: [[
|
|
8198
8498
|
// angular modules
|
|
8199
8499
|
CommonModule,
|
|
8200
8500
|
RouterModule,
|
|
@@ -8240,7 +8540,7 @@ MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
8240
8540
|
FieldsetModule,
|
|
8241
8541
|
MultiSelectModule,
|
|
8242
8542
|
SkeletonModule] });
|
|
8243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
8543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, decorators: [{
|
|
8244
8544
|
type: NgModule,
|
|
8245
8545
|
args: [{
|
|
8246
8546
|
imports: [
|
|
@@ -8267,11 +8567,22 @@ class AMngBaseApiService {
|
|
|
8267
8567
|
this.objectSerializer = ObjectSerializer.get();
|
|
8268
8568
|
}
|
|
8269
8569
|
getUrl(...pathSegments) {
|
|
8270
|
-
let
|
|
8271
|
-
if (
|
|
8570
|
+
let baseUrl = this.getBasePath();
|
|
8571
|
+
if (baseUrl.endsWith('/')) {
|
|
8572
|
+
baseUrl = baseUrl.substring(0, baseUrl.length - 1);
|
|
8573
|
+
}
|
|
8574
|
+
const serviceBasePath = this.getServiceBasePath();
|
|
8575
|
+
let path = [serviceBasePath, ...pathSegments].filter(s => s && s.length).join('/');
|
|
8576
|
+
// omit first and last '/'
|
|
8577
|
+
if (path.startsWith('/')) {
|
|
8272
8578
|
path = path.substring(1);
|
|
8273
8579
|
}
|
|
8274
|
-
|
|
8580
|
+
if (path.endsWith('/')) {
|
|
8581
|
+
path = path.substring(0, path.length - 1);
|
|
8582
|
+
}
|
|
8583
|
+
// replace any double '//' from path that could come from joining paths
|
|
8584
|
+
path = path.replace('//', '/');
|
|
8585
|
+
return `${baseUrl}/${path}`;
|
|
8275
8586
|
}
|
|
8276
8587
|
serializeQueryParam(queryParam, type = 'QueryParam') {
|
|
8277
8588
|
return this.objectSerializer.serialize(queryParam, type);
|
|
@@ -8331,7 +8642,7 @@ class AMngCrudApiService extends AMngGetAllApiService {
|
|
|
8331
8642
|
super(type, queryResultType, http);
|
|
8332
8643
|
}
|
|
8333
8644
|
createPost(item, params) {
|
|
8334
|
-
const url = this.getUrl(this.getCreatePostPath());
|
|
8645
|
+
const url = this.getUrl(this.getCreatePostPath(item));
|
|
8335
8646
|
return this.http
|
|
8336
8647
|
.post(url, this.serialize(item), {
|
|
8337
8648
|
withCredentials: true,
|
|
@@ -8375,7 +8686,7 @@ class AMngCrudApiService extends AMngGetAllApiService {
|
|
|
8375
8686
|
})
|
|
8376
8687
|
.pipe(map(res => this.deserialize(res)));
|
|
8377
8688
|
}
|
|
8378
|
-
getCreatePostPath() {
|
|
8689
|
+
getCreatePostPath(item) {
|
|
8379
8690
|
return '';
|
|
8380
8691
|
}
|
|
8381
8692
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -8853,5 +9164,5 @@ class RouteDataBuilder {
|
|
|
8853
9164
|
* Generated bundle index. Do not edit.
|
|
8854
9165
|
*/
|
|
8855
9166
|
|
|
8856
|
-
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,
|
|
9167
|
+
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, FieldValidationDescriptor, 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 };
|
|
8857
9168
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|