@mediusinc/mng-commons 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/api/utils/medius-rest.util.mjs +6 -6
- package/esm2020/lib/components/action/action.component.mjs +3 -2
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +6 -5
- package/esm2020/lib/components/action/route/action-route.component.mjs +2 -2
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +4 -4
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +1 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +14 -15
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +4 -4
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +3 -2
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +11 -11
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +10 -10
- package/esm2020/lib/components/tableview/table/table.component.mjs +10 -12
- package/esm2020/lib/components/tableview/tableview.component.mjs +2 -2
- package/esm2020/lib/descriptors/action.descriptor.mjs +14 -71
- package/esm2020/lib/descriptors/column.descriptor.mjs +22 -33
- package/esm2020/lib/descriptors/editor.descriptor.mjs +3 -11
- package/esm2020/lib/descriptors/field.descriptor.mjs +31 -95
- package/esm2020/lib/descriptors/filter.descriptor.mjs +6 -39
- package/esm2020/lib/descriptors/index.mjs +1 -3
- package/esm2020/lib/descriptors/interfaces/field-config.interface.mjs +2 -0
- package/esm2020/lib/descriptors/interfaces/index.mjs +3 -0
- package/esm2020/lib/descriptors/interfaces/lookup-descriptor.interface.mjs +2 -0
- package/esm2020/lib/descriptors/table.descriptor.mjs +6 -23
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +5 -5
- package/esm2020/lib/descriptors/types/action.type.mjs +53 -0
- package/esm2020/lib/descriptors/types/column.type.mjs +11 -0
- package/esm2020/lib/descriptors/types/editor.type.mjs +8 -0
- package/esm2020/lib/descriptors/types/field.type.mjs +53 -0
- package/esm2020/lib/descriptors/types/filter.type.mjs +31 -0
- package/esm2020/lib/descriptors/types/index.mjs +7 -0
- package/esm2020/lib/descriptors/types/table.type.mjs +17 -0
- package/esm2020/lib/pipes/enum.pipe.mjs +2 -2
- package/esm2020/lib/services/action-executor.service.mjs +8 -7
- package/esm2020/lib/services/commons.service.mjs +5 -21
- package/esm2020/lib/types/type.model.mjs +1 -1
- package/esm2020/lib/utils/editor-formly.util.mjs +16 -15
- package/esm2020/lib/utils/model.util.mjs +1 -1
- package/esm2020/lib/utils/styles.util.mjs +9 -9
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/mediusinc-mng-commons.mjs +325 -368
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +324 -368
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/utils/medius-rest.util.d.ts +3 -2
- package/lib/components/action/action.component.d.ts +2 -1
- package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +3 -2
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +2 -1
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +5 -4
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +8 -7
- package/lib/components/tableview/table/table.component.d.ts +3 -2
- package/lib/descriptors/action.descriptor.d.ts +9 -59
- package/lib/descriptors/column.descriptor.d.ts +3 -13
- package/lib/descriptors/editor.descriptor.d.ts +2 -9
- package/lib/descriptors/field.descriptor.d.ts +17 -72
- package/lib/descriptors/filter.descriptor.d.ts +8 -38
- package/lib/descriptors/index.d.ts +0 -2
- package/lib/descriptors/{field.descriptor.interface.d.ts → interfaces/field-config.interface.d.ts} +0 -0
- package/lib/descriptors/interfaces/index.d.ts +2 -0
- package/lib/descriptors/{lookup.descriptor.d.ts → interfaces/lookup-descriptor.interface.d.ts} +3 -3
- package/lib/descriptors/table.descriptor.d.ts +7 -21
- package/lib/descriptors/types/action.type.d.ts +45 -0
- package/lib/descriptors/types/column.type.d.ts +9 -0
- package/lib/descriptors/types/editor.type.d.ts +6 -0
- package/lib/descriptors/types/field.type.d.ts +44 -0
- package/lib/descriptors/types/filter.type.d.ts +27 -0
- package/lib/descriptors/types/index.d.ts +6 -0
- package/lib/descriptors/types/table.type.d.ts +13 -0
- package/lib/types/type.model.d.ts +2 -2
- package/lib/utils/model.util.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/esm2020/lib/descriptors/field.descriptor.interface.mjs +0 -2
- package/esm2020/lib/descriptors/lookup.descriptor.mjs +0 -2
|
@@ -557,6 +557,179 @@ class TableviewDataProvider extends EditorDataProvider {
|
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
+
var ActionPositionEnum;
|
|
561
|
+
(function (ActionPositionEnum) {
|
|
562
|
+
ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
|
|
563
|
+
ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
|
|
564
|
+
ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
|
|
565
|
+
ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
|
|
566
|
+
ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
|
|
567
|
+
ActionPositionEnum[ActionPositionEnum["FooterLeft"] = 5] = "FooterLeft";
|
|
568
|
+
ActionPositionEnum[ActionPositionEnum["FooterRight"] = 6] = "FooterRight";
|
|
569
|
+
})(ActionPositionEnum || (ActionPositionEnum = {}));
|
|
570
|
+
var ActionActivationTriggerEnum;
|
|
571
|
+
(function (ActionActivationTriggerEnum) {
|
|
572
|
+
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
|
|
573
|
+
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
|
|
574
|
+
})(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
|
|
575
|
+
var ActionTypeEnum;
|
|
576
|
+
(function (ActionTypeEnum) {
|
|
577
|
+
ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
|
|
578
|
+
ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
|
|
579
|
+
})(ActionTypeEnum || (ActionTypeEnum = {}));
|
|
580
|
+
var ActionLevelEnum;
|
|
581
|
+
(function (ActionLevelEnum) {
|
|
582
|
+
ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
|
|
583
|
+
ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
|
|
584
|
+
ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
|
|
585
|
+
ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
|
|
586
|
+
ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
|
|
587
|
+
ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
|
|
588
|
+
ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
|
|
589
|
+
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
590
|
+
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
591
|
+
var ActionSizeEnum;
|
|
592
|
+
(function (ActionSizeEnum) {
|
|
593
|
+
ActionSizeEnum[ActionSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
594
|
+
ActionSizeEnum[ActionSizeEnum["Small"] = 1] = "Small";
|
|
595
|
+
ActionSizeEnum[ActionSizeEnum["Normal"] = 2] = "Normal";
|
|
596
|
+
ActionSizeEnum[ActionSizeEnum["Large"] = 3] = "Large";
|
|
597
|
+
ActionSizeEnum[ActionSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
598
|
+
})(ActionSizeEnum || (ActionSizeEnum = {}));
|
|
599
|
+
var ActionEditorDialogSizeEnum;
|
|
600
|
+
(function (ActionEditorDialogSizeEnum) {
|
|
601
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
602
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["Small"] = 1] = "Small";
|
|
603
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["Normal"] = 2] = "Normal";
|
|
604
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["Large"] = 3] = "Large";
|
|
605
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
606
|
+
})(ActionEditorDialogSizeEnum || (ActionEditorDialogSizeEnum = {}));
|
|
607
|
+
var ActionEditorSubmitTypeEnum;
|
|
608
|
+
(function (ActionEditorSubmitTypeEnum) {
|
|
609
|
+
ActionEditorSubmitTypeEnum[ActionEditorSubmitTypeEnum["Submit"] = 0] = "Submit";
|
|
610
|
+
ActionEditorSubmitTypeEnum[ActionEditorSubmitTypeEnum["Cancel"] = 1] = "Cancel";
|
|
611
|
+
})(ActionEditorSubmitTypeEnum || (ActionEditorSubmitTypeEnum = {}));
|
|
612
|
+
|
|
613
|
+
var ColumnTypeEnum;
|
|
614
|
+
(function (ColumnTypeEnum) {
|
|
615
|
+
ColumnTypeEnum[ColumnTypeEnum["String"] = 0] = "String";
|
|
616
|
+
ColumnTypeEnum[ColumnTypeEnum["Number"] = 1] = "Number";
|
|
617
|
+
ColumnTypeEnum[ColumnTypeEnum["Currency"] = 2] = "Currency";
|
|
618
|
+
ColumnTypeEnum[ColumnTypeEnum["Boolean"] = 3] = "Boolean";
|
|
619
|
+
ColumnTypeEnum[ColumnTypeEnum["Date"] = 4] = "Date";
|
|
620
|
+
ColumnTypeEnum[ColumnTypeEnum["Enum"] = 5] = "Enum";
|
|
621
|
+
ColumnTypeEnum[ColumnTypeEnum["Custom"] = 6] = "Custom";
|
|
622
|
+
})(ColumnTypeEnum || (ColumnTypeEnum = {}));
|
|
623
|
+
|
|
624
|
+
var TableviewTypeEnum;
|
|
625
|
+
(function (TableviewTypeEnum) {
|
|
626
|
+
TableviewTypeEnum[TableviewTypeEnum["None"] = 0] = "None";
|
|
627
|
+
TableviewTypeEnum[TableviewTypeEnum["View"] = 1] = "View";
|
|
628
|
+
TableviewTypeEnum[TableviewTypeEnum["Edit"] = 2] = "Edit";
|
|
629
|
+
TableviewTypeEnum[TableviewTypeEnum["Add"] = 3] = "Add";
|
|
630
|
+
})(TableviewTypeEnum || (TableviewTypeEnum = {}));
|
|
631
|
+
|
|
632
|
+
var FieldSizeEnum;
|
|
633
|
+
(function (FieldSizeEnum) {
|
|
634
|
+
FieldSizeEnum[FieldSizeEnum["Small"] = 0] = "Small";
|
|
635
|
+
FieldSizeEnum[FieldSizeEnum["Normal"] = 1] = "Normal";
|
|
636
|
+
FieldSizeEnum[FieldSizeEnum["Large"] = 2] = "Large";
|
|
637
|
+
})(FieldSizeEnum || (FieldSizeEnum = {}));
|
|
638
|
+
var FieldInputTypeEnum;
|
|
639
|
+
(function (FieldInputTypeEnum) {
|
|
640
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Hidden"] = 0] = "Hidden";
|
|
641
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Label"] = 1] = "Label";
|
|
642
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Text"] = 2] = "Text";
|
|
643
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Textarea"] = 3] = "Textarea";
|
|
644
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Number"] = 4] = "Number";
|
|
645
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Currency"] = 5] = "Currency";
|
|
646
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Switch"] = 6] = "Switch";
|
|
647
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Radio"] = 7] = "Radio";
|
|
648
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Datepicker"] = 8] = "Datepicker";
|
|
649
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Mask"] = 9] = "Mask";
|
|
650
|
+
FieldInputTypeEnum[FieldInputTypeEnum["File"] = 10] = "File";
|
|
651
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Custom"] = 11] = "Custom";
|
|
652
|
+
})(FieldInputTypeEnum || (FieldInputTypeEnum = {}));
|
|
653
|
+
var FieldLookupTypeEnum;
|
|
654
|
+
(function (FieldLookupTypeEnum) {
|
|
655
|
+
FieldLookupTypeEnum[FieldLookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
656
|
+
FieldLookupTypeEnum[FieldLookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
657
|
+
FieldLookupTypeEnum[FieldLookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
658
|
+
})(FieldLookupTypeEnum || (FieldLookupTypeEnum = {}));
|
|
659
|
+
var FieldManyToManyEditorTypeEnum;
|
|
660
|
+
(function (FieldManyToManyEditorTypeEnum) {
|
|
661
|
+
FieldManyToManyEditorTypeEnum[FieldManyToManyEditorTypeEnum["DialogTableMultiselect"] = 0] = "DialogTableMultiselect";
|
|
662
|
+
})(FieldManyToManyEditorTypeEnum || (FieldManyToManyEditorTypeEnum = {}));
|
|
663
|
+
var FieldManyToManyEditorActionEnum;
|
|
664
|
+
(function (FieldManyToManyEditorActionEnum) {
|
|
665
|
+
FieldManyToManyEditorActionEnum[FieldManyToManyEditorActionEnum["Add"] = 0] = "Add";
|
|
666
|
+
FieldManyToManyEditorActionEnum[FieldManyToManyEditorActionEnum["Delete"] = 1] = "Delete";
|
|
667
|
+
})(FieldManyToManyEditorActionEnum || (FieldManyToManyEditorActionEnum = {}));
|
|
668
|
+
var FieldManyEditorTypeEnum;
|
|
669
|
+
(function (FieldManyEditorTypeEnum) {
|
|
670
|
+
FieldManyEditorTypeEnum[FieldManyEditorTypeEnum["DialogEditor"] = 0] = "DialogEditor";
|
|
671
|
+
})(FieldManyEditorTypeEnum || (FieldManyEditorTypeEnum = {}));
|
|
672
|
+
var FieldManyEditorActionEnum;
|
|
673
|
+
(function (FieldManyEditorActionEnum) {
|
|
674
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["View"] = 0] = "View";
|
|
675
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["Add"] = 1] = "Add";
|
|
676
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["Edit"] = 2] = "Edit";
|
|
677
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["Delete"] = 3] = "Delete";
|
|
678
|
+
})(FieldManyEditorActionEnum || (FieldManyEditorActionEnum = {}));
|
|
679
|
+
var FieldGroupTypeEnum;
|
|
680
|
+
(function (FieldGroupTypeEnum) {
|
|
681
|
+
FieldGroupTypeEnum[FieldGroupTypeEnum["Fieldset"] = 0] = "Fieldset";
|
|
682
|
+
FieldGroupTypeEnum[FieldGroupTypeEnum["Logical"] = 1] = "Logical";
|
|
683
|
+
})(FieldGroupTypeEnum || (FieldGroupTypeEnum = {}));
|
|
684
|
+
|
|
685
|
+
var FilterTypeEnum;
|
|
686
|
+
(function (FilterTypeEnum) {
|
|
687
|
+
FilterTypeEnum[FilterTypeEnum["String"] = 0] = "String";
|
|
688
|
+
FilterTypeEnum[FilterTypeEnum["Number"] = 1] = "Number";
|
|
689
|
+
FilterTypeEnum[FilterTypeEnum["Boolean"] = 2] = "Boolean";
|
|
690
|
+
FilterTypeEnum[FilterTypeEnum["Date"] = 3] = "Date";
|
|
691
|
+
FilterTypeEnum[FilterTypeEnum["Lookup"] = 4] = "Lookup";
|
|
692
|
+
FilterTypeEnum[FilterTypeEnum["LookupEnum"] = 5] = "LookupEnum";
|
|
693
|
+
})(FilterTypeEnum || (FilterTypeEnum = {}));
|
|
694
|
+
var FilterMatchModeEnum;
|
|
695
|
+
(function (FilterMatchModeEnum) {
|
|
696
|
+
FilterMatchModeEnum["StartsWith"] = "startsWith";
|
|
697
|
+
FilterMatchModeEnum["Contains"] = "contains";
|
|
698
|
+
FilterMatchModeEnum["EndsWith"] = "endsWith";
|
|
699
|
+
FilterMatchModeEnum["Equals"] = "equals";
|
|
700
|
+
FilterMatchModeEnum["NotEquals"] = "notEquals";
|
|
701
|
+
FilterMatchModeEnum["In"] = "in";
|
|
702
|
+
FilterMatchModeEnum["LessThan"] = "lt";
|
|
703
|
+
FilterMatchModeEnum["GreaterThan"] = "gt";
|
|
704
|
+
FilterMatchModeEnum["Between"] = "between";
|
|
705
|
+
FilterMatchModeEnum["DateIs"] = "dateIs";
|
|
706
|
+
FilterMatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
707
|
+
FilterMatchModeEnum["DateBefore"] = "dateBefore";
|
|
708
|
+
FilterMatchModeEnum["DateAfter"] = "dateAfter";
|
|
709
|
+
})(FilterMatchModeEnum || (FilterMatchModeEnum = {}));
|
|
710
|
+
var FilterLookupTypeEnum;
|
|
711
|
+
(function (FilterLookupTypeEnum) {
|
|
712
|
+
FilterLookupTypeEnum[FilterLookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
713
|
+
FilterLookupTypeEnum[FilterLookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
714
|
+
})(FilterLookupTypeEnum || (FilterLookupTypeEnum = {}));
|
|
715
|
+
|
|
716
|
+
var TablePaginationModeEnum;
|
|
717
|
+
(function (TablePaginationModeEnum) {
|
|
718
|
+
TablePaginationModeEnum[TablePaginationModeEnum["Pagination"] = 0] = "Pagination";
|
|
719
|
+
TablePaginationModeEnum[TablePaginationModeEnum["InfiniteScroll"] = 1] = "InfiniteScroll";
|
|
720
|
+
})(TablePaginationModeEnum || (TablePaginationModeEnum = {}));
|
|
721
|
+
var TableFilterDisplayEnum;
|
|
722
|
+
(function (TableFilterDisplayEnum) {
|
|
723
|
+
TableFilterDisplayEnum[TableFilterDisplayEnum["Row"] = 0] = "Row";
|
|
724
|
+
TableFilterDisplayEnum[TableFilterDisplayEnum["Menu"] = 1] = "Menu";
|
|
725
|
+
})(TableFilterDisplayEnum || (TableFilterDisplayEnum = {}));
|
|
726
|
+
var TableSizeEnum;
|
|
727
|
+
(function (TableSizeEnum) {
|
|
728
|
+
TableSizeEnum[TableSizeEnum["Small"] = 0] = "Small";
|
|
729
|
+
TableSizeEnum[TableSizeEnum["Normal"] = 1] = "Normal";
|
|
730
|
+
TableSizeEnum[TableSizeEnum["Large"] = 2] = "Large";
|
|
731
|
+
})(TableSizeEnum || (TableSizeEnum = {}));
|
|
732
|
+
|
|
560
733
|
class ActionDescriptor {
|
|
561
734
|
constructor(model, actionName, parentType, parentProperty) {
|
|
562
735
|
this._type = ActionTypeEnum.Direct;
|
|
@@ -565,7 +738,7 @@ class ActionDescriptor {
|
|
|
565
738
|
this._level = ActionLevelEnum.Default;
|
|
566
739
|
this._routeUrl = null;
|
|
567
740
|
this._className = '';
|
|
568
|
-
this._size =
|
|
741
|
+
this._size = ActionSizeEnum.Normal;
|
|
569
742
|
this._isStyleText = false;
|
|
570
743
|
this._isStyleOutlined = false;
|
|
571
744
|
this._isStyleRaised = false;
|
|
@@ -669,16 +842,16 @@ class ActionDescriptor {
|
|
|
669
842
|
return this._size;
|
|
670
843
|
}
|
|
671
844
|
get isSizeExtraSmall() {
|
|
672
|
-
return this._size ===
|
|
845
|
+
return this._size === ActionSizeEnum.ExtraSmall;
|
|
673
846
|
}
|
|
674
847
|
get isSizeSmall() {
|
|
675
|
-
return this._size ===
|
|
848
|
+
return this._size === ActionSizeEnum.Small;
|
|
676
849
|
}
|
|
677
850
|
get isSizeLarge() {
|
|
678
|
-
return this._size ===
|
|
851
|
+
return this._size === ActionSizeEnum.Large;
|
|
679
852
|
}
|
|
680
853
|
get isSizeExtraLarge() {
|
|
681
|
-
return this._size ===
|
|
854
|
+
return this._size === ActionSizeEnum.ExtraLarge;
|
|
682
855
|
}
|
|
683
856
|
get hasRunConfirmation() {
|
|
684
857
|
return this._hasRunConfirmation;
|
|
@@ -784,7 +957,7 @@ class ActionDescriptor {
|
|
|
784
957
|
this._className = className;
|
|
785
958
|
return this;
|
|
786
959
|
}
|
|
787
|
-
withSize(size =
|
|
960
|
+
withSize(size = ActionSizeEnum.Normal) {
|
|
788
961
|
this._size = size;
|
|
789
962
|
return this;
|
|
790
963
|
}
|
|
@@ -839,16 +1012,6 @@ class ActionDescriptor {
|
|
|
839
1012
|
return this;
|
|
840
1013
|
}
|
|
841
1014
|
}
|
|
842
|
-
(function (ActionDescriptor) {
|
|
843
|
-
let SizeEnum;
|
|
844
|
-
(function (SizeEnum) {
|
|
845
|
-
SizeEnum[SizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
846
|
-
SizeEnum[SizeEnum["Small"] = 1] = "Small";
|
|
847
|
-
SizeEnum[SizeEnum["Normal"] = 2] = "Normal";
|
|
848
|
-
SizeEnum[SizeEnum["Large"] = 3] = "Large";
|
|
849
|
-
SizeEnum[SizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
850
|
-
})(SizeEnum = ActionDescriptor.SizeEnum || (ActionDescriptor.SizeEnum = {}));
|
|
851
|
-
})(ActionDescriptor || (ActionDescriptor = {}));
|
|
852
1015
|
class ActionSimpleDescriptor extends ActionDescriptor {
|
|
853
1016
|
constructor(actionName, modelType, idProperty, titleProperty) {
|
|
854
1017
|
const model = modelType ? new ModelDescriptor(modelType, idProperty, titleProperty) : null;
|
|
@@ -861,10 +1024,10 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
861
1024
|
this._editorActions = [];
|
|
862
1025
|
this._editorTitle = undefined;
|
|
863
1026
|
this._hasFetchNotificationSuccess = false;
|
|
864
|
-
this._dialogSize =
|
|
1027
|
+
this._dialogSize = ActionEditorDialogSizeEnum.Normal;
|
|
865
1028
|
this._type = ActionTypeEnum.Editor;
|
|
866
1029
|
this._editorDescriptor = editorDescriptor;
|
|
867
|
-
this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this,
|
|
1030
|
+
this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this, ActionEditorSubmitTypeEnum.Cancel));
|
|
868
1031
|
}
|
|
869
1032
|
get editorTitle() {
|
|
870
1033
|
return this._editorTitle;
|
|
@@ -927,7 +1090,7 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
927
1090
|
this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
928
1091
|
return this;
|
|
929
1092
|
}
|
|
930
|
-
withDialogSize(size =
|
|
1093
|
+
withDialogSize(size = ActionEditorDialogSizeEnum.Normal) {
|
|
931
1094
|
this._dialogSize = size;
|
|
932
1095
|
return this;
|
|
933
1096
|
}
|
|
@@ -965,19 +1128,9 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
965
1128
|
return this;
|
|
966
1129
|
}
|
|
967
1130
|
}
|
|
968
|
-
(function (ActionEditorDescriptor) {
|
|
969
|
-
let DialogSizeEnum;
|
|
970
|
-
(function (DialogSizeEnum) {
|
|
971
|
-
DialogSizeEnum[DialogSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
972
|
-
DialogSizeEnum[DialogSizeEnum["Small"] = 1] = "Small";
|
|
973
|
-
DialogSizeEnum[DialogSizeEnum["Normal"] = 2] = "Normal";
|
|
974
|
-
DialogSizeEnum[DialogSizeEnum["Large"] = 3] = "Large";
|
|
975
|
-
DialogSizeEnum[DialogSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
976
|
-
})(DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum || (ActionEditorDescriptor.DialogSizeEnum = {}));
|
|
977
|
-
})(ActionEditorDescriptor || (ActionEditorDescriptor = {}));
|
|
978
1131
|
class ActionEditorSubmitDescriptor extends ActionDescriptor {
|
|
979
|
-
constructor(editorAction, submitType =
|
|
980
|
-
super(editorAction.model, submitType ===
|
|
1132
|
+
constructor(editorAction, submitType = ActionEditorSubmitTypeEnum.Submit) {
|
|
1133
|
+
super(editorAction.model, submitType === ActionEditorSubmitTypeEnum.Submit ? 'submit' : 'cancel');
|
|
981
1134
|
this._editorAction = editorAction;
|
|
982
1135
|
this._submitType = submitType;
|
|
983
1136
|
this._position = ActionPositionEnum.FooterRight;
|
|
@@ -987,20 +1140,13 @@ class ActionEditorSubmitDescriptor extends ActionDescriptor {
|
|
|
987
1140
|
return this._submitType;
|
|
988
1141
|
}
|
|
989
1142
|
}
|
|
990
|
-
(function (ActionEditorSubmitDescriptor) {
|
|
991
|
-
let TypeEnum;
|
|
992
|
-
(function (TypeEnum) {
|
|
993
|
-
TypeEnum[TypeEnum["Submit"] = 0] = "Submit";
|
|
994
|
-
TypeEnum[TypeEnum["Cancel"] = 1] = "Cancel";
|
|
995
|
-
})(TypeEnum = ActionEditorSubmitDescriptor.TypeEnum || (ActionEditorSubmitDescriptor.TypeEnum = {}));
|
|
996
|
-
})(ActionEditorSubmitDescriptor || (ActionEditorSubmitDescriptor = {}));
|
|
997
1143
|
class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
|
|
998
1144
|
constructor(editorDescriptor) {
|
|
999
1145
|
super(editorDescriptor, ActionEditorDetailsDescriptor.ACTION_NAME);
|
|
1000
1146
|
this.withPosition(ActionPositionEnum.RowClick);
|
|
1001
1147
|
this.withRouteTrigger(':itemId');
|
|
1002
1148
|
this.withFetchFunction(ActionDataProviderUtil.runFetchOrFail);
|
|
1003
|
-
this.withEditorActions([new ActionEditorSubmitDescriptor(this,
|
|
1149
|
+
this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitTypeEnum.Cancel)]);
|
|
1004
1150
|
}
|
|
1005
1151
|
withServiceType(serviceType) {
|
|
1006
1152
|
return this.withServiceFetchFunction(serviceType);
|
|
@@ -1145,41 +1291,10 @@ class ActionLinkDescriptor extends ActionDescriptor {
|
|
|
1145
1291
|
return this;
|
|
1146
1292
|
}
|
|
1147
1293
|
}
|
|
1148
|
-
var ActionPositionEnum;
|
|
1149
|
-
(function (ActionPositionEnum) {
|
|
1150
|
-
ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
|
|
1151
|
-
ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
|
|
1152
|
-
ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
|
|
1153
|
-
ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
|
|
1154
|
-
ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
|
|
1155
|
-
ActionPositionEnum[ActionPositionEnum["FooterLeft"] = 5] = "FooterLeft";
|
|
1156
|
-
ActionPositionEnum[ActionPositionEnum["FooterRight"] = 6] = "FooterRight";
|
|
1157
|
-
})(ActionPositionEnum || (ActionPositionEnum = {}));
|
|
1158
|
-
var ActionActivationTriggerEnum;
|
|
1159
|
-
(function (ActionActivationTriggerEnum) {
|
|
1160
|
-
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
|
|
1161
|
-
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
|
|
1162
|
-
})(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
|
|
1163
|
-
var ActionTypeEnum;
|
|
1164
|
-
(function (ActionTypeEnum) {
|
|
1165
|
-
ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
|
|
1166
|
-
ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
|
|
1167
|
-
})(ActionTypeEnum || (ActionTypeEnum = {}));
|
|
1168
|
-
var ActionLevelEnum;
|
|
1169
|
-
(function (ActionLevelEnum) {
|
|
1170
|
-
ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
|
|
1171
|
-
ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
|
|
1172
|
-
ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
|
|
1173
|
-
ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
|
|
1174
|
-
ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
|
|
1175
|
-
ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
|
|
1176
|
-
ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
|
|
1177
|
-
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
1178
|
-
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
1179
1294
|
|
|
1180
1295
|
class FilterDescriptor {
|
|
1181
1296
|
constructor(property) {
|
|
1182
|
-
this._filterType =
|
|
1297
|
+
this._filterType = FilterTypeEnum.String;
|
|
1183
1298
|
this._matchModes = null;
|
|
1184
1299
|
this._numberUseGrouping = true;
|
|
1185
1300
|
this._datePickerShowTime = false;
|
|
@@ -1298,45 +1413,18 @@ class FilterDescriptor {
|
|
|
1298
1413
|
descriptor._columnClassName = this._columnClassName;
|
|
1299
1414
|
}
|
|
1300
1415
|
}
|
|
1301
|
-
(function (FilterDescriptor) {
|
|
1302
|
-
let TypeEnum;
|
|
1303
|
-
(function (TypeEnum) {
|
|
1304
|
-
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1305
|
-
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1306
|
-
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1307
|
-
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1308
|
-
TypeEnum[TypeEnum["Lookup"] = 4] = "Lookup";
|
|
1309
|
-
TypeEnum[TypeEnum["LookupEnum"] = 5] = "LookupEnum";
|
|
1310
|
-
})(TypeEnum = FilterDescriptor.TypeEnum || (FilterDescriptor.TypeEnum = {}));
|
|
1311
|
-
let MatchModeEnum;
|
|
1312
|
-
(function (MatchModeEnum) {
|
|
1313
|
-
MatchModeEnum["StartsWith"] = "startsWith";
|
|
1314
|
-
MatchModeEnum["Contains"] = "contains";
|
|
1315
|
-
MatchModeEnum["EndsWith"] = "endsWith";
|
|
1316
|
-
MatchModeEnum["Equals"] = "equals";
|
|
1317
|
-
MatchModeEnum["NotEquals"] = "notEquals";
|
|
1318
|
-
MatchModeEnum["In"] = "in";
|
|
1319
|
-
MatchModeEnum["LessThan"] = "lt";
|
|
1320
|
-
MatchModeEnum["GreaterThan"] = "gt";
|
|
1321
|
-
MatchModeEnum["Between"] = "between";
|
|
1322
|
-
MatchModeEnum["DateIs"] = "dateIs";
|
|
1323
|
-
MatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
1324
|
-
MatchModeEnum["DateBefore"] = "dateBefore";
|
|
1325
|
-
MatchModeEnum["DateAfter"] = "dateAfter";
|
|
1326
|
-
})(MatchModeEnum = FilterDescriptor.MatchModeEnum || (FilterDescriptor.MatchModeEnum = {}));
|
|
1327
|
-
})(FilterDescriptor || (FilterDescriptor = {}));
|
|
1328
1416
|
class FilterLookupDescriptor extends FilterDescriptor {
|
|
1329
1417
|
constructor(property, modelType) {
|
|
1330
1418
|
super(property);
|
|
1331
1419
|
this._modelType = null;
|
|
1332
|
-
this._lookupType =
|
|
1420
|
+
this._lookupType = FilterLookupTypeEnum.Dropdown;
|
|
1333
1421
|
this._itemsLabelTranslate = false;
|
|
1334
1422
|
this._multiselect = false;
|
|
1335
1423
|
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
1336
1424
|
this._autocompleteOpenOnFocus = false;
|
|
1337
1425
|
this._autocompleteInlineSearch = false;
|
|
1338
1426
|
this._modelType = modelType;
|
|
1339
|
-
this._filterType =
|
|
1427
|
+
this._filterType = FilterTypeEnum.Lookup;
|
|
1340
1428
|
ModelUtil.trySetLookupItemsProperties(this);
|
|
1341
1429
|
}
|
|
1342
1430
|
get lookupType() {
|
|
@@ -1409,7 +1497,7 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
1409
1497
|
return this;
|
|
1410
1498
|
}
|
|
1411
1499
|
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
1412
|
-
this._lookupType =
|
|
1500
|
+
this._lookupType = FilterLookupTypeEnum.Autocomplete;
|
|
1413
1501
|
this._autocompleteOpenOnFocus = openOnFocus;
|
|
1414
1502
|
this._autocompleteInlineSearch = inlineSearch;
|
|
1415
1503
|
return this;
|
|
@@ -1461,17 +1549,10 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
|
1461
1549
|
return field;
|
|
1462
1550
|
}
|
|
1463
1551
|
}
|
|
1464
|
-
(function (FilterLookupDescriptor) {
|
|
1465
|
-
let LookupTypeEnum;
|
|
1466
|
-
(function (LookupTypeEnum) {
|
|
1467
|
-
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
1468
|
-
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
1469
|
-
})(LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum || (FilterLookupDescriptor.LookupTypeEnum = {}));
|
|
1470
|
-
})(FilterLookupDescriptor || (FilterLookupDescriptor = {}));
|
|
1471
1552
|
|
|
1472
1553
|
class ColumnDescriptor {
|
|
1473
1554
|
constructor(table, property) {
|
|
1474
|
-
this._columnType =
|
|
1555
|
+
this._columnType = ColumnTypeEnum.String;
|
|
1475
1556
|
this._isSortEnabled = false;
|
|
1476
1557
|
// styling
|
|
1477
1558
|
this._headerClassName = '';
|
|
@@ -1568,18 +1649,18 @@ class ColumnDescriptor {
|
|
|
1568
1649
|
get hasCopyToClipboard() {
|
|
1569
1650
|
return this._hasCopyToClipboard;
|
|
1570
1651
|
}
|
|
1571
|
-
asType(type =
|
|
1652
|
+
asType(type = ColumnTypeEnum.String) {
|
|
1572
1653
|
this._columnType = type;
|
|
1573
1654
|
return this;
|
|
1574
1655
|
}
|
|
1575
1656
|
asNumber(displayFormat = '1.0-0', locale) {
|
|
1576
|
-
this._columnType =
|
|
1657
|
+
this._columnType = ColumnTypeEnum.Number;
|
|
1577
1658
|
this._displayFormat = displayFormat;
|
|
1578
1659
|
this._locale = locale !== null && locale !== void 0 ? locale : this._locale;
|
|
1579
1660
|
return this;
|
|
1580
1661
|
}
|
|
1581
1662
|
asCurrency(currencyCode, currencyFromProperty, currencyDisplay, displayFormat = '1.2-2', locale) {
|
|
1582
|
-
this._columnType =
|
|
1663
|
+
this._columnType = ColumnTypeEnum.Currency;
|
|
1583
1664
|
this._currencyCode = currencyCode !== null && currencyCode !== void 0 ? currencyCode : this._currencyCode;
|
|
1584
1665
|
this._currencyFromProperty = currencyFromProperty !== null && currencyFromProperty !== void 0 ? currencyFromProperty : this._currencyFromProperty;
|
|
1585
1666
|
this._currencyDisplay = currencyDisplay !== null && currencyDisplay !== void 0 ? currencyDisplay : this._currencyDisplay;
|
|
@@ -1588,19 +1669,19 @@ class ColumnDescriptor {
|
|
|
1588
1669
|
return this;
|
|
1589
1670
|
}
|
|
1590
1671
|
asDate(displayFormat = 'dd.MM.yyyy') {
|
|
1591
|
-
this._columnType =
|
|
1672
|
+
this._columnType = ColumnTypeEnum.Date;
|
|
1592
1673
|
this._displayFormat = displayFormat;
|
|
1593
1674
|
return this;
|
|
1594
1675
|
}
|
|
1595
1676
|
asBoolean(yes, no, asIcon = false) {
|
|
1596
|
-
this._columnType =
|
|
1677
|
+
this._columnType = ColumnTypeEnum.Boolean;
|
|
1597
1678
|
this._booleanAsIcon = asIcon;
|
|
1598
1679
|
this._booleanYes = yes;
|
|
1599
1680
|
this._booleanNo = no;
|
|
1600
1681
|
return this;
|
|
1601
1682
|
}
|
|
1602
1683
|
asEnum(enumType, nameAsValue = false, titlePath) {
|
|
1603
|
-
this._columnType =
|
|
1684
|
+
this._columnType = ColumnTypeEnum.Enum;
|
|
1604
1685
|
this._enumType = enumType;
|
|
1605
1686
|
this._enumNameAsValue = nameAsValue;
|
|
1606
1687
|
if (typeof titlePath === 'undefined') {
|
|
@@ -1610,7 +1691,7 @@ class ColumnDescriptor {
|
|
|
1610
1691
|
return this;
|
|
1611
1692
|
}
|
|
1612
1693
|
asCustomComponent(customComponentType) {
|
|
1613
|
-
this._columnType =
|
|
1694
|
+
this._columnType = ColumnTypeEnum.Custom;
|
|
1614
1695
|
this._customComponentType = customComponentType;
|
|
1615
1696
|
return this;
|
|
1616
1697
|
}
|
|
@@ -1651,27 +1732,27 @@ class ColumnDescriptor {
|
|
|
1651
1732
|
return this.withFilterLookup();
|
|
1652
1733
|
}
|
|
1653
1734
|
switch (this._columnType) {
|
|
1654
|
-
case
|
|
1655
|
-
filterType =
|
|
1735
|
+
case ColumnTypeEnum.Number:
|
|
1736
|
+
filterType = FilterTypeEnum.Number;
|
|
1656
1737
|
break;
|
|
1657
|
-
case
|
|
1658
|
-
filterType =
|
|
1738
|
+
case ColumnTypeEnum.Boolean:
|
|
1739
|
+
filterType = FilterTypeEnum.Boolean;
|
|
1659
1740
|
break;
|
|
1660
|
-
case
|
|
1661
|
-
filterType =
|
|
1741
|
+
case ColumnTypeEnum.Date:
|
|
1742
|
+
filterType = FilterTypeEnum.Date;
|
|
1662
1743
|
break;
|
|
1663
|
-
case
|
|
1744
|
+
case ColumnTypeEnum.Enum:
|
|
1664
1745
|
if (!forceSimple) {
|
|
1665
1746
|
return this.withFilterLookupEnum();
|
|
1666
1747
|
}
|
|
1667
1748
|
else {
|
|
1668
|
-
filterType =
|
|
1749
|
+
filterType = FilterTypeEnum.String;
|
|
1669
1750
|
break;
|
|
1670
1751
|
}
|
|
1671
|
-
case
|
|
1672
|
-
case
|
|
1752
|
+
case ColumnTypeEnum.String:
|
|
1753
|
+
case ColumnTypeEnum.Custom:
|
|
1673
1754
|
default:
|
|
1674
|
-
filterType =
|
|
1755
|
+
filterType = FilterTypeEnum.String;
|
|
1675
1756
|
break;
|
|
1676
1757
|
}
|
|
1677
1758
|
this._filterDescriptor.asFilterType(filterType);
|
|
@@ -1684,7 +1765,7 @@ class ColumnDescriptor {
|
|
|
1684
1765
|
return filterDescriptor;
|
|
1685
1766
|
}
|
|
1686
1767
|
withFilterLookupEnum(options) {
|
|
1687
|
-
if (this._columnType !==
|
|
1768
|
+
if (this._columnType !== ColumnTypeEnum.Enum || !this._enumType) {
|
|
1688
1769
|
throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
|
|
1689
1770
|
}
|
|
1690
1771
|
const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
|
|
@@ -1729,21 +1810,9 @@ class ColumnDescriptor {
|
|
|
1729
1810
|
return descriptor;
|
|
1730
1811
|
}
|
|
1731
1812
|
}
|
|
1732
|
-
(function (ColumnDescriptor) {
|
|
1733
|
-
let TypeEnum;
|
|
1734
|
-
(function (TypeEnum) {
|
|
1735
|
-
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1736
|
-
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1737
|
-
TypeEnum[TypeEnum["Currency"] = 2] = "Currency";
|
|
1738
|
-
TypeEnum[TypeEnum["Boolean"] = 3] = "Boolean";
|
|
1739
|
-
TypeEnum[TypeEnum["Date"] = 4] = "Date";
|
|
1740
|
-
TypeEnum[TypeEnum["Enum"] = 5] = "Enum";
|
|
1741
|
-
TypeEnum[TypeEnum["Custom"] = 6] = "Custom";
|
|
1742
|
-
})(TypeEnum = ColumnDescriptor.TypeEnum || (ColumnDescriptor.TypeEnum = {}));
|
|
1743
|
-
})(ColumnDescriptor || (ColumnDescriptor = {}));
|
|
1744
1813
|
|
|
1745
1814
|
class EditorDescriptor {
|
|
1746
|
-
constructor(modelType, idProperty, titleProperty, tableviewEditorType =
|
|
1815
|
+
constructor(modelType, idProperty, titleProperty, tableviewEditorType = TableviewTypeEnum.None) {
|
|
1747
1816
|
this._tabs = [];
|
|
1748
1817
|
this._groups = [];
|
|
1749
1818
|
this._fields = [];
|
|
@@ -1889,15 +1958,6 @@ class EditorDescriptor {
|
|
|
1889
1958
|
}
|
|
1890
1959
|
}
|
|
1891
1960
|
EditorDescriptor.defaultGroupName = '_default';
|
|
1892
|
-
(function (EditorDescriptor) {
|
|
1893
|
-
let TableviewEditorTypeEnum;
|
|
1894
|
-
(function (TableviewEditorTypeEnum) {
|
|
1895
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
|
|
1896
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
|
|
1897
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
|
|
1898
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
|
|
1899
|
-
})(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
|
|
1900
|
-
})(EditorDescriptor || (EditorDescriptor = {}));
|
|
1901
1961
|
|
|
1902
1962
|
class MngFormEditorSubmitEvent {
|
|
1903
1963
|
constructor(formItem) {
|
|
@@ -1958,7 +2018,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1958
2018
|
this._className = '';
|
|
1959
2019
|
this._labelClassName = '';
|
|
1960
2020
|
this._inputClassName = '';
|
|
1961
|
-
this._size =
|
|
2021
|
+
this._size = FieldSizeEnum.Normal;
|
|
1962
2022
|
this._eventsSubject = new Subject();
|
|
1963
2023
|
this._property = property;
|
|
1964
2024
|
this._label = I18nUtils.Type.getPropertyKey(this._editor.model.typeName, property);
|
|
@@ -2021,10 +2081,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
2021
2081
|
return this._size;
|
|
2022
2082
|
}
|
|
2023
2083
|
get isSizeSmall() {
|
|
2024
|
-
return this._size ===
|
|
2084
|
+
return this._size === FieldSizeEnum.Small;
|
|
2025
2085
|
}
|
|
2026
2086
|
get isSizeLarge() {
|
|
2027
|
-
return this._size ===
|
|
2087
|
+
return this._size === FieldSizeEnum.Large;
|
|
2028
2088
|
}
|
|
2029
2089
|
withLabel(label) {
|
|
2030
2090
|
this._label = label;
|
|
@@ -2079,7 +2139,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
2079
2139
|
this._fieldClassName = fieldClassName;
|
|
2080
2140
|
return this;
|
|
2081
2141
|
}
|
|
2082
|
-
withSize(size =
|
|
2142
|
+
withSize(size = FieldSizeEnum.Normal) {
|
|
2083
2143
|
this._size = size;
|
|
2084
2144
|
return this;
|
|
2085
2145
|
}
|
|
@@ -2106,19 +2166,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
2106
2166
|
obj._validations = this._validations;
|
|
2107
2167
|
}
|
|
2108
2168
|
}
|
|
2109
|
-
var FieldDescriptor;
|
|
2110
|
-
(function (FieldDescriptor) {
|
|
2111
|
-
let SizeEnum;
|
|
2112
|
-
(function (SizeEnum) {
|
|
2113
|
-
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
2114
|
-
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
2115
|
-
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
2116
|
-
})(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
|
|
2117
|
-
})(FieldDescriptor || (FieldDescriptor = {}));
|
|
2118
2169
|
class FieldInputDescriptor extends AFieldDescriptor {
|
|
2119
2170
|
constructor(editor, property) {
|
|
2120
2171
|
super(editor, property);
|
|
2121
|
-
this._fieldType =
|
|
2172
|
+
this._fieldType = FieldInputTypeEnum.Text;
|
|
2122
2173
|
this._numberUseGrouping = true;
|
|
2123
2174
|
this._currencyDisplay = 'symbol';
|
|
2124
2175
|
// radio specific properties
|
|
@@ -2210,44 +2261,44 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2210
2261
|
return this._currencyDisplay;
|
|
2211
2262
|
}
|
|
2212
2263
|
asHidden() {
|
|
2213
|
-
this._fieldType =
|
|
2264
|
+
this._fieldType = FieldInputTypeEnum.Hidden;
|
|
2214
2265
|
return this;
|
|
2215
2266
|
}
|
|
2216
2267
|
asLabel() {
|
|
2217
|
-
this._fieldType =
|
|
2268
|
+
this._fieldType = FieldInputTypeEnum.Label;
|
|
2218
2269
|
return this;
|
|
2219
2270
|
}
|
|
2220
2271
|
asText() {
|
|
2221
|
-
this._fieldType =
|
|
2272
|
+
this._fieldType = FieldInputTypeEnum.Text;
|
|
2222
2273
|
return this;
|
|
2223
2274
|
}
|
|
2224
2275
|
asTextarea(rows = 3) {
|
|
2225
|
-
this._fieldType =
|
|
2276
|
+
this._fieldType = FieldInputTypeEnum.Textarea;
|
|
2226
2277
|
this._rows = rows;
|
|
2227
2278
|
return this;
|
|
2228
2279
|
}
|
|
2229
2280
|
asNumber() {
|
|
2230
|
-
this._fieldType =
|
|
2281
|
+
this._fieldType = FieldInputTypeEnum.Number;
|
|
2231
2282
|
return this;
|
|
2232
2283
|
}
|
|
2233
2284
|
asCurrency(currencyFromProperty, currency, currencyDisplay) {
|
|
2234
|
-
this._fieldType =
|
|
2285
|
+
this._fieldType = FieldInputTypeEnum.Currency;
|
|
2235
2286
|
this._currencyFromProperty = currencyFromProperty;
|
|
2236
2287
|
this._currency = currency !== null && currency !== void 0 ? currency : this._currency;
|
|
2237
2288
|
this._currencyDisplay = currencyDisplay !== null && currencyDisplay !== void 0 ? currencyDisplay : this._currencyDisplay;
|
|
2238
2289
|
return this.withNumberFractions(2, 2);
|
|
2239
2290
|
}
|
|
2240
2291
|
asSwitch() {
|
|
2241
|
-
this._fieldType =
|
|
2292
|
+
this._fieldType = FieldInputTypeEnum.Switch;
|
|
2242
2293
|
return this;
|
|
2243
2294
|
}
|
|
2244
2295
|
asRadio(options, optionsTitlePath) {
|
|
2245
|
-
this._fieldType =
|
|
2296
|
+
this._fieldType = FieldInputTypeEnum.Radio;
|
|
2246
2297
|
this._radioOptions = options.map(o => ({ value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}` }));
|
|
2247
2298
|
return this;
|
|
2248
2299
|
}
|
|
2249
2300
|
asRadioFromEnum(enumType, optionsTitlePath, values, nameAsValue = false) {
|
|
2250
|
-
this._fieldType =
|
|
2301
|
+
this._fieldType = FieldInputTypeEnum.Radio;
|
|
2251
2302
|
if (typeof optionsTitlePath === 'undefined') {
|
|
2252
2303
|
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
2253
2304
|
}
|
|
@@ -2257,7 +2308,7 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2257
2308
|
return this;
|
|
2258
2309
|
}
|
|
2259
2310
|
asDatePicker(format, min, max, showTime) {
|
|
2260
|
-
this._fieldType =
|
|
2311
|
+
this._fieldType = FieldInputTypeEnum.Datepicker;
|
|
2261
2312
|
this._datePickerFormat = format;
|
|
2262
2313
|
this._datePickerMin = min;
|
|
2263
2314
|
this._datePickerMax = max;
|
|
@@ -2265,20 +2316,20 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2265
2316
|
return this;
|
|
2266
2317
|
}
|
|
2267
2318
|
asMask(mask, slotChar) {
|
|
2268
|
-
this._fieldType =
|
|
2319
|
+
this._fieldType = FieldInputTypeEnum.Mask;
|
|
2269
2320
|
this._mask = mask;
|
|
2270
2321
|
this._slotChar = slotChar;
|
|
2271
2322
|
return this;
|
|
2272
2323
|
}
|
|
2273
2324
|
asFile(multiple = false, maxFileSize = 500000, accept) {
|
|
2274
|
-
this._fieldType =
|
|
2325
|
+
this._fieldType = FieldInputTypeEnum.File;
|
|
2275
2326
|
this._fileMultiple = multiple;
|
|
2276
2327
|
this._fileMaxFileSize = maxFileSize;
|
|
2277
2328
|
this._fileAccept = accept;
|
|
2278
2329
|
return this;
|
|
2279
2330
|
}
|
|
2280
2331
|
asCustomComponent(customComponentName) {
|
|
2281
|
-
this._fieldType =
|
|
2332
|
+
this._fieldType = FieldInputTypeEnum.Custom;
|
|
2282
2333
|
this._customComponentName = customComponentName;
|
|
2283
2334
|
return this;
|
|
2284
2335
|
}
|
|
@@ -2309,7 +2360,7 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2309
2360
|
return this;
|
|
2310
2361
|
}
|
|
2311
2362
|
withTextValidationEmail() {
|
|
2312
|
-
if (this.fieldType ===
|
|
2363
|
+
if (this.fieldType === FieldInputTypeEnum.Text) {
|
|
2313
2364
|
this.withValidation('email', Validators.email);
|
|
2314
2365
|
}
|
|
2315
2366
|
return this;
|
|
@@ -2350,27 +2401,10 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2350
2401
|
return field;
|
|
2351
2402
|
}
|
|
2352
2403
|
}
|
|
2353
|
-
(function (FieldInputDescriptor) {
|
|
2354
|
-
let TypeEnum;
|
|
2355
|
-
(function (TypeEnum) {
|
|
2356
|
-
TypeEnum[TypeEnum["Hidden"] = 0] = "Hidden";
|
|
2357
|
-
TypeEnum[TypeEnum["Label"] = 1] = "Label";
|
|
2358
|
-
TypeEnum[TypeEnum["Text"] = 2] = "Text";
|
|
2359
|
-
TypeEnum[TypeEnum["Textarea"] = 3] = "Textarea";
|
|
2360
|
-
TypeEnum[TypeEnum["Number"] = 4] = "Number";
|
|
2361
|
-
TypeEnum[TypeEnum["Currency"] = 5] = "Currency";
|
|
2362
|
-
TypeEnum[TypeEnum["Switch"] = 6] = "Switch";
|
|
2363
|
-
TypeEnum[TypeEnum["Radio"] = 7] = "Radio";
|
|
2364
|
-
TypeEnum[TypeEnum["Datepicker"] = 8] = "Datepicker";
|
|
2365
|
-
TypeEnum[TypeEnum["Mask"] = 9] = "Mask";
|
|
2366
|
-
TypeEnum[TypeEnum["File"] = 10] = "File";
|
|
2367
|
-
TypeEnum[TypeEnum["Custom"] = 11] = "Custom";
|
|
2368
|
-
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
2369
|
-
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
2370
2404
|
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
2371
2405
|
constructor(editor, property, modelType) {
|
|
2372
2406
|
super(editor, property);
|
|
2373
|
-
this._lookupType =
|
|
2407
|
+
this._lookupType = FieldLookupTypeEnum.Dropdown;
|
|
2374
2408
|
this._itemsLabelTranslate = false;
|
|
2375
2409
|
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
2376
2410
|
this._autocompleteOpenOnFocus = false;
|
|
@@ -2453,13 +2487,13 @@ class FieldLookupDescriptor extends AFieldDescriptor {
|
|
|
2453
2487
|
return super.withConfig(config);
|
|
2454
2488
|
}
|
|
2455
2489
|
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
2456
|
-
this._lookupType =
|
|
2490
|
+
this._lookupType = FieldLookupTypeEnum.Autocomplete;
|
|
2457
2491
|
this._autocompleteOpenOnFocus = openOnFocus;
|
|
2458
2492
|
this._autocompleteInlineSearch = inlineSearch;
|
|
2459
2493
|
return this;
|
|
2460
2494
|
}
|
|
2461
2495
|
asDialog(lookupTableDescriptor, tableDataProvider) {
|
|
2462
|
-
this._lookupType =
|
|
2496
|
+
this._lookupType = FieldLookupTypeEnum.Dialog;
|
|
2463
2497
|
this._dialogTableDescriptor = lookupTableDescriptor;
|
|
2464
2498
|
this._dialogTableDataProvider = tableDataProvider;
|
|
2465
2499
|
return this;
|
|
@@ -2481,14 +2515,6 @@ class FieldLookupDescriptor extends AFieldDescriptor {
|
|
|
2481
2515
|
return field;
|
|
2482
2516
|
}
|
|
2483
2517
|
}
|
|
2484
|
-
(function (FieldLookupDescriptor) {
|
|
2485
|
-
let LookupTypeEnum;
|
|
2486
|
-
(function (LookupTypeEnum) {
|
|
2487
|
-
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
2488
|
-
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
2489
|
-
LookupTypeEnum[LookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
2490
|
-
})(LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum || (FieldLookupDescriptor.LookupTypeEnum = {}));
|
|
2491
|
-
})(FieldLookupDescriptor || (FieldLookupDescriptor = {}));
|
|
2492
2518
|
class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
2493
2519
|
constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
2494
2520
|
super(editor, property, null);
|
|
@@ -2551,7 +2577,7 @@ class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
|
2551
2577
|
class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
2552
2578
|
constructor(editor, property, mainTableDescriptor, lookupTableDescriptor) {
|
|
2553
2579
|
super(editor, property);
|
|
2554
|
-
this._fieldType =
|
|
2580
|
+
this._fieldType = FieldManyToManyEditorTypeEnum.DialogTableMultiselect;
|
|
2555
2581
|
this._lookupTableDataProvider = null;
|
|
2556
2582
|
this._actions = [];
|
|
2557
2583
|
this._hasLookupExcludeValues = false;
|
|
@@ -2559,7 +2585,7 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
2559
2585
|
this._excludeValueProperty = '';
|
|
2560
2586
|
this._mainTableDescriptor = mainTableDescriptor;
|
|
2561
2587
|
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
2562
|
-
this._actions.push(
|
|
2588
|
+
this._actions.push(FieldManyToManyEditorActionEnum.Add, FieldManyToManyEditorActionEnum.Delete);
|
|
2563
2589
|
}
|
|
2564
2590
|
get fieldType() {
|
|
2565
2591
|
return this._fieldType;
|
|
@@ -2620,26 +2646,15 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
2620
2646
|
return field;
|
|
2621
2647
|
}
|
|
2622
2648
|
}
|
|
2623
|
-
(function (FieldManyToManyEditorDescriptor) {
|
|
2624
|
-
let TypeEnum;
|
|
2625
|
-
(function (TypeEnum) {
|
|
2626
|
-
TypeEnum[TypeEnum["DialogTableMultiselect"] = 0] = "DialogTableMultiselect";
|
|
2627
|
-
})(TypeEnum = FieldManyToManyEditorDescriptor.TypeEnum || (FieldManyToManyEditorDescriptor.TypeEnum = {}));
|
|
2628
|
-
let ActionEnum;
|
|
2629
|
-
(function (ActionEnum) {
|
|
2630
|
-
ActionEnum[ActionEnum["Add"] = 0] = "Add";
|
|
2631
|
-
ActionEnum[ActionEnum["Delete"] = 1] = "Delete";
|
|
2632
|
-
})(ActionEnum = FieldManyToManyEditorDescriptor.ActionEnum || (FieldManyToManyEditorDescriptor.ActionEnum = {}));
|
|
2633
|
-
})(FieldManyToManyEditorDescriptor || (FieldManyToManyEditorDescriptor = {}));
|
|
2634
2649
|
class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
2635
2650
|
constructor(editor, property, tableviewDescriptor) {
|
|
2636
2651
|
super(editor, property);
|
|
2637
|
-
this._fieldType =
|
|
2652
|
+
this._fieldType = FieldManyEditorTypeEnum.DialogEditor;
|
|
2638
2653
|
this._fieldActions = [];
|
|
2639
2654
|
this._actions = [];
|
|
2640
2655
|
// this._modelType = modelType;
|
|
2641
2656
|
this._tableviewDescriptor = tableviewDescriptor;
|
|
2642
|
-
this._fieldActions.push(
|
|
2657
|
+
this._fieldActions.push(FieldManyEditorActionEnum.View, FieldManyEditorActionEnum.Add, FieldManyEditorActionEnum.Edit, FieldManyEditorActionEnum.Delete);
|
|
2643
2658
|
}
|
|
2644
2659
|
get fieldType() {
|
|
2645
2660
|
return this._fieldType;
|
|
@@ -2685,19 +2700,6 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
|
2685
2700
|
return field;
|
|
2686
2701
|
}
|
|
2687
2702
|
}
|
|
2688
|
-
(function (FieldManyEditorDescriptor) {
|
|
2689
|
-
let TypeEnum;
|
|
2690
|
-
(function (TypeEnum) {
|
|
2691
|
-
TypeEnum[TypeEnum["DialogEditor"] = 0] = "DialogEditor";
|
|
2692
|
-
})(TypeEnum = FieldManyEditorDescriptor.TypeEnum || (FieldManyEditorDescriptor.TypeEnum = {}));
|
|
2693
|
-
let ActionEnum;
|
|
2694
|
-
(function (ActionEnum) {
|
|
2695
|
-
ActionEnum[ActionEnum["View"] = 0] = "View";
|
|
2696
|
-
ActionEnum[ActionEnum["Add"] = 1] = "Add";
|
|
2697
|
-
ActionEnum[ActionEnum["Edit"] = 2] = "Edit";
|
|
2698
|
-
ActionEnum[ActionEnum["Delete"] = 3] = "Delete";
|
|
2699
|
-
})(ActionEnum = FieldManyEditorDescriptor.ActionEnum || (FieldManyEditorDescriptor.ActionEnum = {}));
|
|
2700
|
-
})(FieldManyEditorDescriptor || (FieldManyEditorDescriptor = {}));
|
|
2701
2703
|
class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
2702
2704
|
constructor(editor, name) {
|
|
2703
2705
|
super(editor);
|
|
@@ -2754,7 +2756,7 @@ class FieldTabGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2754
2756
|
class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
2755
2757
|
constructor(editor, name) {
|
|
2756
2758
|
super(editor, name);
|
|
2757
|
-
this._type =
|
|
2759
|
+
this._type = FieldGroupTypeEnum.Fieldset;
|
|
2758
2760
|
if (this._default) {
|
|
2759
2761
|
this.asLogical();
|
|
2760
2762
|
}
|
|
@@ -2773,7 +2775,7 @@ class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2773
2775
|
return this;
|
|
2774
2776
|
}
|
|
2775
2777
|
asLogical() {
|
|
2776
|
-
this._type =
|
|
2778
|
+
this._type = FieldGroupTypeEnum.Logical;
|
|
2777
2779
|
return this;
|
|
2778
2780
|
}
|
|
2779
2781
|
copy() {
|
|
@@ -2784,13 +2786,6 @@ class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2784
2786
|
return group;
|
|
2785
2787
|
}
|
|
2786
2788
|
}
|
|
2787
|
-
(function (FieldGroupDescriptor) {
|
|
2788
|
-
let TypeEnum;
|
|
2789
|
-
(function (TypeEnum) {
|
|
2790
|
-
TypeEnum[TypeEnum["Fieldset"] = 0] = "Fieldset";
|
|
2791
|
-
TypeEnum[TypeEnum["Logical"] = 1] = "Logical";
|
|
2792
|
-
})(TypeEnum = FieldGroupDescriptor.TypeEnum || (FieldGroupDescriptor.TypeEnum = {}));
|
|
2793
|
-
})(FieldGroupDescriptor || (FieldGroupDescriptor = {}));
|
|
2794
2789
|
|
|
2795
2790
|
class FieldValidationDescriptor {
|
|
2796
2791
|
constructor(name, validator, message, options) {
|
|
@@ -2850,8 +2845,8 @@ class ModelDescriptor {
|
|
|
2850
2845
|
class TableDescriptor {
|
|
2851
2846
|
constructor(modelType, idProperty, titleProperty) {
|
|
2852
2847
|
var _a;
|
|
2853
|
-
this._filterDisplay =
|
|
2854
|
-
this._paginationMode =
|
|
2848
|
+
this._filterDisplay = TableFilterDisplayEnum.Menu;
|
|
2849
|
+
this._paginationMode = TablePaginationModeEnum.Pagination;
|
|
2855
2850
|
this._rowsPerPageOptions = [25, 50, 100];
|
|
2856
2851
|
this._defaultNumRows = this._rowsPerPageOptions[0];
|
|
2857
2852
|
this._columns = [];
|
|
@@ -2861,7 +2856,7 @@ class TableDescriptor {
|
|
|
2861
2856
|
this._defaultSortAsc = [];
|
|
2862
2857
|
// visual
|
|
2863
2858
|
this._className = '';
|
|
2864
|
-
this._size =
|
|
2859
|
+
this._size = TableSizeEnum.Large;
|
|
2865
2860
|
this._hasHover = true;
|
|
2866
2861
|
this._hasGridlines = false;
|
|
2867
2862
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
@@ -3002,7 +2997,7 @@ class TableDescriptor {
|
|
|
3002
2997
|
this._className = className;
|
|
3003
2998
|
return this;
|
|
3004
2999
|
}
|
|
3005
|
-
withSize(size =
|
|
3000
|
+
withSize(size = TableSizeEnum.Normal) {
|
|
3006
3001
|
this._size = size;
|
|
3007
3002
|
return this;
|
|
3008
3003
|
}
|
|
@@ -3040,34 +3035,15 @@ class TableDescriptor {
|
|
|
3040
3035
|
return descriptor;
|
|
3041
3036
|
}
|
|
3042
3037
|
}
|
|
3043
|
-
(function (TableDescriptor) {
|
|
3044
|
-
let PaginationModeEnum;
|
|
3045
|
-
(function (PaginationModeEnum) {
|
|
3046
|
-
PaginationModeEnum[PaginationModeEnum["Pagination"] = 0] = "Pagination";
|
|
3047
|
-
PaginationModeEnum[PaginationModeEnum["InfiniteScroll"] = 1] = "InfiniteScroll";
|
|
3048
|
-
})(PaginationModeEnum = TableDescriptor.PaginationModeEnum || (TableDescriptor.PaginationModeEnum = {}));
|
|
3049
|
-
let FilterDisplayEnum;
|
|
3050
|
-
(function (FilterDisplayEnum) {
|
|
3051
|
-
FilterDisplayEnum[FilterDisplayEnum["Row"] = 0] = "Row";
|
|
3052
|
-
FilterDisplayEnum[FilterDisplayEnum["Menu"] = 1] = "Menu";
|
|
3053
|
-
})(FilterDisplayEnum = TableDescriptor.FilterDisplayEnum || (TableDescriptor.FilterDisplayEnum = {}));
|
|
3054
|
-
let SizeEnum;
|
|
3055
|
-
(function (SizeEnum) {
|
|
3056
|
-
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
3057
|
-
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
3058
|
-
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
3059
|
-
})(SizeEnum = TableDescriptor.SizeEnum || (TableDescriptor.SizeEnum = {}));
|
|
3060
|
-
})(TableDescriptor || (TableDescriptor = {}));
|
|
3061
3038
|
|
|
3062
|
-
var TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;
|
|
3063
3039
|
class TableviewDescriptor {
|
|
3064
3040
|
constructor(modelType, idProperty, titleProperty) {
|
|
3065
3041
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
3066
3042
|
this._table = new TableDescriptor(modelType, idProperty, titleProperty);
|
|
3067
|
-
this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty,
|
|
3043
|
+
this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewTypeEnum.View);
|
|
3068
3044
|
this._viewEditor.withDisabled();
|
|
3069
|
-
this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty,
|
|
3070
|
-
this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty,
|
|
3045
|
+
this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewTypeEnum.Add);
|
|
3046
|
+
this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewTypeEnum.Edit);
|
|
3071
3047
|
this._tableTitle = `${this._model.typeName}.name`;
|
|
3072
3048
|
}
|
|
3073
3049
|
get table() {
|
|
@@ -3279,41 +3255,41 @@ class EditorFormlyUtil {
|
|
|
3279
3255
|
field.templateOptions['descriptor'] = descriptor;
|
|
3280
3256
|
if (descriptor instanceof FieldInputDescriptor) {
|
|
3281
3257
|
switch (descriptor.fieldType) {
|
|
3282
|
-
case
|
|
3258
|
+
case FieldInputTypeEnum.Hidden:
|
|
3283
3259
|
break;
|
|
3284
|
-
case
|
|
3260
|
+
case FieldInputTypeEnum.Label:
|
|
3285
3261
|
field.type = 'label';
|
|
3286
3262
|
delete field.key;
|
|
3287
3263
|
break;
|
|
3288
|
-
case
|
|
3264
|
+
case FieldInputTypeEnum.Textarea:
|
|
3289
3265
|
field.type = 'textarea';
|
|
3290
3266
|
break;
|
|
3291
|
-
case
|
|
3267
|
+
case FieldInputTypeEnum.Number:
|
|
3292
3268
|
field.type = 'number';
|
|
3293
3269
|
field.templateOptions.min = descriptor.numberMin;
|
|
3294
3270
|
field.templateOptions.max = descriptor.numberMax;
|
|
3295
3271
|
break;
|
|
3296
|
-
case
|
|
3272
|
+
case FieldInputTypeEnum.Currency:
|
|
3297
3273
|
field.type = 'currency';
|
|
3298
3274
|
field.templateOptions.min = descriptor.numberMin;
|
|
3299
3275
|
field.templateOptions.max = descriptor.numberMax;
|
|
3300
3276
|
break;
|
|
3301
|
-
case
|
|
3277
|
+
case FieldInputTypeEnum.Switch:
|
|
3302
3278
|
field.type = 'switch';
|
|
3303
3279
|
break;
|
|
3304
|
-
case
|
|
3280
|
+
case FieldInputTypeEnum.Radio:
|
|
3305
3281
|
field.type = 'radio';
|
|
3306
3282
|
break;
|
|
3307
|
-
case
|
|
3283
|
+
case FieldInputTypeEnum.Datepicker:
|
|
3308
3284
|
field.type = 'datepicker';
|
|
3309
3285
|
break;
|
|
3310
|
-
case
|
|
3286
|
+
case FieldInputTypeEnum.Mask:
|
|
3311
3287
|
field.type = 'mask';
|
|
3312
3288
|
break;
|
|
3313
|
-
case
|
|
3289
|
+
case FieldInputTypeEnum.File:
|
|
3314
3290
|
field.type = 'file';
|
|
3315
3291
|
break;
|
|
3316
|
-
case
|
|
3292
|
+
case FieldInputTypeEnum.Custom:
|
|
3317
3293
|
field.type = descriptor.customComponentName;
|
|
3318
3294
|
break;
|
|
3319
3295
|
default:
|
|
@@ -3329,13 +3305,13 @@ class EditorFormlyUtil {
|
|
|
3329
3305
|
}
|
|
3330
3306
|
else if (descriptor instanceof FieldLookupDescriptor) {
|
|
3331
3307
|
switch (descriptor.lookupType) {
|
|
3332
|
-
case
|
|
3308
|
+
case FieldLookupTypeEnum.Autocomplete:
|
|
3333
3309
|
field.type = 'autocomplete';
|
|
3334
3310
|
break;
|
|
3335
|
-
case
|
|
3311
|
+
case FieldLookupTypeEnum.Dialog:
|
|
3336
3312
|
field.type = 'dialog';
|
|
3337
3313
|
break;
|
|
3338
|
-
case
|
|
3314
|
+
case FieldLookupTypeEnum.Dropdown:
|
|
3339
3315
|
default:
|
|
3340
3316
|
field.type = 'dropdown';
|
|
3341
3317
|
break;
|
|
@@ -4302,10 +4278,10 @@ MediusRestUtil.matchModeMapping = [
|
|
|
4302
4278
|
[FilterMatchMode.STARTS_WITH, 'sw', MediusFilterMatchType.StartsWith, null],
|
|
4303
4279
|
[FilterMatchMode.IN, 'in', MediusFilterMatchType.In, null],
|
|
4304
4280
|
[FilterMatchMode.NOT_EQUALS, 'neq', MediusFilterMatchType.NotEquals, null],
|
|
4305
|
-
[FilterMatchMode.DATE_IS, 'eq', MediusFilterMatchType.Equals,
|
|
4306
|
-
[FilterMatchMode.DATE_BEFORE, 'lt', MediusFilterMatchType.SmallerThan,
|
|
4307
|
-
[FilterMatchMode.DATE_AFTER, 'gt', MediusFilterMatchType.GreaterThan,
|
|
4308
|
-
[FilterMatchMode.DATE_IS_NOT, 'neq', MediusFilterMatchType.NotEquals,
|
|
4281
|
+
[FilterMatchMode.DATE_IS, 'eq', MediusFilterMatchType.Equals, FilterTypeEnum.Date],
|
|
4282
|
+
[FilterMatchMode.DATE_BEFORE, 'lt', MediusFilterMatchType.SmallerThan, FilterTypeEnum.Date],
|
|
4283
|
+
[FilterMatchMode.DATE_AFTER, 'gt', MediusFilterMatchType.GreaterThan, FilterTypeEnum.Date],
|
|
4284
|
+
[FilterMatchMode.DATE_IS_NOT, 'neq', MediusFilterMatchType.NotEquals, FilterTypeEnum.Date]
|
|
4309
4285
|
];
|
|
4310
4286
|
|
|
4311
4287
|
class ActionError {
|
|
@@ -4749,10 +4725,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4749
4725
|
|
|
4750
4726
|
class MngEnumPipe {
|
|
4751
4727
|
transform(value, enumObj, i18nPath, nameAsValue = false) {
|
|
4728
|
+
var _a;
|
|
4752
4729
|
if (!value || (typeof value !== 'number' && typeof value !== 'string') || !enumObj) {
|
|
4753
4730
|
return value;
|
|
4754
4731
|
}
|
|
4755
|
-
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);
|
|
4732
|
+
const enumConstantName = nameAsValue ? value : (_a = EnumUtil.getConstantNameFromEnumObject(enumObj, value)) !== null && _a !== void 0 ? _a : value;
|
|
4756
4733
|
if (typeof i18nPath === 'undefined') {
|
|
4757
4734
|
i18nPath = TypeUtil.findEnumName(enumObj);
|
|
4758
4735
|
}
|
|
@@ -5236,19 +5213,19 @@ class MngActionExecutorService {
|
|
|
5236
5213
|
dialogClassName = (_a = action.dialogClassName) !== null && _a !== void 0 ? _a : 'mng-action-editor-dialog';
|
|
5237
5214
|
let dialogSizeClassName = '';
|
|
5238
5215
|
switch (action.dialogSize) {
|
|
5239
|
-
case
|
|
5216
|
+
case ActionEditorDialogSizeEnum.ExtraSmall:
|
|
5240
5217
|
dialogSizeClassName = 'mng-action-editor-dialog-xs';
|
|
5241
5218
|
break;
|
|
5242
|
-
case
|
|
5219
|
+
case ActionEditorDialogSizeEnum.Small:
|
|
5243
5220
|
dialogSizeClassName = 'mng-action-editor-dialog-sm';
|
|
5244
5221
|
break;
|
|
5245
|
-
case
|
|
5222
|
+
case ActionEditorDialogSizeEnum.Large:
|
|
5246
5223
|
dialogSizeClassName = 'mng-action-editor-dialog-lg';
|
|
5247
5224
|
break;
|
|
5248
|
-
case
|
|
5225
|
+
case ActionEditorDialogSizeEnum.ExtraLarge:
|
|
5249
5226
|
dialogSizeClassName = 'mng-action-editor-dialog-xl';
|
|
5250
5227
|
break;
|
|
5251
|
-
case
|
|
5228
|
+
case ActionEditorDialogSizeEnum.Normal:
|
|
5252
5229
|
default:
|
|
5253
5230
|
break;
|
|
5254
5231
|
}
|
|
@@ -5584,25 +5561,9 @@ class MngCommonsService {
|
|
|
5584
5561
|
// ripple
|
|
5585
5562
|
this.primengConfig.ripple = true;
|
|
5586
5563
|
this.primengConfig.filterMatchModeOptions = {
|
|
5587
|
-
text: [
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
5591
|
-
FilterDescriptor.MatchModeEnum.StartsWith,
|
|
5592
|
-
FilterDescriptor.MatchModeEnum.EndsWith
|
|
5593
|
-
],
|
|
5594
|
-
numeric: [
|
|
5595
|
-
FilterDescriptor.MatchModeEnum.Equals,
|
|
5596
|
-
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
5597
|
-
FilterDescriptor.MatchModeEnum.LessThan,
|
|
5598
|
-
FilterDescriptor.MatchModeEnum.GreaterThan
|
|
5599
|
-
],
|
|
5600
|
-
date: [
|
|
5601
|
-
FilterDescriptor.MatchModeEnum.DateIs,
|
|
5602
|
-
FilterDescriptor.MatchModeEnum.DateIsNot,
|
|
5603
|
-
FilterDescriptor.MatchModeEnum.DateBefore,
|
|
5604
|
-
FilterDescriptor.MatchModeEnum.DateAfter
|
|
5605
|
-
]
|
|
5564
|
+
text: [FilterMatchModeEnum.Contains, FilterMatchModeEnum.Equals, FilterMatchModeEnum.NotEquals, FilterMatchModeEnum.StartsWith, FilterMatchModeEnum.EndsWith],
|
|
5565
|
+
numeric: [FilterMatchModeEnum.Equals, FilterMatchModeEnum.NotEquals, FilterMatchModeEnum.LessThan, FilterMatchModeEnum.GreaterThan],
|
|
5566
|
+
date: [FilterMatchModeEnum.DateIs, FilterMatchModeEnum.DateIsNot, FilterMatchModeEnum.DateBefore, FilterMatchModeEnum.DateAfter]
|
|
5606
5567
|
};
|
|
5607
5568
|
// translate
|
|
5608
5569
|
this.translate.langs = this.appLanguages;
|
|
@@ -6816,14 +6777,14 @@ class MngActionEditorComponent {
|
|
|
6816
6777
|
for (const action of this.action.editorActions) {
|
|
6817
6778
|
if (action instanceof ActionEditorSubmitDescriptor) {
|
|
6818
6779
|
if (typeof action.icon === 'undefined') {
|
|
6819
|
-
action.withIcon(action.submitType ===
|
|
6780
|
+
action.withIcon(action.submitType === ActionEditorSubmitTypeEnum.Submit ? 'pi pi-check' : 'pi pi-times');
|
|
6820
6781
|
}
|
|
6821
6782
|
if (typeof action.title === 'undefined') {
|
|
6822
|
-
action.withTitle(action.submitType ===
|
|
6783
|
+
action.withTitle(action.submitType === ActionEditorSubmitTypeEnum.Submit ? 'general.save' : this.isDialog ? 'general.close' : 'general.cancel');
|
|
6823
6784
|
}
|
|
6824
6785
|
// assign run operations
|
|
6825
6786
|
action.withRunNotificationSuccess(undefined, undefined, false);
|
|
6826
|
-
if (action.submitType ===
|
|
6787
|
+
if (action.submitType === ActionEditorSubmitTypeEnum.Submit) {
|
|
6827
6788
|
action.withRunFunction(() => {
|
|
6828
6789
|
this.triggerSubmit();
|
|
6829
6790
|
return of(undefined);
|
|
@@ -7013,7 +6974,7 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
7013
6974
|
var _a;
|
|
7014
6975
|
this.iFormControl = this.formControl;
|
|
7015
6976
|
this.descriptor = this.to['descriptor'];
|
|
7016
|
-
if (this.descriptor.fieldType ===
|
|
6977
|
+
if (this.descriptor.fieldType === FieldInputTypeEnum.Currency) {
|
|
7017
6978
|
this.numberFieldMode = 'currency';
|
|
7018
6979
|
if (this.descriptor.currencyFromProperty) {
|
|
7019
6980
|
const currencyFromPropSubscription = this.iFormControl
|
|
@@ -7139,9 +7100,9 @@ class StylesUtil {
|
|
|
7139
7100
|
}
|
|
7140
7101
|
static getTableCellPaddingX(table) {
|
|
7141
7102
|
switch (table.size) {
|
|
7142
|
-
case
|
|
7103
|
+
case TableSizeEnum.Small:
|
|
7143
7104
|
return StylesUtil.TABLE_CELL_PADDING_X_SM;
|
|
7144
|
-
case
|
|
7105
|
+
case TableSizeEnum.Large:
|
|
7145
7106
|
return StylesUtil.TABLE_CELL_PADDING_X_LG;
|
|
7146
7107
|
default:
|
|
7147
7108
|
return StylesUtil.TABLE_CELL_PADDING_X;
|
|
@@ -7149,14 +7110,14 @@ class StylesUtil {
|
|
|
7149
7110
|
}
|
|
7150
7111
|
static getActionButtonRoundedWidth(action) {
|
|
7151
7112
|
switch (action.size) {
|
|
7152
|
-
case
|
|
7113
|
+
case ActionSizeEnum.ExtraSmall:
|
|
7153
7114
|
return StylesUtil.BUTTON_ROUNDED_WIDTH_XS;
|
|
7154
|
-
case
|
|
7115
|
+
case ActionSizeEnum.Small:
|
|
7155
7116
|
return StylesUtil.BUTTON_ROUNDED_WIDTH_SM;
|
|
7156
|
-
case
|
|
7157
|
-
case
|
|
7117
|
+
case ActionSizeEnum.Large:
|
|
7118
|
+
case ActionSizeEnum.ExtraLarge:
|
|
7158
7119
|
return StylesUtil.BUTTON_ROUNDED_WIDTH_LG;
|
|
7159
|
-
case
|
|
7120
|
+
case ActionSizeEnum.Normal:
|
|
7160
7121
|
default:
|
|
7161
7122
|
return StylesUtil.BUTTON_ROUNDED_WIDTH;
|
|
7162
7123
|
}
|
|
@@ -7194,8 +7155,8 @@ class MngTableReloadEvent {
|
|
|
7194
7155
|
class MngTableColumnFilterComponent {
|
|
7195
7156
|
constructor(primeConfig) {
|
|
7196
7157
|
this.primeConfig = primeConfig;
|
|
7197
|
-
this.lookupTypeDropdown =
|
|
7198
|
-
this.lookupTypeAutocomplete =
|
|
7158
|
+
this.lookupTypeDropdown = FilterLookupTypeEnum.Dropdown;
|
|
7159
|
+
this.lookupTypeAutocomplete = FilterLookupTypeEnum.Autocomplete;
|
|
7199
7160
|
this.primeType = 'text';
|
|
7200
7161
|
this.primeShowMatchMode = true;
|
|
7201
7162
|
this.primeDefaultMatchMode = FilterMatchMode.EQUALS;
|
|
@@ -7205,25 +7166,25 @@ class MngTableColumnFilterComponent {
|
|
|
7205
7166
|
ngOnInit() {
|
|
7206
7167
|
var _a;
|
|
7207
7168
|
switch (this.descriptor.filterType) {
|
|
7208
|
-
case
|
|
7169
|
+
case FilterTypeEnum.Boolean:
|
|
7209
7170
|
this.primeType = 'boolean';
|
|
7210
7171
|
this.primeShowMatchMode = false;
|
|
7211
7172
|
break;
|
|
7212
|
-
case
|
|
7173
|
+
case FilterTypeEnum.Number:
|
|
7213
7174
|
this.primeType = 'numeric';
|
|
7214
7175
|
break;
|
|
7215
|
-
case
|
|
7176
|
+
case FilterTypeEnum.Date:
|
|
7216
7177
|
this.primeType = 'date';
|
|
7217
7178
|
this.primeDefaultMatchMode = FilterMatchMode.DATE_AFTER;
|
|
7218
7179
|
break;
|
|
7219
|
-
case
|
|
7180
|
+
case FilterTypeEnum.Lookup:
|
|
7220
7181
|
this.primeType = 'lookup';
|
|
7221
7182
|
this.primeShowMatchMode = false;
|
|
7222
7183
|
this.lookupDescriptor = this.descriptor;
|
|
7223
7184
|
this.primeField = `${this.descriptor.property}${this.lookupDescriptor.itemsValueProperty ? `.${this.lookupDescriptor.itemsValueProperty}` : ''}`;
|
|
7224
|
-
this.primeMatchModes = [{ value:
|
|
7185
|
+
this.primeMatchModes = [{ value: FilterMatchModeEnum.Equals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.Equals) }];
|
|
7225
7186
|
break;
|
|
7226
|
-
case
|
|
7187
|
+
case FilterTypeEnum.String:
|
|
7227
7188
|
this.primeType = 'text';
|
|
7228
7189
|
this.primeDefaultMatchMode = FilterMatchMode.CONTAINS;
|
|
7229
7190
|
break;
|
|
@@ -7234,7 +7195,7 @@ class MngTableColumnFilterComponent {
|
|
|
7234
7195
|
this.primeShowMatchMode = ((_a = this.primeMatchModes) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
7235
7196
|
}
|
|
7236
7197
|
switch (this.display) {
|
|
7237
|
-
case
|
|
7198
|
+
case TableFilterDisplayEnum.Menu:
|
|
7238
7199
|
this.primeDisplay = 'menu';
|
|
7239
7200
|
break;
|
|
7240
7201
|
}
|
|
@@ -7283,20 +7244,20 @@ class MngTableColumnValueComponent {
|
|
|
7283
7244
|
this.elementRef = elementRef;
|
|
7284
7245
|
this.messageService = messageService;
|
|
7285
7246
|
this.translate = translate;
|
|
7286
|
-
this.columnTypeString =
|
|
7287
|
-
this.columnTypeNumber =
|
|
7288
|
-
this.columnTypeCurrency =
|
|
7289
|
-
this.columnTypeBoolean =
|
|
7290
|
-
this.columnTypeDate =
|
|
7291
|
-
this.columnTypeEnum =
|
|
7292
|
-
this.columnTypeCustom =
|
|
7247
|
+
this.columnTypeString = ColumnTypeEnum.String;
|
|
7248
|
+
this.columnTypeNumber = ColumnTypeEnum.Number;
|
|
7249
|
+
this.columnTypeCurrency = ColumnTypeEnum.Currency;
|
|
7250
|
+
this.columnTypeBoolean = ColumnTypeEnum.Boolean;
|
|
7251
|
+
this.columnTypeDate = ColumnTypeEnum.Date;
|
|
7252
|
+
this.columnTypeEnum = ColumnTypeEnum.Enum;
|
|
7253
|
+
this.columnTypeCustom = ColumnTypeEnum.Custom;
|
|
7293
7254
|
this.styleMaxWidth = null;
|
|
7294
7255
|
this.className = 'nowrap';
|
|
7295
7256
|
this.jsonPath = '$';
|
|
7296
7257
|
}
|
|
7297
7258
|
ngOnInit() {
|
|
7298
7259
|
var _a;
|
|
7299
|
-
if (this.descriptor.columnType ===
|
|
7260
|
+
if (this.descriptor.columnType === ColumnTypeEnum.Currency) {
|
|
7300
7261
|
this.currency = this.descriptor.currencyFromProperty ? this.item[this.descriptor.currencyFromProperty] : (_a = this.descriptor.currencyCode) !== null && _a !== void 0 ? _a : 'EUR';
|
|
7301
7262
|
}
|
|
7302
7263
|
if (this.descriptor.maxWidth) {
|
|
@@ -7338,8 +7299,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
7338
7299
|
args: ['class']
|
|
7339
7300
|
}] } });
|
|
7340
7301
|
|
|
7341
|
-
var PaginationModeEnum = TableDescriptor.PaginationModeEnum;
|
|
7342
|
-
var TypeEnum = FilterDescriptor.TypeEnum;
|
|
7343
7302
|
class MngTableComponent {
|
|
7344
7303
|
constructor(injector, router, route, translate, actionExecutor, viewContainerService) {
|
|
7345
7304
|
this.injector = injector;
|
|
@@ -7348,8 +7307,8 @@ class MngTableComponent {
|
|
|
7348
7307
|
this.translate = translate;
|
|
7349
7308
|
this.actionExecutor = actionExecutor;
|
|
7350
7309
|
this.viewContainerService = viewContainerService;
|
|
7351
|
-
this.filterDisplayRow =
|
|
7352
|
-
this.filterDisplayMenu =
|
|
7310
|
+
this.filterDisplayRow = TableFilterDisplayEnum.Row;
|
|
7311
|
+
this.filterDisplayMenu = TableFilterDisplayEnum.Menu;
|
|
7353
7312
|
this.useQueryParams = false;
|
|
7354
7313
|
// extra features input
|
|
7355
7314
|
this.selectionMode = 'multiple';
|
|
@@ -7422,10 +7381,10 @@ class MngTableComponent {
|
|
|
7422
7381
|
this.isColumnClickable = this.rowClickActions.length > 0 || this.cellClickEventEmitter.observed;
|
|
7423
7382
|
}
|
|
7424
7383
|
switch (this.descriptor.size) {
|
|
7425
|
-
case
|
|
7384
|
+
case TableSizeEnum.Small:
|
|
7426
7385
|
this.className += ' p-datatable-sm';
|
|
7427
7386
|
break;
|
|
7428
|
-
case
|
|
7387
|
+
case TableSizeEnum.Large:
|
|
7429
7388
|
this.className += ' p-datatable-lg';
|
|
7430
7389
|
break;
|
|
7431
7390
|
}
|
|
@@ -7436,7 +7395,7 @@ class MngTableComponent {
|
|
|
7436
7395
|
this.columnActionMinWidth = StylesUtil.calculateTableColumnActionWidth(this.descriptor, this.rowInlineActions);
|
|
7437
7396
|
}
|
|
7438
7397
|
// check if infinite scroll
|
|
7439
|
-
if (this.descriptor.paginationMode ===
|
|
7398
|
+
if (this.descriptor.paginationMode === TablePaginationModeEnum.InfiniteScroll) {
|
|
7440
7399
|
this.infiniteScroll = true;
|
|
7441
7400
|
this.scrollHeight = 'flex';
|
|
7442
7401
|
this.tableFullHeightOffset = (_e = this.descriptor.tableFullHeightOffset) !== null && _e !== void 0 ? _e : 315;
|
|
@@ -7633,10 +7592,10 @@ class MngTableComponent {
|
|
|
7633
7592
|
this.filterDescriptors.forEach(f => {
|
|
7634
7593
|
let matchMode;
|
|
7635
7594
|
switch (f.filterType) {
|
|
7636
|
-
case
|
|
7595
|
+
case FilterTypeEnum.String:
|
|
7637
7596
|
matchMode = FilterMatchMode.CONTAINS;
|
|
7638
7597
|
break;
|
|
7639
|
-
case
|
|
7598
|
+
case FilterTypeEnum.Date:
|
|
7640
7599
|
matchMode = FilterMatchMode.DATE_AFTER;
|
|
7641
7600
|
break;
|
|
7642
7601
|
default:
|
|
@@ -7661,7 +7620,7 @@ class MngTableComponent {
|
|
|
7661
7620
|
const matchMode = f.filterMatchType && descriptor ? (_a = MediusRestUtil.getMapping(f.filterMatchType, descriptor.filterType, 2)) === null || _a === void 0 ? void 0 : _a[0] : MediusFilterMatchType.Equals;
|
|
7662
7621
|
if (descriptor && matchMode) {
|
|
7663
7622
|
let filterValue = f.filterValue;
|
|
7664
|
-
if (descriptor.filterType ===
|
|
7623
|
+
if (descriptor.filterType === FilterTypeEnum.Date && typeof filterValue !== 'undefined') {
|
|
7665
7624
|
if (typeof filterValue === 'string' || typeof filterValue === 'number') {
|
|
7666
7625
|
filterValue = new Date(filterValue);
|
|
7667
7626
|
}
|
|
@@ -8096,8 +8055,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
8096
8055
|
args: [MngTableComponent]
|
|
8097
8056
|
}] } });
|
|
8098
8057
|
|
|
8099
|
-
var SizeEnum = ActionDescriptor.SizeEnum;
|
|
8100
|
-
var DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum;
|
|
8101
8058
|
class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
8102
8059
|
constructor(actionExecutor) {
|
|
8103
8060
|
super();
|
|
@@ -8112,17 +8069,17 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8112
8069
|
}
|
|
8113
8070
|
ngOnInit() {
|
|
8114
8071
|
this.descriptor = this.to['descriptor'];
|
|
8115
|
-
const hasViewAction = this.descriptor.fieldActions.some(a => a ===
|
|
8116
|
-
const hasAddAction = this.descriptor.fieldActions.some(a => a ===
|
|
8117
|
-
const hasEditAction = this.descriptor.fieldActions.some(a => a ===
|
|
8118
|
-
const hasDeleteAction = this.descriptor.fieldActions.some(a => a ===
|
|
8072
|
+
const hasViewAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.View);
|
|
8073
|
+
const hasAddAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Add);
|
|
8074
|
+
const hasEditAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Edit);
|
|
8075
|
+
const hasDeleteAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Delete);
|
|
8119
8076
|
if (hasViewAction) {
|
|
8120
8077
|
const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)
|
|
8121
8078
|
.withPosition(ActionPositionEnum.RowClick)
|
|
8122
8079
|
.withTitle(null)
|
|
8123
8080
|
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
8124
|
-
.withDialogSize(
|
|
8125
|
-
viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction,
|
|
8081
|
+
.withDialogSize(ActionEditorDialogSizeEnum.Small);
|
|
8082
|
+
viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitTypeEnum.Cancel)]);
|
|
8126
8083
|
this.actions.push(viewAction);
|
|
8127
8084
|
}
|
|
8128
8085
|
if (hasAddAction) {
|
|
@@ -8131,8 +8088,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8131
8088
|
.withTitle(null)
|
|
8132
8089
|
.withIcon('pi pi-plus')
|
|
8133
8090
|
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
8134
|
-
.withDialogSize(
|
|
8135
|
-
.withSize(
|
|
8091
|
+
.withDialogSize(ActionEditorDialogSizeEnum.Small)
|
|
8092
|
+
.withSize(ActionSizeEnum.ExtraSmall)
|
|
8136
8093
|
.withSubmitFunction(ctx => {
|
|
8137
8094
|
if (!ctx.parameters.item) {
|
|
8138
8095
|
return throwError(() => new Error(`No item was provided in context, edit cannot be done.`));
|
|
@@ -8153,8 +8110,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8153
8110
|
.withTitle(null)
|
|
8154
8111
|
.withIcon('pi pi-pencil')
|
|
8155
8112
|
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
8156
|
-
.withDialogSize(
|
|
8157
|
-
.withSize(
|
|
8113
|
+
.withDialogSize(ActionEditorDialogSizeEnum.Small)
|
|
8114
|
+
.withSize(ActionSizeEnum.ExtraSmall)
|
|
8158
8115
|
.withSubmitFunction(ctx => {
|
|
8159
8116
|
var _a;
|
|
8160
8117
|
if (!ctx.parameters.item) {
|
|
@@ -8176,7 +8133,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8176
8133
|
.withLevel(ActionLevelEnum.Danger)
|
|
8177
8134
|
.withTitle(null)
|
|
8178
8135
|
.withIcon('pi pi-trash')
|
|
8179
|
-
.withSize(
|
|
8136
|
+
.withSize(ActionSizeEnum.ExtraSmall)
|
|
8180
8137
|
.withRunFunction(ctx => {
|
|
8181
8138
|
var _a;
|
|
8182
8139
|
if (!ctx.parameters.item) {
|
|
@@ -8269,8 +8226,8 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
8269
8226
|
this.dialogUseDataProvider = true;
|
|
8270
8227
|
this.dialogDataProviderService = this.injector.get(this.descriptor.lookupTableDataProvider.serviceType);
|
|
8271
8228
|
}
|
|
8272
|
-
this.hasAddAction = this.descriptor.actions.some(a => a ===
|
|
8273
|
-
this.hasDeleteAction = this.descriptor.actions.some(a => a ===
|
|
8229
|
+
this.hasAddAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorActionEnum.Add);
|
|
8230
|
+
this.hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorActionEnum.Delete);
|
|
8274
8231
|
// init values
|
|
8275
8232
|
if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
|
|
8276
8233
|
this.formControl.patchValue([]);
|
|
@@ -8368,8 +8325,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
8368
8325
|
class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
8369
8326
|
constructor() {
|
|
8370
8327
|
super(...arguments);
|
|
8371
|
-
this.typeFieldset =
|
|
8372
|
-
this.typeLogical =
|
|
8328
|
+
this.typeFieldset = FieldGroupTypeEnum.Fieldset;
|
|
8329
|
+
this.typeLogical = FieldGroupTypeEnum.Logical;
|
|
8373
8330
|
}
|
|
8374
8331
|
ngOnInit() {
|
|
8375
8332
|
this.descriptor = this.to['descriptor'];
|
|
@@ -10178,5 +10135,5 @@ class RouteDataBuilder {
|
|
|
10178
10135
|
* Generated bundle index. Do not edit.
|
|
10179
10136
|
*/
|
|
10180
10137
|
|
|
10181
|
-
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, ActionActivationTriggerEnum, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLevelEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, ColumnDescriptor, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil,
|
|
10138
|
+
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, ActionActivationTriggerEnum, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorDialogSizeEnum, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLevelEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionSizeEnum, ActionTypeEnum, ColumnDescriptor, ColumnTypeEnum, DataProvider, DefaultMngErrorMapperService, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, 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, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewDataProvider, TableviewDescriptor, TableviewTypeEnum, TypeName, TypeUtil, enumNameDecoratorPropertyName, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMinLengthValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, typeMapBase, typeNameDecoratorPropertyName };
|
|
10182
10139
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|