@seniorsistemas/angular-components 15.1.1 → 15.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +325 -59
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/info-sign/info-sign.component.d.ts +0 -1
  6. package/components/table/table-paging/table-paging.component.d.ts +6 -2
  7. package/components/tooltip/index.d.ts +2 -0
  8. package/components/tooltip/models/index.d.ts +1 -0
  9. package/components/tooltip/models/tooltip-position.d.ts +7 -0
  10. package/components/tooltip/tooltip.component.d.ts +9 -0
  11. package/components/tooltip/tooltip.directive.d.ts +26 -0
  12. package/components/tooltip/tooltip.module.d.ts +2 -0
  13. package/esm2015/components/info-sign/info-sign.component.js +3 -3
  14. package/esm2015/components/info-sign/info-sign.directive.js +2 -2
  15. package/esm2015/components/info-sign/info-sign.module.js +10 -4
  16. package/esm2015/components/table/table-column/table-columns.component.js +1 -1
  17. package/esm2015/components/table/table-paging/table-paging.component.js +33 -12
  18. package/esm2015/components/table/table.module.js +2 -2
  19. package/esm2015/components/tooltip/index.js +3 -0
  20. package/esm2015/components/tooltip/models/index.js +2 -0
  21. package/esm2015/components/tooltip/models/tooltip-position.js +9 -0
  22. package/esm2015/components/tooltip/tooltip.component.js +21 -0
  23. package/esm2015/components/tooltip/tooltip.directive.js +195 -0
  24. package/esm2015/components/tooltip/tooltip.module.js +19 -0
  25. package/esm2015/public-api.js +2 -1
  26. package/esm2015/seniorsistemas-angular-components.js +48 -45
  27. package/esm5/components/info-sign/info-sign.component.js +3 -2
  28. package/esm5/components/info-sign/info-sign.directive.js +2 -2
  29. package/esm5/components/info-sign/info-sign.module.js +10 -4
  30. package/esm5/components/table/table-column/table-columns.component.js +1 -1
  31. package/esm5/components/table/table-paging/table-paging.component.js +33 -12
  32. package/esm5/components/table/table.module.js +2 -2
  33. package/esm5/components/tooltip/index.js +3 -0
  34. package/esm5/components/tooltip/models/index.js +2 -0
  35. package/esm5/components/tooltip/models/tooltip-position.js +9 -0
  36. package/esm5/components/tooltip/tooltip.component.js +22 -0
  37. package/esm5/components/tooltip/tooltip.directive.js +196 -0
  38. package/esm5/components/tooltip/tooltip.module.js +22 -0
  39. package/esm5/public-api.js +2 -1
  40. package/esm5/seniorsistemas-angular-components.js +48 -45
  41. package/fesm2015/seniorsistemas-angular-components.js +286 -30
  42. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  43. package/fesm5/seniorsistemas-angular-components.js +291 -29
  44. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  45. package/package.json +1 -1
  46. package/public-api.d.ts +1 -0
  47. package/seniorsistemas-angular-components.d.ts +47 -44
  48. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { __decorate, __rest, __param, __awaiter } from 'tslib';
2
- import { Input, Component, NgModule, EventEmitter, HostBinding, Output, ViewChild, Renderer2, HostListener, Directive, Injectable, Pipe, forwardRef, ViewEncapsulation, TemplateRef, ViewContainerRef, ComponentFactoryResolver, ChangeDetectorRef, ElementRef, InjectionToken, Inject, Optional, ContentChild, ApplicationRef, Injector, ContentChildren } from '@angular/core';
2
+ import { Input, Component, NgModule, EventEmitter, HostBinding, Output, ViewChild, Renderer2, HostListener, Directive, Injectable, Pipe, forwardRef, ViewEncapsulation, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, TemplateRef, ViewContainerRef, ChangeDetectorRef, InjectionToken, Inject, Optional, ContentChild, ContentChildren } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import { BreadcrumbModule as BreadcrumbModule$1 } from 'primeng/breadcrumb';
5
5
  import { NavigationEnd, PRIMARY_OUTLET, ActivatedRoute, Router, RouterModule } from '@angular/router';
6
6
  import { Subject, of, from, forkJoin, throwError, ReplaySubject } from 'rxjs';
7
7
  import { takeUntil, filter, tap, map, switchMap, catchError, delay, debounceTime, repeat, finalize, take } from 'rxjs/operators';
8
8
  import { TieredMenu, TieredMenuModule } from 'primeng/tieredmenu';
9
- import { TooltipModule } from 'primeng/tooltip';
9
+ import { TooltipModule as TooltipModule$1 } from 'primeng/tooltip';
10
10
  import { DomHandler } from 'primeng/dom';
11
11
  import { Calendar, CalendarModule } from 'primeng/calendar';
12
12
  import { trigger, state, style as style$7, transition, animate, group, query, animateChild } from '@angular/animations';
@@ -281,7 +281,7 @@ let ButtonModule = class ButtonModule {
281
281
  };
282
282
  ButtonModule = __decorate([
283
283
  NgModule({
284
- imports: [CommonModule, RouterModule, TieredMenuModule, TooltipModule],
284
+ imports: [CommonModule, RouterModule, TieredMenuModule, TooltipModule$1],
285
285
  declarations: [ButtonComponent],
286
286
  exports: [ButtonComponent],
287
287
  })
@@ -2821,20 +2821,249 @@ FileUploadModule = __decorate([
2821
2821
  imports: [
2822
2822
  CommonModule,
2823
2823
  ButtonModule,
2824
- TooltipModule,
2824
+ TooltipModule$1,
2825
2825
  ProgressBarModule,
2826
2826
  ],
2827
2827
  exports: [FileUploadComponent],
2828
2828
  })
2829
2829
  ], FileUploadModule);
2830
2830
 
2831
+ var TooltipPosition;
2832
+ (function (TooltipPosition) {
2833
+ TooltipPosition["Above"] = "above";
2834
+ TooltipPosition["Below"] = "below";
2835
+ TooltipPosition["Left"] = "left";
2836
+ TooltipPosition["Right"] = "right";
2837
+ TooltipPosition["Default"] = "above";
2838
+ })(TooltipPosition || (TooltipPosition = {}));
2839
+
2840
+ let TooltipComponent = class TooltipComponent {
2841
+ constructor() {
2842
+ this.tooltip = "";
2843
+ this.position = TooltipPosition.Default;
2844
+ this.left = 0;
2845
+ this.top = 0;
2846
+ this.visible = false;
2847
+ this.escape = false;
2848
+ }
2849
+ };
2850
+ TooltipComponent = __decorate([
2851
+ Component({
2852
+ template: "<div\n class=\"tooltip\"\n [ngClass]=\"['tooltip--' + position]\"\n [class.tooltip--visible]=\"visible\"\n [ngStyle]=\"{\n 'left': left + 'px',\n 'top': top + 'px'\n }\">\n <ng-template\n *ngIf=\"escape;\n then escapeTemplate;\n else noEscapeTemplate\">\n </ng-template> \n</div>\n\n<ng-template #noEscapeTemplate>\n <span\n class=\"tooltip__content\"\n [innerHTML]=\"tooltip\">\n </span>\n</ng-template>\n\n<ng-template #escapeTemplate>\n <span class=\"tooltip__content\">\n {{ tooltip }}\n </span>\n</ng-template>",
2853
+ styles: [".tooltip{background-color:#000;border-radius:2px;color:#fff;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:21px;margin-top:5px;opacity:0;padding:8px;position:fixed;transform:translateX(-50%);text-align:center;z-index:99999}.tooltip--visible{opacity:1;transition:opacity .3s}.tooltip::before{content:\"\";height:0;position:absolute;width:0}.tooltip--below{margin-top:8px;transform:translateX(-50%)}.tooltip--below::before{border:5px solid transparent;border-bottom:5px solid #000;left:calc(50% - 5px);top:-10px}.tooltip--above{margin-bottom:8px;transform:translate(-50%,-100%)}.tooltip--above::before{border:5px solid transparent;border-top:5px solid #000;left:calc(50% - 5px);bottom:-10px}.tooltip--left{margin-right:28px;transform:translate(calc(-100% - 7px),-50%)}.tooltip--left::before{border:5px solid transparent;border-left:5px solid #000;right:-10px;bottom:calc(50% - 5px)}.tooltip--right{margin-left:7px;transform:translateY(-50%)}.tooltip--right::before{border:5px solid transparent;border-right:5px solid #000;left:-10px;bottom:calc(50% - 5px)}"]
2854
+ })
2855
+ ], TooltipComponent);
2856
+
2857
+ let TooltipDirective = class TooltipDirective {
2858
+ constructor(elementRef, appRef, componentFactoryResolver, injector) {
2859
+ this.elementRef = elementRef;
2860
+ this.appRef = appRef;
2861
+ this.componentFactoryResolver = componentFactoryResolver;
2862
+ this.injector = injector;
2863
+ this.position = TooltipPosition.Default;
2864
+ this.showDelay = 500;
2865
+ this.escape = false;
2866
+ this.componentRef = null;
2867
+ }
2868
+ ngOnDestroy() {
2869
+ this.destroy();
2870
+ }
2871
+ onMouseEnter() {
2872
+ this.createTootip();
2873
+ }
2874
+ onMouseLeave() {
2875
+ this.setHideTooltipTimeout();
2876
+ }
2877
+ onTouchStart($event) {
2878
+ $event.preventDefault();
2879
+ window.clearTimeout(this.touchTimeout);
2880
+ this.touchTimeout = window.setTimeout(this.createTootip.bind(this), 500);
2881
+ }
2882
+ onTouchEnd() {
2883
+ window.clearTimeout(this.touchTimeout);
2884
+ this.setHideTooltipTimeout();
2885
+ }
2886
+ setHideTooltipTimeout() {
2887
+ this.destroy();
2888
+ }
2889
+ createTootip() {
2890
+ var _a;
2891
+ if (this.componentRef === null && ((_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.length)) {
2892
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);
2893
+ this.componentRef = componentFactory.create(this.injector);
2894
+ this.appRef.attachView(this.componentRef.hostView);
2895
+ const domElem = this.componentRef.hostView.rootNodes[0];
2896
+ this.elementRef.nativeElement.appendChild(domElem);
2897
+ this.setTooltipComponentProperties();
2898
+ this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);
2899
+ }
2900
+ }
2901
+ showTooltip() {
2902
+ if (this.componentRef !== null) {
2903
+ this.componentRef.instance.visible = true;
2904
+ }
2905
+ }
2906
+ setTooltipComponentProperties() {
2907
+ const margin = 16;
2908
+ const anchorSize = 5;
2909
+ if (this.componentRef !== null) {
2910
+ this.componentRef.instance.tooltip = this.tooltip;
2911
+ this.componentRef.instance.escape = this.escape;
2912
+ const { left, right, top, bottom } = this.elementRef.nativeElement.getBoundingClientRect();
2913
+ const tooltipHeight = bottom - top;
2914
+ const tooltipWidth = right - left;
2915
+ const safeSpace = 150;
2916
+ let positioned = false;
2917
+ const invalidOptions = [];
2918
+ while (!positioned) {
2919
+ if (invalidOptions.includes(TooltipPosition.Above)
2920
+ && invalidOptions.includes(TooltipPosition.Below)
2921
+ && invalidOptions.includes(TooltipPosition.Left)
2922
+ && invalidOptions.includes(TooltipPosition.Right)) {
2923
+ this.destroy();
2924
+ throw new Error("No space to show tooltip");
2925
+ }
2926
+ switch (this.position) {
2927
+ case TooltipPosition.Below: {
2928
+ if (invalidOptions.includes(TooltipPosition.Below)) {
2929
+ this.position = TooltipPosition.Left;
2930
+ break;
2931
+ }
2932
+ const bottomShift = document.body.clientHeight - bottom;
2933
+ if (bottomShift <= tooltipHeight + safeSpace) {
2934
+ this.position = TooltipPosition.Above;
2935
+ invalidOptions.push(TooltipPosition.Below);
2936
+ break;
2937
+ }
2938
+ this.componentRef.instance.left = Math.round(tooltipWidth / 2 + left);
2939
+ this.componentRef.instance.top = Math.round(bottom + margin);
2940
+ positioned = true;
2941
+ break;
2942
+ }
2943
+ case TooltipPosition.Above: {
2944
+ if (invalidOptions.includes(TooltipPosition.Above)) {
2945
+ this.position = TooltipPosition.Left;
2946
+ break;
2947
+ }
2948
+ const topShift = top;
2949
+ if (topShift <= tooltipHeight + safeSpace) {
2950
+ this.position = TooltipPosition.Below;
2951
+ invalidOptions.push(TooltipPosition.Above);
2952
+ positioned = false;
2953
+ break;
2954
+ }
2955
+ this.componentRef.instance.left = Math.round(tooltipWidth / 2 + left);
2956
+ this.componentRef.instance.top = Math.round(top - margin);
2957
+ positioned = true;
2958
+ break;
2959
+ }
2960
+ case TooltipPosition.Right: {
2961
+ if (invalidOptions.includes(TooltipPosition.Right)) {
2962
+ this.position = TooltipPosition.Above;
2963
+ break;
2964
+ }
2965
+ const rightShift = document.body.clientWidth - right;
2966
+ if (rightShift <= tooltipWidth + safeSpace) {
2967
+ this.position = TooltipPosition.Left;
2968
+ invalidOptions.push(TooltipPosition.Right);
2969
+ positioned = false;
2970
+ break;
2971
+ }
2972
+ this.componentRef.instance.left = Math.round(right + margin);
2973
+ this.componentRef.instance.top = Math.round(top + tooltipHeight / 2 - anchorSize);
2974
+ positioned = true;
2975
+ break;
2976
+ }
2977
+ case TooltipPosition.Left: {
2978
+ if (invalidOptions.includes(TooltipPosition.Left)) {
2979
+ this.position = TooltipPosition.Above;
2980
+ break;
2981
+ }
2982
+ const leftShift = left;
2983
+ if (leftShift <= tooltipWidth + safeSpace) {
2984
+ this.position = TooltipPosition.Right;
2985
+ invalidOptions.push(TooltipPosition.Left);
2986
+ positioned = false;
2987
+ break;
2988
+ }
2989
+ this.componentRef.instance.left = Math.round(left - margin);
2990
+ this.componentRef.instance.top = Math.round(top + tooltipHeight / 2 - anchorSize);
2991
+ positioned = true;
2992
+ break;
2993
+ }
2994
+ default: {
2995
+ break;
2996
+ }
2997
+ }
2998
+ this.componentRef.instance.position = this.position;
2999
+ }
3000
+ }
3001
+ }
3002
+ destroy() {
3003
+ if (this.componentRef !== null) {
3004
+ window.clearTimeout(this.showTimeout);
3005
+ this.appRef.detachView(this.componentRef.hostView);
3006
+ this.componentRef.destroy();
3007
+ this.componentRef = null;
3008
+ }
3009
+ }
3010
+ };
3011
+ TooltipDirective.ctorParameters = () => [
3012
+ { type: ElementRef },
3013
+ { type: ApplicationRef },
3014
+ { type: ComponentFactoryResolver },
3015
+ { type: Injector }
3016
+ ];
3017
+ __decorate([
3018
+ Input("sTooltip")
3019
+ ], TooltipDirective.prototype, "tooltip", void 0);
3020
+ __decorate([
3021
+ Input("tooltipPosition")
3022
+ ], TooltipDirective.prototype, "position", void 0);
3023
+ __decorate([
3024
+ Input()
3025
+ ], TooltipDirective.prototype, "showDelay", void 0);
3026
+ __decorate([
3027
+ Input()
3028
+ ], TooltipDirective.prototype, "escape", void 0);
3029
+ __decorate([
3030
+ HostListener("mouseenter")
3031
+ ], TooltipDirective.prototype, "onMouseEnter", null);
3032
+ __decorate([
3033
+ HostListener("mouseleave")
3034
+ ], TooltipDirective.prototype, "onMouseLeave", null);
3035
+ __decorate([
3036
+ HostListener("touchstart", ["$event"])
3037
+ ], TooltipDirective.prototype, "onTouchStart", null);
3038
+ __decorate([
3039
+ HostListener("touchend")
3040
+ ], TooltipDirective.prototype, "onTouchEnd", null);
3041
+ TooltipDirective = __decorate([
3042
+ Directive({
3043
+ selector: "[sTooltip]",
3044
+ })
3045
+ ], TooltipDirective);
3046
+
3047
+ let TooltipModule = class TooltipModule {
3048
+ };
3049
+ TooltipModule = __decorate([
3050
+ NgModule({
3051
+ imports: [CommonModule],
3052
+ declarations: [
3053
+ TooltipComponent,
3054
+ TooltipDirective,
3055
+ ],
3056
+ exports: [TooltipDirective],
3057
+ })
3058
+ ], TooltipModule);
3059
+
2831
3060
  let InfoSignComponent = class InfoSignComponent {
2832
- constructor() { }
2833
3061
  };
2834
3062
  InfoSignComponent = __decorate([
2835
3063
  Component({
2836
3064
  selector: "s-info-sign-component",
2837
- template: "<span style=\"display: inline-flex; justify-content: flex-start; align-items: baseline;\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i class=\"fa fa-info-circle\"\n aria-hidden=\"true\"\n style=\"padding-left: 10px\"\n [pTooltip]=\"tooltip\"\n [escape]=\"false\"></i>\n</span>"
3065
+ template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"right\"\n showDelay=\"0\">\n </i>\n</span>",
3066
+ styles: [".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]
2838
3067
  })
2839
3068
  ], InfoSignComponent);
2840
3069
 
@@ -2884,8 +3113,14 @@ let InfoSignModule = class InfoSignModule {
2884
3113
  };
2885
3114
  InfoSignModule = __decorate([
2886
3115
  NgModule({
2887
- imports: [TooltipModule, CommonModule],
2888
- declarations: [InfoSignDirective, InfoSignComponent],
3116
+ imports: [
3117
+ TooltipModule,
3118
+ CommonModule,
3119
+ ],
3120
+ declarations: [
3121
+ InfoSignDirective,
3122
+ InfoSignComponent,
3123
+ ],
2889
3124
  exports: [InfoSignDirective],
2890
3125
  entryComponents: [InfoSignComponent],
2891
3126
  })
@@ -4037,7 +4272,7 @@ __decorate([
4037
4272
  ], TableColumnsComponent.prototype, "locale", void 0);
4038
4273
  TableColumnsComponent = __decorate([
4039
4274
  Component({
4040
- template: "<ng-template #columnsTemplate>\n <td *ngFor=\"let column of formattedColumns\"\n [ngStyle]=\"column.style\"\n (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\">\n\n <div *ngIf=\"column.type !== 'TOKENS' || !isArray(column.columnValue); else tokensTemplate\">\n <span *ngIf=\"column.type !== 'LINK'\"\n [pTooltip]=\"column.tooltip\"\n [escape]=\"false\"\n [ngClass]=\"column.badgeClass\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </span>\n\n <a *ngIf=\"column.type === 'LINK'\"\n [pTooltip]=\"column.tooltip\"\n [escape]=\"false\"\n (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </a>\n\n <ng-template #columnValueTemplate>\n <span *ngFor=\"let value of getSplittedString(column)\">\n <span [ngClass]=\"{ 'sds-empty-value': value.isUninformed }\">{{value.value}}</span>\n <span>{{value.separator}}</span>\n </span>\n <ng-container *ngIf=\"!!column.infoSign\">\n <span *sInfoSign=\"column.infoSign\"></span>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #tokensTemplate>\n <s-token-list\n [tokens]=\"column.columnValue\"\n [hidePointerEvents]=\"true\"\n >\n </s-token-list>\n <ng-container *ngIf=\"!!column.infoSign\">\n <span *sInfoSign=\"column.infoSign\"></span>\n </ng-container>\n </ng-template>\n </td>\n</ng-template>\n",
4275
+ template: "<ng-template #columnsTemplate>\n <td *ngFor=\"let column of formattedColumns\"\n [ngStyle]=\"column.style\"\n (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\">\n\n <div *ngIf=\"column.type !== 'TOKENS' || !isArray(column.columnValue); else tokensTemplate\">\n <span *ngIf=\"column.type !== 'LINK'\"\n [sTooltip]=\"column.tooltip\"\n [escape]=\"false\"\n [ngClass]=\"column.badgeClass\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </span>\n\n <a *ngIf=\"column.type === 'LINK'\"\n [sTooltip]=\"column.tooltip\"\n [escape]=\"false\"\n (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </a>\n\n <ng-template #columnValueTemplate>\n <span *ngFor=\"let value of getSplittedString(column)\">\n <span [ngClass]=\"{ 'sds-empty-value': value.isUninformed }\">{{value.value}}</span>\n <span>{{value.separator}}</span>\n </span>\n <ng-container *ngIf=\"!!column.infoSign\">\n <span *sInfoSign=\"column.infoSign\"></span>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #tokensTemplate>\n <s-token-list\n [tokens]=\"column.columnValue\"\n [hidePointerEvents]=\"true\"\n >\n </s-token-list>\n <ng-container *ngIf=\"!!column.infoSign\">\n <span *sInfoSign=\"column.infoSign\"></span>\n </ng-container>\n </ng-template>\n </td>\n</ng-template>\n",
4041
4276
  selector: "s-table-columns",
4042
4277
  styles: [":host{display:none}"]
4043
4278
  }),
@@ -4164,10 +4399,26 @@ let TablePagingComponent = class TablePagingComponent {
4164
4399
  getSelectedRowsToExport(columns) {
4165
4400
  return this.mapColumnsTranslations(columns, this.table.selection);
4166
4401
  }
4402
+ getInnerPropValue(obj, path) {
4403
+ return path.split(".").reduce((result, prop) => (result[prop] === undefined ? undefined : result[prop]), obj);
4404
+ }
4405
+ setInnerPropValue(obj, path, value) {
4406
+ this.recursionSet(obj, path.split("."), value);
4407
+ }
4408
+ recursionSet(obj, keysList, value) {
4409
+ const key = keysList[0];
4410
+ if (keysList.length === 1) {
4411
+ obj[key] = value;
4412
+ return obj;
4413
+ }
4414
+ obj[key] = (this.recursionSet((obj === null || obj === void 0 ? void 0 : obj[key]) || {}, keysList.slice(1), value));
4415
+ return obj;
4416
+ }
4167
4417
  mapColumnsTranslations(columns, rows) {
4168
4418
  const enumColumns = columns.filter(p => p.enumPrefix);
4169
- if (!enumColumns.length)
4419
+ if (!enumColumns.length) {
4170
4420
  return rows;
4421
+ }
4171
4422
  return [...rows].map(row => {
4172
4423
  const newRow = Object.assign({}, row);
4173
4424
  for (let i = 0; i <= enumColumns.length - 1; i++) {
@@ -4177,22 +4428,27 @@ let TablePagingComponent = class TablePagingComponent {
4177
4428
  fields = [fields];
4178
4429
  }
4179
4430
  fields.forEach((fieldName) => {
4180
- const columnData = row[fieldName];
4181
- if (columnData === null || columnData === undefined)
4431
+ const columnData = this.getInnerPropValue(row, fieldName);
4432
+ if (columnData === null || columnData === undefined) {
4182
4433
  return;
4183
- const enumValue = columnData.toString().toLowerCase();
4184
- let translationKey = column.enumPrefix + enumValue;
4185
- let translatedValue = this.translate.instant(translationKey);
4186
- if (translationKey === translatedValue && enumValue.length > 1) {
4187
- translationKey = column.enumPrefix + enumValue.substring(0, 1) + "_" + enumValue.substr(1);
4188
- translatedValue = this.translate.instant(translationKey);
4189
4434
  }
4190
- newRow[fieldName] = translatedValue;
4435
+ const newValue = this.translateValue(column, columnData);
4436
+ this.setInnerPropValue(newRow, fieldName, newValue);
4191
4437
  });
4192
4438
  }
4193
4439
  return newRow;
4194
4440
  });
4195
4441
  }
4442
+ translateValue(column, columnData) {
4443
+ const enumValue = columnData.toString().toLowerCase();
4444
+ let translationKey = column.enumPrefix + enumValue;
4445
+ const translatedValue = this.translate.instant(translationKey);
4446
+ if (translationKey === translatedValue && enumValue.length > 1) {
4447
+ translationKey = `${column.enumPrefix}${enumValue.substring(0, 1)}_${enumValue.substr(1)}`;
4448
+ return this.translate.instant(translationKey);
4449
+ }
4450
+ return translatedValue;
4451
+ }
4196
4452
  getExportFileName() {
4197
4453
  var _a;
4198
4454
  const fileName = (_a = this.exportFileName) !== null && _a !== void 0 ? _a : "download";
@@ -5097,7 +5353,7 @@ DynamicFormModule = __decorate([
5097
5353
  CommonModule,
5098
5354
  FormsModule,
5099
5355
  ReactiveFormsModule,
5100
- TooltipModule,
5356
+ TooltipModule$1,
5101
5357
  InputTextModule,
5102
5358
  CheckboxModule,
5103
5359
  CalendarModule,
@@ -6506,7 +6762,7 @@ let ObjectCardModule = class ObjectCardModule {
6506
6762
  };
6507
6763
  ObjectCardModule = __decorate([
6508
6764
  NgModule({
6509
- imports: [CommonModule, TooltipModule, ThumbnailModule, ButtonModule],
6765
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule],
6510
6766
  declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
6511
6767
  exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
6512
6768
  })
@@ -6547,7 +6803,7 @@ let ProductHeaderModule = class ProductHeaderModule {
6547
6803
  };
6548
6804
  ProductHeaderModule = __decorate([
6549
6805
  NgModule({
6550
- imports: [CommonModule, TooltipModule, ThumbnailModule],
6806
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule],
6551
6807
  declarations: [ProductHeaderComponent],
6552
6808
  exports: [ProductHeaderComponent, ThumbnailModule],
6553
6809
  })
@@ -6753,7 +7009,7 @@ StatsCardModule = __decorate([
6753
7009
  NgModule({
6754
7010
  imports: [
6755
7011
  CommonModule,
6756
- TooltipModule,
7012
+ TooltipModule$1,
6757
7013
  ],
6758
7014
  declarations: [
6759
7015
  StatsCardComponent,
@@ -6861,7 +7117,7 @@ let StepsModule = class StepsModule {
6861
7117
  };
6862
7118
  StepsModule = __decorate([
6863
7119
  NgModule({
6864
- imports: [CommonModule, TooltipModule],
7120
+ imports: [CommonModule, TooltipModule$1],
6865
7121
  declarations: [StepsComponent],
6866
7122
  exports: [StepsComponent],
6867
7123
  })
@@ -6951,7 +7207,7 @@ TimelineItemModule = __decorate([
6951
7207
  NgModule({
6952
7208
  imports: [
6953
7209
  CommonModule,
6954
- TooltipModule,
7210
+ TooltipModule$1,
6955
7211
  ],
6956
7212
  declarations: [TimelineIconItemComponent],
6957
7213
  exports: [TimelineIconItemComponent],
@@ -6983,7 +7239,7 @@ HorizontalTimelineModule = __decorate([
6983
7239
  NgModule({
6984
7240
  imports: [
6985
7241
  CommonModule,
6986
- TooltipModule,
7242
+ TooltipModule$1,
6987
7243
  TimelineItemModule,
6988
7244
  ],
6989
7245
  declarations: [HorizontalTimelineComponent],
@@ -7277,7 +7533,7 @@ let TileModule = class TileModule {
7277
7533
  };
7278
7534
  TileModule = __decorate([
7279
7535
  NgModule({
7280
- imports: [CommonModule, TooltipModule, ThumbnailModule],
7536
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule],
7281
7537
  declarations: [TileComponent],
7282
7538
  exports: [TileComponent, ThumbnailModule],
7283
7539
  })
@@ -7545,7 +7801,7 @@ GlobalSearchModule = __decorate([
7545
7801
  InputTextModule,
7546
7802
  FormsModule,
7547
7803
  ReactiveFormsModule,
7548
- TooltipModule,
7804
+ TooltipModule$1,
7549
7805
  ThumbnailModule,
7550
7806
  ButtonModule,
7551
7807
  LoadingStateModule,
@@ -7555,7 +7811,7 @@ GlobalSearchModule = __decorate([
7555
7811
  exports: [
7556
7812
  GlobalSearchComponent,
7557
7813
  GlobalSearchDropdownItemComponent,
7558
- TooltipModule,
7814
+ TooltipModule$1,
7559
7815
  ThumbnailModule,
7560
7816
  ButtonModule,
7561
7817
  LoadingStateModule,
@@ -8960,5 +9216,5 @@ CodeEditorModule = __decorate([
8960
9216
  * Generated bundle index. Do not edit.
8961
9217
  */
8962
9218
 
8963
- export { AngularComponentsModule, AutocompleteField, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, DecimalField as ɵbb, StructureModule as ɵbc, HeaderComponent as ɵbd, FooterComponent as ɵbe, NumberLocaleOptions as ɵbf, ThumbnailService as ɵbg, TimelineItemModule as ɵbh, TimelineIconItemComponent as ɵbi, HorizontalTimelineModule as ɵbj, HorizontalTimelineComponent as ɵbk, VerticalTimelineModule as ɵbl, VerticalTimelineComponent as ɵbm, RangeLineComponent as ɵbn, CollapseOptionComponent as ɵbo, CollapsedItemsComponent as ɵbp, VerticalItemsComponent as ɵbq, InfiniteScrollModule as ɵbr, InfiniteScrollDirective as ɵbs, CustomTranslationsModule as ɵbt, CodeEditorComponent as ɵbu, CoreFacade as ɵbv, CodeMirror6Core as ɵbw, LocalizedBignumberImpurePipe as ɵc, EmptyStateGoBackComponent as ɵd, InfoSignComponent as ɵe, TableColumnsComponent as ɵf, TablePagingComponent as ɵg, AutocompleteFieldComponent as ɵh, BooleanFieldComponent as ɵi, CalendarFieldComponent as ɵj, ChipsFieldComponent as ɵk, CurrencyFieldComponent as ɵl, DynamicFieldComponent as ɵm, DynamicFormDirective as ɵn, FieldsetComponent as ɵo, FileUploadComponent$1 as ɵp, LookupFieldComponent as ɵq, NumberFieldComponent as ɵr, BignumberFieldComponent as ɵs, RadioButtonComponent as ɵt, RowComponent as ɵu, SectionComponent as ɵv, SelectFieldComponent as ɵw, TextAreaFieldComponent as ɵx, TextFieldComponent as ɵy, BooleanSwitchFieldComponent as ɵz };
9219
+ export { AngularComponentsModule, AutocompleteField, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, TextAreaFieldComponent as ɵba, TextFieldComponent as ɵbb, BooleanSwitchFieldComponent as ɵbc, DecimalField as ɵbe, StructureModule as ɵbf, HeaderComponent as ɵbg, FooterComponent as ɵbh, NumberLocaleOptions as ɵbi, ThumbnailService as ɵbj, TimelineItemModule as ɵbk, TimelineIconItemComponent as ɵbl, HorizontalTimelineModule as ɵbm, HorizontalTimelineComponent as ɵbn, VerticalTimelineModule as ɵbo, VerticalTimelineComponent as ɵbp, RangeLineComponent as ɵbq, CollapseOptionComponent as ɵbr, CollapsedItemsComponent as ɵbs, VerticalItemsComponent as ɵbt, InfiniteScrollModule as ɵbu, InfiniteScrollDirective as ɵbv, CustomTranslationsModule as ɵbw, CodeEditorComponent as ɵbx, CoreFacade as ɵby, CodeMirror6Core as ɵbz, LocalizedBignumberImpurePipe as ɵc, EmptyStateGoBackComponent as ɵd, TooltipModule as ɵe, TooltipComponent as ɵf, TooltipDirective as ɵg, InfoSignComponent as ɵh, TableColumnsComponent as ɵi, TablePagingComponent as ɵj, AutocompleteFieldComponent as ɵk, BooleanFieldComponent as ɵl, CalendarFieldComponent as ɵm, ChipsFieldComponent as ɵn, CurrencyFieldComponent as ɵo, DynamicFieldComponent as ɵp, DynamicFormDirective as ɵq, FieldsetComponent as ɵr, FileUploadComponent$1 as ɵs, LookupFieldComponent as ɵt, NumberFieldComponent as ɵu, BignumberFieldComponent as ɵv, RadioButtonComponent as ɵw, RowComponent as ɵx, SectionComponent as ɵy, SelectFieldComponent as ɵz };
8964
9220
  //# sourceMappingURL=seniorsistemas-angular-components.js.map