@seniorsistemas/angular-components 16.2.1 → 16.2.3

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 (35) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +60 -12
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  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/dynamic-form/configurations/fields/field.d.ts +3 -0
  7. package/components/dynamic-form/configurations/fields/lookup-field.d.ts +2 -0
  8. package/components/dynamic-form/configurations/form-field.d.ts +1 -0
  9. package/components/tooltip/models/index.d.ts +2 -0
  10. package/components/tooltip/models/tooltip-event.d.ts +4 -0
  11. package/components/tooltip/tooltip.directive.d.ts +5 -2
  12. package/esm2015/components/dynamic-form/components/fields/lookup/lookup-field.component.js +2 -2
  13. package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +6 -2
  14. package/esm2015/components/dynamic-form/configurations/fields/field.js +2 -1
  15. package/esm2015/components/dynamic-form/configurations/fields/lookup-field.js +2 -1
  16. package/esm2015/components/dynamic-form/configurations/form-field.js +1 -1
  17. package/esm2015/components/dynamic-form/dynamic-field.component.js +2 -1
  18. package/esm2015/components/tooltip/models/index.js +3 -1
  19. package/esm2015/components/tooltip/models/tooltip-event.js +6 -0
  20. package/esm2015/components/tooltip/tooltip.directive.js +47 -12
  21. package/esm5/components/dynamic-form/components/fields/lookup/lookup-field.component.js +2 -2
  22. package/esm5/components/dynamic-form/components/lookup/lookup.component.js +6 -2
  23. package/esm5/components/dynamic-form/configurations/fields/field.js +2 -1
  24. package/esm5/components/dynamic-form/configurations/fields/lookup-field.js +2 -1
  25. package/esm5/components/dynamic-form/configurations/form-field.js +1 -1
  26. package/esm5/components/dynamic-form/dynamic-field.component.js +2 -2
  27. package/esm5/components/tooltip/models/index.js +3 -1
  28. package/esm5/components/tooltip/models/tooltip-event.js +6 -0
  29. package/esm5/components/tooltip/tooltip.directive.js +47 -12
  30. package/fesm2015/seniorsistemas-angular-components.js +60 -11
  31. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  32. package/fesm5/seniorsistemas-angular-components.js +60 -12
  33. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  34. package/package.json +1 -1
  35. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -1238,6 +1238,7 @@
1238
1238
  this.type = config.type;
1239
1239
  this.size = new FieldSize(config.size || {});
1240
1240
  this.errorMessages = config.errorMessages;
1241
+ this.bottomTemplate = config.bottomTemplate;
1241
1242
  this.gridClass = Object.keys(this.size).map(function (key) { return "ui-" + key + "-" + _this.size[key]; });
1242
1243
  this.defaultValue = config.defaultValue;
1243
1244
  this.representedBy = config.representedBy;
@@ -1984,6 +1985,7 @@
1984
1985
  _this.selectLabel = "Selecionar";
1985
1986
  _this.recordLabel = " registro";
1986
1987
  _this.recordsLabel = " registros";
1988
+ _this.autocompleteForceSelection = true;
1987
1989
  _this.onSelect = function (event) { };
1988
1990
  _this.onUnselect = function (event) { };
1989
1991
  Object.assign(_this, config);
@@ -2158,6 +2160,7 @@
2158
2160
  function LookupComponent(hotkeysService) {
2159
2161
  this.hotkeysService = hotkeysService;
2160
2162
  this.id = "s-lookup-" + LookupComponent_1.nextId++;
2163
+ this.autocompleteForceSelection = true;
2161
2164
  this.disabled = false;
2162
2165
  this.showSearch = true;
2163
2166
  this.lookupAppendTo = "body";
@@ -2455,6 +2458,9 @@
2455
2458
  __decorate([
2456
2459
  core.Input()
2457
2460
  ], LookupComponent.prototype, "id", void 0);
2461
+ __decorate([
2462
+ core.Input()
2463
+ ], LookupComponent.prototype, "autocompleteForceSelection", void 0);
2458
2464
  __decorate([
2459
2465
  core.Input()
2460
2466
  ], LookupComponent.prototype, "multiple", void 0);
@@ -2581,7 +2587,7 @@
2581
2587
  LookupComponent = LookupComponent_1 = __decorate([
2582
2588
  core.Component({
2583
2589
  selector: "s-lookup",
2584
- 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 <ng-template let-item pTemplate=\"selectedItem\">\n <span\n class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\"\n [sTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\"\n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\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<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 <div\n *ngIf=\"dialogVisible\"\n class=\"s-lookup-modal-container\">\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter\"\n [@collapseContent]=\"collapsed \n ? { value: 'hidden', params: { transitionParams: transitionOptions } }\n : { value: 'visible', params: { transitionParams: transitionOptions } }\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form\n [formGroup]=\"formGroupDialog\"\n novalidate\n autocomplete=\"off\">\n <div\n *ngIf=\"!collapsed\"\n class=\"form-content\"\n [@childCollapseContent]=\"collapsed\n ? { value: ':leave', params: { transitionParams: transitionOptions } }\n : { value: ':enter', params: { transitionParams: transitionOptions } }\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form\n [fields]=\"searchFields\"\n [form]=\"formGroupDialog\">\n </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 sTooltip=\"(ALT + SHIFT + F)\"\n tooltipPosition=\"top\"\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 sTooltip=\"(ALT + SHIFT + L)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button\n [id]=\"id + '-filter-toggle-button'\"\n type=\"button\"\n (click)=\"filterToggle()\">\n <span\n class=\"fa\"\n [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\">\n </span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div\n class=\"content\"\n [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 <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 <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col\n *ngIf=\"multiple\"\n style=\"width: 50px\" />\n <col\n *ngFor=\"let col of columns\"\n [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th\n *ngIf=\"multiple\"\n style=\"width: 50px\">\n <s-table-header-checkbox\n [useAllObject]=\"lookupRowProps ? false : true\"\n [rowProps]=\"lookupRowProps\">\n </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 <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon\n [field]=\"col.name\"\n *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\">\n </p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns\n let-rowIndex=\"rowIndex\">\n <tr\n sNavigation\n [pSelectableRow]=\"rowData\"\n [pSelectableRowIndex]=\"rowIndex\"\n sDoubleClick (onDoubleClick)=\"onTableRowDoubleClick(rowData)\">\n <td\n *ngIf=\"multiple\"\n style=\"width: 50px\"\n tabindex=\"0\">\n <p-tableCheckbox\n [value]=\"rowData\"\n [pSelectableRow]=\"rowData\">\n </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 <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 <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 <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 <ng-container *ngSwitchCase=\"'LocalDateTime'\">\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 <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 <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 <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 <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 <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 <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 <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n tooltipPosition=\"top\"\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 sTooltip=\"(ALT + SHIFT + C)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </p-footer>\n</p-dialog>\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
2590
+ 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]=\"autocompleteForceSelection\"\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 <ng-template let-item pTemplate=\"selectedItem\">\n <span\n class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\"\n [sTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\"\n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\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<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 <div\n *ngIf=\"dialogVisible\"\n class=\"s-lookup-modal-container\">\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter\"\n [@collapseContent]=\"collapsed \n ? { value: 'hidden', params: { transitionParams: transitionOptions } }\n : { value: 'visible', params: { transitionParams: transitionOptions } }\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form\n [formGroup]=\"formGroupDialog\"\n novalidate\n autocomplete=\"off\">\n <div\n *ngIf=\"!collapsed\"\n class=\"form-content\"\n [@childCollapseContent]=\"collapsed\n ? { value: ':leave', params: { transitionParams: transitionOptions } }\n : { value: ':enter', params: { transitionParams: transitionOptions } }\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form\n [fields]=\"searchFields\"\n [form]=\"formGroupDialog\">\n </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 sTooltip=\"(ALT + SHIFT + F)\"\n tooltipPosition=\"top\"\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 sTooltip=\"(ALT + SHIFT + L)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </div>\n </div>\n </div>\n </form>\n </div>\n <div\n *ngIf=\"searchFields && searchFields.length\"\n class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button\n [id]=\"id + '-filter-toggle-button'\"\n type=\"button\"\n (click)=\"filterToggle()\">\n <span\n class=\"fa\"\n [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\">\n </span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div\n class=\"content\"\n [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 <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 <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col\n *ngIf=\"multiple\"\n style=\"width: 50px\" />\n <col\n *ngFor=\"let col of columns\"\n [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th\n *ngIf=\"multiple\"\n style=\"width: 50px\">\n <s-table-header-checkbox\n [useAllObject]=\"lookupRowProps ? false : true\"\n [rowProps]=\"lookupRowProps\">\n </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 <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon\n [field]=\"col.name\"\n *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\">\n </p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns\n let-rowIndex=\"rowIndex\">\n <tr\n sNavigation\n [pSelectableRow]=\"rowData\"\n [pSelectableRowIndex]=\"rowIndex\"\n sDoubleClick (onDoubleClick)=\"onTableRowDoubleClick(rowData)\">\n <td\n *ngIf=\"multiple\"\n style=\"width: 50px\"\n tabindex=\"0\">\n <p-tableCheckbox\n [value]=\"rowData\"\n [pSelectableRow]=\"rowData\">\n </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 <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 <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 <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 <ng-container *ngSwitchCase=\"'LocalDateTime'\">\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 <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 <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 <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 <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 <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 <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 <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n tooltipPosition=\"top\"\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 sTooltip=\"(ALT + SHIFT + C)\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n </s-button>\n </p-footer>\n</p-dialog>\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
2585
2591
  providers: [
2586
2592
  {
2587
2593
  provide: forms.NG_VALUE_ACCESSOR,
@@ -3281,6 +3287,12 @@
3281
3287
  MobileBehavior["Tap"] = "tap";
3282
3288
  })(MobileBehavior || (MobileBehavior = {}));
3283
3289
 
3290
+ var TooltipEvent;
3291
+ (function (TooltipEvent) {
3292
+ TooltipEvent["Focus"] = "focus";
3293
+ TooltipEvent["Hover"] = "hover";
3294
+ })(TooltipEvent || (TooltipEvent = {}));
3295
+
3284
3296
  var TooltipDirective = /** @class */ (function () {
3285
3297
  function TooltipDirective(elementRef, appRef, componentFactoryResolver, injector) {
3286
3298
  this.elementRef = elementRef;
@@ -3289,7 +3301,9 @@
3289
3301
  this.injector = injector;
3290
3302
  this.position = exports.TooltipPosition.Top;
3291
3303
  this.showDelay = 500;
3304
+ this.tooltipEvent = TooltipEvent.Hover;
3292
3305
  this.escape = false;
3306
+ this.visible = true;
3293
3307
  this.mobileBehavior = MobileBehavior.Pressing;
3294
3308
  this.componentRef = null;
3295
3309
  }
@@ -3302,28 +3316,50 @@
3302
3316
  // whenever the component with the tooltip is clicked I destroy the tooltip.
3303
3317
  // whenever a key is pressed on the component with the tooltip I destroy the tooltip.
3304
3318
  TooltipDirective.prototype.onClick = function () {
3305
- if (!navigator.userAgent.match(/Android/i) && !navigator.userAgent.match(/iPhone/i)) {
3319
+ if (this.tooltipEvent === TooltipEvent.Hover &&
3320
+ !navigator.userAgent.match(/Android/i) &&
3321
+ !navigator.userAgent.match(/iPhone/i)) {
3306
3322
  this.destroy();
3307
3323
  }
3308
3324
  };
3309
3325
  // whenever you touch outside the component with the tooltip I destroy the tooltip.
3310
3326
  TooltipDirective.prototype.onDocumentTouchStart = function () {
3311
- this.destroy();
3327
+ if (this.tooltipEvent === TooltipEvent.Hover) {
3328
+ this.destroy();
3329
+ }
3330
+ };
3331
+ TooltipDirective.prototype.onFocus = function () {
3332
+ if (this.tooltipEvent === TooltipEvent.Focus) {
3333
+ this.createTootip();
3334
+ }
3335
+ };
3336
+ TooltipDirective.prototype.onBlur = function () {
3337
+ if (this.tooltipEvent === TooltipEvent.Focus) {
3338
+ this.destroy();
3339
+ }
3312
3340
  };
3313
3341
  TooltipDirective.prototype.onMouseEnter = function () {
3314
- this.createTootip();
3342
+ if (this.tooltipEvent === TooltipEvent.Hover) {
3343
+ this.createTootip();
3344
+ }
3315
3345
  };
3316
3346
  TooltipDirective.prototype.onMouseLeave = function () {
3317
- this.setHideTooltipTimeout();
3347
+ if (this.tooltipEvent === TooltipEvent.Hover) {
3348
+ this.setHideTooltipTimeout();
3349
+ }
3318
3350
  };
3319
3351
  TooltipDirective.prototype.onTouchStart = function () {
3320
- window.clearTimeout(this.touchTimeout);
3321
- this.touchTimeout = window.setTimeout(this.createTootip.bind(this), this.mobileBehavior === MobileBehavior.Pressing ? this.showDelay : 0);
3352
+ if (this.tooltipEvent === TooltipEvent.Hover) {
3353
+ window.clearTimeout(this.touchTimeout);
3354
+ this.touchTimeout = window.setTimeout(this.createTootip.bind(this), this.mobileBehavior === MobileBehavior.Pressing ? this.showDelay : 0);
3355
+ }
3322
3356
  };
3323
3357
  TooltipDirective.prototype.onTouchEnd = function () {
3324
- if (this.mobileBehavior === MobileBehavior.Pressing) {
3325
- window.clearTimeout(this.touchTimeout);
3326
- this.setHideTooltipTimeout();
3358
+ if (this.tooltipEvent === TooltipEvent.Hover) {
3359
+ if (this.mobileBehavior === MobileBehavior.Pressing) {
3360
+ window.clearTimeout(this.touchTimeout);
3361
+ this.setHideTooltipTimeout();
3362
+ }
3327
3363
  }
3328
3364
  };
3329
3365
  TooltipDirective.prototype.validatePosition = function () {
@@ -3483,9 +3519,15 @@
3483
3519
  __decorate([
3484
3520
  core.Input()
3485
3521
  ], TooltipDirective.prototype, "displayTime", void 0);
3522
+ __decorate([
3523
+ core.Input()
3524
+ ], TooltipDirective.prototype, "tooltipEvent", void 0);
3486
3525
  __decorate([
3487
3526
  core.Input()
3488
3527
  ], TooltipDirective.prototype, "escape", void 0);
3528
+ __decorate([
3529
+ core.Input()
3530
+ ], TooltipDirective.prototype, "visible", void 0);
3489
3531
  __decorate([
3490
3532
  core.Input()
3491
3533
  ], TooltipDirective.prototype, "mobileBehavior", void 0);
@@ -3496,6 +3538,12 @@
3496
3538
  __decorate([
3497
3539
  core.HostListener("document:touchstart")
3498
3540
  ], TooltipDirective.prototype, "onDocumentTouchStart", null);
3541
+ __decorate([
3542
+ core.HostListener("focus")
3543
+ ], TooltipDirective.prototype, "onFocus", null);
3544
+ __decorate([
3545
+ core.HostListener("blur")
3546
+ ], TooltipDirective.prototype, "onBlur", null);
3499
3547
  __decorate([
3500
3548
  core.HostListener("mouseenter")
3501
3549
  ], TooltipDirective.prototype, "onMouseEnter", null);
@@ -5315,7 +5363,7 @@
5315
5363
  ], LookupFieldComponent.prototype, "formControl", void 0);
5316
5364
  LookupFieldComponent = __decorate([
5317
5365
  core.Component({
5318
- template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [lookupSuggestions]=\"field.lookupSuggestions\"\n [dataKey]=\"field.dataKey\"\n [placeholder]=\"field.placeholder\"\n [searchFields]=\"field.searchFields\"\n [searchGridFields]=\"field.searchGridFields\"\n [searchGridData]=\"field.gridData\"\n (onLookupRequest)=\"field.onLookupRequest($event)\"\n (onSearchRequest)=\"field.onSearchRequest($event)\"\n [lookupDisplayField]=\"field.lookupDisplayField\"\n [searchTotalRecords]=\"field.searchTotalRecords\"\n [searchTotalRecordsLabel]=\"field.searchTotalRecordsLabel\"\n [searchTitle]=\"field.searchTitle\"\n [selectLabel]=\"field.selectLabel\"\n [searchEmptyTitle]=\"field.searchEmptyTitle\"\n [filterLabel]=\"field.filterLabel\"\n [filterTitle]=\"field.filterTitle\"\n [clearLabel]=\"field.clearLabel\"\n [cancelLabel]=\"field.cancelLabel\"\n (onSelect)=\"field.onSelect($event)\"\n (onUnselect)=\"field.onUnselect($event)\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupAppendTo]=\"field.appendTo\"\n [lookupEmptyMessage]=\"field.emptyMessage\"\n [recordLabel]=\"field.recordLabel\"\n [recordsLabel]=\"field.recordsLabel\">\n </s-lookup>\n</div>\n"
5366
+ template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [lookupSuggestions]=\"field.lookupSuggestions\"\n [dataKey]=\"field.dataKey\"\n [placeholder]=\"field.placeholder\"\n [searchFields]=\"field.searchFields\"\n [searchGridFields]=\"field.searchGridFields\"\n [searchGridData]=\"field.gridData\"\n (onLookupRequest)=\"field.onLookupRequest($event)\"\n (onSearchRequest)=\"field.onSearchRequest($event)\"\n [lookupDisplayField]=\"field.lookupDisplayField\"\n [searchTotalRecords]=\"field.searchTotalRecords\"\n [searchTotalRecordsLabel]=\"field.searchTotalRecordsLabel\"\n [searchTitle]=\"field.searchTitle\"\n [selectLabel]=\"field.selectLabel\"\n [searchEmptyTitle]=\"field.searchEmptyTitle\"\n [filterLabel]=\"field.filterLabel\"\n [filterTitle]=\"field.filterTitle\"\n [clearLabel]=\"field.clearLabel\"\n [cancelLabel]=\"field.cancelLabel\"\n (onSelect)=\"field.onSelect($event)\"\n (onUnselect)=\"field.onUnselect($event)\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupAppendTo]=\"field.appendTo\"\n [lookupEmptyMessage]=\"field.emptyMessage\"\n [recordLabel]=\"field.recordLabel\"\n [recordsLabel]=\"field.recordsLabel\"\n [autocompleteForceSelection]=\"field.autocompleteForceSelection\">\n </s-lookup>\n</div>\n"
5319
5367
  })
5320
5368
  ], LookupFieldComponent);
5321
5369
  return LookupFieldComponent;
@@ -5627,7 +5675,7 @@
5627
5675
  DynamicFieldComponent = __decorate([
5628
5676
  core.Component({
5629
5677
  selector: "s-dynamic-field",
5630
- template: "\n <div class=\"ui-fluid\" [formGroup]=\"form\">\n <div class=\"ui-g\">\n <ng-container *ngFor=\"let field of fields\">\n <div [ngClass]=\"field.gridClass\" *ngIf=\"field.visible()\">\n <span *ngIf=\"field.label\"><label [for]=\"field.name\"\n [ngClass]=\"{ 'required': field.required() }\" *sInfoSign=\"field.infoSign\">{{ field.label }}</label></span>\n <ng-container *sDynamicForm=\"{ id: id, config: field, group: form}\"></ng-container>\n <s-control-errors [form]=\"form\" [control]=\"form.controls[field.name]\"\n [errorMessages]=\"getErrorMessages(field.errorMessages)\"></s-control-errors>\n </div>\n </ng-container>\n </div>\n </div>\n "
5678
+ template: "\n <div class=\"ui-fluid\" [formGroup]=\"form\">\n <div class=\"ui-g\">\n <ng-container *ngFor=\"let field of fields\">\n <div [ngClass]=\"field.gridClass\" *ngIf=\"field.visible()\">\n <span *ngIf=\"field.label\"><label [for]=\"field.name\"\n [ngClass]=\"{ 'required': field.required() }\" *sInfoSign=\"field.infoSign\">{{ field.label }}</label></span>\n <ng-container *sDynamicForm=\"{ id: id, config: field, group: form}\"></ng-container>\n <s-control-errors [form]=\"form\" [control]=\"form.controls[field.name]\"\n [errorMessages]=\"getErrorMessages(field.errorMessages)\"></s-control-errors>\n <ng-template *ngIf=\"field?.bottomTemplate\" [ngTemplateOutlet]=\"field.bottomTemplate\"></ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n "
5631
5679
  })
5632
5680
  ], DynamicFieldComponent);
5633
5681
  return DynamicFieldComponent;