@simpleangularcontrols/sac-common 10.0.0-rc.7 → 10.0.0-rc.8
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/bundles/simpleangularcontrols-sac-common.umd.js +546 -390
- package/bundles/simpleangularcontrols-sac-common.umd.js.map +1 -1
- package/bundles/simpleangularcontrols-sac-common.umd.min.js +1 -1
- package/bundles/simpleangularcontrols-sac-common.umd.min.js.map +1 -1
- package/common/baseinputcontrol.d.ts +0 -4
- package/common/basemodelcontrol.d.ts +25 -1
- package/common/baseuploadcontrol.d.ts +0 -5
- package/controls/checkbox/checkbox.d.ts +0 -4
- package/controls/datetime/date.d.ts +0 -4
- package/controls/datetime/datetime.d.ts +0 -4
- package/controls/datetime/time.d.ts +0 -4
- package/controls/grid/grid.d.ts +38 -36
- package/controls/grid/gridbutton.d.ts +13 -13
- package/controls/grid/gridcolumn.d.ts +8 -8
- package/controls/grid/gridcolumnaction.d.ts +3 -3
- package/controls/grid/gridcolumnbase.d.ts +37 -37
- package/controls/grid/gridimage.d.ts +2 -2
- package/controls/grid/model.d.ts +51 -42
- package/controls/grid/paging.d.ts +41 -43
- package/controls/layout/formlayout.d.ts +4 -0
- package/controls/static/formcontainer.d.ts +2 -6
- package/controls/tooltip/tooltip.d.ts +88 -63
- package/esm2015/common/baseinputcontrol.js +2 -7
- package/esm2015/common/basemodelcontrol.js +34 -2
- package/esm2015/common/baseuploadcontrol.js +2 -3
- package/esm2015/controls/checkbox/checkbox.js +5 -6
- package/esm2015/controls/datetime/date.js +2 -3
- package/esm2015/controls/datetime/datetime.js +2 -3
- package/esm2015/controls/datetime/time.js +2 -3
- package/esm2015/controls/grid/grid.js +21 -21
- package/esm2015/controls/grid/gridbutton.js +19 -13
- package/esm2015/controls/grid/gridcolumn.js +14 -7
- package/esm2015/controls/grid/gridcolumnaction.js +6 -5
- package/esm2015/controls/grid/gridcolumnbase.js +56 -55
- package/esm2015/controls/grid/gridimage.js +3 -3
- package/esm2015/controls/grid/model.js +51 -30
- package/esm2015/controls/grid/paging.js +40 -42
- package/esm2015/controls/layout/formlayout.js +2 -1
- package/esm2015/controls/static/formcontainer.js +11 -10
- package/esm2015/controls/tooltip/tooltip.js +260 -189
- package/esm2015/interfaces/ISacConfigurationService.js +1 -1
- package/esm2015/interfaces/ISacIconService.js +1 -1
- package/esm2015/services/sac-configuration.service.js +7 -1
- package/esm2015/services/sac-icon.service.js +7 -1
- package/fesm2015/simpleangularcontrols-sac-common.js +521 -377
- package/fesm2015/simpleangularcontrols-sac-common.js.map +1 -1
- package/interfaces/ISacConfigurationService.d.ts +4 -0
- package/interfaces/ISacIconService.d.ts +4 -0
- package/package.json +1 -1
- package/services/sac-configuration.service.d.ts +8 -0
- package/services/sac-icon.service.d.ts +8 -0
- package/simpleangularcontrols-sac-common-10.0.0-rc.8.tgz +0 -0
- package/simpleangularcontrols-sac-common.metadata.json +1 -1
- package/simpleangularcontrols-sac-common-10.0.0-rc.7.tgz +0 -0
|
@@ -705,6 +705,7 @@
|
|
|
705
705
|
];
|
|
706
706
|
SacFormLayoutCommon.propDecorators = {
|
|
707
707
|
componentHeight: [{ type: i0.Input }],
|
|
708
|
+
helptextmode: [{ type: i0.Input }],
|
|
708
709
|
inlineError: [{ type: i0.Input }],
|
|
709
710
|
isAdaptiveLabel: [{ type: i0.Input }],
|
|
710
711
|
labelSizeLg: [{ type: i0.Input }],
|
|
@@ -775,6 +776,16 @@
|
|
|
775
776
|
enumerable: false,
|
|
776
777
|
configurable: true
|
|
777
778
|
});
|
|
779
|
+
Object.defineProperty(SacDefaultConfigurationService.prototype, "HelptextMode", {
|
|
780
|
+
/**
|
|
781
|
+
* @inheritdoc
|
|
782
|
+
*/
|
|
783
|
+
get: function () {
|
|
784
|
+
return 'text';
|
|
785
|
+
},
|
|
786
|
+
enumerable: false,
|
|
787
|
+
configurable: true
|
|
788
|
+
});
|
|
778
789
|
Object.defineProperty(SacDefaultConfigurationService.prototype, "InlineErrorEnabled", {
|
|
779
790
|
/**
|
|
780
791
|
* @inheritdoc
|
|
@@ -1306,6 +1317,16 @@
|
|
|
1306
1317
|
enumerable: false,
|
|
1307
1318
|
configurable: true
|
|
1308
1319
|
});
|
|
1320
|
+
Object.defineProperty(SacDefaultIconService.prototype, "GenericHelptextIcon", {
|
|
1321
|
+
/**
|
|
1322
|
+
* @inheritdoc
|
|
1323
|
+
*/
|
|
1324
|
+
get: function () {
|
|
1325
|
+
return 'fa fa-info-circle';
|
|
1326
|
+
},
|
|
1327
|
+
enumerable: false,
|
|
1328
|
+
configurable: true
|
|
1329
|
+
});
|
|
1309
1330
|
Object.defineProperty(SacDefaultIconService.prototype, "GridComponentSortDown", {
|
|
1310
1331
|
/**
|
|
1311
1332
|
* @inheritdoc
|
|
@@ -2609,6 +2630,10 @@
|
|
|
2609
2630
|
* Deaktiviert das Label im Template
|
|
2610
2631
|
*/
|
|
2611
2632
|
this.disablelabel = false;
|
|
2633
|
+
/**
|
|
2634
|
+
* Text to support the user during input.
|
|
2635
|
+
*/
|
|
2636
|
+
this.helptext = '';
|
|
2612
2637
|
/**
|
|
2613
2638
|
* defines that error messages are displayed under the controls
|
|
2614
2639
|
*/
|
|
@@ -2661,8 +2686,12 @@
|
|
|
2661
2686
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
2662
2687
|
this.lngResourceService = injector.get(SACLOCALISATION_SERVICE, new SacDefaultLocalisationService(this.validationKeyService));
|
|
2663
2688
|
this.configurationService = injector.get(SACCONFIGURATION_SERVICE, new SacDefaultConfigurationService());
|
|
2689
|
+
this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
2664
2690
|
}
|
|
2665
2691
|
Object.defineProperty(SacBaseModelControl.prototype, "inlineerrorenabled", {
|
|
2692
|
+
/**
|
|
2693
|
+
* Show error messages inline
|
|
2694
|
+
*/
|
|
2666
2695
|
get: function () {
|
|
2667
2696
|
return this._inlineerrorenabled;
|
|
2668
2697
|
},
|
|
@@ -2720,6 +2749,16 @@
|
|
|
2720
2749
|
enumerable: false,
|
|
2721
2750
|
configurable: true
|
|
2722
2751
|
});
|
|
2752
|
+
Object.defineProperty(SacBaseModelControl.prototype, "HelptextTooltipIcon", {
|
|
2753
|
+
/**
|
|
2754
|
+
* Get Icon for Helptext Tooltip
|
|
2755
|
+
*/
|
|
2756
|
+
get: function () {
|
|
2757
|
+
return this.iconService.GenericHelptextIcon;
|
|
2758
|
+
},
|
|
2759
|
+
enumerable: false,
|
|
2760
|
+
configurable: true
|
|
2761
|
+
});
|
|
2723
2762
|
Object.defineProperty(SacBaseModelControl.prototype, "dirty", {
|
|
2724
2763
|
/**
|
|
2725
2764
|
* Methode ergibt Boolean Wert für dirty
|
|
@@ -2868,6 +2907,8 @@
|
|
|
2868
2907
|
this.setComponentHeight();
|
|
2869
2908
|
// set adaptive label property from formlayout directive
|
|
2870
2909
|
this.setIsAdaptiveLabel();
|
|
2910
|
+
// set method to display helptext
|
|
2911
|
+
this.setHelpTextMode();
|
|
2871
2912
|
this.OnClassInit();
|
|
2872
2913
|
};
|
|
2873
2914
|
/**
|
|
@@ -2972,6 +3013,20 @@
|
|
|
2972
3013
|
}
|
|
2973
3014
|
}
|
|
2974
3015
|
};
|
|
3016
|
+
/**
|
|
3017
|
+
* Set mode for helptext. Can be tooltip or text
|
|
3018
|
+
*/
|
|
3019
|
+
SacBaseModelControl.prototype.setHelpTextMode = function () {
|
|
3020
|
+
var _a;
|
|
3021
|
+
if (!this.helptextmode) {
|
|
3022
|
+
if ((_a = this.formlayout) === null || _a === void 0 ? void 0 : _a.helptextmode) {
|
|
3023
|
+
this.helptextmode = this.formlayout.helptextmode;
|
|
3024
|
+
}
|
|
3025
|
+
else {
|
|
3026
|
+
this.helptextmode = this.configurationService.HelptextMode;
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
};
|
|
2975
3030
|
/**
|
|
2976
3031
|
* Set adaptive label property from parent layout control
|
|
2977
3032
|
*/
|
|
@@ -3059,6 +3114,8 @@
|
|
|
3059
3114
|
componentHeight: [{ type: i0.Input }],
|
|
3060
3115
|
disabled: [{ type: i0.Input }],
|
|
3061
3116
|
disablelabel: [{ type: i0.Input }],
|
|
3117
|
+
helptext: [{ type: i0.Input }],
|
|
3118
|
+
helptextmode: [{ type: i0.Input }],
|
|
3062
3119
|
inlineError: [{ type: i0.Input }],
|
|
3063
3120
|
isAdaptiveLabel: [{ type: i0.Input }],
|
|
3064
3121
|
labelSizeLg: [{ type: i0.Input }],
|
|
@@ -3080,16 +3137,15 @@
|
|
|
3080
3137
|
__extends(SacCheckboxCommon, _super);
|
|
3081
3138
|
function SacCheckboxCommon() {
|
|
3082
3139
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3083
|
-
/**
|
|
3084
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
3085
|
-
*/
|
|
3086
|
-
_this.tooltiptext = '';
|
|
3087
3140
|
/**
|
|
3088
3141
|
* Defines that the checkbox can be used in a list of checkboxes and is not handled as a single form control
|
|
3089
3142
|
*/
|
|
3090
3143
|
_this.stacked = false;
|
|
3091
3144
|
return _this;
|
|
3145
|
+
// #endregion Public Methods
|
|
3092
3146
|
}
|
|
3147
|
+
// #endregion Properties
|
|
3148
|
+
// #region Public Methods
|
|
3093
3149
|
/**
|
|
3094
3150
|
* Control hat keinen Validator
|
|
3095
3151
|
*/
|
|
@@ -3102,7 +3158,6 @@
|
|
|
3102
3158
|
{ type: i0.Directive }
|
|
3103
3159
|
];
|
|
3104
3160
|
SacCheckboxCommon.propDecorators = {
|
|
3105
|
-
tooltiptext: [{ type: i0.Input }],
|
|
3106
3161
|
checkboxtext: [{ type: i0.Input }],
|
|
3107
3162
|
stacked: [{ type: i0.Input }]
|
|
3108
3163
|
};
|
|
@@ -5026,10 +5081,6 @@
|
|
|
5026
5081
|
* Macht das Input readonly
|
|
5027
5082
|
*/
|
|
5028
5083
|
_this.readonly = false;
|
|
5029
|
-
/**
|
|
5030
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
5031
|
-
*/
|
|
5032
|
-
_this.tooltiptext = '';
|
|
5033
5084
|
return _this;
|
|
5034
5085
|
// #endregion Protected Methods
|
|
5035
5086
|
}
|
|
@@ -5073,8 +5124,7 @@
|
|
|
5073
5124
|
isrequired: [{ type: i0.Input }],
|
|
5074
5125
|
placeholder: [{ type: i0.Input }],
|
|
5075
5126
|
readonly: [{ type: i0.Input }],
|
|
5076
|
-
regexvalidation: [{ type: i0.Input }]
|
|
5077
|
-
tooltiptext: [{ type: i0.Input }]
|
|
5127
|
+
regexvalidation: [{ type: i0.Input }]
|
|
5078
5128
|
};
|
|
5079
5129
|
|
|
5080
5130
|
/**
|
|
@@ -5629,29 +5679,41 @@
|
|
|
5629
5679
|
clicked: [{ type: i0.Output }]
|
|
5630
5680
|
};
|
|
5631
5681
|
|
|
5682
|
+
// #region Classes
|
|
5683
|
+
/**
|
|
5684
|
+
* GridResponse class
|
|
5685
|
+
*/
|
|
5686
|
+
var GridResponse = /** @class */ (function () {
|
|
5687
|
+
function GridResponse() {
|
|
5688
|
+
}
|
|
5689
|
+
return GridResponse;
|
|
5690
|
+
}());
|
|
5632
5691
|
/**
|
|
5633
|
-
* Model
|
|
5692
|
+
* Model for pager settings
|
|
5634
5693
|
*/
|
|
5635
5694
|
var PagerData = /** @class */ (function () {
|
|
5695
|
+
// #endregion Properties
|
|
5696
|
+
// #region Constructors
|
|
5636
5697
|
/**
|
|
5637
|
-
*
|
|
5638
|
-
* @param PageSize
|
|
5639
|
-
* @param CurrentPageIndex
|
|
5640
|
-
* @param TotalRowCount Total Rows in
|
|
5698
|
+
* Constructor
|
|
5699
|
+
* @param PageSize Number of elements per page
|
|
5700
|
+
* @param CurrentPageIndex Current page
|
|
5701
|
+
* @param TotalRowCount Total Rows in database
|
|
5641
5702
|
*/
|
|
5642
5703
|
function PagerData(PageSize, CurrentPageIndex, TotalRowCount) {
|
|
5704
|
+
// #region Properties
|
|
5643
5705
|
/**
|
|
5644
|
-
*
|
|
5645
|
-
*/
|
|
5646
|
-
this.TotalRowCount = 0;
|
|
5647
|
-
/**
|
|
5648
|
-
* Aktueller Index der Seite
|
|
5706
|
+
* Current index of the page
|
|
5649
5707
|
*/
|
|
5650
5708
|
this.CurrentPageIndex = 0;
|
|
5651
5709
|
/**
|
|
5652
|
-
*
|
|
5710
|
+
* Number of elements on the page
|
|
5653
5711
|
*/
|
|
5654
5712
|
this.PageSize = 20;
|
|
5713
|
+
/**
|
|
5714
|
+
* Total number of data records
|
|
5715
|
+
*/
|
|
5716
|
+
this.TotalRowCount = 0;
|
|
5655
5717
|
this.PageSize = PageSize;
|
|
5656
5718
|
this.CurrentPageIndex = CurrentPageIndex;
|
|
5657
5719
|
this.TotalRowCount = TotalRowCount;
|
|
@@ -5659,44 +5721,41 @@
|
|
|
5659
5721
|
return PagerData;
|
|
5660
5722
|
}());
|
|
5661
5723
|
/**
|
|
5662
|
-
* Model
|
|
5724
|
+
* Model if page is to be changed
|
|
5663
5725
|
*/
|
|
5664
5726
|
var PagerRequest = /** @class */ (function () {
|
|
5727
|
+
// #endregion Properties
|
|
5728
|
+
// #region Constructors
|
|
5665
5729
|
/**
|
|
5666
|
-
*
|
|
5667
|
-
* @param PageSize
|
|
5668
|
-
* @param NewPageIndex
|
|
5730
|
+
* Constructor
|
|
5731
|
+
* @param PageSize Page size / number of elements per page
|
|
5732
|
+
* @param NewPageIndex New page index
|
|
5669
5733
|
*/
|
|
5670
5734
|
function PagerRequest(PageSize, NewPageIndex) {
|
|
5735
|
+
// #region Properties
|
|
5671
5736
|
/**
|
|
5672
|
-
*
|
|
5737
|
+
* Index of the page to which you want to switch
|
|
5673
5738
|
*/
|
|
5674
|
-
this.
|
|
5739
|
+
this.NewPageIndex = 0;
|
|
5675
5740
|
/**
|
|
5676
|
-
*
|
|
5741
|
+
* Number of elements on the page
|
|
5677
5742
|
*/
|
|
5678
|
-
this.
|
|
5743
|
+
this.PageSize = 0;
|
|
5679
5744
|
this.PageSize = PageSize;
|
|
5680
5745
|
this.NewPageIndex = NewPageIndex;
|
|
5681
5746
|
}
|
|
5682
5747
|
return PagerRequest;
|
|
5683
5748
|
}());
|
|
5684
5749
|
/**
|
|
5685
|
-
*
|
|
5686
|
-
*/
|
|
5687
|
-
var GridResponse = /** @class */ (function () {
|
|
5688
|
-
function GridResponse() {
|
|
5689
|
-
}
|
|
5690
|
-
return GridResponse;
|
|
5691
|
-
}());
|
|
5692
|
-
/**
|
|
5693
|
-
* Model für Sortierung
|
|
5750
|
+
* Model for sorting
|
|
5694
5751
|
*/
|
|
5695
5752
|
var SortDescriptor = /** @class */ (function () {
|
|
5753
|
+
// #endregion Properties
|
|
5754
|
+
// #region Constructors
|
|
5696
5755
|
/**
|
|
5697
|
-
*
|
|
5698
|
-
* @param sortcolumn Column
|
|
5699
|
-
* @param sortorder
|
|
5756
|
+
* Constructor
|
|
5757
|
+
* @param sortcolumn Column by which to sort
|
|
5758
|
+
* @param sortorder Type of sorting
|
|
5700
5759
|
*/
|
|
5701
5760
|
function SortDescriptor(sortcolumn, sortorder) {
|
|
5702
5761
|
this.SortColumn = sortcolumn;
|
|
@@ -5705,19 +5764,29 @@
|
|
|
5705
5764
|
return SortDescriptor;
|
|
5706
5765
|
}());
|
|
5707
5766
|
(function (SortOrder) {
|
|
5767
|
+
/**
|
|
5768
|
+
* No sorting
|
|
5769
|
+
*/
|
|
5708
5770
|
SortOrder[SortOrder["None"] = 0] = "None";
|
|
5771
|
+
/**
|
|
5772
|
+
* Ascending
|
|
5773
|
+
*/
|
|
5709
5774
|
SortOrder[SortOrder["Ascending"] = 1] = "Ascending";
|
|
5775
|
+
/**
|
|
5776
|
+
* Descending
|
|
5777
|
+
*/
|
|
5710
5778
|
SortOrder[SortOrder["Descending"] = 2] = "Descending";
|
|
5711
|
-
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
5779
|
+
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
5780
|
+
// #endregion Enums
|
|
5712
5781
|
|
|
5713
5782
|
/**
|
|
5714
|
-
*
|
|
5783
|
+
* Basic component for SacGrid
|
|
5715
5784
|
*/
|
|
5716
5785
|
var SacGridCommon = /** @class */ (function () {
|
|
5717
5786
|
// #endregion Properties
|
|
5718
5787
|
// #region Constructors
|
|
5719
5788
|
/**
|
|
5720
|
-
*
|
|
5789
|
+
* Constructor
|
|
5721
5790
|
* @param cd Change Detection Service
|
|
5722
5791
|
* @param injector DI Injector
|
|
5723
5792
|
*/
|
|
@@ -5725,43 +5794,43 @@
|
|
|
5725
5794
|
this.cd = cd;
|
|
5726
5795
|
// #region Properties
|
|
5727
5796
|
/**
|
|
5728
|
-
*
|
|
5797
|
+
* Page number of the active page.
|
|
5729
5798
|
*/
|
|
5730
5799
|
this.activePage = 1;
|
|
5731
5800
|
/**
|
|
5732
|
-
*
|
|
5801
|
+
* Contains the number of the first page displayed in Pager.
|
|
5733
5802
|
*/
|
|
5734
5803
|
this.firstPageNumber = 1;
|
|
5735
5804
|
/**
|
|
5736
|
-
*
|
|
5805
|
+
* Contains Array of Pages.
|
|
5737
5806
|
*/
|
|
5738
5807
|
this.paginators = [];
|
|
5739
5808
|
/**
|
|
5740
|
-
*
|
|
5809
|
+
* Deactivates the selection of the PageSize in the pager
|
|
5741
5810
|
*/
|
|
5742
5811
|
this.pagesizedisabled = false;
|
|
5743
5812
|
/**
|
|
5744
|
-
*
|
|
5813
|
+
* Defines the number of elements per page that can be selected. The default is 20, 50 and 100. The values must be separated with a `|`.
|
|
5745
5814
|
*/
|
|
5746
5815
|
this.pagesizes = '20|50|100';
|
|
5747
5816
|
/**
|
|
5748
|
-
*
|
|
5817
|
+
* Event when the pager is clicked.
|
|
5749
5818
|
*/
|
|
5750
5819
|
this.paging = new i0.EventEmitter();
|
|
5751
5820
|
/**
|
|
5752
|
-
*
|
|
5821
|
+
* Event when a header is clicked so that the grid is sorted.
|
|
5753
5822
|
*/
|
|
5754
5823
|
this.sorting = new i0.EventEmitter();
|
|
5755
5824
|
/**
|
|
5756
|
-
*
|
|
5825
|
+
* Number of columns in the grid
|
|
5757
5826
|
*/
|
|
5758
5827
|
this.ColumnCount = 0;
|
|
5759
5828
|
/**
|
|
5760
|
-
*
|
|
5829
|
+
* Column by which currently sorted.
|
|
5761
5830
|
*/
|
|
5762
5831
|
this.sortColumn = '';
|
|
5763
5832
|
/**
|
|
5764
|
-
*
|
|
5833
|
+
* Current direction of sorting
|
|
5765
5834
|
*/
|
|
5766
5835
|
this.sortDirection = exports.SortOrder.None;
|
|
5767
5836
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
@@ -5773,8 +5842,8 @@
|
|
|
5773
5842
|
// #endregion Constructors
|
|
5774
5843
|
// #region Public Getters And Setters
|
|
5775
5844
|
/**
|
|
5776
|
-
* Model
|
|
5777
|
-
* @param sortDescription Settings
|
|
5845
|
+
* Model for sorting
|
|
5846
|
+
* @param sortDescription Settings for current sorting
|
|
5778
5847
|
*/
|
|
5779
5848
|
set: function (sortDescription) {
|
|
5780
5849
|
this.sortColumn = sortDescription.SortColumn;
|
|
@@ -5786,15 +5855,15 @@
|
|
|
5786
5855
|
// #endregion Public Getters And Setters
|
|
5787
5856
|
// #region Public Methods
|
|
5788
5857
|
/**
|
|
5789
|
-
*
|
|
5858
|
+
* The method increases the column elements by one
|
|
5790
5859
|
*/
|
|
5791
5860
|
SacGridCommon.prototype.RegisterColumn = function () {
|
|
5792
5861
|
this.ColumnCount++;
|
|
5793
|
-
// Detect Changes
|
|
5862
|
+
// Detect Changes, as ColumnChange is executed after OnInit.
|
|
5794
5863
|
this.cd.detectChanges();
|
|
5795
5864
|
};
|
|
5796
5865
|
/**
|
|
5797
|
-
*
|
|
5866
|
+
* Method for sorting the data.
|
|
5798
5867
|
*/
|
|
5799
5868
|
SacGridCommon.prototype.SortBy = function (command) {
|
|
5800
5869
|
var direction;
|
|
@@ -5818,14 +5887,14 @@
|
|
|
5818
5887
|
this.sorting.emit(result);
|
|
5819
5888
|
};
|
|
5820
5889
|
/**
|
|
5821
|
-
*
|
|
5890
|
+
* The method reduces the column elements by one
|
|
5822
5891
|
*/
|
|
5823
5892
|
SacGridCommon.prototype.UnregisterColumn = function () {
|
|
5824
5893
|
this.ColumnCount--;
|
|
5825
5894
|
};
|
|
5826
5895
|
/**
|
|
5827
|
-
*
|
|
5828
|
-
* @param newStartIndex
|
|
5896
|
+
* Method if Grid is to switch to a new page.
|
|
5897
|
+
* @param newStartIndex New Page Index (Zero-Based)
|
|
5829
5898
|
*/
|
|
5830
5899
|
SacGridCommon.prototype.pageChange = function (newStartIndex) {
|
|
5831
5900
|
this.paging.emit(newStartIndex);
|
|
@@ -5861,27 +5930,31 @@
|
|
|
5861
5930
|
*/
|
|
5862
5931
|
var SacGridButtonCommon = /** @class */ (function () {
|
|
5863
5932
|
function SacGridButtonCommon() {
|
|
5933
|
+
// #region Properties
|
|
5864
5934
|
/**
|
|
5865
|
-
*
|
|
5935
|
+
* Button is deactivated
|
|
5866
5936
|
*/
|
|
5867
|
-
this.
|
|
5937
|
+
this._isdisabledvalue = false;
|
|
5868
5938
|
/**
|
|
5869
|
-
*
|
|
5939
|
+
* Input property for styling the button. Defines the CSS classes of the button
|
|
5870
5940
|
*/
|
|
5871
|
-
this.
|
|
5941
|
+
this.iconstyle = '';
|
|
5872
5942
|
/**
|
|
5873
|
-
* Event
|
|
5943
|
+
* Event when the button is clicked
|
|
5874
5944
|
*/
|
|
5875
5945
|
this.clicked = new i0.EventEmitter();
|
|
5946
|
+
// #endregion Public Methods
|
|
5876
5947
|
}
|
|
5877
5948
|
Object.defineProperty(SacGridButtonCommon.prototype, "isdisabled", {
|
|
5878
5949
|
get: function () {
|
|
5879
5950
|
return this._isdisabledvalue;
|
|
5880
5951
|
},
|
|
5952
|
+
// #endregion Properties
|
|
5953
|
+
// #region Public Getters And Setters
|
|
5881
5954
|
/**
|
|
5882
|
-
*
|
|
5883
|
-
* @param v
|
|
5884
|
-
* @return
|
|
5955
|
+
* Deactivating buttons
|
|
5956
|
+
* @param v Deactivates the button. Can be a Boolean or the strings `true` or `false`.
|
|
5957
|
+
* @return Defines whether the button is deactivated. Is always a Boolean type
|
|
5885
5958
|
*/
|
|
5886
5959
|
set: function (v) {
|
|
5887
5960
|
if (v === null || v === undefined || typeof v === 'boolean') {
|
|
@@ -5894,8 +5967,10 @@
|
|
|
5894
5967
|
enumerable: false,
|
|
5895
5968
|
configurable: true
|
|
5896
5969
|
});
|
|
5970
|
+
// #endregion Public Getters And Setters
|
|
5971
|
+
// #region Public Methods
|
|
5897
5972
|
/**
|
|
5898
|
-
*
|
|
5973
|
+
* Triggers the clicked event if the button is not deactivated.
|
|
5899
5974
|
*/
|
|
5900
5975
|
SacGridButtonCommon.prototype.callaction = function () {
|
|
5901
5976
|
if (!this._isdisabledvalue) {
|
|
@@ -5908,18 +5983,20 @@
|
|
|
5908
5983
|
{ type: i0.Directive }
|
|
5909
5984
|
];
|
|
5910
5985
|
SacGridButtonCommon.propDecorators = {
|
|
5911
|
-
iconstyle: [{ type: i0.Input }],
|
|
5912
5986
|
icon: [{ type: i0.Input }],
|
|
5913
|
-
|
|
5914
|
-
clicked: [{ type: i0.Output }]
|
|
5987
|
+
iconstyle: [{ type: i0.Input }],
|
|
5988
|
+
clicked: [{ type: i0.Output }],
|
|
5989
|
+
isdisabled: [{ type: i0.Input }]
|
|
5915
5990
|
};
|
|
5916
5991
|
|
|
5917
5992
|
/**
|
|
5918
|
-
* Base
|
|
5993
|
+
* Base component for GridColumn
|
|
5919
5994
|
*/
|
|
5920
5995
|
var SacGridColumnBaseCommon = /** @class */ (function () {
|
|
5996
|
+
// #endregion Properties
|
|
5997
|
+
// #region Constructors
|
|
5921
5998
|
/**
|
|
5922
|
-
*
|
|
5999
|
+
* Constructor
|
|
5923
6000
|
* @param grid reference to grid component
|
|
5924
6001
|
* @param injector di injector to resolve icon service
|
|
5925
6002
|
* @param el reference to html element
|
|
@@ -5930,73 +6007,71 @@
|
|
|
5930
6007
|
this.el = el;
|
|
5931
6008
|
this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
5932
6009
|
}
|
|
5933
|
-
|
|
5934
|
-
|
|
6010
|
+
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortDown", {
|
|
6011
|
+
// #endregion Constructors
|
|
6012
|
+
// #region Public Getters And Setters
|
|
6013
|
+
/**
|
|
6014
|
+
* sort down icon for grid header
|
|
6015
|
+
*/
|
|
6016
|
+
get: function () {
|
|
6017
|
+
return this.iconService.GridComponentSortDown;
|
|
6018
|
+
},
|
|
6019
|
+
enumerable: false,
|
|
6020
|
+
configurable: true
|
|
6021
|
+
});
|
|
6022
|
+
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortUp", {
|
|
6023
|
+
/**
|
|
6024
|
+
* sort up icon for grid header
|
|
6025
|
+
*/
|
|
6026
|
+
get: function () {
|
|
6027
|
+
return this.iconService.GridComponentSortUp;
|
|
6028
|
+
},
|
|
6029
|
+
enumerable: false,
|
|
6030
|
+
configurable: true
|
|
6031
|
+
});
|
|
6032
|
+
// #endregion Public Getters And Setters
|
|
6033
|
+
// #region Public Methods
|
|
5935
6034
|
/**
|
|
5936
|
-
*
|
|
6035
|
+
* Indicates the direction of sorting. The possible values are `none`,`asc`,`desc`
|
|
5937
6036
|
*/
|
|
5938
|
-
SacGridColumnBaseCommon.prototype.
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
6037
|
+
SacGridColumnBaseCommon.prototype.GetSortDirection = function () {
|
|
6038
|
+
switch (this.grid.sortDirection) {
|
|
6039
|
+
case exports.SortOrder.None:
|
|
6040
|
+
return 'none';
|
|
6041
|
+
case exports.SortOrder.Ascending:
|
|
6042
|
+
return 'asc';
|
|
6043
|
+
case exports.SortOrder.Descending:
|
|
6044
|
+
return 'desc';
|
|
6045
|
+
default:
|
|
6046
|
+
return 'none';
|
|
5947
6047
|
}
|
|
5948
6048
|
};
|
|
5949
6049
|
/**
|
|
5950
|
-
*
|
|
6050
|
+
* Defines whether the element is a cell in the table.
|
|
5951
6051
|
*/
|
|
5952
|
-
SacGridColumnBaseCommon.prototype.
|
|
5953
|
-
|
|
5954
|
-
this.grid.UnregisterColumn();
|
|
5955
|
-
}
|
|
6052
|
+
SacGridColumnBaseCommon.prototype.IsBody = function () {
|
|
6053
|
+
return this.type === 'body';
|
|
5956
6054
|
};
|
|
5957
|
-
//#endregion
|
|
5958
|
-
//#region Type Handling
|
|
5959
6055
|
/**
|
|
5960
|
-
*
|
|
6056
|
+
* Defines whether the element is a cell in the footer of the table
|
|
5961
6057
|
*/
|
|
5962
|
-
SacGridColumnBaseCommon.prototype.
|
|
5963
|
-
return this.type === '
|
|
6058
|
+
SacGridColumnBaseCommon.prototype.IsFooter = function () {
|
|
6059
|
+
return this.type === 'footer';
|
|
5964
6060
|
};
|
|
5965
6061
|
/**
|
|
5966
|
-
*
|
|
6062
|
+
* Defines whether the element is a cell in the table header
|
|
5967
6063
|
*/
|
|
5968
|
-
SacGridColumnBaseCommon.prototype.
|
|
5969
|
-
return this.type === '
|
|
6064
|
+
SacGridColumnBaseCommon.prototype.IsHeader = function () {
|
|
6065
|
+
return this.type === 'header';
|
|
5970
6066
|
};
|
|
5971
6067
|
/**
|
|
5972
|
-
*
|
|
6068
|
+
* Defines whether this column is sorted.
|
|
5973
6069
|
*/
|
|
5974
|
-
SacGridColumnBaseCommon.prototype.
|
|
5975
|
-
return this.
|
|
6070
|
+
SacGridColumnBaseCommon.prototype.IsSortedColumn = function () {
|
|
6071
|
+
return this.grid.sortColumn === this.sortkey;
|
|
5976
6072
|
};
|
|
5977
|
-
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortUp", {
|
|
5978
|
-
//#endregion
|
|
5979
|
-
/**
|
|
5980
|
-
* sort up icon for grid header
|
|
5981
|
-
*/
|
|
5982
|
-
get: function () {
|
|
5983
|
-
return this.iconService.GridComponentSortUp;
|
|
5984
|
-
},
|
|
5985
|
-
enumerable: false,
|
|
5986
|
-
configurable: true
|
|
5987
|
-
});
|
|
5988
|
-
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortDown", {
|
|
5989
|
-
/**
|
|
5990
|
-
* sort down icon for grid header
|
|
5991
|
-
*/
|
|
5992
|
-
get: function () {
|
|
5993
|
-
return this.iconService.GridComponentSortDown;
|
|
5994
|
-
},
|
|
5995
|
-
enumerable: false,
|
|
5996
|
-
configurable: true
|
|
5997
|
-
});
|
|
5998
6073
|
/**
|
|
5999
|
-
*
|
|
6074
|
+
* Triggers the events so that the table is sorted according to this column.
|
|
6000
6075
|
*/
|
|
6001
6076
|
SacGridColumnBaseCommon.prototype.SortByColumn = function () {
|
|
6002
6077
|
if (this.sortkey !== undefined &&
|
|
@@ -6006,24 +6081,25 @@
|
|
|
6006
6081
|
}
|
|
6007
6082
|
};
|
|
6008
6083
|
/**
|
|
6009
|
-
*
|
|
6084
|
+
* Called when the component is destroyed.
|
|
6010
6085
|
*/
|
|
6011
|
-
SacGridColumnBaseCommon.prototype.
|
|
6012
|
-
|
|
6086
|
+
SacGridColumnBaseCommon.prototype.ngOnDestroy = function () {
|
|
6087
|
+
if (this.IsHeader()) {
|
|
6088
|
+
this.grid.UnregisterColumn();
|
|
6089
|
+
}
|
|
6013
6090
|
};
|
|
6014
6091
|
/**
|
|
6015
|
-
*
|
|
6092
|
+
* Is called when the component is initialized.
|
|
6016
6093
|
*/
|
|
6017
|
-
SacGridColumnBaseCommon.prototype.
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
return 'none';
|
|
6094
|
+
SacGridColumnBaseCommon.prototype.ngOnInit = function () {
|
|
6095
|
+
var rootElement = this.el.nativeElement;
|
|
6096
|
+
var parentElement = rootElement.parentElement;
|
|
6097
|
+
while (rootElement.firstChild) {
|
|
6098
|
+
parentElement.insertBefore(rootElement.firstChild, rootElement);
|
|
6099
|
+
}
|
|
6100
|
+
parentElement.removeChild(rootElement);
|
|
6101
|
+
if (this.IsHeader()) {
|
|
6102
|
+
this.grid.RegisterColumn();
|
|
6027
6103
|
}
|
|
6028
6104
|
};
|
|
6029
6105
|
return SacGridColumnBaseCommon;
|
|
@@ -6037,39 +6113,44 @@
|
|
|
6037
6113
|
{ type: i0.ElementRef }
|
|
6038
6114
|
]; };
|
|
6039
6115
|
SacGridColumnBaseCommon.propDecorators = {
|
|
6040
|
-
name: [{ type: i0.Input }],
|
|
6041
|
-
value: [{ type: i0.Input }],
|
|
6042
6116
|
header: [{ type: i0.Input }],
|
|
6043
|
-
|
|
6117
|
+
name: [{ type: i0.Input }],
|
|
6118
|
+
sortkey: [{ type: i0.Input }],
|
|
6044
6119
|
type: [{ type: i0.Input }],
|
|
6045
|
-
|
|
6120
|
+
value: [{ type: i0.Input }],
|
|
6121
|
+
width: [{ type: i0.Input }]
|
|
6046
6122
|
};
|
|
6047
6123
|
|
|
6048
6124
|
/**
|
|
6049
|
-
*
|
|
6125
|
+
* Component for SacGridColumnCommon. Extends SacGridColumnBaseCommon
|
|
6050
6126
|
*/
|
|
6051
6127
|
var SacGridColumnCommon = /** @class */ (function (_super) {
|
|
6052
6128
|
__extends(SacGridColumnCommon, _super);
|
|
6129
|
+
// #endregion Properties
|
|
6130
|
+
// #region Constructors
|
|
6053
6131
|
/**
|
|
6054
|
-
*
|
|
6132
|
+
* Constructor
|
|
6055
6133
|
*/
|
|
6056
6134
|
function SacGridColumnCommon(grid, injector, el) {
|
|
6057
6135
|
var _this = _super.call(this, grid, injector, el) || this;
|
|
6136
|
+
// #region Properties
|
|
6058
6137
|
/**
|
|
6059
|
-
*
|
|
6138
|
+
* Defines whether the CSS class ellipsis is set.
|
|
6060
6139
|
*/
|
|
6061
6140
|
_this._ellipsis = false;
|
|
6062
6141
|
return _this;
|
|
6063
6142
|
}
|
|
6064
6143
|
Object.defineProperty(SacGridColumnCommon.prototype, "ellipsis", {
|
|
6065
6144
|
/**
|
|
6066
|
-
* Getter
|
|
6145
|
+
* Getter for the ellipsis property. Always returns a boolean type.
|
|
6067
6146
|
*/
|
|
6068
6147
|
get: function () {
|
|
6069
6148
|
return this._ellipsis;
|
|
6070
6149
|
},
|
|
6150
|
+
// #endregion Constructors
|
|
6151
|
+
// #region Public Getters And Setters
|
|
6071
6152
|
/**
|
|
6072
|
-
*
|
|
6153
|
+
* Sets the ellipsis property. Can be a Boolean or the strings `true` or `false`.
|
|
6073
6154
|
*/
|
|
6074
6155
|
set: function (v) {
|
|
6075
6156
|
this._ellipsis = convertToBoolean(v);
|
|
@@ -6077,8 +6158,10 @@
|
|
|
6077
6158
|
enumerable: false,
|
|
6078
6159
|
configurable: true
|
|
6079
6160
|
});
|
|
6161
|
+
// #endregion Public Getters And Setters
|
|
6162
|
+
// #region Public Methods
|
|
6080
6163
|
/**
|
|
6081
|
-
*
|
|
6164
|
+
* Checks whether ellipsis is set
|
|
6082
6165
|
*/
|
|
6083
6166
|
SacGridColumnCommon.prototype.IsEllipsis = function () {
|
|
6084
6167
|
return this._ellipsis;
|
|
@@ -6098,13 +6181,14 @@
|
|
|
6098
6181
|
};
|
|
6099
6182
|
|
|
6100
6183
|
/**
|
|
6101
|
-
*
|
|
6184
|
+
* Component for SacGridColumnActionCommon. Extends SacGridColumnBaseCommon
|
|
6102
6185
|
*/
|
|
6103
6186
|
var SacGridColumnActionCommon = /** @class */ (function (_super) {
|
|
6104
6187
|
__extends(SacGridColumnActionCommon, _super);
|
|
6188
|
+
// #region Constructors
|
|
6105
6189
|
/**
|
|
6106
|
-
*
|
|
6107
|
-
* @param el Element
|
|
6190
|
+
* Constructor
|
|
6191
|
+
* @param el Element reference
|
|
6108
6192
|
* @param injector di inector to resolve icon service
|
|
6109
6193
|
* @param grid SacGridCommon
|
|
6110
6194
|
*/
|
|
@@ -6123,7 +6207,7 @@
|
|
|
6123
6207
|
]; };
|
|
6124
6208
|
|
|
6125
6209
|
/**
|
|
6126
|
-
*
|
|
6210
|
+
* Basic component for SacGridImage
|
|
6127
6211
|
*/
|
|
6128
6212
|
var SacGridImageCommon = /** @class */ (function () {
|
|
6129
6213
|
function SacGridImageCommon() {
|
|
@@ -6138,67 +6222,65 @@
|
|
|
6138
6222
|
};
|
|
6139
6223
|
|
|
6140
6224
|
/**
|
|
6141
|
-
*
|
|
6225
|
+
* Basic component for paging
|
|
6142
6226
|
*/
|
|
6143
6227
|
var SacPagingCommon = /** @class */ (function () {
|
|
6144
6228
|
// #endregion Properties
|
|
6145
6229
|
// #region Constructors
|
|
6146
6230
|
/**
|
|
6147
|
-
*
|
|
6148
|
-
* Inject des Formulars
|
|
6231
|
+
* Constructor
|
|
6149
6232
|
* @parent SacFormCommon
|
|
6150
6233
|
* @injector Injector
|
|
6151
6234
|
*/
|
|
6152
6235
|
function SacPagingCommon(injector) {
|
|
6153
6236
|
/**
|
|
6154
|
-
* Total
|
|
6237
|
+
* Total number of rows
|
|
6155
6238
|
*/
|
|
6156
6239
|
this.totalRowCount = 0;
|
|
6157
6240
|
/**
|
|
6158
|
-
*
|
|
6241
|
+
* Deactivate page size selection
|
|
6159
6242
|
*/
|
|
6160
6243
|
this.pagesizedisabled = false;
|
|
6161
6244
|
/**
|
|
6162
|
-
* Text in Page
|
|
6163
|
-
*
|
|
6164
|
-
* {{PAGESIZE}}:
|
|
6245
|
+
* Text in Page for number of page elements per page. The following interpolation texts are available:
|
|
6246
|
+
*
|
|
6247
|
+
* {{PAGESIZE}}: Number of elements per page
|
|
6165
6248
|
*/
|
|
6166
6249
|
this.pagesizes = '20|50|100';
|
|
6167
6250
|
/**
|
|
6168
|
-
* Text in Page
|
|
6169
|
-
*
|
|
6170
|
-
* {{PAGESIZE}}:
|
|
6251
|
+
* Text in Page for number of page elements per page. The following interpolation texts are available:
|
|
6252
|
+
*
|
|
6253
|
+
* {{PAGESIZE}}: Number of elements per page
|
|
6171
6254
|
*/
|
|
6172
6255
|
this.pagesizetext = '';
|
|
6173
6256
|
/**
|
|
6174
|
-
* Text in
|
|
6175
|
-
*
|
|
6176
|
-
* {{
|
|
6177
|
-
* {{TOTALPAGES}}: Anzahl Seiten
|
|
6257
|
+
* Text in pager for 'Page x of y'. The following interpolation texts are available:
|
|
6258
|
+
* {{CURRENTPAGE}}: Current page
|
|
6259
|
+
* {{TOTALPAGES}}: Number of pages
|
|
6178
6260
|
*/
|
|
6179
6261
|
this.pagingtext = '';
|
|
6180
6262
|
/**
|
|
6181
|
-
* Event
|
|
6263
|
+
* Event when the page is changed in the grid. The new PageIndex is given as a parameter.
|
|
6182
6264
|
*/
|
|
6183
6265
|
this.paging = new i0.EventEmitter();
|
|
6184
6266
|
/**
|
|
6185
|
-
*
|
|
6267
|
+
* Active page index
|
|
6186
6268
|
*/
|
|
6187
6269
|
this.activePageIndex = 0;
|
|
6188
6270
|
/**
|
|
6189
|
-
*
|
|
6271
|
+
* First page index
|
|
6190
6272
|
*/
|
|
6191
6273
|
this.firstPageIndex = 0;
|
|
6192
6274
|
/**
|
|
6193
|
-
*
|
|
6275
|
+
* Last page index
|
|
6194
6276
|
*/
|
|
6195
6277
|
this.lastPageIndex = 0;
|
|
6196
6278
|
/**
|
|
6197
|
-
*
|
|
6279
|
+
* Number of elements per page
|
|
6198
6280
|
*/
|
|
6199
6281
|
this.pageSize = 20;
|
|
6200
6282
|
/**
|
|
6201
|
-
* Item
|
|
6283
|
+
* Item for each paging element (page number)
|
|
6202
6284
|
*/
|
|
6203
6285
|
this.paginators = [];
|
|
6204
6286
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
@@ -6211,7 +6293,7 @@
|
|
|
6211
6293
|
// #endregion Constructors
|
|
6212
6294
|
// #region Public Getters And Setters
|
|
6213
6295
|
/**
|
|
6214
|
-
* Property
|
|
6296
|
+
* Property for Pager Data
|
|
6215
6297
|
*/
|
|
6216
6298
|
set: function (p) {
|
|
6217
6299
|
if (p != null) {
|
|
@@ -6226,7 +6308,7 @@
|
|
|
6226
6308
|
});
|
|
6227
6309
|
Object.defineProperty(SacPagingCommon.prototype, "PageSizeText", {
|
|
6228
6310
|
/**
|
|
6229
|
-
* Property
|
|
6311
|
+
* Property with text for total entries in page
|
|
6230
6312
|
*/
|
|
6231
6313
|
get: function () {
|
|
6232
6314
|
return this.lngResourceService.GetString(this.pagesizetext);
|
|
@@ -6236,7 +6318,7 @@
|
|
|
6236
6318
|
});
|
|
6237
6319
|
Object.defineProperty(SacPagingCommon.prototype, "PagingText", {
|
|
6238
6320
|
/**
|
|
6239
|
-
* Text
|
|
6321
|
+
* Text with current page and total pages
|
|
6240
6322
|
*/
|
|
6241
6323
|
get: function () {
|
|
6242
6324
|
return this.lngResourceService.GetString(this.pagingtext, {
|
|
@@ -6249,7 +6331,7 @@
|
|
|
6249
6331
|
});
|
|
6250
6332
|
Object.defineProperty(SacPagingCommon.prototype, "getPageSizes", {
|
|
6251
6333
|
/**
|
|
6252
|
-
*
|
|
6334
|
+
* Returns the page sizes as a number array
|
|
6253
6335
|
*/
|
|
6254
6336
|
get: function () {
|
|
6255
6337
|
return this.pagesizes.split('|').map(function (itm) { return Number(itm); });
|
|
@@ -6260,8 +6342,8 @@
|
|
|
6260
6342
|
// #endregion Public Getters And Setters
|
|
6261
6343
|
// #region Public Methods
|
|
6262
6344
|
/**
|
|
6263
|
-
*
|
|
6264
|
-
* @param newPageIndex
|
|
6345
|
+
* Changes the page to the new index
|
|
6346
|
+
* @param newPageIndex Page index. This corresponds to the page number - 1.
|
|
6265
6347
|
*/
|
|
6266
6348
|
SacPagingCommon.prototype.changePage = function (newPageIndex) {
|
|
6267
6349
|
if (this.activePageIndex !== newPageIndex) {
|
|
@@ -6269,15 +6351,15 @@
|
|
|
6269
6351
|
}
|
|
6270
6352
|
};
|
|
6271
6353
|
/**
|
|
6272
|
-
*
|
|
6273
|
-
* @param newSize
|
|
6354
|
+
* Changes the page size in the pager
|
|
6355
|
+
* @param newSize New number of elements per page
|
|
6274
6356
|
*/
|
|
6275
6357
|
SacPagingCommon.prototype.changePageSize = function (newSize) {
|
|
6276
6358
|
var pagerData = new PagerRequest(newSize, this.activePageIndex);
|
|
6277
6359
|
this.paging.emit(pagerData);
|
|
6278
6360
|
};
|
|
6279
6361
|
/**
|
|
6280
|
-
*
|
|
6362
|
+
*Switch to 1st page
|
|
6281
6363
|
*/
|
|
6282
6364
|
SacPagingCommon.prototype.firstPage = function () {
|
|
6283
6365
|
if (this.activePageIndex !== this.firstPageIndex) {
|
|
@@ -6285,19 +6367,19 @@
|
|
|
6285
6367
|
}
|
|
6286
6368
|
};
|
|
6287
6369
|
/**
|
|
6288
|
-
*
|
|
6370
|
+
* Returns the current page number
|
|
6289
6371
|
*/
|
|
6290
6372
|
SacPagingCommon.prototype.getCurrentPageNumber = function () {
|
|
6291
6373
|
return this.activePageIndex + 1;
|
|
6292
6374
|
};
|
|
6293
6375
|
/**
|
|
6294
|
-
*
|
|
6376
|
+
* Returns the total number of pages
|
|
6295
6377
|
*/
|
|
6296
6378
|
SacPagingCommon.prototype.getTotalPageNumber = function () {
|
|
6297
6379
|
return this.lastPageIndex + 1;
|
|
6298
6380
|
};
|
|
6299
6381
|
/**
|
|
6300
|
-
* Paging
|
|
6382
|
+
* Paging on last page
|
|
6301
6383
|
*/
|
|
6302
6384
|
SacPagingCommon.prototype.lastPage = function () {
|
|
6303
6385
|
if (this.activePageIndex !== this.lastPageIndex) {
|
|
@@ -6305,7 +6387,7 @@
|
|
|
6305
6387
|
}
|
|
6306
6388
|
};
|
|
6307
6389
|
/**
|
|
6308
|
-
* Paging
|
|
6390
|
+
* Paging to next page
|
|
6309
6391
|
*/
|
|
6310
6392
|
SacPagingCommon.prototype.nextPage = function () {
|
|
6311
6393
|
if (this.activePageIndex !== this.lastPageIndex) {
|
|
@@ -6313,7 +6395,7 @@
|
|
|
6313
6395
|
}
|
|
6314
6396
|
};
|
|
6315
6397
|
/**
|
|
6316
|
-
* Paging
|
|
6398
|
+
* Paging one page back
|
|
6317
6399
|
*/
|
|
6318
6400
|
SacPagingCommon.prototype.previousPage = function () {
|
|
6319
6401
|
if (this.activePageIndex !== this.firstPageIndex) {
|
|
@@ -6323,7 +6405,7 @@
|
|
|
6323
6405
|
// #endregion Public Methods
|
|
6324
6406
|
// #region Protected Methods
|
|
6325
6407
|
/**
|
|
6326
|
-
*
|
|
6408
|
+
* Generates the pager data
|
|
6327
6409
|
*/
|
|
6328
6410
|
SacPagingCommon.prototype.createPager = function () {
|
|
6329
6411
|
this.paginators = [];
|
|
@@ -6350,8 +6432,8 @@
|
|
|
6350
6432
|
}
|
|
6351
6433
|
};
|
|
6352
6434
|
/**
|
|
6353
|
-
*
|
|
6354
|
-
* @param totalPageCount Total
|
|
6435
|
+
* Returns the last page index.
|
|
6436
|
+
* @param totalPageCount Total number of pages
|
|
6355
6437
|
*/
|
|
6356
6438
|
SacPagingCommon.prototype.getEndPageIndex = function (totalPageCount) {
|
|
6357
6439
|
var endingPageToDisplay = this.activePageIndex + 2;
|
|
@@ -6365,8 +6447,8 @@
|
|
|
6365
6447
|
return endingPageToDisplay;
|
|
6366
6448
|
};
|
|
6367
6449
|
/**
|
|
6368
|
-
*
|
|
6369
|
-
* @param totalPageCount Total
|
|
6450
|
+
* Returns the start index
|
|
6451
|
+
* @param totalPageCount Total number of pages
|
|
6370
6452
|
*/
|
|
6371
6453
|
SacPagingCommon.prototype.getStartPageIndex = function (totalPageCount) {
|
|
6372
6454
|
var startingPageToDisplay = 0;
|
|
@@ -6380,7 +6462,7 @@
|
|
|
6380
6462
|
return startingPageToDisplay;
|
|
6381
6463
|
};
|
|
6382
6464
|
/**
|
|
6383
|
-
*
|
|
6465
|
+
* method triggers the event that paging has taken place
|
|
6384
6466
|
*/
|
|
6385
6467
|
SacPagingCommon.prototype.paged = function (newPageIndex) {
|
|
6386
6468
|
var pagerData = new PagerRequest(this.pageSize, newPageIndex);
|
|
@@ -6590,6 +6672,7 @@
|
|
|
6590
6672
|
function SacDateCommon(formlayout, injector, elementRef) {
|
|
6591
6673
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
6592
6674
|
_this.elementRef = elementRef;
|
|
6675
|
+
// #region Properties
|
|
6593
6676
|
/**
|
|
6594
6677
|
* Format des Datums
|
|
6595
6678
|
*/
|
|
@@ -6651,7 +6734,6 @@
|
|
|
6651
6734
|
* Definiert ob der Date Selector angezeigt wird
|
|
6652
6735
|
*/
|
|
6653
6736
|
_this._showselector = false;
|
|
6654
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
6655
6737
|
return _this;
|
|
6656
6738
|
}
|
|
6657
6739
|
Object.defineProperty(SacDateCommon.prototype, "maxdate", {
|
|
@@ -7279,6 +7361,7 @@
|
|
|
7279
7361
|
function SacDateTimeCommon(formlayout, injector, elementRef) {
|
|
7280
7362
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
7281
7363
|
_this.elementRef = elementRef;
|
|
7364
|
+
// #region Properties
|
|
7282
7365
|
/**
|
|
7283
7366
|
* Format des Datums
|
|
7284
7367
|
*/
|
|
@@ -7355,7 +7438,6 @@
|
|
|
7355
7438
|
* Definiert ob der Date Selector angezeigt wird
|
|
7356
7439
|
*/
|
|
7357
7440
|
_this._showselector = false;
|
|
7358
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
7359
7441
|
return _this;
|
|
7360
7442
|
}
|
|
7361
7443
|
Object.defineProperty(SacDateTimeCommon.prototype, "maxdate", {
|
|
@@ -7516,6 +7598,7 @@
|
|
|
7516
7598
|
function SacTimeCommon(formlayout, injector, elementRef) {
|
|
7517
7599
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
7518
7600
|
_this.elementRef = elementRef;
|
|
7601
|
+
// #region Properties
|
|
7519
7602
|
/**
|
|
7520
7603
|
* Format des Datums
|
|
7521
7604
|
*/
|
|
@@ -7572,7 +7655,6 @@
|
|
|
7572
7655
|
* Definiert ob der Date Selector angezeigt wird
|
|
7573
7656
|
*/
|
|
7574
7657
|
_this._showselector = false;
|
|
7575
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
7576
7658
|
return _this;
|
|
7577
7659
|
}
|
|
7578
7660
|
Object.defineProperty(SacTimeCommon.prototype, "maxtime", {
|
|
@@ -7727,11 +7809,8 @@
|
|
|
7727
7809
|
* Definiert den Container als Required Form Item
|
|
7728
7810
|
*/
|
|
7729
7811
|
_this._isrequired = false;
|
|
7730
|
-
/**
|
|
7731
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
7732
|
-
*/
|
|
7733
|
-
_this.tooltiptext = '';
|
|
7734
7812
|
return _this;
|
|
7813
|
+
// #endregion Public Methods
|
|
7735
7814
|
}
|
|
7736
7815
|
Object.defineProperty(SacStaticFormContainerCommon.prototype, "isrequired", {
|
|
7737
7816
|
/**
|
|
@@ -7740,6 +7819,8 @@
|
|
|
7740
7819
|
get: function () {
|
|
7741
7820
|
return this._isrequired;
|
|
7742
7821
|
},
|
|
7822
|
+
// #endregion Properties
|
|
7823
|
+
// #region Public Getters And Setters
|
|
7743
7824
|
/**
|
|
7744
7825
|
* Definiert den Container als Required Form Item
|
|
7745
7826
|
*/
|
|
@@ -7749,6 +7830,8 @@
|
|
|
7749
7830
|
enumerable: false,
|
|
7750
7831
|
configurable: true
|
|
7751
7832
|
});
|
|
7833
|
+
// #endregion Public Getters And Setters
|
|
7834
|
+
// #region Public Methods
|
|
7752
7835
|
/**
|
|
7753
7836
|
* Validierung des Controls
|
|
7754
7837
|
*
|
|
@@ -7766,7 +7849,6 @@
|
|
|
7766
7849
|
{ type: i0.Directive }
|
|
7767
7850
|
];
|
|
7768
7851
|
SacStaticFormContainerCommon.propDecorators = {
|
|
7769
|
-
tooltiptext: [{ type: i0.Input }],
|
|
7770
7852
|
isrequired: [{ type: i0.Input }]
|
|
7771
7853
|
};
|
|
7772
7854
|
|
|
@@ -8679,15 +8761,17 @@
|
|
|
8679
8761
|
/**
|
|
8680
8762
|
* Tooltip Component
|
|
8681
8763
|
*
|
|
8682
|
-
*
|
|
8683
|
-
* - container: Container
|
|
8684
|
-
* - tooltip: Container
|
|
8764
|
+
* Requires the following identifiers in the HTML markup
|
|
8765
|
+
* - container: Container for ng-content in which the element is displayed where the tooltip is attached.
|
|
8766
|
+
* - tooltip: Container for tooltip
|
|
8685
8767
|
*
|
|
8686
|
-
* Tooltip
|
|
8687
|
-
*
|
|
8768
|
+
* Tooltip must be displayed in 2 steps. In a first step the tooltip markup is created with (ngIf). In a 2nd step
|
|
8769
|
+
* the tooltip can then be displayed via the CSS visibility. If this is not done, it can lead to a flickering effect in certain browsers.
|
|
8688
8770
|
*
|
|
8689
8771
|
*/
|
|
8690
8772
|
var SacTooltipCommon = /** @class */ (function () {
|
|
8773
|
+
// #endregion Properties
|
|
8774
|
+
// #region Constructors
|
|
8691
8775
|
/**
|
|
8692
8776
|
* Konstruktor
|
|
8693
8777
|
* @param ref Element Referenz
|
|
@@ -8697,50 +8781,56 @@
|
|
|
8697
8781
|
this.cdRef = cdRef;
|
|
8698
8782
|
this.ref = ref;
|
|
8699
8783
|
/**
|
|
8700
|
-
*
|
|
8701
|
-
*/
|
|
8702
|
-
this.TooltipPosition = exports.TooltipPosition;
|
|
8703
|
-
/**
|
|
8704
|
-
* Definiert ob der Tooltip sichtbar ist
|
|
8784
|
+
* Defines whether the tooltip is visible
|
|
8705
8785
|
*/
|
|
8706
8786
|
this._isTooltipVisible = false;
|
|
8707
8787
|
/**
|
|
8708
|
-
*
|
|
8709
|
-
*/
|
|
8710
|
-
this.TopPos = 0;
|
|
8711
|
-
/**
|
|
8712
|
-
* Position des Tooltips links
|
|
8788
|
+
* method if content has changed and proportions need to be reset in the UI.
|
|
8713
8789
|
*/
|
|
8714
|
-
this.
|
|
8790
|
+
this.onContentChange = function () {
|
|
8791
|
+
// Do nothing if is not visible
|
|
8792
|
+
if (!_this._isTooltipVisible) {
|
|
8793
|
+
return;
|
|
8794
|
+
}
|
|
8795
|
+
setTimeout(function () {
|
|
8796
|
+
_this.getLeftPosition();
|
|
8797
|
+
_this.getTopPosition();
|
|
8798
|
+
});
|
|
8799
|
+
};
|
|
8715
8800
|
/**
|
|
8716
|
-
* Position
|
|
8801
|
+
* Position of the tooltip. Values: left|top|right|bottom|auto
|
|
8717
8802
|
*
|
|
8718
|
-
*
|
|
8803
|
+
* Value 'auto' can be combined with another value.
|
|
8719
8804
|
*/
|
|
8720
8805
|
this.position = 'right|auto';
|
|
8721
8806
|
/**
|
|
8722
|
-
*
|
|
8807
|
+
* Position of the tooltip on the left
|
|
8723
8808
|
*/
|
|
8724
8809
|
this.IsTooltipContentVisible = false;
|
|
8725
8810
|
/**
|
|
8726
|
-
*
|
|
8811
|
+
* Position des Tooltips links
|
|
8727
8812
|
*/
|
|
8728
|
-
this.
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8813
|
+
this.LeftPos = 0;
|
|
8814
|
+
/**
|
|
8815
|
+
* Property for enum in Angular HTML template
|
|
8816
|
+
*/
|
|
8817
|
+
this.TooltipPosition = exports.TooltipPosition;
|
|
8818
|
+
/**
|
|
8819
|
+
* Position of the tooltip at the top
|
|
8820
|
+
*/
|
|
8821
|
+
this.TopPos = 0;
|
|
8734
8822
|
}
|
|
8735
8823
|
Object.defineProperty(SacTooltipCommon.prototype, "inlinemode", {
|
|
8736
8824
|
/**
|
|
8737
|
-
*
|
|
8825
|
+
* Property for inline mode for tooltip. Sets the display mode on the wrapper element to `inline`
|
|
8738
8826
|
*/
|
|
8739
8827
|
get: function () {
|
|
8740
8828
|
return this._inlinemode;
|
|
8741
8829
|
},
|
|
8830
|
+
// #endregion Constructors
|
|
8831
|
+
// #region Public Getters And Setters
|
|
8742
8832
|
/**
|
|
8743
|
-
* Setter
|
|
8833
|
+
* Setter for inline mode for tooltip
|
|
8744
8834
|
*/
|
|
8745
8835
|
set: function (value) {
|
|
8746
8836
|
this._inlinemode = convertToBoolean(value);
|
|
@@ -8750,7 +8840,7 @@
|
|
|
8750
8840
|
});
|
|
8751
8841
|
Object.defineProperty(SacTooltipCommon.prototype, "tooltip", {
|
|
8752
8842
|
/**
|
|
8753
|
-
* Setter
|
|
8843
|
+
* Setter for the name of the container for the tooltip. Is required as the tooltip can be hidden via ngIf.
|
|
8754
8844
|
*/
|
|
8755
8845
|
set: function (content) {
|
|
8756
8846
|
if (content !== undefined) {
|
|
@@ -8763,128 +8853,84 @@
|
|
|
8763
8853
|
enumerable: false,
|
|
8764
8854
|
configurable: true
|
|
8765
8855
|
});
|
|
8856
|
+
Object.defineProperty(SacTooltipCommon.prototype, "tooltop", {
|
|
8857
|
+
get: function () {
|
|
8858
|
+
return this.tooltipcontainer;
|
|
8859
|
+
},
|
|
8860
|
+
enumerable: false,
|
|
8861
|
+
configurable: true
|
|
8862
|
+
});
|
|
8863
|
+
// #endregion Public Getters And Setters
|
|
8864
|
+
// #region Public Methods
|
|
8766
8865
|
/**
|
|
8767
|
-
*
|
|
8866
|
+
* Returns the position of the tooltip
|
|
8768
8867
|
*/
|
|
8769
|
-
SacTooltipCommon.prototype.
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8868
|
+
SacTooltipCommon.prototype.GetTooltipPosition = function () {
|
|
8869
|
+
var validPositions = this.ValidatePositions();
|
|
8870
|
+
// tslint:disable-next-line:no-bitwise
|
|
8871
|
+
if (this.HasPosition(exports.TooltipPosition.right) &&
|
|
8872
|
+
validPositions & exports.TooltipPosition.right) {
|
|
8873
|
+
return exports.TooltipPosition.right;
|
|
8775
8874
|
}
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
SacTooltipCommon.prototype.ngOnDestroy = function () {
|
|
8781
|
-
// Unregister Event Listener
|
|
8782
|
-
window.removeEventListener('scroll', this.onContentChange, true);
|
|
8783
|
-
window.removeEventListener('resize', this.onContentChange, true);
|
|
8784
|
-
if (this.tooltipcontainer !== undefined) {
|
|
8785
|
-
document.body.removeChild(this.tooltipcontainer.nativeElement);
|
|
8875
|
+
// tslint:disable-next-line:no-bitwise
|
|
8876
|
+
if (this.HasPosition(exports.TooltipPosition.top) &&
|
|
8877
|
+
validPositions & exports.TooltipPosition.top) {
|
|
8878
|
+
return exports.TooltipPosition.top;
|
|
8786
8879
|
}
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
SacTooltipCommon.prototype.getTopPosition = function () {
|
|
8792
|
-
if (this.content !== null && this.content !== undefined) {
|
|
8793
|
-
var item = this.content.nativeElement;
|
|
8794
|
-
if (item.children.length >= 1) {
|
|
8795
|
-
var childItem = item.firstElementChild;
|
|
8796
|
-
var contentPosition = childItem.getBoundingClientRect();
|
|
8797
|
-
switch (this.GetTooltipPosition()) {
|
|
8798
|
-
case exports.TooltipPosition.top:
|
|
8799
|
-
this.TopPos = contentPosition.top - this.getToolTipHeight();
|
|
8800
|
-
return contentPosition.top - this.getToolTipHeight();
|
|
8801
|
-
case exports.TooltipPosition.right:
|
|
8802
|
-
this.TopPos = contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8803
|
-
return contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8804
|
-
case exports.TooltipPosition.bottom:
|
|
8805
|
-
this.TopPos = contentPosition.top + contentPosition.height;
|
|
8806
|
-
return contentPosition.top + contentPosition.height;
|
|
8807
|
-
case exports.TooltipPosition.left:
|
|
8808
|
-
this.TopPos = contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8809
|
-
return contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8810
|
-
}
|
|
8811
|
-
return childItem.clientTop + childItem.offsetTop - ((this.getToolTipHeight() / 2) - (childItem.clientHeight / 2));
|
|
8812
|
-
}
|
|
8813
|
-
else {
|
|
8814
|
-
return this.content.nativeElement.offsetTop;
|
|
8815
|
-
}
|
|
8880
|
+
// tslint:disable-next-line:no-bitwise
|
|
8881
|
+
if (this.HasPosition(exports.TooltipPosition.left) &&
|
|
8882
|
+
validPositions & exports.TooltipPosition.left) {
|
|
8883
|
+
return exports.TooltipPosition.left;
|
|
8816
8884
|
}
|
|
8817
|
-
|
|
8818
|
-
|
|
8885
|
+
// tslint:disable-next-line:no-bitwise
|
|
8886
|
+
if (this.HasPosition(exports.TooltipPosition.bottom) &&
|
|
8887
|
+
validPositions & exports.TooltipPosition.bottom) {
|
|
8888
|
+
return exports.TooltipPosition.bottom;
|
|
8819
8889
|
}
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
if (this.content !== null && this.content !== undefined) {
|
|
8826
|
-
var item = this.content.nativeElement;
|
|
8827
|
-
if (item.children.length >= 1) {
|
|
8828
|
-
var childItem = item.firstElementChild;
|
|
8829
|
-
var contentPosition = childItem.getBoundingClientRect();
|
|
8830
|
-
switch (this.GetTooltipPosition()) {
|
|
8831
|
-
case exports.TooltipPosition.top:
|
|
8832
|
-
this.LeftPos = contentPosition.left + (contentPosition.width / 2) - (this.getToolTipWidth() / 2);
|
|
8833
|
-
return contentPosition.left + (contentPosition.width / 2) - (this.getToolTipWidth() / 2);
|
|
8834
|
-
case exports.TooltipPosition.right:
|
|
8835
|
-
this.LeftPos = contentPosition.left + contentPosition.width;
|
|
8836
|
-
return contentPosition.left + contentPosition.width;
|
|
8837
|
-
case exports.TooltipPosition.bottom:
|
|
8838
|
-
this.LeftPos = contentPosition.left + (childItem.clientWidth / 2) - (this.getToolTipWidth() / 2);
|
|
8839
|
-
return contentPosition.left + (childItem.clientWidth / 2) - (this.getToolTipWidth() / 2);
|
|
8840
|
-
case exports.TooltipPosition.left:
|
|
8841
|
-
this.LeftPos = contentPosition.left - this.getToolTipWidth();
|
|
8842
|
-
return contentPosition.left - this.getToolTipWidth();
|
|
8843
|
-
}
|
|
8844
|
-
return this.content.nativeElement.offsetTop;
|
|
8890
|
+
// Get Auto Position or Default
|
|
8891
|
+
if (this.IsAutoPosition()) {
|
|
8892
|
+
// tslint:disable-next-line:no-bitwise
|
|
8893
|
+
if (validPositions & exports.TooltipPosition.right) {
|
|
8894
|
+
return exports.TooltipPosition.right;
|
|
8845
8895
|
}
|
|
8846
|
-
|
|
8847
|
-
|
|
8896
|
+
// tslint:disable-next-line:no-bitwise
|
|
8897
|
+
if (validPositions & exports.TooltipPosition.top) {
|
|
8898
|
+
return exports.TooltipPosition.top;
|
|
8848
8899
|
}
|
|
8900
|
+
// tslint:disable-next-line:no-bitwise
|
|
8901
|
+
if (validPositions & exports.TooltipPosition.left) {
|
|
8902
|
+
return exports.TooltipPosition.left;
|
|
8903
|
+
}
|
|
8904
|
+
// tslint:disable-next-line:no-bitwise
|
|
8905
|
+
if (validPositions & exports.TooltipPosition.bottom) {
|
|
8906
|
+
return exports.TooltipPosition.bottom;
|
|
8907
|
+
}
|
|
8908
|
+
return exports.TooltipPosition.right;
|
|
8849
8909
|
}
|
|
8850
8910
|
else {
|
|
8851
|
-
return this.
|
|
8852
|
-
}
|
|
8853
|
-
};
|
|
8854
|
-
/**
|
|
8855
|
-
* Berechnet die Höhe des Tooltips
|
|
8856
|
-
*/
|
|
8857
|
-
SacTooltipCommon.prototype.getToolTipHeight = function () {
|
|
8858
|
-
if (this.tooltipcontainer) {
|
|
8859
|
-
return this.tooltipcontainer.nativeElement.clientHeight;
|
|
8860
|
-
}
|
|
8861
|
-
else {
|
|
8862
|
-
return 0;
|
|
8911
|
+
return this.GetPosition();
|
|
8863
8912
|
}
|
|
8864
8913
|
};
|
|
8865
8914
|
/**
|
|
8866
|
-
*
|
|
8915
|
+
* Hide tooltip
|
|
8867
8916
|
*/
|
|
8868
|
-
SacTooltipCommon.prototype.
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
}
|
|
8872
|
-
else {
|
|
8873
|
-
return 0;
|
|
8874
|
-
}
|
|
8917
|
+
SacTooltipCommon.prototype.HideTooltip = function () {
|
|
8918
|
+
this._isTooltipVisible = false;
|
|
8919
|
+
this.IsTooltipContentVisible = false;
|
|
8875
8920
|
};
|
|
8876
8921
|
/**
|
|
8877
|
-
*
|
|
8922
|
+
* Defines whether the tooltip is present in the markup
|
|
8878
8923
|
*/
|
|
8879
8924
|
SacTooltipCommon.prototype.IsTooltipVisible = function () {
|
|
8880
8925
|
return this._isTooltipVisible;
|
|
8881
8926
|
};
|
|
8882
8927
|
/**
|
|
8883
|
-
*
|
|
8928
|
+
* Show tooltip
|
|
8884
8929
|
*/
|
|
8885
8930
|
SacTooltipCommon.prototype.ShowTooltip = function () {
|
|
8886
8931
|
var _this = this;
|
|
8887
8932
|
this._isTooltipVisible = true;
|
|
8933
|
+
this.cdRef.detectChanges();
|
|
8888
8934
|
setTimeout(function () {
|
|
8889
8935
|
_this.getLeftPosition();
|
|
8890
8936
|
_this.getTopPosition();
|
|
@@ -8892,66 +8938,75 @@
|
|
|
8892
8938
|
});
|
|
8893
8939
|
};
|
|
8894
8940
|
/**
|
|
8895
|
-
*
|
|
8941
|
+
* Calculates the height of the tooltip
|
|
8896
8942
|
*/
|
|
8897
|
-
SacTooltipCommon.prototype.
|
|
8898
|
-
|
|
8899
|
-
this.
|
|
8943
|
+
SacTooltipCommon.prototype.getToolTipHeight = function () {
|
|
8944
|
+
var _a;
|
|
8945
|
+
if (this.tooltipcontainer) {
|
|
8946
|
+
return (_a = this.tooltipcontainer.nativeElement.firstElementChild.clientHeight) !== null && _a !== void 0 ? _a : 0;
|
|
8947
|
+
}
|
|
8948
|
+
else {
|
|
8949
|
+
return 0;
|
|
8950
|
+
}
|
|
8900
8951
|
};
|
|
8901
8952
|
/**
|
|
8902
|
-
*
|
|
8953
|
+
* Calculates the width of the tooltips
|
|
8903
8954
|
*/
|
|
8904
|
-
SacTooltipCommon.prototype.
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
if (this.HasPosition(exports.TooltipPosition.right) && (validPositions & exports.TooltipPosition.right)) {
|
|
8908
|
-
return exports.TooltipPosition.right;
|
|
8909
|
-
}
|
|
8910
|
-
// tslint:disable-next-line:no-bitwise
|
|
8911
|
-
if (this.HasPosition(exports.TooltipPosition.top) && (validPositions & exports.TooltipPosition.top)) {
|
|
8912
|
-
return exports.TooltipPosition.top;
|
|
8955
|
+
SacTooltipCommon.prototype.getToolTipWidth = function () {
|
|
8956
|
+
if (this.tooltipcontainer) {
|
|
8957
|
+
return this.tooltipcontainer.nativeElement.firstElementChild.clientWidth;
|
|
8913
8958
|
}
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
return exports.TooltipPosition.left;
|
|
8959
|
+
else {
|
|
8960
|
+
return 0;
|
|
8917
8961
|
}
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8962
|
+
};
|
|
8963
|
+
/**
|
|
8964
|
+
* Detect Changes after view checked. Prevent ExpressionChangedAfterItHasBeenCheckedError error
|
|
8965
|
+
*/
|
|
8966
|
+
SacTooltipCommon.prototype.ngAfterViewChecked = function () {
|
|
8967
|
+
// Do nothing if is not visibile
|
|
8968
|
+
if (!this._isTooltipVisible) {
|
|
8969
|
+
return;
|
|
8921
8970
|
}
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
}
|
|
8932
|
-
// tslint:disable-next-line:no-bitwise
|
|
8933
|
-
if (validPositions & exports.TooltipPosition.left) {
|
|
8934
|
-
return exports.TooltipPosition.left;
|
|
8935
|
-
}
|
|
8936
|
-
// tslint:disable-next-line:no-bitwise
|
|
8937
|
-
if (validPositions & exports.TooltipPosition.bottom) {
|
|
8938
|
-
return exports.TooltipPosition.bottom;
|
|
8939
|
-
}
|
|
8940
|
-
return exports.TooltipPosition.right;
|
|
8971
|
+
this.cdRef.detectChanges();
|
|
8972
|
+
};
|
|
8973
|
+
/**
|
|
8974
|
+
* Detect UI Changes to Calculate Tooltip correct
|
|
8975
|
+
*/
|
|
8976
|
+
SacTooltipCommon.prototype.ngDoCheck = function () {
|
|
8977
|
+
// Do nothing if is not visibile
|
|
8978
|
+
if (!this._isTooltipVisible) {
|
|
8979
|
+
return;
|
|
8941
8980
|
}
|
|
8942
|
-
|
|
8943
|
-
|
|
8981
|
+
this.getLeftPosition();
|
|
8982
|
+
this.getTopPosition();
|
|
8983
|
+
};
|
|
8984
|
+
/**
|
|
8985
|
+
* Event when the control is destroyed.
|
|
8986
|
+
*/
|
|
8987
|
+
SacTooltipCommon.prototype.ngOnDestroy = function () {
|
|
8988
|
+
// Unregister Event Listener
|
|
8989
|
+
window.removeEventListener('scroll', this.onContentChange, true);
|
|
8990
|
+
window.removeEventListener('resize', this.onContentChange, true);
|
|
8991
|
+
if (this.tooltipcontainer !== undefined) {
|
|
8992
|
+
document.body.removeChild(this.tooltipcontainer.nativeElement);
|
|
8944
8993
|
}
|
|
8945
8994
|
};
|
|
8946
8995
|
/**
|
|
8947
|
-
*
|
|
8996
|
+
* Event when the control is initialized
|
|
8948
8997
|
*/
|
|
8949
|
-
SacTooltipCommon.prototype.
|
|
8950
|
-
|
|
8951
|
-
|
|
8998
|
+
SacTooltipCommon.prototype.ngOnInit = function () {
|
|
8999
|
+
// Register Event Listener
|
|
9000
|
+
window.addEventListener('scroll', this.onContentChange, true);
|
|
9001
|
+
window.addEventListener('resize', this.onContentChange, true);
|
|
9002
|
+
if (this.tooltipcontainer !== undefined) {
|
|
9003
|
+
document.body.appendChild(this.tooltipcontainer.nativeElement);
|
|
9004
|
+
}
|
|
8952
9005
|
};
|
|
9006
|
+
// #endregion Protected Abstract Methods
|
|
9007
|
+
// #region Private Methods
|
|
8953
9008
|
/**
|
|
8954
|
-
*
|
|
9009
|
+
* Returns the defined position for the tooltip
|
|
8955
9010
|
*/
|
|
8956
9011
|
SacTooltipCommon.prototype.GetPosition = function () {
|
|
8957
9012
|
var positions = this.position.split('|');
|
|
@@ -8971,9 +9026,9 @@
|
|
|
8971
9026
|
return exports.TooltipPosition.right;
|
|
8972
9027
|
};
|
|
8973
9028
|
/**
|
|
8974
|
-
*
|
|
9029
|
+
* Returns whether the position has been configured
|
|
8975
9030
|
*
|
|
8976
|
-
* @param position Position
|
|
9031
|
+
* @param position Position to be checked
|
|
8977
9032
|
*/
|
|
8978
9033
|
SacTooltipCommon.prototype.HasPosition = function (position) {
|
|
8979
9034
|
var positions = this.position.split('|');
|
|
@@ -8986,13 +9041,21 @@
|
|
|
8986
9041
|
if (position === exports.TooltipPosition.left && positions.indexOf('left') >= 0) {
|
|
8987
9042
|
return true;
|
|
8988
9043
|
}
|
|
8989
|
-
if (position === exports.TooltipPosition.bottom &&
|
|
9044
|
+
if (position === exports.TooltipPosition.bottom &&
|
|
9045
|
+
positions.indexOf('bottom') >= 0) {
|
|
8990
9046
|
return true;
|
|
8991
9047
|
}
|
|
8992
9048
|
return false;
|
|
8993
9049
|
};
|
|
8994
9050
|
/**
|
|
8995
|
-
*
|
|
9051
|
+
* Defines whether AutoPosition is active
|
|
9052
|
+
*/
|
|
9053
|
+
SacTooltipCommon.prototype.IsAutoPosition = function () {
|
|
9054
|
+
var positions = this.position.split('|');
|
|
9055
|
+
return positions.indexOf('auto') >= 0;
|
|
9056
|
+
};
|
|
9057
|
+
/**
|
|
9058
|
+
* Checks whether the position is valid or whether the tooltip on the position has space
|
|
8996
9059
|
*/
|
|
8997
9060
|
SacTooltipCommon.prototype.ValidatePositions = function () {
|
|
8998
9061
|
// Check if Container is false
|
|
@@ -9001,15 +9064,15 @@
|
|
|
9001
9064
|
}
|
|
9002
9065
|
var allowedPositions = exports.TooltipPosition.none;
|
|
9003
9066
|
var basePosition = this.content.nativeElement.firstElementChild.getBoundingClientRect();
|
|
9004
|
-
var tooltipRect = this.tooltipcontainer.nativeElement.getBoundingClientRect();
|
|
9005
|
-
var leftPosOk = basePosition.left - tooltipRect.width > 0;
|
|
9006
|
-
var rightPosOk = basePosition.right + tooltipRect.width < window.innerWidth;
|
|
9067
|
+
var tooltipRect = this.tooltipcontainer.nativeElement.firstElementChild.getBoundingClientRect();
|
|
9068
|
+
var leftPosOk = basePosition.left - tooltipRect.width + (this.getTooltipOffset() * -1) > 0;
|
|
9069
|
+
var rightPosOk = basePosition.right + tooltipRect.width + this.getTooltipOffset() < window.innerWidth;
|
|
9007
9070
|
var topPosOk = basePosition.top - tooltipRect.height > 0;
|
|
9008
9071
|
var bottomPosOk = basePosition.bottom + tooltipRect.height < window.innerHeight;
|
|
9009
|
-
var leftHalfPosOk = basePosition.left -
|
|
9010
|
-
var rightHalfPosOk = basePosition.right +
|
|
9011
|
-
var topHalfPosOk = basePosition.top -
|
|
9012
|
-
var bottomHalfPosOk = basePosition.bottom +
|
|
9072
|
+
var leftHalfPosOk = basePosition.left - tooltipRect.width / 2 > 0;
|
|
9073
|
+
var rightHalfPosOk = basePosition.right + tooltipRect.width / 2 < window.innerWidth;
|
|
9074
|
+
var topHalfPosOk = basePosition.top - tooltipRect.height / 2 > 0;
|
|
9075
|
+
var bottomHalfPosOk = basePosition.bottom + tooltipRect.height / 2 < window.innerHeight;
|
|
9013
9076
|
if (leftPosOk && topHalfPosOk && bottomHalfPosOk) {
|
|
9014
9077
|
// tslint:disable-next-line:no-bitwise
|
|
9015
9078
|
allowedPositions = allowedPositions | exports.TooltipPosition.left;
|
|
@@ -9028,6 +9091,100 @@
|
|
|
9028
9091
|
}
|
|
9029
9092
|
return allowedPositions;
|
|
9030
9093
|
};
|
|
9094
|
+
/**
|
|
9095
|
+
* Calculates the position of the tooltip from links
|
|
9096
|
+
*/
|
|
9097
|
+
SacTooltipCommon.prototype.getLeftPosition = function () {
|
|
9098
|
+
if (this.content !== null && this.content !== undefined) {
|
|
9099
|
+
var item = this.content.nativeElement;
|
|
9100
|
+
if (item.children.length >= 1) {
|
|
9101
|
+
var childItem = item.firstElementChild;
|
|
9102
|
+
var contentPosition = childItem.getBoundingClientRect();
|
|
9103
|
+
switch (this.GetTooltipPosition()) {
|
|
9104
|
+
case exports.TooltipPosition.top:
|
|
9105
|
+
this.LeftPos = contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2;
|
|
9106
|
+
return (contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2);
|
|
9107
|
+
case exports.TooltipPosition.right:
|
|
9108
|
+
this.LeftPos = contentPosition.left + contentPosition.width + this.getTooltipOffset();
|
|
9109
|
+
return contentPosition.left + contentPosition.width + this.getTooltipOffset();
|
|
9110
|
+
case exports.TooltipPosition.bottom:
|
|
9111
|
+
this.LeftPos = contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2;
|
|
9112
|
+
return (contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2);
|
|
9113
|
+
case exports.TooltipPosition.left:
|
|
9114
|
+
this.LeftPos = contentPosition.left - this.getToolTipWidth() + (this.getTooltipOffset() * -1);
|
|
9115
|
+
return contentPosition.left - this.getToolTipWidth() + (this.getTooltipOffset() * -1);
|
|
9116
|
+
}
|
|
9117
|
+
return this.content.nativeElement.offsetTop;
|
|
9118
|
+
}
|
|
9119
|
+
else {
|
|
9120
|
+
return this.content.nativeElement.offsetTop;
|
|
9121
|
+
}
|
|
9122
|
+
}
|
|
9123
|
+
else {
|
|
9124
|
+
return this.ref.nativeElement.offsetLeft;
|
|
9125
|
+
}
|
|
9126
|
+
};
|
|
9127
|
+
/**
|
|
9128
|
+
* Calculates the position of the tooltip from the top
|
|
9129
|
+
*/
|
|
9130
|
+
SacTooltipCommon.prototype.getTopPosition = function () {
|
|
9131
|
+
if (this.content !== null && this.content !== undefined) {
|
|
9132
|
+
var item = this.content.nativeElement;
|
|
9133
|
+
if (item.children.length >= 1) {
|
|
9134
|
+
var childItem = item.firstElementChild;
|
|
9135
|
+
var contentPosition = childItem.getBoundingClientRect();
|
|
9136
|
+
// Get Position with Scroll (Scrollbars inside page should be substracted)
|
|
9137
|
+
var contentPositionTop = childItem.offsetTop + this.getOffsetTopParent(childItem.offsetParent) - this.getScrollTopParent(childItem.parentElement);
|
|
9138
|
+
switch (this.GetTooltipPosition()) {
|
|
9139
|
+
case exports.TooltipPosition.top:
|
|
9140
|
+
this.TopPos = contentPositionTop - this.getToolTipHeight() + (this.getTooltipOffset() * -1);
|
|
9141
|
+
return contentPositionTop - this.getToolTipHeight() + (this.getTooltipOffset() * -1);
|
|
9142
|
+
case exports.TooltipPosition.right:
|
|
9143
|
+
this.TopPos = contentPositionTop + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
9144
|
+
return contentPositionTop + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
9145
|
+
case exports.TooltipPosition.bottom:
|
|
9146
|
+
this.TopPos = contentPositionTop + contentPosition.height + this.getTooltipOffset();
|
|
9147
|
+
return contentPositionTop + contentPosition.height + this.getTooltipOffset();
|
|
9148
|
+
case exports.TooltipPosition.left:
|
|
9149
|
+
this.TopPos = contentPositionTop + contentPosition.height / 2 - this.getToolTipHeight() / 2;
|
|
9150
|
+
return (contentPositionTop + contentPosition.height / 2 - this.getToolTipHeight() / 2);
|
|
9151
|
+
}
|
|
9152
|
+
return (childItem.clientTop + childItem.offsetTop - (this.getToolTipHeight() / 2 - childItem.clientHeight / 2));
|
|
9153
|
+
}
|
|
9154
|
+
else {
|
|
9155
|
+
return this.content.nativeElement.offsetTop;
|
|
9156
|
+
}
|
|
9157
|
+
}
|
|
9158
|
+
else {
|
|
9159
|
+
return this.ref.nativeElement.offsetTop;
|
|
9160
|
+
}
|
|
9161
|
+
};
|
|
9162
|
+
/**
|
|
9163
|
+
* Calculates the top of the page inside all elements
|
|
9164
|
+
* @param element HTML Element
|
|
9165
|
+
* @returns summarized top value for absolute position
|
|
9166
|
+
*/
|
|
9167
|
+
SacTooltipCommon.prototype.getOffsetTopParent = function (element) {
|
|
9168
|
+
if (!element.offsetParent) {
|
|
9169
|
+
return element.offsetTop;
|
|
9170
|
+
}
|
|
9171
|
+
var parentValue = this.getOffsetTopParent(element.offsetParent);
|
|
9172
|
+
var offset = element.offsetTop;
|
|
9173
|
+
return parentValue + offset;
|
|
9174
|
+
};
|
|
9175
|
+
/**
|
|
9176
|
+
* Caclulate Scrollbars inside tree
|
|
9177
|
+
* @param element HTML Element
|
|
9178
|
+
* @returns Scroll top value of element with all childs
|
|
9179
|
+
*/
|
|
9180
|
+
SacTooltipCommon.prototype.getScrollTopParent = function (element) {
|
|
9181
|
+
// Body Scroll should not be calculated
|
|
9182
|
+
if (!element.parentElement) {
|
|
9183
|
+
return 0;
|
|
9184
|
+
}
|
|
9185
|
+
var parentValue = this.getScrollTopParent(element.parentElement);
|
|
9186
|
+
return parentValue + element.scrollTop;
|
|
9187
|
+
};
|
|
9031
9188
|
return SacTooltipCommon;
|
|
9032
9189
|
}());
|
|
9033
9190
|
SacTooltipCommon.decorators = [
|
|
@@ -9040,9 +9197,9 @@
|
|
|
9040
9197
|
SacTooltipCommon.propDecorators = {
|
|
9041
9198
|
position: [{ type: i0.Input }],
|
|
9042
9199
|
tooltiptext: [{ type: i0.Input }],
|
|
9043
|
-
inlinemode: [{ type: i0.Input }],
|
|
9044
9200
|
content: [{ type: i0.ViewChild, args: ['container', { static: true },] }],
|
|
9045
|
-
|
|
9201
|
+
inlinemode: [{ type: i0.Input }],
|
|
9202
|
+
tooltip: [{ type: i0.ViewChild, args: ['tooltip', { static: false },] }]
|
|
9046
9203
|
};
|
|
9047
9204
|
|
|
9048
9205
|
// #region Classes
|
|
@@ -9114,7 +9271,6 @@
|
|
|
9114
9271
|
};
|
|
9115
9272
|
_this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
9116
9273
|
_this.lngResourceService = injector.get(SACLOCALISATION_SERVICE, new SacDefaultLocalisationService(_this.validationKeyService));
|
|
9117
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
9118
9274
|
_this.uploads = [];
|
|
9119
9275
|
_this.options.allowedTypes = '*';
|
|
9120
9276
|
_this.options.concurrency = 1;
|