@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
|
}
|
|
@@ -721,6 +738,10 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
721
738
|
this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
722
739
|
return this;
|
|
723
740
|
}
|
|
741
|
+
withDialogSize(size = ActionEditorDescriptor.DialogSizeEnum.Normal) {
|
|
742
|
+
this._dialogSize = size;
|
|
743
|
+
return this;
|
|
744
|
+
}
|
|
724
745
|
withDialogClassName(className) {
|
|
725
746
|
this._dialogClassName = className;
|
|
726
747
|
return this;
|
|
@@ -755,6 +776,16 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
755
776
|
return this;
|
|
756
777
|
}
|
|
757
778
|
}
|
|
779
|
+
(function (ActionEditorDescriptor) {
|
|
780
|
+
let DialogSizeEnum;
|
|
781
|
+
(function (DialogSizeEnum) {
|
|
782
|
+
DialogSizeEnum[DialogSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
783
|
+
DialogSizeEnum[DialogSizeEnum["Small"] = 1] = "Small";
|
|
784
|
+
DialogSizeEnum[DialogSizeEnum["Normal"] = 2] = "Normal";
|
|
785
|
+
DialogSizeEnum[DialogSizeEnum["Large"] = 3] = "Large";
|
|
786
|
+
DialogSizeEnum[DialogSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
787
|
+
})(DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum || (ActionEditorDescriptor.DialogSizeEnum = {}));
|
|
788
|
+
})(ActionEditorDescriptor || (ActionEditorDescriptor = {}));
|
|
758
789
|
class ActionEditorSubmitDescriptor extends ActionDescriptor {
|
|
759
790
|
constructor(editorAction, submitType = ActionEditorSubmitDescriptor.TypeEnum.Submit) {
|
|
760
791
|
super(editorAction.model, submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'submit' : 'cancel');
|
|
@@ -783,7 +814,6 @@ class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
|
|
|
783
814
|
? ctx.dataProvider.fetch(ctx.data?.itemId, ctx.serviceInstance)
|
|
784
815
|
: throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`)));
|
|
785
816
|
this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
|
|
786
|
-
this.withDialogClassName('mng-details-dynamic-dialog');
|
|
787
817
|
}
|
|
788
818
|
withServiceType(serviceType) {
|
|
789
819
|
return this.withServiceFetchFunction(serviceType);
|
|
@@ -806,7 +836,6 @@ class ActionEditorAddDescriptor extends ActionEditorDescriptor {
|
|
|
806
836
|
this.withSubmitFunction(ctx => ctx.dataProvider?.create ? ctx.dataProvider.create(ctx.data?.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`)));
|
|
807
837
|
this.withLevel(ActionLevelEnum.Success);
|
|
808
838
|
this.withIcon('pi pi-plus');
|
|
809
|
-
this.withDialogClassName('mng-details-dynamic-dialog');
|
|
810
839
|
}
|
|
811
840
|
withServiceType(serviceType) {
|
|
812
841
|
return this.withServiceSubmitFunction(serviceType);
|
|
@@ -837,7 +866,6 @@ class ActionEditorEditDescriptor extends ActionEditorDescriptor {
|
|
|
837
866
|
? ctx.dataProvider.update(ctx.data.itemId, ctx.data?.item, ctx.serviceInstance)
|
|
838
867
|
: throwError(new Error(`Data provider update function or item id ${ctx.data?.itemId} is missing.`)));
|
|
839
868
|
this.withIcon('pi pi-pencil');
|
|
840
|
-
this.withDialogClassName('mng-details-dynamic-dialog');
|
|
841
869
|
}
|
|
842
870
|
withServiceType(serviceType) {
|
|
843
871
|
return this.withServiceSubmitFunction(serviceType);
|
|
@@ -1498,9 +1526,9 @@ class EditorDescriptor {
|
|
|
1498
1526
|
this._disabled = disabled;
|
|
1499
1527
|
return this;
|
|
1500
1528
|
}
|
|
1501
|
-
|
|
1529
|
+
addValidation(name, validator, message) {
|
|
1502
1530
|
if (this._currentGroup) {
|
|
1503
|
-
this._currentGroup.
|
|
1531
|
+
this._currentGroup.withValidation(name, validator, message);
|
|
1504
1532
|
}
|
|
1505
1533
|
}
|
|
1506
1534
|
copy() {
|
|
@@ -1609,7 +1637,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1609
1637
|
super(editor);
|
|
1610
1638
|
this._required = false;
|
|
1611
1639
|
this._disabled = false;
|
|
1612
|
-
this.
|
|
1640
|
+
this._validations = [];
|
|
1613
1641
|
this._className = '';
|
|
1614
1642
|
this._labelClassName = '';
|
|
1615
1643
|
this._inputClassName = '';
|
|
@@ -1648,8 +1676,8 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1648
1676
|
get setter() {
|
|
1649
1677
|
return this._setter;
|
|
1650
1678
|
}
|
|
1651
|
-
get
|
|
1652
|
-
return this.
|
|
1679
|
+
get validations() {
|
|
1680
|
+
return this._validations;
|
|
1653
1681
|
}
|
|
1654
1682
|
get requiredExpression() {
|
|
1655
1683
|
return this._requiredExpression;
|
|
@@ -1663,6 +1691,9 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1663
1691
|
get className() {
|
|
1664
1692
|
return this._className;
|
|
1665
1693
|
}
|
|
1694
|
+
get fieldClassName() {
|
|
1695
|
+
return this._fieldClassName;
|
|
1696
|
+
}
|
|
1666
1697
|
get labelClassName() {
|
|
1667
1698
|
return this._labelClassName;
|
|
1668
1699
|
}
|
|
@@ -1720,14 +1751,15 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1720
1751
|
this._setter = setter;
|
|
1721
1752
|
return this;
|
|
1722
1753
|
}
|
|
1723
|
-
|
|
1724
|
-
this.
|
|
1754
|
+
withValidation(name, validator, message) {
|
|
1755
|
+
this._validations.push(new FieldValidationDescriptor(name, validator, message));
|
|
1725
1756
|
return this;
|
|
1726
1757
|
}
|
|
1727
|
-
withClassName(className, labelClassName = '', inputClassName = '') {
|
|
1758
|
+
withClassName(className, labelClassName = '', inputClassName = '', fieldClassName) {
|
|
1728
1759
|
this._className = className;
|
|
1729
1760
|
this._labelClassName = labelClassName;
|
|
1730
1761
|
this._inputClassName = inputClassName;
|
|
1762
|
+
this._fieldClassName = fieldClassName;
|
|
1731
1763
|
return this;
|
|
1732
1764
|
}
|
|
1733
1765
|
withSize(size = FieldDescriptor.SizeEnum.Normal) {
|
|
@@ -1754,7 +1786,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1754
1786
|
obj._size = this.size;
|
|
1755
1787
|
obj._getter = this._getter;
|
|
1756
1788
|
obj._setter = this._setter;
|
|
1757
|
-
obj.
|
|
1789
|
+
obj._validations = this._validations;
|
|
1758
1790
|
}
|
|
1759
1791
|
}
|
|
1760
1792
|
var FieldDescriptor;
|
|
@@ -1836,13 +1868,17 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1836
1868
|
this._fieldType = FieldInputDescriptor.TypeEnum.Hidden;
|
|
1837
1869
|
return this;
|
|
1838
1870
|
}
|
|
1871
|
+
asLabel() {
|
|
1872
|
+
this._fieldType = FieldInputDescriptor.TypeEnum.Label;
|
|
1873
|
+
return this;
|
|
1874
|
+
}
|
|
1839
1875
|
asText(minLength, maxLength, pattern, isEmail) {
|
|
1840
1876
|
this._fieldType = FieldInputDescriptor.TypeEnum.Text;
|
|
1841
1877
|
this._minLength = minLength;
|
|
1842
1878
|
this._maxLength = maxLength;
|
|
1843
1879
|
this._pattern = pattern;
|
|
1844
1880
|
if (isEmail) {
|
|
1845
|
-
this.
|
|
1881
|
+
this.withValidation('email', control => Validators.email(control));
|
|
1846
1882
|
}
|
|
1847
1883
|
return this;
|
|
1848
1884
|
}
|
|
@@ -1931,14 +1967,15 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
1931
1967
|
let TypeEnum;
|
|
1932
1968
|
(function (TypeEnum) {
|
|
1933
1969
|
TypeEnum[TypeEnum["Hidden"] = 0] = "Hidden";
|
|
1934
|
-
TypeEnum[TypeEnum["
|
|
1935
|
-
TypeEnum[TypeEnum["
|
|
1936
|
-
TypeEnum[TypeEnum["
|
|
1937
|
-
TypeEnum[TypeEnum["
|
|
1938
|
-
TypeEnum[TypeEnum["
|
|
1939
|
-
TypeEnum[TypeEnum["
|
|
1940
|
-
TypeEnum[TypeEnum["
|
|
1941
|
-
TypeEnum[TypeEnum["
|
|
1970
|
+
TypeEnum[TypeEnum["Label"] = 1] = "Label";
|
|
1971
|
+
TypeEnum[TypeEnum["Text"] = 2] = "Text";
|
|
1972
|
+
TypeEnum[TypeEnum["Textarea"] = 3] = "Textarea";
|
|
1973
|
+
TypeEnum[TypeEnum["Number"] = 4] = "Number";
|
|
1974
|
+
TypeEnum[TypeEnum["Switch"] = 5] = "Switch";
|
|
1975
|
+
TypeEnum[TypeEnum["Radio"] = 6] = "Radio";
|
|
1976
|
+
TypeEnum[TypeEnum["Datepicker"] = 7] = "Datepicker";
|
|
1977
|
+
TypeEnum[TypeEnum["Mask"] = 8] = "Mask";
|
|
1978
|
+
TypeEnum[TypeEnum["Custom"] = 9] = "Custom";
|
|
1942
1979
|
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
1943
1980
|
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
1944
1981
|
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
@@ -2096,6 +2133,16 @@ class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
|
2096
2133
|
}
|
|
2097
2134
|
return this;
|
|
2098
2135
|
}
|
|
2136
|
+
withDefaultValueEnum(defaultValue) {
|
|
2137
|
+
const defaultOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, defaultValue) : defaultValue;
|
|
2138
|
+
if (defaultOptionValue) {
|
|
2139
|
+
const option = this._optionEnumValues.find(o => o.value === defaultOptionValue);
|
|
2140
|
+
if (option) {
|
|
2141
|
+
this.withDefaultValue(option);
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
return this;
|
|
2145
|
+
}
|
|
2099
2146
|
asAutocomplete(openOnFocus = true) {
|
|
2100
2147
|
super.asAutocomplete(openOnFocus, true);
|
|
2101
2148
|
return this;
|
|
@@ -2266,15 +2313,15 @@ class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
|
2266
2313
|
constructor(editor, name) {
|
|
2267
2314
|
super(editor);
|
|
2268
2315
|
this._fields = [];
|
|
2269
|
-
this.
|
|
2316
|
+
this._validations = [];
|
|
2270
2317
|
this._name = `${this.baseName}${name}`;
|
|
2271
2318
|
this._default = name === EditorDescriptor.defaultGroupName;
|
|
2272
2319
|
}
|
|
2273
2320
|
get title() {
|
|
2274
2321
|
return this._title;
|
|
2275
2322
|
}
|
|
2276
|
-
get
|
|
2277
|
-
return this.
|
|
2323
|
+
get validations() {
|
|
2324
|
+
return this._validations;
|
|
2278
2325
|
}
|
|
2279
2326
|
get baseName() {
|
|
2280
2327
|
return `${this.groupName()}_`;
|
|
@@ -2289,8 +2336,8 @@ class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
|
2289
2336
|
this._title = title;
|
|
2290
2337
|
return this;
|
|
2291
2338
|
}
|
|
2292
|
-
|
|
2293
|
-
this.
|
|
2339
|
+
withValidation(name, validator, message) {
|
|
2340
|
+
this._validations.push(new FieldValidationDescriptor(name, validator, message));
|
|
2294
2341
|
return this;
|
|
2295
2342
|
}
|
|
2296
2343
|
}
|
|
@@ -2318,6 +2365,13 @@ class FieldTabGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2318
2365
|
class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
2319
2366
|
constructor(editor, name) {
|
|
2320
2367
|
super(editor, name);
|
|
2368
|
+
this._type = FieldGroupDescriptor.TypeEnum.Fieldset;
|
|
2369
|
+
if (this._default) {
|
|
2370
|
+
this.asLogical();
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
get type() {
|
|
2374
|
+
return this._type;
|
|
2321
2375
|
}
|
|
2322
2376
|
get fields() {
|
|
2323
2377
|
return this._fields;
|
|
@@ -2329,26 +2383,38 @@ class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2329
2383
|
this._fields.push(field);
|
|
2330
2384
|
return this;
|
|
2331
2385
|
}
|
|
2386
|
+
asLogical() {
|
|
2387
|
+
this._type = FieldGroupDescriptor.TypeEnum.Logical;
|
|
2388
|
+
return this;
|
|
2389
|
+
}
|
|
2332
2390
|
copy() {
|
|
2333
2391
|
const group = new FieldGroupDescriptor(this._editor, this.name.substring(this.baseName.length));
|
|
2392
|
+
group._type = this._type;
|
|
2334
2393
|
group._title = this._title;
|
|
2335
2394
|
group._fields = this.fields.map(f => f.copy());
|
|
2336
2395
|
return group;
|
|
2337
2396
|
}
|
|
2338
2397
|
}
|
|
2398
|
+
(function (FieldGroupDescriptor) {
|
|
2399
|
+
let TypeEnum;
|
|
2400
|
+
(function (TypeEnum) {
|
|
2401
|
+
TypeEnum[TypeEnum["Fieldset"] = 0] = "Fieldset";
|
|
2402
|
+
TypeEnum[TypeEnum["Logical"] = 1] = "Logical";
|
|
2403
|
+
})(TypeEnum = FieldGroupDescriptor.TypeEnum || (FieldGroupDescriptor.TypeEnum = {}));
|
|
2404
|
+
})(FieldGroupDescriptor || (FieldGroupDescriptor = {}));
|
|
2339
2405
|
|
|
2340
|
-
class
|
|
2341
|
-
constructor(name,
|
|
2406
|
+
class FieldValidationDescriptor {
|
|
2407
|
+
constructor(name, validator, message, options) {
|
|
2342
2408
|
this._name = name;
|
|
2343
|
-
this.
|
|
2409
|
+
this._validator = validator;
|
|
2344
2410
|
this._message = message;
|
|
2345
2411
|
this._options = options;
|
|
2346
2412
|
}
|
|
2347
2413
|
get name() {
|
|
2348
2414
|
return this._name;
|
|
2349
2415
|
}
|
|
2350
|
-
get
|
|
2351
|
-
return this.
|
|
2416
|
+
get validator() {
|
|
2417
|
+
return this._validator;
|
|
2352
2418
|
}
|
|
2353
2419
|
get message() {
|
|
2354
2420
|
return this._message;
|
|
@@ -2395,6 +2461,8 @@ class TableDescriptor {
|
|
|
2395
2461
|
constructor(modelType, idProperty, titleProperty) {
|
|
2396
2462
|
this._filterDisplay = TableDescriptor.FilterDisplayEnum.Menu;
|
|
2397
2463
|
this._paginationMode = TableDescriptor.PaginationModeEnum.Pagination;
|
|
2464
|
+
this._rowsPerPageOptions = [25, 50, 100];
|
|
2465
|
+
this._defaultNumRows = this._rowsPerPageOptions[0];
|
|
2398
2466
|
this._columns = [];
|
|
2399
2467
|
this._hideHeader = false;
|
|
2400
2468
|
this._hasDefaultSort = false;
|
|
@@ -2403,6 +2471,7 @@ class TableDescriptor {
|
|
|
2403
2471
|
this._rowHeight = 45;
|
|
2404
2472
|
this._tableFullHeightOffset = 315;
|
|
2405
2473
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
2474
|
+
this._dataKeyProperty = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;
|
|
2406
2475
|
}
|
|
2407
2476
|
get filterDisplay() {
|
|
2408
2477
|
return this._filterDisplay;
|
|
@@ -2410,6 +2479,12 @@ class TableDescriptor {
|
|
|
2410
2479
|
get paginationMode() {
|
|
2411
2480
|
return this._paginationMode;
|
|
2412
2481
|
}
|
|
2482
|
+
get rowsPerPageOptions() {
|
|
2483
|
+
return this._rowsPerPageOptions;
|
|
2484
|
+
}
|
|
2485
|
+
get defaultNumRows() {
|
|
2486
|
+
return this._defaultNumRows;
|
|
2487
|
+
}
|
|
2413
2488
|
get columns() {
|
|
2414
2489
|
return this._columns;
|
|
2415
2490
|
}
|
|
@@ -2442,48 +2517,41 @@ class TableDescriptor {
|
|
|
2442
2517
|
}
|
|
2443
2518
|
addColumnDescriptor(column) {
|
|
2444
2519
|
this._columns.push(column);
|
|
2445
|
-
this.setDataKeyFromColumn();
|
|
2446
2520
|
return this;
|
|
2447
2521
|
}
|
|
2448
2522
|
addColumn(property) {
|
|
2449
2523
|
const column = new ColumnDescriptor(this, property);
|
|
2450
2524
|
this._columns.push(column);
|
|
2451
|
-
this.setDataKeyFromColumn();
|
|
2452
2525
|
return column;
|
|
2453
2526
|
}
|
|
2454
2527
|
addColumnNumber(property, displayFormat) {
|
|
2455
2528
|
const column = new ColumnDescriptor(this, property);
|
|
2456
2529
|
column.asNumber(displayFormat);
|
|
2457
2530
|
this._columns.push(column);
|
|
2458
|
-
this.setDataKeyFromColumn();
|
|
2459
2531
|
return column;
|
|
2460
2532
|
}
|
|
2461
2533
|
addColumnDate(property, displayFormat) {
|
|
2462
2534
|
const column = new ColumnDescriptor(this, property);
|
|
2463
2535
|
column.asDate(displayFormat);
|
|
2464
2536
|
this._columns.push(column);
|
|
2465
|
-
this.setDataKeyFromColumn();
|
|
2466
2537
|
return column;
|
|
2467
2538
|
}
|
|
2468
2539
|
addColumnBoolean(property, yes, no, asIcon = false) {
|
|
2469
2540
|
const column = new ColumnDescriptor(this, property);
|
|
2470
2541
|
column.asBoolean(yes, no, asIcon);
|
|
2471
2542
|
this._columns.push(column);
|
|
2472
|
-
this.setDataKeyFromColumn();
|
|
2473
2543
|
return column;
|
|
2474
2544
|
}
|
|
2475
2545
|
addColumnEnum(property, enumType, nameAsValue = false, titlePath) {
|
|
2476
2546
|
const column = new ColumnDescriptor(this, property);
|
|
2477
2547
|
column.asEnum(enumType, nameAsValue, titlePath);
|
|
2478
2548
|
this._columns.push(column);
|
|
2479
|
-
this.setDataKeyFromColumn();
|
|
2480
2549
|
return column;
|
|
2481
2550
|
}
|
|
2482
2551
|
addColumnCustomComponent(property, customComponentType) {
|
|
2483
2552
|
const column = new ColumnDescriptor(this, property);
|
|
2484
2553
|
column.asCustomComponent(customComponentType);
|
|
2485
2554
|
this._columns.push(column);
|
|
2486
|
-
this.setDataKeyFromColumn();
|
|
2487
2555
|
return column;
|
|
2488
2556
|
}
|
|
2489
2557
|
withFilterDisplay(filterDisplayType) {
|
|
@@ -2494,6 +2562,18 @@ class TableDescriptor {
|
|
|
2494
2562
|
this._paginationMode = paginationMode;
|
|
2495
2563
|
return this;
|
|
2496
2564
|
}
|
|
2565
|
+
withRowsPerPage(rows, options) {
|
|
2566
|
+
if (options) {
|
|
2567
|
+
this._rowsPerPageOptions = options;
|
|
2568
|
+
}
|
|
2569
|
+
if (!this._rowsPerPageOptions.includes(rows)) {
|
|
2570
|
+
this._defaultNumRows = this._rowsPerPageOptions[0];
|
|
2571
|
+
}
|
|
2572
|
+
else {
|
|
2573
|
+
this._defaultNumRows = rows;
|
|
2574
|
+
}
|
|
2575
|
+
return this;
|
|
2576
|
+
}
|
|
2497
2577
|
withTitle(title) {
|
|
2498
2578
|
this._title = title;
|
|
2499
2579
|
return this;
|
|
@@ -2531,11 +2611,6 @@ class TableDescriptor {
|
|
|
2531
2611
|
descriptor._filterDisplay = this._filterDisplay;
|
|
2532
2612
|
return descriptor;
|
|
2533
2613
|
}
|
|
2534
|
-
setDataKeyFromColumn() {
|
|
2535
|
-
if (!this._dataKeyProperty && this._columns.length === 1) {
|
|
2536
|
-
this._dataKeyProperty = this._columns[0].property;
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
2614
|
}
|
|
2540
2615
|
(function (TableDescriptor) {
|
|
2541
2616
|
let PaginationModeEnum;
|
|
@@ -2600,9 +2675,9 @@ class TableviewDescriptor {
|
|
|
2600
2675
|
return this;
|
|
2601
2676
|
}
|
|
2602
2677
|
withValidator(name, expression) {
|
|
2603
|
-
this._viewEditor.
|
|
2604
|
-
this._addEditor.
|
|
2605
|
-
this._editEditor.
|
|
2678
|
+
this._viewEditor.addValidation(name, expression);
|
|
2679
|
+
this._addEditor.addValidation(name, expression);
|
|
2680
|
+
this._editEditor.addValidation(name, expression);
|
|
2606
2681
|
return this;
|
|
2607
2682
|
}
|
|
2608
2683
|
addColumnDescriptor(column) {
|
|
@@ -2750,36 +2825,32 @@ class EditorFormlyUtil {
|
|
|
2750
2825
|
// wrap in group to be able to use flex grid
|
|
2751
2826
|
const wrapperGroup = {
|
|
2752
2827
|
fieldGroupClassName: 'p-fluid formgrid grid',
|
|
2753
|
-
fieldGroup: fields
|
|
2754
|
-
validators: {}
|
|
2828
|
+
fieldGroup: fields
|
|
2755
2829
|
};
|
|
2756
|
-
|
|
2757
|
-
wrapperGroup.validators[validator.name] = { expression: validator.expression, message: validator.message };
|
|
2758
|
-
}
|
|
2830
|
+
EditorFormlyUtil.addValidationsToFormlyField(wrapperGroup, descriptor.validations);
|
|
2759
2831
|
return [wrapperGroup];
|
|
2760
2832
|
}
|
|
2761
2833
|
static createFormlyField(descriptor) {
|
|
2762
2834
|
const field = {
|
|
2763
2835
|
key: descriptor.property,
|
|
2764
2836
|
expressionProperties: {},
|
|
2765
|
-
templateOptions: {}
|
|
2766
|
-
validators: {}
|
|
2837
|
+
templateOptions: {}
|
|
2767
2838
|
};
|
|
2768
2839
|
let className = descriptor.className;
|
|
2769
2840
|
if (!className) {
|
|
2770
2841
|
// assign default field width through entire row
|
|
2771
2842
|
className = 'col-12';
|
|
2772
2843
|
}
|
|
2773
|
-
if (className.indexOf('col-') < 0) {
|
|
2774
|
-
// class was provided, but does not contain col- definition
|
|
2775
|
-
className = `col-12 ${descriptor.className}`;
|
|
2776
|
-
}
|
|
2777
2844
|
field.className = className;
|
|
2778
2845
|
field.templateOptions['descriptor'] = descriptor;
|
|
2779
2846
|
if (descriptor instanceof FieldInputDescriptor) {
|
|
2780
2847
|
switch (descriptor.fieldType) {
|
|
2781
2848
|
case FieldInputDescriptor.TypeEnum.Hidden:
|
|
2782
2849
|
break;
|
|
2850
|
+
case FieldInputDescriptor.TypeEnum.Label:
|
|
2851
|
+
field.type = 'label';
|
|
2852
|
+
delete field.key;
|
|
2853
|
+
break;
|
|
2783
2854
|
case FieldInputDescriptor.TypeEnum.Textarea:
|
|
2784
2855
|
field.type = 'textarea';
|
|
2785
2856
|
break;
|
|
@@ -2858,11 +2929,75 @@ class EditorFormlyUtil {
|
|
|
2858
2929
|
if (typeof descriptor.defaultValue !== 'undefined') {
|
|
2859
2930
|
field.defaultValue = descriptor.defaultValue;
|
|
2860
2931
|
}
|
|
2861
|
-
|
|
2862
|
-
field.validators[validator.name] = { expression: validator.expression, message: validator.message };
|
|
2863
|
-
}
|
|
2932
|
+
EditorFormlyUtil.addValidationsToFormlyField(field, descriptor.validations);
|
|
2864
2933
|
return field;
|
|
2865
2934
|
}
|
|
2935
|
+
static addValidationsToFormlyField(config, validations) {
|
|
2936
|
+
if (!config.validators) {
|
|
2937
|
+
config.validators = {};
|
|
2938
|
+
}
|
|
2939
|
+
for (const validation of validations) {
|
|
2940
|
+
if (typeof validation.validator === 'function') {
|
|
2941
|
+
config.validators[validation.name] = {
|
|
2942
|
+
expression: (control, field, options) => {
|
|
2943
|
+
const validatorRes = validation.validator(control, field, options);
|
|
2944
|
+
// formly validator only excepts true/false for validation
|
|
2945
|
+
// map possible angular validator result to true/false
|
|
2946
|
+
const res = typeof validatorRes === 'boolean' ? validatorRes : validatorRes === null;
|
|
2947
|
+
console.log('mapper', config.key, validatorRes, res);
|
|
2948
|
+
return res;
|
|
2949
|
+
}
|
|
2950
|
+
};
|
|
2951
|
+
if (typeof validation.message === 'function') {
|
|
2952
|
+
config.validators[validation.name].message = validation.message;
|
|
2953
|
+
}
|
|
2954
|
+
// if (typeof validation.validator === 'function' && typeof validation.message === 'function') {
|
|
2955
|
+
// config.validators[validation.name] = {
|
|
2956
|
+
// expression: (
|
|
2957
|
+
// control: AbstractControl,
|
|
2958
|
+
// field: FormlyFieldConfig,
|
|
2959
|
+
// options?: {
|
|
2960
|
+
// [id: string]: any;
|
|
2961
|
+
// }
|
|
2962
|
+
// ) => {
|
|
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
|
+
// message: validation.message
|
|
2971
|
+
// };
|
|
2972
|
+
// } else if (typeof validation.validator === 'function') {
|
|
2973
|
+
// config.validators[validation.name] = {
|
|
2974
|
+
// expression: (
|
|
2975
|
+
// control: AbstractControl,
|
|
2976
|
+
// field: FormlyFieldConfig,
|
|
2977
|
+
// options?: {
|
|
2978
|
+
// [id: string]: any;
|
|
2979
|
+
// }
|
|
2980
|
+
// ) => {
|
|
2981
|
+
// const validatorRes = validation.validator!(control, field, options);
|
|
2982
|
+
// // formly validator only excepts true/false for validation
|
|
2983
|
+
// // map possible angular validator result to true/false
|
|
2984
|
+
// const res = typeof validatorRes === 'boolean' ? (validatorRes === false ? {[validation.name]: true} : null) : validatorRes;
|
|
2985
|
+
// console.log('mapper', config.key, validatorRes, res);
|
|
2986
|
+
// return res;
|
|
2987
|
+
// }
|
|
2988
|
+
// };
|
|
2989
|
+
}
|
|
2990
|
+
else {
|
|
2991
|
+
if (!Array.isArray(config.validators.validation)) {
|
|
2992
|
+
config.validators.validation = [];
|
|
2993
|
+
}
|
|
2994
|
+
config.validators.validation.push(validation.name);
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
if (validations.length > 0) {
|
|
2998
|
+
console.log(config.validators);
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
2866
3001
|
}
|
|
2867
3002
|
|
|
2868
3003
|
class EnumUtil {
|
|
@@ -3842,9 +3977,9 @@ class MngNavigationService {
|
|
|
3842
3977
|
}
|
|
3843
3978
|
}
|
|
3844
3979
|
}
|
|
3845
|
-
MngNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3846
|
-
MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
3847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
3980
|
+
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 });
|
|
3981
|
+
MngNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngNavigationService });
|
|
3982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngNavigationService, decorators: [{
|
|
3848
3983
|
type: Injectable
|
|
3849
3984
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i4.Location }]; } });
|
|
3850
3985
|
|
|
@@ -3877,9 +4012,9 @@ class MngBooleanPipe {
|
|
|
3877
4012
|
}
|
|
3878
4013
|
}
|
|
3879
4014
|
}
|
|
3880
|
-
MngBooleanPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3881
|
-
MngBooleanPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3882
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4015
|
+
MngBooleanPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBooleanPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4016
|
+
MngBooleanPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBooleanPipe, name: "boolean" });
|
|
4017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBooleanPipe, decorators: [{
|
|
3883
4018
|
type: Pipe,
|
|
3884
4019
|
args: [{
|
|
3885
4020
|
name: 'boolean',
|
|
@@ -3889,7 +4024,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
3889
4024
|
|
|
3890
4025
|
class MngEnumPipe {
|
|
3891
4026
|
transform(value, enumObj, i18nPath, nameAsValue = false) {
|
|
3892
|
-
if (!value || !enumObj) {
|
|
4027
|
+
if (!value || (typeof value !== 'number' && typeof value !== 'string') || !enumObj) {
|
|
3893
4028
|
return value;
|
|
3894
4029
|
}
|
|
3895
4030
|
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);
|
|
@@ -3899,9 +4034,9 @@ class MngEnumPipe {
|
|
|
3899
4034
|
return i18nPath ? `${i18nPath}.${enumConstantName}` : enumConstantName;
|
|
3900
4035
|
}
|
|
3901
4036
|
}
|
|
3902
|
-
MngEnumPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3903
|
-
MngEnumPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3904
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4037
|
+
MngEnumPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngEnumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4038
|
+
MngEnumPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngEnumPipe, name: "enum" });
|
|
4039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngEnumPipe, decorators: [{
|
|
3905
4040
|
type: Pipe,
|
|
3906
4041
|
args: [{
|
|
3907
4042
|
name: 'enum',
|
|
@@ -3914,9 +4049,9 @@ class MngI18nPropertyPipe {
|
|
|
3914
4049
|
return I18nUtils.Type.getPropertyKey(model.typeName, property);
|
|
3915
4050
|
}
|
|
3916
4051
|
}
|
|
3917
|
-
MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3918
|
-
MngI18nPropertyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4052
|
+
MngI18nPropertyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngI18nPropertyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4053
|
+
MngI18nPropertyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngI18nPropertyPipe, name: "i18nProperty" });
|
|
4054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngI18nPropertyPipe, decorators: [{
|
|
3920
4055
|
type: Pipe,
|
|
3921
4056
|
args: [{
|
|
3922
4057
|
name: 'i18nProperty',
|
|
@@ -3951,9 +4086,9 @@ class MngLinkFormatterPipe {
|
|
|
3951
4086
|
}
|
|
3952
4087
|
}
|
|
3953
4088
|
}
|
|
3954
|
-
MngLinkFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3955
|
-
MngLinkFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
3956
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4089
|
+
MngLinkFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngLinkFormatterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4090
|
+
MngLinkFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngLinkFormatterPipe, name: "linkFormatter" });
|
|
4091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngLinkFormatterPipe, decorators: [{
|
|
3957
4092
|
type: Pipe,
|
|
3958
4093
|
args: [{
|
|
3959
4094
|
name: 'linkFormatter',
|
|
@@ -4029,9 +4164,9 @@ class JsonPathPipe {
|
|
|
4029
4164
|
}
|
|
4030
4165
|
}
|
|
4031
4166
|
}
|
|
4032
|
-
JsonPathPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4033
|
-
JsonPathPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.
|
|
4034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4167
|
+
JsonPathPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: JsonPathPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4168
|
+
JsonPathPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: JsonPathPipe, name: "jsonPath" });
|
|
4169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: JsonPathPipe, decorators: [{
|
|
4035
4170
|
type: Pipe,
|
|
4036
4171
|
args: [{
|
|
4037
4172
|
name: 'jsonPath',
|
|
@@ -4066,7 +4201,7 @@ class MngActionExecutorService {
|
|
|
4066
4201
|
throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);
|
|
4067
4202
|
}
|
|
4068
4203
|
const srcConfirmComponent = sourceComponent;
|
|
4069
|
-
|
|
4204
|
+
let confirmParams = {
|
|
4070
4205
|
key: srcConfirmComponent.getConfirmationServiceInstanceKey(action),
|
|
4071
4206
|
acceptVisible: false,
|
|
4072
4207
|
rejectVisible: false
|
|
@@ -4112,6 +4247,9 @@ class MngActionExecutorService {
|
|
|
4112
4247
|
confirmParams.reject = () => {
|
|
4113
4248
|
observer.error(new ActionRunResult(context, undefined, new ActionError(null, true)));
|
|
4114
4249
|
};
|
|
4250
|
+
if (action.runConfirmationConfigMapFn) {
|
|
4251
|
+
confirmParams = action.runConfirmationConfigMapFn(context, confirmParams);
|
|
4252
|
+
}
|
|
4115
4253
|
srcConfirmComponent.getConfirmationService().confirm(confirmParams);
|
|
4116
4254
|
});
|
|
4117
4255
|
return observable;
|
|
@@ -4232,13 +4370,33 @@ class MngActionExecutorService {
|
|
|
4232
4370
|
let dialogComponent = this.defaultEditorDialogComponent;
|
|
4233
4371
|
let dialogClassName = '';
|
|
4234
4372
|
if (action instanceof ActionEditorDescriptor) {
|
|
4373
|
+
dialogClassName = action.dialogClassName ?? 'mng-action-editor-dialog';
|
|
4374
|
+
let dialogSizeClassName = '';
|
|
4375
|
+
switch (action.dialogSize) {
|
|
4376
|
+
case ActionEditorDescriptor.DialogSizeEnum.ExtraSmall:
|
|
4377
|
+
dialogSizeClassName = 'mng-action-editor-dialog-xs';
|
|
4378
|
+
break;
|
|
4379
|
+
case ActionEditorDescriptor.DialogSizeEnum.Small:
|
|
4380
|
+
dialogSizeClassName = 'mng-action-editor-dialog-sm';
|
|
4381
|
+
break;
|
|
4382
|
+
case ActionEditorDescriptor.DialogSizeEnum.Large:
|
|
4383
|
+
dialogSizeClassName = 'mng-action-editor-dialog-lg';
|
|
4384
|
+
break;
|
|
4385
|
+
case ActionEditorDescriptor.DialogSizeEnum.ExtraLarge:
|
|
4386
|
+
dialogSizeClassName = 'mng-action-editor-dialog-xl';
|
|
4387
|
+
break;
|
|
4388
|
+
case ActionEditorDescriptor.DialogSizeEnum.Normal:
|
|
4389
|
+
default:
|
|
4390
|
+
break;
|
|
4391
|
+
}
|
|
4392
|
+
if (dialogSizeClassName.length) {
|
|
4393
|
+
dialogClassName += ` ${dialogSizeClassName}`;
|
|
4394
|
+
}
|
|
4235
4395
|
if (action.editorComponent) {
|
|
4236
4396
|
dialogComponent = action.editorComponent;
|
|
4237
4397
|
}
|
|
4238
|
-
if (action.dialogClassName) {
|
|
4239
|
-
dialogClassName = action.dialogClassName;
|
|
4240
|
-
}
|
|
4241
4398
|
}
|
|
4399
|
+
console.log(dialogClassName);
|
|
4242
4400
|
const dialogConfig = {
|
|
4243
4401
|
data: {
|
|
4244
4402
|
action
|
|
@@ -4352,9 +4510,9 @@ class MngActionExecutorService {
|
|
|
4352
4510
|
return this.errorMapper.toMngError(error, actionError);
|
|
4353
4511
|
}
|
|
4354
4512
|
}
|
|
4355
|
-
MngActionExecutorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4356
|
-
MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4513
|
+
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 });
|
|
4514
|
+
MngActionExecutorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionExecutorService });
|
|
4515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionExecutorService, decorators: [{
|
|
4358
4516
|
type: Injectable
|
|
4359
4517
|
}], ctorParameters: function () { 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: [{
|
|
4360
4518
|
type: Inject,
|
|
@@ -4471,17 +4629,13 @@ class MngConfigurationService {
|
|
|
4471
4629
|
MngConfigurationService._instance = null;
|
|
4472
4630
|
|
|
4473
4631
|
class MngCommonsService {
|
|
4474
|
-
constructor(router, primengConfig, translate, titleService,
|
|
4632
|
+
constructor(router, primengConfig, translate, titleService, moduleConfig, localStorage) {
|
|
4475
4633
|
this.router = router;
|
|
4476
4634
|
this.primengConfig = primengConfig;
|
|
4477
4635
|
this.translate = translate;
|
|
4478
4636
|
this.titleService = titleService;
|
|
4479
|
-
this.configurationService = configurationService;
|
|
4480
4637
|
this.moduleConfig = moduleConfig;
|
|
4481
4638
|
this.localStorage = localStorage;
|
|
4482
|
-
this.commonsInitializers = commonsInitializers;
|
|
4483
|
-
// internal
|
|
4484
|
-
this.isInitialized = false;
|
|
4485
4639
|
// menu
|
|
4486
4640
|
this._menuMode = 'sidebar';
|
|
4487
4641
|
this._menuModeSubject = new BehaviorSubject(this._menuMode);
|
|
@@ -4608,70 +4762,54 @@ class MngCommonsService {
|
|
|
4608
4762
|
get user$() {
|
|
4609
4763
|
return this.userSubject.asObservable();
|
|
4610
4764
|
}
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
this.
|
|
4657
|
-
this.
|
|
4658
|
-
|
|
4659
|
-
this.router.events
|
|
4660
|
-
.pipe(
|
|
4661
|
-
// Filter the NavigationEnd events as the breadcrumb is updated only when the route reaches its end
|
|
4662
|
-
filter(event => event instanceof NavigationEnd))
|
|
4663
|
-
.subscribe(() => {
|
|
4664
|
-
this.updateBreadcrumbs();
|
|
4665
|
-
this.setPageTitle();
|
|
4666
|
-
});
|
|
4667
|
-
this.translate.onLangChange.subscribe(() => {
|
|
4668
|
-
this.updateBreadcrumbs();
|
|
4669
|
-
this.setPageTitle();
|
|
4670
|
-
});
|
|
4671
|
-
console.debug(`@mediusinc/mng-commons initialization complete.`);
|
|
4672
|
-
return true;
|
|
4673
|
-
}));
|
|
4674
|
-
this.isInitialized = true;
|
|
4765
|
+
reset() {
|
|
4766
|
+
this._menuMode = this.moduleConfig?.menu?.mode ?? 'sidebar';
|
|
4767
|
+
this._menuModeSubject.next(this._menuMode);
|
|
4768
|
+
this._menuItems = this.moduleConfig?.menu?.menuItems ?? [];
|
|
4769
|
+
this._menuPinEnabled = this.moduleConfig?.menu?.pinEnabled ?? false;
|
|
4770
|
+
// visual
|
|
4771
|
+
this._colorScheme = this.moduleConfig?.app?.colorScheme ?? 'light';
|
|
4772
|
+
// ripple
|
|
4773
|
+
this.primengConfig.ripple = true;
|
|
4774
|
+
this.primengConfig.filterMatchModeOptions = {
|
|
4775
|
+
text: [
|
|
4776
|
+
FilterDescriptor.MatchModeEnum.Contains,
|
|
4777
|
+
FilterDescriptor.MatchModeEnum.Equals,
|
|
4778
|
+
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
4779
|
+
FilterDescriptor.MatchModeEnum.StartsWith,
|
|
4780
|
+
FilterDescriptor.MatchModeEnum.EndsWith
|
|
4781
|
+
],
|
|
4782
|
+
numeric: [
|
|
4783
|
+
FilterDescriptor.MatchModeEnum.Equals,
|
|
4784
|
+
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
4785
|
+
FilterDescriptor.MatchModeEnum.LessThanOrEqualTo,
|
|
4786
|
+
FilterDescriptor.MatchModeEnum.GreaterThanOrEqualTo
|
|
4787
|
+
],
|
|
4788
|
+
date: [
|
|
4789
|
+
FilterDescriptor.MatchModeEnum.DateIs,
|
|
4790
|
+
FilterDescriptor.MatchModeEnum.DateIsNot,
|
|
4791
|
+
FilterDescriptor.MatchModeEnum.DateBefore,
|
|
4792
|
+
FilterDescriptor.MatchModeEnum.DateAfter
|
|
4793
|
+
]
|
|
4794
|
+
};
|
|
4795
|
+
// translate
|
|
4796
|
+
this.translate.langs = this.appLanguages;
|
|
4797
|
+
this.translate.use(this.appLanguage);
|
|
4798
|
+
this.translate.get('mngPrime').subscribe(value => this.primengConfig.setTranslation(value));
|
|
4799
|
+
this.routerEventsSubscription?.unsubscribe();
|
|
4800
|
+
this.routerEventsSubscription = this.router.events
|
|
4801
|
+
.pipe(
|
|
4802
|
+
// Filter the NavigationEnd events as the breadcrumb is updated only when the route reaches its end
|
|
4803
|
+
filter(event => event instanceof NavigationEnd))
|
|
4804
|
+
.subscribe(() => {
|
|
4805
|
+
this.updateBreadcrumbs();
|
|
4806
|
+
this.setPageTitle();
|
|
4807
|
+
});
|
|
4808
|
+
this.translateLangChangeSubscription?.unsubscribe();
|
|
4809
|
+
this.translateLangChangeSubscription = this.translate.onLangChange.subscribe(() => {
|
|
4810
|
+
this.updateBreadcrumbs();
|
|
4811
|
+
this.setPageTitle();
|
|
4812
|
+
});
|
|
4675
4813
|
}
|
|
4676
4814
|
// MENU actions
|
|
4677
4815
|
menuChangeActiveKey(key) {
|
|
@@ -4811,21 +4949,16 @@ class MngCommonsService {
|
|
|
4811
4949
|
return titlePieces.join(' - ');
|
|
4812
4950
|
}
|
|
4813
4951
|
}
|
|
4814
|
-
MngCommonsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4815
|
-
MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4816
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4952
|
+
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 });
|
|
4953
|
+
MngCommonsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsService });
|
|
4954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsService, decorators: [{
|
|
4817
4955
|
type: Injectable
|
|
4818
|
-
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i1$1.TranslateService }, { type: i4$1.Title }, { type:
|
|
4956
|
+
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.PrimeNGConfig }, { type: i1$1.TranslateService }, { type: i4$1.Title }, { type: undefined, decorators: [{
|
|
4819
4957
|
type: Inject,
|
|
4820
4958
|
args: [MNG_MODULE_CONFIG_IT]
|
|
4821
4959
|
}] }, { type: Storage, decorators: [{
|
|
4822
4960
|
type: Inject,
|
|
4823
4961
|
args: [MNG_BROWSER_STORAGE_IT]
|
|
4824
|
-
}] }, { type: undefined, decorators: [{
|
|
4825
|
-
type: Inject,
|
|
4826
|
-
args: [MNG_COMMONS_INITIALIZER_IT]
|
|
4827
|
-
}, {
|
|
4828
|
-
type: Optional
|
|
4829
4962
|
}] }]; } });
|
|
4830
4963
|
|
|
4831
4964
|
/**
|
|
@@ -4853,9 +4986,9 @@ class MngViewContainerComponentService {
|
|
|
4853
4986
|
return this._dataProvider;
|
|
4854
4987
|
}
|
|
4855
4988
|
}
|
|
4856
|
-
MngViewContainerComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4857
|
-
MngViewContainerComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4989
|
+
MngViewContainerComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngViewContainerComponentService, deps: [{ token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4990
|
+
MngViewContainerComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngViewContainerComponentService });
|
|
4991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngViewContainerComponentService, decorators: [{
|
|
4859
4992
|
type: Injectable
|
|
4860
4993
|
}], ctorParameters: function () { return [{ type: i2.MessageService }]; } });
|
|
4861
4994
|
|
|
@@ -4881,17 +5014,25 @@ class MngActionComponent {
|
|
|
4881
5014
|
this.loadingSubject = new ReplaySubject(1);
|
|
4882
5015
|
this.$loading = this.loadingSubject.asObservable();
|
|
4883
5016
|
this.cmpId = Math.random().toString(36).substring(2);
|
|
5017
|
+
this.isVisibleSubject = new ReplaySubject(1);
|
|
5018
|
+
this.$isVisible = this.isVisibleSubject.asObservable().pipe(distinctUntilChanged());
|
|
5019
|
+
this.isEnabledSubject = new ReplaySubject(1);
|
|
5020
|
+
this.$isEnabled = this.isEnabledSubject.asObservable().pipe(distinctUntilChanged());
|
|
5021
|
+
this.labelSubject = new ReplaySubject(1);
|
|
5022
|
+
this.$label = this.labelSubject.asObservable().pipe(distinctUntilChanged());
|
|
5023
|
+
this.tooltipSubject = new ReplaySubject(1);
|
|
5024
|
+
this.$tooltip = this.tooltipSubject.asObservable().pipe(distinctUntilChanged());
|
|
4884
5025
|
this.hasNoTitle = false;
|
|
4885
5026
|
this.loadingSubject.next(false);
|
|
4886
5027
|
}
|
|
4887
5028
|
ngOnInit() {
|
|
4888
5029
|
this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;
|
|
4889
5030
|
this.hasNoTitle = this.action.title === null;
|
|
4890
|
-
|
|
4891
|
-
this
|
|
4892
|
-
this
|
|
4893
|
-
this
|
|
4894
|
-
this
|
|
5031
|
+
this.isEnabledSubject.next(true);
|
|
5032
|
+
this.isVisibleSubject.next(true);
|
|
5033
|
+
this.labelSubject.next(null);
|
|
5034
|
+
this.tooltipSubject.next(null);
|
|
5035
|
+
this.processSubscriptions();
|
|
4895
5036
|
if (this.action instanceof ActionLinkDescriptor) {
|
|
4896
5037
|
this.actionLink = this.action;
|
|
4897
5038
|
}
|
|
@@ -4899,6 +5040,17 @@ class MngActionComponent {
|
|
|
4899
5040
|
this.hostClass = this.action.className;
|
|
4900
5041
|
}
|
|
4901
5042
|
}
|
|
5043
|
+
ngOnChanges(changes) {
|
|
5044
|
+
if (!(changes['item']?.firstChange ?? true) || !(changes['itemId']?.firstChange ?? true) || !(changes['actionData']?.firstChange ?? true)) {
|
|
5045
|
+
this.processSubscriptions();
|
|
5046
|
+
}
|
|
5047
|
+
}
|
|
5048
|
+
ngOnDestroy() {
|
|
5049
|
+
this.isVisibleSubscription?.unsubscribe();
|
|
5050
|
+
this.isEnabledSubscription?.unsubscribe();
|
|
5051
|
+
this.labelSubscription?.unsubscribe();
|
|
5052
|
+
this.tooltipSubscription?.unsubscribe();
|
|
5053
|
+
}
|
|
4902
5054
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4903
5055
|
triggerAction(event) {
|
|
4904
5056
|
this.loadingSubject.next(true);
|
|
@@ -4924,10 +5076,35 @@ class MngActionComponent {
|
|
|
4924
5076
|
getConfirmationServiceInstanceKey(action) {
|
|
4925
5077
|
return `${action.actionName}_${this.cmpId}`;
|
|
4926
5078
|
}
|
|
5079
|
+
processSubscriptions() {
|
|
5080
|
+
const context = this.actionExecutor.prepareActionExecContext(this.action, this.itemId, this.item, this.dataProvider, this.viewContainer ?? undefined, this, this.actionData);
|
|
5081
|
+
if (typeof this.action.isVisibleFunction === 'function') {
|
|
5082
|
+
this.isVisibleSubscription?.unsubscribe();
|
|
5083
|
+
this.isVisibleSubscription = this.action.isVisibleFunction(context).subscribe({
|
|
5084
|
+
next: res => this.isVisibleSubject.next(res)
|
|
5085
|
+
});
|
|
5086
|
+
}
|
|
5087
|
+
if (typeof this.action.isEnabledFunction === 'function') {
|
|
5088
|
+
this.isEnabledSubscription?.unsubscribe();
|
|
5089
|
+
this.isEnabledSubscription = this.action.isEnabledFunction(context).subscribe({
|
|
5090
|
+
next: res => this.isEnabledSubject.next(res)
|
|
5091
|
+
});
|
|
5092
|
+
}
|
|
5093
|
+
if (!this.hasNoTitle) {
|
|
5094
|
+
this.labelSubscription?.unsubscribe();
|
|
5095
|
+
this.labelSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'title', this.action?.title ?? undefined, this.item).subscribe({
|
|
5096
|
+
next: i18n => this.labelSubject.next(i18n)
|
|
5097
|
+
});
|
|
5098
|
+
}
|
|
5099
|
+
this.tooltipSubscription?.unsubscribe();
|
|
5100
|
+
this.tooltipSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'tooltip', this.action?.tooltip ?? undefined, this.item).subscribe({
|
|
5101
|
+
next: i18n => this.tooltipSubject.next(i18n)
|
|
5102
|
+
});
|
|
5103
|
+
}
|
|
4927
5104
|
}
|
|
4928
|
-
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4929
|
-
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
4930
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5105
|
+
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 });
|
|
5106
|
+
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 });
|
|
5107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
4931
5108
|
type: Component,
|
|
4932
5109
|
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"] }]
|
|
4933
5110
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: MngActionExecutorService }, { type: i2.ConfirmationService }, { type: MngViewContainerComponentService, decorators: [{
|
|
@@ -5068,9 +5245,9 @@ class MngActionRouteComponent {
|
|
|
5068
5245
|
return null;
|
|
5069
5246
|
}
|
|
5070
5247
|
}
|
|
5071
|
-
MngActionRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5072
|
-
MngActionRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5248
|
+
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 });
|
|
5249
|
+
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 });
|
|
5250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionRouteComponent, decorators: [{
|
|
5074
5251
|
type: Component,
|
|
5075
5252
|
args: [{ selector: 'mng-action-route', changeDetection: ChangeDetectionStrategy.OnPush, providers: [MessageService, ConfirmationService], template: "<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n" }]
|
|
5076
5253
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.ConfirmationService }, { type: MngNavigationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService, decorators: [{
|
|
@@ -5102,9 +5279,9 @@ class MngComponentDirective {
|
|
|
5102
5279
|
return typeof cmp.setColumnValue === 'function';
|
|
5103
5280
|
}
|
|
5104
5281
|
}
|
|
5105
|
-
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5106
|
-
MngComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
5107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5282
|
+
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5283
|
+
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 });
|
|
5284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngComponentDirective, decorators: [{
|
|
5108
5285
|
type: Directive,
|
|
5109
5286
|
args: [{
|
|
5110
5287
|
selector: '[mngComponent]'
|
|
@@ -5131,9 +5308,9 @@ class MngTemplateDirective {
|
|
|
5131
5308
|
return this.viewContainerRef;
|
|
5132
5309
|
}
|
|
5133
5310
|
}
|
|
5134
|
-
MngTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5135
|
-
MngTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
5136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5311
|
+
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 });
|
|
5312
|
+
MngTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: { type: "type", name: ["mngTemplate", "name"] }, ngImport: i0 });
|
|
5313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTemplateDirective, decorators: [{
|
|
5137
5314
|
type: Directive,
|
|
5138
5315
|
args: [{
|
|
5139
5316
|
selector: '[mngTemplate]'
|
|
@@ -5296,9 +5473,9 @@ class MngFormEditorComponent {
|
|
|
5296
5473
|
this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;
|
|
5297
5474
|
}
|
|
5298
5475
|
}
|
|
5299
|
-
MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5300
|
-
MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5476
|
+
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 });
|
|
5477
|
+
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 });
|
|
5478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormEditorComponent, decorators: [{
|
|
5302
5479
|
type: Component,
|
|
5303
5480
|
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" }]
|
|
5304
5481
|
}], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; }, propDecorators: { descriptor: [{
|
|
@@ -5543,9 +5720,9 @@ class MngAutocompleteComponent {
|
|
|
5543
5720
|
}
|
|
5544
5721
|
}
|
|
5545
5722
|
}
|
|
5546
|
-
MngAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5547
|
-
MngAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5723
|
+
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 });
|
|
5724
|
+
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 });
|
|
5725
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngAutocompleteComponent, decorators: [{
|
|
5549
5726
|
type: Component,
|
|
5550
5727
|
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" }]
|
|
5551
5728
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }]; }, propDecorators: { dataProvider: [{
|
|
@@ -5690,9 +5867,9 @@ class MngDropdownComponent {
|
|
|
5690
5867
|
this.dropdownFormControl.setValue(obj, { emitEvent: false });
|
|
5691
5868
|
}
|
|
5692
5869
|
}
|
|
5693
|
-
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5694
|
-
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
5870
|
+
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 });
|
|
5871
|
+
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 });
|
|
5872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngDropdownComponent, decorators: [{
|
|
5696
5873
|
type: Component,
|
|
5697
5874
|
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" }]
|
|
5698
5875
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }]; }, propDecorators: { dataProvider: [{
|
|
@@ -5909,9 +6086,9 @@ class MngActionEditorComponent {
|
|
|
5909
6086
|
this.subscriptions.push(subscription);
|
|
5910
6087
|
}
|
|
5911
6088
|
}
|
|
5912
|
-
MngActionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5913
|
-
MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5914
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6089
|
+
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 });
|
|
6090
|
+
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 });
|
|
6091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngActionEditorComponent, decorators: [{
|
|
5915
6092
|
type: Component,
|
|
5916
6093
|
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" }]
|
|
5917
6094
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.TranslateService }, { type: MngActionExecutorService }, { type: MngCommonsService }, { type: MngNavigationService }, { type: i3.DynamicDialogRef, decorators: [{
|
|
@@ -5953,39 +6130,97 @@ class MngFormlyFieldAutocompleteComponent extends FieldType {
|
|
|
5953
6130
|
this.descriptor = this.to['descriptor'];
|
|
5954
6131
|
}
|
|
5955
6132
|
}
|
|
5956
|
-
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5957
|
-
MngFormlyFieldAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6133
|
+
MngFormlyFieldAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6134
|
+
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 });
|
|
6135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldAutocompleteComponent, decorators: [{
|
|
5959
6136
|
type: Component,
|
|
5960
6137
|
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" }]
|
|
5961
6138
|
}] });
|
|
5962
6139
|
|
|
5963
6140
|
class MngFormlyFieldInputComponent extends FieldType {
|
|
6141
|
+
constructor() {
|
|
6142
|
+
super(...arguments);
|
|
6143
|
+
this.subscriptions = [];
|
|
6144
|
+
}
|
|
5964
6145
|
ngOnInit() {
|
|
5965
6146
|
this.iFormControl = this.formControl;
|
|
5966
6147
|
this.descriptor = this.to['descriptor'];
|
|
6148
|
+
// emit lifecycle event
|
|
6149
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {
|
|
6150
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6151
|
+
});
|
|
6152
|
+
// init values
|
|
5967
6153
|
if (this.to.type === 'datepicker' && typeof this.iFormControl.value === 'string') {
|
|
5968
6154
|
const dateObject = new Date(this.iFormControl.value);
|
|
5969
6155
|
this.iFormControl.setValue(dateObject);
|
|
5970
6156
|
}
|
|
6157
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
6158
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldInputComponent, this, {
|
|
6159
|
+
value: v
|
|
6160
|
+
});
|
|
6161
|
+
});
|
|
6162
|
+
this.subscriptions.push(subscription);
|
|
6163
|
+
}
|
|
6164
|
+
ngOnDestroy() {
|
|
6165
|
+
this.subscriptions.forEach(s => s.unsubscribe());
|
|
6166
|
+
// emit lifecycle event
|
|
6167
|
+
this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {
|
|
6168
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
6169
|
+
});
|
|
5971
6170
|
}
|
|
5972
6171
|
}
|
|
5973
|
-
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5974
|
-
MngFormlyFieldInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6172
|
+
MngFormlyFieldInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6173
|
+
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 });
|
|
6174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
5976
6175
|
type: Component,
|
|
5977
6176
|
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" }]
|
|
5978
6177
|
}] });
|
|
5979
6178
|
|
|
6179
|
+
class MngFormlyFieldLabelComponent {
|
|
6180
|
+
constructor() {
|
|
6181
|
+
this.className = 'hidden';
|
|
6182
|
+
}
|
|
6183
|
+
}
|
|
6184
|
+
MngFormlyFieldLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6185
|
+
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 });
|
|
6186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLabelComponent, decorators: [{
|
|
6187
|
+
type: Component,
|
|
6188
|
+
args: [{ selector: 'mng-formly-field-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
|
|
6189
|
+
}], propDecorators: { className: [{
|
|
6190
|
+
type: HostBinding,
|
|
6191
|
+
args: ['class']
|
|
6192
|
+
}] } });
|
|
6193
|
+
|
|
5980
6194
|
class MngFormlyFieldDropdownComponent extends FieldType {
|
|
6195
|
+
constructor() {
|
|
6196
|
+
super(...arguments);
|
|
6197
|
+
this.subscriptions = [];
|
|
6198
|
+
}
|
|
5981
6199
|
ngOnInit() {
|
|
5982
6200
|
this.dFormControl = this.formControl;
|
|
5983
6201
|
this.descriptor = this.to['descriptor'];
|
|
6202
|
+
// emit lifecycle event
|
|
6203
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {
|
|
6204
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT
|
|
6205
|
+
});
|
|
6206
|
+
const subscription = this.formControl.valueChanges.pipe(startWith(this.formControl.value), distinctUntilChanged()).subscribe(v => {
|
|
6207
|
+
this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldDropdownComponent, this, {
|
|
6208
|
+
value: v
|
|
6209
|
+
});
|
|
6210
|
+
});
|
|
6211
|
+
this.subscriptions.push(subscription);
|
|
6212
|
+
}
|
|
6213
|
+
ngOnDestroy() {
|
|
6214
|
+
this.subscriptions.forEach(s => s.unsubscribe());
|
|
6215
|
+
// emit lifecycle event
|
|
6216
|
+
this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {
|
|
6217
|
+
eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY
|
|
6218
|
+
});
|
|
5984
6219
|
}
|
|
5985
6220
|
}
|
|
5986
|
-
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
5987
|
-
MngFormlyFieldDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
5988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6221
|
+
MngFormlyFieldDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6222
|
+
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 });
|
|
6223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldDropdownComponent, decorators: [{
|
|
5989
6224
|
type: Component,
|
|
5990
6225
|
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" }]
|
|
5991
6226
|
}] });
|
|
@@ -6069,9 +6304,9 @@ class MngTableColumnFilterComponent {
|
|
|
6069
6304
|
return this.lookupDescriptor.dataKeyProperty && value ? { [this.lookupDescriptor.dataKeyProperty]: value } : value;
|
|
6070
6305
|
}
|
|
6071
6306
|
}
|
|
6072
|
-
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6073
|
-
MngTableColumnFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6307
|
+
MngTableColumnFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i2.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
6308
|
+
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 } });
|
|
6309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
|
|
6075
6310
|
type: Component,
|
|
6076
6311
|
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" }]
|
|
6077
6312
|
}], ctorParameters: function () { return [{ type: i2.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
|
|
@@ -6102,9 +6337,9 @@ class MngTableColumnValueComponent {
|
|
|
6102
6337
|
}
|
|
6103
6338
|
}
|
|
6104
6339
|
}
|
|
6105
|
-
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6106
|
-
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6340
|
+
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6341
|
+
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 });
|
|
6342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
6108
6343
|
type: Component,
|
|
6109
6344
|
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" }]
|
|
6110
6345
|
}], propDecorators: { descriptor: [{
|
|
@@ -6140,9 +6375,6 @@ class MngTableComponent {
|
|
|
6140
6375
|
this.useDataProvider = false;
|
|
6141
6376
|
this.useQueryParamsInitialized = false;
|
|
6142
6377
|
this.dataProviderInfiniteScrollItems = [];
|
|
6143
|
-
// pagination, sort and filters
|
|
6144
|
-
this.rowsPerPageOptions = [25, 50, 100];
|
|
6145
|
-
this.rows = this.rowsPerPageOptions[0];
|
|
6146
6378
|
this.offset = 0;
|
|
6147
6379
|
this.multiSortMeta = null;
|
|
6148
6380
|
this.filterMetadata = {};
|
|
@@ -6167,6 +6399,8 @@ class MngTableComponent {
|
|
|
6167
6399
|
ngOnInit() {
|
|
6168
6400
|
this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;
|
|
6169
6401
|
this.filterDescriptors = this.descriptor.columns.filter(c => typeof c.filterDescriptor !== 'undefined').map(c => c.filterDescriptor);
|
|
6402
|
+
this.rows = this.descriptor.defaultNumRows;
|
|
6403
|
+
this.rowsPerPageOptions = this.descriptor.rowsPerPageOptions;
|
|
6170
6404
|
if (this.descriptor.paginationMode === PaginationModeEnum.InfiniteScroll) {
|
|
6171
6405
|
this.infiniteScroll = true;
|
|
6172
6406
|
this.scrollHeight = 'flex';
|
|
@@ -6373,9 +6607,9 @@ class MngTableComponent {
|
|
|
6373
6607
|
}
|
|
6374
6608
|
}
|
|
6375
6609
|
}
|
|
6376
|
-
MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6377
|
-
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 });
|
|
6378
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6610
|
+
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 });
|
|
6611
|
+
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 });
|
|
6612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableComponent, decorators: [{
|
|
6379
6613
|
type: Component,
|
|
6380
6614
|
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" }]
|
|
6381
6615
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i1$1.TranslateService }, { type: MngViewContainerComponentService, decorators: [{
|
|
@@ -6495,9 +6729,9 @@ class MngTableviewComponent {
|
|
|
6495
6729
|
}
|
|
6496
6730
|
}
|
|
6497
6731
|
}
|
|
6498
|
-
MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6499
|
-
MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6732
|
+
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 });
|
|
6733
|
+
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 } });
|
|
6734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
6501
6735
|
type: Component,
|
|
6502
6736
|
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" }]
|
|
6503
6737
|
}], 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: [{
|
|
@@ -6538,9 +6772,9 @@ class AMngTableviewRouteComponent {
|
|
|
6538
6772
|
return new ActionDeleteDescriptor(descriptor);
|
|
6539
6773
|
}
|
|
6540
6774
|
}
|
|
6541
|
-
AMngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6542
|
-
AMngTableviewRouteComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
6543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6775
|
+
AMngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AMngTableviewRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6776
|
+
AMngTableviewRouteComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: AMngTableviewRouteComponent, ngImport: i0 });
|
|
6777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AMngTableviewRouteComponent, decorators: [{
|
|
6544
6778
|
type: Directive
|
|
6545
6779
|
}] });
|
|
6546
6780
|
|
|
@@ -6577,9 +6811,9 @@ class MngTableviewRouteComponent extends AMngTableviewRouteComponent {
|
|
|
6577
6811
|
return routeData?.tableview?.actions ?? super.createActionDescriptors();
|
|
6578
6812
|
}
|
|
6579
6813
|
}
|
|
6580
|
-
MngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6581
|
-
MngTableviewRouteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6814
|
+
MngTableviewRouteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableviewRouteComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
6815
|
+
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"] }] });
|
|
6816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableviewRouteComponent, decorators: [{
|
|
6583
6817
|
type: Component,
|
|
6584
6818
|
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" }]
|
|
6585
6819
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }]; }, propDecorators: { descriptorInit: [{
|
|
@@ -6742,9 +6976,9 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
6742
6976
|
}
|
|
6743
6977
|
}
|
|
6744
6978
|
}
|
|
6745
|
-
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6746
|
-
MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
6979
|
+
MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
6980
|
+
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 });
|
|
6981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
6748
6982
|
type: Component,
|
|
6749
6983
|
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" }]
|
|
6750
6984
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
|
|
@@ -6753,6 +6987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
6753
6987
|
}] } });
|
|
6754
6988
|
|
|
6755
6989
|
var SizeEnum = ActionDescriptor.SizeEnum;
|
|
6990
|
+
var DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum;
|
|
6756
6991
|
class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
6757
6992
|
constructor(actionExecutor) {
|
|
6758
6993
|
super();
|
|
@@ -6776,7 +7011,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6776
7011
|
const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)
|
|
6777
7012
|
.withPosition(ActionPositionEnum.RowClick)
|
|
6778
7013
|
.withTitle(null)
|
|
6779
|
-
.withDialogClassName('mng-
|
|
7014
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7015
|
+
.withDialogSize(DialogSizeEnum.Small);
|
|
6780
7016
|
viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);
|
|
6781
7017
|
this.rowClickActions.push(viewAction);
|
|
6782
7018
|
}
|
|
@@ -6785,7 +7021,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6785
7021
|
.withPosition(ActionPositionEnum.ToolbarRight)
|
|
6786
7022
|
.withTitle(null)
|
|
6787
7023
|
.withIcon('pi pi-plus')
|
|
6788
|
-
.withDialogClassName('mng-
|
|
7024
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7025
|
+
.withDialogSize(DialogSizeEnum.Small)
|
|
6789
7026
|
.withSize(SizeEnum.ExtraSmall)
|
|
6790
7027
|
.withSubmitFunction(ctx => {
|
|
6791
7028
|
if (!ctx.data?.item) {
|
|
@@ -6805,7 +7042,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6805
7042
|
const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)
|
|
6806
7043
|
.withTitle(null)
|
|
6807
7044
|
.withIcon('pi pi-pencil')
|
|
6808
|
-
.withDialogClassName('mng-
|
|
7045
|
+
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
7046
|
+
.withDialogSize(DialogSizeEnum.Small)
|
|
6809
7047
|
.withSize(SizeEnum.ExtraSmall)
|
|
6810
7048
|
.withSubmitFunction(ctx => {
|
|
6811
7049
|
if (!ctx.data?.item) {
|
|
@@ -6894,9 +7132,9 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
6894
7132
|
}
|
|
6895
7133
|
}
|
|
6896
7134
|
}
|
|
6897
|
-
MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
6898
|
-
MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
6899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7135
|
+
MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: MngActionExecutorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7136
|
+
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 });
|
|
7137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
|
|
6900
7138
|
type: Component,
|
|
6901
7139
|
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"] }]
|
|
6902
7140
|
}], ctorParameters: function () { return [{ type: MngActionExecutorService }]; } });
|
|
@@ -7005,47 +7243,55 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
7005
7243
|
}
|
|
7006
7244
|
}
|
|
7007
7245
|
}
|
|
7008
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7009
|
-
MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7246
|
+
MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
7247
|
+
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 });
|
|
7248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
7011
7249
|
type: Component,
|
|
7012
|
-
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-
|
|
7250
|
+
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" }]
|
|
7013
7251
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
7014
7252
|
|
|
7015
7253
|
class MngFormlyFieldTabsComponent extends FieldType {
|
|
7016
7254
|
}
|
|
7017
|
-
MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7018
|
-
MngFormlyFieldTabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7255
|
+
MngFormlyFieldTabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7256
|
+
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 });
|
|
7257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
|
|
7020
7258
|
type: Component,
|
|
7021
7259
|
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" }]
|
|
7022
7260
|
}] });
|
|
7023
7261
|
|
|
7024
7262
|
class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
7263
|
+
constructor() {
|
|
7264
|
+
super(...arguments);
|
|
7265
|
+
this.typeFieldset = FieldGroupDescriptor.TypeEnum.Fieldset;
|
|
7266
|
+
this.typeLogical = FieldGroupDescriptor.TypeEnum.Logical;
|
|
7267
|
+
}
|
|
7268
|
+
ngOnInit() {
|
|
7269
|
+
this.descriptor = this.to['descriptor'];
|
|
7270
|
+
}
|
|
7025
7271
|
}
|
|
7026
|
-
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7027
|
-
MngFormlyFieldFieldsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7272
|
+
MngFormlyFieldFieldsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7273
|
+
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 });
|
|
7274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldFieldsetComponent, decorators: [{
|
|
7029
7275
|
type: Component,
|
|
7030
|
-
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 <
|
|
7276
|
+
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" }]
|
|
7031
7277
|
}] });
|
|
7032
7278
|
|
|
7033
7279
|
class MngFormlyFieldWrapperComponent extends FieldWrapper {
|
|
7034
7280
|
}
|
|
7035
|
-
MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7036
|
-
MngFormlyFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7281
|
+
MngFormlyFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7282
|
+
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 });
|
|
7283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
7038
7284
|
type: Component,
|
|
7039
|
-
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" }]
|
|
7285
|
+
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" }]
|
|
7040
7286
|
}] });
|
|
7041
7287
|
|
|
7042
7288
|
class MngFormlyTableWrapperComponent extends FieldWrapper {
|
|
7043
7289
|
}
|
|
7044
|
-
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7045
|
-
MngFormlyTableWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7290
|
+
MngFormlyTableWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyTableWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7291
|
+
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 });
|
|
7292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFormlyTableWrapperComponent, decorators: [{
|
|
7047
7293
|
type: Component,
|
|
7048
|
-
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" }]
|
|
7294
|
+
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" }]
|
|
7049
7295
|
}] });
|
|
7050
7296
|
|
|
7051
7297
|
class MngBreadcrumbComponent {
|
|
@@ -7053,9 +7299,9 @@ class MngBreadcrumbComponent {
|
|
|
7053
7299
|
this.mngCommons = mngCommons;
|
|
7054
7300
|
}
|
|
7055
7301
|
}
|
|
7056
|
-
MngBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7057
|
-
MngBreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7302
|
+
MngBreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBreadcrumbComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7303
|
+
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 });
|
|
7304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngBreadcrumbComponent, decorators: [{
|
|
7059
7305
|
type: Component,
|
|
7060
7306
|
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" }]
|
|
7061
7307
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
@@ -7066,9 +7312,9 @@ class MngFooterComponent {
|
|
|
7066
7312
|
this.currentYear = new Date().getFullYear();
|
|
7067
7313
|
}
|
|
7068
7314
|
}
|
|
7069
|
-
MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7070
|
-
MngFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7071
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7315
|
+
MngFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFooterComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7316
|
+
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 });
|
|
7317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngFooterComponent, decorators: [{
|
|
7072
7318
|
type: Component,
|
|
7073
7319
|
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" }]
|
|
7074
7320
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
@@ -7255,9 +7501,9 @@ class MngMainLayoutComponentService {
|
|
|
7255
7501
|
return width <= 991;
|
|
7256
7502
|
}
|
|
7257
7503
|
}
|
|
7258
|
-
MngMainLayoutComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7259
|
-
MngMainLayoutComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
7260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7504
|
+
MngMainLayoutComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponentService, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7505
|
+
MngMainLayoutComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponentService });
|
|
7506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponentService, decorators: [{
|
|
7261
7507
|
type: Injectable
|
|
7262
7508
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
7263
7509
|
|
|
@@ -7402,8 +7648,8 @@ class MngMenuItemComponent {
|
|
|
7402
7648
|
}
|
|
7403
7649
|
}
|
|
7404
7650
|
}
|
|
7405
|
-
MngMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7406
|
-
MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7651
|
+
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 });
|
|
7652
|
+
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: [
|
|
7407
7653
|
trigger('children', [
|
|
7408
7654
|
state('void', style({
|
|
7409
7655
|
height: '0px'
|
|
@@ -7427,7 +7673,7 @@ MngMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
7427
7673
|
transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
7428
7674
|
])
|
|
7429
7675
|
] });
|
|
7430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMenuItemComponent, decorators: [{
|
|
7431
7677
|
type: Component,
|
|
7432
7678
|
args: [{ selector: '[mng-menuitem]', host: {
|
|
7433
7679
|
'[class.layout-root-menuitem]': 'root',
|
|
@@ -7472,9 +7718,9 @@ class MngMenuComponent {
|
|
|
7472
7718
|
this.mainLayoutService = mainLayoutService;
|
|
7473
7719
|
}
|
|
7474
7720
|
}
|
|
7475
|
-
MngMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7476
|
-
MngMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7721
|
+
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 });
|
|
7722
|
+
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 });
|
|
7723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMenuComponent, decorators: [{
|
|
7478
7724
|
type: Component,
|
|
7479
7725
|
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" }]
|
|
7480
7726
|
}], ctorParameters: function () { return [{ type: MngCommonsService }, { type: MngMainLayoutComponentService }]; } });
|
|
@@ -7514,9 +7760,9 @@ class MngTopbarComponent {
|
|
|
7514
7760
|
}
|
|
7515
7761
|
}
|
|
7516
7762
|
}
|
|
7517
|
-
MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7518
|
-
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7763
|
+
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 });
|
|
7764
|
+
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 });
|
|
7765
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
7520
7766
|
type: Component,
|
|
7521
7767
|
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" }]
|
|
7522
7768
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; }, propDecorators: { templates: [{
|
|
@@ -7551,9 +7797,9 @@ class MngMainLayoutComponent {
|
|
|
7551
7797
|
this.mainLayoutService.innerWidth = target?.innerWidth ?? window.innerWidth;
|
|
7552
7798
|
}
|
|
7553
7799
|
}
|
|
7554
|
-
MngMainLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7555
|
-
MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
7556
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
7800
|
+
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 });
|
|
7801
|
+
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 });
|
|
7802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngMainLayoutComponent, decorators: [{
|
|
7557
7803
|
type: Component,
|
|
7558
7804
|
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" }]
|
|
7559
7805
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; }, propDecorators: { templates: [{
|
|
@@ -7564,10 +7810,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
7564
7810
|
args: ['window:resize', ['$event']]
|
|
7565
7811
|
}] } });
|
|
7566
7812
|
|
|
7567
|
-
function mngCommonsInitializerProvider(
|
|
7568
|
-
return () =>
|
|
7813
|
+
function mngCommonsInitializerProvider(mngCommonsInit) {
|
|
7814
|
+
return () => mngCommonsInit.initialize();
|
|
7569
7815
|
}
|
|
7570
7816
|
|
|
7817
|
+
class MngCommonsInitService {
|
|
7818
|
+
constructor(translate, configurationService, mngCommons, commonsInitializers) {
|
|
7819
|
+
this.translate = translate;
|
|
7820
|
+
this.configurationService = configurationService;
|
|
7821
|
+
this.mngCommons = mngCommons;
|
|
7822
|
+
this.commonsInitializers = commonsInitializers;
|
|
7823
|
+
this.isInitialized = false;
|
|
7824
|
+
}
|
|
7825
|
+
initialize() {
|
|
7826
|
+
if (this.isInitialized) {
|
|
7827
|
+
return of(void 0);
|
|
7828
|
+
}
|
|
7829
|
+
console.debug(`Initializing @mediusinc/mng-commons.`);
|
|
7830
|
+
return this.configurationService.loadJsonSources().pipe(mergeMap$1(() => {
|
|
7831
|
+
if (this.commonsInitializers) {
|
|
7832
|
+
console.debug(`Module initializers for @mediusinc/mng-commons.`);
|
|
7833
|
+
return combineLatest(this.commonsInitializers.map(ci => ci())).pipe(map(res => res));
|
|
7834
|
+
}
|
|
7835
|
+
else {
|
|
7836
|
+
return of(true);
|
|
7837
|
+
}
|
|
7838
|
+
}), map(() => this.mngCommons.reset()));
|
|
7839
|
+
this.isInitialized = true;
|
|
7840
|
+
}
|
|
7841
|
+
}
|
|
7842
|
+
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 });
|
|
7843
|
+
MngCommonsInitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsInitService });
|
|
7844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsInitService, decorators: [{
|
|
7845
|
+
type: Injectable
|
|
7846
|
+
}], ctorParameters: function () { return [{ type: i1$1.TranslateService }, { type: MngConfigurationService }, { type: MngCommonsService }, { type: undefined, decorators: [{
|
|
7847
|
+
type: Inject,
|
|
7848
|
+
args: [MNG_COMMONS_INITIALIZER_IT]
|
|
7849
|
+
}, {
|
|
7850
|
+
type: Optional
|
|
7851
|
+
}] }]; } });
|
|
7852
|
+
|
|
7571
7853
|
const mngConfigurationServiceProvider = (httpClient, moduleConfig) => {
|
|
7572
7854
|
const service = MngConfigurationService.init(httpClient);
|
|
7573
7855
|
if (moduleConfig?.configuration?.projectEnvironment) {
|
|
@@ -7600,6 +7882,11 @@ const formlyWrappersConfig = [
|
|
|
7600
7882
|
{ name: 'field-table', component: MngFormlyTableWrapperComponent }
|
|
7601
7883
|
];
|
|
7602
7884
|
const formlyTypesConfig = [
|
|
7885
|
+
{
|
|
7886
|
+
name: 'label',
|
|
7887
|
+
component: MngFormlyFieldLabelComponent,
|
|
7888
|
+
wrappers: ['field']
|
|
7889
|
+
},
|
|
7603
7890
|
{
|
|
7604
7891
|
name: 'input',
|
|
7605
7892
|
component: MngFormlyFieldInputComponent,
|
|
@@ -7717,14 +8004,14 @@ function getMinLengthValidationMessage(translate) {
|
|
|
7717
8004
|
return (error, field) => {
|
|
7718
8005
|
const fieldLabel = field.templateOptions?.label || 'field';
|
|
7719
8006
|
const fieldName = translate.instant(fieldLabel);
|
|
7720
|
-
return translate.instant('mngEditor.validation.minLength', { field: fieldName,
|
|
8007
|
+
return translate.instant('mngEditor.validation.minLength', { field: fieldName, minLength: field.templateOptions?.minLength });
|
|
7721
8008
|
};
|
|
7722
8009
|
}
|
|
7723
8010
|
function getMaxLengthValidationMessage(translate) {
|
|
7724
8011
|
return (error, field) => {
|
|
7725
8012
|
const fieldLabel = field.templateOptions?.label || 'field';
|
|
7726
8013
|
const fieldName = translate.instant(fieldLabel);
|
|
7727
|
-
return translate.instant('mngEditor.validation.maxLength', { field: fieldName,
|
|
8014
|
+
return translate.instant('mngEditor.validation.maxLength', { field: fieldName, maxLength: field.templateOptions?.maxLength });
|
|
7728
8015
|
};
|
|
7729
8016
|
}
|
|
7730
8017
|
function getTextPatternValidationMessage(translate) {
|
|
@@ -7843,6 +8130,7 @@ const declarations = [
|
|
|
7843
8130
|
MngFormlyTableWrapperComponent,
|
|
7844
8131
|
// formly fields
|
|
7845
8132
|
MngFormlyFieldInputComponent,
|
|
8133
|
+
MngFormlyFieldLabelComponent,
|
|
7846
8134
|
MngFormlyFieldDropdownComponent,
|
|
7847
8135
|
MngFormlyFieldAutocompleteComponent,
|
|
7848
8136
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -7871,6 +8159,7 @@ class MngCommonsModule {
|
|
|
7871
8159
|
DialogService,
|
|
7872
8160
|
MessageService,
|
|
7873
8161
|
ConfirmationService,
|
|
8162
|
+
MngCommonsInitService,
|
|
7874
8163
|
MngActionExecutorService,
|
|
7875
8164
|
MngNavigationService,
|
|
7876
8165
|
MngCommonsService,
|
|
@@ -7900,7 +8189,7 @@ class MngCommonsModule {
|
|
|
7900
8189
|
{
|
|
7901
8190
|
provide: APP_INITIALIZER,
|
|
7902
8191
|
useFactory: mngCommonsInitializerProvider,
|
|
7903
|
-
deps: [
|
|
8192
|
+
deps: [MngCommonsInitService],
|
|
7904
8193
|
multi: true
|
|
7905
8194
|
},
|
|
7906
8195
|
{
|
|
@@ -7921,8 +8210,8 @@ class MngCommonsModule {
|
|
|
7921
8210
|
};
|
|
7922
8211
|
}
|
|
7923
8212
|
}
|
|
7924
|
-
MngCommonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
7925
|
-
MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
8213
|
+
MngCommonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8214
|
+
MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, declarations: [
|
|
7926
8215
|
// directives
|
|
7927
8216
|
MngComponentDirective,
|
|
7928
8217
|
MngTemplateDirective,
|
|
@@ -7947,6 +8236,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
7947
8236
|
MngFormlyTableWrapperComponent,
|
|
7948
8237
|
// formly fields
|
|
7949
8238
|
MngFormlyFieldInputComponent,
|
|
8239
|
+
MngFormlyFieldLabelComponent,
|
|
7950
8240
|
MngFormlyFieldDropdownComponent,
|
|
7951
8241
|
MngFormlyFieldAutocompleteComponent,
|
|
7952
8242
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -8060,6 +8350,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
8060
8350
|
MngFormlyTableWrapperComponent,
|
|
8061
8351
|
// formly fields
|
|
8062
8352
|
MngFormlyFieldInputComponent,
|
|
8353
|
+
MngFormlyFieldLabelComponent,
|
|
8063
8354
|
MngFormlyFieldDropdownComponent,
|
|
8064
8355
|
MngFormlyFieldAutocompleteComponent,
|
|
8065
8356
|
MngFormlyFieldLookupDialogComponent,
|
|
@@ -8078,7 +8369,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
8078
8369
|
MngActionComponent,
|
|
8079
8370
|
MngActionEditorComponent,
|
|
8080
8371
|
MngActionRouteComponent] });
|
|
8081
|
-
MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
8372
|
+
MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, imports: [[
|
|
8082
8373
|
// angular modules
|
|
8083
8374
|
CommonModule,
|
|
8084
8375
|
RouterModule,
|
|
@@ -8124,7 +8415,7 @@ MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
8124
8415
|
FieldsetModule,
|
|
8125
8416
|
MultiSelectModule,
|
|
8126
8417
|
SkeletonModule] });
|
|
8127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
8418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngCommonsModule, decorators: [{
|
|
8128
8419
|
type: NgModule,
|
|
8129
8420
|
args: [{
|
|
8130
8421
|
imports: [
|
|
@@ -8151,11 +8442,22 @@ class AMngBaseApiService {
|
|
|
8151
8442
|
this.objectSerializer = ObjectSerializer.get();
|
|
8152
8443
|
}
|
|
8153
8444
|
getUrl(...pathSegments) {
|
|
8154
|
-
let
|
|
8155
|
-
if (
|
|
8445
|
+
let baseUrl = this.getBasePath();
|
|
8446
|
+
if (baseUrl.endsWith('/')) {
|
|
8447
|
+
baseUrl = baseUrl.substring(0, baseUrl.length - 1);
|
|
8448
|
+
}
|
|
8449
|
+
const serviceBasePath = this.getServiceBasePath();
|
|
8450
|
+
let path = [serviceBasePath, ...pathSegments].filter(s => s && s.length).join('/');
|
|
8451
|
+
// omit first and last '/'
|
|
8452
|
+
if (path.startsWith('/')) {
|
|
8156
8453
|
path = path.substring(1);
|
|
8157
8454
|
}
|
|
8158
|
-
|
|
8455
|
+
if (path.endsWith('/')) {
|
|
8456
|
+
path = path.substring(0, path.length - 1);
|
|
8457
|
+
}
|
|
8458
|
+
// replace any double '//' from path that could come from joining paths
|
|
8459
|
+
path = path.replace('//', '/');
|
|
8460
|
+
return `${baseUrl}/${path}`;
|
|
8159
8461
|
}
|
|
8160
8462
|
serializeQueryParam(queryParam, type = 'QueryParam') {
|
|
8161
8463
|
return this.objectSerializer.serialize(queryParam, type);
|
|
@@ -8215,7 +8517,7 @@ class AMngCrudApiService extends AMngGetAllApiService {
|
|
|
8215
8517
|
super(type, queryResultType, http);
|
|
8216
8518
|
}
|
|
8217
8519
|
createPost(item, params) {
|
|
8218
|
-
const url = this.getUrl(this.getCreatePostPath());
|
|
8520
|
+
const url = this.getUrl(this.getCreatePostPath(item));
|
|
8219
8521
|
return this.http
|
|
8220
8522
|
.post(url, this.serialize(item), {
|
|
8221
8523
|
withCredentials: true,
|
|
@@ -8259,7 +8561,7 @@ class AMngCrudApiService extends AMngGetAllApiService {
|
|
|
8259
8561
|
})
|
|
8260
8562
|
.pipe(map(res => this.deserialize(res)));
|
|
8261
8563
|
}
|
|
8262
|
-
getCreatePostPath() {
|
|
8564
|
+
getCreatePostPath(item) {
|
|
8263
8565
|
return '';
|
|
8264
8566
|
}
|
|
8265
8567
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -8735,5 +9037,5 @@ class RouteDataBuilder {
|
|
|
8735
9037
|
* Generated bundle index. Do not edit.
|
|
8736
9038
|
*/
|
|
8737
9039
|
|
|
8738
|
-
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,
|
|
9040
|
+
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 };
|
|
8739
9041
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|