@simpleangularcontrols/sac-common 10.0.0-rc.1 → 10.0.0-rc.11

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.
Files changed (64) hide show
  1. package/bundles/simpleangularcontrols-sac-common.umd.js +696 -412
  2. package/bundles/simpleangularcontrols-sac-common.umd.js.map +1 -1
  3. package/bundles/simpleangularcontrols-sac-common.umd.min.js +1 -1
  4. package/bundles/simpleangularcontrols-sac-common.umd.min.js.map +1 -1
  5. package/common/basedatetimecontrol.d.ts +1 -1
  6. package/common/baseinputcontrol.d.ts +0 -4
  7. package/common/basemodelcontrol.d.ts +25 -1
  8. package/common/baseuploadcontrol.d.ts +0 -5
  9. package/controls/checkbox/checkbox.d.ts +12 -3
  10. package/controls/datetime/date.d.ts +0 -4
  11. package/controls/datetime/datetime.d.ts +0 -4
  12. package/controls/datetime/time.d.ts +0 -4
  13. package/controls/grid/grid.d.ts +38 -36
  14. package/controls/grid/gridbutton.d.ts +13 -13
  15. package/controls/grid/gridcolumn.d.ts +8 -8
  16. package/controls/grid/gridcolumnaction.d.ts +3 -3
  17. package/controls/grid/gridcolumnbase.d.ts +45 -37
  18. package/controls/grid/gridimage.d.ts +2 -2
  19. package/controls/grid/model.d.ts +51 -42
  20. package/controls/grid/paging.d.ts +41 -43
  21. package/controls/input/inputsearch.d.ts +13 -4
  22. package/controls/layout/formlayout.d.ts +13 -1
  23. package/controls/static/formcontainer.d.ts +2 -6
  24. package/controls/tooltip/tooltip.d.ts +88 -63
  25. package/esm2015/common/basedatetimecontrol.js +1 -1
  26. package/esm2015/common/baseinputcontrol.js +2 -7
  27. package/esm2015/common/basemodelcontrol.js +44 -7
  28. package/esm2015/common/baseuploadcontrol.js +2 -3
  29. package/esm2015/controls/checkbox/checkbox.js +29 -6
  30. package/esm2015/controls/datetime/date.js +2 -3
  31. package/esm2015/controls/datetime/datetime.js +2 -3
  32. package/esm2015/controls/datetime/time.js +2 -3
  33. package/esm2015/controls/grid/grid.js +21 -21
  34. package/esm2015/controls/grid/gridbutton.js +19 -13
  35. package/esm2015/controls/grid/gridcolumn.js +14 -7
  36. package/esm2015/controls/grid/gridcolumnaction.js +6 -5
  37. package/esm2015/controls/grid/gridcolumnbase.js +67 -55
  38. package/esm2015/controls/grid/gridimage.js +3 -3
  39. package/esm2015/controls/grid/model.js +51 -30
  40. package/esm2015/controls/grid/paging.js +40 -42
  41. package/esm2015/controls/input/inputsearch.js +35 -6
  42. package/esm2015/controls/layout/formlayout.js +14 -3
  43. package/esm2015/controls/static/formcontainer.js +11 -10
  44. package/esm2015/controls/tooltip/tooltip.js +260 -189
  45. package/esm2015/interfaces/ISacConfigurationService.js +1 -1
  46. package/esm2015/interfaces/ISacIconService.js +1 -1
  47. package/esm2015/public_api.js +10 -3
  48. package/esm2015/services/sac-configuration.service.js +25 -1
  49. package/esm2015/services/sac-icon.service.js +13 -1
  50. package/esm2015/simpleangularcontrols-sac-common.js +1 -7
  51. package/esm2015/utilities/guid.js +4 -2
  52. package/esm2015/validation/isDateValid.js +9 -1
  53. package/fesm2015/simpleangularcontrols-sac-common.js +652 -395
  54. package/fesm2015/simpleangularcontrols-sac-common.js.map +1 -1
  55. package/interfaces/ISacConfigurationService.d.ts +16 -0
  56. package/interfaces/ISacIconService.d.ts +8 -0
  57. package/package.json +4 -4
  58. package/public_api.d.ts +7 -1
  59. package/services/sac-configuration.service.d.ts +32 -0
  60. package/services/sac-icon.service.d.ts +16 -0
  61. package/simpleangularcontrols-sac-common-10.0.0-rc.11.tgz +0 -0
  62. package/simpleangularcontrols-sac-common.d.ts +0 -6
  63. package/simpleangularcontrols-sac-common.metadata.json +1 -1
  64. 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 = true;
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 !== false;
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, "ComponentHeight", {
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, _b;
2752
- if (((_a = this.formlayout) === null || _a === void 0 ? void 0 : _a.IsInlineErrorEnabled) === null ||
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
- return (this.formlayout.IsInlineErrorEnabled !== false &&
2757
- this._inlineerrorenabled !== false);
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
- tooltiptext: [{ type: i0.Input }],
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
- iconname: [{ type: i0.Input }],
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 für Pager Settings
5784
+ * Model for pager settings
5609
5785
  */
5610
5786
  var PagerData = /** @class */ (function () {
5787
+ // #endregion Properties
5788
+ // #region Constructors
5611
5789
  /**
5612
- * Konstruktor
5613
- * @param PageSize Anzahl Elemente pro Seite
5614
- * @param CurrentPageIndex Aktuelle Seite
5615
- * @param TotalRowCount Total Rows in Datenbank
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
- * Gesamte Anzahl der Zeilen
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
- * PageSize
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 wenn Seite geändert werden soll
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
- * Konstruktor
5642
- * @param PageSize Seitegrösse / Anzahl Elemente pro Seite
5643
- * @param NewPageIndex Neuer Seitenindex
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
- * Aktueller Index der Seite
5829
+ * Index of the page to which you want to switch
5648
5830
  */
5649
- this.PageSize = 0;
5831
+ this.NewPageIndex = 0;
5650
5832
  /**
5651
- * PageSize
5833
+ * Number of elements on the page
5652
5834
  */
5653
- this.NewPageIndex = 0;
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
- * GridResponse-Klasse
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
- * Konstruktor
5673
- * @param sortcolumn Column die Sortiert wird
5674
- * @param sortorder Art der Sortierung
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
- * Basis Komponente für SacGrid
5875
+ * Basic component for SacGrid
5690
5876
  */
5691
5877
  var SacGridCommon = /** @class */ (function () {
5692
5878
  // #endregion Properties
5693
5879
  // #region Constructors
5694
5880
  /**
5695
- * Konstruktor
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
- * Protected Property. Enthielt die Nummer der aktiven Seite. Type: number. Default ist 1
5889
+ * Page number of the active page.
5704
5890
  */
5705
5891
  this.activePage = 1;
5706
5892
  /**
5707
- * Protected Property. Enthielt die Nummer der ersten angezeigtenen Seite in Pager. Type: number. Default ist 1
5893
+ * Contains the number of the first page displayed in Pager.
5708
5894
  */
5709
5895
  this.firstPageNumber = 1;
5710
5896
  /**
5711
- * Protected Property. Enthielt Array of Pages. Default value: empty array []
5897
+ * Contains Array of Pages.
5712
5898
  */
5713
5899
  this.paginators = [];
5714
5900
  /**
5715
- * Deaktiviert die Auswahl der PageSize im Pager
5901
+ * Deactivates the selection of the PageSize in the pager
5716
5902
  */
5717
5903
  this.pagesizedisabled = false;
5718
5904
  /**
5719
- * Definiert die Anzahl der Elemente pro Seite die ausgewählt werden können
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
- * Output EventEmitter. Wird aufgerufen wenn das Pager geklickt ist.
5909
+ * Event when the pager is clicked.
5724
5910
  */
5725
5911
  this.paging = new i0.EventEmitter();
5726
5912
  /**
5727
- * Output EventEmitter. Wird aufgerufen wenn ein Header geklickt ist, damit das Column soritert wird.
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
- * Private Property. Enthielt die Column Menge. Type: number. Default ist 0
5917
+ * Number of columns in the grid
5732
5918
  */
5733
5919
  this.ColumnCount = 0;
5734
5920
  /**
5735
- * Aktuell Sortierte Spalte
5921
+ * Column by which currently sorted.
5736
5922
  */
5737
5923
  this.sortColumn = '';
5738
5924
  /**
5739
- * Aktuelle Sortierung
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 für Sortierung
5752
- * @param sortDescription Settings für aktuelle sortierung
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
- * Die Methode erhöht die Column-Stücke um eins
5950
+ * The method increases the column elements by one
5765
5951
  */
5766
5952
  SacGridCommon.prototype.RegisterColumn = function () {
5767
5953
  this.ColumnCount++;
5768
- // Detect Changes ausführen, da ColumnChange nach OnInit ausgeführt wird.
5954
+ // Detect Changes, as ColumnChange is executed after OnInit.
5769
5955
  this.cd.detectChanges();
5770
5956
  };
5771
5957
  /**
5772
- * Die Methode deffiniert das Sortierung Flow
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
- * Die Methode verringert die Column-Stücke um eins
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
- * Setzt die neue Seite
5803
- * @param newStartIndex Neuer Seiten Index (Zero-Based)
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
- * Input Property für Styling des Buttons. Deffiniert die Css Klassen des Buttons
6027
+ * Button is deactivated
5841
6028
  */
5842
- this.iconstyle = '';
6029
+ this._isdisabledvalue = false;
5843
6030
  /**
5844
- * Button ist deaktiviert
6031
+ * Input property for styling the button. Defines the CSS classes of the button
5845
6032
  */
5846
- this._isdisabledvalue = false;
6033
+ this.iconstyle = '';
5847
6034
  /**
5848
- * Event wenn auf den Button geklickt wird
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
- * Deaktivieren von Buttons
5858
- * @param v Deaktiviert den Button
5859
- * @return Definiert ob der Button deaktiviert ist
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
- * Die Methode wird das cklickaction Emitter aktivieren
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
- isdisabled: [{ type: i0.Input }],
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 Komponente für GridColumn
6085
+ * Base component for GridColumn
5894
6086
  */
5895
6087
  var SacGridColumnBaseCommon = /** @class */ (function () {
6088
+ // #endregion Properties
6089
+ // #region Constructors
5896
6090
  /**
5897
- * Konstruktor
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
@@ -5903,91 +6097,44 @@
5903
6097
  this.grid = grid;
5904
6098
  this.injector = injector;
5905
6099
  this.el = el;
6100
+ /**
6101
+ * Click on Column Element
6102
+ */
6103
+ this.rowclicked = new i0.EventEmitter();
5906
6104
  this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
5907
6105
  }
5908
- //#endregion
5909
- //#region Interface Implementations
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
6106
+ Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortDown", {
6107
+ // #endregion Constructors
6108
+ // #region Public Getters And Setters
5954
6109
  /**
5955
- * sort up icon for grid header
6110
+ * sort down icon for grid header
5956
6111
  */
5957
6112
  get: function () {
5958
- return this.iconService.GridComponentSortUp;
6113
+ return this.iconService.GridComponentSortDown;
5959
6114
  },
5960
6115
  enumerable: false,
5961
6116
  configurable: true
5962
6117
  });
5963
- Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortDown", {
6118
+ Object.defineProperty(SacGridColumnBaseCommon.prototype, "IconSortUp", {
5964
6119
  /**
5965
- * sort down icon for grid header
6120
+ * sort up icon for grid header
5966
6121
  */
5967
6122
  get: function () {
5968
- return this.iconService.GridComponentSortDown;
6123
+ return this.iconService.GridComponentSortUp;
5969
6124
  },
5970
6125
  enumerable: false,
5971
6126
  configurable: true
5972
6127
  });
6128
+ // #endregion Public Getters And Setters
6129
+ // #region Public Methods
5973
6130
  /**
5974
- * Die Methode deffiniert wie das Grid sortiert wird, abhängig von gekligte Column
5975
- */
5976
- SacGridColumnBaseCommon.prototype.SortByColumn = function () {
5977
- if (this.sortkey !== undefined &&
5978
- this.sortkey !== null &&
5979
- this.sortkey !== '') {
5980
- return this.grid.SortBy(this.sortkey);
5981
- }
5982
- };
5983
- /**
5984
- * die Methode ergibt boolean Wert und definiert, ob das Column für Sortierung aktiviert ist, gemäß eingegebene sortKey
6131
+ * Method when Colument element is clicked. Triggers a RowClicked
5985
6132
  */
5986
- SacGridColumnBaseCommon.prototype.IsSortedColumn = function () {
5987
- return this.grid.sortColumn === this.sortkey;
6133
+ SacGridColumnBaseCommon.prototype.ColumnClick = function () {
6134
+ this.rowclicked.emit();
5988
6135
  };
5989
6136
  /**
5990
- * Die methode definiert die Dortirung Richtung. Die Werte sind: none, asc, desc.
6137
+ * Indicates the direction of sorting. The possible values are `none`,`asc`,`desc`
5991
6138
  */
5992
6139
  SacGridColumnBaseCommon.prototype.GetSortDirection = function () {
5993
6140
  switch (this.grid.sortDirection) {
@@ -6001,6 +6148,62 @@
6001
6148
  return 'none';
6002
6149
  }
6003
6150
  };
6151
+ /**
6152
+ * Defines whether the element is a cell in the table.
6153
+ */
6154
+ SacGridColumnBaseCommon.prototype.IsBody = function () {
6155
+ return this.type === 'body';
6156
+ };
6157
+ /**
6158
+ * Defines whether the element is a cell in the footer of the table
6159
+ */
6160
+ SacGridColumnBaseCommon.prototype.IsFooter = function () {
6161
+ return this.type === 'footer';
6162
+ };
6163
+ /**
6164
+ * Defines whether the element is a cell in the table header
6165
+ */
6166
+ SacGridColumnBaseCommon.prototype.IsHeader = function () {
6167
+ return this.type === 'header';
6168
+ };
6169
+ /**
6170
+ * Defines whether this column is sorted.
6171
+ */
6172
+ SacGridColumnBaseCommon.prototype.IsSortedColumn = function () {
6173
+ return this.grid.sortColumn === this.sortkey;
6174
+ };
6175
+ /**
6176
+ * Triggers the events so that the table is sorted according to this column.
6177
+ */
6178
+ SacGridColumnBaseCommon.prototype.SortByColumn = function () {
6179
+ if (this.sortkey !== undefined &&
6180
+ this.sortkey !== null &&
6181
+ this.sortkey !== '') {
6182
+ return this.grid.SortBy(this.sortkey);
6183
+ }
6184
+ };
6185
+ /**
6186
+ * Called when the component is destroyed.
6187
+ */
6188
+ SacGridColumnBaseCommon.prototype.ngOnDestroy = function () {
6189
+ if (this.IsHeader()) {
6190
+ this.grid.UnregisterColumn();
6191
+ }
6192
+ };
6193
+ /**
6194
+ * Is called when the component is initialized.
6195
+ */
6196
+ SacGridColumnBaseCommon.prototype.ngOnInit = function () {
6197
+ var rootElement = this.el.nativeElement;
6198
+ var parentElement = rootElement.parentElement;
6199
+ while (rootElement.firstChild) {
6200
+ parentElement.insertBefore(rootElement.firstChild, rootElement);
6201
+ }
6202
+ parentElement.removeChild(rootElement);
6203
+ if (this.IsHeader()) {
6204
+ this.grid.RegisterColumn();
6205
+ }
6206
+ };
6004
6207
  return SacGridColumnBaseCommon;
6005
6208
  }());
6006
6209
  SacGridColumnBaseCommon.decorators = [
@@ -6012,39 +6215,45 @@
6012
6215
  { type: i0.ElementRef }
6013
6216
  ]; };
6014
6217
  SacGridColumnBaseCommon.propDecorators = {
6218
+ header: [{ type: i0.Input }],
6015
6219
  name: [{ type: i0.Input }],
6220
+ sortkey: [{ type: i0.Input }],
6221
+ type: [{ type: i0.Input }],
6016
6222
  value: [{ type: i0.Input }],
6017
- header: [{ type: i0.Input }],
6018
6223
  width: [{ type: i0.Input }],
6019
- type: [{ type: i0.Input }],
6020
- sortkey: [{ type: i0.Input }]
6224
+ rowclicked: [{ type: i0.Output }]
6021
6225
  };
6022
6226
 
6023
6227
  /**
6024
- * Komponente für SacGridColumnCommon. Extends SacGridColumnBaseCommon
6228
+ * Component for SacGridColumnCommon. Extends SacGridColumnBaseCommon
6025
6229
  */
6026
6230
  var SacGridColumnCommon = /** @class */ (function (_super) {
6027
6231
  __extends(SacGridColumnCommon, _super);
6232
+ // #endregion Properties
6233
+ // #region Constructors
6028
6234
  /**
6029
- * Konstruktor
6235
+ * Constructor
6030
6236
  */
6031
6237
  function SacGridColumnCommon(grid, injector, el) {
6032
6238
  var _this = _super.call(this, grid, injector, el) || this;
6239
+ // #region Properties
6033
6240
  /**
6034
- * Das Property enthielt boolean Wert für die CSS Klasse ellipsis. Default is false.
6241
+ * Defines whether the CSS class ellipsis is set.
6035
6242
  */
6036
6243
  _this._ellipsis = false;
6037
6244
  return _this;
6038
6245
  }
6039
6246
  Object.defineProperty(SacGridColumnCommon.prototype, "ellipsis", {
6040
6247
  /**
6041
- * Getter für das private property _ellipsis. Ergibt das boolean Wert des Property
6248
+ * Getter for the ellipsis property. Always returns a boolean type.
6042
6249
  */
6043
6250
  get: function () {
6044
6251
  return this._ellipsis;
6045
6252
  },
6253
+ // #endregion Constructors
6254
+ // #region Public Getters And Setters
6046
6255
  /**
6047
- * Input Parameter für das css Class ellipsis. Das Setter setzt das boolean Wert auf das private property _ellipsis
6256
+ * Sets the ellipsis property. Can be a Boolean or the strings `true` or `false`.
6048
6257
  */
6049
6258
  set: function (v) {
6050
6259
  this._ellipsis = convertToBoolean(v);
@@ -6052,8 +6261,10 @@
6052
6261
  enumerable: false,
6053
6262
  configurable: true
6054
6263
  });
6264
+ // #endregion Public Getters And Setters
6265
+ // #region Public Methods
6055
6266
  /**
6056
- * Die Methode returns das Wert des Property _ellipsis
6267
+ * Checks whether ellipsis is set
6057
6268
  */
6058
6269
  SacGridColumnCommon.prototype.IsEllipsis = function () {
6059
6270
  return this._ellipsis;
@@ -6073,13 +6284,14 @@
6073
6284
  };
6074
6285
 
6075
6286
  /**
6076
- * Komponente für SacGridColumnActionCommon. Extends SacGridColumnBaseCommon
6287
+ * Component for SacGridColumnActionCommon. Extends SacGridColumnBaseCommon
6077
6288
  */
6078
6289
  var SacGridColumnActionCommon = /** @class */ (function (_super) {
6079
6290
  __extends(SacGridColumnActionCommon, _super);
6291
+ // #region Constructors
6080
6292
  /**
6081
- * Konstruktor
6082
- * @param el Element Referenz
6293
+ * Constructor
6294
+ * @param el Element reference
6083
6295
  * @param injector di inector to resolve icon service
6084
6296
  * @param grid SacGridCommon
6085
6297
  */
@@ -6098,7 +6310,7 @@
6098
6310
  ]; };
6099
6311
 
6100
6312
  /**
6101
- * Basis Komponente für SacGridImage
6313
+ * Basic component for SacGridImage
6102
6314
  */
6103
6315
  var SacGridImageCommon = /** @class */ (function () {
6104
6316
  function SacGridImageCommon() {
@@ -6113,67 +6325,65 @@
6113
6325
  };
6114
6326
 
6115
6327
  /**
6116
- * Basiskomponente für Paging
6328
+ * Basic component for paging
6117
6329
  */
6118
6330
  var SacPagingCommon = /** @class */ (function () {
6119
6331
  // #endregion Properties
6120
6332
  // #region Constructors
6121
6333
  /**
6122
- * Konstruktor
6123
- * Inject des Formulars
6334
+ * Constructor
6124
6335
  * @parent SacFormCommon
6125
6336
  * @injector Injector
6126
6337
  */
6127
6338
  function SacPagingCommon(injector) {
6128
6339
  /**
6129
- * Total Anzahl Rows
6340
+ * Total number of rows
6130
6341
  */
6131
6342
  this.totalRowCount = 0;
6132
6343
  /**
6133
- * Auswahl der Seitengrösse deaktivieren
6344
+ * Deactivate page size selection
6134
6345
  */
6135
6346
  this.pagesizedisabled = false;
6136
6347
  /**
6137
- * Text in Page für Anzahl Seitenelemente pro Seite
6138
- * Folgende Interpolation Texte sind vorhanden:
6139
- * {{PAGESIZE}}: Anzahl Elemente pro Seite
6348
+ * Text in Page for number of page elements per page. The following interpolation texts are available:
6349
+ *
6350
+ * {{PAGESIZE}}: Number of elements per page
6140
6351
  */
6141
6352
  this.pagesizes = '20|50|100';
6142
6353
  /**
6143
- * Text in Page für Anzahl Seitenelemente pro Seite
6144
- * Folgende Interpolation Texte sind vorhanden:
6145
- * {{PAGESIZE}}: Anzahl Elemente pro Seite
6354
+ * Text in Page for number of page elements per page. The following interpolation texts are available:
6355
+ *
6356
+ * {{PAGESIZE}}: Number of elements per page
6146
6357
  */
6147
6358
  this.pagesizetext = '';
6148
6359
  /**
6149
- * Text in Pager für 'Seite x von y'.
6150
- * Folgende Interpolation Texte sind vorhanden:
6151
- * {{CURRENTPAGE}}: Aktuelle Seite
6152
- * {{TOTALPAGES}}: Anzahl Seiten
6360
+ * Text in pager for 'Page x of y'. The following interpolation texts are available:
6361
+ * {{CURRENTPAGE}}: Current page
6362
+ * {{TOTALPAGES}}: Number of pages
6153
6363
  */
6154
6364
  this.pagingtext = '';
6155
6365
  /**
6156
- * Event wenn im Grid die Seite geändert wird. Als Parameter wird der neue PageIndex mitgegeben.
6366
+ * Event when the page is changed in the grid. The new PageIndex is given as a parameter.
6157
6367
  */
6158
6368
  this.paging = new i0.EventEmitter();
6159
6369
  /**
6160
- * Aktiver Seitenindex
6370
+ * Active page index
6161
6371
  */
6162
6372
  this.activePageIndex = 0;
6163
6373
  /**
6164
- * Erster Seitenindex
6374
+ * First page index
6165
6375
  */
6166
6376
  this.firstPageIndex = 0;
6167
6377
  /**
6168
- * Letzter Seitenindex
6378
+ * Last page index
6169
6379
  */
6170
6380
  this.lastPageIndex = 0;
6171
6381
  /**
6172
- * Anzahl Elemente pro Seite
6382
+ * Number of elements per page
6173
6383
  */
6174
6384
  this.pageSize = 20;
6175
6385
  /**
6176
- * Item für jedes Paging Element (Seitenzahl)
6386
+ * Item for each paging element (page number)
6177
6387
  */
6178
6388
  this.paginators = [];
6179
6389
  this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
@@ -6186,7 +6396,7 @@
6186
6396
  // #endregion Constructors
6187
6397
  // #region Public Getters And Setters
6188
6398
  /**
6189
- * Property für Pager Data
6399
+ * Property for Pager Data
6190
6400
  */
6191
6401
  set: function (p) {
6192
6402
  if (p != null) {
@@ -6201,7 +6411,7 @@
6201
6411
  });
6202
6412
  Object.defineProperty(SacPagingCommon.prototype, "PageSizeText", {
6203
6413
  /**
6204
- * Property mit Text für Total Einträge in Seite
6414
+ * Property with text for total entries in page
6205
6415
  */
6206
6416
  get: function () {
6207
6417
  return this.lngResourceService.GetString(this.pagesizetext);
@@ -6211,7 +6421,7 @@
6211
6421
  });
6212
6422
  Object.defineProperty(SacPagingCommon.prototype, "PagingText", {
6213
6423
  /**
6214
- * Text mit Aktueller Seite und Total Seiten
6424
+ * Text with current page and total pages
6215
6425
  */
6216
6426
  get: function () {
6217
6427
  return this.lngResourceService.GetString(this.pagingtext, {
@@ -6224,7 +6434,7 @@
6224
6434
  });
6225
6435
  Object.defineProperty(SacPagingCommon.prototype, "getPageSizes", {
6226
6436
  /**
6227
- * Gibt die Page Sizes als Number Array zurück
6437
+ * Returns the page sizes as a number array
6228
6438
  */
6229
6439
  get: function () {
6230
6440
  return this.pagesizes.split('|').map(function (itm) { return Number(itm); });
@@ -6235,8 +6445,8 @@
6235
6445
  // #endregion Public Getters And Setters
6236
6446
  // #region Public Methods
6237
6447
  /**
6238
- * Andert die Seite auf den neuen Index
6239
- * @param newPageIndex Seiten Index. Dies entspricht der Seitenzahl - 1.
6448
+ * Changes the page to the new index
6449
+ * @param newPageIndex Page index. This corresponds to the page number - 1.
6240
6450
  */
6241
6451
  SacPagingCommon.prototype.changePage = function (newPageIndex) {
6242
6452
  if (this.activePageIndex !== newPageIndex) {
@@ -6244,15 +6454,15 @@
6244
6454
  }
6245
6455
  };
6246
6456
  /**
6247
- * Ändert die Seitengrösse im Pager
6248
- * @param newSize Neue Anzahl Elemente pro Seite
6457
+ * Changes the page size in the pager
6458
+ * @param newSize New number of elements per page
6249
6459
  */
6250
6460
  SacPagingCommon.prototype.changePageSize = function (newSize) {
6251
6461
  var pagerData = new PagerRequest(newSize, this.activePageIndex);
6252
6462
  this.paging.emit(pagerData);
6253
6463
  };
6254
6464
  /**
6255
- * Paging auf 1. Seite
6465
+ *Switch to 1st page
6256
6466
  */
6257
6467
  SacPagingCommon.prototype.firstPage = function () {
6258
6468
  if (this.activePageIndex !== this.firstPageIndex) {
@@ -6260,19 +6470,19 @@
6260
6470
  }
6261
6471
  };
6262
6472
  /**
6263
- * Gibt die aktuelle Seitenzahl zurück
6473
+ * Returns the current page number
6264
6474
  */
6265
6475
  SacPagingCommon.prototype.getCurrentPageNumber = function () {
6266
6476
  return this.activePageIndex + 1;
6267
6477
  };
6268
6478
  /**
6269
- * Gibt die totale Anzahl Seiten zurück
6479
+ * Returns the total number of pages
6270
6480
  */
6271
6481
  SacPagingCommon.prototype.getTotalPageNumber = function () {
6272
6482
  return this.lastPageIndex + 1;
6273
6483
  };
6274
6484
  /**
6275
- * Paging auf letzter Seite
6485
+ * Paging on last page
6276
6486
  */
6277
6487
  SacPagingCommon.prototype.lastPage = function () {
6278
6488
  if (this.activePageIndex !== this.lastPageIndex) {
@@ -6280,7 +6490,7 @@
6280
6490
  }
6281
6491
  };
6282
6492
  /**
6283
- * Paging auf nächste Seite
6493
+ * Paging to next page
6284
6494
  */
6285
6495
  SacPagingCommon.prototype.nextPage = function () {
6286
6496
  if (this.activePageIndex !== this.lastPageIndex) {
@@ -6288,7 +6498,7 @@
6288
6498
  }
6289
6499
  };
6290
6500
  /**
6291
- * Paging eine Seite zurück
6501
+ * Paging one page back
6292
6502
  */
6293
6503
  SacPagingCommon.prototype.previousPage = function () {
6294
6504
  if (this.activePageIndex !== this.firstPageIndex) {
@@ -6298,7 +6508,7 @@
6298
6508
  // #endregion Public Methods
6299
6509
  // #region Protected Methods
6300
6510
  /**
6301
- * Erzeugt die Pager Daten
6511
+ * Generates the pager data
6302
6512
  */
6303
6513
  SacPagingCommon.prototype.createPager = function () {
6304
6514
  this.paginators = [];
@@ -6325,8 +6535,8 @@
6325
6535
  }
6326
6536
  };
6327
6537
  /**
6328
- * Gibt den letzten Seitenindex zurück.
6329
- * @param totalPageCount Total Anzahl Seiten
6538
+ * Returns the last page index.
6539
+ * @param totalPageCount Total number of pages
6330
6540
  */
6331
6541
  SacPagingCommon.prototype.getEndPageIndex = function (totalPageCount) {
6332
6542
  var endingPageToDisplay = this.activePageIndex + 2;
@@ -6340,8 +6550,8 @@
6340
6550
  return endingPageToDisplay;
6341
6551
  };
6342
6552
  /**
6343
- * Gibt den Start Index zurück
6344
- * @param totalPageCount Total Anzahl Seiten
6553
+ * Returns the start index
6554
+ * @param totalPageCount Total number of pages
6345
6555
  */
6346
6556
  SacPagingCommon.prototype.getStartPageIndex = function (totalPageCount) {
6347
6557
  var startingPageToDisplay = 0;
@@ -6355,7 +6565,7 @@
6355
6565
  return startingPageToDisplay;
6356
6566
  };
6357
6567
  /**
6358
- * Methode löst den Event aus, dass ein Paging stattgefunden hat
6568
+ * method triggers the event that paging has taken place
6359
6569
  */
6360
6570
  SacPagingCommon.prototype.paged = function (newPageIndex) {
6361
6571
  var pagerData = new PagerRequest(this.pageSize, newPageIndex);
@@ -6565,6 +6775,7 @@
6565
6775
  function SacDateCommon(formlayout, injector, elementRef) {
6566
6776
  var _this = _super.call(this, formlayout, injector, elementRef) || this;
6567
6777
  _this.elementRef = elementRef;
6778
+ // #region Properties
6568
6779
  /**
6569
6780
  * Format des Datums
6570
6781
  */
@@ -6626,7 +6837,6 @@
6626
6837
  * Definiert ob der Date Selector angezeigt wird
6627
6838
  */
6628
6839
  _this._showselector = false;
6629
- _this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
6630
6840
  return _this;
6631
6841
  }
6632
6842
  Object.defineProperty(SacDateCommon.prototype, "maxdate", {
@@ -7254,6 +7464,7 @@
7254
7464
  function SacDateTimeCommon(formlayout, injector, elementRef) {
7255
7465
  var _this = _super.call(this, formlayout, injector, elementRef) || this;
7256
7466
  _this.elementRef = elementRef;
7467
+ // #region Properties
7257
7468
  /**
7258
7469
  * Format des Datums
7259
7470
  */
@@ -7330,7 +7541,6 @@
7330
7541
  * Definiert ob der Date Selector angezeigt wird
7331
7542
  */
7332
7543
  _this._showselector = false;
7333
- _this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
7334
7544
  return _this;
7335
7545
  }
7336
7546
  Object.defineProperty(SacDateTimeCommon.prototype, "maxdate", {
@@ -7491,6 +7701,7 @@
7491
7701
  function SacTimeCommon(formlayout, injector, elementRef) {
7492
7702
  var _this = _super.call(this, formlayout, injector, elementRef) || this;
7493
7703
  _this.elementRef = elementRef;
7704
+ // #region Properties
7494
7705
  /**
7495
7706
  * Format des Datums
7496
7707
  */
@@ -7547,7 +7758,6 @@
7547
7758
  * Definiert ob der Date Selector angezeigt wird
7548
7759
  */
7549
7760
  _this._showselector = false;
7550
- _this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
7551
7761
  return _this;
7552
7762
  }
7553
7763
  Object.defineProperty(SacTimeCommon.prototype, "maxtime", {
@@ -7702,11 +7912,8 @@
7702
7912
  * Definiert den Container als Required Form Item
7703
7913
  */
7704
7914
  _this._isrequired = false;
7705
- /**
7706
- * Text welcher als Tooltip angezeigt wird.
7707
- */
7708
- _this.tooltiptext = '';
7709
7915
  return _this;
7916
+ // #endregion Public Methods
7710
7917
  }
7711
7918
  Object.defineProperty(SacStaticFormContainerCommon.prototype, "isrequired", {
7712
7919
  /**
@@ -7715,6 +7922,8 @@
7715
7922
  get: function () {
7716
7923
  return this._isrequired;
7717
7924
  },
7925
+ // #endregion Properties
7926
+ // #region Public Getters And Setters
7718
7927
  /**
7719
7928
  * Definiert den Container als Required Form Item
7720
7929
  */
@@ -7724,6 +7933,8 @@
7724
7933
  enumerable: false,
7725
7934
  configurable: true
7726
7935
  });
7936
+ // #endregion Public Getters And Setters
7937
+ // #region Public Methods
7727
7938
  /**
7728
7939
  * Validierung des Controls
7729
7940
  *
@@ -7741,7 +7952,6 @@
7741
7952
  { type: i0.Directive }
7742
7953
  ];
7743
7954
  SacStaticFormContainerCommon.propDecorators = {
7744
- tooltiptext: [{ type: i0.Input }],
7745
7955
  isrequired: [{ type: i0.Input }]
7746
7956
  };
7747
7957
 
@@ -8654,15 +8864,17 @@
8654
8864
  /**
8655
8865
  * Tooltip Component
8656
8866
  *
8657
- * Benötigt im HTML Markup folgende Identifier
8658
- * - container: Container für ng-content in welchem das Element angezeigt wird, wo der Tooltip angehängt wird.
8659
- * - tooltip: Container für Tooltip
8867
+ * Requires the following identifiers in the HTML markup
8868
+ * - container: Container for ng-content in which the element is displayed where the tooltip is attached.
8869
+ * - tooltip: Container for tooltip
8660
8870
  *
8661
- * Tooltip muss in 2 Schritten angezeigt werden. In einem ersten Schritt wird der Tooltip Markup erzeugt mit (ngIf). In einem 2. Schritt
8662
- * kann der Tooltip dann über die CSS visibility angezeigt werden. Wird dies nicht so gemacht, kann es bei gewissen Browsern zu einem Flacker Effekt führen.
8871
+ * Tooltip must be displayed in 2 steps. In a first step the tooltip markup is created with (ngIf). In a 2nd step
8872
+ * 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
8873
  *
8664
8874
  */
8665
8875
  var SacTooltipCommon = /** @class */ (function () {
8876
+ // #endregion Properties
8877
+ // #region Constructors
8666
8878
  /**
8667
8879
  * Konstruktor
8668
8880
  * @param ref Element Referenz
@@ -8672,50 +8884,56 @@
8672
8884
  this.cdRef = cdRef;
8673
8885
  this.ref = ref;
8674
8886
  /**
8675
- * Property für Enum in Angular HTML Template
8676
- */
8677
- this.TooltipPosition = exports.TooltipPosition;
8678
- /**
8679
- * Definiert ob der Tooltip sichtbar ist
8887
+ * Defines whether the tooltip is visible
8680
8888
  */
8681
8889
  this._isTooltipVisible = false;
8682
8890
  /**
8683
- * Position des Tooltips oben
8684
- */
8685
- this.TopPos = 0;
8686
- /**
8687
- * Position des Tooltips links
8891
+ * method if content has changed and proportions need to be reset in the UI.
8688
8892
  */
8689
- this.LeftPos = 0;
8893
+ this.onContentChange = function () {
8894
+ // Do nothing if is not visible
8895
+ if (!_this._isTooltipVisible) {
8896
+ return;
8897
+ }
8898
+ setTimeout(function () {
8899
+ _this.getLeftPosition();
8900
+ _this.getTopPosition();
8901
+ });
8902
+ };
8690
8903
  /**
8691
- * Position des Tooltips. Werte: left|top|right|bottom|auto
8904
+ * Position of the tooltip. Values: left|top|right|bottom|auto
8692
8905
  *
8693
- * Wert 'auto' kann mit einem anderen Wert kombiniert werden.
8906
+ * Value 'auto' can be combined with another value.
8694
8907
  */
8695
8908
  this.position = 'right|auto';
8696
8909
  /**
8697
- * Definiert ob der Tooltip sichtbar sein soll
8910
+ * Position of the tooltip on the left
8698
8911
  */
8699
8912
  this.IsTooltipContentVisible = false;
8700
8913
  /**
8701
- * Methode wenn Content geändert hat und Proporties im UI neu gesetzt werden müssen.
8914
+ * Position des Tooltips links
8915
+ */
8916
+ this.LeftPos = 0;
8917
+ /**
8918
+ * Property for enum in Angular HTML template
8702
8919
  */
8703
- this.onContentChange = function () {
8704
- setTimeout(function () {
8705
- _this.getLeftPosition();
8706
- _this.getTopPosition();
8707
- });
8708
- };
8920
+ this.TooltipPosition = exports.TooltipPosition;
8921
+ /**
8922
+ * Position of the tooltip at the top
8923
+ */
8924
+ this.TopPos = 0;
8709
8925
  }
8710
8926
  Object.defineProperty(SacTooltipCommon.prototype, "inlinemode", {
8711
8927
  /**
8712
- * Getter für Inline Mode für Tooltip
8928
+ * Property for inline mode for tooltip. Sets the display mode on the wrapper element to `inline`
8713
8929
  */
8714
8930
  get: function () {
8715
8931
  return this._inlinemode;
8716
8932
  },
8933
+ // #endregion Constructors
8934
+ // #region Public Getters And Setters
8717
8935
  /**
8718
- * Setter für Inline Mode für Tooltip
8936
+ * Setter for inline mode for tooltip
8719
8937
  */
8720
8938
  set: function (value) {
8721
8939
  this._inlinemode = convertToBoolean(value);
@@ -8725,7 +8943,7 @@
8725
8943
  });
8726
8944
  Object.defineProperty(SacTooltipCommon.prototype, "tooltip", {
8727
8945
  /**
8728
- * Setter für Name des Containers für den Tooltip. Wird benötigt, da Tooltip via NGIF ausgeblendet werden kann.
8946
+ * Setter for the name of the container for the tooltip. Is required as the tooltip can be hidden via ngIf.
8729
8947
  */
8730
8948
  set: function (content) {
8731
8949
  if (content !== undefined) {
@@ -8738,128 +8956,84 @@
8738
8956
  enumerable: false,
8739
8957
  configurable: true
8740
8958
  });
8959
+ Object.defineProperty(SacTooltipCommon.prototype, "tooltop", {
8960
+ get: function () {
8961
+ return this.tooltipcontainer;
8962
+ },
8963
+ enumerable: false,
8964
+ configurable: true
8965
+ });
8966
+ // #endregion Public Getters And Setters
8967
+ // #region Public Methods
8741
8968
  /**
8742
- * Ervent wenn das Control initialisert wird
8969
+ * Returns the position of the tooltip
8743
8970
  */
8744
- SacTooltipCommon.prototype.ngOnInit = function () {
8745
- // Register Event Listener
8746
- window.addEventListener('scroll', this.onContentChange, true);
8747
- window.addEventListener('resize', this.onContentChange, true);
8748
- if (this.tooltipcontainer !== undefined) {
8749
- document.body.appendChild(this.tooltipcontainer.nativeElement);
8971
+ SacTooltipCommon.prototype.GetTooltipPosition = function () {
8972
+ var validPositions = this.ValidatePositions();
8973
+ // tslint:disable-next-line:no-bitwise
8974
+ if (this.HasPosition(exports.TooltipPosition.right) &&
8975
+ validPositions & exports.TooltipPosition.right) {
8976
+ return exports.TooltipPosition.right;
8750
8977
  }
8751
- };
8752
- /**
8753
- * Event wenn das Control zerstört wird.
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);
8978
+ // tslint:disable-next-line:no-bitwise
8979
+ if (this.HasPosition(exports.TooltipPosition.top) &&
8980
+ validPositions & exports.TooltipPosition.top) {
8981
+ return exports.TooltipPosition.top;
8761
8982
  }
8762
- };
8763
- /**
8764
- * Berechnet die Position des Tooltips von Oben
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
- }
8983
+ // tslint:disable-next-line:no-bitwise
8984
+ if (this.HasPosition(exports.TooltipPosition.left) &&
8985
+ validPositions & exports.TooltipPosition.left) {
8986
+ return exports.TooltipPosition.left;
8791
8987
  }
8792
- else {
8793
- return this.ref.nativeElement.offsetTop;
8988
+ // tslint:disable-next-line:no-bitwise
8989
+ if (this.HasPosition(exports.TooltipPosition.bottom) &&
8990
+ validPositions & exports.TooltipPosition.bottom) {
8991
+ return exports.TooltipPosition.bottom;
8794
8992
  }
8795
- };
8796
- /**
8797
- * Berechnet die Position des Tooltips von Links
8798
- */
8799
- SacTooltipCommon.prototype.getLeftPosition = function () {
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;
8993
+ // Get Auto Position or Default
8994
+ if (this.IsAutoPosition()) {
8995
+ // tslint:disable-next-line:no-bitwise
8996
+ if (validPositions & exports.TooltipPosition.right) {
8997
+ return exports.TooltipPosition.right;
8820
8998
  }
8821
- else {
8822
- return this.content.nativeElement.offsetTop;
8999
+ // tslint:disable-next-line:no-bitwise
9000
+ if (validPositions & exports.TooltipPosition.top) {
9001
+ return exports.TooltipPosition.top;
8823
9002
  }
9003
+ // tslint:disable-next-line:no-bitwise
9004
+ if (validPositions & exports.TooltipPosition.left) {
9005
+ return exports.TooltipPosition.left;
9006
+ }
9007
+ // tslint:disable-next-line:no-bitwise
9008
+ if (validPositions & exports.TooltipPosition.bottom) {
9009
+ return exports.TooltipPosition.bottom;
9010
+ }
9011
+ return exports.TooltipPosition.right;
8824
9012
  }
8825
9013
  else {
8826
- return this.ref.nativeElement.offsetLeft;
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;
9014
+ return this.GetPosition();
8838
9015
  }
8839
9016
  };
8840
9017
  /**
8841
- * Berechnet die Breite die Tooltips
9018
+ * Hide tooltip
8842
9019
  */
8843
- SacTooltipCommon.prototype.getToolTipWidth = function () {
8844
- if (this.tooltipcontainer) {
8845
- return this.tooltipcontainer.nativeElement.clientWidth;
8846
- }
8847
- else {
8848
- return 0;
8849
- }
9020
+ SacTooltipCommon.prototype.HideTooltip = function () {
9021
+ this._isTooltipVisible = false;
9022
+ this.IsTooltipContentVisible = false;
8850
9023
  };
8851
9024
  /**
8852
- * Definiert ob der Tooltip im Markup vorhanden ist
9025
+ * Defines whether the tooltip is present in the markup
8853
9026
  */
8854
9027
  SacTooltipCommon.prototype.IsTooltipVisible = function () {
8855
9028
  return this._isTooltipVisible;
8856
9029
  };
8857
9030
  /**
8858
- * Tooltip anzeigen
9031
+ * Show tooltip
8859
9032
  */
8860
9033
  SacTooltipCommon.prototype.ShowTooltip = function () {
8861
9034
  var _this = this;
8862
9035
  this._isTooltipVisible = true;
9036
+ this.cdRef.detectChanges();
8863
9037
  setTimeout(function () {
8864
9038
  _this.getLeftPosition();
8865
9039
  _this.getTopPosition();
@@ -8867,66 +9041,75 @@
8867
9041
  });
8868
9042
  };
8869
9043
  /**
8870
- * Tooltip ausblenden
9044
+ * Calculates the height of the tooltip
8871
9045
  */
8872
- SacTooltipCommon.prototype.HideTooltip = function () {
8873
- this._isTooltipVisible = false;
8874
- this.IsTooltipContentVisible = false;
9046
+ SacTooltipCommon.prototype.getToolTipHeight = function () {
9047
+ var _a;
9048
+ if (this.tooltipcontainer) {
9049
+ return (_a = this.tooltipcontainer.nativeElement.firstElementChild.clientHeight) !== null && _a !== void 0 ? _a : 0;
9050
+ }
9051
+ else {
9052
+ return 0;
9053
+ }
8875
9054
  };
8876
9055
  /**
8877
- * Gibt die Position des Tooltips zurück
9056
+ * Calculates the width of the tooltips
8878
9057
  */
8879
- SacTooltipCommon.prototype.GetTooltipPosition = function () {
8880
- var validPositions = this.ValidatePositions();
8881
- // tslint:disable-next-line:no-bitwise
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;
9058
+ SacTooltipCommon.prototype.getToolTipWidth = function () {
9059
+ if (this.tooltipcontainer) {
9060
+ return this.tooltipcontainer.nativeElement.firstElementChild.clientWidth;
8888
9061
  }
8889
- // tslint:disable-next-line:no-bitwise
8890
- if (this.HasPosition(exports.TooltipPosition.left) && (validPositions & exports.TooltipPosition.left)) {
8891
- return exports.TooltipPosition.left;
9062
+ else {
9063
+ return 0;
8892
9064
  }
8893
- // tslint:disable-next-line:no-bitwise
8894
- if (this.HasPosition(exports.TooltipPosition.bottom) && (validPositions & exports.TooltipPosition.bottom)) {
8895
- return exports.TooltipPosition.bottom;
9065
+ };
9066
+ /**
9067
+ * Detect Changes after view checked. Prevent ExpressionChangedAfterItHasBeenCheckedError error
9068
+ */
9069
+ SacTooltipCommon.prototype.ngAfterViewChecked = function () {
9070
+ // Do nothing if is not visibile
9071
+ if (!this._isTooltipVisible) {
9072
+ return;
8896
9073
  }
8897
- // Get Auto Position or Default
8898
- if (this.IsAutoPosition()) {
8899
- // tslint:disable-next-line:no-bitwise
8900
- if (validPositions & exports.TooltipPosition.right) {
8901
- return exports.TooltipPosition.right;
8902
- }
8903
- // tslint:disable-next-line:no-bitwise
8904
- if (validPositions & exports.TooltipPosition.top) {
8905
- return exports.TooltipPosition.top;
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;
9074
+ this.cdRef.detectChanges();
9075
+ };
9076
+ /**
9077
+ * Detect UI Changes to Calculate Tooltip correct
9078
+ */
9079
+ SacTooltipCommon.prototype.ngDoCheck = function () {
9080
+ // Do nothing if is not visibile
9081
+ if (!this._isTooltipVisible) {
9082
+ return;
8916
9083
  }
8917
- else {
8918
- return this.GetPosition();
9084
+ this.getLeftPosition();
9085
+ this.getTopPosition();
9086
+ };
9087
+ /**
9088
+ * Event when the control is destroyed.
9089
+ */
9090
+ SacTooltipCommon.prototype.ngOnDestroy = function () {
9091
+ // Unregister Event Listener
9092
+ window.removeEventListener('scroll', this.onContentChange, true);
9093
+ window.removeEventListener('resize', this.onContentChange, true);
9094
+ if (this.tooltipcontainer !== undefined) {
9095
+ document.body.removeChild(this.tooltipcontainer.nativeElement);
8919
9096
  }
8920
9097
  };
8921
9098
  /**
8922
- * Definiert ob AutoPosition aktiv ist
9099
+ * Event when the control is initialized
8923
9100
  */
8924
- SacTooltipCommon.prototype.IsAutoPosition = function () {
8925
- var positions = this.position.split('|');
8926
- return positions.indexOf('auto') >= 0;
9101
+ SacTooltipCommon.prototype.ngOnInit = function () {
9102
+ // Register Event Listener
9103
+ window.addEventListener('scroll', this.onContentChange, true);
9104
+ window.addEventListener('resize', this.onContentChange, true);
9105
+ if (this.tooltipcontainer !== undefined) {
9106
+ document.body.appendChild(this.tooltipcontainer.nativeElement);
9107
+ }
8927
9108
  };
9109
+ // #endregion Protected Abstract Methods
9110
+ // #region Private Methods
8928
9111
  /**
8929
- * Gibt die definierte Position für den Tooltip zurück
9112
+ * Returns the defined position for the tooltip
8930
9113
  */
8931
9114
  SacTooltipCommon.prototype.GetPosition = function () {
8932
9115
  var positions = this.position.split('|');
@@ -8946,9 +9129,9 @@
8946
9129
  return exports.TooltipPosition.right;
8947
9130
  };
8948
9131
  /**
8949
- * Gibt zurück, ob die Position konfiguriert wurde
9132
+ * Returns whether the position has been configured
8950
9133
  *
8951
- * @param position Position auf welche geprüft wird
9134
+ * @param position Position to be checked
8952
9135
  */
8953
9136
  SacTooltipCommon.prototype.HasPosition = function (position) {
8954
9137
  var positions = this.position.split('|');
@@ -8961,13 +9144,21 @@
8961
9144
  if (position === exports.TooltipPosition.left && positions.indexOf('left') >= 0) {
8962
9145
  return true;
8963
9146
  }
8964
- if (position === exports.TooltipPosition.bottom && positions.indexOf('bottom') >= 0) {
9147
+ if (position === exports.TooltipPosition.bottom &&
9148
+ positions.indexOf('bottom') >= 0) {
8965
9149
  return true;
8966
9150
  }
8967
9151
  return false;
8968
9152
  };
8969
9153
  /**
8970
- * Prüft ob die Position gültig ist, resp. der Tooltip auf die Position platz hat
9154
+ * Defines whether AutoPosition is active
9155
+ */
9156
+ SacTooltipCommon.prototype.IsAutoPosition = function () {
9157
+ var positions = this.position.split('|');
9158
+ return positions.indexOf('auto') >= 0;
9159
+ };
9160
+ /**
9161
+ * Checks whether the position is valid or whether the tooltip on the position has space
8971
9162
  */
8972
9163
  SacTooltipCommon.prototype.ValidatePositions = function () {
8973
9164
  // Check if Container is false
@@ -8976,15 +9167,15 @@
8976
9167
  }
8977
9168
  var allowedPositions = exports.TooltipPosition.none;
8978
9169
  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;
9170
+ var tooltipRect = this.tooltipcontainer.nativeElement.firstElementChild.getBoundingClientRect();
9171
+ var leftPosOk = basePosition.left - tooltipRect.width + (this.getTooltipOffset() * -1) > 0;
9172
+ var rightPosOk = basePosition.right + tooltipRect.width + this.getTooltipOffset() < window.innerWidth;
8982
9173
  var topPosOk = basePosition.top - tooltipRect.height > 0;
8983
9174
  var bottomPosOk = basePosition.bottom + tooltipRect.height < window.innerHeight;
8984
- var leftHalfPosOk = basePosition.left - (tooltipRect.width / 2) > 0;
8985
- var rightHalfPosOk = basePosition.right + (tooltipRect.width / 2) < window.innerWidth;
8986
- var topHalfPosOk = basePosition.top - (tooltipRect.height / 2) > 0;
8987
- var bottomHalfPosOk = basePosition.bottom + (tooltipRect.height / 2) < window.innerHeight;
9175
+ var leftHalfPosOk = basePosition.left - tooltipRect.width / 2 > 0;
9176
+ var rightHalfPosOk = basePosition.right + tooltipRect.width / 2 < window.innerWidth;
9177
+ var topHalfPosOk = basePosition.top - tooltipRect.height / 2 > 0;
9178
+ var bottomHalfPosOk = basePosition.bottom + tooltipRect.height / 2 < window.innerHeight;
8988
9179
  if (leftPosOk && topHalfPosOk && bottomHalfPosOk) {
8989
9180
  // tslint:disable-next-line:no-bitwise
8990
9181
  allowedPositions = allowedPositions | exports.TooltipPosition.left;
@@ -9003,6 +9194,100 @@
9003
9194
  }
9004
9195
  return allowedPositions;
9005
9196
  };
9197
+ /**
9198
+ * Calculates the position of the tooltip from links
9199
+ */
9200
+ SacTooltipCommon.prototype.getLeftPosition = function () {
9201
+ if (this.content !== null && this.content !== undefined) {
9202
+ var item = this.content.nativeElement;
9203
+ if (item.children.length >= 1) {
9204
+ var childItem = item.firstElementChild;
9205
+ var contentPosition = childItem.getBoundingClientRect();
9206
+ switch (this.GetTooltipPosition()) {
9207
+ case exports.TooltipPosition.top:
9208
+ this.LeftPos = contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2;
9209
+ return (contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2);
9210
+ case exports.TooltipPosition.right:
9211
+ this.LeftPos = contentPosition.left + contentPosition.width + this.getTooltipOffset();
9212
+ return contentPosition.left + contentPosition.width + this.getTooltipOffset();
9213
+ case exports.TooltipPosition.bottom:
9214
+ this.LeftPos = contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2;
9215
+ return (contentPosition.left + contentPosition.width / 2 - this.getToolTipWidth() / 2);
9216
+ case exports.TooltipPosition.left:
9217
+ this.LeftPos = contentPosition.left - this.getToolTipWidth() + (this.getTooltipOffset() * -1);
9218
+ return contentPosition.left - this.getToolTipWidth() + (this.getTooltipOffset() * -1);
9219
+ }
9220
+ return this.content.nativeElement.offsetTop;
9221
+ }
9222
+ else {
9223
+ return this.content.nativeElement.offsetTop;
9224
+ }
9225
+ }
9226
+ else {
9227
+ return this.ref.nativeElement.offsetLeft;
9228
+ }
9229
+ };
9230
+ /**
9231
+ * Calculates the position of the tooltip from the top
9232
+ */
9233
+ SacTooltipCommon.prototype.getTopPosition = function () {
9234
+ if (this.content !== null && this.content !== undefined) {
9235
+ var item = this.content.nativeElement;
9236
+ if (item.children.length >= 1) {
9237
+ var childItem = item.firstElementChild;
9238
+ var contentPosition = childItem.getBoundingClientRect();
9239
+ // Get Position with Scroll (Scrollbars inside page should be substracted)
9240
+ var contentPositionTop = childItem.offsetTop + this.getOffsetTopParent(childItem.offsetParent) - this.getScrollTopParent(childItem.parentElement);
9241
+ switch (this.GetTooltipPosition()) {
9242
+ case exports.TooltipPosition.top:
9243
+ this.TopPos = contentPositionTop - this.getToolTipHeight() + (this.getTooltipOffset() * -1);
9244
+ return contentPositionTop - this.getToolTipHeight() + (this.getTooltipOffset() * -1);
9245
+ case exports.TooltipPosition.right:
9246
+ this.TopPos = contentPositionTop + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
9247
+ return contentPositionTop + (contentPosition.height / 2) - (this.getToolTipHeight() / 2);
9248
+ case exports.TooltipPosition.bottom:
9249
+ this.TopPos = contentPositionTop + contentPosition.height + this.getTooltipOffset();
9250
+ return contentPositionTop + contentPosition.height + this.getTooltipOffset();
9251
+ case exports.TooltipPosition.left:
9252
+ this.TopPos = contentPositionTop + contentPosition.height / 2 - this.getToolTipHeight() / 2;
9253
+ return (contentPositionTop + contentPosition.height / 2 - this.getToolTipHeight() / 2);
9254
+ }
9255
+ return (childItem.clientTop + childItem.offsetTop - (this.getToolTipHeight() / 2 - childItem.clientHeight / 2));
9256
+ }
9257
+ else {
9258
+ return this.content.nativeElement.offsetTop;
9259
+ }
9260
+ }
9261
+ else {
9262
+ return this.ref.nativeElement.offsetTop;
9263
+ }
9264
+ };
9265
+ /**
9266
+ * Calculates the top of the page inside all elements
9267
+ * @param element HTML Element
9268
+ * @returns summarized top value for absolute position
9269
+ */
9270
+ SacTooltipCommon.prototype.getOffsetTopParent = function (element) {
9271
+ if (!element.offsetParent) {
9272
+ return element.offsetTop;
9273
+ }
9274
+ var parentValue = this.getOffsetTopParent(element.offsetParent);
9275
+ var offset = element.offsetTop;
9276
+ return parentValue + offset;
9277
+ };
9278
+ /**
9279
+ * Caclulate Scrollbars inside tree
9280
+ * @param element HTML Element
9281
+ * @returns Scroll top value of element with all childs
9282
+ */
9283
+ SacTooltipCommon.prototype.getScrollTopParent = function (element) {
9284
+ // Body Scroll should not be calculated
9285
+ if (!element.parentElement) {
9286
+ return 0;
9287
+ }
9288
+ var parentValue = this.getScrollTopParent(element.parentElement);
9289
+ return parentValue + element.scrollTop;
9290
+ };
9006
9291
  return SacTooltipCommon;
9007
9292
  }());
9008
9293
  SacTooltipCommon.decorators = [
@@ -9015,9 +9300,9 @@
9015
9300
  SacTooltipCommon.propDecorators = {
9016
9301
  position: [{ type: i0.Input }],
9017
9302
  tooltiptext: [{ type: i0.Input }],
9018
- inlinemode: [{ type: i0.Input }],
9019
9303
  content: [{ type: i0.ViewChild, args: ['container', { static: true },] }],
9020
- tooltip: [{ type: i0.ViewChild, args: ['tooltip', { static: true },] }]
9304
+ inlinemode: [{ type: i0.Input }],
9305
+ tooltip: [{ type: i0.ViewChild, args: ['tooltip', { static: false },] }]
9021
9306
  };
9022
9307
 
9023
9308
  // #region Classes
@@ -9089,7 +9374,6 @@
9089
9374
  };
9090
9375
  _this.validationKeyService = injector.get(SACVALIDATIONKEY_SERVICE, new SacDefaultValidationKeyService());
9091
9376
  _this.lngResourceService = injector.get(SACLOCALISATION_SERVICE, new SacDefaultLocalisationService(_this.validationKeyService));
9092
- _this.iconService = injector.get(SACICON_SERVICE, new SacDefaultIconService());
9093
9377
  _this.uploads = [];
9094
9378
  _this.options.allowedTypes = '*';
9095
9379
  _this.options.concurrency = 1;
@@ -11974,6 +12258,10 @@
11974
12258
  exports.SacAbstractIconService = SacAbstractIconService;
11975
12259
  exports.SacAbstractLanguageService = SacAbstractLanguageService;
11976
12260
  exports.SacAbstractLocalisationService = SacAbstractLocalisationService;
12261
+ exports.SacBaseDateTimeControl = SacBaseDateTimeControl;
12262
+ exports.SacBaseListControl = SacBaseListControl;
12263
+ exports.SacBaseModelControl = SacBaseModelControl;
12264
+ exports.SacBaseSelectControl = SacBaseSelectControl;
11977
12265
  exports.SacButtonCommon = SacButtonCommon;
11978
12266
  exports.SacCheckboxCommon = SacCheckboxCommon;
11979
12267
  exports.SacConfirmButton = SacConfirmButton;
@@ -12001,6 +12289,7 @@
12001
12289
  exports.SacGridCommon = SacGridCommon;
12002
12290
  exports.SacGridImageCommon = SacGridImageCommon;
12003
12291
  exports.SacInputAreaCommon = SacInputAreaCommon;
12292
+ exports.SacInputBase = SacInputBase;
12004
12293
  exports.SacInputCommon = SacInputCommon;
12005
12294
  exports.SacInputCurrencyCommon = SacInputCurrencyCommon;
12006
12295
  exports.SacInputDecimalCommon = SacInputDecimalCommon;
@@ -12025,6 +12314,7 @@
12025
12314
  exports.SacTreeItemActionCommon = SacTreeItemActionCommon;
12026
12315
  exports.SacTreeViewChildCommon = SacTreeViewChildCommon;
12027
12316
  exports.SacTreeViewCommon = SacTreeViewCommon;
12317
+ exports.SacUploadBase = SacUploadBase;
12028
12318
  exports.SacUploadFile = SacUploadFile;
12029
12319
  exports.SacUploadMultipleCommon = SacUploadMultipleCommon;
12030
12320
  exports.SacUploadSingleCommon = SacUploadSingleCommon;
@@ -12041,12 +12331,6 @@
12041
12331
  exports.mapToObject = mapToObject;
12042
12332
  exports.positionElements = positionElements;
12043
12333
  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
12334
 
12051
12335
  Object.defineProperty(exports, '__esModule', { value: true });
12052
12336