@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
|
@@ -546,6 +546,179 @@ class TableviewDataProvider extends EditorDataProvider {
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
+
var ActionPositionEnum;
|
|
550
|
+
(function (ActionPositionEnum) {
|
|
551
|
+
ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
|
|
552
|
+
ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
|
|
553
|
+
ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
|
|
554
|
+
ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
|
|
555
|
+
ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
|
|
556
|
+
ActionPositionEnum[ActionPositionEnum["FooterLeft"] = 5] = "FooterLeft";
|
|
557
|
+
ActionPositionEnum[ActionPositionEnum["FooterRight"] = 6] = "FooterRight";
|
|
558
|
+
})(ActionPositionEnum || (ActionPositionEnum = {}));
|
|
559
|
+
var ActionActivationTriggerEnum;
|
|
560
|
+
(function (ActionActivationTriggerEnum) {
|
|
561
|
+
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
|
|
562
|
+
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
|
|
563
|
+
})(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
|
|
564
|
+
var ActionTypeEnum;
|
|
565
|
+
(function (ActionTypeEnum) {
|
|
566
|
+
ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
|
|
567
|
+
ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
|
|
568
|
+
})(ActionTypeEnum || (ActionTypeEnum = {}));
|
|
569
|
+
var ActionLevelEnum;
|
|
570
|
+
(function (ActionLevelEnum) {
|
|
571
|
+
ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
|
|
572
|
+
ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
|
|
573
|
+
ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
|
|
574
|
+
ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
|
|
575
|
+
ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
|
|
576
|
+
ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
|
|
577
|
+
ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
|
|
578
|
+
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
579
|
+
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
580
|
+
var ActionSizeEnum;
|
|
581
|
+
(function (ActionSizeEnum) {
|
|
582
|
+
ActionSizeEnum[ActionSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
583
|
+
ActionSizeEnum[ActionSizeEnum["Small"] = 1] = "Small";
|
|
584
|
+
ActionSizeEnum[ActionSizeEnum["Normal"] = 2] = "Normal";
|
|
585
|
+
ActionSizeEnum[ActionSizeEnum["Large"] = 3] = "Large";
|
|
586
|
+
ActionSizeEnum[ActionSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
587
|
+
})(ActionSizeEnum || (ActionSizeEnum = {}));
|
|
588
|
+
var ActionEditorDialogSizeEnum;
|
|
589
|
+
(function (ActionEditorDialogSizeEnum) {
|
|
590
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
591
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["Small"] = 1] = "Small";
|
|
592
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["Normal"] = 2] = "Normal";
|
|
593
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["Large"] = 3] = "Large";
|
|
594
|
+
ActionEditorDialogSizeEnum[ActionEditorDialogSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
595
|
+
})(ActionEditorDialogSizeEnum || (ActionEditorDialogSizeEnum = {}));
|
|
596
|
+
var ActionEditorSubmitTypeEnum;
|
|
597
|
+
(function (ActionEditorSubmitTypeEnum) {
|
|
598
|
+
ActionEditorSubmitTypeEnum[ActionEditorSubmitTypeEnum["Submit"] = 0] = "Submit";
|
|
599
|
+
ActionEditorSubmitTypeEnum[ActionEditorSubmitTypeEnum["Cancel"] = 1] = "Cancel";
|
|
600
|
+
})(ActionEditorSubmitTypeEnum || (ActionEditorSubmitTypeEnum = {}));
|
|
601
|
+
|
|
602
|
+
var ColumnTypeEnum;
|
|
603
|
+
(function (ColumnTypeEnum) {
|
|
604
|
+
ColumnTypeEnum[ColumnTypeEnum["String"] = 0] = "String";
|
|
605
|
+
ColumnTypeEnum[ColumnTypeEnum["Number"] = 1] = "Number";
|
|
606
|
+
ColumnTypeEnum[ColumnTypeEnum["Currency"] = 2] = "Currency";
|
|
607
|
+
ColumnTypeEnum[ColumnTypeEnum["Boolean"] = 3] = "Boolean";
|
|
608
|
+
ColumnTypeEnum[ColumnTypeEnum["Date"] = 4] = "Date";
|
|
609
|
+
ColumnTypeEnum[ColumnTypeEnum["Enum"] = 5] = "Enum";
|
|
610
|
+
ColumnTypeEnum[ColumnTypeEnum["Custom"] = 6] = "Custom";
|
|
611
|
+
})(ColumnTypeEnum || (ColumnTypeEnum = {}));
|
|
612
|
+
|
|
613
|
+
var TableviewTypeEnum;
|
|
614
|
+
(function (TableviewTypeEnum) {
|
|
615
|
+
TableviewTypeEnum[TableviewTypeEnum["None"] = 0] = "None";
|
|
616
|
+
TableviewTypeEnum[TableviewTypeEnum["View"] = 1] = "View";
|
|
617
|
+
TableviewTypeEnum[TableviewTypeEnum["Edit"] = 2] = "Edit";
|
|
618
|
+
TableviewTypeEnum[TableviewTypeEnum["Add"] = 3] = "Add";
|
|
619
|
+
})(TableviewTypeEnum || (TableviewTypeEnum = {}));
|
|
620
|
+
|
|
621
|
+
var FieldSizeEnum;
|
|
622
|
+
(function (FieldSizeEnum) {
|
|
623
|
+
FieldSizeEnum[FieldSizeEnum["Small"] = 0] = "Small";
|
|
624
|
+
FieldSizeEnum[FieldSizeEnum["Normal"] = 1] = "Normal";
|
|
625
|
+
FieldSizeEnum[FieldSizeEnum["Large"] = 2] = "Large";
|
|
626
|
+
})(FieldSizeEnum || (FieldSizeEnum = {}));
|
|
627
|
+
var FieldInputTypeEnum;
|
|
628
|
+
(function (FieldInputTypeEnum) {
|
|
629
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Hidden"] = 0] = "Hidden";
|
|
630
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Label"] = 1] = "Label";
|
|
631
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Text"] = 2] = "Text";
|
|
632
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Textarea"] = 3] = "Textarea";
|
|
633
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Number"] = 4] = "Number";
|
|
634
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Currency"] = 5] = "Currency";
|
|
635
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Switch"] = 6] = "Switch";
|
|
636
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Radio"] = 7] = "Radio";
|
|
637
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Datepicker"] = 8] = "Datepicker";
|
|
638
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Mask"] = 9] = "Mask";
|
|
639
|
+
FieldInputTypeEnum[FieldInputTypeEnum["File"] = 10] = "File";
|
|
640
|
+
FieldInputTypeEnum[FieldInputTypeEnum["Custom"] = 11] = "Custom";
|
|
641
|
+
})(FieldInputTypeEnum || (FieldInputTypeEnum = {}));
|
|
642
|
+
var FieldLookupTypeEnum;
|
|
643
|
+
(function (FieldLookupTypeEnum) {
|
|
644
|
+
FieldLookupTypeEnum[FieldLookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
645
|
+
FieldLookupTypeEnum[FieldLookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
646
|
+
FieldLookupTypeEnum[FieldLookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
647
|
+
})(FieldLookupTypeEnum || (FieldLookupTypeEnum = {}));
|
|
648
|
+
var FieldManyToManyEditorTypeEnum;
|
|
649
|
+
(function (FieldManyToManyEditorTypeEnum) {
|
|
650
|
+
FieldManyToManyEditorTypeEnum[FieldManyToManyEditorTypeEnum["DialogTableMultiselect"] = 0] = "DialogTableMultiselect";
|
|
651
|
+
})(FieldManyToManyEditorTypeEnum || (FieldManyToManyEditorTypeEnum = {}));
|
|
652
|
+
var FieldManyToManyEditorActionEnum;
|
|
653
|
+
(function (FieldManyToManyEditorActionEnum) {
|
|
654
|
+
FieldManyToManyEditorActionEnum[FieldManyToManyEditorActionEnum["Add"] = 0] = "Add";
|
|
655
|
+
FieldManyToManyEditorActionEnum[FieldManyToManyEditorActionEnum["Delete"] = 1] = "Delete";
|
|
656
|
+
})(FieldManyToManyEditorActionEnum || (FieldManyToManyEditorActionEnum = {}));
|
|
657
|
+
var FieldManyEditorTypeEnum;
|
|
658
|
+
(function (FieldManyEditorTypeEnum) {
|
|
659
|
+
FieldManyEditorTypeEnum[FieldManyEditorTypeEnum["DialogEditor"] = 0] = "DialogEditor";
|
|
660
|
+
})(FieldManyEditorTypeEnum || (FieldManyEditorTypeEnum = {}));
|
|
661
|
+
var FieldManyEditorActionEnum;
|
|
662
|
+
(function (FieldManyEditorActionEnum) {
|
|
663
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["View"] = 0] = "View";
|
|
664
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["Add"] = 1] = "Add";
|
|
665
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["Edit"] = 2] = "Edit";
|
|
666
|
+
FieldManyEditorActionEnum[FieldManyEditorActionEnum["Delete"] = 3] = "Delete";
|
|
667
|
+
})(FieldManyEditorActionEnum || (FieldManyEditorActionEnum = {}));
|
|
668
|
+
var FieldGroupTypeEnum;
|
|
669
|
+
(function (FieldGroupTypeEnum) {
|
|
670
|
+
FieldGroupTypeEnum[FieldGroupTypeEnum["Fieldset"] = 0] = "Fieldset";
|
|
671
|
+
FieldGroupTypeEnum[FieldGroupTypeEnum["Logical"] = 1] = "Logical";
|
|
672
|
+
})(FieldGroupTypeEnum || (FieldGroupTypeEnum = {}));
|
|
673
|
+
|
|
674
|
+
var FilterTypeEnum;
|
|
675
|
+
(function (FilterTypeEnum) {
|
|
676
|
+
FilterTypeEnum[FilterTypeEnum["String"] = 0] = "String";
|
|
677
|
+
FilterTypeEnum[FilterTypeEnum["Number"] = 1] = "Number";
|
|
678
|
+
FilterTypeEnum[FilterTypeEnum["Boolean"] = 2] = "Boolean";
|
|
679
|
+
FilterTypeEnum[FilterTypeEnum["Date"] = 3] = "Date";
|
|
680
|
+
FilterTypeEnum[FilterTypeEnum["Lookup"] = 4] = "Lookup";
|
|
681
|
+
FilterTypeEnum[FilterTypeEnum["LookupEnum"] = 5] = "LookupEnum";
|
|
682
|
+
})(FilterTypeEnum || (FilterTypeEnum = {}));
|
|
683
|
+
var FilterMatchModeEnum;
|
|
684
|
+
(function (FilterMatchModeEnum) {
|
|
685
|
+
FilterMatchModeEnum["StartsWith"] = "startsWith";
|
|
686
|
+
FilterMatchModeEnum["Contains"] = "contains";
|
|
687
|
+
FilterMatchModeEnum["EndsWith"] = "endsWith";
|
|
688
|
+
FilterMatchModeEnum["Equals"] = "equals";
|
|
689
|
+
FilterMatchModeEnum["NotEquals"] = "notEquals";
|
|
690
|
+
FilterMatchModeEnum["In"] = "in";
|
|
691
|
+
FilterMatchModeEnum["LessThan"] = "lt";
|
|
692
|
+
FilterMatchModeEnum["GreaterThan"] = "gt";
|
|
693
|
+
FilterMatchModeEnum["Between"] = "between";
|
|
694
|
+
FilterMatchModeEnum["DateIs"] = "dateIs";
|
|
695
|
+
FilterMatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
696
|
+
FilterMatchModeEnum["DateBefore"] = "dateBefore";
|
|
697
|
+
FilterMatchModeEnum["DateAfter"] = "dateAfter";
|
|
698
|
+
})(FilterMatchModeEnum || (FilterMatchModeEnum = {}));
|
|
699
|
+
var FilterLookupTypeEnum;
|
|
700
|
+
(function (FilterLookupTypeEnum) {
|
|
701
|
+
FilterLookupTypeEnum[FilterLookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
702
|
+
FilterLookupTypeEnum[FilterLookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
703
|
+
})(FilterLookupTypeEnum || (FilterLookupTypeEnum = {}));
|
|
704
|
+
|
|
705
|
+
var TablePaginationModeEnum;
|
|
706
|
+
(function (TablePaginationModeEnum) {
|
|
707
|
+
TablePaginationModeEnum[TablePaginationModeEnum["Pagination"] = 0] = "Pagination";
|
|
708
|
+
TablePaginationModeEnum[TablePaginationModeEnum["InfiniteScroll"] = 1] = "InfiniteScroll";
|
|
709
|
+
})(TablePaginationModeEnum || (TablePaginationModeEnum = {}));
|
|
710
|
+
var TableFilterDisplayEnum;
|
|
711
|
+
(function (TableFilterDisplayEnum) {
|
|
712
|
+
TableFilterDisplayEnum[TableFilterDisplayEnum["Row"] = 0] = "Row";
|
|
713
|
+
TableFilterDisplayEnum[TableFilterDisplayEnum["Menu"] = 1] = "Menu";
|
|
714
|
+
})(TableFilterDisplayEnum || (TableFilterDisplayEnum = {}));
|
|
715
|
+
var TableSizeEnum;
|
|
716
|
+
(function (TableSizeEnum) {
|
|
717
|
+
TableSizeEnum[TableSizeEnum["Small"] = 0] = "Small";
|
|
718
|
+
TableSizeEnum[TableSizeEnum["Normal"] = 1] = "Normal";
|
|
719
|
+
TableSizeEnum[TableSizeEnum["Large"] = 2] = "Large";
|
|
720
|
+
})(TableSizeEnum || (TableSizeEnum = {}));
|
|
721
|
+
|
|
549
722
|
class ActionDescriptor {
|
|
550
723
|
constructor(model, actionName, parentType, parentProperty) {
|
|
551
724
|
this._type = ActionTypeEnum.Direct;
|
|
@@ -554,7 +727,7 @@ class ActionDescriptor {
|
|
|
554
727
|
this._level = ActionLevelEnum.Default;
|
|
555
728
|
this._routeUrl = null;
|
|
556
729
|
this._className = '';
|
|
557
|
-
this._size =
|
|
730
|
+
this._size = ActionSizeEnum.Normal;
|
|
558
731
|
this._isStyleText = false;
|
|
559
732
|
this._isStyleOutlined = false;
|
|
560
733
|
this._isStyleRaised = false;
|
|
@@ -658,16 +831,16 @@ class ActionDescriptor {
|
|
|
658
831
|
return this._size;
|
|
659
832
|
}
|
|
660
833
|
get isSizeExtraSmall() {
|
|
661
|
-
return this._size ===
|
|
834
|
+
return this._size === ActionSizeEnum.ExtraSmall;
|
|
662
835
|
}
|
|
663
836
|
get isSizeSmall() {
|
|
664
|
-
return this._size ===
|
|
837
|
+
return this._size === ActionSizeEnum.Small;
|
|
665
838
|
}
|
|
666
839
|
get isSizeLarge() {
|
|
667
|
-
return this._size ===
|
|
840
|
+
return this._size === ActionSizeEnum.Large;
|
|
668
841
|
}
|
|
669
842
|
get isSizeExtraLarge() {
|
|
670
|
-
return this._size ===
|
|
843
|
+
return this._size === ActionSizeEnum.ExtraLarge;
|
|
671
844
|
}
|
|
672
845
|
get hasRunConfirmation() {
|
|
673
846
|
return this._hasRunConfirmation;
|
|
@@ -773,7 +946,7 @@ class ActionDescriptor {
|
|
|
773
946
|
this._className = className;
|
|
774
947
|
return this;
|
|
775
948
|
}
|
|
776
|
-
withSize(size =
|
|
949
|
+
withSize(size = ActionSizeEnum.Normal) {
|
|
777
950
|
this._size = size;
|
|
778
951
|
return this;
|
|
779
952
|
}
|
|
@@ -828,16 +1001,6 @@ class ActionDescriptor {
|
|
|
828
1001
|
return this;
|
|
829
1002
|
}
|
|
830
1003
|
}
|
|
831
|
-
(function (ActionDescriptor) {
|
|
832
|
-
let SizeEnum;
|
|
833
|
-
(function (SizeEnum) {
|
|
834
|
-
SizeEnum[SizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
835
|
-
SizeEnum[SizeEnum["Small"] = 1] = "Small";
|
|
836
|
-
SizeEnum[SizeEnum["Normal"] = 2] = "Normal";
|
|
837
|
-
SizeEnum[SizeEnum["Large"] = 3] = "Large";
|
|
838
|
-
SizeEnum[SizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
839
|
-
})(SizeEnum = ActionDescriptor.SizeEnum || (ActionDescriptor.SizeEnum = {}));
|
|
840
|
-
})(ActionDescriptor || (ActionDescriptor = {}));
|
|
841
1004
|
class ActionSimpleDescriptor extends ActionDescriptor {
|
|
842
1005
|
constructor(actionName, modelType, idProperty, titleProperty) {
|
|
843
1006
|
const model = modelType ? new ModelDescriptor(modelType, idProperty, titleProperty) : null;
|
|
@@ -850,10 +1013,10 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
850
1013
|
this._editorActions = [];
|
|
851
1014
|
this._editorTitle = undefined;
|
|
852
1015
|
this._hasFetchNotificationSuccess = false;
|
|
853
|
-
this._dialogSize =
|
|
1016
|
+
this._dialogSize = ActionEditorDialogSizeEnum.Normal;
|
|
854
1017
|
this._type = ActionTypeEnum.Editor;
|
|
855
1018
|
this._editorDescriptor = editorDescriptor;
|
|
856
|
-
this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this,
|
|
1019
|
+
this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this, ActionEditorSubmitTypeEnum.Cancel));
|
|
857
1020
|
}
|
|
858
1021
|
get editorTitle() {
|
|
859
1022
|
return this._editorTitle;
|
|
@@ -915,7 +1078,7 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
915
1078
|
this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
|
|
916
1079
|
return this;
|
|
917
1080
|
}
|
|
918
|
-
withDialogSize(size =
|
|
1081
|
+
withDialogSize(size = ActionEditorDialogSizeEnum.Normal) {
|
|
919
1082
|
this._dialogSize = size;
|
|
920
1083
|
return this;
|
|
921
1084
|
}
|
|
@@ -953,19 +1116,9 @@ class ActionEditorDescriptor extends ActionDescriptor {
|
|
|
953
1116
|
return this;
|
|
954
1117
|
}
|
|
955
1118
|
}
|
|
956
|
-
(function (ActionEditorDescriptor) {
|
|
957
|
-
let DialogSizeEnum;
|
|
958
|
-
(function (DialogSizeEnum) {
|
|
959
|
-
DialogSizeEnum[DialogSizeEnum["ExtraSmall"] = 0] = "ExtraSmall";
|
|
960
|
-
DialogSizeEnum[DialogSizeEnum["Small"] = 1] = "Small";
|
|
961
|
-
DialogSizeEnum[DialogSizeEnum["Normal"] = 2] = "Normal";
|
|
962
|
-
DialogSizeEnum[DialogSizeEnum["Large"] = 3] = "Large";
|
|
963
|
-
DialogSizeEnum[DialogSizeEnum["ExtraLarge"] = 4] = "ExtraLarge";
|
|
964
|
-
})(DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum || (ActionEditorDescriptor.DialogSizeEnum = {}));
|
|
965
|
-
})(ActionEditorDescriptor || (ActionEditorDescriptor = {}));
|
|
966
1119
|
class ActionEditorSubmitDescriptor extends ActionDescriptor {
|
|
967
|
-
constructor(editorAction, submitType =
|
|
968
|
-
super(editorAction.model, submitType ===
|
|
1120
|
+
constructor(editorAction, submitType = ActionEditorSubmitTypeEnum.Submit) {
|
|
1121
|
+
super(editorAction.model, submitType === ActionEditorSubmitTypeEnum.Submit ? 'submit' : 'cancel');
|
|
969
1122
|
this._editorAction = editorAction;
|
|
970
1123
|
this._submitType = submitType;
|
|
971
1124
|
this._position = ActionPositionEnum.FooterRight;
|
|
@@ -975,20 +1128,13 @@ class ActionEditorSubmitDescriptor extends ActionDescriptor {
|
|
|
975
1128
|
return this._submitType;
|
|
976
1129
|
}
|
|
977
1130
|
}
|
|
978
|
-
(function (ActionEditorSubmitDescriptor) {
|
|
979
|
-
let TypeEnum;
|
|
980
|
-
(function (TypeEnum) {
|
|
981
|
-
TypeEnum[TypeEnum["Submit"] = 0] = "Submit";
|
|
982
|
-
TypeEnum[TypeEnum["Cancel"] = 1] = "Cancel";
|
|
983
|
-
})(TypeEnum = ActionEditorSubmitDescriptor.TypeEnum || (ActionEditorSubmitDescriptor.TypeEnum = {}));
|
|
984
|
-
})(ActionEditorSubmitDescriptor || (ActionEditorSubmitDescriptor = {}));
|
|
985
1131
|
class ActionEditorDetailsDescriptor extends ActionEditorDescriptor {
|
|
986
1132
|
constructor(editorDescriptor) {
|
|
987
1133
|
super(editorDescriptor, ActionEditorDetailsDescriptor.ACTION_NAME);
|
|
988
1134
|
this.withPosition(ActionPositionEnum.RowClick);
|
|
989
1135
|
this.withRouteTrigger(':itemId');
|
|
990
1136
|
this.withFetchFunction(ActionDataProviderUtil.runFetchOrFail);
|
|
991
|
-
this.withEditorActions([new ActionEditorSubmitDescriptor(this,
|
|
1137
|
+
this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitTypeEnum.Cancel)]);
|
|
992
1138
|
}
|
|
993
1139
|
withServiceType(serviceType) {
|
|
994
1140
|
return this.withServiceFetchFunction(serviceType);
|
|
@@ -1133,41 +1279,10 @@ class ActionLinkDescriptor extends ActionDescriptor {
|
|
|
1133
1279
|
return this;
|
|
1134
1280
|
}
|
|
1135
1281
|
}
|
|
1136
|
-
var ActionPositionEnum;
|
|
1137
|
-
(function (ActionPositionEnum) {
|
|
1138
|
-
ActionPositionEnum[ActionPositionEnum["ToolbarLeft"] = 0] = "ToolbarLeft";
|
|
1139
|
-
ActionPositionEnum[ActionPositionEnum["ToolbarRight"] = 1] = "ToolbarRight";
|
|
1140
|
-
ActionPositionEnum[ActionPositionEnum["TableHeader"] = 2] = "TableHeader";
|
|
1141
|
-
ActionPositionEnum[ActionPositionEnum["RowInline"] = 3] = "RowInline";
|
|
1142
|
-
ActionPositionEnum[ActionPositionEnum["RowClick"] = 4] = "RowClick";
|
|
1143
|
-
ActionPositionEnum[ActionPositionEnum["FooterLeft"] = 5] = "FooterLeft";
|
|
1144
|
-
ActionPositionEnum[ActionPositionEnum["FooterRight"] = 6] = "FooterRight";
|
|
1145
|
-
})(ActionPositionEnum || (ActionPositionEnum = {}));
|
|
1146
|
-
var ActionActivationTriggerEnum;
|
|
1147
|
-
(function (ActionActivationTriggerEnum) {
|
|
1148
|
-
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnClick"] = 0] = "OnClick";
|
|
1149
|
-
ActionActivationTriggerEnum[ActionActivationTriggerEnum["OnRoute"] = 1] = "OnRoute"; // action is triggered for activation by route url
|
|
1150
|
-
})(ActionActivationTriggerEnum || (ActionActivationTriggerEnum = {}));
|
|
1151
|
-
var ActionTypeEnum;
|
|
1152
|
-
(function (ActionTypeEnum) {
|
|
1153
|
-
ActionTypeEnum[ActionTypeEnum["Direct"] = 0] = "Direct";
|
|
1154
|
-
ActionTypeEnum[ActionTypeEnum["Editor"] = 1] = "Editor"; // editor providing middle step for activation
|
|
1155
|
-
})(ActionTypeEnum || (ActionTypeEnum = {}));
|
|
1156
|
-
var ActionLevelEnum;
|
|
1157
|
-
(function (ActionLevelEnum) {
|
|
1158
|
-
ActionLevelEnum[ActionLevelEnum["Default"] = 0] = "Default";
|
|
1159
|
-
ActionLevelEnum[ActionLevelEnum["Primary"] = 1] = "Primary";
|
|
1160
|
-
ActionLevelEnum[ActionLevelEnum["Secondary"] = 2] = "Secondary";
|
|
1161
|
-
ActionLevelEnum[ActionLevelEnum["Info"] = 3] = "Info";
|
|
1162
|
-
ActionLevelEnum[ActionLevelEnum["Help"] = 4] = "Help";
|
|
1163
|
-
ActionLevelEnum[ActionLevelEnum["Success"] = 5] = "Success";
|
|
1164
|
-
ActionLevelEnum[ActionLevelEnum["Warning"] = 6] = "Warning";
|
|
1165
|
-
ActionLevelEnum[ActionLevelEnum["Danger"] = 7] = "Danger";
|
|
1166
|
-
})(ActionLevelEnum || (ActionLevelEnum = {}));
|
|
1167
1282
|
|
|
1168
1283
|
class FilterDescriptor {
|
|
1169
1284
|
constructor(property) {
|
|
1170
|
-
this._filterType =
|
|
1285
|
+
this._filterType = FilterTypeEnum.String;
|
|
1171
1286
|
this._matchModes = null;
|
|
1172
1287
|
this._numberUseGrouping = true;
|
|
1173
1288
|
this._datePickerShowTime = false;
|
|
@@ -1286,45 +1401,18 @@ class FilterDescriptor {
|
|
|
1286
1401
|
descriptor._columnClassName = this._columnClassName;
|
|
1287
1402
|
}
|
|
1288
1403
|
}
|
|
1289
|
-
(function (FilterDescriptor) {
|
|
1290
|
-
let TypeEnum;
|
|
1291
|
-
(function (TypeEnum) {
|
|
1292
|
-
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1293
|
-
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1294
|
-
TypeEnum[TypeEnum["Boolean"] = 2] = "Boolean";
|
|
1295
|
-
TypeEnum[TypeEnum["Date"] = 3] = "Date";
|
|
1296
|
-
TypeEnum[TypeEnum["Lookup"] = 4] = "Lookup";
|
|
1297
|
-
TypeEnum[TypeEnum["LookupEnum"] = 5] = "LookupEnum";
|
|
1298
|
-
})(TypeEnum = FilterDescriptor.TypeEnum || (FilterDescriptor.TypeEnum = {}));
|
|
1299
|
-
let MatchModeEnum;
|
|
1300
|
-
(function (MatchModeEnum) {
|
|
1301
|
-
MatchModeEnum["StartsWith"] = "startsWith";
|
|
1302
|
-
MatchModeEnum["Contains"] = "contains";
|
|
1303
|
-
MatchModeEnum["EndsWith"] = "endsWith";
|
|
1304
|
-
MatchModeEnum["Equals"] = "equals";
|
|
1305
|
-
MatchModeEnum["NotEquals"] = "notEquals";
|
|
1306
|
-
MatchModeEnum["In"] = "in";
|
|
1307
|
-
MatchModeEnum["LessThan"] = "lt";
|
|
1308
|
-
MatchModeEnum["GreaterThan"] = "gt";
|
|
1309
|
-
MatchModeEnum["Between"] = "between";
|
|
1310
|
-
MatchModeEnum["DateIs"] = "dateIs";
|
|
1311
|
-
MatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
1312
|
-
MatchModeEnum["DateBefore"] = "dateBefore";
|
|
1313
|
-
MatchModeEnum["DateAfter"] = "dateAfter";
|
|
1314
|
-
})(MatchModeEnum = FilterDescriptor.MatchModeEnum || (FilterDescriptor.MatchModeEnum = {}));
|
|
1315
|
-
})(FilterDescriptor || (FilterDescriptor = {}));
|
|
1316
1404
|
class FilterLookupDescriptor extends FilterDescriptor {
|
|
1317
1405
|
constructor(property, modelType) {
|
|
1318
1406
|
super(property);
|
|
1319
1407
|
this._modelType = null;
|
|
1320
|
-
this._lookupType =
|
|
1408
|
+
this._lookupType = FilterLookupTypeEnum.Dropdown;
|
|
1321
1409
|
this._itemsLabelTranslate = false;
|
|
1322
1410
|
this._multiselect = false;
|
|
1323
1411
|
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
1324
1412
|
this._autocompleteOpenOnFocus = false;
|
|
1325
1413
|
this._autocompleteInlineSearch = false;
|
|
1326
1414
|
this._modelType = modelType;
|
|
1327
|
-
this._filterType =
|
|
1415
|
+
this._filterType = FilterTypeEnum.Lookup;
|
|
1328
1416
|
ModelUtil.trySetLookupItemsProperties(this);
|
|
1329
1417
|
}
|
|
1330
1418
|
get lookupType() {
|
|
@@ -1397,7 +1485,7 @@ class FilterLookupDescriptor extends FilterDescriptor {
|
|
|
1397
1485
|
return this;
|
|
1398
1486
|
}
|
|
1399
1487
|
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
1400
|
-
this._lookupType =
|
|
1488
|
+
this._lookupType = FilterLookupTypeEnum.Autocomplete;
|
|
1401
1489
|
this._autocompleteOpenOnFocus = openOnFocus;
|
|
1402
1490
|
this._autocompleteInlineSearch = inlineSearch;
|
|
1403
1491
|
return this;
|
|
@@ -1449,17 +1537,10 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
|
|
|
1449
1537
|
return field;
|
|
1450
1538
|
}
|
|
1451
1539
|
}
|
|
1452
|
-
(function (FilterLookupDescriptor) {
|
|
1453
|
-
let LookupTypeEnum;
|
|
1454
|
-
(function (LookupTypeEnum) {
|
|
1455
|
-
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
1456
|
-
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
1457
|
-
})(LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum || (FilterLookupDescriptor.LookupTypeEnum = {}));
|
|
1458
|
-
})(FilterLookupDescriptor || (FilterLookupDescriptor = {}));
|
|
1459
1540
|
|
|
1460
1541
|
class ColumnDescriptor {
|
|
1461
1542
|
constructor(table, property) {
|
|
1462
|
-
this._columnType =
|
|
1543
|
+
this._columnType = ColumnTypeEnum.String;
|
|
1463
1544
|
this._isSortEnabled = false;
|
|
1464
1545
|
// styling
|
|
1465
1546
|
this._headerClassName = '';
|
|
@@ -1556,18 +1637,18 @@ class ColumnDescriptor {
|
|
|
1556
1637
|
get hasCopyToClipboard() {
|
|
1557
1638
|
return this._hasCopyToClipboard;
|
|
1558
1639
|
}
|
|
1559
|
-
asType(type =
|
|
1640
|
+
asType(type = ColumnTypeEnum.String) {
|
|
1560
1641
|
this._columnType = type;
|
|
1561
1642
|
return this;
|
|
1562
1643
|
}
|
|
1563
1644
|
asNumber(displayFormat = '1.0-0', locale) {
|
|
1564
|
-
this._columnType =
|
|
1645
|
+
this._columnType = ColumnTypeEnum.Number;
|
|
1565
1646
|
this._displayFormat = displayFormat;
|
|
1566
1647
|
this._locale = locale ?? this._locale;
|
|
1567
1648
|
return this;
|
|
1568
1649
|
}
|
|
1569
1650
|
asCurrency(currencyCode, currencyFromProperty, currencyDisplay, displayFormat = '1.2-2', locale) {
|
|
1570
|
-
this._columnType =
|
|
1651
|
+
this._columnType = ColumnTypeEnum.Currency;
|
|
1571
1652
|
this._currencyCode = currencyCode ?? this._currencyCode;
|
|
1572
1653
|
this._currencyFromProperty = currencyFromProperty ?? this._currencyFromProperty;
|
|
1573
1654
|
this._currencyDisplay = currencyDisplay ?? this._currencyDisplay;
|
|
@@ -1576,19 +1657,19 @@ class ColumnDescriptor {
|
|
|
1576
1657
|
return this;
|
|
1577
1658
|
}
|
|
1578
1659
|
asDate(displayFormat = 'dd.MM.yyyy') {
|
|
1579
|
-
this._columnType =
|
|
1660
|
+
this._columnType = ColumnTypeEnum.Date;
|
|
1580
1661
|
this._displayFormat = displayFormat;
|
|
1581
1662
|
return this;
|
|
1582
1663
|
}
|
|
1583
1664
|
asBoolean(yes, no, asIcon = false) {
|
|
1584
|
-
this._columnType =
|
|
1665
|
+
this._columnType = ColumnTypeEnum.Boolean;
|
|
1585
1666
|
this._booleanAsIcon = asIcon;
|
|
1586
1667
|
this._booleanYes = yes;
|
|
1587
1668
|
this._booleanNo = no;
|
|
1588
1669
|
return this;
|
|
1589
1670
|
}
|
|
1590
1671
|
asEnum(enumType, nameAsValue = false, titlePath) {
|
|
1591
|
-
this._columnType =
|
|
1672
|
+
this._columnType = ColumnTypeEnum.Enum;
|
|
1592
1673
|
this._enumType = enumType;
|
|
1593
1674
|
this._enumNameAsValue = nameAsValue;
|
|
1594
1675
|
if (typeof titlePath === 'undefined') {
|
|
@@ -1598,7 +1679,7 @@ class ColumnDescriptor {
|
|
|
1598
1679
|
return this;
|
|
1599
1680
|
}
|
|
1600
1681
|
asCustomComponent(customComponentType) {
|
|
1601
|
-
this._columnType =
|
|
1682
|
+
this._columnType = ColumnTypeEnum.Custom;
|
|
1602
1683
|
this._customComponentType = customComponentType;
|
|
1603
1684
|
return this;
|
|
1604
1685
|
}
|
|
@@ -1638,27 +1719,27 @@ class ColumnDescriptor {
|
|
|
1638
1719
|
return this.withFilterLookup();
|
|
1639
1720
|
}
|
|
1640
1721
|
switch (this._columnType) {
|
|
1641
|
-
case
|
|
1642
|
-
filterType =
|
|
1722
|
+
case ColumnTypeEnum.Number:
|
|
1723
|
+
filterType = FilterTypeEnum.Number;
|
|
1643
1724
|
break;
|
|
1644
|
-
case
|
|
1645
|
-
filterType =
|
|
1725
|
+
case ColumnTypeEnum.Boolean:
|
|
1726
|
+
filterType = FilterTypeEnum.Boolean;
|
|
1646
1727
|
break;
|
|
1647
|
-
case
|
|
1648
|
-
filterType =
|
|
1728
|
+
case ColumnTypeEnum.Date:
|
|
1729
|
+
filterType = FilterTypeEnum.Date;
|
|
1649
1730
|
break;
|
|
1650
|
-
case
|
|
1731
|
+
case ColumnTypeEnum.Enum:
|
|
1651
1732
|
if (!forceSimple) {
|
|
1652
1733
|
return this.withFilterLookupEnum();
|
|
1653
1734
|
}
|
|
1654
1735
|
else {
|
|
1655
|
-
filterType =
|
|
1736
|
+
filterType = FilterTypeEnum.String;
|
|
1656
1737
|
break;
|
|
1657
1738
|
}
|
|
1658
|
-
case
|
|
1659
|
-
case
|
|
1739
|
+
case ColumnTypeEnum.String:
|
|
1740
|
+
case ColumnTypeEnum.Custom:
|
|
1660
1741
|
default:
|
|
1661
|
-
filterType =
|
|
1742
|
+
filterType = FilterTypeEnum.String;
|
|
1662
1743
|
break;
|
|
1663
1744
|
}
|
|
1664
1745
|
this._filterDescriptor.asFilterType(filterType);
|
|
@@ -1670,7 +1751,7 @@ class ColumnDescriptor {
|
|
|
1670
1751
|
return filterDescriptor;
|
|
1671
1752
|
}
|
|
1672
1753
|
withFilterLookupEnum(options) {
|
|
1673
|
-
if (this._columnType !==
|
|
1754
|
+
if (this._columnType !== ColumnTypeEnum.Enum || !this._enumType) {
|
|
1674
1755
|
throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
|
|
1675
1756
|
}
|
|
1676
1757
|
const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
|
|
@@ -1714,21 +1795,9 @@ class ColumnDescriptor {
|
|
|
1714
1795
|
return descriptor;
|
|
1715
1796
|
}
|
|
1716
1797
|
}
|
|
1717
|
-
(function (ColumnDescriptor) {
|
|
1718
|
-
let TypeEnum;
|
|
1719
|
-
(function (TypeEnum) {
|
|
1720
|
-
TypeEnum[TypeEnum["String"] = 0] = "String";
|
|
1721
|
-
TypeEnum[TypeEnum["Number"] = 1] = "Number";
|
|
1722
|
-
TypeEnum[TypeEnum["Currency"] = 2] = "Currency";
|
|
1723
|
-
TypeEnum[TypeEnum["Boolean"] = 3] = "Boolean";
|
|
1724
|
-
TypeEnum[TypeEnum["Date"] = 4] = "Date";
|
|
1725
|
-
TypeEnum[TypeEnum["Enum"] = 5] = "Enum";
|
|
1726
|
-
TypeEnum[TypeEnum["Custom"] = 6] = "Custom";
|
|
1727
|
-
})(TypeEnum = ColumnDescriptor.TypeEnum || (ColumnDescriptor.TypeEnum = {}));
|
|
1728
|
-
})(ColumnDescriptor || (ColumnDescriptor = {}));
|
|
1729
1798
|
|
|
1730
1799
|
class EditorDescriptor {
|
|
1731
|
-
constructor(modelType, idProperty, titleProperty, tableviewEditorType =
|
|
1800
|
+
constructor(modelType, idProperty, titleProperty, tableviewEditorType = TableviewTypeEnum.None) {
|
|
1732
1801
|
this._tabs = [];
|
|
1733
1802
|
this._groups = [];
|
|
1734
1803
|
this._fields = [];
|
|
@@ -1870,15 +1939,6 @@ class EditorDescriptor {
|
|
|
1870
1939
|
}
|
|
1871
1940
|
}
|
|
1872
1941
|
EditorDescriptor.defaultGroupName = '_default';
|
|
1873
|
-
(function (EditorDescriptor) {
|
|
1874
|
-
let TableviewEditorTypeEnum;
|
|
1875
|
-
(function (TableviewEditorTypeEnum) {
|
|
1876
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["None"] = 0] = "None";
|
|
1877
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["View"] = 1] = "View";
|
|
1878
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Edit"] = 2] = "Edit";
|
|
1879
|
-
TableviewEditorTypeEnum[TableviewEditorTypeEnum["Add"] = 3] = "Add";
|
|
1880
|
-
})(TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum || (EditorDescriptor.TableviewEditorTypeEnum = {}));
|
|
1881
|
-
})(EditorDescriptor || (EditorDescriptor = {}));
|
|
1882
1942
|
|
|
1883
1943
|
class MngFormEditorSubmitEvent {
|
|
1884
1944
|
constructor(formItem) {
|
|
@@ -1939,7 +1999,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
1939
1999
|
this._className = '';
|
|
1940
2000
|
this._labelClassName = '';
|
|
1941
2001
|
this._inputClassName = '';
|
|
1942
|
-
this._size =
|
|
2002
|
+
this._size = FieldSizeEnum.Normal;
|
|
1943
2003
|
this._eventsSubject = new Subject();
|
|
1944
2004
|
this._property = property;
|
|
1945
2005
|
this._label = I18nUtils.Type.getPropertyKey(this._editor.model.typeName, property);
|
|
@@ -2002,10 +2062,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
2002
2062
|
return this._size;
|
|
2003
2063
|
}
|
|
2004
2064
|
get isSizeSmall() {
|
|
2005
|
-
return this._size ===
|
|
2065
|
+
return this._size === FieldSizeEnum.Small;
|
|
2006
2066
|
}
|
|
2007
2067
|
get isSizeLarge() {
|
|
2008
|
-
return this._size ===
|
|
2068
|
+
return this._size === FieldSizeEnum.Large;
|
|
2009
2069
|
}
|
|
2010
2070
|
withLabel(label) {
|
|
2011
2071
|
this._label = label;
|
|
@@ -2060,7 +2120,7 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
2060
2120
|
this._fieldClassName = fieldClassName;
|
|
2061
2121
|
return this;
|
|
2062
2122
|
}
|
|
2063
|
-
withSize(size =
|
|
2123
|
+
withSize(size = FieldSizeEnum.Normal) {
|
|
2064
2124
|
this._size = size;
|
|
2065
2125
|
return this;
|
|
2066
2126
|
}
|
|
@@ -2087,19 +2147,10 @@ class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
|
2087
2147
|
obj._validations = this._validations;
|
|
2088
2148
|
}
|
|
2089
2149
|
}
|
|
2090
|
-
var FieldDescriptor;
|
|
2091
|
-
(function (FieldDescriptor) {
|
|
2092
|
-
let SizeEnum;
|
|
2093
|
-
(function (SizeEnum) {
|
|
2094
|
-
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
2095
|
-
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
2096
|
-
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
2097
|
-
})(SizeEnum = FieldDescriptor.SizeEnum || (FieldDescriptor.SizeEnum = {}));
|
|
2098
|
-
})(FieldDescriptor || (FieldDescriptor = {}));
|
|
2099
2150
|
class FieldInputDescriptor extends AFieldDescriptor {
|
|
2100
2151
|
constructor(editor, property) {
|
|
2101
2152
|
super(editor, property);
|
|
2102
|
-
this._fieldType =
|
|
2153
|
+
this._fieldType = FieldInputTypeEnum.Text;
|
|
2103
2154
|
this._numberUseGrouping = true;
|
|
2104
2155
|
this._currencyDisplay = 'symbol';
|
|
2105
2156
|
// radio specific properties
|
|
@@ -2191,44 +2242,44 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2191
2242
|
return this._currencyDisplay;
|
|
2192
2243
|
}
|
|
2193
2244
|
asHidden() {
|
|
2194
|
-
this._fieldType =
|
|
2245
|
+
this._fieldType = FieldInputTypeEnum.Hidden;
|
|
2195
2246
|
return this;
|
|
2196
2247
|
}
|
|
2197
2248
|
asLabel() {
|
|
2198
|
-
this._fieldType =
|
|
2249
|
+
this._fieldType = FieldInputTypeEnum.Label;
|
|
2199
2250
|
return this;
|
|
2200
2251
|
}
|
|
2201
2252
|
asText() {
|
|
2202
|
-
this._fieldType =
|
|
2253
|
+
this._fieldType = FieldInputTypeEnum.Text;
|
|
2203
2254
|
return this;
|
|
2204
2255
|
}
|
|
2205
2256
|
asTextarea(rows = 3) {
|
|
2206
|
-
this._fieldType =
|
|
2257
|
+
this._fieldType = FieldInputTypeEnum.Textarea;
|
|
2207
2258
|
this._rows = rows;
|
|
2208
2259
|
return this;
|
|
2209
2260
|
}
|
|
2210
2261
|
asNumber() {
|
|
2211
|
-
this._fieldType =
|
|
2262
|
+
this._fieldType = FieldInputTypeEnum.Number;
|
|
2212
2263
|
return this;
|
|
2213
2264
|
}
|
|
2214
2265
|
asCurrency(currencyFromProperty, currency, currencyDisplay) {
|
|
2215
|
-
this._fieldType =
|
|
2266
|
+
this._fieldType = FieldInputTypeEnum.Currency;
|
|
2216
2267
|
this._currencyFromProperty = currencyFromProperty;
|
|
2217
2268
|
this._currency = currency ?? this._currency;
|
|
2218
2269
|
this._currencyDisplay = currencyDisplay ?? this._currencyDisplay;
|
|
2219
2270
|
return this.withNumberFractions(2, 2);
|
|
2220
2271
|
}
|
|
2221
2272
|
asSwitch() {
|
|
2222
|
-
this._fieldType =
|
|
2273
|
+
this._fieldType = FieldInputTypeEnum.Switch;
|
|
2223
2274
|
return this;
|
|
2224
2275
|
}
|
|
2225
2276
|
asRadio(options, optionsTitlePath) {
|
|
2226
|
-
this._fieldType =
|
|
2277
|
+
this._fieldType = FieldInputTypeEnum.Radio;
|
|
2227
2278
|
this._radioOptions = options.map(o => ({ value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}` }));
|
|
2228
2279
|
return this;
|
|
2229
2280
|
}
|
|
2230
2281
|
asRadioFromEnum(enumType, optionsTitlePath, values, nameAsValue = false) {
|
|
2231
|
-
this._fieldType =
|
|
2282
|
+
this._fieldType = FieldInputTypeEnum.Radio;
|
|
2232
2283
|
if (typeof optionsTitlePath === 'undefined') {
|
|
2233
2284
|
optionsTitlePath = TypeUtil.findEnumName(enumType);
|
|
2234
2285
|
}
|
|
@@ -2238,7 +2289,7 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2238
2289
|
return this;
|
|
2239
2290
|
}
|
|
2240
2291
|
asDatePicker(format, min, max, showTime) {
|
|
2241
|
-
this._fieldType =
|
|
2292
|
+
this._fieldType = FieldInputTypeEnum.Datepicker;
|
|
2242
2293
|
this._datePickerFormat = format;
|
|
2243
2294
|
this._datePickerMin = min;
|
|
2244
2295
|
this._datePickerMax = max;
|
|
@@ -2246,20 +2297,20 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2246
2297
|
return this;
|
|
2247
2298
|
}
|
|
2248
2299
|
asMask(mask, slotChar) {
|
|
2249
|
-
this._fieldType =
|
|
2300
|
+
this._fieldType = FieldInputTypeEnum.Mask;
|
|
2250
2301
|
this._mask = mask;
|
|
2251
2302
|
this._slotChar = slotChar;
|
|
2252
2303
|
return this;
|
|
2253
2304
|
}
|
|
2254
2305
|
asFile(multiple = false, maxFileSize = 500000, accept) {
|
|
2255
|
-
this._fieldType =
|
|
2306
|
+
this._fieldType = FieldInputTypeEnum.File;
|
|
2256
2307
|
this._fileMultiple = multiple;
|
|
2257
2308
|
this._fileMaxFileSize = maxFileSize;
|
|
2258
2309
|
this._fileAccept = accept;
|
|
2259
2310
|
return this;
|
|
2260
2311
|
}
|
|
2261
2312
|
asCustomComponent(customComponentName) {
|
|
2262
|
-
this._fieldType =
|
|
2313
|
+
this._fieldType = FieldInputTypeEnum.Custom;
|
|
2263
2314
|
this._customComponentName = customComponentName;
|
|
2264
2315
|
return this;
|
|
2265
2316
|
}
|
|
@@ -2289,7 +2340,7 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2289
2340
|
return this;
|
|
2290
2341
|
}
|
|
2291
2342
|
withTextValidationEmail() {
|
|
2292
|
-
if (this.fieldType ===
|
|
2343
|
+
if (this.fieldType === FieldInputTypeEnum.Text) {
|
|
2293
2344
|
this.withValidation('email', Validators.email);
|
|
2294
2345
|
}
|
|
2295
2346
|
return this;
|
|
@@ -2330,27 +2381,10 @@ class FieldInputDescriptor extends AFieldDescriptor {
|
|
|
2330
2381
|
return field;
|
|
2331
2382
|
}
|
|
2332
2383
|
}
|
|
2333
|
-
(function (FieldInputDescriptor) {
|
|
2334
|
-
let TypeEnum;
|
|
2335
|
-
(function (TypeEnum) {
|
|
2336
|
-
TypeEnum[TypeEnum["Hidden"] = 0] = "Hidden";
|
|
2337
|
-
TypeEnum[TypeEnum["Label"] = 1] = "Label";
|
|
2338
|
-
TypeEnum[TypeEnum["Text"] = 2] = "Text";
|
|
2339
|
-
TypeEnum[TypeEnum["Textarea"] = 3] = "Textarea";
|
|
2340
|
-
TypeEnum[TypeEnum["Number"] = 4] = "Number";
|
|
2341
|
-
TypeEnum[TypeEnum["Currency"] = 5] = "Currency";
|
|
2342
|
-
TypeEnum[TypeEnum["Switch"] = 6] = "Switch";
|
|
2343
|
-
TypeEnum[TypeEnum["Radio"] = 7] = "Radio";
|
|
2344
|
-
TypeEnum[TypeEnum["Datepicker"] = 8] = "Datepicker";
|
|
2345
|
-
TypeEnum[TypeEnum["Mask"] = 9] = "Mask";
|
|
2346
|
-
TypeEnum[TypeEnum["File"] = 10] = "File";
|
|
2347
|
-
TypeEnum[TypeEnum["Custom"] = 11] = "Custom";
|
|
2348
|
-
})(TypeEnum = FieldInputDescriptor.TypeEnum || (FieldInputDescriptor.TypeEnum = {}));
|
|
2349
|
-
})(FieldInputDescriptor || (FieldInputDescriptor = {}));
|
|
2350
2384
|
class FieldLookupDescriptor extends AFieldDescriptor {
|
|
2351
2385
|
constructor(editor, property, modelType) {
|
|
2352
2386
|
super(editor, property);
|
|
2353
|
-
this._lookupType =
|
|
2387
|
+
this._lookupType = FieldLookupTypeEnum.Dropdown;
|
|
2354
2388
|
this._itemsLabelTranslate = false;
|
|
2355
2389
|
this._dropdownClassName = 'mng-filter-lookup-dropdown';
|
|
2356
2390
|
this._autocompleteOpenOnFocus = false;
|
|
@@ -2433,13 +2467,13 @@ class FieldLookupDescriptor extends AFieldDescriptor {
|
|
|
2433
2467
|
return super.withConfig(config);
|
|
2434
2468
|
}
|
|
2435
2469
|
asAutocomplete(openOnFocus = false, inlineSearch = false) {
|
|
2436
|
-
this._lookupType =
|
|
2470
|
+
this._lookupType = FieldLookupTypeEnum.Autocomplete;
|
|
2437
2471
|
this._autocompleteOpenOnFocus = openOnFocus;
|
|
2438
2472
|
this._autocompleteInlineSearch = inlineSearch;
|
|
2439
2473
|
return this;
|
|
2440
2474
|
}
|
|
2441
2475
|
asDialog(lookupTableDescriptor, tableDataProvider) {
|
|
2442
|
-
this._lookupType =
|
|
2476
|
+
this._lookupType = FieldLookupTypeEnum.Dialog;
|
|
2443
2477
|
this._dialogTableDescriptor = lookupTableDescriptor;
|
|
2444
2478
|
this._dialogTableDataProvider = tableDataProvider;
|
|
2445
2479
|
return this;
|
|
@@ -2461,14 +2495,6 @@ class FieldLookupDescriptor extends AFieldDescriptor {
|
|
|
2461
2495
|
return field;
|
|
2462
2496
|
}
|
|
2463
2497
|
}
|
|
2464
|
-
(function (FieldLookupDescriptor) {
|
|
2465
|
-
let LookupTypeEnum;
|
|
2466
|
-
(function (LookupTypeEnum) {
|
|
2467
|
-
LookupTypeEnum[LookupTypeEnum["Dropdown"] = 0] = "Dropdown";
|
|
2468
|
-
LookupTypeEnum[LookupTypeEnum["Autocomplete"] = 1] = "Autocomplete";
|
|
2469
|
-
LookupTypeEnum[LookupTypeEnum["Dialog"] = 2] = "Dialog";
|
|
2470
|
-
})(LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum || (FieldLookupDescriptor.LookupTypeEnum = {}));
|
|
2471
|
-
})(FieldLookupDescriptor || (FieldLookupDescriptor = {}));
|
|
2472
2498
|
class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
2473
2499
|
constructor(editor, property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
2474
2500
|
super(editor, property, null);
|
|
@@ -2531,7 +2557,7 @@ class FieldLookupEnumDescriptor extends FieldLookupDescriptor {
|
|
|
2531
2557
|
class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
2532
2558
|
constructor(editor, property, mainTableDescriptor, lookupTableDescriptor) {
|
|
2533
2559
|
super(editor, property);
|
|
2534
|
-
this._fieldType =
|
|
2560
|
+
this._fieldType = FieldManyToManyEditorTypeEnum.DialogTableMultiselect;
|
|
2535
2561
|
this._lookupTableDataProvider = null;
|
|
2536
2562
|
this._actions = [];
|
|
2537
2563
|
this._hasLookupExcludeValues = false;
|
|
@@ -2539,7 +2565,7 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
2539
2565
|
this._excludeValueProperty = '';
|
|
2540
2566
|
this._mainTableDescriptor = mainTableDescriptor;
|
|
2541
2567
|
this._lookupTableDescriptor = lookupTableDescriptor;
|
|
2542
|
-
this._actions.push(
|
|
2568
|
+
this._actions.push(FieldManyToManyEditorActionEnum.Add, FieldManyToManyEditorActionEnum.Delete);
|
|
2543
2569
|
}
|
|
2544
2570
|
get fieldType() {
|
|
2545
2571
|
return this._fieldType;
|
|
@@ -2600,26 +2626,15 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
|
|
|
2600
2626
|
return field;
|
|
2601
2627
|
}
|
|
2602
2628
|
}
|
|
2603
|
-
(function (FieldManyToManyEditorDescriptor) {
|
|
2604
|
-
let TypeEnum;
|
|
2605
|
-
(function (TypeEnum) {
|
|
2606
|
-
TypeEnum[TypeEnum["DialogTableMultiselect"] = 0] = "DialogTableMultiselect";
|
|
2607
|
-
})(TypeEnum = FieldManyToManyEditorDescriptor.TypeEnum || (FieldManyToManyEditorDescriptor.TypeEnum = {}));
|
|
2608
|
-
let ActionEnum;
|
|
2609
|
-
(function (ActionEnum) {
|
|
2610
|
-
ActionEnum[ActionEnum["Add"] = 0] = "Add";
|
|
2611
|
-
ActionEnum[ActionEnum["Delete"] = 1] = "Delete";
|
|
2612
|
-
})(ActionEnum = FieldManyToManyEditorDescriptor.ActionEnum || (FieldManyToManyEditorDescriptor.ActionEnum = {}));
|
|
2613
|
-
})(FieldManyToManyEditorDescriptor || (FieldManyToManyEditorDescriptor = {}));
|
|
2614
2629
|
class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
2615
2630
|
constructor(editor, property, tableviewDescriptor) {
|
|
2616
2631
|
super(editor, property);
|
|
2617
|
-
this._fieldType =
|
|
2632
|
+
this._fieldType = FieldManyEditorTypeEnum.DialogEditor;
|
|
2618
2633
|
this._fieldActions = [];
|
|
2619
2634
|
this._actions = [];
|
|
2620
2635
|
// this._modelType = modelType;
|
|
2621
2636
|
this._tableviewDescriptor = tableviewDescriptor;
|
|
2622
|
-
this._fieldActions.push(
|
|
2637
|
+
this._fieldActions.push(FieldManyEditorActionEnum.View, FieldManyEditorActionEnum.Add, FieldManyEditorActionEnum.Edit, FieldManyEditorActionEnum.Delete);
|
|
2623
2638
|
}
|
|
2624
2639
|
get fieldType() {
|
|
2625
2640
|
return this._fieldType;
|
|
@@ -2665,19 +2680,6 @@ class FieldManyEditorDescriptor extends AFieldDescriptor {
|
|
|
2665
2680
|
return field;
|
|
2666
2681
|
}
|
|
2667
2682
|
}
|
|
2668
|
-
(function (FieldManyEditorDescriptor) {
|
|
2669
|
-
let TypeEnum;
|
|
2670
|
-
(function (TypeEnum) {
|
|
2671
|
-
TypeEnum[TypeEnum["DialogEditor"] = 0] = "DialogEditor";
|
|
2672
|
-
})(TypeEnum = FieldManyEditorDescriptor.TypeEnum || (FieldManyEditorDescriptor.TypeEnum = {}));
|
|
2673
|
-
let ActionEnum;
|
|
2674
|
-
(function (ActionEnum) {
|
|
2675
|
-
ActionEnum[ActionEnum["View"] = 0] = "View";
|
|
2676
|
-
ActionEnum[ActionEnum["Add"] = 1] = "Add";
|
|
2677
|
-
ActionEnum[ActionEnum["Edit"] = 2] = "Edit";
|
|
2678
|
-
ActionEnum[ActionEnum["Delete"] = 3] = "Delete";
|
|
2679
|
-
})(ActionEnum = FieldManyEditorDescriptor.ActionEnum || (FieldManyEditorDescriptor.ActionEnum = {}));
|
|
2680
|
-
})(FieldManyEditorDescriptor || (FieldManyEditorDescriptor = {}));
|
|
2681
2683
|
class AFieldGroupDescriptor extends AGenericFieldDescriptor {
|
|
2682
2684
|
constructor(editor, name) {
|
|
2683
2685
|
super(editor);
|
|
@@ -2734,7 +2736,7 @@ class FieldTabGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2734
2736
|
class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
2735
2737
|
constructor(editor, name) {
|
|
2736
2738
|
super(editor, name);
|
|
2737
|
-
this._type =
|
|
2739
|
+
this._type = FieldGroupTypeEnum.Fieldset;
|
|
2738
2740
|
if (this._default) {
|
|
2739
2741
|
this.asLogical();
|
|
2740
2742
|
}
|
|
@@ -2753,7 +2755,7 @@ class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2753
2755
|
return this;
|
|
2754
2756
|
}
|
|
2755
2757
|
asLogical() {
|
|
2756
|
-
this._type =
|
|
2758
|
+
this._type = FieldGroupTypeEnum.Logical;
|
|
2757
2759
|
return this;
|
|
2758
2760
|
}
|
|
2759
2761
|
copy() {
|
|
@@ -2764,13 +2766,6 @@ class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
2764
2766
|
return group;
|
|
2765
2767
|
}
|
|
2766
2768
|
}
|
|
2767
|
-
(function (FieldGroupDescriptor) {
|
|
2768
|
-
let TypeEnum;
|
|
2769
|
-
(function (TypeEnum) {
|
|
2770
|
-
TypeEnum[TypeEnum["Fieldset"] = 0] = "Fieldset";
|
|
2771
|
-
TypeEnum[TypeEnum["Logical"] = 1] = "Logical";
|
|
2772
|
-
})(TypeEnum = FieldGroupDescriptor.TypeEnum || (FieldGroupDescriptor.TypeEnum = {}));
|
|
2773
|
-
})(FieldGroupDescriptor || (FieldGroupDescriptor = {}));
|
|
2774
2769
|
|
|
2775
2770
|
class FieldValidationDescriptor {
|
|
2776
2771
|
constructor(name, validator, message, options) {
|
|
@@ -2828,8 +2823,8 @@ class ModelDescriptor {
|
|
|
2828
2823
|
|
|
2829
2824
|
class TableDescriptor {
|
|
2830
2825
|
constructor(modelType, idProperty, titleProperty) {
|
|
2831
|
-
this._filterDisplay =
|
|
2832
|
-
this._paginationMode =
|
|
2826
|
+
this._filterDisplay = TableFilterDisplayEnum.Menu;
|
|
2827
|
+
this._paginationMode = TablePaginationModeEnum.Pagination;
|
|
2833
2828
|
this._rowsPerPageOptions = [25, 50, 100];
|
|
2834
2829
|
this._defaultNumRows = this._rowsPerPageOptions[0];
|
|
2835
2830
|
this._columns = [];
|
|
@@ -2839,7 +2834,7 @@ class TableDescriptor {
|
|
|
2839
2834
|
this._defaultSortAsc = [];
|
|
2840
2835
|
// visual
|
|
2841
2836
|
this._className = '';
|
|
2842
|
-
this._size =
|
|
2837
|
+
this._size = TableSizeEnum.Large;
|
|
2843
2838
|
this._hasHover = true;
|
|
2844
2839
|
this._hasGridlines = false;
|
|
2845
2840
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
@@ -2980,7 +2975,7 @@ class TableDescriptor {
|
|
|
2980
2975
|
this._className = className;
|
|
2981
2976
|
return this;
|
|
2982
2977
|
}
|
|
2983
|
-
withSize(size =
|
|
2978
|
+
withSize(size = TableSizeEnum.Normal) {
|
|
2984
2979
|
this._size = size;
|
|
2985
2980
|
return this;
|
|
2986
2981
|
}
|
|
@@ -3018,34 +3013,15 @@ class TableDescriptor {
|
|
|
3018
3013
|
return descriptor;
|
|
3019
3014
|
}
|
|
3020
3015
|
}
|
|
3021
|
-
(function (TableDescriptor) {
|
|
3022
|
-
let PaginationModeEnum;
|
|
3023
|
-
(function (PaginationModeEnum) {
|
|
3024
|
-
PaginationModeEnum[PaginationModeEnum["Pagination"] = 0] = "Pagination";
|
|
3025
|
-
PaginationModeEnum[PaginationModeEnum["InfiniteScroll"] = 1] = "InfiniteScroll";
|
|
3026
|
-
})(PaginationModeEnum = TableDescriptor.PaginationModeEnum || (TableDescriptor.PaginationModeEnum = {}));
|
|
3027
|
-
let FilterDisplayEnum;
|
|
3028
|
-
(function (FilterDisplayEnum) {
|
|
3029
|
-
FilterDisplayEnum[FilterDisplayEnum["Row"] = 0] = "Row";
|
|
3030
|
-
FilterDisplayEnum[FilterDisplayEnum["Menu"] = 1] = "Menu";
|
|
3031
|
-
})(FilterDisplayEnum = TableDescriptor.FilterDisplayEnum || (TableDescriptor.FilterDisplayEnum = {}));
|
|
3032
|
-
let SizeEnum;
|
|
3033
|
-
(function (SizeEnum) {
|
|
3034
|
-
SizeEnum[SizeEnum["Small"] = 0] = "Small";
|
|
3035
|
-
SizeEnum[SizeEnum["Normal"] = 1] = "Normal";
|
|
3036
|
-
SizeEnum[SizeEnum["Large"] = 2] = "Large";
|
|
3037
|
-
})(SizeEnum = TableDescriptor.SizeEnum || (TableDescriptor.SizeEnum = {}));
|
|
3038
|
-
})(TableDescriptor || (TableDescriptor = {}));
|
|
3039
3016
|
|
|
3040
|
-
var TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;
|
|
3041
3017
|
class TableviewDescriptor {
|
|
3042
3018
|
constructor(modelType, idProperty, titleProperty) {
|
|
3043
3019
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty);
|
|
3044
3020
|
this._table = new TableDescriptor(modelType, idProperty, titleProperty);
|
|
3045
|
-
this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty,
|
|
3021
|
+
this._viewEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewTypeEnum.View);
|
|
3046
3022
|
this._viewEditor.withDisabled();
|
|
3047
|
-
this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty,
|
|
3048
|
-
this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty,
|
|
3023
|
+
this._addEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewTypeEnum.Add);
|
|
3024
|
+
this._editEditor = new EditorDescriptor(modelType, idProperty, titleProperty, TableviewTypeEnum.Edit);
|
|
3049
3025
|
this._tableTitle = `${this._model.typeName}.name`;
|
|
3050
3026
|
}
|
|
3051
3027
|
get table() {
|
|
@@ -3257,41 +3233,41 @@ class EditorFormlyUtil {
|
|
|
3257
3233
|
field.templateOptions['descriptor'] = descriptor;
|
|
3258
3234
|
if (descriptor instanceof FieldInputDescriptor) {
|
|
3259
3235
|
switch (descriptor.fieldType) {
|
|
3260
|
-
case
|
|
3236
|
+
case FieldInputTypeEnum.Hidden:
|
|
3261
3237
|
break;
|
|
3262
|
-
case
|
|
3238
|
+
case FieldInputTypeEnum.Label:
|
|
3263
3239
|
field.type = 'label';
|
|
3264
3240
|
delete field.key;
|
|
3265
3241
|
break;
|
|
3266
|
-
case
|
|
3242
|
+
case FieldInputTypeEnum.Textarea:
|
|
3267
3243
|
field.type = 'textarea';
|
|
3268
3244
|
break;
|
|
3269
|
-
case
|
|
3245
|
+
case FieldInputTypeEnum.Number:
|
|
3270
3246
|
field.type = 'number';
|
|
3271
3247
|
field.templateOptions.min = descriptor.numberMin;
|
|
3272
3248
|
field.templateOptions.max = descriptor.numberMax;
|
|
3273
3249
|
break;
|
|
3274
|
-
case
|
|
3250
|
+
case FieldInputTypeEnum.Currency:
|
|
3275
3251
|
field.type = 'currency';
|
|
3276
3252
|
field.templateOptions.min = descriptor.numberMin;
|
|
3277
3253
|
field.templateOptions.max = descriptor.numberMax;
|
|
3278
3254
|
break;
|
|
3279
|
-
case
|
|
3255
|
+
case FieldInputTypeEnum.Switch:
|
|
3280
3256
|
field.type = 'switch';
|
|
3281
3257
|
break;
|
|
3282
|
-
case
|
|
3258
|
+
case FieldInputTypeEnum.Radio:
|
|
3283
3259
|
field.type = 'radio';
|
|
3284
3260
|
break;
|
|
3285
|
-
case
|
|
3261
|
+
case FieldInputTypeEnum.Datepicker:
|
|
3286
3262
|
field.type = 'datepicker';
|
|
3287
3263
|
break;
|
|
3288
|
-
case
|
|
3264
|
+
case FieldInputTypeEnum.Mask:
|
|
3289
3265
|
field.type = 'mask';
|
|
3290
3266
|
break;
|
|
3291
|
-
case
|
|
3267
|
+
case FieldInputTypeEnum.File:
|
|
3292
3268
|
field.type = 'file';
|
|
3293
3269
|
break;
|
|
3294
|
-
case
|
|
3270
|
+
case FieldInputTypeEnum.Custom:
|
|
3295
3271
|
field.type = descriptor.customComponentName;
|
|
3296
3272
|
break;
|
|
3297
3273
|
default:
|
|
@@ -3307,13 +3283,13 @@ class EditorFormlyUtil {
|
|
|
3307
3283
|
}
|
|
3308
3284
|
else if (descriptor instanceof FieldLookupDescriptor) {
|
|
3309
3285
|
switch (descriptor.lookupType) {
|
|
3310
|
-
case
|
|
3286
|
+
case FieldLookupTypeEnum.Autocomplete:
|
|
3311
3287
|
field.type = 'autocomplete';
|
|
3312
3288
|
break;
|
|
3313
|
-
case
|
|
3289
|
+
case FieldLookupTypeEnum.Dialog:
|
|
3314
3290
|
field.type = 'dialog';
|
|
3315
3291
|
break;
|
|
3316
|
-
case
|
|
3292
|
+
case FieldLookupTypeEnum.Dropdown:
|
|
3317
3293
|
default:
|
|
3318
3294
|
field.type = 'dropdown';
|
|
3319
3295
|
break;
|
|
@@ -4269,10 +4245,10 @@ MediusRestUtil.matchModeMapping = [
|
|
|
4269
4245
|
[FilterMatchMode.STARTS_WITH, 'sw', MediusFilterMatchType.StartsWith, null],
|
|
4270
4246
|
[FilterMatchMode.IN, 'in', MediusFilterMatchType.In, null],
|
|
4271
4247
|
[FilterMatchMode.NOT_EQUALS, 'neq', MediusFilterMatchType.NotEquals, null],
|
|
4272
|
-
[FilterMatchMode.DATE_IS, 'eq', MediusFilterMatchType.Equals,
|
|
4273
|
-
[FilterMatchMode.DATE_BEFORE, 'lt', MediusFilterMatchType.SmallerThan,
|
|
4274
|
-
[FilterMatchMode.DATE_AFTER, 'gt', MediusFilterMatchType.GreaterThan,
|
|
4275
|
-
[FilterMatchMode.DATE_IS_NOT, 'neq', MediusFilterMatchType.NotEquals,
|
|
4248
|
+
[FilterMatchMode.DATE_IS, 'eq', MediusFilterMatchType.Equals, FilterTypeEnum.Date],
|
|
4249
|
+
[FilterMatchMode.DATE_BEFORE, 'lt', MediusFilterMatchType.SmallerThan, FilterTypeEnum.Date],
|
|
4250
|
+
[FilterMatchMode.DATE_AFTER, 'gt', MediusFilterMatchType.GreaterThan, FilterTypeEnum.Date],
|
|
4251
|
+
[FilterMatchMode.DATE_IS_NOT, 'neq', MediusFilterMatchType.NotEquals, FilterTypeEnum.Date]
|
|
4276
4252
|
];
|
|
4277
4253
|
|
|
4278
4254
|
class ActionError {
|
|
@@ -4716,7 +4692,7 @@ class MngEnumPipe {
|
|
|
4716
4692
|
if (!value || (typeof value !== 'number' && typeof value !== 'string') || !enumObj) {
|
|
4717
4693
|
return value;
|
|
4718
4694
|
}
|
|
4719
|
-
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);
|
|
4695
|
+
const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value) ?? value;
|
|
4720
4696
|
if (typeof i18nPath === 'undefined') {
|
|
4721
4697
|
i18nPath = TypeUtil.findEnumName(enumObj);
|
|
4722
4698
|
}
|
|
@@ -5192,19 +5168,19 @@ class MngActionExecutorService {
|
|
|
5192
5168
|
dialogClassName = action.dialogClassName ?? 'mng-action-editor-dialog';
|
|
5193
5169
|
let dialogSizeClassName = '';
|
|
5194
5170
|
switch (action.dialogSize) {
|
|
5195
|
-
case
|
|
5171
|
+
case ActionEditorDialogSizeEnum.ExtraSmall:
|
|
5196
5172
|
dialogSizeClassName = 'mng-action-editor-dialog-xs';
|
|
5197
5173
|
break;
|
|
5198
|
-
case
|
|
5174
|
+
case ActionEditorDialogSizeEnum.Small:
|
|
5199
5175
|
dialogSizeClassName = 'mng-action-editor-dialog-sm';
|
|
5200
5176
|
break;
|
|
5201
|
-
case
|
|
5177
|
+
case ActionEditorDialogSizeEnum.Large:
|
|
5202
5178
|
dialogSizeClassName = 'mng-action-editor-dialog-lg';
|
|
5203
5179
|
break;
|
|
5204
|
-
case
|
|
5180
|
+
case ActionEditorDialogSizeEnum.ExtraLarge:
|
|
5205
5181
|
dialogSizeClassName = 'mng-action-editor-dialog-xl';
|
|
5206
5182
|
break;
|
|
5207
|
-
case
|
|
5183
|
+
case ActionEditorDialogSizeEnum.Normal:
|
|
5208
5184
|
default:
|
|
5209
5185
|
break;
|
|
5210
5186
|
}
|
|
@@ -5525,25 +5501,9 @@ class MngCommonsService {
|
|
|
5525
5501
|
// ripple
|
|
5526
5502
|
this.primengConfig.ripple = true;
|
|
5527
5503
|
this.primengConfig.filterMatchModeOptions = {
|
|
5528
|
-
text: [
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
5532
|
-
FilterDescriptor.MatchModeEnum.StartsWith,
|
|
5533
|
-
FilterDescriptor.MatchModeEnum.EndsWith
|
|
5534
|
-
],
|
|
5535
|
-
numeric: [
|
|
5536
|
-
FilterDescriptor.MatchModeEnum.Equals,
|
|
5537
|
-
FilterDescriptor.MatchModeEnum.NotEquals,
|
|
5538
|
-
FilterDescriptor.MatchModeEnum.LessThan,
|
|
5539
|
-
FilterDescriptor.MatchModeEnum.GreaterThan
|
|
5540
|
-
],
|
|
5541
|
-
date: [
|
|
5542
|
-
FilterDescriptor.MatchModeEnum.DateIs,
|
|
5543
|
-
FilterDescriptor.MatchModeEnum.DateIsNot,
|
|
5544
|
-
FilterDescriptor.MatchModeEnum.DateBefore,
|
|
5545
|
-
FilterDescriptor.MatchModeEnum.DateAfter
|
|
5546
|
-
]
|
|
5504
|
+
text: [FilterMatchModeEnum.Contains, FilterMatchModeEnum.Equals, FilterMatchModeEnum.NotEquals, FilterMatchModeEnum.StartsWith, FilterMatchModeEnum.EndsWith],
|
|
5505
|
+
numeric: [FilterMatchModeEnum.Equals, FilterMatchModeEnum.NotEquals, FilterMatchModeEnum.LessThan, FilterMatchModeEnum.GreaterThan],
|
|
5506
|
+
date: [FilterMatchModeEnum.DateIs, FilterMatchModeEnum.DateIsNot, FilterMatchModeEnum.DateBefore, FilterMatchModeEnum.DateAfter]
|
|
5547
5507
|
};
|
|
5548
5508
|
// translate
|
|
5549
5509
|
this.translate.langs = this.appLanguages;
|
|
@@ -6732,14 +6692,14 @@ class MngActionEditorComponent {
|
|
|
6732
6692
|
for (const action of this.action.editorActions) {
|
|
6733
6693
|
if (action instanceof ActionEditorSubmitDescriptor) {
|
|
6734
6694
|
if (typeof action.icon === 'undefined') {
|
|
6735
|
-
action.withIcon(action.submitType ===
|
|
6695
|
+
action.withIcon(action.submitType === ActionEditorSubmitTypeEnum.Submit ? 'pi pi-check' : 'pi pi-times');
|
|
6736
6696
|
}
|
|
6737
6697
|
if (typeof action.title === 'undefined') {
|
|
6738
|
-
action.withTitle(action.submitType ===
|
|
6698
|
+
action.withTitle(action.submitType === ActionEditorSubmitTypeEnum.Submit ? 'general.save' : this.isDialog ? 'general.close' : 'general.cancel');
|
|
6739
6699
|
}
|
|
6740
6700
|
// assign run operations
|
|
6741
6701
|
action.withRunNotificationSuccess(undefined, undefined, false);
|
|
6742
|
-
if (action.submitType ===
|
|
6702
|
+
if (action.submitType === ActionEditorSubmitTypeEnum.Submit) {
|
|
6743
6703
|
action.withRunFunction(() => {
|
|
6744
6704
|
this.triggerSubmit();
|
|
6745
6705
|
return of(undefined);
|
|
@@ -6925,7 +6885,7 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
6925
6885
|
ngOnInit() {
|
|
6926
6886
|
this.iFormControl = this.formControl;
|
|
6927
6887
|
this.descriptor = this.to['descriptor'];
|
|
6928
|
-
if (this.descriptor.fieldType ===
|
|
6888
|
+
if (this.descriptor.fieldType === FieldInputTypeEnum.Currency) {
|
|
6929
6889
|
this.numberFieldMode = 'currency';
|
|
6930
6890
|
if (this.descriptor.currencyFromProperty) {
|
|
6931
6891
|
const currencyFromPropSubscription = this.iFormControl
|
|
@@ -7049,9 +7009,9 @@ class StylesUtil {
|
|
|
7049
7009
|
}
|
|
7050
7010
|
static getTableCellPaddingX(table) {
|
|
7051
7011
|
switch (table.size) {
|
|
7052
|
-
case
|
|
7012
|
+
case TableSizeEnum.Small:
|
|
7053
7013
|
return StylesUtil.TABLE_CELL_PADDING_X_SM;
|
|
7054
|
-
case
|
|
7014
|
+
case TableSizeEnum.Large:
|
|
7055
7015
|
return StylesUtil.TABLE_CELL_PADDING_X_LG;
|
|
7056
7016
|
default:
|
|
7057
7017
|
return StylesUtil.TABLE_CELL_PADDING_X;
|
|
@@ -7059,14 +7019,14 @@ class StylesUtil {
|
|
|
7059
7019
|
}
|
|
7060
7020
|
static getActionButtonRoundedWidth(action) {
|
|
7061
7021
|
switch (action.size) {
|
|
7062
|
-
case
|
|
7022
|
+
case ActionSizeEnum.ExtraSmall:
|
|
7063
7023
|
return StylesUtil.BUTTON_ROUNDED_WIDTH_XS;
|
|
7064
|
-
case
|
|
7024
|
+
case ActionSizeEnum.Small:
|
|
7065
7025
|
return StylesUtil.BUTTON_ROUNDED_WIDTH_SM;
|
|
7066
|
-
case
|
|
7067
|
-
case
|
|
7026
|
+
case ActionSizeEnum.Large:
|
|
7027
|
+
case ActionSizeEnum.ExtraLarge:
|
|
7068
7028
|
return StylesUtil.BUTTON_ROUNDED_WIDTH_LG;
|
|
7069
|
-
case
|
|
7029
|
+
case ActionSizeEnum.Normal:
|
|
7070
7030
|
default:
|
|
7071
7031
|
return StylesUtil.BUTTON_ROUNDED_WIDTH;
|
|
7072
7032
|
}
|
|
@@ -7104,8 +7064,8 @@ class MngTableReloadEvent {
|
|
|
7104
7064
|
class MngTableColumnFilterComponent {
|
|
7105
7065
|
constructor(primeConfig) {
|
|
7106
7066
|
this.primeConfig = primeConfig;
|
|
7107
|
-
this.lookupTypeDropdown =
|
|
7108
|
-
this.lookupTypeAutocomplete =
|
|
7067
|
+
this.lookupTypeDropdown = FilterLookupTypeEnum.Dropdown;
|
|
7068
|
+
this.lookupTypeAutocomplete = FilterLookupTypeEnum.Autocomplete;
|
|
7109
7069
|
this.primeType = 'text';
|
|
7110
7070
|
this.primeShowMatchMode = true;
|
|
7111
7071
|
this.primeDefaultMatchMode = FilterMatchMode.EQUALS;
|
|
@@ -7114,25 +7074,25 @@ class MngTableColumnFilterComponent {
|
|
|
7114
7074
|
}
|
|
7115
7075
|
ngOnInit() {
|
|
7116
7076
|
switch (this.descriptor.filterType) {
|
|
7117
|
-
case
|
|
7077
|
+
case FilterTypeEnum.Boolean:
|
|
7118
7078
|
this.primeType = 'boolean';
|
|
7119
7079
|
this.primeShowMatchMode = false;
|
|
7120
7080
|
break;
|
|
7121
|
-
case
|
|
7081
|
+
case FilterTypeEnum.Number:
|
|
7122
7082
|
this.primeType = 'numeric';
|
|
7123
7083
|
break;
|
|
7124
|
-
case
|
|
7084
|
+
case FilterTypeEnum.Date:
|
|
7125
7085
|
this.primeType = 'date';
|
|
7126
7086
|
this.primeDefaultMatchMode = FilterMatchMode.DATE_AFTER;
|
|
7127
7087
|
break;
|
|
7128
|
-
case
|
|
7088
|
+
case FilterTypeEnum.Lookup:
|
|
7129
7089
|
this.primeType = 'lookup';
|
|
7130
7090
|
this.primeShowMatchMode = false;
|
|
7131
7091
|
this.lookupDescriptor = this.descriptor;
|
|
7132
7092
|
this.primeField = `${this.descriptor.property}${this.lookupDescriptor.itemsValueProperty ? `.${this.lookupDescriptor.itemsValueProperty}` : ''}`;
|
|
7133
|
-
this.primeMatchModes = [{ value:
|
|
7093
|
+
this.primeMatchModes = [{ value: FilterMatchModeEnum.Equals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.Equals) }];
|
|
7134
7094
|
break;
|
|
7135
|
-
case
|
|
7095
|
+
case FilterTypeEnum.String:
|
|
7136
7096
|
this.primeType = 'text';
|
|
7137
7097
|
this.primeDefaultMatchMode = FilterMatchMode.CONTAINS;
|
|
7138
7098
|
break;
|
|
@@ -7143,7 +7103,7 @@ class MngTableColumnFilterComponent {
|
|
|
7143
7103
|
this.primeShowMatchMode = this.primeMatchModes?.length > 1;
|
|
7144
7104
|
}
|
|
7145
7105
|
switch (this.display) {
|
|
7146
|
-
case
|
|
7106
|
+
case TableFilterDisplayEnum.Menu:
|
|
7147
7107
|
this.primeDisplay = 'menu';
|
|
7148
7108
|
break;
|
|
7149
7109
|
}
|
|
@@ -7192,19 +7152,19 @@ class MngTableColumnValueComponent {
|
|
|
7192
7152
|
this.elementRef = elementRef;
|
|
7193
7153
|
this.messageService = messageService;
|
|
7194
7154
|
this.translate = translate;
|
|
7195
|
-
this.columnTypeString =
|
|
7196
|
-
this.columnTypeNumber =
|
|
7197
|
-
this.columnTypeCurrency =
|
|
7198
|
-
this.columnTypeBoolean =
|
|
7199
|
-
this.columnTypeDate =
|
|
7200
|
-
this.columnTypeEnum =
|
|
7201
|
-
this.columnTypeCustom =
|
|
7155
|
+
this.columnTypeString = ColumnTypeEnum.String;
|
|
7156
|
+
this.columnTypeNumber = ColumnTypeEnum.Number;
|
|
7157
|
+
this.columnTypeCurrency = ColumnTypeEnum.Currency;
|
|
7158
|
+
this.columnTypeBoolean = ColumnTypeEnum.Boolean;
|
|
7159
|
+
this.columnTypeDate = ColumnTypeEnum.Date;
|
|
7160
|
+
this.columnTypeEnum = ColumnTypeEnum.Enum;
|
|
7161
|
+
this.columnTypeCustom = ColumnTypeEnum.Custom;
|
|
7202
7162
|
this.styleMaxWidth = null;
|
|
7203
7163
|
this.className = 'nowrap';
|
|
7204
7164
|
this.jsonPath = '$';
|
|
7205
7165
|
}
|
|
7206
7166
|
ngOnInit() {
|
|
7207
|
-
if (this.descriptor.columnType ===
|
|
7167
|
+
if (this.descriptor.columnType === ColumnTypeEnum.Currency) {
|
|
7208
7168
|
this.currency = this.descriptor.currencyFromProperty ? this.item[this.descriptor.currencyFromProperty] : this.descriptor.currencyCode ?? 'EUR';
|
|
7209
7169
|
}
|
|
7210
7170
|
if (this.descriptor.maxWidth) {
|
|
@@ -7246,8 +7206,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
7246
7206
|
args: ['class']
|
|
7247
7207
|
}] } });
|
|
7248
7208
|
|
|
7249
|
-
var PaginationModeEnum = TableDescriptor.PaginationModeEnum;
|
|
7250
|
-
var TypeEnum = FilterDescriptor.TypeEnum;
|
|
7251
7209
|
class MngTableComponent {
|
|
7252
7210
|
constructor(injector, router, route, translate, actionExecutor, viewContainerService) {
|
|
7253
7211
|
this.injector = injector;
|
|
@@ -7256,8 +7214,8 @@ class MngTableComponent {
|
|
|
7256
7214
|
this.translate = translate;
|
|
7257
7215
|
this.actionExecutor = actionExecutor;
|
|
7258
7216
|
this.viewContainerService = viewContainerService;
|
|
7259
|
-
this.filterDisplayRow =
|
|
7260
|
-
this.filterDisplayMenu =
|
|
7217
|
+
this.filterDisplayRow = TableFilterDisplayEnum.Row;
|
|
7218
|
+
this.filterDisplayMenu = TableFilterDisplayEnum.Menu;
|
|
7261
7219
|
this.useQueryParams = false;
|
|
7262
7220
|
// extra features input
|
|
7263
7221
|
this.selectionMode = 'multiple';
|
|
@@ -7329,10 +7287,10 @@ class MngTableComponent {
|
|
|
7329
7287
|
this.isColumnClickable = this.rowClickActions.length > 0 || this.cellClickEventEmitter.observed;
|
|
7330
7288
|
}
|
|
7331
7289
|
switch (this.descriptor.size) {
|
|
7332
|
-
case
|
|
7290
|
+
case TableSizeEnum.Small:
|
|
7333
7291
|
this.className += ' p-datatable-sm';
|
|
7334
7292
|
break;
|
|
7335
|
-
case
|
|
7293
|
+
case TableSizeEnum.Large:
|
|
7336
7294
|
this.className += ' p-datatable-lg';
|
|
7337
7295
|
break;
|
|
7338
7296
|
}
|
|
@@ -7343,7 +7301,7 @@ class MngTableComponent {
|
|
|
7343
7301
|
this.columnActionMinWidth = StylesUtil.calculateTableColumnActionWidth(this.descriptor, this.rowInlineActions);
|
|
7344
7302
|
}
|
|
7345
7303
|
// check if infinite scroll
|
|
7346
|
-
if (this.descriptor.paginationMode ===
|
|
7304
|
+
if (this.descriptor.paginationMode === TablePaginationModeEnum.InfiniteScroll) {
|
|
7347
7305
|
this.infiniteScroll = true;
|
|
7348
7306
|
this.scrollHeight = 'flex';
|
|
7349
7307
|
this.tableFullHeightOffset = this.descriptor.tableFullHeightOffset ?? 315;
|
|
@@ -7535,10 +7493,10 @@ class MngTableComponent {
|
|
|
7535
7493
|
this.filterDescriptors.forEach(f => {
|
|
7536
7494
|
let matchMode;
|
|
7537
7495
|
switch (f.filterType) {
|
|
7538
|
-
case
|
|
7496
|
+
case FilterTypeEnum.String:
|
|
7539
7497
|
matchMode = FilterMatchMode.CONTAINS;
|
|
7540
7498
|
break;
|
|
7541
|
-
case
|
|
7499
|
+
case FilterTypeEnum.Date:
|
|
7542
7500
|
matchMode = FilterMatchMode.DATE_AFTER;
|
|
7543
7501
|
break;
|
|
7544
7502
|
default:
|
|
@@ -7561,7 +7519,7 @@ class MngTableComponent {
|
|
|
7561
7519
|
const matchMode = f.filterMatchType && descriptor ? MediusRestUtil.getMapping(f.filterMatchType, descriptor.filterType, 2)?.[0] : MediusFilterMatchType.Equals;
|
|
7562
7520
|
if (descriptor && matchMode) {
|
|
7563
7521
|
let filterValue = f.filterValue;
|
|
7564
|
-
if (descriptor.filterType ===
|
|
7522
|
+
if (descriptor.filterType === FilterTypeEnum.Date && typeof filterValue !== 'undefined') {
|
|
7565
7523
|
if (typeof filterValue === 'string' || typeof filterValue === 'number') {
|
|
7566
7524
|
filterValue = new Date(filterValue);
|
|
7567
7525
|
}
|
|
@@ -7984,8 +7942,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
7984
7942
|
args: [MngTableComponent]
|
|
7985
7943
|
}] } });
|
|
7986
7944
|
|
|
7987
|
-
var SizeEnum = ActionDescriptor.SizeEnum;
|
|
7988
|
-
var DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum;
|
|
7989
7945
|
class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
7990
7946
|
constructor(actionExecutor) {
|
|
7991
7947
|
super();
|
|
@@ -8000,17 +7956,17 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8000
7956
|
}
|
|
8001
7957
|
ngOnInit() {
|
|
8002
7958
|
this.descriptor = this.to['descriptor'];
|
|
8003
|
-
const hasViewAction = this.descriptor.fieldActions.some(a => a ===
|
|
8004
|
-
const hasAddAction = this.descriptor.fieldActions.some(a => a ===
|
|
8005
|
-
const hasEditAction = this.descriptor.fieldActions.some(a => a ===
|
|
8006
|
-
const hasDeleteAction = this.descriptor.fieldActions.some(a => a ===
|
|
7959
|
+
const hasViewAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.View);
|
|
7960
|
+
const hasAddAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Add);
|
|
7961
|
+
const hasEditAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Edit);
|
|
7962
|
+
const hasDeleteAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorActionEnum.Delete);
|
|
8007
7963
|
if (hasViewAction) {
|
|
8008
7964
|
const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)
|
|
8009
7965
|
.withPosition(ActionPositionEnum.RowClick)
|
|
8010
7966
|
.withTitle(null)
|
|
8011
7967
|
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
8012
|
-
.withDialogSize(
|
|
8013
|
-
viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction,
|
|
7968
|
+
.withDialogSize(ActionEditorDialogSizeEnum.Small);
|
|
7969
|
+
viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitTypeEnum.Cancel)]);
|
|
8014
7970
|
this.actions.push(viewAction);
|
|
8015
7971
|
}
|
|
8016
7972
|
if (hasAddAction) {
|
|
@@ -8019,8 +7975,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8019
7975
|
.withTitle(null)
|
|
8020
7976
|
.withIcon('pi pi-plus')
|
|
8021
7977
|
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
8022
|
-
.withDialogSize(
|
|
8023
|
-
.withSize(
|
|
7978
|
+
.withDialogSize(ActionEditorDialogSizeEnum.Small)
|
|
7979
|
+
.withSize(ActionSizeEnum.ExtraSmall)
|
|
8024
7980
|
.withSubmitFunction(ctx => {
|
|
8025
7981
|
if (!ctx.parameters.item) {
|
|
8026
7982
|
return throwError(() => new Error(`No item was provided in context, edit cannot be done.`));
|
|
@@ -8041,8 +7997,8 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8041
7997
|
.withTitle(null)
|
|
8042
7998
|
.withIcon('pi pi-pencil')
|
|
8043
7999
|
.withDialogClassName('mng-field-dialog mng-action-editor-dialog')
|
|
8044
|
-
.withDialogSize(
|
|
8045
|
-
.withSize(
|
|
8000
|
+
.withDialogSize(ActionEditorDialogSizeEnum.Small)
|
|
8001
|
+
.withSize(ActionSizeEnum.ExtraSmall)
|
|
8046
8002
|
.withSubmitFunction(ctx => {
|
|
8047
8003
|
if (!ctx.parameters.item) {
|
|
8048
8004
|
return throwError(() => new Error(`No item was provided in context, edit cannot be done.`));
|
|
@@ -8063,7 +8019,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
|
|
|
8063
8019
|
.withLevel(ActionLevelEnum.Danger)
|
|
8064
8020
|
.withTitle(null)
|
|
8065
8021
|
.withIcon('pi pi-trash')
|
|
8066
|
-
.withSize(
|
|
8022
|
+
.withSize(ActionSizeEnum.ExtraSmall)
|
|
8067
8023
|
.withRunFunction(ctx => {
|
|
8068
8024
|
if (!ctx.parameters.item) {
|
|
8069
8025
|
return throwError(() => new Error(`No item was provided in context, delete cannot be done.`));
|
|
@@ -8154,8 +8110,8 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
8154
8110
|
this.dialogUseDataProvider = true;
|
|
8155
8111
|
this.dialogDataProviderService = this.injector.get(this.descriptor.lookupTableDataProvider.serviceType);
|
|
8156
8112
|
}
|
|
8157
|
-
this.hasAddAction = this.descriptor.actions.some(a => a ===
|
|
8158
|
-
this.hasDeleteAction = this.descriptor.actions.some(a => a ===
|
|
8113
|
+
this.hasAddAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorActionEnum.Add);
|
|
8114
|
+
this.hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorActionEnum.Delete);
|
|
8159
8115
|
// init values
|
|
8160
8116
|
if (typeof this.formControl.value === 'undefined' || this.formControl.value === null) {
|
|
8161
8117
|
this.formControl.patchValue([]);
|
|
@@ -8251,8 +8207,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
8251
8207
|
class MngFormlyFieldFieldsetComponent extends FieldType {
|
|
8252
8208
|
constructor() {
|
|
8253
8209
|
super(...arguments);
|
|
8254
|
-
this.typeFieldset =
|
|
8255
|
-
this.typeLogical =
|
|
8210
|
+
this.typeFieldset = FieldGroupTypeEnum.Fieldset;
|
|
8211
|
+
this.typeLogical = FieldGroupTypeEnum.Logical;
|
|
8256
8212
|
}
|
|
8257
8213
|
ngOnInit() {
|
|
8258
8214
|
this.descriptor = this.to['descriptor'];
|
|
@@ -10044,5 +10000,5 @@ class RouteDataBuilder {
|
|
|
10044
10000
|
* Generated bundle index. Do not edit.
|
|
10045
10001
|
*/
|
|
10046
10002
|
|
|
10047
|
-
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,
|
|
10003
|
+
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 };
|
|
10048
10004
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|