@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 { __spread, __assign, __decorate, __extends, __rest, __values, __param, __awaiter, __generator, __read } 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';
@@ -293,7 +293,7 @@ var ButtonModule = /** @class */ (function () {
293
293
  }
294
294
  ButtonModule = __decorate([
295
295
  NgModule({
296
- imports: [CommonModule, RouterModule, TieredMenuModule, TooltipModule],
296
+ imports: [CommonModule, RouterModule, TieredMenuModule, TooltipModule$1],
297
297
  declarations: [ButtonComponent],
298
298
  exports: [ButtonComponent],
299
299
  })
@@ -3032,7 +3032,7 @@ var FileUploadModule = /** @class */ (function () {
3032
3032
  imports: [
3033
3033
  CommonModule,
3034
3034
  ButtonModule,
3035
- TooltipModule,
3035
+ TooltipModule$1,
3036
3036
  ProgressBarModule,
3037
3037
  ],
3038
3038
  exports: [FileUploadComponent],
@@ -3041,13 +3041,248 @@ var FileUploadModule = /** @class */ (function () {
3041
3041
  return FileUploadModule;
3042
3042
  }());
3043
3043
 
3044
+ var TooltipPosition;
3045
+ (function (TooltipPosition) {
3046
+ TooltipPosition["Above"] = "above";
3047
+ TooltipPosition["Below"] = "below";
3048
+ TooltipPosition["Left"] = "left";
3049
+ TooltipPosition["Right"] = "right";
3050
+ TooltipPosition["Default"] = "above";
3051
+ })(TooltipPosition || (TooltipPosition = {}));
3052
+
3053
+ var TooltipComponent = /** @class */ (function () {
3054
+ function TooltipComponent() {
3055
+ this.tooltip = "";
3056
+ this.position = TooltipPosition.Default;
3057
+ this.left = 0;
3058
+ this.top = 0;
3059
+ this.visible = false;
3060
+ this.escape = false;
3061
+ }
3062
+ TooltipComponent = __decorate([
3063
+ Component({
3064
+ 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>",
3065
+ 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)}"]
3066
+ })
3067
+ ], TooltipComponent);
3068
+ return TooltipComponent;
3069
+ }());
3070
+
3071
+ var TooltipDirective = /** @class */ (function () {
3072
+ function TooltipDirective(elementRef, appRef, componentFactoryResolver, injector) {
3073
+ this.elementRef = elementRef;
3074
+ this.appRef = appRef;
3075
+ this.componentFactoryResolver = componentFactoryResolver;
3076
+ this.injector = injector;
3077
+ this.position = TooltipPosition.Default;
3078
+ this.showDelay = 500;
3079
+ this.escape = false;
3080
+ this.componentRef = null;
3081
+ }
3082
+ TooltipDirective.prototype.ngOnDestroy = function () {
3083
+ this.destroy();
3084
+ };
3085
+ TooltipDirective.prototype.onMouseEnter = function () {
3086
+ this.createTootip();
3087
+ };
3088
+ TooltipDirective.prototype.onMouseLeave = function () {
3089
+ this.setHideTooltipTimeout();
3090
+ };
3091
+ TooltipDirective.prototype.onTouchStart = function ($event) {
3092
+ $event.preventDefault();
3093
+ window.clearTimeout(this.touchTimeout);
3094
+ this.touchTimeout = window.setTimeout(this.createTootip.bind(this), 500);
3095
+ };
3096
+ TooltipDirective.prototype.onTouchEnd = function () {
3097
+ window.clearTimeout(this.touchTimeout);
3098
+ this.setHideTooltipTimeout();
3099
+ };
3100
+ TooltipDirective.prototype.setHideTooltipTimeout = function () {
3101
+ this.destroy();
3102
+ };
3103
+ TooltipDirective.prototype.createTootip = function () {
3104
+ var _a;
3105
+ if (this.componentRef === null && ((_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.length)) {
3106
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);
3107
+ this.componentRef = componentFactory.create(this.injector);
3108
+ this.appRef.attachView(this.componentRef.hostView);
3109
+ var domElem = this.componentRef.hostView.rootNodes[0];
3110
+ this.elementRef.nativeElement.appendChild(domElem);
3111
+ this.setTooltipComponentProperties();
3112
+ this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);
3113
+ }
3114
+ };
3115
+ TooltipDirective.prototype.showTooltip = function () {
3116
+ if (this.componentRef !== null) {
3117
+ this.componentRef.instance.visible = true;
3118
+ }
3119
+ };
3120
+ TooltipDirective.prototype.setTooltipComponentProperties = function () {
3121
+ var margin = 16;
3122
+ var anchorSize = 5;
3123
+ if (this.componentRef !== null) {
3124
+ this.componentRef.instance.tooltip = this.tooltip;
3125
+ this.componentRef.instance.escape = this.escape;
3126
+ var _a = this.elementRef.nativeElement.getBoundingClientRect(), left = _a.left, right = _a.right, top_1 = _a.top, bottom = _a.bottom;
3127
+ var tooltipHeight = bottom - top_1;
3128
+ var tooltipWidth = right - left;
3129
+ var safeSpace = 150;
3130
+ var positioned = false;
3131
+ var invalidOptions = [];
3132
+ while (!positioned) {
3133
+ if (invalidOptions.includes(TooltipPosition.Above)
3134
+ && invalidOptions.includes(TooltipPosition.Below)
3135
+ && invalidOptions.includes(TooltipPosition.Left)
3136
+ && invalidOptions.includes(TooltipPosition.Right)) {
3137
+ this.destroy();
3138
+ throw new Error("No space to show tooltip");
3139
+ }
3140
+ switch (this.position) {
3141
+ case TooltipPosition.Below: {
3142
+ if (invalidOptions.includes(TooltipPosition.Below)) {
3143
+ this.position = TooltipPosition.Left;
3144
+ break;
3145
+ }
3146
+ var bottomShift = document.body.clientHeight - bottom;
3147
+ if (bottomShift <= tooltipHeight + safeSpace) {
3148
+ this.position = TooltipPosition.Above;
3149
+ invalidOptions.push(TooltipPosition.Below);
3150
+ break;
3151
+ }
3152
+ this.componentRef.instance.left = Math.round(tooltipWidth / 2 + left);
3153
+ this.componentRef.instance.top = Math.round(bottom + margin);
3154
+ positioned = true;
3155
+ break;
3156
+ }
3157
+ case TooltipPosition.Above: {
3158
+ if (invalidOptions.includes(TooltipPosition.Above)) {
3159
+ this.position = TooltipPosition.Left;
3160
+ break;
3161
+ }
3162
+ var topShift = top_1;
3163
+ if (topShift <= tooltipHeight + safeSpace) {
3164
+ this.position = TooltipPosition.Below;
3165
+ invalidOptions.push(TooltipPosition.Above);
3166
+ positioned = false;
3167
+ break;
3168
+ }
3169
+ this.componentRef.instance.left = Math.round(tooltipWidth / 2 + left);
3170
+ this.componentRef.instance.top = Math.round(top_1 - margin);
3171
+ positioned = true;
3172
+ break;
3173
+ }
3174
+ case TooltipPosition.Right: {
3175
+ if (invalidOptions.includes(TooltipPosition.Right)) {
3176
+ this.position = TooltipPosition.Above;
3177
+ break;
3178
+ }
3179
+ var rightShift = document.body.clientWidth - right;
3180
+ if (rightShift <= tooltipWidth + safeSpace) {
3181
+ this.position = TooltipPosition.Left;
3182
+ invalidOptions.push(TooltipPosition.Right);
3183
+ positioned = false;
3184
+ break;
3185
+ }
3186
+ this.componentRef.instance.left = Math.round(right + margin);
3187
+ this.componentRef.instance.top = Math.round(top_1 + tooltipHeight / 2 - anchorSize);
3188
+ positioned = true;
3189
+ break;
3190
+ }
3191
+ case TooltipPosition.Left: {
3192
+ if (invalidOptions.includes(TooltipPosition.Left)) {
3193
+ this.position = TooltipPosition.Above;
3194
+ break;
3195
+ }
3196
+ var leftShift = left;
3197
+ if (leftShift <= tooltipWidth + safeSpace) {
3198
+ this.position = TooltipPosition.Right;
3199
+ invalidOptions.push(TooltipPosition.Left);
3200
+ positioned = false;
3201
+ break;
3202
+ }
3203
+ this.componentRef.instance.left = Math.round(left - margin);
3204
+ this.componentRef.instance.top = Math.round(top_1 + tooltipHeight / 2 - anchorSize);
3205
+ positioned = true;
3206
+ break;
3207
+ }
3208
+ default: {
3209
+ break;
3210
+ }
3211
+ }
3212
+ this.componentRef.instance.position = this.position;
3213
+ }
3214
+ }
3215
+ };
3216
+ TooltipDirective.prototype.destroy = function () {
3217
+ if (this.componentRef !== null) {
3218
+ window.clearTimeout(this.showTimeout);
3219
+ this.appRef.detachView(this.componentRef.hostView);
3220
+ this.componentRef.destroy();
3221
+ this.componentRef = null;
3222
+ }
3223
+ };
3224
+ TooltipDirective.ctorParameters = function () { return [
3225
+ { type: ElementRef },
3226
+ { type: ApplicationRef },
3227
+ { type: ComponentFactoryResolver },
3228
+ { type: Injector }
3229
+ ]; };
3230
+ __decorate([
3231
+ Input("sTooltip")
3232
+ ], TooltipDirective.prototype, "tooltip", void 0);
3233
+ __decorate([
3234
+ Input("tooltipPosition")
3235
+ ], TooltipDirective.prototype, "position", void 0);
3236
+ __decorate([
3237
+ Input()
3238
+ ], TooltipDirective.prototype, "showDelay", void 0);
3239
+ __decorate([
3240
+ Input()
3241
+ ], TooltipDirective.prototype, "escape", void 0);
3242
+ __decorate([
3243
+ HostListener("mouseenter")
3244
+ ], TooltipDirective.prototype, "onMouseEnter", null);
3245
+ __decorate([
3246
+ HostListener("mouseleave")
3247
+ ], TooltipDirective.prototype, "onMouseLeave", null);
3248
+ __decorate([
3249
+ HostListener("touchstart", ["$event"])
3250
+ ], TooltipDirective.prototype, "onTouchStart", null);
3251
+ __decorate([
3252
+ HostListener("touchend")
3253
+ ], TooltipDirective.prototype, "onTouchEnd", null);
3254
+ TooltipDirective = __decorate([
3255
+ Directive({
3256
+ selector: "[sTooltip]",
3257
+ })
3258
+ ], TooltipDirective);
3259
+ return TooltipDirective;
3260
+ }());
3261
+
3262
+ var TooltipModule = /** @class */ (function () {
3263
+ function TooltipModule() {
3264
+ }
3265
+ TooltipModule = __decorate([
3266
+ NgModule({
3267
+ imports: [CommonModule],
3268
+ declarations: [
3269
+ TooltipComponent,
3270
+ TooltipDirective,
3271
+ ],
3272
+ exports: [TooltipDirective],
3273
+ })
3274
+ ], TooltipModule);
3275
+ return TooltipModule;
3276
+ }());
3277
+
3044
3278
  var InfoSignComponent = /** @class */ (function () {
3045
3279
  function InfoSignComponent() {
3046
3280
  }
3047
3281
  InfoSignComponent = __decorate([
3048
3282
  Component({
3049
3283
  selector: "s-info-sign-component",
3050
- 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>"
3284
+ 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>",
3285
+ 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}"]
3051
3286
  })
3052
3287
  ], InfoSignComponent);
3053
3288
  return InfoSignComponent;
@@ -3101,8 +3336,14 @@ var InfoSignModule = /** @class */ (function () {
3101
3336
  }
3102
3337
  InfoSignModule = __decorate([
3103
3338
  NgModule({
3104
- imports: [TooltipModule, CommonModule],
3105
- declarations: [InfoSignDirective, InfoSignComponent],
3339
+ imports: [
3340
+ TooltipModule,
3341
+ CommonModule,
3342
+ ],
3343
+ declarations: [
3344
+ InfoSignDirective,
3345
+ InfoSignComponent,
3346
+ ],
3106
3347
  exports: [InfoSignDirective],
3107
3348
  entryComponents: [InfoSignComponent],
3108
3349
  })
@@ -4380,7 +4621,7 @@ var TableColumnsComponent = /** @class */ (function () {
4380
4621
  ], TableColumnsComponent.prototype, "locale", void 0);
4381
4622
  TableColumnsComponent = __decorate([
4382
4623
  Component({
4383
- 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",
4624
+ 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",
4384
4625
  selector: "s-table-columns",
4385
4626
  styles: [":host{display:none}"]
4386
4627
  }),
@@ -4515,11 +4756,27 @@ var TablePagingComponent = /** @class */ (function () {
4515
4756
  TablePagingComponent.prototype.getSelectedRowsToExport = function (columns) {
4516
4757
  return this.mapColumnsTranslations(columns, this.table.selection);
4517
4758
  };
4759
+ TablePagingComponent.prototype.getInnerPropValue = function (obj, path) {
4760
+ return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? undefined : result[prop]); }, obj);
4761
+ };
4762
+ TablePagingComponent.prototype.setInnerPropValue = function (obj, path, value) {
4763
+ this.recursionSet(obj, path.split("."), value);
4764
+ };
4765
+ TablePagingComponent.prototype.recursionSet = function (obj, keysList, value) {
4766
+ var key = keysList[0];
4767
+ if (keysList.length === 1) {
4768
+ obj[key] = value;
4769
+ return obj;
4770
+ }
4771
+ obj[key] = (this.recursionSet((obj === null || obj === void 0 ? void 0 : obj[key]) || {}, keysList.slice(1), value));
4772
+ return obj;
4773
+ };
4518
4774
  TablePagingComponent.prototype.mapColumnsTranslations = function (columns, rows) {
4519
4775
  var _this = this;
4520
4776
  var enumColumns = columns.filter(function (p) { return p.enumPrefix; });
4521
- if (!enumColumns.length)
4777
+ if (!enumColumns.length) {
4522
4778
  return rows;
4779
+ }
4523
4780
  return __spread(rows).map(function (row) {
4524
4781
  var newRow = __assign({}, row);
4525
4782
  var _loop_1 = function (i) {
@@ -4529,17 +4786,12 @@ var TablePagingComponent = /** @class */ (function () {
4529
4786
  fields = [fields];
4530
4787
  }
4531
4788
  fields.forEach(function (fieldName) {
4532
- var columnData = row[fieldName];
4533
- if (columnData === null || columnData === undefined)
4789
+ var columnData = _this.getInnerPropValue(row, fieldName);
4790
+ if (columnData === null || columnData === undefined) {
4534
4791
  return;
4535
- var enumValue = columnData.toString().toLowerCase();
4536
- var translationKey = column.enumPrefix + enumValue;
4537
- var translatedValue = _this.translate.instant(translationKey);
4538
- if (translationKey === translatedValue && enumValue.length > 1) {
4539
- translationKey = column.enumPrefix + enumValue.substring(0, 1) + "_" + enumValue.substr(1);
4540
- translatedValue = _this.translate.instant(translationKey);
4541
4792
  }
4542
- newRow[fieldName] = translatedValue;
4793
+ var newValue = _this.translateValue(column, columnData);
4794
+ _this.setInnerPropValue(newRow, fieldName, newValue);
4543
4795
  });
4544
4796
  };
4545
4797
  for (var i = 0; i <= enumColumns.length - 1; i++) {
@@ -4548,6 +4800,16 @@ var TablePagingComponent = /** @class */ (function () {
4548
4800
  return newRow;
4549
4801
  });
4550
4802
  };
4803
+ TablePagingComponent.prototype.translateValue = function (column, columnData) {
4804
+ var enumValue = columnData.toString().toLowerCase();
4805
+ var translationKey = column.enumPrefix + enumValue;
4806
+ var translatedValue = this.translate.instant(translationKey);
4807
+ if (translationKey === translatedValue && enumValue.length > 1) {
4808
+ translationKey = "" + column.enumPrefix + enumValue.substring(0, 1) + "_" + enumValue.substr(1);
4809
+ return this.translate.instant(translationKey);
4810
+ }
4811
+ return translatedValue;
4812
+ };
4551
4813
  TablePagingComponent.prototype.getExportFileName = function () {
4552
4814
  var _a;
4553
4815
  var fileName = (_a = this.exportFileName) !== null && _a !== void 0 ? _a : "download";
@@ -5519,7 +5781,7 @@ var DynamicFormModule = /** @class */ (function () {
5519
5781
  CommonModule,
5520
5782
  FormsModule,
5521
5783
  ReactiveFormsModule,
5522
- TooltipModule,
5784
+ TooltipModule$1,
5523
5785
  InputTextModule,
5524
5786
  CheckboxModule,
5525
5787
  CalendarModule,
@@ -7018,7 +7280,7 @@ var ObjectCardModule = /** @class */ (function () {
7018
7280
  }
7019
7281
  ObjectCardModule = __decorate([
7020
7282
  NgModule({
7021
- imports: [CommonModule, TooltipModule, ThumbnailModule, ButtonModule],
7283
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule],
7022
7284
  declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
7023
7285
  exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
7024
7286
  })
@@ -7064,7 +7326,7 @@ var ProductHeaderModule = /** @class */ (function () {
7064
7326
  }
7065
7327
  ProductHeaderModule = __decorate([
7066
7328
  NgModule({
7067
- imports: [CommonModule, TooltipModule, ThumbnailModule],
7329
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule],
7068
7330
  declarations: [ProductHeaderComponent],
7069
7331
  exports: [ProductHeaderComponent, ThumbnailModule],
7070
7332
  })
@@ -7285,7 +7547,7 @@ var StatsCardModule = /** @class */ (function () {
7285
7547
  NgModule({
7286
7548
  imports: [
7287
7549
  CommonModule,
7288
- TooltipModule,
7550
+ TooltipModule$1,
7289
7551
  ],
7290
7552
  declarations: [
7291
7553
  StatsCardComponent,
@@ -7406,7 +7668,7 @@ var StepsModule = /** @class */ (function () {
7406
7668
  }
7407
7669
  StepsModule = __decorate([
7408
7670
  NgModule({
7409
- imports: [CommonModule, TooltipModule],
7671
+ imports: [CommonModule, TooltipModule$1],
7410
7672
  declarations: [StepsComponent],
7411
7673
  exports: [StepsComponent],
7412
7674
  })
@@ -7507,7 +7769,7 @@ var TimelineItemModule = /** @class */ (function () {
7507
7769
  NgModule({
7508
7770
  imports: [
7509
7771
  CommonModule,
7510
- TooltipModule,
7772
+ TooltipModule$1,
7511
7773
  ],
7512
7774
  declarations: [TimelineIconItemComponent],
7513
7775
  exports: [TimelineIconItemComponent],
@@ -7543,7 +7805,7 @@ var HorizontalTimelineModule = /** @class */ (function () {
7543
7805
  NgModule({
7544
7806
  imports: [
7545
7807
  CommonModule,
7546
- TooltipModule,
7808
+ TooltipModule$1,
7547
7809
  TimelineItemModule,
7548
7810
  ],
7549
7811
  declarations: [HorizontalTimelineComponent],
@@ -7866,7 +8128,7 @@ var TileModule = /** @class */ (function () {
7866
8128
  }
7867
8129
  TileModule = __decorate([
7868
8130
  NgModule({
7869
- imports: [CommonModule, TooltipModule, ThumbnailModule],
8131
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule],
7870
8132
  declarations: [TileComponent],
7871
8133
  exports: [TileComponent, ThumbnailModule],
7872
8134
  })
@@ -8145,7 +8407,7 @@ var GlobalSearchModule = /** @class */ (function () {
8145
8407
  InputTextModule,
8146
8408
  FormsModule,
8147
8409
  ReactiveFormsModule,
8148
- TooltipModule,
8410
+ TooltipModule$1,
8149
8411
  ThumbnailModule,
8150
8412
  ButtonModule,
8151
8413
  LoadingStateModule,
@@ -8155,7 +8417,7 @@ var GlobalSearchModule = /** @class */ (function () {
8155
8417
  exports: [
8156
8418
  GlobalSearchComponent,
8157
8419
  GlobalSearchDropdownItemComponent,
8158
- TooltipModule,
8420
+ TooltipModule$1,
8159
8421
  ThumbnailModule,
8160
8422
  ButtonModule,
8161
8423
  LoadingStateModule,
@@ -9661,5 +9923,5 @@ var CodeEditorModule = /** @class */ (function () {
9661
9923
  * Generated bundle index. Do not edit.
9662
9924
  */
9663
9925
 
9664
- 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 };
9926
+ 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 };
9665
9927
  //# sourceMappingURL=seniorsistemas-angular-components.js.map