@simpleangularcontrols/sac-common 10.0.0-rc.6 → 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 +555 -391
- 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/basedatetimecontrol.d.ts +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/basedatetimecontrol.js +1 -1
- 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/esm2015/validation/isDateValid.js +9 -1
- package/fesm2015/simpleangularcontrols-sac-common.js +531 -379
- 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.6.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
|
};
|
|
@@ -3159,19 +3214,27 @@
|
|
|
3159
3214
|
};
|
|
3160
3215
|
}
|
|
3161
3216
|
|
|
3217
|
+
// #region Variables
|
|
3162
3218
|
/**
|
|
3163
3219
|
* Moment
|
|
3164
3220
|
*/
|
|
3165
3221
|
var moment = moment___default['default'];
|
|
3222
|
+
// #endregion Variables
|
|
3223
|
+
// #region Functions
|
|
3166
3224
|
function isDateValid(value, format) {
|
|
3167
3225
|
// NULL ist gültig
|
|
3168
3226
|
if (value === null || value === undefined || value === '') {
|
|
3169
3227
|
return true;
|
|
3170
3228
|
}
|
|
3229
|
+
// Check is Iso Date (From API Call)
|
|
3230
|
+
if (moment(value, moment_.ISO_8601, true).isValid()) {
|
|
3231
|
+
return true;
|
|
3232
|
+
}
|
|
3171
3233
|
var date = moment(value, [format], true);
|
|
3172
3234
|
date = date.utc();
|
|
3173
3235
|
return date.isValid();
|
|
3174
|
-
}
|
|
3236
|
+
}
|
|
3237
|
+
// #endregion Functions
|
|
3175
3238
|
|
|
3176
3239
|
function isValidDateValidator(validationMessage, validationMessageSummary) {
|
|
3177
3240
|
return function (control) {
|
|
@@ -5018,10 +5081,6 @@
|
|
|
5018
5081
|
* Macht das Input readonly
|
|
5019
5082
|
*/
|
|
5020
5083
|
_this.readonly = false;
|
|
5021
|
-
/**
|
|
5022
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
5023
|
-
*/
|
|
5024
|
-
_this.tooltiptext = '';
|
|
5025
5084
|
return _this;
|
|
5026
5085
|
// #endregion Protected Methods
|
|
5027
5086
|
}
|
|
@@ -5065,8 +5124,7 @@
|
|
|
5065
5124
|
isrequired: [{ type: i0.Input }],
|
|
5066
5125
|
placeholder: [{ type: i0.Input }],
|
|
5067
5126
|
readonly: [{ type: i0.Input }],
|
|
5068
|
-
regexvalidation: [{ type: i0.Input }]
|
|
5069
|
-
tooltiptext: [{ type: i0.Input }]
|
|
5127
|
+
regexvalidation: [{ type: i0.Input }]
|
|
5070
5128
|
};
|
|
5071
5129
|
|
|
5072
5130
|
/**
|
|
@@ -5621,29 +5679,41 @@
|
|
|
5621
5679
|
clicked: [{ type: i0.Output }]
|
|
5622
5680
|
};
|
|
5623
5681
|
|
|
5682
|
+
// #region Classes
|
|
5683
|
+
/**
|
|
5684
|
+
* GridResponse class
|
|
5685
|
+
*/
|
|
5686
|
+
var GridResponse = /** @class */ (function () {
|
|
5687
|
+
function GridResponse() {
|
|
5688
|
+
}
|
|
5689
|
+
return GridResponse;
|
|
5690
|
+
}());
|
|
5624
5691
|
/**
|
|
5625
|
-
* Model
|
|
5692
|
+
* Model for pager settings
|
|
5626
5693
|
*/
|
|
5627
5694
|
var PagerData = /** @class */ (function () {
|
|
5695
|
+
// #endregion Properties
|
|
5696
|
+
// #region Constructors
|
|
5628
5697
|
/**
|
|
5629
|
-
*
|
|
5630
|
-
* @param PageSize
|
|
5631
|
-
* @param CurrentPageIndex
|
|
5632
|
-
* @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
|
|
5633
5702
|
*/
|
|
5634
5703
|
function PagerData(PageSize, CurrentPageIndex, TotalRowCount) {
|
|
5704
|
+
// #region Properties
|
|
5635
5705
|
/**
|
|
5636
|
-
*
|
|
5637
|
-
*/
|
|
5638
|
-
this.TotalRowCount = 0;
|
|
5639
|
-
/**
|
|
5640
|
-
* Aktueller Index der Seite
|
|
5706
|
+
* Current index of the page
|
|
5641
5707
|
*/
|
|
5642
5708
|
this.CurrentPageIndex = 0;
|
|
5643
5709
|
/**
|
|
5644
|
-
*
|
|
5710
|
+
* Number of elements on the page
|
|
5645
5711
|
*/
|
|
5646
5712
|
this.PageSize = 20;
|
|
5713
|
+
/**
|
|
5714
|
+
* Total number of data records
|
|
5715
|
+
*/
|
|
5716
|
+
this.TotalRowCount = 0;
|
|
5647
5717
|
this.PageSize = PageSize;
|
|
5648
5718
|
this.CurrentPageIndex = CurrentPageIndex;
|
|
5649
5719
|
this.TotalRowCount = TotalRowCount;
|
|
@@ -5651,44 +5721,41 @@
|
|
|
5651
5721
|
return PagerData;
|
|
5652
5722
|
}());
|
|
5653
5723
|
/**
|
|
5654
|
-
* Model
|
|
5724
|
+
* Model if page is to be changed
|
|
5655
5725
|
*/
|
|
5656
5726
|
var PagerRequest = /** @class */ (function () {
|
|
5727
|
+
// #endregion Properties
|
|
5728
|
+
// #region Constructors
|
|
5657
5729
|
/**
|
|
5658
|
-
*
|
|
5659
|
-
* @param PageSize
|
|
5660
|
-
* @param NewPageIndex
|
|
5730
|
+
* Constructor
|
|
5731
|
+
* @param PageSize Page size / number of elements per page
|
|
5732
|
+
* @param NewPageIndex New page index
|
|
5661
5733
|
*/
|
|
5662
5734
|
function PagerRequest(PageSize, NewPageIndex) {
|
|
5735
|
+
// #region Properties
|
|
5663
5736
|
/**
|
|
5664
|
-
*
|
|
5737
|
+
* Index of the page to which you want to switch
|
|
5665
5738
|
*/
|
|
5666
|
-
this.
|
|
5739
|
+
this.NewPageIndex = 0;
|
|
5667
5740
|
/**
|
|
5668
|
-
*
|
|
5741
|
+
* Number of elements on the page
|
|
5669
5742
|
*/
|
|
5670
|
-
this.
|
|
5743
|
+
this.PageSize = 0;
|
|
5671
5744
|
this.PageSize = PageSize;
|
|
5672
5745
|
this.NewPageIndex = NewPageIndex;
|
|
5673
5746
|
}
|
|
5674
5747
|
return PagerRequest;
|
|
5675
5748
|
}());
|
|
5676
5749
|
/**
|
|
5677
|
-
*
|
|
5678
|
-
*/
|
|
5679
|
-
var GridResponse = /** @class */ (function () {
|
|
5680
|
-
function GridResponse() {
|
|
5681
|
-
}
|
|
5682
|
-
return GridResponse;
|
|
5683
|
-
}());
|
|
5684
|
-
/**
|
|
5685
|
-
* Model für Sortierung
|
|
5750
|
+
* Model for sorting
|
|
5686
5751
|
*/
|
|
5687
5752
|
var SortDescriptor = /** @class */ (function () {
|
|
5753
|
+
// #endregion Properties
|
|
5754
|
+
// #region Constructors
|
|
5688
5755
|
/**
|
|
5689
|
-
*
|
|
5690
|
-
* @param sortcolumn Column
|
|
5691
|
-
* @param sortorder
|
|
5756
|
+
* Constructor
|
|
5757
|
+
* @param sortcolumn Column by which to sort
|
|
5758
|
+
* @param sortorder Type of sorting
|
|
5692
5759
|
*/
|
|
5693
5760
|
function SortDescriptor(sortcolumn, sortorder) {
|
|
5694
5761
|
this.SortColumn = sortcolumn;
|
|
@@ -5697,19 +5764,29 @@
|
|
|
5697
5764
|
return SortDescriptor;
|
|
5698
5765
|
}());
|
|
5699
5766
|
(function (SortOrder) {
|
|
5767
|
+
/**
|
|
5768
|
+
* No sorting
|
|
5769
|
+
*/
|
|
5700
5770
|
SortOrder[SortOrder["None"] = 0] = "None";
|
|
5771
|
+
/**
|
|
5772
|
+
* Ascending
|
|
5773
|
+
*/
|
|
5701
5774
|
SortOrder[SortOrder["Ascending"] = 1] = "Ascending";
|
|
5775
|
+
/**
|
|
5776
|
+
* Descending
|
|
5777
|
+
*/
|
|
5702
5778
|
SortOrder[SortOrder["Descending"] = 2] = "Descending";
|
|
5703
|
-
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
5779
|
+
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
5780
|
+
// #endregion Enums
|
|
5704
5781
|
|
|
5705
5782
|
/**
|
|
5706
|
-
*
|
|
5783
|
+
* Basic component for SacGrid
|
|
5707
5784
|
*/
|
|
5708
5785
|
var SacGridCommon = /** @class */ (function () {
|
|
5709
5786
|
// #endregion Properties
|
|
5710
5787
|
// #region Constructors
|
|
5711
5788
|
/**
|
|
5712
|
-
*
|
|
5789
|
+
* Constructor
|
|
5713
5790
|
* @param cd Change Detection Service
|
|
5714
5791
|
* @param injector DI Injector
|
|
5715
5792
|
*/
|
|
@@ -5717,43 +5794,43 @@
|
|
|
5717
5794
|
this.cd = cd;
|
|
5718
5795
|
// #region Properties
|
|
5719
5796
|
/**
|
|
5720
|
-
*
|
|
5797
|
+
* Page number of the active page.
|
|
5721
5798
|
*/
|
|
5722
5799
|
this.activePage = 1;
|
|
5723
5800
|
/**
|
|
5724
|
-
*
|
|
5801
|
+
* Contains the number of the first page displayed in Pager.
|
|
5725
5802
|
*/
|
|
5726
5803
|
this.firstPageNumber = 1;
|
|
5727
5804
|
/**
|
|
5728
|
-
*
|
|
5805
|
+
* Contains Array of Pages.
|
|
5729
5806
|
*/
|
|
5730
5807
|
this.paginators = [];
|
|
5731
5808
|
/**
|
|
5732
|
-
*
|
|
5809
|
+
* Deactivates the selection of the PageSize in the pager
|
|
5733
5810
|
*/
|
|
5734
5811
|
this.pagesizedisabled = false;
|
|
5735
5812
|
/**
|
|
5736
|
-
*
|
|
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 `|`.
|
|
5737
5814
|
*/
|
|
5738
5815
|
this.pagesizes = '20|50|100';
|
|
5739
5816
|
/**
|
|
5740
|
-
*
|
|
5817
|
+
* Event when the pager is clicked.
|
|
5741
5818
|
*/
|
|
5742
5819
|
this.paging = new i0.EventEmitter();
|
|
5743
5820
|
/**
|
|
5744
|
-
*
|
|
5821
|
+
* Event when a header is clicked so that the grid is sorted.
|
|
5745
5822
|
*/
|
|
5746
5823
|
this.sorting = new i0.EventEmitter();
|
|
5747
5824
|
/**
|
|
5748
|
-
*
|
|
5825
|
+
* Number of columns in the grid
|
|
5749
5826
|
*/
|
|
5750
5827
|
this.ColumnCount = 0;
|
|
5751
5828
|
/**
|
|
5752
|
-
*
|
|
5829
|
+
* Column by which currently sorted.
|
|
5753
5830
|
*/
|
|
5754
5831
|
this.sortColumn = '';
|
|
5755
5832
|
/**
|
|
5756
|
-
*
|
|
5833
|
+
* Current direction of sorting
|
|
5757
5834
|
*/
|
|
5758
5835
|
this.sortDirection = exports.SortOrder.None;
|
|
5759
5836
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
@@ -5765,8 +5842,8 @@
|
|
|
5765
5842
|
// #endregion Constructors
|
|
5766
5843
|
// #region Public Getters And Setters
|
|
5767
5844
|
/**
|
|
5768
|
-
* Model
|
|
5769
|
-
* @param sortDescription Settings
|
|
5845
|
+
* Model for sorting
|
|
5846
|
+
* @param sortDescription Settings for current sorting
|
|
5770
5847
|
*/
|
|
5771
5848
|
set: function (sortDescription) {
|
|
5772
5849
|
this.sortColumn = sortDescription.SortColumn;
|
|
@@ -5778,15 +5855,15 @@
|
|
|
5778
5855
|
// #endregion Public Getters And Setters
|
|
5779
5856
|
// #region Public Methods
|
|
5780
5857
|
/**
|
|
5781
|
-
*
|
|
5858
|
+
* The method increases the column elements by one
|
|
5782
5859
|
*/
|
|
5783
5860
|
SacGridCommon.prototype.RegisterColumn = function () {
|
|
5784
5861
|
this.ColumnCount++;
|
|
5785
|
-
// Detect Changes
|
|
5862
|
+
// Detect Changes, as ColumnChange is executed after OnInit.
|
|
5786
5863
|
this.cd.detectChanges();
|
|
5787
5864
|
};
|
|
5788
5865
|
/**
|
|
5789
|
-
*
|
|
5866
|
+
* Method for sorting the data.
|
|
5790
5867
|
*/
|
|
5791
5868
|
SacGridCommon.prototype.SortBy = function (command) {
|
|
5792
5869
|
var direction;
|
|
@@ -5810,14 +5887,14 @@
|
|
|
5810
5887
|
this.sorting.emit(result);
|
|
5811
5888
|
};
|
|
5812
5889
|
/**
|
|
5813
|
-
*
|
|
5890
|
+
* The method reduces the column elements by one
|
|
5814
5891
|
*/
|
|
5815
5892
|
SacGridCommon.prototype.UnregisterColumn = function () {
|
|
5816
5893
|
this.ColumnCount--;
|
|
5817
5894
|
};
|
|
5818
5895
|
/**
|
|
5819
|
-
*
|
|
5820
|
-
* @param newStartIndex
|
|
5896
|
+
* Method if Grid is to switch to a new page.
|
|
5897
|
+
* @param newStartIndex New Page Index (Zero-Based)
|
|
5821
5898
|
*/
|
|
5822
5899
|
SacGridCommon.prototype.pageChange = function (newStartIndex) {
|
|
5823
5900
|
this.paging.emit(newStartIndex);
|
|
@@ -5853,27 +5930,31 @@
|
|
|
5853
5930
|
*/
|
|
5854
5931
|
var SacGridButtonCommon = /** @class */ (function () {
|
|
5855
5932
|
function SacGridButtonCommon() {
|
|
5933
|
+
// #region Properties
|
|
5856
5934
|
/**
|
|
5857
|
-
*
|
|
5935
|
+
* Button is deactivated
|
|
5858
5936
|
*/
|
|
5859
|
-
this.
|
|
5937
|
+
this._isdisabledvalue = false;
|
|
5860
5938
|
/**
|
|
5861
|
-
*
|
|
5939
|
+
* Input property for styling the button. Defines the CSS classes of the button
|
|
5862
5940
|
*/
|
|
5863
|
-
this.
|
|
5941
|
+
this.iconstyle = '';
|
|
5864
5942
|
/**
|
|
5865
|
-
* Event
|
|
5943
|
+
* Event when the button is clicked
|
|
5866
5944
|
*/
|
|
5867
5945
|
this.clicked = new i0.EventEmitter();
|
|
5946
|
+
// #endregion Public Methods
|
|
5868
5947
|
}
|
|
5869
5948
|
Object.defineProperty(SacGridButtonCommon.prototype, "isdisabled", {
|
|
5870
5949
|
get: function () {
|
|
5871
5950
|
return this._isdisabledvalue;
|
|
5872
5951
|
},
|
|
5952
|
+
// #endregion Properties
|
|
5953
|
+
// #region Public Getters And Setters
|
|
5873
5954
|
/**
|
|
5874
|
-
*
|
|
5875
|
-
* @param v
|
|
5876
|
-
* @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
|
|
5877
5958
|
*/
|
|
5878
5959
|
set: function (v) {
|
|
5879
5960
|
if (v === null || v === undefined || typeof v === 'boolean') {
|
|
@@ -5886,8 +5967,10 @@
|
|
|
5886
5967
|
enumerable: false,
|
|
5887
5968
|
configurable: true
|
|
5888
5969
|
});
|
|
5970
|
+
// #endregion Public Getters And Setters
|
|
5971
|
+
// #region Public Methods
|
|
5889
5972
|
/**
|
|
5890
|
-
*
|
|
5973
|
+
* Triggers the clicked event if the button is not deactivated.
|
|
5891
5974
|
*/
|
|
5892
5975
|
SacGridButtonCommon.prototype.callaction = function () {
|
|
5893
5976
|
if (!this._isdisabledvalue) {
|
|
@@ -5900,18 +5983,20 @@
|
|
|
5900
5983
|
{ type: i0.Directive }
|
|
5901
5984
|
];
|
|
5902
5985
|
SacGridButtonCommon.propDecorators = {
|
|
5903
|
-
iconstyle: [{ type: i0.Input }],
|
|
5904
5986
|
icon: [{ type: i0.Input }],
|
|
5905
|
-
|
|
5906
|
-
clicked: [{ type: i0.Output }]
|
|
5987
|
+
iconstyle: [{ type: i0.Input }],
|
|
5988
|
+
clicked: [{ type: i0.Output }],
|
|
5989
|
+
isdisabled: [{ type: i0.Input }]
|
|
5907
5990
|
};
|
|
5908
5991
|
|
|
5909
5992
|
/**
|
|
5910
|
-
* Base
|
|
5993
|
+
* Base component for GridColumn
|
|
5911
5994
|
*/
|
|
5912
5995
|
var SacGridColumnBaseCommon = /** @class */ (function () {
|
|
5996
|
+
// #endregion Properties
|
|
5997
|
+
// #region Constructors
|
|
5913
5998
|
/**
|
|
5914
|
-
*
|
|
5999
|
+
* Constructor
|
|
5915
6000
|
* @param grid reference to grid component
|
|
5916
6001
|
* @param injector di injector to resolve icon service
|
|
5917
6002
|
* @param el reference to html element
|
|
@@ -5922,73 +6007,71 @@
|
|
|
5922
6007
|
this.el = el;
|
|
5923
6008
|
this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
5924
6009
|
}
|
|
5925
|
-
|
|
5926
|
-
|
|
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
|
|
5927
6034
|
/**
|
|
5928
|
-
*
|
|
6035
|
+
* Indicates the direction of sorting. The possible values are `none`,`asc`,`desc`
|
|
5929
6036
|
*/
|
|
5930
|
-
SacGridColumnBaseCommon.prototype.
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
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';
|
|
5939
6047
|
}
|
|
5940
6048
|
};
|
|
5941
6049
|
/**
|
|
5942
|
-
*
|
|
6050
|
+
* Defines whether the element is a cell in the table.
|
|
5943
6051
|
*/
|
|
5944
|
-
SacGridColumnBaseCommon.prototype.
|
|
5945
|
-
|
|
5946
|
-
this.grid.UnregisterColumn();
|
|
5947
|
-
}
|
|
6052
|
+
SacGridColumnBaseCommon.prototype.IsBody = function () {
|
|
6053
|
+
return this.type === 'body';
|
|
5948
6054
|
};
|
|
5949
|
-
//#endregion
|
|
5950
|
-
//#region Type Handling
|
|
5951
6055
|
/**
|
|
5952
|
-
*
|
|
6056
|
+
* Defines whether the element is a cell in the footer of the table
|
|
5953
6057
|
*/
|
|
5954
|
-
SacGridColumnBaseCommon.prototype.
|
|
5955
|
-
return this.type === '
|
|
6058
|
+
SacGridColumnBaseCommon.prototype.IsFooter = function () {
|
|
6059
|
+
return this.type === 'footer';
|
|
5956
6060
|
};
|
|
5957
6061
|
/**
|
|
5958
|
-
*
|
|
6062
|
+
* Defines whether the element is a cell in the table header
|
|
5959
6063
|
*/
|
|
5960
|
-
SacGridColumnBaseCommon.prototype.
|
|
5961
|
-
return this.type === '
|
|
6064
|
+
SacGridColumnBaseCommon.prototype.IsHeader = function () {
|
|
6065
|
+
return this.type === 'header';
|
|
5962
6066
|
};
|
|
5963
6067
|
/**
|
|
5964
|
-
*
|
|
6068
|
+
* Defines whether this column is sorted.
|
|
5965
6069
|
*/
|
|
5966
|
-
SacGridColumnBaseCommon.prototype.
|
|
5967
|
-
return this.
|
|
6070
|
+
SacGridColumnBaseCommon.prototype.IsSortedColumn = function () {
|
|
6071
|
+
return this.grid.sortColumn === this.sortkey;
|
|
5968
6072
|
};
|
|
5969
|
-
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortUp", {
|
|
5970
|
-
//#endregion
|
|
5971
|
-
/**
|
|
5972
|
-
* sort up icon for grid header
|
|
5973
|
-
*/
|
|
5974
|
-
get: function () {
|
|
5975
|
-
return this.iconService.GridComponentSortUp;
|
|
5976
|
-
},
|
|
5977
|
-
enumerable: false,
|
|
5978
|
-
configurable: true
|
|
5979
|
-
});
|
|
5980
|
-
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortDown", {
|
|
5981
|
-
/**
|
|
5982
|
-
* sort down icon for grid header
|
|
5983
|
-
*/
|
|
5984
|
-
get: function () {
|
|
5985
|
-
return this.iconService.GridComponentSortDown;
|
|
5986
|
-
},
|
|
5987
|
-
enumerable: false,
|
|
5988
|
-
configurable: true
|
|
5989
|
-
});
|
|
5990
6073
|
/**
|
|
5991
|
-
*
|
|
6074
|
+
* Triggers the events so that the table is sorted according to this column.
|
|
5992
6075
|
*/
|
|
5993
6076
|
SacGridColumnBaseCommon.prototype.SortByColumn = function () {
|
|
5994
6077
|
if (this.sortkey !== undefined &&
|
|
@@ -5998,24 +6081,25 @@
|
|
|
5998
6081
|
}
|
|
5999
6082
|
};
|
|
6000
6083
|
/**
|
|
6001
|
-
*
|
|
6084
|
+
* Called when the component is destroyed.
|
|
6002
6085
|
*/
|
|
6003
|
-
SacGridColumnBaseCommon.prototype.
|
|
6004
|
-
|
|
6086
|
+
SacGridColumnBaseCommon.prototype.ngOnDestroy = function () {
|
|
6087
|
+
if (this.IsHeader()) {
|
|
6088
|
+
this.grid.UnregisterColumn();
|
|
6089
|
+
}
|
|
6005
6090
|
};
|
|
6006
6091
|
/**
|
|
6007
|
-
*
|
|
6092
|
+
* Is called when the component is initialized.
|
|
6008
6093
|
*/
|
|
6009
|
-
SacGridColumnBaseCommon.prototype.
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
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();
|
|
6019
6103
|
}
|
|
6020
6104
|
};
|
|
6021
6105
|
return SacGridColumnBaseCommon;
|
|
@@ -6029,39 +6113,44 @@
|
|
|
6029
6113
|
{ type: i0.ElementRef }
|
|
6030
6114
|
]; };
|
|
6031
6115
|
SacGridColumnBaseCommon.propDecorators = {
|
|
6032
|
-
name: [{ type: i0.Input }],
|
|
6033
|
-
value: [{ type: i0.Input }],
|
|
6034
6116
|
header: [{ type: i0.Input }],
|
|
6035
|
-
|
|
6117
|
+
name: [{ type: i0.Input }],
|
|
6118
|
+
sortkey: [{ type: i0.Input }],
|
|
6036
6119
|
type: [{ type: i0.Input }],
|
|
6037
|
-
|
|
6120
|
+
value: [{ type: i0.Input }],
|
|
6121
|
+
width: [{ type: i0.Input }]
|
|
6038
6122
|
};
|
|
6039
6123
|
|
|
6040
6124
|
/**
|
|
6041
|
-
*
|
|
6125
|
+
* Component for SacGridColumnCommon. Extends SacGridColumnBaseCommon
|
|
6042
6126
|
*/
|
|
6043
6127
|
var SacGridColumnCommon = /** @class */ (function (_super) {
|
|
6044
6128
|
__extends(SacGridColumnCommon, _super);
|
|
6129
|
+
// #endregion Properties
|
|
6130
|
+
// #region Constructors
|
|
6045
6131
|
/**
|
|
6046
|
-
*
|
|
6132
|
+
* Constructor
|
|
6047
6133
|
*/
|
|
6048
6134
|
function SacGridColumnCommon(grid, injector, el) {
|
|
6049
6135
|
var _this = _super.call(this, grid, injector, el) || this;
|
|
6136
|
+
// #region Properties
|
|
6050
6137
|
/**
|
|
6051
|
-
*
|
|
6138
|
+
* Defines whether the CSS class ellipsis is set.
|
|
6052
6139
|
*/
|
|
6053
6140
|
_this._ellipsis = false;
|
|
6054
6141
|
return _this;
|
|
6055
6142
|
}
|
|
6056
6143
|
Object.defineProperty(SacGridColumnCommon.prototype, "ellipsis", {
|
|
6057
6144
|
/**
|
|
6058
|
-
* Getter
|
|
6145
|
+
* Getter for the ellipsis property. Always returns a boolean type.
|
|
6059
6146
|
*/
|
|
6060
6147
|
get: function () {
|
|
6061
6148
|
return this._ellipsis;
|
|
6062
6149
|
},
|
|
6150
|
+
// #endregion Constructors
|
|
6151
|
+
// #region Public Getters And Setters
|
|
6063
6152
|
/**
|
|
6064
|
-
*
|
|
6153
|
+
* Sets the ellipsis property. Can be a Boolean or the strings `true` or `false`.
|
|
6065
6154
|
*/
|
|
6066
6155
|
set: function (v) {
|
|
6067
6156
|
this._ellipsis = convertToBoolean(v);
|
|
@@ -6069,8 +6158,10 @@
|
|
|
6069
6158
|
enumerable: false,
|
|
6070
6159
|
configurable: true
|
|
6071
6160
|
});
|
|
6161
|
+
// #endregion Public Getters And Setters
|
|
6162
|
+
// #region Public Methods
|
|
6072
6163
|
/**
|
|
6073
|
-
*
|
|
6164
|
+
* Checks whether ellipsis is set
|
|
6074
6165
|
*/
|
|
6075
6166
|
SacGridColumnCommon.prototype.IsEllipsis = function () {
|
|
6076
6167
|
return this._ellipsis;
|
|
@@ -6090,13 +6181,14 @@
|
|
|
6090
6181
|
};
|
|
6091
6182
|
|
|
6092
6183
|
/**
|
|
6093
|
-
*
|
|
6184
|
+
* Component for SacGridColumnActionCommon. Extends SacGridColumnBaseCommon
|
|
6094
6185
|
*/
|
|
6095
6186
|
var SacGridColumnActionCommon = /** @class */ (function (_super) {
|
|
6096
6187
|
__extends(SacGridColumnActionCommon, _super);
|
|
6188
|
+
// #region Constructors
|
|
6097
6189
|
/**
|
|
6098
|
-
*
|
|
6099
|
-
* @param el Element
|
|
6190
|
+
* Constructor
|
|
6191
|
+
* @param el Element reference
|
|
6100
6192
|
* @param injector di inector to resolve icon service
|
|
6101
6193
|
* @param grid SacGridCommon
|
|
6102
6194
|
*/
|
|
@@ -6115,7 +6207,7 @@
|
|
|
6115
6207
|
]; };
|
|
6116
6208
|
|
|
6117
6209
|
/**
|
|
6118
|
-
*
|
|
6210
|
+
* Basic component for SacGridImage
|
|
6119
6211
|
*/
|
|
6120
6212
|
var SacGridImageCommon = /** @class */ (function () {
|
|
6121
6213
|
function SacGridImageCommon() {
|
|
@@ -6130,67 +6222,65 @@
|
|
|
6130
6222
|
};
|
|
6131
6223
|
|
|
6132
6224
|
/**
|
|
6133
|
-
*
|
|
6225
|
+
* Basic component for paging
|
|
6134
6226
|
*/
|
|
6135
6227
|
var SacPagingCommon = /** @class */ (function () {
|
|
6136
6228
|
// #endregion Properties
|
|
6137
6229
|
// #region Constructors
|
|
6138
6230
|
/**
|
|
6139
|
-
*
|
|
6140
|
-
* Inject des Formulars
|
|
6231
|
+
* Constructor
|
|
6141
6232
|
* @parent SacFormCommon
|
|
6142
6233
|
* @injector Injector
|
|
6143
6234
|
*/
|
|
6144
6235
|
function SacPagingCommon(injector) {
|
|
6145
6236
|
/**
|
|
6146
|
-
* Total
|
|
6237
|
+
* Total number of rows
|
|
6147
6238
|
*/
|
|
6148
6239
|
this.totalRowCount = 0;
|
|
6149
6240
|
/**
|
|
6150
|
-
*
|
|
6241
|
+
* Deactivate page size selection
|
|
6151
6242
|
*/
|
|
6152
6243
|
this.pagesizedisabled = false;
|
|
6153
6244
|
/**
|
|
6154
|
-
* Text in Page
|
|
6155
|
-
*
|
|
6156
|
-
* {{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
|
|
6157
6248
|
*/
|
|
6158
6249
|
this.pagesizes = '20|50|100';
|
|
6159
6250
|
/**
|
|
6160
|
-
* Text in Page
|
|
6161
|
-
*
|
|
6162
|
-
* {{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
|
|
6163
6254
|
*/
|
|
6164
6255
|
this.pagesizetext = '';
|
|
6165
6256
|
/**
|
|
6166
|
-
* Text in
|
|
6167
|
-
*
|
|
6168
|
-
* {{
|
|
6169
|
-
* {{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
|
|
6170
6260
|
*/
|
|
6171
6261
|
this.pagingtext = '';
|
|
6172
6262
|
/**
|
|
6173
|
-
* Event
|
|
6263
|
+
* Event when the page is changed in the grid. The new PageIndex is given as a parameter.
|
|
6174
6264
|
*/
|
|
6175
6265
|
this.paging = new i0.EventEmitter();
|
|
6176
6266
|
/**
|
|
6177
|
-
*
|
|
6267
|
+
* Active page index
|
|
6178
6268
|
*/
|
|
6179
6269
|
this.activePageIndex = 0;
|
|
6180
6270
|
/**
|
|
6181
|
-
*
|
|
6271
|
+
* First page index
|
|
6182
6272
|
*/
|
|
6183
6273
|
this.firstPageIndex = 0;
|
|
6184
6274
|
/**
|
|
6185
|
-
*
|
|
6275
|
+
* Last page index
|
|
6186
6276
|
*/
|
|
6187
6277
|
this.lastPageIndex = 0;
|
|
6188
6278
|
/**
|
|
6189
|
-
*
|
|
6279
|
+
* Number of elements per page
|
|
6190
6280
|
*/
|
|
6191
6281
|
this.pageSize = 20;
|
|
6192
6282
|
/**
|
|
6193
|
-
* Item
|
|
6283
|
+
* Item for each paging element (page number)
|
|
6194
6284
|
*/
|
|
6195
6285
|
this.paginators = [];
|
|
6196
6286
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
@@ -6203,7 +6293,7 @@
|
|
|
6203
6293
|
// #endregion Constructors
|
|
6204
6294
|
// #region Public Getters And Setters
|
|
6205
6295
|
/**
|
|
6206
|
-
* Property
|
|
6296
|
+
* Property for Pager Data
|
|
6207
6297
|
*/
|
|
6208
6298
|
set: function (p) {
|
|
6209
6299
|
if (p != null) {
|
|
@@ -6218,7 +6308,7 @@
|
|
|
6218
6308
|
});
|
|
6219
6309
|
Object.defineProperty(SacPagingCommon.prototype, "PageSizeText", {
|
|
6220
6310
|
/**
|
|
6221
|
-
* Property
|
|
6311
|
+
* Property with text for total entries in page
|
|
6222
6312
|
*/
|
|
6223
6313
|
get: function () {
|
|
6224
6314
|
return this.lngResourceService.GetString(this.pagesizetext);
|
|
@@ -6228,7 +6318,7 @@
|
|
|
6228
6318
|
});
|
|
6229
6319
|
Object.defineProperty(SacPagingCommon.prototype, "PagingText", {
|
|
6230
6320
|
/**
|
|
6231
|
-
* Text
|
|
6321
|
+
* Text with current page and total pages
|
|
6232
6322
|
*/
|
|
6233
6323
|
get: function () {
|
|
6234
6324
|
return this.lngResourceService.GetString(this.pagingtext, {
|
|
@@ -6241,7 +6331,7 @@
|
|
|
6241
6331
|
});
|
|
6242
6332
|
Object.defineProperty(SacPagingCommon.prototype, "getPageSizes", {
|
|
6243
6333
|
/**
|
|
6244
|
-
*
|
|
6334
|
+
* Returns the page sizes as a number array
|
|
6245
6335
|
*/
|
|
6246
6336
|
get: function () {
|
|
6247
6337
|
return this.pagesizes.split('|').map(function (itm) { return Number(itm); });
|
|
@@ -6252,8 +6342,8 @@
|
|
|
6252
6342
|
// #endregion Public Getters And Setters
|
|
6253
6343
|
// #region Public Methods
|
|
6254
6344
|
/**
|
|
6255
|
-
*
|
|
6256
|
-
* @param newPageIndex
|
|
6345
|
+
* Changes the page to the new index
|
|
6346
|
+
* @param newPageIndex Page index. This corresponds to the page number - 1.
|
|
6257
6347
|
*/
|
|
6258
6348
|
SacPagingCommon.prototype.changePage = function (newPageIndex) {
|
|
6259
6349
|
if (this.activePageIndex !== newPageIndex) {
|
|
@@ -6261,15 +6351,15 @@
|
|
|
6261
6351
|
}
|
|
6262
6352
|
};
|
|
6263
6353
|
/**
|
|
6264
|
-
*
|
|
6265
|
-
* @param newSize
|
|
6354
|
+
* Changes the page size in the pager
|
|
6355
|
+
* @param newSize New number of elements per page
|
|
6266
6356
|
*/
|
|
6267
6357
|
SacPagingCommon.prototype.changePageSize = function (newSize) {
|
|
6268
6358
|
var pagerData = new PagerRequest(newSize, this.activePageIndex);
|
|
6269
6359
|
this.paging.emit(pagerData);
|
|
6270
6360
|
};
|
|
6271
6361
|
/**
|
|
6272
|
-
*
|
|
6362
|
+
*Switch to 1st page
|
|
6273
6363
|
*/
|
|
6274
6364
|
SacPagingCommon.prototype.firstPage = function () {
|
|
6275
6365
|
if (this.activePageIndex !== this.firstPageIndex) {
|
|
@@ -6277,19 +6367,19 @@
|
|
|
6277
6367
|
}
|
|
6278
6368
|
};
|
|
6279
6369
|
/**
|
|
6280
|
-
*
|
|
6370
|
+
* Returns the current page number
|
|
6281
6371
|
*/
|
|
6282
6372
|
SacPagingCommon.prototype.getCurrentPageNumber = function () {
|
|
6283
6373
|
return this.activePageIndex + 1;
|
|
6284
6374
|
};
|
|
6285
6375
|
/**
|
|
6286
|
-
*
|
|
6376
|
+
* Returns the total number of pages
|
|
6287
6377
|
*/
|
|
6288
6378
|
SacPagingCommon.prototype.getTotalPageNumber = function () {
|
|
6289
6379
|
return this.lastPageIndex + 1;
|
|
6290
6380
|
};
|
|
6291
6381
|
/**
|
|
6292
|
-
* Paging
|
|
6382
|
+
* Paging on last page
|
|
6293
6383
|
*/
|
|
6294
6384
|
SacPagingCommon.prototype.lastPage = function () {
|
|
6295
6385
|
if (this.activePageIndex !== this.lastPageIndex) {
|
|
@@ -6297,7 +6387,7 @@
|
|
|
6297
6387
|
}
|
|
6298
6388
|
};
|
|
6299
6389
|
/**
|
|
6300
|
-
* Paging
|
|
6390
|
+
* Paging to next page
|
|
6301
6391
|
*/
|
|
6302
6392
|
SacPagingCommon.prototype.nextPage = function () {
|
|
6303
6393
|
if (this.activePageIndex !== this.lastPageIndex) {
|
|
@@ -6305,7 +6395,7 @@
|
|
|
6305
6395
|
}
|
|
6306
6396
|
};
|
|
6307
6397
|
/**
|
|
6308
|
-
* Paging
|
|
6398
|
+
* Paging one page back
|
|
6309
6399
|
*/
|
|
6310
6400
|
SacPagingCommon.prototype.previousPage = function () {
|
|
6311
6401
|
if (this.activePageIndex !== this.firstPageIndex) {
|
|
@@ -6315,7 +6405,7 @@
|
|
|
6315
6405
|
// #endregion Public Methods
|
|
6316
6406
|
// #region Protected Methods
|
|
6317
6407
|
/**
|
|
6318
|
-
*
|
|
6408
|
+
* Generates the pager data
|
|
6319
6409
|
*/
|
|
6320
6410
|
SacPagingCommon.prototype.createPager = function () {
|
|
6321
6411
|
this.paginators = [];
|
|
@@ -6342,8 +6432,8 @@
|
|
|
6342
6432
|
}
|
|
6343
6433
|
};
|
|
6344
6434
|
/**
|
|
6345
|
-
*
|
|
6346
|
-
* @param totalPageCount Total
|
|
6435
|
+
* Returns the last page index.
|
|
6436
|
+
* @param totalPageCount Total number of pages
|
|
6347
6437
|
*/
|
|
6348
6438
|
SacPagingCommon.prototype.getEndPageIndex = function (totalPageCount) {
|
|
6349
6439
|
var endingPageToDisplay = this.activePageIndex + 2;
|
|
@@ -6357,8 +6447,8 @@
|
|
|
6357
6447
|
return endingPageToDisplay;
|
|
6358
6448
|
};
|
|
6359
6449
|
/**
|
|
6360
|
-
*
|
|
6361
|
-
* @param totalPageCount Total
|
|
6450
|
+
* Returns the start index
|
|
6451
|
+
* @param totalPageCount Total number of pages
|
|
6362
6452
|
*/
|
|
6363
6453
|
SacPagingCommon.prototype.getStartPageIndex = function (totalPageCount) {
|
|
6364
6454
|
var startingPageToDisplay = 0;
|
|
@@ -6372,7 +6462,7 @@
|
|
|
6372
6462
|
return startingPageToDisplay;
|
|
6373
6463
|
};
|
|
6374
6464
|
/**
|
|
6375
|
-
*
|
|
6465
|
+
* method triggers the event that paging has taken place
|
|
6376
6466
|
*/
|
|
6377
6467
|
SacPagingCommon.prototype.paged = function (newPageIndex) {
|
|
6378
6468
|
var pagerData = new PagerRequest(this.pageSize, newPageIndex);
|
|
@@ -6582,6 +6672,7 @@
|
|
|
6582
6672
|
function SacDateCommon(formlayout, injector, elementRef) {
|
|
6583
6673
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
6584
6674
|
_this.elementRef = elementRef;
|
|
6675
|
+
// #region Properties
|
|
6585
6676
|
/**
|
|
6586
6677
|
* Format des Datums
|
|
6587
6678
|
*/
|
|
@@ -6643,7 +6734,6 @@
|
|
|
6643
6734
|
* Definiert ob der Date Selector angezeigt wird
|
|
6644
6735
|
*/
|
|
6645
6736
|
_this._showselector = false;
|
|
6646
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
6647
6737
|
return _this;
|
|
6648
6738
|
}
|
|
6649
6739
|
Object.defineProperty(SacDateCommon.prototype, "maxdate", {
|
|
@@ -7271,6 +7361,7 @@
|
|
|
7271
7361
|
function SacDateTimeCommon(formlayout, injector, elementRef) {
|
|
7272
7362
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
7273
7363
|
_this.elementRef = elementRef;
|
|
7364
|
+
// #region Properties
|
|
7274
7365
|
/**
|
|
7275
7366
|
* Format des Datums
|
|
7276
7367
|
*/
|
|
@@ -7347,7 +7438,6 @@
|
|
|
7347
7438
|
* Definiert ob der Date Selector angezeigt wird
|
|
7348
7439
|
*/
|
|
7349
7440
|
_this._showselector = false;
|
|
7350
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
7351
7441
|
return _this;
|
|
7352
7442
|
}
|
|
7353
7443
|
Object.defineProperty(SacDateTimeCommon.prototype, "maxdate", {
|
|
@@ -7508,6 +7598,7 @@
|
|
|
7508
7598
|
function SacTimeCommon(formlayout, injector, elementRef) {
|
|
7509
7599
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
7510
7600
|
_this.elementRef = elementRef;
|
|
7601
|
+
// #region Properties
|
|
7511
7602
|
/**
|
|
7512
7603
|
* Format des Datums
|
|
7513
7604
|
*/
|
|
@@ -7564,7 +7655,6 @@
|
|
|
7564
7655
|
* Definiert ob der Date Selector angezeigt wird
|
|
7565
7656
|
*/
|
|
7566
7657
|
_this._showselector = false;
|
|
7567
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
7568
7658
|
return _this;
|
|
7569
7659
|
}
|
|
7570
7660
|
Object.defineProperty(SacTimeCommon.prototype, "maxtime", {
|
|
@@ -7719,11 +7809,8 @@
|
|
|
7719
7809
|
* Definiert den Container als Required Form Item
|
|
7720
7810
|
*/
|
|
7721
7811
|
_this._isrequired = false;
|
|
7722
|
-
/**
|
|
7723
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
7724
|
-
*/
|
|
7725
|
-
_this.tooltiptext = '';
|
|
7726
7812
|
return _this;
|
|
7813
|
+
// #endregion Public Methods
|
|
7727
7814
|
}
|
|
7728
7815
|
Object.defineProperty(SacStaticFormContainerCommon.prototype, "isrequired", {
|
|
7729
7816
|
/**
|
|
@@ -7732,6 +7819,8 @@
|
|
|
7732
7819
|
get: function () {
|
|
7733
7820
|
return this._isrequired;
|
|
7734
7821
|
},
|
|
7822
|
+
// #endregion Properties
|
|
7823
|
+
// #region Public Getters And Setters
|
|
7735
7824
|
/**
|
|
7736
7825
|
* Definiert den Container als Required Form Item
|
|
7737
7826
|
*/
|
|
@@ -7741,6 +7830,8 @@
|
|
|
7741
7830
|
enumerable: false,
|
|
7742
7831
|
configurable: true
|
|
7743
7832
|
});
|
|
7833
|
+
// #endregion Public Getters And Setters
|
|
7834
|
+
// #region Public Methods
|
|
7744
7835
|
/**
|
|
7745
7836
|
* Validierung des Controls
|
|
7746
7837
|
*
|
|
@@ -7758,7 +7849,6 @@
|
|
|
7758
7849
|
{ type: i0.Directive }
|
|
7759
7850
|
];
|
|
7760
7851
|
SacStaticFormContainerCommon.propDecorators = {
|
|
7761
|
-
tooltiptext: [{ type: i0.Input }],
|
|
7762
7852
|
isrequired: [{ type: i0.Input }]
|
|
7763
7853
|
};
|
|
7764
7854
|
|
|
@@ -8671,15 +8761,17 @@
|
|
|
8671
8761
|
/**
|
|
8672
8762
|
* Tooltip Component
|
|
8673
8763
|
*
|
|
8674
|
-
*
|
|
8675
|
-
* - container: Container
|
|
8676
|
-
* - 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
|
|
8677
8767
|
*
|
|
8678
|
-
* Tooltip
|
|
8679
|
-
*
|
|
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.
|
|
8680
8770
|
*
|
|
8681
8771
|
*/
|
|
8682
8772
|
var SacTooltipCommon = /** @class */ (function () {
|
|
8773
|
+
// #endregion Properties
|
|
8774
|
+
// #region Constructors
|
|
8683
8775
|
/**
|
|
8684
8776
|
* Konstruktor
|
|
8685
8777
|
* @param ref Element Referenz
|
|
@@ -8689,50 +8781,56 @@
|
|
|
8689
8781
|
this.cdRef = cdRef;
|
|
8690
8782
|
this.ref = ref;
|
|
8691
8783
|
/**
|
|
8692
|
-
*
|
|
8693
|
-
*/
|
|
8694
|
-
this.TooltipPosition = exports.TooltipPosition;
|
|
8695
|
-
/**
|
|
8696
|
-
* Definiert ob der Tooltip sichtbar ist
|
|
8784
|
+
* Defines whether the tooltip is visible
|
|
8697
8785
|
*/
|
|
8698
8786
|
this._isTooltipVisible = false;
|
|
8699
8787
|
/**
|
|
8700
|
-
*
|
|
8788
|
+
* method if content has changed and proportions need to be reset in the UI.
|
|
8701
8789
|
*/
|
|
8702
|
-
this.
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
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
|
+
};
|
|
8707
8800
|
/**
|
|
8708
|
-
* Position
|
|
8801
|
+
* Position of the tooltip. Values: left|top|right|bottom|auto
|
|
8709
8802
|
*
|
|
8710
|
-
*
|
|
8803
|
+
* Value 'auto' can be combined with another value.
|
|
8711
8804
|
*/
|
|
8712
8805
|
this.position = 'right|auto';
|
|
8713
8806
|
/**
|
|
8714
|
-
*
|
|
8807
|
+
* Position of the tooltip on the left
|
|
8715
8808
|
*/
|
|
8716
8809
|
this.IsTooltipContentVisible = false;
|
|
8717
8810
|
/**
|
|
8718
|
-
*
|
|
8811
|
+
* Position des Tooltips links
|
|
8719
8812
|
*/
|
|
8720
|
-
this.
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
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;
|
|
8726
8822
|
}
|
|
8727
8823
|
Object.defineProperty(SacTooltipCommon.prototype, "inlinemode", {
|
|
8728
8824
|
/**
|
|
8729
|
-
*
|
|
8825
|
+
* Property for inline mode for tooltip. Sets the display mode on the wrapper element to `inline`
|
|
8730
8826
|
*/
|
|
8731
8827
|
get: function () {
|
|
8732
8828
|
return this._inlinemode;
|
|
8733
8829
|
},
|
|
8830
|
+
// #endregion Constructors
|
|
8831
|
+
// #region Public Getters And Setters
|
|
8734
8832
|
/**
|
|
8735
|
-
* Setter
|
|
8833
|
+
* Setter for inline mode for tooltip
|
|
8736
8834
|
*/
|
|
8737
8835
|
set: function (value) {
|
|
8738
8836
|
this._inlinemode = convertToBoolean(value);
|
|
@@ -8742,7 +8840,7 @@
|
|
|
8742
8840
|
});
|
|
8743
8841
|
Object.defineProperty(SacTooltipCommon.prototype, "tooltip", {
|
|
8744
8842
|
/**
|
|
8745
|
-
* Setter
|
|
8843
|
+
* Setter for the name of the container for the tooltip. Is required as the tooltip can be hidden via ngIf.
|
|
8746
8844
|
*/
|
|
8747
8845
|
set: function (content) {
|
|
8748
8846
|
if (content !== undefined) {
|
|
@@ -8755,128 +8853,84 @@
|
|
|
8755
8853
|
enumerable: false,
|
|
8756
8854
|
configurable: true
|
|
8757
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
|
|
8758
8865
|
/**
|
|
8759
|
-
*
|
|
8866
|
+
* Returns the position of the tooltip
|
|
8760
8867
|
*/
|
|
8761
|
-
SacTooltipCommon.prototype.
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
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;
|
|
8767
8874
|
}
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
SacTooltipCommon.prototype.ngOnDestroy = function () {
|
|
8773
|
-
// Unregister Event Listener
|
|
8774
|
-
window.removeEventListener('scroll', this.onContentChange, true);
|
|
8775
|
-
window.removeEventListener('resize', this.onContentChange, true);
|
|
8776
|
-
if (this.tooltipcontainer !== undefined) {
|
|
8777
|
-
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;
|
|
8778
8879
|
}
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
SacTooltipCommon.prototype.getTopPosition = function () {
|
|
8784
|
-
if (this.content !== null && this.content !== undefined) {
|
|
8785
|
-
var item = this.content.nativeElement;
|
|
8786
|
-
if (item.children.length >= 1) {
|
|
8787
|
-
var childItem = item.firstElementChild;
|
|
8788
|
-
var contentPosition = childItem.getBoundingClientRect();
|
|
8789
|
-
switch (this.GetTooltipPosition()) {
|
|
8790
|
-
case exports.TooltipPosition.top:
|
|
8791
|
-
this.TopPos = contentPosition.top - this.getToolTipHeight();
|
|
8792
|
-
return contentPosition.top - this.getToolTipHeight();
|
|
8793
|
-
case exports.TooltipPosition.right:
|
|
8794
|
-
this.TopPos = contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8795
|
-
return contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8796
|
-
case exports.TooltipPosition.bottom:
|
|
8797
|
-
this.TopPos = contentPosition.top + contentPosition.height;
|
|
8798
|
-
return contentPosition.top + contentPosition.height;
|
|
8799
|
-
case exports.TooltipPosition.left:
|
|
8800
|
-
this.TopPos = contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8801
|
-
return contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8802
|
-
}
|
|
8803
|
-
return childItem.clientTop + childItem.offsetTop - ((this.getToolTipHeight() / 2) - (childItem.clientHeight / 2));
|
|
8804
|
-
}
|
|
8805
|
-
else {
|
|
8806
|
-
return this.content.nativeElement.offsetTop;
|
|
8807
|
-
}
|
|
8880
|
+
// tslint:disable-next-line:no-bitwise
|
|
8881
|
+
if (this.HasPosition(exports.TooltipPosition.left) &&
|
|
8882
|
+
validPositions & exports.TooltipPosition.left) {
|
|
8883
|
+
return exports.TooltipPosition.left;
|
|
8808
8884
|
}
|
|
8809
|
-
|
|
8810
|
-
|
|
8885
|
+
// tslint:disable-next-line:no-bitwise
|
|
8886
|
+
if (this.HasPosition(exports.TooltipPosition.bottom) &&
|
|
8887
|
+
validPositions & exports.TooltipPosition.bottom) {
|
|
8888
|
+
return exports.TooltipPosition.bottom;
|
|
8811
8889
|
}
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
if (this.content !== null && this.content !== undefined) {
|
|
8818
|
-
var item = this.content.nativeElement;
|
|
8819
|
-
if (item.children.length >= 1) {
|
|
8820
|
-
var childItem = item.firstElementChild;
|
|
8821
|
-
var contentPosition = childItem.getBoundingClientRect();
|
|
8822
|
-
switch (this.GetTooltipPosition()) {
|
|
8823
|
-
case exports.TooltipPosition.top:
|
|
8824
|
-
this.LeftPos = contentPosition.left + (contentPosition.width / 2) - (this.getToolTipWidth() / 2);
|
|
8825
|
-
return contentPosition.left + (contentPosition.width / 2) - (this.getToolTipWidth() / 2);
|
|
8826
|
-
case exports.TooltipPosition.right:
|
|
8827
|
-
this.LeftPos = contentPosition.left + contentPosition.width;
|
|
8828
|
-
return contentPosition.left + contentPosition.width;
|
|
8829
|
-
case exports.TooltipPosition.bottom:
|
|
8830
|
-
this.LeftPos = contentPosition.left + (childItem.clientWidth / 2) - (this.getToolTipWidth() / 2);
|
|
8831
|
-
return contentPosition.left + (childItem.clientWidth / 2) - (this.getToolTipWidth() / 2);
|
|
8832
|
-
case exports.TooltipPosition.left:
|
|
8833
|
-
this.LeftPos = contentPosition.left - this.getToolTipWidth();
|
|
8834
|
-
return contentPosition.left - this.getToolTipWidth();
|
|
8835
|
-
}
|
|
8836
|
-
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;
|
|
8837
8895
|
}
|
|
8838
|
-
|
|
8839
|
-
|
|
8896
|
+
// tslint:disable-next-line:no-bitwise
|
|
8897
|
+
if (validPositions & exports.TooltipPosition.top) {
|
|
8898
|
+
return exports.TooltipPosition.top;
|
|
8840
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;
|
|
8841
8909
|
}
|
|
8842
8910
|
else {
|
|
8843
|
-
return this.
|
|
8844
|
-
}
|
|
8845
|
-
};
|
|
8846
|
-
/**
|
|
8847
|
-
* Berechnet die Höhe des Tooltips
|
|
8848
|
-
*/
|
|
8849
|
-
SacTooltipCommon.prototype.getToolTipHeight = function () {
|
|
8850
|
-
if (this.tooltipcontainer) {
|
|
8851
|
-
return this.tooltipcontainer.nativeElement.clientHeight;
|
|
8852
|
-
}
|
|
8853
|
-
else {
|
|
8854
|
-
return 0;
|
|
8911
|
+
return this.GetPosition();
|
|
8855
8912
|
}
|
|
8856
8913
|
};
|
|
8857
8914
|
/**
|
|
8858
|
-
*
|
|
8915
|
+
* Hide tooltip
|
|
8859
8916
|
*/
|
|
8860
|
-
SacTooltipCommon.prototype.
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
}
|
|
8864
|
-
else {
|
|
8865
|
-
return 0;
|
|
8866
|
-
}
|
|
8917
|
+
SacTooltipCommon.prototype.HideTooltip = function () {
|
|
8918
|
+
this._isTooltipVisible = false;
|
|
8919
|
+
this.IsTooltipContentVisible = false;
|
|
8867
8920
|
};
|
|
8868
8921
|
/**
|
|
8869
|
-
*
|
|
8922
|
+
* Defines whether the tooltip is present in the markup
|
|
8870
8923
|
*/
|
|
8871
8924
|
SacTooltipCommon.prototype.IsTooltipVisible = function () {
|
|
8872
8925
|
return this._isTooltipVisible;
|
|
8873
8926
|
};
|
|
8874
8927
|
/**
|
|
8875
|
-
*
|
|
8928
|
+
* Show tooltip
|
|
8876
8929
|
*/
|
|
8877
8930
|
SacTooltipCommon.prototype.ShowTooltip = function () {
|
|
8878
8931
|
var _this = this;
|
|
8879
8932
|
this._isTooltipVisible = true;
|
|
8933
|
+
this.cdRef.detectChanges();
|
|
8880
8934
|
setTimeout(function () {
|
|
8881
8935
|
_this.getLeftPosition();
|
|
8882
8936
|
_this.getTopPosition();
|
|
@@ -8884,66 +8938,75 @@
|
|
|
8884
8938
|
});
|
|
8885
8939
|
};
|
|
8886
8940
|
/**
|
|
8887
|
-
*
|
|
8941
|
+
* Calculates the height of the tooltip
|
|
8888
8942
|
*/
|
|
8889
|
-
SacTooltipCommon.prototype.
|
|
8890
|
-
|
|
8891
|
-
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
|
+
}
|
|
8892
8951
|
};
|
|
8893
8952
|
/**
|
|
8894
|
-
*
|
|
8953
|
+
* Calculates the width of the tooltips
|
|
8895
8954
|
*/
|
|
8896
|
-
SacTooltipCommon.prototype.
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
if (this.HasPosition(exports.TooltipPosition.right) && (validPositions & exports.TooltipPosition.right)) {
|
|
8900
|
-
return exports.TooltipPosition.right;
|
|
8901
|
-
}
|
|
8902
|
-
// tslint:disable-next-line:no-bitwise
|
|
8903
|
-
if (this.HasPosition(exports.TooltipPosition.top) && (validPositions & exports.TooltipPosition.top)) {
|
|
8904
|
-
return exports.TooltipPosition.top;
|
|
8955
|
+
SacTooltipCommon.prototype.getToolTipWidth = function () {
|
|
8956
|
+
if (this.tooltipcontainer) {
|
|
8957
|
+
return this.tooltipcontainer.nativeElement.firstElementChild.clientWidth;
|
|
8905
8958
|
}
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
return exports.TooltipPosition.left;
|
|
8959
|
+
else {
|
|
8960
|
+
return 0;
|
|
8909
8961
|
}
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
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;
|
|
8913
8970
|
}
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
}
|
|
8924
|
-
// tslint:disable-next-line:no-bitwise
|
|
8925
|
-
if (validPositions & exports.TooltipPosition.left) {
|
|
8926
|
-
return exports.TooltipPosition.left;
|
|
8927
|
-
}
|
|
8928
|
-
// tslint:disable-next-line:no-bitwise
|
|
8929
|
-
if (validPositions & exports.TooltipPosition.bottom) {
|
|
8930
|
-
return exports.TooltipPosition.bottom;
|
|
8931
|
-
}
|
|
8932
|
-
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;
|
|
8933
8980
|
}
|
|
8934
|
-
|
|
8935
|
-
|
|
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);
|
|
8936
8993
|
}
|
|
8937
8994
|
};
|
|
8938
8995
|
/**
|
|
8939
|
-
*
|
|
8996
|
+
* Event when the control is initialized
|
|
8940
8997
|
*/
|
|
8941
|
-
SacTooltipCommon.prototype.
|
|
8942
|
-
|
|
8943
|
-
|
|
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
|
+
}
|
|
8944
9005
|
};
|
|
9006
|
+
// #endregion Protected Abstract Methods
|
|
9007
|
+
// #region Private Methods
|
|
8945
9008
|
/**
|
|
8946
|
-
*
|
|
9009
|
+
* Returns the defined position for the tooltip
|
|
8947
9010
|
*/
|
|
8948
9011
|
SacTooltipCommon.prototype.GetPosition = function () {
|
|
8949
9012
|
var positions = this.position.split('|');
|
|
@@ -8963,9 +9026,9 @@
|
|
|
8963
9026
|
return exports.TooltipPosition.right;
|
|
8964
9027
|
};
|
|
8965
9028
|
/**
|
|
8966
|
-
*
|
|
9029
|
+
* Returns whether the position has been configured
|
|
8967
9030
|
*
|
|
8968
|
-
* @param position Position
|
|
9031
|
+
* @param position Position to be checked
|
|
8969
9032
|
*/
|
|
8970
9033
|
SacTooltipCommon.prototype.HasPosition = function (position) {
|
|
8971
9034
|
var positions = this.position.split('|');
|
|
@@ -8978,13 +9041,21 @@
|
|
|
8978
9041
|
if (position === exports.TooltipPosition.left && positions.indexOf('left') >= 0) {
|
|
8979
9042
|
return true;
|
|
8980
9043
|
}
|
|
8981
|
-
if (position === exports.TooltipPosition.bottom &&
|
|
9044
|
+
if (position === exports.TooltipPosition.bottom &&
|
|
9045
|
+
positions.indexOf('bottom') >= 0) {
|
|
8982
9046
|
return true;
|
|
8983
9047
|
}
|
|
8984
9048
|
return false;
|
|
8985
9049
|
};
|
|
8986
9050
|
/**
|
|
8987
|
-
*
|
|
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
|
|
8988
9059
|
*/
|
|
8989
9060
|
SacTooltipCommon.prototype.ValidatePositions = function () {
|
|
8990
9061
|
// Check if Container is false
|
|
@@ -8993,15 +9064,15 @@
|
|
|
8993
9064
|
}
|
|
8994
9065
|
var allowedPositions = exports.TooltipPosition.none;
|
|
8995
9066
|
var basePosition = this.content.nativeElement.firstElementChild.getBoundingClientRect();
|
|
8996
|
-
var tooltipRect = this.tooltipcontainer.nativeElement.getBoundingClientRect();
|
|
8997
|
-
var leftPosOk = basePosition.left - tooltipRect.width > 0;
|
|
8998
|
-
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;
|
|
8999
9070
|
var topPosOk = basePosition.top - tooltipRect.height > 0;
|
|
9000
9071
|
var bottomPosOk = basePosition.bottom + tooltipRect.height < window.innerHeight;
|
|
9001
|
-
var leftHalfPosOk = basePosition.left -
|
|
9002
|
-
var rightHalfPosOk = basePosition.right +
|
|
9003
|
-
var topHalfPosOk = basePosition.top -
|
|
9004
|
-
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;
|
|
9005
9076
|
if (leftPosOk && topHalfPosOk && bottomHalfPosOk) {
|
|
9006
9077
|
// tslint:disable-next-line:no-bitwise
|
|
9007
9078
|
allowedPositions = allowedPositions | exports.TooltipPosition.left;
|
|
@@ -9020,6 +9091,100 @@
|
|
|
9020
9091
|
}
|
|
9021
9092
|
return allowedPositions;
|
|
9022
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
|
+
};
|
|
9023
9188
|
return SacTooltipCommon;
|
|
9024
9189
|
}());
|
|
9025
9190
|
SacTooltipCommon.decorators = [
|
|
@@ -9032,9 +9197,9 @@
|
|
|
9032
9197
|
SacTooltipCommon.propDecorators = {
|
|
9033
9198
|
position: [{ type: i0.Input }],
|
|
9034
9199
|
tooltiptext: [{ type: i0.Input }],
|
|
9035
|
-
inlinemode: [{ type: i0.Input }],
|
|
9036
9200
|
content: [{ type: i0.ViewChild, args: ['container', { static: true },] }],
|
|
9037
|
-
|
|
9201
|
+
inlinemode: [{ type: i0.Input }],
|
|
9202
|
+
tooltip: [{ type: i0.ViewChild, args: ['tooltip', { static: false },] }]
|
|
9038
9203
|
};
|
|
9039
9204
|
|
|
9040
9205
|
// #region Classes
|
|
@@ -9106,7 +9271,6 @@
|
|
|
9106
9271
|
};
|
|
9107
9272
|
_this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
9108
9273
|
_this.lngResourceService = injector.get(SACLOCALISATION_SERVICE, new SacDefaultLocalisationService(_this.validationKeyService));
|
|
9109
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
9110
9274
|
_this.uploads = [];
|
|
9111
9275
|
_this.options.allowedTypes = '*';
|
|
9112
9276
|
_this.options.concurrency = 1;
|