@simpleangularcontrols/sac-common 10.0.0-rc.1 → 10.0.0-rc.10
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 +687 -414
- 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 +12 -3
- 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/input/inputsearch.d.ts +13 -4
- package/controls/layout/formlayout.d.ts +13 -1
- 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 +44 -7
- package/esm2015/common/baseuploadcontrol.js +2 -3
- package/esm2015/controls/checkbox/checkbox.js +29 -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/input/inputsearch.js +35 -6
- package/esm2015/controls/layout/formlayout.js +14 -3
- 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/public_api.js +10 -3
- package/esm2015/services/sac-configuration.service.js +25 -1
- package/esm2015/services/sac-icon.service.js +13 -1
- package/esm2015/simpleangularcontrols-sac-common.js +1 -7
- package/esm2015/utilities/guid.js +4 -2
- package/esm2015/validation/isDateValid.js +9 -1
- package/fesm2015/simpleangularcontrols-sac-common.js +640 -394
- package/fesm2015/simpleangularcontrols-sac-common.js.map +1 -1
- package/interfaces/ISacConfigurationService.d.ts +16 -0
- package/interfaces/ISacIconService.d.ts +8 -0
- package/package.json +4 -4
- package/public_api.d.ts +7 -1
- package/services/sac-configuration.service.d.ts +32 -0
- package/services/sac-icon.service.d.ts +16 -0
- package/simpleangularcontrols-sac-common-10.0.0-rc.10.tgz +0 -0
- package/simpleangularcontrols-sac-common.d.ts +0 -6
- package/simpleangularcontrols-sac-common.metadata.json +1 -1
- package/simpleangularcontrols-sac-common-10.0.0-rc.1.tgz +0 -0
|
@@ -648,6 +648,10 @@
|
|
|
648
648
|
var SacFormLayoutCommon = /** @class */ (function () {
|
|
649
649
|
function SacFormLayoutCommon() {
|
|
650
650
|
// #region Properties
|
|
651
|
+
/**
|
|
652
|
+
* Defines the default display for a checkbox. You can choose between a checkbox and a switch. If no style is defined, the global style or the style on the control is used.
|
|
653
|
+
*/
|
|
654
|
+
this.checkboxstyle = null;
|
|
651
655
|
/**
|
|
652
656
|
* Defines the standard height of the components
|
|
653
657
|
*/
|
|
@@ -655,7 +659,11 @@
|
|
|
655
659
|
/**
|
|
656
660
|
* defines that error messages are displayed under the controls
|
|
657
661
|
*/
|
|
658
|
-
this.inlineError =
|
|
662
|
+
this.inlineError = null;
|
|
663
|
+
/**
|
|
664
|
+
* Defines if InputSearch uses an icon at the button or the text
|
|
665
|
+
*/
|
|
666
|
+
this.inputsearchiconmode = null;
|
|
659
667
|
/**
|
|
660
668
|
* defines that the labels are displayed as adaptive labels
|
|
661
669
|
*/
|
|
@@ -693,7 +701,7 @@
|
|
|
693
701
|
* Returns whether the inline error messages for the form are active.
|
|
694
702
|
*/
|
|
695
703
|
get: function () {
|
|
696
|
-
return this.inlineError
|
|
704
|
+
return this.inlineError;
|
|
697
705
|
},
|
|
698
706
|
enumerable: false,
|
|
699
707
|
configurable: true
|
|
@@ -704,8 +712,11 @@
|
|
|
704
712
|
{ type: i0.Directive }
|
|
705
713
|
];
|
|
706
714
|
SacFormLayoutCommon.propDecorators = {
|
|
715
|
+
checkboxstyle: [{ type: i0.Input }],
|
|
707
716
|
componentHeight: [{ type: i0.Input }],
|
|
717
|
+
helptextmode: [{ type: i0.Input }],
|
|
708
718
|
inlineError: [{ type: i0.Input }],
|
|
719
|
+
inputsearchiconmode: [{ type: i0.Input }],
|
|
709
720
|
isAdaptiveLabel: [{ type: i0.Input }],
|
|
710
721
|
labelSizeLg: [{ type: i0.Input }],
|
|
711
722
|
labelSizeMd: [{ type: i0.Input }],
|
|
@@ -754,8 +765,18 @@
|
|
|
754
765
|
function SacDefaultConfigurationService() {
|
|
755
766
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
756
767
|
}
|
|
757
|
-
Object.defineProperty(SacDefaultConfigurationService.prototype, "
|
|
768
|
+
Object.defineProperty(SacDefaultConfigurationService.prototype, "CheckboxStyle", {
|
|
758
769
|
// #region Public Getters And Setters
|
|
770
|
+
/**
|
|
771
|
+
* @inheritdoc
|
|
772
|
+
*/
|
|
773
|
+
get: function () {
|
|
774
|
+
return 'checkbox';
|
|
775
|
+
},
|
|
776
|
+
enumerable: false,
|
|
777
|
+
configurable: true
|
|
778
|
+
});
|
|
779
|
+
Object.defineProperty(SacDefaultConfigurationService.prototype, "ComponentHeight", {
|
|
759
780
|
/**
|
|
760
781
|
* @inheritdoc
|
|
761
782
|
*/
|
|
@@ -775,6 +796,36 @@
|
|
|
775
796
|
enumerable: false,
|
|
776
797
|
configurable: true
|
|
777
798
|
});
|
|
799
|
+
Object.defineProperty(SacDefaultConfigurationService.prototype, "HelptextMode", {
|
|
800
|
+
/**
|
|
801
|
+
* @inheritdoc
|
|
802
|
+
*/
|
|
803
|
+
get: function () {
|
|
804
|
+
return 'text';
|
|
805
|
+
},
|
|
806
|
+
enumerable: false,
|
|
807
|
+
configurable: true
|
|
808
|
+
});
|
|
809
|
+
Object.defineProperty(SacDefaultConfigurationService.prototype, "InlineErrorEnabled", {
|
|
810
|
+
/**
|
|
811
|
+
* @inheritdoc
|
|
812
|
+
*/
|
|
813
|
+
get: function () {
|
|
814
|
+
return true;
|
|
815
|
+
},
|
|
816
|
+
enumerable: false,
|
|
817
|
+
configurable: true
|
|
818
|
+
});
|
|
819
|
+
Object.defineProperty(SacDefaultConfigurationService.prototype, "InputSearchIconMode", {
|
|
820
|
+
/**
|
|
821
|
+
* @inheritdoc
|
|
822
|
+
*/
|
|
823
|
+
get: function () {
|
|
824
|
+
return 'text';
|
|
825
|
+
},
|
|
826
|
+
enumerable: false,
|
|
827
|
+
configurable: true
|
|
828
|
+
});
|
|
778
829
|
Object.defineProperty(SacDefaultConfigurationService.prototype, "LabelSizeLg", {
|
|
779
830
|
/**
|
|
780
831
|
* @inheritdoc
|
|
@@ -1296,6 +1347,16 @@
|
|
|
1296
1347
|
enumerable: false,
|
|
1297
1348
|
configurable: true
|
|
1298
1349
|
});
|
|
1350
|
+
Object.defineProperty(SacDefaultIconService.prototype, "GenericHelptextIcon", {
|
|
1351
|
+
/**
|
|
1352
|
+
* @inheritdoc
|
|
1353
|
+
*/
|
|
1354
|
+
get: function () {
|
|
1355
|
+
return 'fa fa-info-circle';
|
|
1356
|
+
},
|
|
1357
|
+
enumerable: false,
|
|
1358
|
+
configurable: true
|
|
1359
|
+
});
|
|
1299
1360
|
Object.defineProperty(SacDefaultIconService.prototype, "GridComponentSortDown", {
|
|
1300
1361
|
/**
|
|
1301
1362
|
* @inheritdoc
|
|
@@ -1316,6 +1377,16 @@
|
|
|
1316
1377
|
enumerable: false,
|
|
1317
1378
|
configurable: true
|
|
1318
1379
|
});
|
|
1380
|
+
Object.defineProperty(SacDefaultIconService.prototype, "InputSearchButtonIcon", {
|
|
1381
|
+
/**
|
|
1382
|
+
* @inheritdoc
|
|
1383
|
+
*/
|
|
1384
|
+
get: function () {
|
|
1385
|
+
return 'fas fa-search';
|
|
1386
|
+
},
|
|
1387
|
+
enumerable: false,
|
|
1388
|
+
configurable: true
|
|
1389
|
+
});
|
|
1319
1390
|
Object.defineProperty(SacDefaultIconService.prototype, "TimeComponentSelectorIcon", {
|
|
1320
1391
|
/**
|
|
1321
1392
|
* @inheritdoc
|
|
@@ -2530,11 +2601,12 @@
|
|
|
2530
2601
|
return obj;
|
|
2531
2602
|
}
|
|
2532
2603
|
|
|
2604
|
+
// #region Functions
|
|
2533
2605
|
/**
|
|
2534
2606
|
* create a guid with crypto library if availabe and a fallback to Math.Random implementation
|
|
2535
2607
|
*/
|
|
2536
2608
|
function createGuid() {
|
|
2537
|
-
if (typeof crypto !== undefined) {
|
|
2609
|
+
if (typeof crypto !== undefined && crypto['randomUUID'] !== undefined) {
|
|
2538
2610
|
// return guid without hyphen
|
|
2539
2611
|
return crypto['randomUUID']().replace(/\-/gi, '');
|
|
2540
2612
|
}
|
|
@@ -2544,7 +2616,8 @@
|
|
|
2544
2616
|
return v.toString(16);
|
|
2545
2617
|
});
|
|
2546
2618
|
}
|
|
2547
|
-
}
|
|
2619
|
+
}
|
|
2620
|
+
// #endregion Functions
|
|
2548
2621
|
|
|
2549
2622
|
/**
|
|
2550
2623
|
* Abstract Klasse für SacBaseModelControl. Implements ControlValueAccessor, Validator, OnInit
|
|
@@ -2597,6 +2670,10 @@
|
|
|
2597
2670
|
* Deaktiviert das Label im Template
|
|
2598
2671
|
*/
|
|
2599
2672
|
this.disablelabel = false;
|
|
2673
|
+
/**
|
|
2674
|
+
* Text to support the user during input.
|
|
2675
|
+
*/
|
|
2676
|
+
this.helptext = '';
|
|
2600
2677
|
/**
|
|
2601
2678
|
* defines that error messages are displayed under the controls
|
|
2602
2679
|
*/
|
|
@@ -2649,8 +2726,12 @@
|
|
|
2649
2726
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
2650
2727
|
this.lngResourceService = injector.get(SACLOCALISATION_SERVICE, new SacDefaultLocalisationService(this.validationKeyService));
|
|
2651
2728
|
this.configurationService = injector.get(SACCONFIGURATION_SERVICE, new SacDefaultConfigurationService());
|
|
2729
|
+
this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
2652
2730
|
}
|
|
2653
2731
|
Object.defineProperty(SacBaseModelControl.prototype, "inlineerrorenabled", {
|
|
2732
|
+
/**
|
|
2733
|
+
* Show error messages inline
|
|
2734
|
+
*/
|
|
2654
2735
|
get: function () {
|
|
2655
2736
|
return this._inlineerrorenabled;
|
|
2656
2737
|
},
|
|
@@ -2708,6 +2789,16 @@
|
|
|
2708
2789
|
enumerable: false,
|
|
2709
2790
|
configurable: true
|
|
2710
2791
|
});
|
|
2792
|
+
Object.defineProperty(SacBaseModelControl.prototype, "HelptextTooltipIcon", {
|
|
2793
|
+
/**
|
|
2794
|
+
* Get Icon for Helptext Tooltip
|
|
2795
|
+
*/
|
|
2796
|
+
get: function () {
|
|
2797
|
+
return this.iconService.GenericHelptextIcon;
|
|
2798
|
+
},
|
|
2799
|
+
enumerable: false,
|
|
2800
|
+
configurable: true
|
|
2801
|
+
});
|
|
2711
2802
|
Object.defineProperty(SacBaseModelControl.prototype, "dirty", {
|
|
2712
2803
|
/**
|
|
2713
2804
|
* Methode ergibt Boolean Wert für dirty
|
|
@@ -2748,13 +2839,18 @@
|
|
|
2748
2839
|
* Returns whether the inline error messages are active for this control.
|
|
2749
2840
|
*/
|
|
2750
2841
|
get: function () {
|
|
2751
|
-
var _a
|
|
2752
|
-
if (
|
|
2753
|
-
((_b = this.formlayout) === null || _b === void 0 ? void 0 : _b.IsInlineErrorEnabled) === undefined) {
|
|
2842
|
+
var _a;
|
|
2843
|
+
if (this._inlineerrorenabled !== null) {
|
|
2754
2844
|
return this._inlineerrorenabled;
|
|
2755
2845
|
}
|
|
2756
|
-
|
|
2757
|
-
this.
|
|
2846
|
+
if (this.formlayout !== null &&
|
|
2847
|
+
this.formlayout.IsInlineErrorEnabled !== null) {
|
|
2848
|
+
return (_a = this.formlayout) === null || _a === void 0 ? void 0 : _a.IsInlineErrorEnabled;
|
|
2849
|
+
}
|
|
2850
|
+
if (this.configurationService.InlineErrorEnabled !== null) {
|
|
2851
|
+
return this.configurationService.InlineErrorEnabled;
|
|
2852
|
+
}
|
|
2853
|
+
return true;
|
|
2758
2854
|
},
|
|
2759
2855
|
enumerable: false,
|
|
2760
2856
|
configurable: true
|
|
@@ -2851,6 +2947,8 @@
|
|
|
2851
2947
|
this.setComponentHeight();
|
|
2852
2948
|
// set adaptive label property from formlayout directive
|
|
2853
2949
|
this.setIsAdaptiveLabel();
|
|
2950
|
+
// set method to display helptext
|
|
2951
|
+
this.setHelpTextMode();
|
|
2854
2952
|
this.OnClassInit();
|
|
2855
2953
|
};
|
|
2856
2954
|
/**
|
|
@@ -2955,6 +3053,20 @@
|
|
|
2955
3053
|
}
|
|
2956
3054
|
}
|
|
2957
3055
|
};
|
|
3056
|
+
/**
|
|
3057
|
+
* Set mode for helptext. Can be tooltip or text
|
|
3058
|
+
*/
|
|
3059
|
+
SacBaseModelControl.prototype.setHelpTextMode = function () {
|
|
3060
|
+
var _a;
|
|
3061
|
+
if (!this.helptextmode) {
|
|
3062
|
+
if ((_a = this.formlayout) === null || _a === void 0 ? void 0 : _a.helptextmode) {
|
|
3063
|
+
this.helptextmode = this.formlayout.helptextmode;
|
|
3064
|
+
}
|
|
3065
|
+
else {
|
|
3066
|
+
this.helptextmode = this.configurationService.HelptextMode;
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
};
|
|
2958
3070
|
/**
|
|
2959
3071
|
* Set adaptive label property from parent layout control
|
|
2960
3072
|
*/
|
|
@@ -3042,6 +3154,8 @@
|
|
|
3042
3154
|
componentHeight: [{ type: i0.Input }],
|
|
3043
3155
|
disabled: [{ type: i0.Input }],
|
|
3044
3156
|
disablelabel: [{ type: i0.Input }],
|
|
3157
|
+
helptext: [{ type: i0.Input }],
|
|
3158
|
+
helptextmode: [{ type: i0.Input }],
|
|
3045
3159
|
inlineError: [{ type: i0.Input }],
|
|
3046
3160
|
isAdaptiveLabel: [{ type: i0.Input }],
|
|
3047
3161
|
labelSizeLg: [{ type: i0.Input }],
|
|
@@ -3063,29 +3177,51 @@
|
|
|
3063
3177
|
__extends(SacCheckboxCommon, _super);
|
|
3064
3178
|
function SacCheckboxCommon() {
|
|
3065
3179
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3066
|
-
/**
|
|
3067
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
3068
|
-
*/
|
|
3069
|
-
_this.tooltiptext = '';
|
|
3070
3180
|
/**
|
|
3071
3181
|
* Defines that the checkbox can be used in a list of checkboxes and is not handled as a single form control
|
|
3072
3182
|
*/
|
|
3073
3183
|
_this.stacked = false;
|
|
3074
3184
|
return _this;
|
|
3185
|
+
// #endregion Private Methods
|
|
3075
3186
|
}
|
|
3187
|
+
// #endregion Properties
|
|
3188
|
+
// #region Public Methods
|
|
3189
|
+
/**
|
|
3190
|
+
* Init Event
|
|
3191
|
+
*/
|
|
3192
|
+
SacCheckboxCommon.prototype.ngOnInit = function () {
|
|
3193
|
+
_super.prototype.ngOnInit.call(this);
|
|
3194
|
+
this.setCheckboxStyle();
|
|
3195
|
+
};
|
|
3076
3196
|
/**
|
|
3077
3197
|
* Control hat keinen Validator
|
|
3078
3198
|
*/
|
|
3079
3199
|
SacCheckboxCommon.prototype.validateData = function (c) {
|
|
3080
3200
|
return null;
|
|
3081
3201
|
};
|
|
3202
|
+
// #endregion Public Methods
|
|
3203
|
+
// #region Private Methods
|
|
3204
|
+
/**
|
|
3205
|
+
* Adopts the default display if no display has been defined on the component.
|
|
3206
|
+
*/
|
|
3207
|
+
SacCheckboxCommon.prototype.setCheckboxStyle = function () {
|
|
3208
|
+
var _a;
|
|
3209
|
+
if (!this.checkboxstyle) {
|
|
3210
|
+
if ((_a = this.formlayout) === null || _a === void 0 ? void 0 : _a.checkboxstyle) {
|
|
3211
|
+
this.checkboxstyle = this.formlayout.checkboxstyle;
|
|
3212
|
+
}
|
|
3213
|
+
else {
|
|
3214
|
+
this.checkboxstyle = this.configurationService.CheckboxStyle;
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
};
|
|
3082
3218
|
return SacCheckboxCommon;
|
|
3083
3219
|
}(SacBaseModelControl));
|
|
3084
3220
|
SacCheckboxCommon.decorators = [
|
|
3085
3221
|
{ type: i0.Directive }
|
|
3086
3222
|
];
|
|
3087
3223
|
SacCheckboxCommon.propDecorators = {
|
|
3088
|
-
|
|
3224
|
+
checkboxstyle: [{ type: i0.Input }],
|
|
3089
3225
|
checkboxtext: [{ type: i0.Input }],
|
|
3090
3226
|
stacked: [{ type: i0.Input }]
|
|
3091
3227
|
};
|
|
@@ -3142,19 +3278,27 @@
|
|
|
3142
3278
|
};
|
|
3143
3279
|
}
|
|
3144
3280
|
|
|
3281
|
+
// #region Variables
|
|
3145
3282
|
/**
|
|
3146
3283
|
* Moment
|
|
3147
3284
|
*/
|
|
3148
3285
|
var moment = moment___default['default'];
|
|
3286
|
+
// #endregion Variables
|
|
3287
|
+
// #region Functions
|
|
3149
3288
|
function isDateValid(value, format) {
|
|
3150
3289
|
// NULL ist gültig
|
|
3151
3290
|
if (value === null || value === undefined || value === '') {
|
|
3152
3291
|
return true;
|
|
3153
3292
|
}
|
|
3293
|
+
// Check is Iso Date (From API Call)
|
|
3294
|
+
if (moment(value, moment_.ISO_8601, true).isValid()) {
|
|
3295
|
+
return true;
|
|
3296
|
+
}
|
|
3154
3297
|
var date = moment(value, [format], true);
|
|
3155
3298
|
date = date.utc();
|
|
3156
3299
|
return date.isValid();
|
|
3157
|
-
}
|
|
3300
|
+
}
|
|
3301
|
+
// #endregion Functions
|
|
3158
3302
|
|
|
3159
3303
|
function isValidDateValidator(validationMessage, validationMessageSummary) {
|
|
3160
3304
|
return function (control) {
|
|
@@ -5001,10 +5145,6 @@
|
|
|
5001
5145
|
* Macht das Input readonly
|
|
5002
5146
|
*/
|
|
5003
5147
|
_this.readonly = false;
|
|
5004
|
-
/**
|
|
5005
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
5006
|
-
*/
|
|
5007
|
-
_this.tooltiptext = '';
|
|
5008
5148
|
return _this;
|
|
5009
5149
|
// #endregion Protected Methods
|
|
5010
5150
|
}
|
|
@@ -5048,8 +5188,7 @@
|
|
|
5048
5188
|
isrequired: [{ type: i0.Input }],
|
|
5049
5189
|
placeholder: [{ type: i0.Input }],
|
|
5050
5190
|
readonly: [{ type: i0.Input }],
|
|
5051
|
-
regexvalidation: [{ type: i0.Input }]
|
|
5052
|
-
tooltiptext: [{ type: i0.Input }]
|
|
5191
|
+
regexvalidation: [{ type: i0.Input }]
|
|
5053
5192
|
};
|
|
5054
5193
|
|
|
5055
5194
|
/**
|
|
@@ -5573,60 +5712,100 @@
|
|
|
5573
5712
|
__extends(SacInputSearchCommon, _super);
|
|
5574
5713
|
function SacInputSearchCommon() {
|
|
5575
5714
|
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
5576
|
-
/**
|
|
5577
|
-
* Name des Such-Icons
|
|
5578
|
-
*/
|
|
5579
|
-
_this.iconname = '';
|
|
5580
5715
|
/**
|
|
5581
5716
|
* Text welcher auf dem Button angezeigt wird
|
|
5582
5717
|
*/
|
|
5583
5718
|
_this.buttontext = '';
|
|
5719
|
+
/**
|
|
5720
|
+
* Name des Such-Icons
|
|
5721
|
+
*/
|
|
5722
|
+
_this.iconname = '';
|
|
5584
5723
|
/**
|
|
5585
5724
|
* Event wenn auf das Such-Icon geclickt wird
|
|
5586
5725
|
*/
|
|
5587
5726
|
_this.clicked = new i0.EventEmitter();
|
|
5588
5727
|
return _this;
|
|
5728
|
+
// #endregion Private Methods
|
|
5589
5729
|
}
|
|
5730
|
+
// #endregion Properties
|
|
5731
|
+
// #region Public Methods
|
|
5732
|
+
/**
|
|
5733
|
+
* Init Event
|
|
5734
|
+
*/
|
|
5735
|
+
SacInputSearchCommon.prototype.ngOnInit = function () {
|
|
5736
|
+
_super.prototype.ngOnInit.call(this);
|
|
5737
|
+
this.setButtonMode();
|
|
5738
|
+
if (!this.iconname) {
|
|
5739
|
+
this.iconname = this.iconService.InputSearchButtonIcon;
|
|
5740
|
+
}
|
|
5741
|
+
};
|
|
5590
5742
|
/**
|
|
5591
5743
|
* Methode sendet den Wert des Inputs durch das Event
|
|
5592
5744
|
*/
|
|
5593
5745
|
SacInputSearchCommon.prototype.searchClick = function () {
|
|
5594
5746
|
this.clicked.emit(this.value);
|
|
5595
5747
|
};
|
|
5748
|
+
// #endregion Public Methods
|
|
5749
|
+
// #region Private Methods
|
|
5750
|
+
SacInputSearchCommon.prototype.setButtonMode = function () {
|
|
5751
|
+
var _a;
|
|
5752
|
+
// set mode for search button
|
|
5753
|
+
if (!this.buttonmode) {
|
|
5754
|
+
if ((_a = this.formlayout) === null || _a === void 0 ? void 0 : _a.inputsearchiconmode) {
|
|
5755
|
+
this.buttonmode = this.formlayout.inputsearchiconmode;
|
|
5756
|
+
}
|
|
5757
|
+
else {
|
|
5758
|
+
this.buttonmode = this.configurationService.InputSearchIconMode;
|
|
5759
|
+
}
|
|
5760
|
+
}
|
|
5761
|
+
};
|
|
5596
5762
|
return SacInputSearchCommon;
|
|
5597
5763
|
}(SacInputCommon));
|
|
5598
5764
|
SacInputSearchCommon.decorators = [
|
|
5599
5765
|
{ type: i0.Directive }
|
|
5600
5766
|
];
|
|
5601
5767
|
SacInputSearchCommon.propDecorators = {
|
|
5602
|
-
|
|
5768
|
+
buttonmode: [{ type: i0.Input }],
|
|
5603
5769
|
buttontext: [{ type: i0.Input }],
|
|
5770
|
+
iconname: [{ type: i0.Input }],
|
|
5604
5771
|
clicked: [{ type: i0.Output }]
|
|
5605
5772
|
};
|
|
5606
5773
|
|
|
5774
|
+
// #region Classes
|
|
5775
|
+
/**
|
|
5776
|
+
* GridResponse class
|
|
5777
|
+
*/
|
|
5778
|
+
var GridResponse = /** @class */ (function () {
|
|
5779
|
+
function GridResponse() {
|
|
5780
|
+
}
|
|
5781
|
+
return GridResponse;
|
|
5782
|
+
}());
|
|
5607
5783
|
/**
|
|
5608
|
-
* Model
|
|
5784
|
+
* Model for pager settings
|
|
5609
5785
|
*/
|
|
5610
5786
|
var PagerData = /** @class */ (function () {
|
|
5787
|
+
// #endregion Properties
|
|
5788
|
+
// #region Constructors
|
|
5611
5789
|
/**
|
|
5612
|
-
*
|
|
5613
|
-
* @param PageSize
|
|
5614
|
-
* @param CurrentPageIndex
|
|
5615
|
-
* @param TotalRowCount Total Rows in
|
|
5790
|
+
* Constructor
|
|
5791
|
+
* @param PageSize Number of elements per page
|
|
5792
|
+
* @param CurrentPageIndex Current page
|
|
5793
|
+
* @param TotalRowCount Total Rows in database
|
|
5616
5794
|
*/
|
|
5617
5795
|
function PagerData(PageSize, CurrentPageIndex, TotalRowCount) {
|
|
5796
|
+
// #region Properties
|
|
5618
5797
|
/**
|
|
5619
|
-
*
|
|
5620
|
-
*/
|
|
5621
|
-
this.TotalRowCount = 0;
|
|
5622
|
-
/**
|
|
5623
|
-
* Aktueller Index der Seite
|
|
5798
|
+
* Current index of the page
|
|
5624
5799
|
*/
|
|
5625
5800
|
this.CurrentPageIndex = 0;
|
|
5626
5801
|
/**
|
|
5627
|
-
*
|
|
5802
|
+
* Number of elements on the page
|
|
5628
5803
|
*/
|
|
5629
5804
|
this.PageSize = 20;
|
|
5805
|
+
/**
|
|
5806
|
+
* Total number of data records
|
|
5807
|
+
*/
|
|
5808
|
+
this.TotalRowCount = 0;
|
|
5630
5809
|
this.PageSize = PageSize;
|
|
5631
5810
|
this.CurrentPageIndex = CurrentPageIndex;
|
|
5632
5811
|
this.TotalRowCount = TotalRowCount;
|
|
@@ -5634,44 +5813,41 @@
|
|
|
5634
5813
|
return PagerData;
|
|
5635
5814
|
}());
|
|
5636
5815
|
/**
|
|
5637
|
-
* Model
|
|
5816
|
+
* Model if page is to be changed
|
|
5638
5817
|
*/
|
|
5639
5818
|
var PagerRequest = /** @class */ (function () {
|
|
5819
|
+
// #endregion Properties
|
|
5820
|
+
// #region Constructors
|
|
5640
5821
|
/**
|
|
5641
|
-
*
|
|
5642
|
-
* @param PageSize
|
|
5643
|
-
* @param NewPageIndex
|
|
5822
|
+
* Constructor
|
|
5823
|
+
* @param PageSize Page size / number of elements per page
|
|
5824
|
+
* @param NewPageIndex New page index
|
|
5644
5825
|
*/
|
|
5645
5826
|
function PagerRequest(PageSize, NewPageIndex) {
|
|
5827
|
+
// #region Properties
|
|
5646
5828
|
/**
|
|
5647
|
-
*
|
|
5829
|
+
* Index of the page to which you want to switch
|
|
5648
5830
|
*/
|
|
5649
|
-
this.
|
|
5831
|
+
this.NewPageIndex = 0;
|
|
5650
5832
|
/**
|
|
5651
|
-
*
|
|
5833
|
+
* Number of elements on the page
|
|
5652
5834
|
*/
|
|
5653
|
-
this.
|
|
5835
|
+
this.PageSize = 0;
|
|
5654
5836
|
this.PageSize = PageSize;
|
|
5655
5837
|
this.NewPageIndex = NewPageIndex;
|
|
5656
5838
|
}
|
|
5657
5839
|
return PagerRequest;
|
|
5658
5840
|
}());
|
|
5659
5841
|
/**
|
|
5660
|
-
*
|
|
5661
|
-
*/
|
|
5662
|
-
var GridResponse = /** @class */ (function () {
|
|
5663
|
-
function GridResponse() {
|
|
5664
|
-
}
|
|
5665
|
-
return GridResponse;
|
|
5666
|
-
}());
|
|
5667
|
-
/**
|
|
5668
|
-
* Model für Sortierung
|
|
5842
|
+
* Model for sorting
|
|
5669
5843
|
*/
|
|
5670
5844
|
var SortDescriptor = /** @class */ (function () {
|
|
5845
|
+
// #endregion Properties
|
|
5846
|
+
// #region Constructors
|
|
5671
5847
|
/**
|
|
5672
|
-
*
|
|
5673
|
-
* @param sortcolumn Column
|
|
5674
|
-
* @param sortorder
|
|
5848
|
+
* Constructor
|
|
5849
|
+
* @param sortcolumn Column by which to sort
|
|
5850
|
+
* @param sortorder Type of sorting
|
|
5675
5851
|
*/
|
|
5676
5852
|
function SortDescriptor(sortcolumn, sortorder) {
|
|
5677
5853
|
this.SortColumn = sortcolumn;
|
|
@@ -5680,19 +5856,29 @@
|
|
|
5680
5856
|
return SortDescriptor;
|
|
5681
5857
|
}());
|
|
5682
5858
|
(function (SortOrder) {
|
|
5859
|
+
/**
|
|
5860
|
+
* No sorting
|
|
5861
|
+
*/
|
|
5683
5862
|
SortOrder[SortOrder["None"] = 0] = "None";
|
|
5863
|
+
/**
|
|
5864
|
+
* Ascending
|
|
5865
|
+
*/
|
|
5684
5866
|
SortOrder[SortOrder["Ascending"] = 1] = "Ascending";
|
|
5867
|
+
/**
|
|
5868
|
+
* Descending
|
|
5869
|
+
*/
|
|
5685
5870
|
SortOrder[SortOrder["Descending"] = 2] = "Descending";
|
|
5686
|
-
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
5871
|
+
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
5872
|
+
// #endregion Enums
|
|
5687
5873
|
|
|
5688
5874
|
/**
|
|
5689
|
-
*
|
|
5875
|
+
* Basic component for SacGrid
|
|
5690
5876
|
*/
|
|
5691
5877
|
var SacGridCommon = /** @class */ (function () {
|
|
5692
5878
|
// #endregion Properties
|
|
5693
5879
|
// #region Constructors
|
|
5694
5880
|
/**
|
|
5695
|
-
*
|
|
5881
|
+
* Constructor
|
|
5696
5882
|
* @param cd Change Detection Service
|
|
5697
5883
|
* @param injector DI Injector
|
|
5698
5884
|
*/
|
|
@@ -5700,43 +5886,43 @@
|
|
|
5700
5886
|
this.cd = cd;
|
|
5701
5887
|
// #region Properties
|
|
5702
5888
|
/**
|
|
5703
|
-
*
|
|
5889
|
+
* Page number of the active page.
|
|
5704
5890
|
*/
|
|
5705
5891
|
this.activePage = 1;
|
|
5706
5892
|
/**
|
|
5707
|
-
*
|
|
5893
|
+
* Contains the number of the first page displayed in Pager.
|
|
5708
5894
|
*/
|
|
5709
5895
|
this.firstPageNumber = 1;
|
|
5710
5896
|
/**
|
|
5711
|
-
*
|
|
5897
|
+
* Contains Array of Pages.
|
|
5712
5898
|
*/
|
|
5713
5899
|
this.paginators = [];
|
|
5714
5900
|
/**
|
|
5715
|
-
*
|
|
5901
|
+
* Deactivates the selection of the PageSize in the pager
|
|
5716
5902
|
*/
|
|
5717
5903
|
this.pagesizedisabled = false;
|
|
5718
5904
|
/**
|
|
5719
|
-
*
|
|
5905
|
+
* 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 `|`.
|
|
5720
5906
|
*/
|
|
5721
5907
|
this.pagesizes = '20|50|100';
|
|
5722
5908
|
/**
|
|
5723
|
-
*
|
|
5909
|
+
* Event when the pager is clicked.
|
|
5724
5910
|
*/
|
|
5725
5911
|
this.paging = new i0.EventEmitter();
|
|
5726
5912
|
/**
|
|
5727
|
-
*
|
|
5913
|
+
* Event when a header is clicked so that the grid is sorted.
|
|
5728
5914
|
*/
|
|
5729
5915
|
this.sorting = new i0.EventEmitter();
|
|
5730
5916
|
/**
|
|
5731
|
-
*
|
|
5917
|
+
* Number of columns in the grid
|
|
5732
5918
|
*/
|
|
5733
5919
|
this.ColumnCount = 0;
|
|
5734
5920
|
/**
|
|
5735
|
-
*
|
|
5921
|
+
* Column by which currently sorted.
|
|
5736
5922
|
*/
|
|
5737
5923
|
this.sortColumn = '';
|
|
5738
5924
|
/**
|
|
5739
|
-
*
|
|
5925
|
+
* Current direction of sorting
|
|
5740
5926
|
*/
|
|
5741
5927
|
this.sortDirection = exports.SortOrder.None;
|
|
5742
5928
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
@@ -5748,8 +5934,8 @@
|
|
|
5748
5934
|
// #endregion Constructors
|
|
5749
5935
|
// #region Public Getters And Setters
|
|
5750
5936
|
/**
|
|
5751
|
-
* Model
|
|
5752
|
-
* @param sortDescription Settings
|
|
5937
|
+
* Model for sorting
|
|
5938
|
+
* @param sortDescription Settings for current sorting
|
|
5753
5939
|
*/
|
|
5754
5940
|
set: function (sortDescription) {
|
|
5755
5941
|
this.sortColumn = sortDescription.SortColumn;
|
|
@@ -5761,15 +5947,15 @@
|
|
|
5761
5947
|
// #endregion Public Getters And Setters
|
|
5762
5948
|
// #region Public Methods
|
|
5763
5949
|
/**
|
|
5764
|
-
*
|
|
5950
|
+
* The method increases the column elements by one
|
|
5765
5951
|
*/
|
|
5766
5952
|
SacGridCommon.prototype.RegisterColumn = function () {
|
|
5767
5953
|
this.ColumnCount++;
|
|
5768
|
-
// Detect Changes
|
|
5954
|
+
// Detect Changes, as ColumnChange is executed after OnInit.
|
|
5769
5955
|
this.cd.detectChanges();
|
|
5770
5956
|
};
|
|
5771
5957
|
/**
|
|
5772
|
-
*
|
|
5958
|
+
* Method for sorting the data.
|
|
5773
5959
|
*/
|
|
5774
5960
|
SacGridCommon.prototype.SortBy = function (command) {
|
|
5775
5961
|
var direction;
|
|
@@ -5793,14 +5979,14 @@
|
|
|
5793
5979
|
this.sorting.emit(result);
|
|
5794
5980
|
};
|
|
5795
5981
|
/**
|
|
5796
|
-
*
|
|
5982
|
+
* The method reduces the column elements by one
|
|
5797
5983
|
*/
|
|
5798
5984
|
SacGridCommon.prototype.UnregisterColumn = function () {
|
|
5799
5985
|
this.ColumnCount--;
|
|
5800
5986
|
};
|
|
5801
5987
|
/**
|
|
5802
|
-
*
|
|
5803
|
-
* @param newStartIndex
|
|
5988
|
+
* Method if Grid is to switch to a new page.
|
|
5989
|
+
* @param newStartIndex New Page Index (Zero-Based)
|
|
5804
5990
|
*/
|
|
5805
5991
|
SacGridCommon.prototype.pageChange = function (newStartIndex) {
|
|
5806
5992
|
this.paging.emit(newStartIndex);
|
|
@@ -5836,27 +6022,31 @@
|
|
|
5836
6022
|
*/
|
|
5837
6023
|
var SacGridButtonCommon = /** @class */ (function () {
|
|
5838
6024
|
function SacGridButtonCommon() {
|
|
6025
|
+
// #region Properties
|
|
5839
6026
|
/**
|
|
5840
|
-
*
|
|
6027
|
+
* Button is deactivated
|
|
5841
6028
|
*/
|
|
5842
|
-
this.
|
|
6029
|
+
this._isdisabledvalue = false;
|
|
5843
6030
|
/**
|
|
5844
|
-
*
|
|
6031
|
+
* Input property for styling the button. Defines the CSS classes of the button
|
|
5845
6032
|
*/
|
|
5846
|
-
this.
|
|
6033
|
+
this.iconstyle = '';
|
|
5847
6034
|
/**
|
|
5848
|
-
* Event
|
|
6035
|
+
* Event when the button is clicked
|
|
5849
6036
|
*/
|
|
5850
6037
|
this.clicked = new i0.EventEmitter();
|
|
6038
|
+
// #endregion Public Methods
|
|
5851
6039
|
}
|
|
5852
6040
|
Object.defineProperty(SacGridButtonCommon.prototype, "isdisabled", {
|
|
5853
6041
|
get: function () {
|
|
5854
6042
|
return this._isdisabledvalue;
|
|
5855
6043
|
},
|
|
6044
|
+
// #endregion Properties
|
|
6045
|
+
// #region Public Getters And Setters
|
|
5856
6046
|
/**
|
|
5857
|
-
*
|
|
5858
|
-
* @param v
|
|
5859
|
-
* @return
|
|
6047
|
+
* Deactivating buttons
|
|
6048
|
+
* @param v Deactivates the button. Can be a Boolean or the strings `true` or `false`.
|
|
6049
|
+
* @return Defines whether the button is deactivated. Is always a Boolean type
|
|
5860
6050
|
*/
|
|
5861
6051
|
set: function (v) {
|
|
5862
6052
|
if (v === null || v === undefined || typeof v === 'boolean') {
|
|
@@ -5869,8 +6059,10 @@
|
|
|
5869
6059
|
enumerable: false,
|
|
5870
6060
|
configurable: true
|
|
5871
6061
|
});
|
|
6062
|
+
// #endregion Public Getters And Setters
|
|
6063
|
+
// #region Public Methods
|
|
5872
6064
|
/**
|
|
5873
|
-
*
|
|
6065
|
+
* Triggers the clicked event if the button is not deactivated.
|
|
5874
6066
|
*/
|
|
5875
6067
|
SacGridButtonCommon.prototype.callaction = function () {
|
|
5876
6068
|
if (!this._isdisabledvalue) {
|
|
@@ -5883,18 +6075,20 @@
|
|
|
5883
6075
|
{ type: i0.Directive }
|
|
5884
6076
|
];
|
|
5885
6077
|
SacGridButtonCommon.propDecorators = {
|
|
5886
|
-
iconstyle: [{ type: i0.Input }],
|
|
5887
6078
|
icon: [{ type: i0.Input }],
|
|
5888
|
-
|
|
5889
|
-
clicked: [{ type: i0.Output }]
|
|
6079
|
+
iconstyle: [{ type: i0.Input }],
|
|
6080
|
+
clicked: [{ type: i0.Output }],
|
|
6081
|
+
isdisabled: [{ type: i0.Input }]
|
|
5890
6082
|
};
|
|
5891
6083
|
|
|
5892
6084
|
/**
|
|
5893
|
-
* Base
|
|
6085
|
+
* Base component for GridColumn
|
|
5894
6086
|
*/
|
|
5895
6087
|
var SacGridColumnBaseCommon = /** @class */ (function () {
|
|
6088
|
+
// #endregion Properties
|
|
6089
|
+
// #region Constructors
|
|
5896
6090
|
/**
|
|
5897
|
-
*
|
|
6091
|
+
* Constructor
|
|
5898
6092
|
* @param grid reference to grid component
|
|
5899
6093
|
* @param injector di injector to resolve icon service
|
|
5900
6094
|
* @param el reference to html element
|
|
@@ -5905,73 +6099,71 @@
|
|
|
5905
6099
|
this.el = el;
|
|
5906
6100
|
this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
5907
6101
|
}
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
* lifecycle hook - OnInit. Wird aufgeruren sobald das Komponent initialisiert ist.
|
|
5912
|
-
*/
|
|
5913
|
-
SacGridColumnBaseCommon.prototype.ngOnInit = function () {
|
|
5914
|
-
var rootElement = this.el.nativeElement;
|
|
5915
|
-
var parentElement = rootElement.parentElement;
|
|
5916
|
-
while (rootElement.firstChild) {
|
|
5917
|
-
parentElement.insertBefore(rootElement.firstChild, rootElement);
|
|
5918
|
-
}
|
|
5919
|
-
parentElement.removeChild(rootElement);
|
|
5920
|
-
if (this.IsHeader()) {
|
|
5921
|
-
this.grid.RegisterColumn();
|
|
5922
|
-
}
|
|
5923
|
-
};
|
|
5924
|
-
/**
|
|
5925
|
-
* lifecycle hook - ngOnDestroy. Wird aufgeruren wenn das Component zerstört wird.
|
|
5926
|
-
*/
|
|
5927
|
-
SacGridColumnBaseCommon.prototype.ngOnDestroy = function () {
|
|
5928
|
-
if (this.IsHeader()) {
|
|
5929
|
-
this.grid.UnregisterColumn();
|
|
5930
|
-
}
|
|
5931
|
-
};
|
|
5932
|
-
//#endregion
|
|
5933
|
-
//#region Type Handling
|
|
5934
|
-
/**
|
|
5935
|
-
* die Methode ergibt boolean Wert, ob das Element Header ist.
|
|
5936
|
-
*/
|
|
5937
|
-
SacGridColumnBaseCommon.prototype.IsHeader = function () {
|
|
5938
|
-
return this.type === 'header';
|
|
5939
|
-
};
|
|
5940
|
-
/**
|
|
5941
|
-
* die Methode ergibt boolean Wert, ob das Element Body ist.
|
|
5942
|
-
*/
|
|
5943
|
-
SacGridColumnBaseCommon.prototype.IsBody = function () {
|
|
5944
|
-
return this.type === 'body';
|
|
5945
|
-
};
|
|
5946
|
-
/**
|
|
5947
|
-
* die Methode ergibt boolean Wert, ob das Element Footer ist.
|
|
5948
|
-
*/
|
|
5949
|
-
SacGridColumnBaseCommon.prototype.IsFooter = function () {
|
|
5950
|
-
return this.type === 'footer';
|
|
5951
|
-
};
|
|
5952
|
-
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortUp", {
|
|
5953
|
-
//#endregion
|
|
6102
|
+
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortDown", {
|
|
6103
|
+
// #endregion Constructors
|
|
6104
|
+
// #region Public Getters And Setters
|
|
5954
6105
|
/**
|
|
5955
|
-
* sort
|
|
6106
|
+
* sort down icon for grid header
|
|
5956
6107
|
*/
|
|
5957
6108
|
get: function () {
|
|
5958
|
-
return this.iconService.
|
|
6109
|
+
return this.iconService.GridComponentSortDown;
|
|
5959
6110
|
},
|
|
5960
6111
|
enumerable: false,
|
|
5961
6112
|
configurable: true
|
|
5962
6113
|
});
|
|
5963
|
-
Object.defineProperty(SacGridColumnBaseCommon.prototype, "
|
|
6114
|
+
Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortUp", {
|
|
5964
6115
|
/**
|
|
5965
|
-
* sort
|
|
6116
|
+
* sort up icon for grid header
|
|
5966
6117
|
*/
|
|
5967
6118
|
get: function () {
|
|
5968
|
-
return this.iconService.
|
|
6119
|
+
return this.iconService.GridComponentSortUp;
|
|
5969
6120
|
},
|
|
5970
6121
|
enumerable: false,
|
|
5971
6122
|
configurable: true
|
|
5972
6123
|
});
|
|
6124
|
+
// #endregion Public Getters And Setters
|
|
6125
|
+
// #region Public Methods
|
|
6126
|
+
/**
|
|
6127
|
+
* Indicates the direction of sorting. The possible values are `none`,`asc`,`desc`
|
|
6128
|
+
*/
|
|
6129
|
+
SacGridColumnBaseCommon.prototype.GetSortDirection = function () {
|
|
6130
|
+
switch (this.grid.sortDirection) {
|
|
6131
|
+
case exports.SortOrder.None:
|
|
6132
|
+
return 'none';
|
|
6133
|
+
case exports.SortOrder.Ascending:
|
|
6134
|
+
return 'asc';
|
|
6135
|
+
case exports.SortOrder.Descending:
|
|
6136
|
+
return 'desc';
|
|
6137
|
+
default:
|
|
6138
|
+
return 'none';
|
|
6139
|
+
}
|
|
6140
|
+
};
|
|
6141
|
+
/**
|
|
6142
|
+
* Defines whether the element is a cell in the table.
|
|
6143
|
+
*/
|
|
6144
|
+
SacGridColumnBaseCommon.prototype.IsBody = function () {
|
|
6145
|
+
return this.type === 'body';
|
|
6146
|
+
};
|
|
6147
|
+
/**
|
|
6148
|
+
* Defines whether the element is a cell in the footer of the table
|
|
6149
|
+
*/
|
|
6150
|
+
SacGridColumnBaseCommon.prototype.IsFooter = function () {
|
|
6151
|
+
return this.type === 'footer';
|
|
6152
|
+
};
|
|
6153
|
+
/**
|
|
6154
|
+
* Defines whether the element is a cell in the table header
|
|
6155
|
+
*/
|
|
6156
|
+
SacGridColumnBaseCommon.prototype.IsHeader = function () {
|
|
6157
|
+
return this.type === 'header';
|
|
6158
|
+
};
|
|
6159
|
+
/**
|
|
6160
|
+
* Defines whether this column is sorted.
|
|
6161
|
+
*/
|
|
6162
|
+
SacGridColumnBaseCommon.prototype.IsSortedColumn = function () {
|
|
6163
|
+
return this.grid.sortColumn === this.sortkey;
|
|
6164
|
+
};
|
|
5973
6165
|
/**
|
|
5974
|
-
*
|
|
6166
|
+
* Triggers the events so that the table is sorted according to this column.
|
|
5975
6167
|
*/
|
|
5976
6168
|
SacGridColumnBaseCommon.prototype.SortByColumn = function () {
|
|
5977
6169
|
if (this.sortkey !== undefined &&
|
|
@@ -5981,24 +6173,25 @@
|
|
|
5981
6173
|
}
|
|
5982
6174
|
};
|
|
5983
6175
|
/**
|
|
5984
|
-
*
|
|
6176
|
+
* Called when the component is destroyed.
|
|
5985
6177
|
*/
|
|
5986
|
-
SacGridColumnBaseCommon.prototype.
|
|
5987
|
-
|
|
6178
|
+
SacGridColumnBaseCommon.prototype.ngOnDestroy = function () {
|
|
6179
|
+
if (this.IsHeader()) {
|
|
6180
|
+
this.grid.UnregisterColumn();
|
|
6181
|
+
}
|
|
5988
6182
|
};
|
|
5989
6183
|
/**
|
|
5990
|
-
*
|
|
6184
|
+
* Is called when the component is initialized.
|
|
5991
6185
|
*/
|
|
5992
|
-
SacGridColumnBaseCommon.prototype.
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
return 'none';
|
|
6186
|
+
SacGridColumnBaseCommon.prototype.ngOnInit = function () {
|
|
6187
|
+
var rootElement = this.el.nativeElement;
|
|
6188
|
+
var parentElement = rootElement.parentElement;
|
|
6189
|
+
while (rootElement.firstChild) {
|
|
6190
|
+
parentElement.insertBefore(rootElement.firstChild, rootElement);
|
|
6191
|
+
}
|
|
6192
|
+
parentElement.removeChild(rootElement);
|
|
6193
|
+
if (this.IsHeader()) {
|
|
6194
|
+
this.grid.RegisterColumn();
|
|
6002
6195
|
}
|
|
6003
6196
|
};
|
|
6004
6197
|
return SacGridColumnBaseCommon;
|
|
@@ -6012,39 +6205,44 @@
|
|
|
6012
6205
|
{ type: i0.ElementRef }
|
|
6013
6206
|
]; };
|
|
6014
6207
|
SacGridColumnBaseCommon.propDecorators = {
|
|
6015
|
-
name: [{ type: i0.Input }],
|
|
6016
|
-
value: [{ type: i0.Input }],
|
|
6017
6208
|
header: [{ type: i0.Input }],
|
|
6018
|
-
|
|
6209
|
+
name: [{ type: i0.Input }],
|
|
6210
|
+
sortkey: [{ type: i0.Input }],
|
|
6019
6211
|
type: [{ type: i0.Input }],
|
|
6020
|
-
|
|
6212
|
+
value: [{ type: i0.Input }],
|
|
6213
|
+
width: [{ type: i0.Input }]
|
|
6021
6214
|
};
|
|
6022
6215
|
|
|
6023
6216
|
/**
|
|
6024
|
-
*
|
|
6217
|
+
* Component for SacGridColumnCommon. Extends SacGridColumnBaseCommon
|
|
6025
6218
|
*/
|
|
6026
6219
|
var SacGridColumnCommon = /** @class */ (function (_super) {
|
|
6027
6220
|
__extends(SacGridColumnCommon, _super);
|
|
6221
|
+
// #endregion Properties
|
|
6222
|
+
// #region Constructors
|
|
6028
6223
|
/**
|
|
6029
|
-
*
|
|
6224
|
+
* Constructor
|
|
6030
6225
|
*/
|
|
6031
6226
|
function SacGridColumnCommon(grid, injector, el) {
|
|
6032
6227
|
var _this = _super.call(this, grid, injector, el) || this;
|
|
6228
|
+
// #region Properties
|
|
6033
6229
|
/**
|
|
6034
|
-
*
|
|
6230
|
+
* Defines whether the CSS class ellipsis is set.
|
|
6035
6231
|
*/
|
|
6036
6232
|
_this._ellipsis = false;
|
|
6037
6233
|
return _this;
|
|
6038
6234
|
}
|
|
6039
6235
|
Object.defineProperty(SacGridColumnCommon.prototype, "ellipsis", {
|
|
6040
6236
|
/**
|
|
6041
|
-
* Getter
|
|
6237
|
+
* Getter for the ellipsis property. Always returns a boolean type.
|
|
6042
6238
|
*/
|
|
6043
6239
|
get: function () {
|
|
6044
6240
|
return this._ellipsis;
|
|
6045
6241
|
},
|
|
6242
|
+
// #endregion Constructors
|
|
6243
|
+
// #region Public Getters And Setters
|
|
6046
6244
|
/**
|
|
6047
|
-
*
|
|
6245
|
+
* Sets the ellipsis property. Can be a Boolean or the strings `true` or `false`.
|
|
6048
6246
|
*/
|
|
6049
6247
|
set: function (v) {
|
|
6050
6248
|
this._ellipsis = convertToBoolean(v);
|
|
@@ -6052,8 +6250,10 @@
|
|
|
6052
6250
|
enumerable: false,
|
|
6053
6251
|
configurable: true
|
|
6054
6252
|
});
|
|
6253
|
+
// #endregion Public Getters And Setters
|
|
6254
|
+
// #region Public Methods
|
|
6055
6255
|
/**
|
|
6056
|
-
*
|
|
6256
|
+
* Checks whether ellipsis is set
|
|
6057
6257
|
*/
|
|
6058
6258
|
SacGridColumnCommon.prototype.IsEllipsis = function () {
|
|
6059
6259
|
return this._ellipsis;
|
|
@@ -6073,13 +6273,14 @@
|
|
|
6073
6273
|
};
|
|
6074
6274
|
|
|
6075
6275
|
/**
|
|
6076
|
-
*
|
|
6276
|
+
* Component for SacGridColumnActionCommon. Extends SacGridColumnBaseCommon
|
|
6077
6277
|
*/
|
|
6078
6278
|
var SacGridColumnActionCommon = /** @class */ (function (_super) {
|
|
6079
6279
|
__extends(SacGridColumnActionCommon, _super);
|
|
6280
|
+
// #region Constructors
|
|
6080
6281
|
/**
|
|
6081
|
-
*
|
|
6082
|
-
* @param el Element
|
|
6282
|
+
* Constructor
|
|
6283
|
+
* @param el Element reference
|
|
6083
6284
|
* @param injector di inector to resolve icon service
|
|
6084
6285
|
* @param grid SacGridCommon
|
|
6085
6286
|
*/
|
|
@@ -6098,7 +6299,7 @@
|
|
|
6098
6299
|
]; };
|
|
6099
6300
|
|
|
6100
6301
|
/**
|
|
6101
|
-
*
|
|
6302
|
+
* Basic component for SacGridImage
|
|
6102
6303
|
*/
|
|
6103
6304
|
var SacGridImageCommon = /** @class */ (function () {
|
|
6104
6305
|
function SacGridImageCommon() {
|
|
@@ -6113,67 +6314,65 @@
|
|
|
6113
6314
|
};
|
|
6114
6315
|
|
|
6115
6316
|
/**
|
|
6116
|
-
*
|
|
6317
|
+
* Basic component for paging
|
|
6117
6318
|
*/
|
|
6118
6319
|
var SacPagingCommon = /** @class */ (function () {
|
|
6119
6320
|
// #endregion Properties
|
|
6120
6321
|
// #region Constructors
|
|
6121
6322
|
/**
|
|
6122
|
-
*
|
|
6123
|
-
* Inject des Formulars
|
|
6323
|
+
* Constructor
|
|
6124
6324
|
* @parent SacFormCommon
|
|
6125
6325
|
* @injector Injector
|
|
6126
6326
|
*/
|
|
6127
6327
|
function SacPagingCommon(injector) {
|
|
6128
6328
|
/**
|
|
6129
|
-
* Total
|
|
6329
|
+
* Total number of rows
|
|
6130
6330
|
*/
|
|
6131
6331
|
this.totalRowCount = 0;
|
|
6132
6332
|
/**
|
|
6133
|
-
*
|
|
6333
|
+
* Deactivate page size selection
|
|
6134
6334
|
*/
|
|
6135
6335
|
this.pagesizedisabled = false;
|
|
6136
6336
|
/**
|
|
6137
|
-
* Text in Page
|
|
6138
|
-
*
|
|
6139
|
-
* {{PAGESIZE}}:
|
|
6337
|
+
* Text in Page for number of page elements per page. The following interpolation texts are available:
|
|
6338
|
+
*
|
|
6339
|
+
* {{PAGESIZE}}: Number of elements per page
|
|
6140
6340
|
*/
|
|
6141
6341
|
this.pagesizes = '20|50|100';
|
|
6142
6342
|
/**
|
|
6143
|
-
* Text in Page
|
|
6144
|
-
*
|
|
6145
|
-
* {{PAGESIZE}}:
|
|
6343
|
+
* Text in Page for number of page elements per page. The following interpolation texts are available:
|
|
6344
|
+
*
|
|
6345
|
+
* {{PAGESIZE}}: Number of elements per page
|
|
6146
6346
|
*/
|
|
6147
6347
|
this.pagesizetext = '';
|
|
6148
6348
|
/**
|
|
6149
|
-
* Text in
|
|
6150
|
-
*
|
|
6151
|
-
* {{
|
|
6152
|
-
* {{TOTALPAGES}}: Anzahl Seiten
|
|
6349
|
+
* Text in pager for 'Page x of y'. The following interpolation texts are available:
|
|
6350
|
+
* {{CURRENTPAGE}}: Current page
|
|
6351
|
+
* {{TOTALPAGES}}: Number of pages
|
|
6153
6352
|
*/
|
|
6154
6353
|
this.pagingtext = '';
|
|
6155
6354
|
/**
|
|
6156
|
-
* Event
|
|
6355
|
+
* Event when the page is changed in the grid. The new PageIndex is given as a parameter.
|
|
6157
6356
|
*/
|
|
6158
6357
|
this.paging = new i0.EventEmitter();
|
|
6159
6358
|
/**
|
|
6160
|
-
*
|
|
6359
|
+
* Active page index
|
|
6161
6360
|
*/
|
|
6162
6361
|
this.activePageIndex = 0;
|
|
6163
6362
|
/**
|
|
6164
|
-
*
|
|
6363
|
+
* First page index
|
|
6165
6364
|
*/
|
|
6166
6365
|
this.firstPageIndex = 0;
|
|
6167
6366
|
/**
|
|
6168
|
-
*
|
|
6367
|
+
* Last page index
|
|
6169
6368
|
*/
|
|
6170
6369
|
this.lastPageIndex = 0;
|
|
6171
6370
|
/**
|
|
6172
|
-
*
|
|
6371
|
+
* Number of elements per page
|
|
6173
6372
|
*/
|
|
6174
6373
|
this.pageSize = 20;
|
|
6175
6374
|
/**
|
|
6176
|
-
* Item
|
|
6375
|
+
* Item for each paging element (page number)
|
|
6177
6376
|
*/
|
|
6178
6377
|
this.paginators = [];
|
|
6179
6378
|
this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
@@ -6186,7 +6385,7 @@
|
|
|
6186
6385
|
// #endregion Constructors
|
|
6187
6386
|
// #region Public Getters And Setters
|
|
6188
6387
|
/**
|
|
6189
|
-
* Property
|
|
6388
|
+
* Property for Pager Data
|
|
6190
6389
|
*/
|
|
6191
6390
|
set: function (p) {
|
|
6192
6391
|
if (p != null) {
|
|
@@ -6201,7 +6400,7 @@
|
|
|
6201
6400
|
});
|
|
6202
6401
|
Object.defineProperty(SacPagingCommon.prototype, "PageSizeText", {
|
|
6203
6402
|
/**
|
|
6204
|
-
* Property
|
|
6403
|
+
* Property with text for total entries in page
|
|
6205
6404
|
*/
|
|
6206
6405
|
get: function () {
|
|
6207
6406
|
return this.lngResourceService.GetString(this.pagesizetext);
|
|
@@ -6211,7 +6410,7 @@
|
|
|
6211
6410
|
});
|
|
6212
6411
|
Object.defineProperty(SacPagingCommon.prototype, "PagingText", {
|
|
6213
6412
|
/**
|
|
6214
|
-
* Text
|
|
6413
|
+
* Text with current page and total pages
|
|
6215
6414
|
*/
|
|
6216
6415
|
get: function () {
|
|
6217
6416
|
return this.lngResourceService.GetString(this.pagingtext, {
|
|
@@ -6224,7 +6423,7 @@
|
|
|
6224
6423
|
});
|
|
6225
6424
|
Object.defineProperty(SacPagingCommon.prototype, "getPageSizes", {
|
|
6226
6425
|
/**
|
|
6227
|
-
*
|
|
6426
|
+
* Returns the page sizes as a number array
|
|
6228
6427
|
*/
|
|
6229
6428
|
get: function () {
|
|
6230
6429
|
return this.pagesizes.split('|').map(function (itm) { return Number(itm); });
|
|
@@ -6235,8 +6434,8 @@
|
|
|
6235
6434
|
// #endregion Public Getters And Setters
|
|
6236
6435
|
// #region Public Methods
|
|
6237
6436
|
/**
|
|
6238
|
-
*
|
|
6239
|
-
* @param newPageIndex
|
|
6437
|
+
* Changes the page to the new index
|
|
6438
|
+
* @param newPageIndex Page index. This corresponds to the page number - 1.
|
|
6240
6439
|
*/
|
|
6241
6440
|
SacPagingCommon.prototype.changePage = function (newPageIndex) {
|
|
6242
6441
|
if (this.activePageIndex !== newPageIndex) {
|
|
@@ -6244,15 +6443,15 @@
|
|
|
6244
6443
|
}
|
|
6245
6444
|
};
|
|
6246
6445
|
/**
|
|
6247
|
-
*
|
|
6248
|
-
* @param newSize
|
|
6446
|
+
* Changes the page size in the pager
|
|
6447
|
+
* @param newSize New number of elements per page
|
|
6249
6448
|
*/
|
|
6250
6449
|
SacPagingCommon.prototype.changePageSize = function (newSize) {
|
|
6251
6450
|
var pagerData = new PagerRequest(newSize, this.activePageIndex);
|
|
6252
6451
|
this.paging.emit(pagerData);
|
|
6253
6452
|
};
|
|
6254
6453
|
/**
|
|
6255
|
-
*
|
|
6454
|
+
*Switch to 1st page
|
|
6256
6455
|
*/
|
|
6257
6456
|
SacPagingCommon.prototype.firstPage = function () {
|
|
6258
6457
|
if (this.activePageIndex !== this.firstPageIndex) {
|
|
@@ -6260,19 +6459,19 @@
|
|
|
6260
6459
|
}
|
|
6261
6460
|
};
|
|
6262
6461
|
/**
|
|
6263
|
-
*
|
|
6462
|
+
* Returns the current page number
|
|
6264
6463
|
*/
|
|
6265
6464
|
SacPagingCommon.prototype.getCurrentPageNumber = function () {
|
|
6266
6465
|
return this.activePageIndex + 1;
|
|
6267
6466
|
};
|
|
6268
6467
|
/**
|
|
6269
|
-
*
|
|
6468
|
+
* Returns the total number of pages
|
|
6270
6469
|
*/
|
|
6271
6470
|
SacPagingCommon.prototype.getTotalPageNumber = function () {
|
|
6272
6471
|
return this.lastPageIndex + 1;
|
|
6273
6472
|
};
|
|
6274
6473
|
/**
|
|
6275
|
-
* Paging
|
|
6474
|
+
* Paging on last page
|
|
6276
6475
|
*/
|
|
6277
6476
|
SacPagingCommon.prototype.lastPage = function () {
|
|
6278
6477
|
if (this.activePageIndex !== this.lastPageIndex) {
|
|
@@ -6280,7 +6479,7 @@
|
|
|
6280
6479
|
}
|
|
6281
6480
|
};
|
|
6282
6481
|
/**
|
|
6283
|
-
* Paging
|
|
6482
|
+
* Paging to next page
|
|
6284
6483
|
*/
|
|
6285
6484
|
SacPagingCommon.prototype.nextPage = function () {
|
|
6286
6485
|
if (this.activePageIndex !== this.lastPageIndex) {
|
|
@@ -6288,7 +6487,7 @@
|
|
|
6288
6487
|
}
|
|
6289
6488
|
};
|
|
6290
6489
|
/**
|
|
6291
|
-
* Paging
|
|
6490
|
+
* Paging one page back
|
|
6292
6491
|
*/
|
|
6293
6492
|
SacPagingCommon.prototype.previousPage = function () {
|
|
6294
6493
|
if (this.activePageIndex !== this.firstPageIndex) {
|
|
@@ -6298,7 +6497,7 @@
|
|
|
6298
6497
|
// #endregion Public Methods
|
|
6299
6498
|
// #region Protected Methods
|
|
6300
6499
|
/**
|
|
6301
|
-
*
|
|
6500
|
+
* Generates the pager data
|
|
6302
6501
|
*/
|
|
6303
6502
|
SacPagingCommon.prototype.createPager = function () {
|
|
6304
6503
|
this.paginators = [];
|
|
@@ -6325,8 +6524,8 @@
|
|
|
6325
6524
|
}
|
|
6326
6525
|
};
|
|
6327
6526
|
/**
|
|
6328
|
-
*
|
|
6329
|
-
* @param totalPageCount Total
|
|
6527
|
+
* Returns the last page index.
|
|
6528
|
+
* @param totalPageCount Total number of pages
|
|
6330
6529
|
*/
|
|
6331
6530
|
SacPagingCommon.prototype.getEndPageIndex = function (totalPageCount) {
|
|
6332
6531
|
var endingPageToDisplay = this.activePageIndex + 2;
|
|
@@ -6340,8 +6539,8 @@
|
|
|
6340
6539
|
return endingPageToDisplay;
|
|
6341
6540
|
};
|
|
6342
6541
|
/**
|
|
6343
|
-
*
|
|
6344
|
-
* @param totalPageCount Total
|
|
6542
|
+
* Returns the start index
|
|
6543
|
+
* @param totalPageCount Total number of pages
|
|
6345
6544
|
*/
|
|
6346
6545
|
SacPagingCommon.prototype.getStartPageIndex = function (totalPageCount) {
|
|
6347
6546
|
var startingPageToDisplay = 0;
|
|
@@ -6355,7 +6554,7 @@
|
|
|
6355
6554
|
return startingPageToDisplay;
|
|
6356
6555
|
};
|
|
6357
6556
|
/**
|
|
6358
|
-
*
|
|
6557
|
+
* method triggers the event that paging has taken place
|
|
6359
6558
|
*/
|
|
6360
6559
|
SacPagingCommon.prototype.paged = function (newPageIndex) {
|
|
6361
6560
|
var pagerData = new PagerRequest(this.pageSize, newPageIndex);
|
|
@@ -6565,6 +6764,7 @@
|
|
|
6565
6764
|
function SacDateCommon(formlayout, injector, elementRef) {
|
|
6566
6765
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
6567
6766
|
_this.elementRef = elementRef;
|
|
6767
|
+
// #region Properties
|
|
6568
6768
|
/**
|
|
6569
6769
|
* Format des Datums
|
|
6570
6770
|
*/
|
|
@@ -6626,7 +6826,6 @@
|
|
|
6626
6826
|
* Definiert ob der Date Selector angezeigt wird
|
|
6627
6827
|
*/
|
|
6628
6828
|
_this._showselector = false;
|
|
6629
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
6630
6829
|
return _this;
|
|
6631
6830
|
}
|
|
6632
6831
|
Object.defineProperty(SacDateCommon.prototype, "maxdate", {
|
|
@@ -7254,6 +7453,7 @@
|
|
|
7254
7453
|
function SacDateTimeCommon(formlayout, injector, elementRef) {
|
|
7255
7454
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
7256
7455
|
_this.elementRef = elementRef;
|
|
7456
|
+
// #region Properties
|
|
7257
7457
|
/**
|
|
7258
7458
|
* Format des Datums
|
|
7259
7459
|
*/
|
|
@@ -7330,7 +7530,6 @@
|
|
|
7330
7530
|
* Definiert ob der Date Selector angezeigt wird
|
|
7331
7531
|
*/
|
|
7332
7532
|
_this._showselector = false;
|
|
7333
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
7334
7533
|
return _this;
|
|
7335
7534
|
}
|
|
7336
7535
|
Object.defineProperty(SacDateTimeCommon.prototype, "maxdate", {
|
|
@@ -7491,6 +7690,7 @@
|
|
|
7491
7690
|
function SacTimeCommon(formlayout, injector, elementRef) {
|
|
7492
7691
|
var _this = _super.call(this, formlayout, injector, elementRef) || this;
|
|
7493
7692
|
_this.elementRef = elementRef;
|
|
7693
|
+
// #region Properties
|
|
7494
7694
|
/**
|
|
7495
7695
|
* Format des Datums
|
|
7496
7696
|
*/
|
|
@@ -7547,7 +7747,6 @@
|
|
|
7547
7747
|
* Definiert ob der Date Selector angezeigt wird
|
|
7548
7748
|
*/
|
|
7549
7749
|
_this._showselector = false;
|
|
7550
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
7551
7750
|
return _this;
|
|
7552
7751
|
}
|
|
7553
7752
|
Object.defineProperty(SacTimeCommon.prototype, "maxtime", {
|
|
@@ -7702,11 +7901,8 @@
|
|
|
7702
7901
|
* Definiert den Container als Required Form Item
|
|
7703
7902
|
*/
|
|
7704
7903
|
_this._isrequired = false;
|
|
7705
|
-
/**
|
|
7706
|
-
* Text welcher als Tooltip angezeigt wird.
|
|
7707
|
-
*/
|
|
7708
|
-
_this.tooltiptext = '';
|
|
7709
7904
|
return _this;
|
|
7905
|
+
// #endregion Public Methods
|
|
7710
7906
|
}
|
|
7711
7907
|
Object.defineProperty(SacStaticFormContainerCommon.prototype, "isrequired", {
|
|
7712
7908
|
/**
|
|
@@ -7715,6 +7911,8 @@
|
|
|
7715
7911
|
get: function () {
|
|
7716
7912
|
return this._isrequired;
|
|
7717
7913
|
},
|
|
7914
|
+
// #endregion Properties
|
|
7915
|
+
// #region Public Getters And Setters
|
|
7718
7916
|
/**
|
|
7719
7917
|
* Definiert den Container als Required Form Item
|
|
7720
7918
|
*/
|
|
@@ -7724,6 +7922,8 @@
|
|
|
7724
7922
|
enumerable: false,
|
|
7725
7923
|
configurable: true
|
|
7726
7924
|
});
|
|
7925
|
+
// #endregion Public Getters And Setters
|
|
7926
|
+
// #region Public Methods
|
|
7727
7927
|
/**
|
|
7728
7928
|
* Validierung des Controls
|
|
7729
7929
|
*
|
|
@@ -7741,7 +7941,6 @@
|
|
|
7741
7941
|
{ type: i0.Directive }
|
|
7742
7942
|
];
|
|
7743
7943
|
SacStaticFormContainerCommon.propDecorators = {
|
|
7744
|
-
tooltiptext: [{ type: i0.Input }],
|
|
7745
7944
|
isrequired: [{ type: i0.Input }]
|
|
7746
7945
|
};
|
|
7747
7946
|
|
|
@@ -8654,15 +8853,17 @@
|
|
|
8654
8853
|
/**
|
|
8655
8854
|
* Tooltip Component
|
|
8656
8855
|
*
|
|
8657
|
-
*
|
|
8658
|
-
* - container: Container
|
|
8659
|
-
* - tooltip: Container
|
|
8856
|
+
* Requires the following identifiers in the HTML markup
|
|
8857
|
+
* - container: Container for ng-content in which the element is displayed where the tooltip is attached.
|
|
8858
|
+
* - tooltip: Container for tooltip
|
|
8660
8859
|
*
|
|
8661
|
-
* Tooltip
|
|
8662
|
-
*
|
|
8860
|
+
* Tooltip must be displayed in 2 steps. In a first step the tooltip markup is created with (ngIf). In a 2nd step
|
|
8861
|
+
* 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.
|
|
8663
8862
|
*
|
|
8664
8863
|
*/
|
|
8665
8864
|
var SacTooltipCommon = /** @class */ (function () {
|
|
8865
|
+
// #endregion Properties
|
|
8866
|
+
// #region Constructors
|
|
8666
8867
|
/**
|
|
8667
8868
|
* Konstruktor
|
|
8668
8869
|
* @param ref Element Referenz
|
|
@@ -8672,50 +8873,56 @@
|
|
|
8672
8873
|
this.cdRef = cdRef;
|
|
8673
8874
|
this.ref = ref;
|
|
8674
8875
|
/**
|
|
8675
|
-
*
|
|
8676
|
-
*/
|
|
8677
|
-
this.TooltipPosition = exports.TooltipPosition;
|
|
8678
|
-
/**
|
|
8679
|
-
* Definiert ob der Tooltip sichtbar ist
|
|
8876
|
+
* Defines whether the tooltip is visible
|
|
8680
8877
|
*/
|
|
8681
8878
|
this._isTooltipVisible = false;
|
|
8682
8879
|
/**
|
|
8683
|
-
*
|
|
8684
|
-
*/
|
|
8685
|
-
this.TopPos = 0;
|
|
8686
|
-
/**
|
|
8687
|
-
* Position des Tooltips links
|
|
8880
|
+
* method if content has changed and proportions need to be reset in the UI.
|
|
8688
8881
|
*/
|
|
8689
|
-
this.
|
|
8882
|
+
this.onContentChange = function () {
|
|
8883
|
+
// Do nothing if is not visible
|
|
8884
|
+
if (!_this._isTooltipVisible) {
|
|
8885
|
+
return;
|
|
8886
|
+
}
|
|
8887
|
+
setTimeout(function () {
|
|
8888
|
+
_this.getLeftPosition();
|
|
8889
|
+
_this.getTopPosition();
|
|
8890
|
+
});
|
|
8891
|
+
};
|
|
8690
8892
|
/**
|
|
8691
|
-
* Position
|
|
8893
|
+
* Position of the tooltip. Values: left|top|right|bottom|auto
|
|
8692
8894
|
*
|
|
8693
|
-
*
|
|
8895
|
+
* Value 'auto' can be combined with another value.
|
|
8694
8896
|
*/
|
|
8695
8897
|
this.position = 'right|auto';
|
|
8696
8898
|
/**
|
|
8697
|
-
*
|
|
8899
|
+
* Position of the tooltip on the left
|
|
8698
8900
|
*/
|
|
8699
8901
|
this.IsTooltipContentVisible = false;
|
|
8700
8902
|
/**
|
|
8701
|
-
*
|
|
8903
|
+
* Position des Tooltips links
|
|
8702
8904
|
*/
|
|
8703
|
-
this.
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8905
|
+
this.LeftPos = 0;
|
|
8906
|
+
/**
|
|
8907
|
+
* Property for enum in Angular HTML template
|
|
8908
|
+
*/
|
|
8909
|
+
this.TooltipPosition = exports.TooltipPosition;
|
|
8910
|
+
/**
|
|
8911
|
+
* Position of the tooltip at the top
|
|
8912
|
+
*/
|
|
8913
|
+
this.TopPos = 0;
|
|
8709
8914
|
}
|
|
8710
8915
|
Object.defineProperty(SacTooltipCommon.prototype, "inlinemode", {
|
|
8711
8916
|
/**
|
|
8712
|
-
*
|
|
8917
|
+
* Property for inline mode for tooltip. Sets the display mode on the wrapper element to `inline`
|
|
8713
8918
|
*/
|
|
8714
8919
|
get: function () {
|
|
8715
8920
|
return this._inlinemode;
|
|
8716
8921
|
},
|
|
8922
|
+
// #endregion Constructors
|
|
8923
|
+
// #region Public Getters And Setters
|
|
8717
8924
|
/**
|
|
8718
|
-
* Setter
|
|
8925
|
+
* Setter for inline mode for tooltip
|
|
8719
8926
|
*/
|
|
8720
8927
|
set: function (value) {
|
|
8721
8928
|
this._inlinemode = convertToBoolean(value);
|
|
@@ -8725,7 +8932,7 @@
|
|
|
8725
8932
|
});
|
|
8726
8933
|
Object.defineProperty(SacTooltipCommon.prototype, "tooltip", {
|
|
8727
8934
|
/**
|
|
8728
|
-
* Setter
|
|
8935
|
+
* Setter for the name of the container for the tooltip. Is required as the tooltip can be hidden via ngIf.
|
|
8729
8936
|
*/
|
|
8730
8937
|
set: function (content) {
|
|
8731
8938
|
if (content !== undefined) {
|
|
@@ -8738,128 +8945,84 @@
|
|
|
8738
8945
|
enumerable: false,
|
|
8739
8946
|
configurable: true
|
|
8740
8947
|
});
|
|
8948
|
+
Object.defineProperty(SacTooltipCommon.prototype, "tooltop", {
|
|
8949
|
+
get: function () {
|
|
8950
|
+
return this.tooltipcontainer;
|
|
8951
|
+
},
|
|
8952
|
+
enumerable: false,
|
|
8953
|
+
configurable: true
|
|
8954
|
+
});
|
|
8955
|
+
// #endregion Public Getters And Setters
|
|
8956
|
+
// #region Public Methods
|
|
8741
8957
|
/**
|
|
8742
|
-
*
|
|
8958
|
+
* Returns the position of the tooltip
|
|
8743
8959
|
*/
|
|
8744
|
-
SacTooltipCommon.prototype.
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8960
|
+
SacTooltipCommon.prototype.GetTooltipPosition = function () {
|
|
8961
|
+
var validPositions = this.ValidatePositions();
|
|
8962
|
+
// tslint:disable-next-line:no-bitwise
|
|
8963
|
+
if (this.HasPosition(exports.TooltipPosition.right) &&
|
|
8964
|
+
validPositions & exports.TooltipPosition.right) {
|
|
8965
|
+
return exports.TooltipPosition.right;
|
|
8750
8966
|
}
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
SacTooltipCommon.prototype.ngOnDestroy = function () {
|
|
8756
|
-
// Unregister Event Listener
|
|
8757
|
-
window.removeEventListener('scroll', this.onContentChange, true);
|
|
8758
|
-
window.removeEventListener('resize', this.onContentChange, true);
|
|
8759
|
-
if (this.tooltipcontainer !== undefined) {
|
|
8760
|
-
document.body.removeChild(this.tooltipcontainer.nativeElement);
|
|
8967
|
+
// tslint:disable-next-line:no-bitwise
|
|
8968
|
+
if (this.HasPosition(exports.TooltipPosition.top) &&
|
|
8969
|
+
validPositions & exports.TooltipPosition.top) {
|
|
8970
|
+
return exports.TooltipPosition.top;
|
|
8761
8971
|
}
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
SacTooltipCommon.prototype.getTopPosition = function () {
|
|
8767
|
-
if (this.content !== null && this.content !== undefined) {
|
|
8768
|
-
var item = this.content.nativeElement;
|
|
8769
|
-
if (item.children.length >= 1) {
|
|
8770
|
-
var childItem = item.firstElementChild;
|
|
8771
|
-
var contentPosition = childItem.getBoundingClientRect();
|
|
8772
|
-
switch (this.GetTooltipPosition()) {
|
|
8773
|
-
case exports.TooltipPosition.top:
|
|
8774
|
-
this.TopPos = contentPosition.top - this.getToolTipHeight();
|
|
8775
|
-
return contentPosition.top - this.getToolTipHeight();
|
|
8776
|
-
case exports.TooltipPosition.right:
|
|
8777
|
-
this.TopPos = contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8778
|
-
return contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8779
|
-
case exports.TooltipPosition.bottom:
|
|
8780
|
-
this.TopPos = contentPosition.top + contentPosition.height;
|
|
8781
|
-
return contentPosition.top + contentPosition.height;
|
|
8782
|
-
case exports.TooltipPosition.left:
|
|
8783
|
-
this.TopPos = contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8784
|
-
return contentPosition.top + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
8785
|
-
}
|
|
8786
|
-
return childItem.clientTop + childItem.offsetTop - ((this.getToolTipHeight() / 2) - (childItem.clientHeight / 2));
|
|
8787
|
-
}
|
|
8788
|
-
else {
|
|
8789
|
-
return this.content.nativeElement.offsetTop;
|
|
8790
|
-
}
|
|
8972
|
+
// tslint:disable-next-line:no-bitwise
|
|
8973
|
+
if (this.HasPosition(exports.TooltipPosition.left) &&
|
|
8974
|
+
validPositions & exports.TooltipPosition.left) {
|
|
8975
|
+
return exports.TooltipPosition.left;
|
|
8791
8976
|
}
|
|
8792
|
-
|
|
8793
|
-
|
|
8977
|
+
// tslint:disable-next-line:no-bitwise
|
|
8978
|
+
if (this.HasPosition(exports.TooltipPosition.bottom) &&
|
|
8979
|
+
validPositions & exports.TooltipPosition.bottom) {
|
|
8980
|
+
return exports.TooltipPosition.bottom;
|
|
8794
8981
|
}
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
if (this.content !== null && this.content !== undefined) {
|
|
8801
|
-
var item = this.content.nativeElement;
|
|
8802
|
-
if (item.children.length >= 1) {
|
|
8803
|
-
var childItem = item.firstElementChild;
|
|
8804
|
-
var contentPosition = childItem.getBoundingClientRect();
|
|
8805
|
-
switch (this.GetTooltipPosition()) {
|
|
8806
|
-
case exports.TooltipPosition.top:
|
|
8807
|
-
this.LeftPos = contentPosition.left + (contentPosition.width / 2) - (this.getToolTipWidth() / 2);
|
|
8808
|
-
return contentPosition.left + (contentPosition.width / 2) - (this.getToolTipWidth() / 2);
|
|
8809
|
-
case exports.TooltipPosition.right:
|
|
8810
|
-
this.LeftPos = contentPosition.left + contentPosition.width;
|
|
8811
|
-
return contentPosition.left + contentPosition.width;
|
|
8812
|
-
case exports.TooltipPosition.bottom:
|
|
8813
|
-
this.LeftPos = contentPosition.left + (childItem.clientWidth / 2) - (this.getToolTipWidth() / 2);
|
|
8814
|
-
return contentPosition.left + (childItem.clientWidth / 2) - (this.getToolTipWidth() / 2);
|
|
8815
|
-
case exports.TooltipPosition.left:
|
|
8816
|
-
this.LeftPos = contentPosition.left - this.getToolTipWidth();
|
|
8817
|
-
return contentPosition.left - this.getToolTipWidth();
|
|
8818
|
-
}
|
|
8819
|
-
return this.content.nativeElement.offsetTop;
|
|
8982
|
+
// Get Auto Position or Default
|
|
8983
|
+
if (this.IsAutoPosition()) {
|
|
8984
|
+
// tslint:disable-next-line:no-bitwise
|
|
8985
|
+
if (validPositions & exports.TooltipPosition.right) {
|
|
8986
|
+
return exports.TooltipPosition.right;
|
|
8820
8987
|
}
|
|
8821
|
-
|
|
8822
|
-
|
|
8988
|
+
// tslint:disable-next-line:no-bitwise
|
|
8989
|
+
if (validPositions & exports.TooltipPosition.top) {
|
|
8990
|
+
return exports.TooltipPosition.top;
|
|
8823
8991
|
}
|
|
8992
|
+
// tslint:disable-next-line:no-bitwise
|
|
8993
|
+
if (validPositions & exports.TooltipPosition.left) {
|
|
8994
|
+
return exports.TooltipPosition.left;
|
|
8995
|
+
}
|
|
8996
|
+
// tslint:disable-next-line:no-bitwise
|
|
8997
|
+
if (validPositions & exports.TooltipPosition.bottom) {
|
|
8998
|
+
return exports.TooltipPosition.bottom;
|
|
8999
|
+
}
|
|
9000
|
+
return exports.TooltipPosition.right;
|
|
8824
9001
|
}
|
|
8825
9002
|
else {
|
|
8826
|
-
return this.
|
|
8827
|
-
}
|
|
8828
|
-
};
|
|
8829
|
-
/**
|
|
8830
|
-
* Berechnet die Höhe des Tooltips
|
|
8831
|
-
*/
|
|
8832
|
-
SacTooltipCommon.prototype.getToolTipHeight = function () {
|
|
8833
|
-
if (this.tooltipcontainer) {
|
|
8834
|
-
return this.tooltipcontainer.nativeElement.clientHeight;
|
|
8835
|
-
}
|
|
8836
|
-
else {
|
|
8837
|
-
return 0;
|
|
9003
|
+
return this.GetPosition();
|
|
8838
9004
|
}
|
|
8839
9005
|
};
|
|
8840
9006
|
/**
|
|
8841
|
-
*
|
|
9007
|
+
* Hide tooltip
|
|
8842
9008
|
*/
|
|
8843
|
-
SacTooltipCommon.prototype.
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
}
|
|
8847
|
-
else {
|
|
8848
|
-
return 0;
|
|
8849
|
-
}
|
|
9009
|
+
SacTooltipCommon.prototype.HideTooltip = function () {
|
|
9010
|
+
this._isTooltipVisible = false;
|
|
9011
|
+
this.IsTooltipContentVisible = false;
|
|
8850
9012
|
};
|
|
8851
9013
|
/**
|
|
8852
|
-
*
|
|
9014
|
+
* Defines whether the tooltip is present in the markup
|
|
8853
9015
|
*/
|
|
8854
9016
|
SacTooltipCommon.prototype.IsTooltipVisible = function () {
|
|
8855
9017
|
return this._isTooltipVisible;
|
|
8856
9018
|
};
|
|
8857
9019
|
/**
|
|
8858
|
-
*
|
|
9020
|
+
* Show tooltip
|
|
8859
9021
|
*/
|
|
8860
9022
|
SacTooltipCommon.prototype.ShowTooltip = function () {
|
|
8861
9023
|
var _this = this;
|
|
8862
9024
|
this._isTooltipVisible = true;
|
|
9025
|
+
this.cdRef.detectChanges();
|
|
8863
9026
|
setTimeout(function () {
|
|
8864
9027
|
_this.getLeftPosition();
|
|
8865
9028
|
_this.getTopPosition();
|
|
@@ -8867,66 +9030,75 @@
|
|
|
8867
9030
|
});
|
|
8868
9031
|
};
|
|
8869
9032
|
/**
|
|
8870
|
-
*
|
|
9033
|
+
* Calculates the height of the tooltip
|
|
8871
9034
|
*/
|
|
8872
|
-
SacTooltipCommon.prototype.
|
|
8873
|
-
|
|
8874
|
-
this.
|
|
9035
|
+
SacTooltipCommon.prototype.getToolTipHeight = function () {
|
|
9036
|
+
var _a;
|
|
9037
|
+
if (this.tooltipcontainer) {
|
|
9038
|
+
return (_a = this.tooltipcontainer.nativeElement.firstElementChild.clientHeight) !== null && _a !== void 0 ? _a : 0;
|
|
9039
|
+
}
|
|
9040
|
+
else {
|
|
9041
|
+
return 0;
|
|
9042
|
+
}
|
|
8875
9043
|
};
|
|
8876
9044
|
/**
|
|
8877
|
-
*
|
|
9045
|
+
* Calculates the width of the tooltips
|
|
8878
9046
|
*/
|
|
8879
|
-
SacTooltipCommon.prototype.
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
if (this.HasPosition(exports.TooltipPosition.right) && (validPositions & exports.TooltipPosition.right)) {
|
|
8883
|
-
return exports.TooltipPosition.right;
|
|
8884
|
-
}
|
|
8885
|
-
// tslint:disable-next-line:no-bitwise
|
|
8886
|
-
if (this.HasPosition(exports.TooltipPosition.top) && (validPositions & exports.TooltipPosition.top)) {
|
|
8887
|
-
return exports.TooltipPosition.top;
|
|
9047
|
+
SacTooltipCommon.prototype.getToolTipWidth = function () {
|
|
9048
|
+
if (this.tooltipcontainer) {
|
|
9049
|
+
return this.tooltipcontainer.nativeElement.firstElementChild.clientWidth;
|
|
8888
9050
|
}
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
return exports.TooltipPosition.left;
|
|
9051
|
+
else {
|
|
9052
|
+
return 0;
|
|
8892
9053
|
}
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
9054
|
+
};
|
|
9055
|
+
/**
|
|
9056
|
+
* Detect Changes after view checked. Prevent ExpressionChangedAfterItHasBeenCheckedError error
|
|
9057
|
+
*/
|
|
9058
|
+
SacTooltipCommon.prototype.ngAfterViewChecked = function () {
|
|
9059
|
+
// Do nothing if is not visibile
|
|
9060
|
+
if (!this._isTooltipVisible) {
|
|
9061
|
+
return;
|
|
8896
9062
|
}
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
}
|
|
8907
|
-
// tslint:disable-next-line:no-bitwise
|
|
8908
|
-
if (validPositions & exports.TooltipPosition.left) {
|
|
8909
|
-
return exports.TooltipPosition.left;
|
|
8910
|
-
}
|
|
8911
|
-
// tslint:disable-next-line:no-bitwise
|
|
8912
|
-
if (validPositions & exports.TooltipPosition.bottom) {
|
|
8913
|
-
return exports.TooltipPosition.bottom;
|
|
8914
|
-
}
|
|
8915
|
-
return exports.TooltipPosition.right;
|
|
9063
|
+
this.cdRef.detectChanges();
|
|
9064
|
+
};
|
|
9065
|
+
/**
|
|
9066
|
+
* Detect UI Changes to Calculate Tooltip correct
|
|
9067
|
+
*/
|
|
9068
|
+
SacTooltipCommon.prototype.ngDoCheck = function () {
|
|
9069
|
+
// Do nothing if is not visibile
|
|
9070
|
+
if (!this._isTooltipVisible) {
|
|
9071
|
+
return;
|
|
8916
9072
|
}
|
|
8917
|
-
|
|
8918
|
-
|
|
9073
|
+
this.getLeftPosition();
|
|
9074
|
+
this.getTopPosition();
|
|
9075
|
+
};
|
|
9076
|
+
/**
|
|
9077
|
+
* Event when the control is destroyed.
|
|
9078
|
+
*/
|
|
9079
|
+
SacTooltipCommon.prototype.ngOnDestroy = function () {
|
|
9080
|
+
// Unregister Event Listener
|
|
9081
|
+
window.removeEventListener('scroll', this.onContentChange, true);
|
|
9082
|
+
window.removeEventListener('resize', this.onContentChange, true);
|
|
9083
|
+
if (this.tooltipcontainer !== undefined) {
|
|
9084
|
+
document.body.removeChild(this.tooltipcontainer.nativeElement);
|
|
8919
9085
|
}
|
|
8920
9086
|
};
|
|
8921
9087
|
/**
|
|
8922
|
-
*
|
|
9088
|
+
* Event when the control is initialized
|
|
8923
9089
|
*/
|
|
8924
|
-
SacTooltipCommon.prototype.
|
|
8925
|
-
|
|
8926
|
-
|
|
9090
|
+
SacTooltipCommon.prototype.ngOnInit = function () {
|
|
9091
|
+
// Register Event Listener
|
|
9092
|
+
window.addEventListener('scroll', this.onContentChange, true);
|
|
9093
|
+
window.addEventListener('resize', this.onContentChange, true);
|
|
9094
|
+
if (this.tooltipcontainer !== undefined) {
|
|
9095
|
+
document.body.appendChild(this.tooltipcontainer.nativeElement);
|
|
9096
|
+
}
|
|
8927
9097
|
};
|
|
9098
|
+
// #endregion Protected Abstract Methods
|
|
9099
|
+
// #region Private Methods
|
|
8928
9100
|
/**
|
|
8929
|
-
*
|
|
9101
|
+
* Returns the defined position for the tooltip
|
|
8930
9102
|
*/
|
|
8931
9103
|
SacTooltipCommon.prototype.GetPosition = function () {
|
|
8932
9104
|
var positions = this.position.split('|');
|
|
@@ -8946,9 +9118,9 @@
|
|
|
8946
9118
|
return exports.TooltipPosition.right;
|
|
8947
9119
|
};
|
|
8948
9120
|
/**
|
|
8949
|
-
*
|
|
9121
|
+
* Returns whether the position has been configured
|
|
8950
9122
|
*
|
|
8951
|
-
* @param position Position
|
|
9123
|
+
* @param position Position to be checked
|
|
8952
9124
|
*/
|
|
8953
9125
|
SacTooltipCommon.prototype.HasPosition = function (position) {
|
|
8954
9126
|
var positions = this.position.split('|');
|
|
@@ -8961,13 +9133,21 @@
|
|
|
8961
9133
|
if (position === exports.TooltipPosition.left && positions.indexOf('left') >= 0) {
|
|
8962
9134
|
return true;
|
|
8963
9135
|
}
|
|
8964
|
-
if (position === exports.TooltipPosition.bottom &&
|
|
9136
|
+
if (position === exports.TooltipPosition.bottom &&
|
|
9137
|
+
positions.indexOf('bottom') >= 0) {
|
|
8965
9138
|
return true;
|
|
8966
9139
|
}
|
|
8967
9140
|
return false;
|
|
8968
9141
|
};
|
|
8969
9142
|
/**
|
|
8970
|
-
*
|
|
9143
|
+
* Defines whether AutoPosition is active
|
|
9144
|
+
*/
|
|
9145
|
+
SacTooltipCommon.prototype.IsAutoPosition = function () {
|
|
9146
|
+
var positions = this.position.split('|');
|
|
9147
|
+
return positions.indexOf('auto') >= 0;
|
|
9148
|
+
};
|
|
9149
|
+
/**
|
|
9150
|
+
* Checks whether the position is valid or whether the tooltip on the position has space
|
|
8971
9151
|
*/
|
|
8972
9152
|
SacTooltipCommon.prototype.ValidatePositions = function () {
|
|
8973
9153
|
// Check if Container is false
|
|
@@ -8976,15 +9156,15 @@
|
|
|
8976
9156
|
}
|
|
8977
9157
|
var allowedPositions = exports.TooltipPosition.none;
|
|
8978
9158
|
var basePosition = this.content.nativeElement.firstElementChild.getBoundingClientRect();
|
|
8979
|
-
var tooltipRect = this.tooltipcontainer.nativeElement.getBoundingClientRect();
|
|
8980
|
-
var leftPosOk = basePosition.left - tooltipRect.width > 0;
|
|
8981
|
-
var rightPosOk = basePosition.right + tooltipRect.width < window.innerWidth;
|
|
9159
|
+
var tooltipRect = this.tooltipcontainer.nativeElement.firstElementChild.getBoundingClientRect();
|
|
9160
|
+
var leftPosOk = basePosition.left - tooltipRect.width + (this.getTooltipOffset() * -1) > 0;
|
|
9161
|
+
var rightPosOk = basePosition.right + tooltipRect.width + this.getTooltipOffset() < window.innerWidth;
|
|
8982
9162
|
var topPosOk = basePosition.top - tooltipRect.height > 0;
|
|
8983
9163
|
var bottomPosOk = basePosition.bottom + tooltipRect.height < window.innerHeight;
|
|
8984
|
-
var leftHalfPosOk = basePosition.left -
|
|
8985
|
-
var rightHalfPosOk = basePosition.right +
|
|
8986
|
-
var topHalfPosOk = basePosition.top -
|
|
8987
|
-
var bottomHalfPosOk = basePosition.bottom +
|
|
9164
|
+
var leftHalfPosOk = basePosition.left - tooltipRect.width / 2 > 0;
|
|
9165
|
+
var rightHalfPosOk = basePosition.right + tooltipRect.width / 2 < window.innerWidth;
|
|
9166
|
+
var topHalfPosOk = basePosition.top - tooltipRect.height / 2 > 0;
|
|
9167
|
+
var bottomHalfPosOk = basePosition.bottom + tooltipRect.height / 2 < window.innerHeight;
|
|
8988
9168
|
if (leftPosOk && topHalfPosOk && bottomHalfPosOk) {
|
|
8989
9169
|
// tslint:disable-next-line:no-bitwise
|
|
8990
9170
|
allowedPositions = allowedPositions | exports.TooltipPosition.left;
|
|
@@ -9003,6 +9183,100 @@
|
|
|
9003
9183
|
}
|
|
9004
9184
|
return allowedPositions;
|
|
9005
9185
|
};
|
|
9186
|
+
/**
|
|
9187
|
+
* Calculates the position of the tooltip from links
|
|
9188
|
+
*/
|
|
9189
|
+
SacTooltipCommon.prototype.getLeftPosition = function () {
|
|
9190
|
+
if (this.content !== null && this.content !== undefined) {
|
|
9191
|
+
var item = this.content.nativeElement;
|
|
9192
|
+
if (item.children.length >= 1) {
|
|
9193
|
+
var childItem = item.firstElementChild;
|
|
9194
|
+
var contentPosition = childItem.getBoundingClientRect();
|
|
9195
|
+
switch (this.GetTooltipPosition()) {
|
|
9196
|
+
case exports.TooltipPosition.top:
|
|
9197
|
+
this.LeftPos = contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2;
|
|
9198
|
+
return (contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2);
|
|
9199
|
+
case exports.TooltipPosition.right:
|
|
9200
|
+
this.LeftPos = contentPosition.left + contentPosition.width + this.getTooltipOffset();
|
|
9201
|
+
return contentPosition.left + contentPosition.width + this.getTooltipOffset();
|
|
9202
|
+
case exports.TooltipPosition.bottom:
|
|
9203
|
+
this.LeftPos = contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2;
|
|
9204
|
+
return (contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2);
|
|
9205
|
+
case exports.TooltipPosition.left:
|
|
9206
|
+
this.LeftPos = contentPosition.left - this.getToolTipWidth() + (this.getTooltipOffset() * -1);
|
|
9207
|
+
return contentPosition.left - this.getToolTipWidth() + (this.getTooltipOffset() * -1);
|
|
9208
|
+
}
|
|
9209
|
+
return this.content.nativeElement.offsetTop;
|
|
9210
|
+
}
|
|
9211
|
+
else {
|
|
9212
|
+
return this.content.nativeElement.offsetTop;
|
|
9213
|
+
}
|
|
9214
|
+
}
|
|
9215
|
+
else {
|
|
9216
|
+
return this.ref.nativeElement.offsetLeft;
|
|
9217
|
+
}
|
|
9218
|
+
};
|
|
9219
|
+
/**
|
|
9220
|
+
* Calculates the position of the tooltip from the top
|
|
9221
|
+
*/
|
|
9222
|
+
SacTooltipCommon.prototype.getTopPosition = function () {
|
|
9223
|
+
if (this.content !== null && this.content !== undefined) {
|
|
9224
|
+
var item = this.content.nativeElement;
|
|
9225
|
+
if (item.children.length >= 1) {
|
|
9226
|
+
var childItem = item.firstElementChild;
|
|
9227
|
+
var contentPosition = childItem.getBoundingClientRect();
|
|
9228
|
+
// Get Position with Scroll (Scrollbars inside page should be substracted)
|
|
9229
|
+
var contentPositionTop = childItem.offsetTop + this.getOffsetTopParent(childItem.offsetParent) - this.getScrollTopParent(childItem.parentElement);
|
|
9230
|
+
switch (this.GetTooltipPosition()) {
|
|
9231
|
+
case exports.TooltipPosition.top:
|
|
9232
|
+
this.TopPos = contentPositionTop - this.getToolTipHeight() + (this.getTooltipOffset() * -1);
|
|
9233
|
+
return contentPositionTop - this.getToolTipHeight() + (this.getTooltipOffset() * -1);
|
|
9234
|
+
case exports.TooltipPosition.right:
|
|
9235
|
+
this.TopPos = contentPositionTop + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
9236
|
+
return contentPositionTop + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
|
|
9237
|
+
case exports.TooltipPosition.bottom:
|
|
9238
|
+
this.TopPos = contentPositionTop + contentPosition.height + this.getTooltipOffset();
|
|
9239
|
+
return contentPositionTop + contentPosition.height + this.getTooltipOffset();
|
|
9240
|
+
case exports.TooltipPosition.left:
|
|
9241
|
+
this.TopPos = contentPositionTop + contentPosition.height / 2 - this.getToolTipHeight() / 2;
|
|
9242
|
+
return (contentPositionTop + contentPosition.height / 2 - this.getToolTipHeight() / 2);
|
|
9243
|
+
}
|
|
9244
|
+
return (childItem.clientTop + childItem.offsetTop - (this.getToolTipHeight() / 2 - childItem.clientHeight / 2));
|
|
9245
|
+
}
|
|
9246
|
+
else {
|
|
9247
|
+
return this.content.nativeElement.offsetTop;
|
|
9248
|
+
}
|
|
9249
|
+
}
|
|
9250
|
+
else {
|
|
9251
|
+
return this.ref.nativeElement.offsetTop;
|
|
9252
|
+
}
|
|
9253
|
+
};
|
|
9254
|
+
/**
|
|
9255
|
+
* Calculates the top of the page inside all elements
|
|
9256
|
+
* @param element HTML Element
|
|
9257
|
+
* @returns summarized top value for absolute position
|
|
9258
|
+
*/
|
|
9259
|
+
SacTooltipCommon.prototype.getOffsetTopParent = function (element) {
|
|
9260
|
+
if (!element.offsetParent) {
|
|
9261
|
+
return element.offsetTop;
|
|
9262
|
+
}
|
|
9263
|
+
var parentValue = this.getOffsetTopParent(element.offsetParent);
|
|
9264
|
+
var offset = element.offsetTop;
|
|
9265
|
+
return parentValue + offset;
|
|
9266
|
+
};
|
|
9267
|
+
/**
|
|
9268
|
+
* Caclulate Scrollbars inside tree
|
|
9269
|
+
* @param element HTML Element
|
|
9270
|
+
* @returns Scroll top value of element with all childs
|
|
9271
|
+
*/
|
|
9272
|
+
SacTooltipCommon.prototype.getScrollTopParent = function (element) {
|
|
9273
|
+
// Body Scroll should not be calculated
|
|
9274
|
+
if (!element.parentElement) {
|
|
9275
|
+
return 0;
|
|
9276
|
+
}
|
|
9277
|
+
var parentValue = this.getScrollTopParent(element.parentElement);
|
|
9278
|
+
return parentValue + element.scrollTop;
|
|
9279
|
+
};
|
|
9006
9280
|
return SacTooltipCommon;
|
|
9007
9281
|
}());
|
|
9008
9282
|
SacTooltipCommon.decorators = [
|
|
@@ -9015,9 +9289,9 @@
|
|
|
9015
9289
|
SacTooltipCommon.propDecorators = {
|
|
9016
9290
|
position: [{ type: i0.Input }],
|
|
9017
9291
|
tooltiptext: [{ type: i0.Input }],
|
|
9018
|
-
inlinemode: [{ type: i0.Input }],
|
|
9019
9292
|
content: [{ type: i0.ViewChild, args: ['container', { static: true },] }],
|
|
9020
|
-
|
|
9293
|
+
inlinemode: [{ type: i0.Input }],
|
|
9294
|
+
tooltip: [{ type: i0.ViewChild, args: ['tooltip', { static: false },] }]
|
|
9021
9295
|
};
|
|
9022
9296
|
|
|
9023
9297
|
// #region Classes
|
|
@@ -9089,7 +9363,6 @@
|
|
|
9089
9363
|
};
|
|
9090
9364
|
_this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
|
|
9091
9365
|
_this.lngResourceService = injector.get(SACLOCALISATION_SERVICE, new SacDefaultLocalisationService(_this.validationKeyService));
|
|
9092
|
-
_this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
|
|
9093
9366
|
_this.uploads = [];
|
|
9094
9367
|
_this.options.allowedTypes = '*';
|
|
9095
9368
|
_this.options.concurrency = 1;
|
|
@@ -11974,6 +12247,10 @@
|
|
|
11974
12247
|
exports.SacAbstractIconService = SacAbstractIconService;
|
|
11975
12248
|
exports.SacAbstractLanguageService = SacAbstractLanguageService;
|
|
11976
12249
|
exports.SacAbstractLocalisationService = SacAbstractLocalisationService;
|
|
12250
|
+
exports.SacBaseDateTimeControl = SacBaseDateTimeControl;
|
|
12251
|
+
exports.SacBaseListControl = SacBaseListControl;
|
|
12252
|
+
exports.SacBaseModelControl = SacBaseModelControl;
|
|
12253
|
+
exports.SacBaseSelectControl = SacBaseSelectControl;
|
|
11977
12254
|
exports.SacButtonCommon = SacButtonCommon;
|
|
11978
12255
|
exports.SacCheckboxCommon = SacCheckboxCommon;
|
|
11979
12256
|
exports.SacConfirmButton = SacConfirmButton;
|
|
@@ -12001,6 +12278,7 @@
|
|
|
12001
12278
|
exports.SacGridCommon = SacGridCommon;
|
|
12002
12279
|
exports.SacGridImageCommon = SacGridImageCommon;
|
|
12003
12280
|
exports.SacInputAreaCommon = SacInputAreaCommon;
|
|
12281
|
+
exports.SacInputBase = SacInputBase;
|
|
12004
12282
|
exports.SacInputCommon = SacInputCommon;
|
|
12005
12283
|
exports.SacInputCurrencyCommon = SacInputCurrencyCommon;
|
|
12006
12284
|
exports.SacInputDecimalCommon = SacInputDecimalCommon;
|
|
@@ -12025,6 +12303,7 @@
|
|
|
12025
12303
|
exports.SacTreeItemActionCommon = SacTreeItemActionCommon;
|
|
12026
12304
|
exports.SacTreeViewChildCommon = SacTreeViewChildCommon;
|
|
12027
12305
|
exports.SacTreeViewCommon = SacTreeViewCommon;
|
|
12306
|
+
exports.SacUploadBase = SacUploadBase;
|
|
12028
12307
|
exports.SacUploadFile = SacUploadFile;
|
|
12029
12308
|
exports.SacUploadMultipleCommon = SacUploadMultipleCommon;
|
|
12030
12309
|
exports.SacUploadSingleCommon = SacUploadSingleCommon;
|
|
@@ -12041,12 +12320,6 @@
|
|
|
12041
12320
|
exports.mapToObject = mapToObject;
|
|
12042
12321
|
exports.positionElements = positionElements;
|
|
12043
12322
|
exports.positionService = positionService;
|
|
12044
|
-
exports.ɵa = SacUploadBase;
|
|
12045
|
-
exports.ɵb = SacBaseModelControl;
|
|
12046
|
-
exports.ɵc = SacBaseSelectControl;
|
|
12047
|
-
exports.ɵd = SacBaseListControl;
|
|
12048
|
-
exports.ɵe = SacInputBase;
|
|
12049
|
-
exports.ɵf = SacBaseDateTimeControl;
|
|
12050
12323
|
|
|
12051
12324
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
12052
12325
|
|