@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.
- package/bundles/seniorsistemas-angular-components.umd.js +458 -98
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/lookup/lookup.component.d.ts +1 -0
- package/components/mouse-events/double-click.directive.d.ts +9 -0
- package/components/mouse-events/index.d.ts +1 -0
- package/components/table/frozen-position/frozen-position.directive.d.ts +22 -0
- package/components/table/index.d.ts +1 -0
- package/components/table/table-paging/table-paging.component.d.ts +27 -0
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +6 -2
- package/esm2015/components/dynamic-form/dynamic-form.module.js +4 -2
- package/esm2015/components/mouse-events/double-click.directive.js +38 -0
- package/esm2015/components/mouse-events/index.js +2 -1
- package/esm2015/components/mouse-events/mouse-events.module.js +10 -3
- package/esm2015/components/table/frozen-position/frozen-position.directive.js +129 -0
- package/esm2015/components/table/index.js +2 -1
- package/esm2015/components/table/table-paging/table-paging.component.js +111 -0
- package/esm2015/components/table/table.module.js +14 -4
- package/esm2015/seniorsistemas-angular-components.js +38 -35
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +6 -2
- package/esm5/components/dynamic-form/dynamic-form.module.js +4 -2
- package/esm5/components/mouse-events/double-click.directive.js +40 -0
- package/esm5/components/mouse-events/index.js +2 -1
- package/esm5/components/mouse-events/mouse-events.module.js +10 -3
- package/esm5/components/table/frozen-position/frozen-position.directive.js +189 -0
- package/esm5/components/table/index.js +2 -1
- package/esm5/components/table/table-paging/table-paging.component.js +122 -0
- package/esm5/components/table/table.module.js +14 -4
- package/esm5/seniorsistemas-angular-components.js +38 -35
- package/fesm2015/seniorsistemas-angular-components.js +344 -62
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +423 -68
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.d.ts +37 -34
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __param, __awaiter } 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,
|
|
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,
|
|
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';
|
|
@@ -2037,6 +2037,10 @@ let LookupComponent = LookupComponent_1 = class LookupComponent {
|
|
|
2037
2037
|
prefix: (_c = col.numberLocaleOptions) === null || _c === void 0 ? void 0 : _c.currencySymbol
|
|
2038
2038
|
};
|
|
2039
2039
|
}
|
|
2040
|
+
onTableRowDoubleClick(rowData) {
|
|
2041
|
+
this.selected = [rowData];
|
|
2042
|
+
this.select();
|
|
2043
|
+
}
|
|
2040
2044
|
};
|
|
2041
2045
|
LookupComponent.nextId = 0;
|
|
2042
2046
|
LookupComponent.ctorParameters = () => [
|
|
@@ -2174,7 +2178,7 @@ __decorate([
|
|
|
2174
2178
|
LookupComponent = LookupComponent_1 = __decorate([
|
|
2175
2179
|
Component({
|
|
2176
2180
|
selector: "s-lookup",
|
|
2177
|
-
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",
|
|
2181
|
+
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",
|
|
2178
2182
|
providers: [
|
|
2179
2183
|
{
|
|
2180
2184
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -3423,6 +3427,131 @@ RowTogllerDirective = __decorate([
|
|
|
3423
3427
|
Directive({ selector: "[sRowToggler]" })
|
|
3424
3428
|
], RowTogllerDirective);
|
|
3425
3429
|
|
|
3430
|
+
let TableFrozenPositionDirective = class TableFrozenPositionDirective {
|
|
3431
|
+
constructor(el, host) {
|
|
3432
|
+
this.el = el;
|
|
3433
|
+
this.host = host;
|
|
3434
|
+
this.sTableFrozenPosition = "left";
|
|
3435
|
+
this.host.onColResize.subscribe(() => {
|
|
3436
|
+
this.handleColResize();
|
|
3437
|
+
});
|
|
3438
|
+
window.addEventListener("resize", this.handleWindowResize.bind(this));
|
|
3439
|
+
const componentId = new Date().getTime();
|
|
3440
|
+
this.resetRowHeightClassName = `resetTableRowsHeight_${componentId}`;
|
|
3441
|
+
const styleReset = document.createElement("style");
|
|
3442
|
+
styleReset.innerHTML = `.${this.resetRowHeightClassName} tbody > tr, .${this.resetRowHeightClassName} thead > tr { height: auto; }`;
|
|
3443
|
+
document.getElementsByTagName("head")[0].appendChild(styleReset);
|
|
3444
|
+
this.fixBodyRowClassName = `fixTableBodyRowsHeight_${componentId}`;
|
|
3445
|
+
this.styleFixBodyRowHeight = document.createElement("style");
|
|
3446
|
+
this.styleFixBodyRowHeight.innerHTML = `.${this.fixBodyRowClassName} tbody > tr { height: auto; }`;
|
|
3447
|
+
document.getElementsByTagName("head")[0].appendChild(this.styleFixBodyRowHeight);
|
|
3448
|
+
this.fixHeadRowClassName = `fixTableHeadRowsHeight_${componentId}`;
|
|
3449
|
+
this.styleFixHeadRowHeight = document.createElement("style");
|
|
3450
|
+
this.styleFixHeadRowHeight.innerHTML = `.${this.fixHeadRowClassName} thead > tr { height: auto; }`;
|
|
3451
|
+
document.getElementsByTagName("head")[0].appendChild(this.styleFixHeadRowHeight);
|
|
3452
|
+
}
|
|
3453
|
+
set sTableFrozenValue(_) {
|
|
3454
|
+
setTimeout(() => {
|
|
3455
|
+
this.synchronizeRowHeight();
|
|
3456
|
+
});
|
|
3457
|
+
}
|
|
3458
|
+
ngAfterViewInit() {
|
|
3459
|
+
if (this.sTableFrozenPosition === "left")
|
|
3460
|
+
return;
|
|
3461
|
+
this.applyStylesForTable();
|
|
3462
|
+
}
|
|
3463
|
+
ngOnDestroy() {
|
|
3464
|
+
window.removeEventListener("resize", this.handleWindowResize.bind(this));
|
|
3465
|
+
}
|
|
3466
|
+
applyStylesForTable() {
|
|
3467
|
+
const scrollWrapper = this.el.nativeElement.querySelector(".ui-table-scrollable-wrapper");
|
|
3468
|
+
if (!scrollWrapper) {
|
|
3469
|
+
console.warn("Unable to find scroll-wrapper element from table. Is the table configured with frozen template?");
|
|
3470
|
+
return;
|
|
3471
|
+
}
|
|
3472
|
+
scrollWrapper.style.display = "flex";
|
|
3473
|
+
scrollWrapper.style.flexDirection = "row";
|
|
3474
|
+
const frozenTable = this.el.nativeElement.querySelector(".ui-table-frozen-view");
|
|
3475
|
+
if (!frozenTable) {
|
|
3476
|
+
console.warn("Unable to find frozen element from table. Is the table configured with frozen template?");
|
|
3477
|
+
return;
|
|
3478
|
+
}
|
|
3479
|
+
frozenTable.style.order = "1";
|
|
3480
|
+
frozenTable.style.borderRight = "none";
|
|
3481
|
+
frozenTable.style.borderLeft = "1px solid #dddddd";
|
|
3482
|
+
frozenTable.style.boxShadow = "-5px 0 5px -5px #cccccc";
|
|
3483
|
+
const unfrozenTable = this.el.nativeElement.querySelector(".ui-table-unfrozen-view");
|
|
3484
|
+
if (!unfrozenTable) {
|
|
3485
|
+
console.warn("Unable to find unfrozen element from table. Is the table configured with frozen template?");
|
|
3486
|
+
return;
|
|
3487
|
+
}
|
|
3488
|
+
unfrozenTable.style.position = "unset";
|
|
3489
|
+
}
|
|
3490
|
+
handleWindowResize() {
|
|
3491
|
+
this.synchronizeRowHeight();
|
|
3492
|
+
}
|
|
3493
|
+
handleColResize() {
|
|
3494
|
+
this.synchronizeRowHeight();
|
|
3495
|
+
}
|
|
3496
|
+
synchronizeRowHeight() {
|
|
3497
|
+
const tableBodyWrappers = this.el.nativeElement.getElementsByClassName("ui-table-scrollable-body");
|
|
3498
|
+
const tableBodies = [...tableBodyWrappers].map(divWrapper => [...divWrapper.childNodes].find(p => p.tagName === "TABLE"));
|
|
3499
|
+
this.recalculateDefaultRowHeight(tableBodies);
|
|
3500
|
+
this.applyMaxRowHeight(tableBodies);
|
|
3501
|
+
const tableHeadWrappers = this.el.nativeElement.getElementsByClassName("ui-table-scrollable-header-box");
|
|
3502
|
+
const tableHeads = [...tableHeadWrappers].map(divWrapper => [...divWrapper.childNodes].find(p => p.tagName === "TABLE"));
|
|
3503
|
+
this.recalculateDefaultRowHeight(tableHeads);
|
|
3504
|
+
this.applyMaxRowHeight(tableHeads, true);
|
|
3505
|
+
}
|
|
3506
|
+
recalculateDefaultRowHeight(tables) {
|
|
3507
|
+
for (const table of tables) {
|
|
3508
|
+
table.classList.remove(this.fixBodyRowClassName);
|
|
3509
|
+
table.classList.remove(this.fixHeadRowClassName);
|
|
3510
|
+
table.classList.add(this.resetRowHeightClassName);
|
|
3511
|
+
}
|
|
3512
|
+
}
|
|
3513
|
+
applyMaxRowHeight(tables, isHead = false) {
|
|
3514
|
+
const rowSizes = [];
|
|
3515
|
+
for (const table of tables) {
|
|
3516
|
+
for (const tr of table.rows) {
|
|
3517
|
+
rowSizes.push(tr.getBoundingClientRect().height);
|
|
3518
|
+
}
|
|
3519
|
+
}
|
|
3520
|
+
if (!rowSizes.length)
|
|
3521
|
+
return;
|
|
3522
|
+
const maxHeight = Math.max(...rowSizes);
|
|
3523
|
+
if (isHead) {
|
|
3524
|
+
this.styleFixHeadRowHeight.innerHTML = `.${this.fixHeadRowClassName} thead > tr { height: ${maxHeight}px; }`;
|
|
3525
|
+
for (const table of tables) {
|
|
3526
|
+
table.classList.remove(this.resetRowHeightClassName);
|
|
3527
|
+
table.classList.add(this.fixHeadRowClassName);
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
else {
|
|
3531
|
+
this.styleFixBodyRowHeight.innerHTML = `.${this.fixBodyRowClassName} tbody > tr { height: ${maxHeight}px; }`;
|
|
3532
|
+
for (const table of tables) {
|
|
3533
|
+
table.classList.remove(this.resetRowHeightClassName);
|
|
3534
|
+
table.classList.add(this.fixBodyRowClassName);
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
}
|
|
3538
|
+
};
|
|
3539
|
+
TableFrozenPositionDirective.ctorParameters = () => [
|
|
3540
|
+
{ type: ElementRef },
|
|
3541
|
+
{ type: Table }
|
|
3542
|
+
];
|
|
3543
|
+
__decorate([
|
|
3544
|
+
Input()
|
|
3545
|
+
], TableFrozenPositionDirective.prototype, "sTableFrozenPosition", void 0);
|
|
3546
|
+
__decorate([
|
|
3547
|
+
Input()
|
|
3548
|
+
], TableFrozenPositionDirective.prototype, "sTableFrozenValue", null);
|
|
3549
|
+
TableFrozenPositionDirective = __decorate([
|
|
3550
|
+
Directive({
|
|
3551
|
+
selector: "[sTableFrozenPosition]"
|
|
3552
|
+
})
|
|
3553
|
+
], TableFrozenPositionDirective);
|
|
3554
|
+
|
|
3426
3555
|
var EnumColumnFieldType;
|
|
3427
3556
|
(function (EnumColumnFieldType) {
|
|
3428
3557
|
EnumColumnFieldType["STRING"] = "STRING";
|
|
@@ -3724,6 +3853,111 @@ TokenListModule = __decorate([
|
|
|
3724
3853
|
})
|
|
3725
3854
|
], TokenListModule);
|
|
3726
3855
|
|
|
3856
|
+
let TablePagingComponent = class TablePagingComponent {
|
|
3857
|
+
constructor(translate, hostProjectConfigs) {
|
|
3858
|
+
this.translate = translate;
|
|
3859
|
+
this.hostProjectConfigs = hostProjectConfigs;
|
|
3860
|
+
}
|
|
3861
|
+
ngOnChanges(changes) {
|
|
3862
|
+
this.totalRecordsText = this.translate.instant(`${this.getTranslatePrefix()}total_records`, {
|
|
3863
|
+
value: changes.totalRecords.currentValue
|
|
3864
|
+
});
|
|
3865
|
+
}
|
|
3866
|
+
getTranslatePrefix() {
|
|
3867
|
+
return `${this.hostProjectConfigs.domain}.${this.hostProjectConfigs.service}.`;
|
|
3868
|
+
}
|
|
3869
|
+
getTooltipText() {
|
|
3870
|
+
return this.translate.instant(`${this.getTranslatePrefix()}export_to_csv`);
|
|
3871
|
+
}
|
|
3872
|
+
getActions() {
|
|
3873
|
+
const actions = [
|
|
3874
|
+
{
|
|
3875
|
+
id: "exportCurrentPage",
|
|
3876
|
+
label: this.translate.instant(`${this.getTranslatePrefix()}export_current_page`),
|
|
3877
|
+
command: () => this.exportCurrentPage()
|
|
3878
|
+
},
|
|
3879
|
+
{
|
|
3880
|
+
id: "exportSelected",
|
|
3881
|
+
label: this.translate.instant(`${this.getTranslatePrefix()}export_selected_records`),
|
|
3882
|
+
command: () => this.exportSelectedRecords()
|
|
3883
|
+
}
|
|
3884
|
+
];
|
|
3885
|
+
if (this.loadAllRecords) {
|
|
3886
|
+
actions.push({
|
|
3887
|
+
id: "exportAll",
|
|
3888
|
+
label: this.translate.instant(`${this.getTranslatePrefix()}export_all_records`),
|
|
3889
|
+
command: () => this.exportAllRecords()
|
|
3890
|
+
});
|
|
3891
|
+
}
|
|
3892
|
+
return actions;
|
|
3893
|
+
}
|
|
3894
|
+
validateComponent() {
|
|
3895
|
+
if (!this.table) {
|
|
3896
|
+
throw new Error("Table component not defined");
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
getColumnsToExport() {
|
|
3900
|
+
return [...this.table.columns].map(column => {
|
|
3901
|
+
if (column.exportable === null || column.exportable === undefined) {
|
|
3902
|
+
column.exportable = true;
|
|
3903
|
+
}
|
|
3904
|
+
return column;
|
|
3905
|
+
});
|
|
3906
|
+
}
|
|
3907
|
+
getRowsToExport() {
|
|
3908
|
+
return this.table.value;
|
|
3909
|
+
}
|
|
3910
|
+
getSelectedRowsToExport() {
|
|
3911
|
+
return this.table.selection;
|
|
3912
|
+
}
|
|
3913
|
+
getExportFileName() {
|
|
3914
|
+
var _a;
|
|
3915
|
+
return (_a = this.exportFileName) !== null && _a !== void 0 ? _a : "download";
|
|
3916
|
+
}
|
|
3917
|
+
exportCurrentPage() {
|
|
3918
|
+
this.validateComponent();
|
|
3919
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), this.getRowsToExport(), undefined, this.getExportFileName());
|
|
3920
|
+
}
|
|
3921
|
+
exportSelectedRecords() {
|
|
3922
|
+
this.validateComponent();
|
|
3923
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), this.getSelectedRowsToExport(), undefined, this.getExportFileName());
|
|
3924
|
+
}
|
|
3925
|
+
exportAllRecords() {
|
|
3926
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3927
|
+
this.validateComponent();
|
|
3928
|
+
const data = yield this.loadAllRecords();
|
|
3929
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), data, undefined, this.getExportFileName());
|
|
3930
|
+
});
|
|
3931
|
+
}
|
|
3932
|
+
};
|
|
3933
|
+
TablePagingComponent.ctorParameters = () => [
|
|
3934
|
+
{ type: TranslateService },
|
|
3935
|
+
{ type: undefined, decorators: [{ type: Inject, args: [HostProjectConfigsInjectionToken,] }] }
|
|
3936
|
+
];
|
|
3937
|
+
__decorate([
|
|
3938
|
+
Input()
|
|
3939
|
+
], TablePagingComponent.prototype, "totalRecords", void 0);
|
|
3940
|
+
__decorate([
|
|
3941
|
+
Input()
|
|
3942
|
+
], TablePagingComponent.prototype, "exportFileName", void 0);
|
|
3943
|
+
__decorate([
|
|
3944
|
+
Input()
|
|
3945
|
+
], TablePagingComponent.prototype, "table", void 0);
|
|
3946
|
+
__decorate([
|
|
3947
|
+
Input()
|
|
3948
|
+
], TablePagingComponent.prototype, "loadAllRecords", void 0);
|
|
3949
|
+
__decorate([
|
|
3950
|
+
Output()
|
|
3951
|
+
], TablePagingComponent.prototype, "totalRecordsText", void 0);
|
|
3952
|
+
TablePagingComponent = __decorate([
|
|
3953
|
+
Component({
|
|
3954
|
+
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",
|
|
3955
|
+
selector: "s-table-paging",
|
|
3956
|
+
styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
|
|
3957
|
+
}),
|
|
3958
|
+
__param(1, Inject(HostProjectConfigsInjectionToken))
|
|
3959
|
+
], TablePagingComponent);
|
|
3960
|
+
|
|
3727
3961
|
let TableModule = class TableModule {
|
|
3728
3962
|
};
|
|
3729
3963
|
TableModule = __decorate([
|
|
@@ -3731,17 +3965,23 @@ TableModule = __decorate([
|
|
|
3731
3965
|
imports: [
|
|
3732
3966
|
CommonModule,
|
|
3733
3967
|
TooltipModule,
|
|
3734
|
-
TokenListModule
|
|
3968
|
+
TokenListModule,
|
|
3969
|
+
TranslateModule,
|
|
3970
|
+
ButtonModule
|
|
3735
3971
|
],
|
|
3736
3972
|
exports: [
|
|
3737
3973
|
RowTogllerDirective,
|
|
3738
3974
|
NavigationDirective,
|
|
3739
|
-
TableColumnsComponent
|
|
3975
|
+
TableColumnsComponent,
|
|
3976
|
+
TableFrozenPositionDirective,
|
|
3977
|
+
TablePagingComponent
|
|
3740
3978
|
],
|
|
3741
3979
|
declarations: [
|
|
3742
3980
|
RowTogllerDirective,
|
|
3743
3981
|
NavigationDirective,
|
|
3744
|
-
TableColumnsComponent
|
|
3982
|
+
TableColumnsComponent,
|
|
3983
|
+
TableFrozenPositionDirective,
|
|
3984
|
+
TablePagingComponent
|
|
3745
3985
|
],
|
|
3746
3986
|
})
|
|
3747
3987
|
], TableModule);
|
|
@@ -4458,6 +4698,101 @@ DynamicFormDirective = __decorate([
|
|
|
4458
4698
|
Directive({ selector: "[sDynamicForm]" })
|
|
4459
4699
|
], DynamicFormDirective);
|
|
4460
4700
|
|
|
4701
|
+
let LongPressDirective = class LongPressDirective {
|
|
4702
|
+
constructor() {
|
|
4703
|
+
this.sLongPressDelay = 500;
|
|
4704
|
+
this.sLongPress = new EventEmitter();
|
|
4705
|
+
this.mouseUp = new Subject();
|
|
4706
|
+
this.mouseDown = new Subject();
|
|
4707
|
+
this.ngUnsubscribe = new Subject();
|
|
4708
|
+
}
|
|
4709
|
+
onMouseUp(event) {
|
|
4710
|
+
this.mouseUp.next(event);
|
|
4711
|
+
}
|
|
4712
|
+
onMouseDown(event) {
|
|
4713
|
+
this.mouseDown.next(event);
|
|
4714
|
+
}
|
|
4715
|
+
ngOnInit() {
|
|
4716
|
+
this.mouseDown
|
|
4717
|
+
.pipe(debounceTime(this.sLongPressDelay), takeUntil(this.mouseUp), repeat(), takeUntil(this.ngUnsubscribe))
|
|
4718
|
+
.subscribe(event => this.sLongPress.emit(event));
|
|
4719
|
+
}
|
|
4720
|
+
ngOnDestroy() {
|
|
4721
|
+
this.ngUnsubscribe.next();
|
|
4722
|
+
this.ngUnsubscribe.complete();
|
|
4723
|
+
}
|
|
4724
|
+
};
|
|
4725
|
+
__decorate([
|
|
4726
|
+
Input()
|
|
4727
|
+
], LongPressDirective.prototype, "sLongPressDelay", void 0);
|
|
4728
|
+
__decorate([
|
|
4729
|
+
Output()
|
|
4730
|
+
], LongPressDirective.prototype, "sLongPress", void 0);
|
|
4731
|
+
__decorate([
|
|
4732
|
+
HostListener("mouseup", ["$event"]),
|
|
4733
|
+
HostListener("touchend", ["$event"])
|
|
4734
|
+
], LongPressDirective.prototype, "onMouseUp", null);
|
|
4735
|
+
__decorate([
|
|
4736
|
+
HostListener("mousedown", ["$event"]),
|
|
4737
|
+
HostListener("touchstart", ["$event"])
|
|
4738
|
+
], LongPressDirective.prototype, "onMouseDown", null);
|
|
4739
|
+
LongPressDirective = __decorate([
|
|
4740
|
+
Directive({
|
|
4741
|
+
selector: "[sLongPress]",
|
|
4742
|
+
})
|
|
4743
|
+
], LongPressDirective);
|
|
4744
|
+
|
|
4745
|
+
let DoubleClickDirective = class DoubleClickDirective {
|
|
4746
|
+
constructor() {
|
|
4747
|
+
this.onDoubleClick = new EventEmitter();
|
|
4748
|
+
this._timeout = null;
|
|
4749
|
+
this._DOUBLE_CLICK_DELAY = 500;
|
|
4750
|
+
}
|
|
4751
|
+
onClick(event) {
|
|
4752
|
+
this.handleOnClickEvent(event);
|
|
4753
|
+
}
|
|
4754
|
+
handleOnClickEvent(event) {
|
|
4755
|
+
if (this._timeout) {
|
|
4756
|
+
this.clearTimeout();
|
|
4757
|
+
this.onDoubleClick.emit(event);
|
|
4758
|
+
}
|
|
4759
|
+
else {
|
|
4760
|
+
this._timeout = setTimeout(() => this.clearTimeout(), this._DOUBLE_CLICK_DELAY);
|
|
4761
|
+
}
|
|
4762
|
+
}
|
|
4763
|
+
clearTimeout() {
|
|
4764
|
+
clearTimeout(this._timeout);
|
|
4765
|
+
this._timeout = null;
|
|
4766
|
+
}
|
|
4767
|
+
};
|
|
4768
|
+
__decorate([
|
|
4769
|
+
Output()
|
|
4770
|
+
], DoubleClickDirective.prototype, "onDoubleClick", void 0);
|
|
4771
|
+
__decorate([
|
|
4772
|
+
HostListener("click", ["$event"])
|
|
4773
|
+
], DoubleClickDirective.prototype, "onClick", null);
|
|
4774
|
+
DoubleClickDirective = __decorate([
|
|
4775
|
+
Directive({
|
|
4776
|
+
selector: '[sDoubleClick]'
|
|
4777
|
+
})
|
|
4778
|
+
], DoubleClickDirective);
|
|
4779
|
+
|
|
4780
|
+
let MouseEventsModule = class MouseEventsModule {
|
|
4781
|
+
};
|
|
4782
|
+
MouseEventsModule = __decorate([
|
|
4783
|
+
NgModule({
|
|
4784
|
+
imports: [CommonModule],
|
|
4785
|
+
declarations: [
|
|
4786
|
+
LongPressDirective,
|
|
4787
|
+
DoubleClickDirective
|
|
4788
|
+
],
|
|
4789
|
+
exports: [
|
|
4790
|
+
LongPressDirective,
|
|
4791
|
+
DoubleClickDirective
|
|
4792
|
+
],
|
|
4793
|
+
})
|
|
4794
|
+
], MouseEventsModule);
|
|
4795
|
+
|
|
4461
4796
|
let DynamicFormModule = class DynamicFormModule {
|
|
4462
4797
|
};
|
|
4463
4798
|
DynamicFormModule = __decorate([
|
|
@@ -4499,7 +4834,8 @@ DynamicFormModule = __decorate([
|
|
|
4499
4834
|
TableModule,
|
|
4500
4835
|
InfoSignModule,
|
|
4501
4836
|
MaskFormatterModule,
|
|
4502
|
-
HotkeyModule.forRoot()
|
|
4837
|
+
HotkeyModule.forRoot(),
|
|
4838
|
+
MouseEventsModule
|
|
4503
4839
|
],
|
|
4504
4840
|
declarations: [
|
|
4505
4841
|
AutocompleteFieldComponent,
|
|
@@ -5439,60 +5775,6 @@ ImageCropperService = __decorate([
|
|
|
5439
5775
|
Injectable()
|
|
5440
5776
|
], ImageCropperService);
|
|
5441
5777
|
|
|
5442
|
-
let LongPressDirective = class LongPressDirective {
|
|
5443
|
-
constructor() {
|
|
5444
|
-
this.sLongPressDelay = 500;
|
|
5445
|
-
this.sLongPress = new EventEmitter();
|
|
5446
|
-
this.mouseUp = new Subject();
|
|
5447
|
-
this.mouseDown = new Subject();
|
|
5448
|
-
this.ngUnsubscribe = new Subject();
|
|
5449
|
-
}
|
|
5450
|
-
onMouseUp(event) {
|
|
5451
|
-
this.mouseUp.next(event);
|
|
5452
|
-
}
|
|
5453
|
-
onMouseDown(event) {
|
|
5454
|
-
this.mouseDown.next(event);
|
|
5455
|
-
}
|
|
5456
|
-
ngOnInit() {
|
|
5457
|
-
this.mouseDown
|
|
5458
|
-
.pipe(debounceTime(this.sLongPressDelay), takeUntil(this.mouseUp), repeat(), takeUntil(this.ngUnsubscribe))
|
|
5459
|
-
.subscribe(event => this.sLongPress.emit(event));
|
|
5460
|
-
}
|
|
5461
|
-
ngOnDestroy() {
|
|
5462
|
-
this.ngUnsubscribe.next();
|
|
5463
|
-
this.ngUnsubscribe.complete();
|
|
5464
|
-
}
|
|
5465
|
-
};
|
|
5466
|
-
__decorate([
|
|
5467
|
-
Input()
|
|
5468
|
-
], LongPressDirective.prototype, "sLongPressDelay", void 0);
|
|
5469
|
-
__decorate([
|
|
5470
|
-
Output()
|
|
5471
|
-
], LongPressDirective.prototype, "sLongPress", void 0);
|
|
5472
|
-
__decorate([
|
|
5473
|
-
HostListener("mouseup", ["$event"]),
|
|
5474
|
-
HostListener("touchend", ["$event"])
|
|
5475
|
-
], LongPressDirective.prototype, "onMouseUp", null);
|
|
5476
|
-
__decorate([
|
|
5477
|
-
HostListener("mousedown", ["$event"]),
|
|
5478
|
-
HostListener("touchstart", ["$event"])
|
|
5479
|
-
], LongPressDirective.prototype, "onMouseDown", null);
|
|
5480
|
-
LongPressDirective = __decorate([
|
|
5481
|
-
Directive({
|
|
5482
|
-
selector: "[sLongPress]",
|
|
5483
|
-
})
|
|
5484
|
-
], LongPressDirective);
|
|
5485
|
-
|
|
5486
|
-
let MouseEventsModule = class MouseEventsModule {
|
|
5487
|
-
};
|
|
5488
|
-
MouseEventsModule = __decorate([
|
|
5489
|
-
NgModule({
|
|
5490
|
-
imports: [CommonModule],
|
|
5491
|
-
declarations: [LongPressDirective],
|
|
5492
|
-
exports: [LongPressDirective],
|
|
5493
|
-
})
|
|
5494
|
-
], MouseEventsModule);
|
|
5495
|
-
|
|
5496
5778
|
var ThumbnailSize;
|
|
5497
5779
|
(function (ThumbnailSize) {
|
|
5498
5780
|
ThumbnailSize["Small"] = "small";
|
|
@@ -8004,5 +8286,5 @@ CodeEditorModule = __decorate([
|
|
|
8004
8286
|
* Generated bundle index. Do not edit.
|
|
8005
8287
|
*/
|
|
8006
8288
|
|
|
8007
|
-
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,
|
|
8289
|
+
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 };
|
|
8008
8290
|
//# sourceMappingURL=seniorsistemas-angular-components.js.map
|