@seniorsistemas/angular-components 14.10.2 → 14.13.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 (37) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +458 -98
  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/dynamic-form/components/lookup/lookup.component.d.ts +1 -0
  6. package/components/mouse-events/double-click.directive.d.ts +9 -0
  7. package/components/mouse-events/index.d.ts +1 -0
  8. package/components/table/frozen-position/frozen-position.directive.d.ts +22 -0
  9. package/components/table/index.d.ts +1 -0
  10. package/components/table/table-paging/table-paging.component.d.ts +27 -0
  11. package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +6 -2
  12. package/esm2015/components/dynamic-form/dynamic-form.module.js +4 -2
  13. package/esm2015/components/mouse-events/double-click.directive.js +38 -0
  14. package/esm2015/components/mouse-events/index.js +2 -1
  15. package/esm2015/components/mouse-events/mouse-events.module.js +10 -3
  16. package/esm2015/components/table/frozen-position/frozen-position.directive.js +129 -0
  17. package/esm2015/components/table/index.js +2 -1
  18. package/esm2015/components/table/table-paging/table-paging.component.js +111 -0
  19. package/esm2015/components/table/table.module.js +14 -4
  20. package/esm2015/seniorsistemas-angular-components.js +38 -35
  21. package/esm5/components/dynamic-form/components/lookup/lookup.component.js +6 -2
  22. package/esm5/components/dynamic-form/dynamic-form.module.js +4 -2
  23. package/esm5/components/mouse-events/double-click.directive.js +40 -0
  24. package/esm5/components/mouse-events/index.js +2 -1
  25. package/esm5/components/mouse-events/mouse-events.module.js +10 -3
  26. package/esm5/components/table/frozen-position/frozen-position.directive.js +189 -0
  27. package/esm5/components/table/index.js +2 -1
  28. package/esm5/components/table/table-paging/table-paging.component.js +122 -0
  29. package/esm5/components/table/table.module.js +14 -4
  30. package/esm5/seniorsistemas-angular-components.js +38 -35
  31. package/fesm2015/seniorsistemas-angular-components.js +344 -62
  32. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  33. package/fesm5/seniorsistemas-angular-components.js +423 -68
  34. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  35. package/package.json +1 -1
  36. package/seniorsistemas-angular-components.d.ts +37 -34
  37. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -1,10 +1,10 @@
1
- import { __spread, __assign, __decorate, __extends, __values, __param, __read, __awaiter, __generator } from 'tslib';
2
- import { Input, Component, NgModule, EventEmitter, HostBinding, Output, ViewChild, Renderer2, HostListener, Directive, Injectable, Pipe, forwardRef, ViewEncapsulation, TemplateRef, ViewContainerRef, ComponentFactoryResolver, ChangeDetectorRef, InjectionToken, Inject, ContentChild, ApplicationRef, Injector, ElementRef, ContentChildren } from '@angular/core';
1
+ import { __spread, __assign, __decorate, __extends, __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, ContentChild, ApplicationRef, Injector, 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
- import { takeUntil, filter, tap, map, switchMap, catchError, delay, finalize, debounceTime, repeat, take } from 'rxjs/operators';
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
9
  import { TooltipModule } from 'primeng/tooltip';
10
10
  import { DomHandler } from 'primeng/dom';
@@ -2199,6 +2199,10 @@ var LookupComponent = /** @class */ (function () {
2199
2199
  prefix: (_c = col.numberLocaleOptions) === null || _c === void 0 ? void 0 : _c.currencySymbol
2200
2200
  };
2201
2201
  };
2202
+ LookupComponent.prototype.onTableRowDoubleClick = function (rowData) {
2203
+ this.selected = [rowData];
2204
+ this.select();
2205
+ };
2202
2206
  var LookupComponent_1;
2203
2207
  LookupComponent.nextId = 0;
2204
2208
  LookupComponent.ctorParameters = function () { return [
@@ -2336,7 +2340,7 @@ var LookupComponent = /** @class */ (function () {
2336
2340
  LookupComponent = LookupComponent_1 = __decorate([
2337
2341
  Component({
2338
2342
  selector: "s-lookup",
2339
- template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"true\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\"\n >\n <ng-template let-item pTemplate=\"selectedItem\">\n <span class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\" \n [pTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\" \n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\"\n ></button>\n</div>\n\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog\n>\n <div *ngIf=\"dialogVisible\" class=\"s-lookup-modal-container\">\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter\"\n [@collapseContent]=\"collapsed ? {value: 'hidden', params: {transitionParams: transitionOptions }} : {value: 'visible', params: {transitionParams: transitionOptions}}\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form [formGroup]=\"formGroupDialog\" novalidate autocomplete=\"off\">\n <div *ngIf=\"!collapsed\"\n [@childCollapseContent]=\"collapsed ? {value: ':leave', params: {transitionParams: transitionOptions }} : {value: ':enter', params: {transitionParams: transitionOptions}}\"\n class=\"form-content\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form [fields]=\"searchFields\" [form]=\"formGroupDialog\"></s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel\"\n (onClick)=\"search()\"\n pTooltip=\"(ALT + SHIFT + F)\"\n showDelay=\"500\"\n ></s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel\"\n (onClick)=\"clear()\"\n priority=\"link\"\n pTooltip=\"(ALT + SHIFT + L)\"\n showDelay=\"500\"\n ></s-button>\n </div>\n </div>\n </div>\n </form> \n </div>\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button [id]=\"id + '-filter-toggle-button'\" type=\"button\" (click)=\"filterToggle()\">\n <span class=\"fa\" [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\"></span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div class=\"content\" [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\"\n ></s-empty-state>\n\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngIf=\"multiple\" style=\"width: 50px\" />\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngIf=\"multiple\" style=\"width: 50px\">\n <s-table-header-checkbox [useAllObject]=\"lookupRowProps ? false : true\" [rowProps]=\"lookupRowProps\"></s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\"\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon [field]=\"col.name\" *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-rowIndex=\"rowIndex\">\n <tr sNavigation [pSelectableRow]=\"rowData\" [pSelectableRowIndex]=\"rowIndex\">\n <td *ngIf=\"multiple\" style=\"width: 50px\" tabindex=\"0\">\n <p-tableCheckbox [value]=\"rowData\" [pSelectableRow]=\"rowData\"></p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\"\n >\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || \"LTS\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedNumber: getScale(col.scale) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedCurrency | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Number'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n pTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\"\n ></s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"hideDialog()\"\n pTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n ></s-button>\n </p-footer>\n</p-dialog>\n\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
2343
+ template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"true\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\"\n >\n <ng-template let-item pTemplate=\"selectedItem\">\n <span class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\" \n [pTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\" \n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\"\n ></button>\n</div>\n\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog\n>\n <div *ngIf=\"dialogVisible\" class=\"s-lookup-modal-container\">\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter\"\n [@collapseContent]=\"collapsed ? {value: 'hidden', params: {transitionParams: transitionOptions }} : {value: 'visible', params: {transitionParams: transitionOptions}}\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form [formGroup]=\"formGroupDialog\" novalidate autocomplete=\"off\">\n <div *ngIf=\"!collapsed\"\n [@childCollapseContent]=\"collapsed ? {value: ':leave', params: {transitionParams: transitionOptions }} : {value: ':enter', params: {transitionParams: transitionOptions}}\"\n class=\"form-content\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form [fields]=\"searchFields\" [form]=\"formGroupDialog\"></s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel\"\n (onClick)=\"search()\"\n pTooltip=\"(ALT + SHIFT + F)\"\n showDelay=\"500\"\n ></s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel\"\n (onClick)=\"clear()\"\n priority=\"link\"\n pTooltip=\"(ALT + SHIFT + L)\"\n showDelay=\"500\"\n ></s-button>\n </div>\n </div>\n </div>\n </form> \n </div>\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button [id]=\"id + '-filter-toggle-button'\" type=\"button\" (click)=\"filterToggle()\">\n <span class=\"fa\" [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\"></span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div class=\"content\" [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\"\n ></s-empty-state>\n\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngIf=\"multiple\" style=\"width: 50px\" />\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngIf=\"multiple\" style=\"width: 50px\">\n <s-table-header-checkbox [useAllObject]=\"lookupRowProps ? false : true\" [rowProps]=\"lookupRowProps\"></s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\"\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon [field]=\"col.name\" *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-rowIndex=\"rowIndex\">\n <tr\n sNavigation\n [pSelectableRow]=\"rowData\"\n [pSelectableRowIndex]=\"rowIndex\"\n sDoubleClick (onDoubleClick)=\"onTableRowDoubleClick(rowData)\"\n >\n <td *ngIf=\"multiple\" style=\"width: 50px\" tabindex=\"0\">\n <p-tableCheckbox [value]=\"rowData\" [pSelectableRow]=\"rowData\"></p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\"\n >\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || \"LTS\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedNumber: getScale(col.scale) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedCurrency | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Number'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n pTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\"\n ></s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"hideDialog()\"\n pTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n ></s-button>\n </p-footer>\n</p-dialog>\n\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
2340
2344
  providers: [
2341
2345
  {
2342
2346
  provide: NG_VALUE_ACCESSOR,
@@ -3681,6 +3685,191 @@ var RowTogllerDirective = /** @class */ (function (_super) {
3681
3685
  return RowTogllerDirective;
3682
3686
  }(RowToggler));
3683
3687
 
3688
+ var TableFrozenPositionDirective = /** @class */ (function () {
3689
+ function TableFrozenPositionDirective(el, host) {
3690
+ var _this = this;
3691
+ this.el = el;
3692
+ this.host = host;
3693
+ this.sTableFrozenPosition = "left";
3694
+ this.host.onColResize.subscribe(function () {
3695
+ _this.handleColResize();
3696
+ });
3697
+ window.addEventListener("resize", this.handleWindowResize.bind(this));
3698
+ var componentId = new Date().getTime();
3699
+ this.resetRowHeightClassName = "resetTableRowsHeight_" + componentId;
3700
+ var styleReset = document.createElement("style");
3701
+ styleReset.innerHTML = "." + this.resetRowHeightClassName + " tbody > tr, ." + this.resetRowHeightClassName + " thead > tr { height: auto; }";
3702
+ document.getElementsByTagName("head")[0].appendChild(styleReset);
3703
+ this.fixBodyRowClassName = "fixTableBodyRowsHeight_" + componentId;
3704
+ this.styleFixBodyRowHeight = document.createElement("style");
3705
+ this.styleFixBodyRowHeight.innerHTML = "." + this.fixBodyRowClassName + " tbody > tr { height: auto; }";
3706
+ document.getElementsByTagName("head")[0].appendChild(this.styleFixBodyRowHeight);
3707
+ this.fixHeadRowClassName = "fixTableHeadRowsHeight_" + componentId;
3708
+ this.styleFixHeadRowHeight = document.createElement("style");
3709
+ this.styleFixHeadRowHeight.innerHTML = "." + this.fixHeadRowClassName + " thead > tr { height: auto; }";
3710
+ document.getElementsByTagName("head")[0].appendChild(this.styleFixHeadRowHeight);
3711
+ }
3712
+ Object.defineProperty(TableFrozenPositionDirective.prototype, "sTableFrozenValue", {
3713
+ set: function (_) {
3714
+ var _this = this;
3715
+ setTimeout(function () {
3716
+ _this.synchronizeRowHeight();
3717
+ });
3718
+ },
3719
+ enumerable: true,
3720
+ configurable: true
3721
+ });
3722
+ TableFrozenPositionDirective.prototype.ngAfterViewInit = function () {
3723
+ if (this.sTableFrozenPosition === "left")
3724
+ return;
3725
+ this.applyStylesForTable();
3726
+ };
3727
+ TableFrozenPositionDirective.prototype.ngOnDestroy = function () {
3728
+ window.removeEventListener("resize", this.handleWindowResize.bind(this));
3729
+ };
3730
+ TableFrozenPositionDirective.prototype.applyStylesForTable = function () {
3731
+ var scrollWrapper = this.el.nativeElement.querySelector(".ui-table-scrollable-wrapper");
3732
+ if (!scrollWrapper) {
3733
+ console.warn("Unable to find scroll-wrapper element from table. Is the table configured with frozen template?");
3734
+ return;
3735
+ }
3736
+ scrollWrapper.style.display = "flex";
3737
+ scrollWrapper.style.flexDirection = "row";
3738
+ var frozenTable = this.el.nativeElement.querySelector(".ui-table-frozen-view");
3739
+ if (!frozenTable) {
3740
+ console.warn("Unable to find frozen element from table. Is the table configured with frozen template?");
3741
+ return;
3742
+ }
3743
+ frozenTable.style.order = "1";
3744
+ frozenTable.style.borderRight = "none";
3745
+ frozenTable.style.borderLeft = "1px solid #dddddd";
3746
+ frozenTable.style.boxShadow = "-5px 0 5px -5px #cccccc";
3747
+ var unfrozenTable = this.el.nativeElement.querySelector(".ui-table-unfrozen-view");
3748
+ if (!unfrozenTable) {
3749
+ console.warn("Unable to find unfrozen element from table. Is the table configured with frozen template?");
3750
+ return;
3751
+ }
3752
+ unfrozenTable.style.position = "unset";
3753
+ };
3754
+ TableFrozenPositionDirective.prototype.handleWindowResize = function () {
3755
+ this.synchronizeRowHeight();
3756
+ };
3757
+ TableFrozenPositionDirective.prototype.handleColResize = function () {
3758
+ this.synchronizeRowHeight();
3759
+ };
3760
+ TableFrozenPositionDirective.prototype.synchronizeRowHeight = function () {
3761
+ var tableBodyWrappers = this.el.nativeElement.getElementsByClassName("ui-table-scrollable-body");
3762
+ var tableBodies = __spread(tableBodyWrappers).map(function (divWrapper) { return __spread(divWrapper.childNodes).find(function (p) { return p.tagName === "TABLE"; }); });
3763
+ this.recalculateDefaultRowHeight(tableBodies);
3764
+ this.applyMaxRowHeight(tableBodies);
3765
+ var tableHeadWrappers = this.el.nativeElement.getElementsByClassName("ui-table-scrollable-header-box");
3766
+ var tableHeads = __spread(tableHeadWrappers).map(function (divWrapper) { return __spread(divWrapper.childNodes).find(function (p) { return p.tagName === "TABLE"; }); });
3767
+ this.recalculateDefaultRowHeight(tableHeads);
3768
+ this.applyMaxRowHeight(tableHeads, true);
3769
+ };
3770
+ TableFrozenPositionDirective.prototype.recalculateDefaultRowHeight = function (tables) {
3771
+ var e_1, _a;
3772
+ try {
3773
+ for (var tables_1 = __values(tables), tables_1_1 = tables_1.next(); !tables_1_1.done; tables_1_1 = tables_1.next()) {
3774
+ var table = tables_1_1.value;
3775
+ table.classList.remove(this.fixBodyRowClassName);
3776
+ table.classList.remove(this.fixHeadRowClassName);
3777
+ table.classList.add(this.resetRowHeightClassName);
3778
+ }
3779
+ }
3780
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3781
+ finally {
3782
+ try {
3783
+ if (tables_1_1 && !tables_1_1.done && (_a = tables_1.return)) _a.call(tables_1);
3784
+ }
3785
+ finally { if (e_1) throw e_1.error; }
3786
+ }
3787
+ };
3788
+ TableFrozenPositionDirective.prototype.applyMaxRowHeight = function (tables, isHead) {
3789
+ var e_2, _a, e_3, _b, e_4, _c, e_5, _d;
3790
+ if (isHead === void 0) { isHead = false; }
3791
+ var rowSizes = [];
3792
+ try {
3793
+ for (var tables_2 = __values(tables), tables_2_1 = tables_2.next(); !tables_2_1.done; tables_2_1 = tables_2.next()) {
3794
+ var table = tables_2_1.value;
3795
+ try {
3796
+ for (var _e = (e_3 = void 0, __values(table.rows)), _f = _e.next(); !_f.done; _f = _e.next()) {
3797
+ var tr = _f.value;
3798
+ rowSizes.push(tr.getBoundingClientRect().height);
3799
+ }
3800
+ }
3801
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
3802
+ finally {
3803
+ try {
3804
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
3805
+ }
3806
+ finally { if (e_3) throw e_3.error; }
3807
+ }
3808
+ }
3809
+ }
3810
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
3811
+ finally {
3812
+ try {
3813
+ if (tables_2_1 && !tables_2_1.done && (_a = tables_2.return)) _a.call(tables_2);
3814
+ }
3815
+ finally { if (e_2) throw e_2.error; }
3816
+ }
3817
+ if (!rowSizes.length)
3818
+ return;
3819
+ var maxHeight = Math.max.apply(Math, __spread(rowSizes));
3820
+ if (isHead) {
3821
+ this.styleFixHeadRowHeight.innerHTML = "." + this.fixHeadRowClassName + " thead > tr { height: " + maxHeight + "px; }";
3822
+ try {
3823
+ for (var tables_3 = __values(tables), tables_3_1 = tables_3.next(); !tables_3_1.done; tables_3_1 = tables_3.next()) {
3824
+ var table = tables_3_1.value;
3825
+ table.classList.remove(this.resetRowHeightClassName);
3826
+ table.classList.add(this.fixHeadRowClassName);
3827
+ }
3828
+ }
3829
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
3830
+ finally {
3831
+ try {
3832
+ if (tables_3_1 && !tables_3_1.done && (_c = tables_3.return)) _c.call(tables_3);
3833
+ }
3834
+ finally { if (e_4) throw e_4.error; }
3835
+ }
3836
+ }
3837
+ else {
3838
+ this.styleFixBodyRowHeight.innerHTML = "." + this.fixBodyRowClassName + " tbody > tr { height: " + maxHeight + "px; }";
3839
+ try {
3840
+ for (var tables_4 = __values(tables), tables_4_1 = tables_4.next(); !tables_4_1.done; tables_4_1 = tables_4.next()) {
3841
+ var table = tables_4_1.value;
3842
+ table.classList.remove(this.resetRowHeightClassName);
3843
+ table.classList.add(this.fixBodyRowClassName);
3844
+ }
3845
+ }
3846
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
3847
+ finally {
3848
+ try {
3849
+ if (tables_4_1 && !tables_4_1.done && (_d = tables_4.return)) _d.call(tables_4);
3850
+ }
3851
+ finally { if (e_5) throw e_5.error; }
3852
+ }
3853
+ }
3854
+ };
3855
+ TableFrozenPositionDirective.ctorParameters = function () { return [
3856
+ { type: ElementRef },
3857
+ { type: Table }
3858
+ ]; };
3859
+ __decorate([
3860
+ Input()
3861
+ ], TableFrozenPositionDirective.prototype, "sTableFrozenPosition", void 0);
3862
+ __decorate([
3863
+ Input()
3864
+ ], TableFrozenPositionDirective.prototype, "sTableFrozenValue", null);
3865
+ TableFrozenPositionDirective = __decorate([
3866
+ Directive({
3867
+ selector: "[sTableFrozenPosition]"
3868
+ })
3869
+ ], TableFrozenPositionDirective);
3870
+ return TableFrozenPositionDirective;
3871
+ }());
3872
+
3684
3873
  var EnumColumnFieldType;
3685
3874
  (function (EnumColumnFieldType) {
3686
3875
  EnumColumnFieldType["STRING"] = "STRING";
@@ -3994,6 +4183,122 @@ var TokenListModule = /** @class */ (function () {
3994
4183
  return TokenListModule;
3995
4184
  }());
3996
4185
 
4186
+ var TablePagingComponent = /** @class */ (function () {
4187
+ function TablePagingComponent(translate, hostProjectConfigs) {
4188
+ this.translate = translate;
4189
+ this.hostProjectConfigs = hostProjectConfigs;
4190
+ }
4191
+ TablePagingComponent.prototype.ngOnChanges = function (changes) {
4192
+ this.totalRecordsText = this.translate.instant(this.getTranslatePrefix() + "total_records", {
4193
+ value: changes.totalRecords.currentValue
4194
+ });
4195
+ };
4196
+ TablePagingComponent.prototype.getTranslatePrefix = function () {
4197
+ return this.hostProjectConfigs.domain + "." + this.hostProjectConfigs.service + ".";
4198
+ };
4199
+ TablePagingComponent.prototype.getTooltipText = function () {
4200
+ return this.translate.instant(this.getTranslatePrefix() + "export_to_csv");
4201
+ };
4202
+ TablePagingComponent.prototype.getActions = function () {
4203
+ var _this = this;
4204
+ var actions = [
4205
+ {
4206
+ id: "exportCurrentPage",
4207
+ label: this.translate.instant(this.getTranslatePrefix() + "export_current_page"),
4208
+ command: function () { return _this.exportCurrentPage(); }
4209
+ },
4210
+ {
4211
+ id: "exportSelected",
4212
+ label: this.translate.instant(this.getTranslatePrefix() + "export_selected_records"),
4213
+ command: function () { return _this.exportSelectedRecords(); }
4214
+ }
4215
+ ];
4216
+ if (this.loadAllRecords) {
4217
+ actions.push({
4218
+ id: "exportAll",
4219
+ label: this.translate.instant(this.getTranslatePrefix() + "export_all_records"),
4220
+ command: function () { return _this.exportAllRecords(); }
4221
+ });
4222
+ }
4223
+ return actions;
4224
+ };
4225
+ TablePagingComponent.prototype.validateComponent = function () {
4226
+ if (!this.table) {
4227
+ throw new Error("Table component not defined");
4228
+ }
4229
+ };
4230
+ TablePagingComponent.prototype.getColumnsToExport = function () {
4231
+ return __spread(this.table.columns).map(function (column) {
4232
+ if (column.exportable === null || column.exportable === undefined) {
4233
+ column.exportable = true;
4234
+ }
4235
+ return column;
4236
+ });
4237
+ };
4238
+ TablePagingComponent.prototype.getRowsToExport = function () {
4239
+ return this.table.value;
4240
+ };
4241
+ TablePagingComponent.prototype.getSelectedRowsToExport = function () {
4242
+ return this.table.selection;
4243
+ };
4244
+ TablePagingComponent.prototype.getExportFileName = function () {
4245
+ var _a;
4246
+ return (_a = this.exportFileName) !== null && _a !== void 0 ? _a : "download";
4247
+ };
4248
+ TablePagingComponent.prototype.exportCurrentPage = function () {
4249
+ this.validateComponent();
4250
+ ExportUtils.exportCSV(this.getColumnsToExport(), this.getRowsToExport(), undefined, this.getExportFileName());
4251
+ };
4252
+ TablePagingComponent.prototype.exportSelectedRecords = function () {
4253
+ this.validateComponent();
4254
+ ExportUtils.exportCSV(this.getColumnsToExport(), this.getSelectedRowsToExport(), undefined, this.getExportFileName());
4255
+ };
4256
+ TablePagingComponent.prototype.exportAllRecords = function () {
4257
+ return __awaiter(this, void 0, void 0, function () {
4258
+ var data;
4259
+ return __generator(this, function (_a) {
4260
+ switch (_a.label) {
4261
+ case 0:
4262
+ this.validateComponent();
4263
+ return [4 /*yield*/, this.loadAllRecords()];
4264
+ case 1:
4265
+ data = _a.sent();
4266
+ ExportUtils.exportCSV(this.getColumnsToExport(), data, undefined, this.getExportFileName());
4267
+ return [2 /*return*/];
4268
+ }
4269
+ });
4270
+ });
4271
+ };
4272
+ TablePagingComponent.ctorParameters = function () { return [
4273
+ { type: TranslateService },
4274
+ { type: undefined, decorators: [{ type: Inject, args: [HostProjectConfigsInjectionToken,] }] }
4275
+ ]; };
4276
+ __decorate([
4277
+ Input()
4278
+ ], TablePagingComponent.prototype, "totalRecords", void 0);
4279
+ __decorate([
4280
+ Input()
4281
+ ], TablePagingComponent.prototype, "exportFileName", void 0);
4282
+ __decorate([
4283
+ Input()
4284
+ ], TablePagingComponent.prototype, "table", void 0);
4285
+ __decorate([
4286
+ Input()
4287
+ ], TablePagingComponent.prototype, "loadAllRecords", void 0);
4288
+ __decorate([
4289
+ Output()
4290
+ ], TablePagingComponent.prototype, "totalRecordsText", void 0);
4291
+ TablePagingComponent = __decorate([
4292
+ Component({
4293
+ template: "<div class=\"paging-container\">\n <span class=\"total-records\">\n {{totalRecordsText}}\n </span>\n <s-button class=\"export-button\" \n priority=\"default\" \n iconClass=\"fa fa-fw fa-file-export\" \n [disabled]=\"false\" \n [auxiliary]=\"true\" \n [tooltip]=\"getTooltipText()\" \n [model]=\"getActions()\"></s-button>\n</div>\n",
4294
+ selector: "s-table-paging",
4295
+ styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
4296
+ }),
4297
+ __param(1, Inject(HostProjectConfigsInjectionToken))
4298
+ ], TablePagingComponent);
4299
+ return TablePagingComponent;
4300
+ }());
4301
+
3997
4302
  var TableModule = /** @class */ (function () {
3998
4303
  function TableModule() {
3999
4304
  }
@@ -4002,17 +4307,23 @@ var TableModule = /** @class */ (function () {
4002
4307
  imports: [
4003
4308
  CommonModule,
4004
4309
  TooltipModule,
4005
- TokenListModule
4310
+ TokenListModule,
4311
+ TranslateModule,
4312
+ ButtonModule
4006
4313
  ],
4007
4314
  exports: [
4008
4315
  RowTogllerDirective,
4009
4316
  NavigationDirective,
4010
- TableColumnsComponent
4317
+ TableColumnsComponent,
4318
+ TableFrozenPositionDirective,
4319
+ TablePagingComponent
4011
4320
  ],
4012
4321
  declarations: [
4013
4322
  RowTogllerDirective,
4014
4323
  NavigationDirective,
4015
- TableColumnsComponent
4324
+ TableColumnsComponent,
4325
+ TableFrozenPositionDirective,
4326
+ TablePagingComponent
4016
4327
  ],
4017
4328
  })
4018
4329
  ], TableModule);
@@ -4777,6 +5088,108 @@ var DynamicFormDirective = /** @class */ (function () {
4777
5088
  return DynamicFormDirective;
4778
5089
  }());
4779
5090
 
5091
+ var LongPressDirective = /** @class */ (function () {
5092
+ function LongPressDirective() {
5093
+ this.sLongPressDelay = 500;
5094
+ this.sLongPress = new EventEmitter();
5095
+ this.mouseUp = new Subject();
5096
+ this.mouseDown = new Subject();
5097
+ this.ngUnsubscribe = new Subject();
5098
+ }
5099
+ LongPressDirective.prototype.onMouseUp = function (event) {
5100
+ this.mouseUp.next(event);
5101
+ };
5102
+ LongPressDirective.prototype.onMouseDown = function (event) {
5103
+ this.mouseDown.next(event);
5104
+ };
5105
+ LongPressDirective.prototype.ngOnInit = function () {
5106
+ var _this = this;
5107
+ this.mouseDown
5108
+ .pipe(debounceTime(this.sLongPressDelay), takeUntil(this.mouseUp), repeat(), takeUntil(this.ngUnsubscribe))
5109
+ .subscribe(function (event) { return _this.sLongPress.emit(event); });
5110
+ };
5111
+ LongPressDirective.prototype.ngOnDestroy = function () {
5112
+ this.ngUnsubscribe.next();
5113
+ this.ngUnsubscribe.complete();
5114
+ };
5115
+ __decorate([
5116
+ Input()
5117
+ ], LongPressDirective.prototype, "sLongPressDelay", void 0);
5118
+ __decorate([
5119
+ Output()
5120
+ ], LongPressDirective.prototype, "sLongPress", void 0);
5121
+ __decorate([
5122
+ HostListener("mouseup", ["$event"]),
5123
+ HostListener("touchend", ["$event"])
5124
+ ], LongPressDirective.prototype, "onMouseUp", null);
5125
+ __decorate([
5126
+ HostListener("mousedown", ["$event"]),
5127
+ HostListener("touchstart", ["$event"])
5128
+ ], LongPressDirective.prototype, "onMouseDown", null);
5129
+ LongPressDirective = __decorate([
5130
+ Directive({
5131
+ selector: "[sLongPress]",
5132
+ })
5133
+ ], LongPressDirective);
5134
+ return LongPressDirective;
5135
+ }());
5136
+
5137
+ var DoubleClickDirective = /** @class */ (function () {
5138
+ function DoubleClickDirective() {
5139
+ this.onDoubleClick = new EventEmitter();
5140
+ this._timeout = null;
5141
+ this._DOUBLE_CLICK_DELAY = 500;
5142
+ }
5143
+ DoubleClickDirective.prototype.onClick = function (event) {
5144
+ this.handleOnClickEvent(event);
5145
+ };
5146
+ DoubleClickDirective.prototype.handleOnClickEvent = function (event) {
5147
+ var _this = this;
5148
+ if (this._timeout) {
5149
+ this.clearTimeout();
5150
+ this.onDoubleClick.emit(event);
5151
+ }
5152
+ else {
5153
+ this._timeout = setTimeout(function () { return _this.clearTimeout(); }, this._DOUBLE_CLICK_DELAY);
5154
+ }
5155
+ };
5156
+ DoubleClickDirective.prototype.clearTimeout = function () {
5157
+ clearTimeout(this._timeout);
5158
+ this._timeout = null;
5159
+ };
5160
+ __decorate([
5161
+ Output()
5162
+ ], DoubleClickDirective.prototype, "onDoubleClick", void 0);
5163
+ __decorate([
5164
+ HostListener("click", ["$event"])
5165
+ ], DoubleClickDirective.prototype, "onClick", null);
5166
+ DoubleClickDirective = __decorate([
5167
+ Directive({
5168
+ selector: '[sDoubleClick]'
5169
+ })
5170
+ ], DoubleClickDirective);
5171
+ return DoubleClickDirective;
5172
+ }());
5173
+
5174
+ var MouseEventsModule = /** @class */ (function () {
5175
+ function MouseEventsModule() {
5176
+ }
5177
+ MouseEventsModule = __decorate([
5178
+ NgModule({
5179
+ imports: [CommonModule],
5180
+ declarations: [
5181
+ LongPressDirective,
5182
+ DoubleClickDirective
5183
+ ],
5184
+ exports: [
5185
+ LongPressDirective,
5186
+ DoubleClickDirective
5187
+ ],
5188
+ })
5189
+ ], MouseEventsModule);
5190
+ return MouseEventsModule;
5191
+ }());
5192
+
4780
5193
  var DynamicFormModule = /** @class */ (function () {
4781
5194
  function DynamicFormModule() {
4782
5195
  }
@@ -4819,7 +5232,8 @@ var DynamicFormModule = /** @class */ (function () {
4819
5232
  TableModule,
4820
5233
  InfoSignModule,
4821
5234
  MaskFormatterModule,
4822
- HotkeyModule.forRoot()
5235
+ HotkeyModule.forRoot(),
5236
+ MouseEventsModule
4823
5237
  ],
4824
5238
  declarations: [
4825
5239
  AutocompleteFieldComponent,
@@ -5809,65 +6223,6 @@ var ImageCropperService = /** @class */ (function () {
5809
6223
  return ImageCropperService;
5810
6224
  }());
5811
6225
 
5812
- var LongPressDirective = /** @class */ (function () {
5813
- function LongPressDirective() {
5814
- this.sLongPressDelay = 500;
5815
- this.sLongPress = new EventEmitter();
5816
- this.mouseUp = new Subject();
5817
- this.mouseDown = new Subject();
5818
- this.ngUnsubscribe = new Subject();
5819
- }
5820
- LongPressDirective.prototype.onMouseUp = function (event) {
5821
- this.mouseUp.next(event);
5822
- };
5823
- LongPressDirective.prototype.onMouseDown = function (event) {
5824
- this.mouseDown.next(event);
5825
- };
5826
- LongPressDirective.prototype.ngOnInit = function () {
5827
- var _this = this;
5828
- this.mouseDown
5829
- .pipe(debounceTime(this.sLongPressDelay), takeUntil(this.mouseUp), repeat(), takeUntil(this.ngUnsubscribe))
5830
- .subscribe(function (event) { return _this.sLongPress.emit(event); });
5831
- };
5832
- LongPressDirective.prototype.ngOnDestroy = function () {
5833
- this.ngUnsubscribe.next();
5834
- this.ngUnsubscribe.complete();
5835
- };
5836
- __decorate([
5837
- Input()
5838
- ], LongPressDirective.prototype, "sLongPressDelay", void 0);
5839
- __decorate([
5840
- Output()
5841
- ], LongPressDirective.prototype, "sLongPress", void 0);
5842
- __decorate([
5843
- HostListener("mouseup", ["$event"]),
5844
- HostListener("touchend", ["$event"])
5845
- ], LongPressDirective.prototype, "onMouseUp", null);
5846
- __decorate([
5847
- HostListener("mousedown", ["$event"]),
5848
- HostListener("touchstart", ["$event"])
5849
- ], LongPressDirective.prototype, "onMouseDown", null);
5850
- LongPressDirective = __decorate([
5851
- Directive({
5852
- selector: "[sLongPress]",
5853
- })
5854
- ], LongPressDirective);
5855
- return LongPressDirective;
5856
- }());
5857
-
5858
- var MouseEventsModule = /** @class */ (function () {
5859
- function MouseEventsModule() {
5860
- }
5861
- MouseEventsModule = __decorate([
5862
- NgModule({
5863
- imports: [CommonModule],
5864
- declarations: [LongPressDirective],
5865
- exports: [LongPressDirective],
5866
- })
5867
- ], MouseEventsModule);
5868
- return MouseEventsModule;
5869
- }());
5870
-
5871
6226
  var ThumbnailSize;
5872
6227
  (function (ThumbnailSize) {
5873
6228
  ThumbnailSize["Small"] = "small";
@@ -8565,5 +8920,5 @@ var CodeEditorModule = /** @class */ (function () {
8565
8920
  * Generated bundle index. Do not edit.
8566
8921
  */
8567
8922
 
8568
- export { AngularComponentsModule, AutocompleteField, 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, 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, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, DecimalField as ɵba, StructureModule as ɵbb, HeaderComponent as ɵbc, FooterComponent as ɵbd, InfoSignComponent as ɵbe, NumberLocaleOptions as ɵbf, ThumbnailService as ɵbg, InfiniteScrollModule as ɵbh, InfiniteScrollDirective as ɵbi, CustomTranslationsModule as ɵbj, CodeEditorComponent as ɵbk, CoreFacade as ɵbl, CodeMirror6Core as ɵbm, LocalizedBignumberImpurePipe as ɵc, TokenListModule as ɵd, TableColumnsComponent as ɵe, InfoSignModule as ɵf, AutocompleteFieldComponent as ɵg, BooleanFieldComponent as ɵh, CalendarFieldComponent as ɵi, ChipsFieldComponent as ɵj, CurrencyFieldComponent as ɵk, BaseFieldComponent 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 };
8923
+ export { AngularComponentsModule, AutocompleteField, 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, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, TextAreaFieldComponent as ɵba, TextFieldComponent as ɵbb, DecimalField as ɵbd, StructureModule as ɵbe, HeaderComponent as ɵbf, FooterComponent as ɵbg, InfoSignComponent as ɵbh, NumberLocaleOptions as ɵbi, ThumbnailService as ɵbj, InfiniteScrollModule as ɵbk, InfiniteScrollDirective as ɵbl, CustomTranslationsModule as ɵbm, CodeEditorComponent as ɵbn, CoreFacade as ɵbo, CodeMirror6Core as ɵbp, LocalizedBignumberImpurePipe as ɵc, TokenListModule as ɵd, ButtonModule as ɵe, TableColumnsComponent as ɵf, TablePagingComponent as ɵg, InfoSignModule as ɵh, MouseEventsModule as ɵi, AutocompleteFieldComponent as ɵj, BooleanFieldComponent as ɵk, CalendarFieldComponent as ɵl, ChipsFieldComponent as ɵm, CurrencyFieldComponent as ɵn, BaseFieldComponent 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 };
8569
8924
  //# sourceMappingURL=seniorsistemas-angular-components.js.map