@po-ui/ng-components 5.11.0 → 5.14.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 (52) hide show
  1. package/bundles/po-ui-ng-components.umd.js +392 -146
  2. package/bundles/po-ui-ng-components.umd.js.map +1 -1
  3. package/esm2015/lib/components/po-calendar/po-calendar-base.component.js +2 -2
  4. package/esm2015/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields.component.js +3 -2
  5. package/esm2015/lib/components/po-field/po-input/po-input-base.component.js +11 -3
  6. package/esm2015/lib/components/po-field/po-input/po-input.component.js +8 -6
  7. package/esm2015/lib/components/po-field/po-input-generic/po-input-generic.js +6 -5
  8. package/esm2015/lib/components/po-field/po-multiselect/po-multiselect-base.component.js +103 -14
  9. package/esm2015/lib/components/po-field/po-multiselect/po-multiselect-dropdown/po-multiselect-dropdown.component.js +42 -2
  10. package/esm2015/lib/components/po-field/po-multiselect/po-multiselect-filter.service.js +50 -0
  11. package/esm2015/lib/components/po-field/po-multiselect/po-multiselect-item/po-multiselect-item.component.js +3 -3
  12. package/esm2015/lib/components/po-field/po-multiselect/po-multiselect-literals.interface.js +1 -1
  13. package/esm2015/lib/components/po-field/po-multiselect/po-multiselect-search/po-multiselect-search.component.js +4 -1
  14. package/esm2015/lib/components/po-field/po-multiselect/po-multiselect.component.js +18 -6
  15. package/esm2015/lib/components/po-page/po-page-action.interface.js +1 -1
  16. package/esm2015/lib/components/po-table/interfaces/po-table-column.interface.js +1 -1
  17. package/esm2015/lib/components/po-table/po-table-base.component.js +2 -2
  18. package/esm2015/lib/components/po-table/po-table.component.js +2 -2
  19. package/esm2015/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.js +2 -1
  20. package/esm2015/lib/interceptors/po-http-interceptor/po-http-interceptor-detail/po-http-interceptor-detail.component.js +16 -6
  21. package/esm2015/lib/interceptors/po-http-interceptor/po-http-interceptor-detail/po-http-interceptor-detail.interface.js +1 -1
  22. package/esm2015/lib/interceptors/po-http-request/po-http-request-interceptor.service.js +3 -11
  23. package/esm2015/lib/services/po-date/po-date.service.js +1 -1
  24. package/esm2015/po-ui-ng-components.js +104 -103
  25. package/fesm2015/po-ui-ng-components.js +252 -45
  26. package/fesm2015/po-ui-ng-components.js.map +1 -1
  27. package/lib/components/po-field/po-input/po-input-base.component.d.ts +3 -1
  28. package/lib/components/po-field/po-input/po-input.component.d.ts +2 -2
  29. package/lib/components/po-field/po-input-generic/po-input-generic.d.ts +2 -2
  30. package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +67 -4
  31. package/lib/components/po-field/po-multiselect/po-multiselect-dropdown/po-multiselect-dropdown.component.d.ts +7 -0
  32. package/lib/components/po-field/po-multiselect/po-multiselect-filter.service.d.ts +18 -0
  33. package/lib/components/po-field/po-multiselect/po-multiselect-item/po-multiselect-item.component.d.ts +1 -1
  34. package/lib/components/po-field/po-multiselect/po-multiselect-literals.interface.d.ts +2 -0
  35. package/lib/components/po-field/po-multiselect/po-multiselect-search/po-multiselect-search.component.d.ts +1 -0
  36. package/lib/components/po-field/po-multiselect/po-multiselect.component.d.ts +6 -3
  37. package/lib/components/po-page/po-page-action.interface.d.ts +2 -0
  38. package/lib/components/po-table/interfaces/po-table-column.interface.d.ts +11 -0
  39. package/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.d.ts +1 -0
  40. package/lib/interceptors/po-http-interceptor/po-http-interceptor-detail/po-http-interceptor-detail.interface.d.ts +2 -0
  41. package/lib/interceptors/po-http-request/po-http-request-interceptor.service.d.ts +2 -2
  42. package/lib/services/po-date/po-date.service.d.ts +1 -1
  43. package/package.json +4 -4
  44. package/po-ui-ng-components-5.14.0.tgz +0 -0
  45. package/po-ui-ng-components.d.ts +103 -102
  46. package/po-ui-ng-components.metadata.json +1 -1
  47. package/schematics/ng-add/index.js +1 -1
  48. package/schematics/ng-update/v2/index.js +1 -1
  49. package/schematics/ng-update/v3/index.js +1 -1
  50. package/schematics/ng-update/v4/index.js +1 -1
  51. package/schematics/ng-update/v5/index.js +1 -1
  52. package/po-ui-ng-components-5.11.0.tgz +0 -0
@@ -3842,7 +3842,7 @@
3842
3842
  PoCalendarBaseComponent.prototype.setActivateDate = function (date) {
3843
3843
  var activateDate = date ? date : this.verifyActivateDate();
3844
3844
  if (this.isRange) {
3845
- var checkedStart = new Date(activateDate);
3845
+ var checkedStart = typeof activateDate === 'string' ? this.poDate.convertIsoToDate(activateDate) : new Date(activateDate);
3846
3846
  var checkedEnd = new Date(new Date(checkedStart).setMonth(checkedStart.getMonth() + 1));
3847
3847
  this.activateDate = { start: checkedStart, end: checkedEnd };
3848
3848
  }
@@ -13751,7 +13751,7 @@
13751
13751
  row.$showAction = !toggleShowAction;
13752
13752
  };
13753
13753
  PoTableBaseComponent.prototype.sortColumn = function (column) {
13754
- if (!this.sort || column.type === 'detail') {
13754
+ if (!this.sort || column.type === 'detail' || column.sortable === false) {
13755
13755
  return;
13756
13756
  }
13757
13757
  this.sortedColumn.ascending = this.sortedColumn.property === column ? !this.sortedColumn.ascending : true;
@@ -14850,7 +14850,7 @@
14850
14850
  PoTableComponent.decorators = [
14851
14851
  { type: i0.Component, args: [{
14852
14852
  selector: 'po-table',
14853
- template: "<po-container *ngIf=\"container; else tableContainerTemplate\" p-no-padding [p-no-shadow]=\"container === 'border'\">\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n</po-container>\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-relative]=\"loading\">\n <div *ngIf=\"loading\" class=\"po-table-overlay\">\n <po-loading class=\"po-table-overlay-content\" [p-text]=\"literals.loadingData\"></po-loading>\n </div>\n\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n <div *ngIf=\"height\" class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div class=\"po-table-header-fixed po-table-header\"></div>\n <div #poTableTbody class=\"po-table-container-fixed-inner\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n </div>\n\n <div *ngIf=\"!height\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"po-table-footer\" *ngIf=\"hasFooter\">\n <ng-container *ngFor=\"let column of subtitleColumns; trackBy: trackBy\">\n <po-table-subtitle-footer [p-literals]=\"literals\" [p-subtitles]=\"column.subtitles\"> </po-table-subtitle-footer>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n *ngIf=\"!infiniteScroll\"\n class=\"po-row po-table-footer-show-more\"\n [class.po-invisible]=\"showMore.observers.length === 0 && !hasService\"\n #tableFooter\n>\n <po-button\n class=\"po-offset-xl-4 po-offset-lg-4 po-offset-md-3 po-lg-4 po-md-6\"\n [p-disabled]=\"showMoreDisabled\"\n [p-label]=\"literals.loadMoreData\"\n [p-loading]=\"loadingShowMore\"\n (p-click)=\"onShowMore()\"\n >\n </po-button>\n</div>\n\n<ng-template #tableTemplate>\n <table class=\"po-table\" [class.po-table-striped]=\"striped\" [class.po-table-layout-fixed]=\"hideTextOverflow\">\n <thead>\n <tr [class.po-table-header]=\"!height\">\n <th *ngIf=\"hasSelectableColumn\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n <input\n *ngIf=\"!hideSelectAll\"\n type=\"checkbox\"\n class=\"po-table-checkbox\"\n [class.po-table-checkbox-checked]=\"selectAll\"\n [class.po-table-checkbox-indeterminate]=\"selectAll === null\"\n />\n <label *ngIf=\"!hideSelectAll\" class=\"po-table-checkbox-label po-clickable\" (click)=\"selectAllRows()\">\n </label>\n </div>\n </th>\n\n <th\n *ngIf=\"(hasMasterDetailColumn || hasRowTemplate) && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th *ngIf=\"!hasMainColumns\" #noColumnsHeader class=\"po-table-header-column po-text-center\">\n <ng-container *ngIf=\"height; then noColumnsWithHeight; else noColumnsWithoutHeight\"> </ng-container>\n </th>\n\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\n #headersTable\n class=\"po-table-header-ellipsis\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-clickable]=\"sort || hasService\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n\n <th\n *ngIf=\"hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager)\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th\n *ngIf=\"hasVisibleActions && hideColumnsManager\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n\n <th\n #columnManager\n *ngIf=\"hasValidColumns && !hideColumnsManager\"\n [class.po-table-header-column-manager]=\"!isSingleAction\"\n [class.po-table-header-column-manager-border]=\"!height && container\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n >\n <div\n [class.po-table-header-column-manager-border]=\"height && container\"\n [class.po-table-header-column-manager-fixed-inner]=\"height\"\n [style.width.px]=\"height && visibleActions.length ? columnManager.offsetWidth : undefined\"\n >\n <button\n #columnManagerTarget\n class=\"po-table-header-column-manager-button po-icon po-icon-settings po-clickable\"\n p-tooltip-position=\"left\"\n [p-tooltip]=\"literals.columnsManager\"\n (click)=\"onOpenColumnManager()\"\n ></button>\n </div>\n </th>\n </tr>\n </thead>\n\n <tbody class=\"po-table-group-row\" *ngIf=\"!hasItems || !hasMainColumns\">\n <tr class=\"po-table-row\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n\n <ng-container *ngIf=\"hasMainColumns\">\n <tbody class=\"po-table-group-row\" *ngFor=\"let row of items; let rowIndex = index; trackBy: trackBy\">\n <tr class=\"po-table-row\" [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\">\n <td *ngIf=\"selectable\" class=\"po-table-column po-table-column-selectable\">\n <ng-container *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\">\n </ng-container>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table -->\n <td\n *ngIf=\"columnMasterDetail && !hideDetail && !hasRowTemplate\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pela diretiva -->\n <td\n *ngIf=\"hasRowTemplate && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td\n *ngFor=\"let column of mainColumns; let columnIndex = index; trackBy: trackBy\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [ngClass]=\"getClassColor(row, column)\"\n (click)=\"selectable ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell notranslate\"\n [class.po-table-body-ellipsis]=\"hideTextOverflow\"\n [ngSwitch]=\"column.type\"\n [p-tooltip]=\"tooltipText\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n <span *ngSwitchCase=\"'columnTemplate'\">\n <ng-container *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: row[column.property] }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'cellTemplate'\">\n <ng-container *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'boolean'\">\n {{ getBooleanLabel(row[column.property], column) }}\n </span>\n\n <span *ngSwitchCase=\"'currency'\">\n {{ row[column.property] | currency: column.format:'symbol':'1.2-2' }}\n </span>\n\n <span *ngSwitchCase=\"'date'\">\n {{ row[column.property] | date: column.format || 'dd/MM/yyyy' }}\n </span>\n\n <span *ngSwitchCase=\"'time'\">\n {{ row[column.property] | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n\n <span *ngSwitchCase=\"'dateTime'\">\n {{ row[column.property] | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n\n <span *ngSwitchCase=\"'number'\">\n {{ formatNumber(row[column.property], column.format) }}\n </span>\n\n <po-table-column-link\n *ngSwitchCase=\"'link'\"\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"row[column.property]\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n\n <po-table-column-icon\n *ngSwitchCase=\"'icon'\"\n [p-column]=\"column\"\n [p-icons]=\"getColumnIcons(row, column)\"\n [p-row]=\"row\"\n >\n </po-table-column-icon>\n\n <span *ngSwitchCase=\"'subtitle'\">\n <po-table-subtitle-circle [p-subtitle]=\"getSubtitleColumn(row, column)\"></po-table-subtitle-circle>\n </span>\n <span *ngSwitchCase=\"'label'\">\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"></po-table-column-label>\n </span>\n <span *ngSwitchDefault>{{ row[column.property] }}</span>\n </div>\n </td>\n\n <td\n *ngIf=\"hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td *ngIf=\"isSingleAction\" class=\"po-table-column po-table-column-single-action\">\n <div\n *ngIf=\"firstAction.visible !== false\"\n class=\"po-table-single-action po-clickable\"\n [class.po-table-action-disabled]=\"firstAction.disabled ? validateTableAction(row, firstAction) : false\"\n (click)=\"executeTableAction(row, firstAction)\"\n >\n <po-icon\n *ngIf=\"firstAction.icon\"\n class=\"po-table-single-action-content\"\n [p-icon]=\"firstAction.icon\"\n ></po-icon>\n {{ firstAction.label }}\n </div>\n </td>\n\n <td *ngIf=\"visibleActions.length > 1\" class=\"po-table-column-actions\">\n <span #popupTarget class=\"po-icon po-icon-more po-clickable\" (click)=\"togglePopup(row, popupTarget)\"></span>\n </td>\n <!-- Column Manager -->\n <td\n *ngIf=\"!hasVisibleActions && !hideColumnsManager && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column\"\n ></td>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)\">\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && isShowMasterDetail(row)\">\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n </tbody>\n </ng-container>\n </table>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n <span\n *ngIf=\"(containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)\"\n class=\"po-icon po-clickable\"\n [class.po-icon-arrow-up]=\"row.$showDetail\"\n [class.po-icon-arrow-down]=\"!row.$showDetail\"\n >\n </span>\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <input type=\"radio\" class=\"po-table-radio\" [class.po-table-radio-checked]=\"row.$selected\" />\n <label class=\"po-table-radio-label po-clickable\" (click)=\"selectable ? selectRow(row) : 'javascript:;'\"></label>\n</ng-template>\n\n<ng-template #inputCheckbox let-row>\n <input type=\"checkbox\" class=\"po-table-checkbox\" [class.po-table-checkbox-checked]=\"row.$selected\" />\n <label class=\"po-table-checkbox-label po-clickable\" (click)=\"selectable ? selectRow(row) : 'javascript:;'\"></label>\n</ng-template>\n\n<ng-template #contentHeaderTemplate let-column>\n <span\n #columnHeader\n class=\"po-table-header-ellipsis\"\n [p-tooltip]=\"tooltipText\"\n (mouseenter)=\"tooltipMouseEnter($event)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n {{ column.label || (column.property | titlecase) }}\n </span>\n <span\n *ngIf=\"sort\"\n [class.po-table-header-icon-unselected]=\"sortedColumn?.property !== column\"\n [class.po-table-header-icon-descending]=\"sortedColumn?.property === column && sortedColumn.ascending\"\n [class.po-table-header-icon-ascending]=\"sortedColumn?.property === column && !sortedColumn.ascending\"\n >\n </span>\n</ng-template>\n\n<ng-template #noColumnsWithHeight>\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"noColumnsHeader?.nativeElement.offsetWidth\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n</ng-template>\n\n<ng-template #noColumnsWithoutHeight>\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n</ng-template>\n\n<po-table-column-manager\n *ngIf=\"!hideColumnsManager\"\n [p-columns]=\"columns\"\n [p-max-columns]=\"maxColumns\"\n [p-target]=\"columnManagerTarget\"\n [p-last-visible-columns-selected]=\"lastVisibleColumnsSelected\"\n (p-visible-columns-change)=\"onVisibleColumnsChange($event)\"\n (p-change-visible-columns)=\"onChangeVisibleColumns($event)\"\n>\n</po-table-column-manager>\n",
14853
+ template: "<po-container *ngIf=\"container; else tableContainerTemplate\" p-no-padding [p-no-shadow]=\"container === 'border'\">\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n</po-container>\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-relative]=\"loading\">\n <div *ngIf=\"loading\" class=\"po-table-overlay\">\n <po-loading class=\"po-table-overlay-content\" [p-text]=\"literals.loadingData\"></po-loading>\n </div>\n\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n <div *ngIf=\"height\" class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div class=\"po-table-header-fixed po-table-header\"></div>\n <div #poTableTbody class=\"po-table-container-fixed-inner\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n </div>\n\n <div *ngIf=\"!height\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"po-table-footer\" *ngIf=\"hasFooter\">\n <ng-container *ngFor=\"let column of subtitleColumns; trackBy: trackBy\">\n <po-table-subtitle-footer [p-literals]=\"literals\" [p-subtitles]=\"column.subtitles\"> </po-table-subtitle-footer>\n </ng-container>\n </div>\n</ng-template>\n\n<div\n *ngIf=\"!infiniteScroll\"\n class=\"po-row po-table-footer-show-more\"\n [class.po-invisible]=\"showMore.observers.length === 0 && !hasService\"\n #tableFooter\n>\n <po-button\n class=\"po-offset-xl-4 po-offset-lg-4 po-offset-md-3 po-lg-4 po-md-6\"\n [p-disabled]=\"showMoreDisabled\"\n [p-label]=\"literals.loadMoreData\"\n [p-loading]=\"loadingShowMore\"\n (p-click)=\"onShowMore()\"\n >\n </po-button>\n</div>\n\n<ng-template #tableTemplate>\n <table class=\"po-table\" [class.po-table-striped]=\"striped\" [class.po-table-layout-fixed]=\"hideTextOverflow\">\n <thead>\n <tr [class.po-table-header]=\"!height\">\n <th *ngIf=\"hasSelectableColumn\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n <input\n *ngIf=\"!hideSelectAll\"\n type=\"checkbox\"\n class=\"po-table-checkbox\"\n [class.po-table-checkbox-checked]=\"selectAll\"\n [class.po-table-checkbox-indeterminate]=\"selectAll === null\"\n />\n <label *ngIf=\"!hideSelectAll\" class=\"po-table-checkbox-label po-clickable\" (click)=\"selectAllRows()\">\n </label>\n </div>\n </th>\n\n <th\n *ngIf=\"(hasMasterDetailColumn || hasRowTemplate) && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th *ngIf=\"!hasMainColumns\" #noColumnsHeader class=\"po-table-header-column po-text-center\">\n <ng-container *ngIf=\"height; then noColumnsWithHeight; else noColumnsWithoutHeight\"> </ng-container>\n </th>\n\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\n #headersTable\n class=\"po-table-header-ellipsis\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n\n <th\n *ngIf=\"hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager)\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th\n *ngIf=\"hasVisibleActions && hideColumnsManager\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n\n <th\n #columnManager\n *ngIf=\"hasValidColumns && !hideColumnsManager\"\n [class.po-table-header-column-manager]=\"!isSingleAction\"\n [class.po-table-header-column-manager-border]=\"!height && container\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n >\n <div\n [class.po-table-header-column-manager-border]=\"height && container\"\n [class.po-table-header-column-manager-fixed-inner]=\"height\"\n [style.width.px]=\"height && visibleActions.length ? columnManager.offsetWidth : undefined\"\n >\n <button\n #columnManagerTarget\n class=\"po-table-header-column-manager-button po-icon po-icon-settings po-clickable\"\n p-tooltip-position=\"left\"\n [p-tooltip]=\"literals.columnsManager\"\n (click)=\"onOpenColumnManager()\"\n ></button>\n </div>\n </th>\n </tr>\n </thead>\n\n <tbody class=\"po-table-group-row\" *ngIf=\"!hasItems || !hasMainColumns\">\n <tr class=\"po-table-row\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n\n <ng-container *ngIf=\"hasMainColumns\">\n <tbody class=\"po-table-group-row\" *ngFor=\"let row of items; let rowIndex = index; trackBy: trackBy\">\n <tr class=\"po-table-row\" [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\">\n <td *ngIf=\"selectable\" class=\"po-table-column po-table-column-selectable\">\n <ng-container *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\">\n </ng-container>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table -->\n <td\n *ngIf=\"columnMasterDetail && !hideDetail && !hasRowTemplate\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pela diretiva -->\n <td\n *ngIf=\"hasRowTemplate && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td\n *ngFor=\"let column of mainColumns; let columnIndex = index; trackBy: trackBy\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [ngClass]=\"getClassColor(row, column)\"\n (click)=\"selectable ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell notranslate\"\n [class.po-table-body-ellipsis]=\"hideTextOverflow\"\n [ngSwitch]=\"column.type\"\n [p-tooltip]=\"tooltipText\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n <span *ngSwitchCase=\"'columnTemplate'\">\n <ng-container *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: row[column.property] }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'cellTemplate'\">\n <ng-container *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'boolean'\">\n {{ getBooleanLabel(row[column.property], column) }}\n </span>\n\n <span *ngSwitchCase=\"'currency'\">\n {{ row[column.property] | currency: column.format:'symbol':'1.2-2' }}\n </span>\n\n <span *ngSwitchCase=\"'date'\">\n {{ row[column.property] | date: column.format || 'dd/MM/yyyy' }}\n </span>\n\n <span *ngSwitchCase=\"'time'\">\n {{ row[column.property] | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n\n <span *ngSwitchCase=\"'dateTime'\">\n {{ row[column.property] | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n\n <span *ngSwitchCase=\"'number'\">\n {{ formatNumber(row[column.property], column.format) }}\n </span>\n\n <po-table-column-link\n *ngSwitchCase=\"'link'\"\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"row[column.property]\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n\n <po-table-column-icon\n *ngSwitchCase=\"'icon'\"\n [p-column]=\"column\"\n [p-icons]=\"getColumnIcons(row, column)\"\n [p-row]=\"row\"\n >\n </po-table-column-icon>\n\n <span *ngSwitchCase=\"'subtitle'\">\n <po-table-subtitle-circle [p-subtitle]=\"getSubtitleColumn(row, column)\"></po-table-subtitle-circle>\n </span>\n <span *ngSwitchCase=\"'label'\">\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"></po-table-column-label>\n </span>\n <span *ngSwitchDefault>{{ row[column.property] }}</span>\n </div>\n </td>\n\n <td\n *ngIf=\"hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td *ngIf=\"isSingleAction\" class=\"po-table-column po-table-column-single-action\">\n <div\n *ngIf=\"firstAction.visible !== false\"\n class=\"po-table-single-action po-clickable\"\n [class.po-table-action-disabled]=\"firstAction.disabled ? validateTableAction(row, firstAction) : false\"\n (click)=\"executeTableAction(row, firstAction)\"\n >\n <po-icon\n *ngIf=\"firstAction.icon\"\n class=\"po-table-single-action-content\"\n [p-icon]=\"firstAction.icon\"\n ></po-icon>\n {{ firstAction.label }}\n </div>\n </td>\n\n <td *ngIf=\"visibleActions.length > 1\" class=\"po-table-column-actions\">\n <span #popupTarget class=\"po-icon po-icon-more po-clickable\" (click)=\"togglePopup(row, popupTarget)\"></span>\n </td>\n <!-- Column Manager -->\n <td\n *ngIf=\"!hasVisibleActions && !hideColumnsManager && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column\"\n ></td>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)\">\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && isShowMasterDetail(row)\">\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n </tbody>\n </ng-container>\n </table>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n <span\n *ngIf=\"(containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)\"\n class=\"po-icon po-clickable\"\n [class.po-icon-arrow-up]=\"row.$showDetail\"\n [class.po-icon-arrow-down]=\"!row.$showDetail\"\n >\n </span>\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <input type=\"radio\" class=\"po-table-radio\" [class.po-table-radio-checked]=\"row.$selected\" />\n <label class=\"po-table-radio-label po-clickable\" (click)=\"selectable ? selectRow(row) : 'javascript:;'\"></label>\n</ng-template>\n\n<ng-template #inputCheckbox let-row>\n <input type=\"checkbox\" class=\"po-table-checkbox\" [class.po-table-checkbox-checked]=\"row.$selected\" />\n <label class=\"po-table-checkbox-label po-clickable\" (click)=\"selectable ? selectRow(row) : 'javascript:;'\"></label>\n</ng-template>\n\n<ng-template #contentHeaderTemplate let-column>\n <span\n #columnHeader\n class=\"po-table-header-ellipsis\"\n [p-tooltip]=\"tooltipText\"\n (mouseenter)=\"tooltipMouseEnter($event)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n {{ column.label || (column.property | titlecase) }}\n </span>\n <span\n *ngIf=\"sort && column.sortable !== false\"\n [class.po-table-header-icon-unselected]=\"sortedColumn?.property !== column\"\n [class.po-table-header-icon-descending]=\"sortedColumn?.property === column && sortedColumn.ascending\"\n [class.po-table-header-icon-ascending]=\"sortedColumn?.property === column && !sortedColumn.ascending\"\n >\n </span>\n</ng-template>\n\n<ng-template #noColumnsWithHeight>\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"noColumnsHeader?.nativeElement.offsetWidth\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n</ng-template>\n\n<ng-template #noColumnsWithoutHeight>\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n</ng-template>\n\n<po-table-column-manager\n *ngIf=\"!hideColumnsManager\"\n [p-columns]=\"columns\"\n [p-max-columns]=\"maxColumns\"\n [p-target]=\"columnManagerTarget\"\n [p-last-visible-columns-selected]=\"lastVisibleColumnsSelected\"\n (p-visible-columns-change)=\"onVisibleColumnsChange($event)\"\n (p-change-visible-columns)=\"onChangeVisibleColumns($event)\"\n>\n</po-table-column-manager>\n",
14854
14854
  providers: [PoDateService]
14855
14855
  },] }
14856
14856
  ];
@@ -17878,7 +17878,8 @@
17878
17878
  *
17879
17879
  */
17880
17880
  var PoInputBaseComponent = /** @class */ (function () {
17881
- function PoInputBaseComponent() {
17881
+ function PoInputBaseComponent(cd) {
17882
+ this.cd = cd;
17882
17883
  /**
17883
17884
  * @optional
17884
17885
  *
@@ -18146,7 +18147,9 @@
18146
18147
  // Função implementada do ControlValueAccessor
18147
18148
  // Usada para interceptar os estados de habilitado via forms api
18148
18149
  PoInputBaseComponent.prototype.setDisabledState = function (isDisabled) {
18150
+ var _a;
18149
18151
  this.disabled = isDisabled;
18152
+ (_a = this.cd) === null || _a === void 0 ? void 0 : _a.markForCheck();
18150
18153
  };
18151
18154
  // Função implementada do ControlValueAccessor
18152
18155
  // Usada para interceptar as mudanças e não atualizar automaticamente o Model
@@ -18201,7 +18204,9 @@
18201
18204
  };
18202
18205
  // Função implementada do ControlValueAccessor
18203
18206
  PoInputBaseComponent.prototype.writeValue = function (value) {
18207
+ var _a;
18204
18208
  this.writeValueModel(value);
18209
+ (_a = this.cd) === null || _a === void 0 ? void 0 : _a.markForCheck();
18205
18210
  };
18206
18211
  PoInputBaseComponent.prototype.validateModel = function () {
18207
18212
  if (this.validatorChange) {
@@ -18223,6 +18228,9 @@
18223
18228
  PoInputBaseComponent.decorators = [
18224
18229
  { type: i0.Directive }
18225
18230
  ];
18231
+ PoInputBaseComponent.ctorParameters = function () { return [
18232
+ { type: i0.ChangeDetectorRef }
18233
+ ]; };
18226
18234
  PoInputBaseComponent.propDecorators = {
18227
18235
  autoFocus: [{ type: i0.Input, args: ['p-auto-focus',] }],
18228
18236
  icon: [{ type: i0.Input, args: ['p-icon',] }],
@@ -18879,8 +18887,8 @@
18879
18887
  /* eslint-disable @angular-eslint/directive-class-suffix */
18880
18888
  var PoInputGeneric = /** @class */ (function (_super) {
18881
18889
  __extends(PoInputGeneric, _super);
18882
- function PoInputGeneric(el) {
18883
- var _this = _super.call(this) || this;
18890
+ function PoInputGeneric(el, cd) {
18891
+ var _this = _super.call(this, cd) || this;
18884
18892
  _this.type = 'text';
18885
18893
  _this.el = el;
18886
18894
  return _this;
@@ -19061,7 +19069,8 @@
19061
19069
  { type: i0.Directive }
19062
19070
  ];
19063
19071
  PoInputGeneric.ctorParameters = function () { return [
19064
- { type: i0.ElementRef }
19072
+ { type: i0.ElementRef },
19073
+ { type: i0.ChangeDetectorRef }
19065
19074
  ]; };
19066
19075
  PoInputGeneric.propDecorators = {
19067
19076
  inputEl: [{ type: i0.ViewChild, args: ['inp', { read: i0.ElementRef, static: true },] }],
@@ -20778,6 +20787,8 @@
20778
20787
  this.options = [];
20779
20788
  /** Propriedade que recebe a lista de opções que deverão ser criadas no dropdown. */
20780
20789
  this.visibleOptions = [];
20790
+ /** Propriedade que indica se o campo "Selecionar todos" deverá ser escondido. */
20791
+ this.hideSelectAll = false;
20781
20792
  /** Evento disparado a cada tecla digitada na pesquisa. */
20782
20793
  this.changeSearch = new i0.EventEmitter();
20783
20794
  /** Evento disparado a cada alteração na lista das opções selecionadas. */
@@ -20816,6 +20827,19 @@
20816
20827
  this.searchElement.setFocus();
20817
20828
  }
20818
20829
  };
20830
+ PoMultiselectDropdownComponent.prototype.onClickSelectAll = function () {
20831
+ var selectedValues = this.selectedOptions.map(function (_b) {
20832
+ var value = _b.value;
20833
+ return value;
20834
+ });
20835
+ if (this.everyVisibleOptionsSelected(selectedValues)) {
20836
+ this.selectedOptions = [];
20837
+ }
20838
+ else {
20839
+ this.selectedOptions = this.uniqueSelectedOptions(selectedValues);
20840
+ }
20841
+ this.change.emit(this.selectedOptions);
20842
+ };
20819
20843
  PoMultiselectDropdownComponent.prototype.updateSelectedValues = function (checked, option) {
20820
20844
  if (checked) {
20821
20845
  this.selectedOptions.push(option);
@@ -20825,6 +20849,27 @@
20825
20849
  }
20826
20850
  this.change.emit(this.selectedOptions);
20827
20851
  };
20852
+ PoMultiselectDropdownComponent.prototype.everyVisibleOptionsSelected = function (selectedValues) {
20853
+ return this.visibleOptions.every(function (visibleOption) { return selectedValues.includes(visibleOption.value); });
20854
+ };
20855
+ PoMultiselectDropdownComponent.prototype.someVisibleOptionsSelected = function (selectedValues) {
20856
+ return this.visibleOptions.some(function (visibleOption) { return selectedValues.includes(visibleOption.value); });
20857
+ };
20858
+ PoMultiselectDropdownComponent.prototype.getStateSelectAll = function () {
20859
+ var selectedValues = this.selectedOptions.map(function (_b) {
20860
+ var value = _b.value;
20861
+ return value;
20862
+ });
20863
+ if (this.everyVisibleOptionsSelected(selectedValues)) {
20864
+ return true;
20865
+ }
20866
+ else if (this.someVisibleOptionsSelected(selectedValues)) {
20867
+ return null;
20868
+ }
20869
+ else {
20870
+ return false;
20871
+ }
20872
+ };
20828
20873
  PoMultiselectDropdownComponent.prototype.callChangeSearch = function (event) {
20829
20874
  this.changeSearch.emit(event);
20830
20875
  };
@@ -20838,12 +20883,32 @@
20838
20883
  }
20839
20884
  });
20840
20885
  };
20886
+ PoMultiselectDropdownComponent.prototype.uniqueSelectedOptions = function (selectedValues) {
20887
+ var e_1, _b;
20888
+ var newSelectedOptions = __spreadArray([], __read(this.selectedOptions));
20889
+ try {
20890
+ for (var _c = __values(this.visibleOptions), _d = _c.next(); !_d.done; _d = _c.next()) {
20891
+ var visibleOption = _d.value;
20892
+ if (!selectedValues.includes(visibleOption.value)) {
20893
+ newSelectedOptions.push(visibleOption);
20894
+ }
20895
+ }
20896
+ }
20897
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
20898
+ finally {
20899
+ try {
20900
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
20901
+ }
20902
+ finally { if (e_1) throw e_1.error; }
20903
+ }
20904
+ return newSelectedOptions;
20905
+ };
20841
20906
  return PoMultiselectDropdownComponent;
20842
20907
  }());
20843
20908
  PoMultiselectDropdownComponent.decorators = [
20844
20909
  { type: i0.Component, args: [{
20845
20910
  selector: 'po-multiselect-dropdown',
20846
- template: "<div #container class=\"po-multiselect-container\" [hidden]=\"!show\">\n <po-multiselect-search\n #searchElement\n *ngIf=\"!hideSearch\"\n [p-literals]=\"literals\"\n [p-placeholder]=\"placeholderSearch\"\n (p-change)=\"callChangeSearch($event)\"\n >\n </po-multiselect-search>\n\n <ul class=\"po-multiselect-items-container\" [scrollTop]=\"scrollTop\" #ulElement>\n <div *ngIf=\"!visibleOptions.length && !isServerSearching\" class=\"po-multiselect-container-no-data po-text-center\">\n <span> {{ literals.noData }}</span>\n </div>\n\n <div *ngIf=\"isServerSearching\" class=\"po-multiselect-container-loading po-text-center\">\n <po-loading></po-loading>\n </div>\n\n <ng-container *ngIf=\"!isServerSearching\">\n <po-multiselect-item\n *ngFor=\"let option of visibleOptions\"\n [p-label]=\"option.label\"\n [p-selected]=\"isSelectedItem(option)\"\n (p-change)=\"clickItem($event, option)\"\n >\n </po-multiselect-item>\n </ng-container>\n </ul>\n</div>\n"
20911
+ template: "<div #container class=\"po-multiselect-container\" [hidden]=\"!show\">\n <po-multiselect-search\n #searchElement\n *ngIf=\"!hideSearch\"\n [p-literals]=\"literals\"\n [p-placeholder]=\"placeholderSearch\"\n (p-change)=\"callChangeSearch($event)\"\n >\n </po-multiselect-search>\n\n <ul class=\"po-multiselect-items-container\" [scrollTop]=\"scrollTop\" #ulElement>\n <div *ngIf=\"!visibleOptions.length && !isServerSearching\" class=\"po-multiselect-container-no-data po-text-center\">\n <span> {{ literals.noData }}</span>\n </div>\n\n <div *ngIf=\"isServerSearching\" class=\"po-multiselect-container-loading po-text-center\">\n <po-loading></po-loading>\n </div>\n\n <ng-container *ngIf=\"!isServerSearching\">\n <po-multiselect-item\n *ngIf=\"!searchElement?.inputValue && visibleOptions.length && !hideSelectAll\"\n [p-label]=\"literals?.selectAll\"\n [p-selected]=\"getStateSelectAll()\"\n (p-change)=\"onClickSelectAll()\"\n >\n </po-multiselect-item>\n\n <po-multiselect-item\n *ngFor=\"let option of visibleOptions\"\n [p-label]=\"option.label\"\n [p-selected]=\"isSelectedItem(option)\"\n (p-change)=\"clickItem($event, option)\"\n >\n </po-multiselect-item>\n </ng-container>\n </ul>\n</div>\n"
20847
20912
  },] }
20848
20913
  ];
20849
20914
  PoMultiselectDropdownComponent.propDecorators = {
@@ -20854,6 +20919,7 @@
20854
20919
  selectedOptions: [{ type: i0.Input, args: ['p-selected-options',] }],
20855
20920
  options: [{ type: i0.Input, args: ['p-options',] }],
20856
20921
  visibleOptions: [{ type: i0.Input, args: ['p-visible-options',] }],
20922
+ hideSelectAll: [{ type: i0.Input, args: ['p-hide-select-all',] }],
20857
20923
  changeSearch: [{ type: i0.Output, args: ['p-change-search',] }],
20858
20924
  change: [{ type: i0.Output, args: ['p-change',] }],
20859
20925
  closeDropdown: [{ type: i0.Output, args: ['p-close-dropdown',] }],
@@ -20881,22 +20947,28 @@
20881
20947
  })(exports.PoMultiselectFilterMode || (exports.PoMultiselectFilterMode = {}));
20882
20948
 
20883
20949
  var PO_MULTISELECT_DEBOUNCE_TIME_DEFAULT = 400;
20950
+ var PO_MULTISELECT_FIELD_LABEL_DEFAULT = 'label';
20951
+ var PO_MULTISELECT_FIELD_VALUE_DEFAULT = 'value';
20884
20952
  var poMultiselectLiteralsDefault = {
20885
20953
  en: {
20886
20954
  noData: 'No data found',
20887
- placeholderSearch: 'Search'
20955
+ placeholderSearch: 'Search',
20956
+ selectAll: 'Select all'
20888
20957
  },
20889
20958
  es: {
20890
20959
  noData: 'Datos no encontrados',
20891
- placeholderSearch: 'Busca'
20960
+ placeholderSearch: 'Busca',
20961
+ selectAll: 'Seleccionar todo'
20892
20962
  },
20893
20963
  pt: {
20894
20964
  noData: 'Nenhum dado encontrado',
20895
- placeholderSearch: 'Buscar'
20965
+ placeholderSearch: 'Buscar',
20966
+ selectAll: 'Selecionar todos'
20896
20967
  },
20897
20968
  ru: {
20898
20969
  noData: 'Данные не найдены',
20899
- placeholderSearch: 'искать'
20970
+ placeholderSearch: 'искать',
20971
+ selectAll: 'Выбрать все'
20900
20972
  }
20901
20973
  };
20902
20974
  /**
@@ -20962,6 +21034,8 @@
20962
21034
  this._required = false;
20963
21035
  this._sort = false;
20964
21036
  this._autoHeight = false;
21037
+ this._fieldLabel = PO_MULTISELECT_FIELD_LABEL_DEFAULT;
21038
+ this._fieldValue = PO_MULTISELECT_FIELD_VALUE_DEFAULT;
20965
21039
  this.language = languageService.getShortLanguage();
20966
21040
  }
20967
21041
  Object.defineProperty(PoMultiselectBaseComponent.prototype, "filterService", {
@@ -20972,9 +21046,28 @@
20972
21046
  * @optional
20973
21047
  *
20974
21048
  * @description
20975
- * Nesta propriedade deve ser informado um serviço implementando a interface PoMultiselectFilter.
21049
+ * Nesta propriedade pode ser informada a URL do serviço em que será realizado o filtro para carregamento da lista de itens no componente.
21050
+ *
21051
+ *Também existe a possibilidade de informar um serviço implementando a interface `PoMultiselectFilter`.
21052
+ *
21053
+ *Caso utilizado uma URL, o serviço deve ser retornado no padrão [API PO UI](https://po-ui.io/guides/api) e utilizar as propriedades `p-field-label` e `p-field-value` para a construção da lista de itens.
21054
+ *
21055
+ *Quando utilizada uma URL de serviço, então será concatenada nesta URL o valor que deseja-se filtrar da seguinte forma:
21056
+ *
21057
+ *```
21058
+ * // caso filtrar por "Peter"
21059
+ * https://localhost:8080/api/heroes?filter=Peter
21060
+ *```
21061
+ *
21062
+ *E caso iniciar o campo com valor, os itens serão buscados da seguinte forma:
21063
+ *
21064
+ *```
21065
+ * // caso o valor do campo for [1234, 5678];
21066
+ * https://localhost:8080/api/heroes?value=1234,5678
21067
+ *
21068
+ * //O *value* é referente ao `fieldValue`.
21069
+ *```
20976
21070
  *
20977
- * > Definirá por padrão a propriedade `p-auto-height` como `true`, mas a mesma pode ser redefinida caso necessário.
20978
21071
  */
20979
21072
  set: function (value) {
20980
21073
  this._filterService = value;
@@ -21218,15 +21311,76 @@
21218
21311
  enumerable: false,
21219
21312
  configurable: true
21220
21313
  });
21314
+ Object.defineProperty(PoMultiselectBaseComponent.prototype, "fieldLabel", {
21315
+ get: function () {
21316
+ return this._fieldLabel;
21317
+ },
21318
+ /**
21319
+ * @optional
21320
+ *
21321
+ * @description
21322
+ * Deve ser informado o nome da propriedade do objeto que será utilizado para a conversão dos itens apresentados na lista do componente
21323
+ * (`p-options`), esta propriedade será responsável pelo texto de apresentação de cada item da lista.
21324
+ *
21325
+ * Necessário quando informar o serviço como URL e o mesmo não estiver retornando uma lista de objetos no padrão da interface
21326
+ * `PoMultiSelectOption`.
21327
+ *
21328
+ * @default `label`
21329
+ */
21330
+ set: function (value) {
21331
+ this._fieldLabel = value || PO_MULTISELECT_FIELD_LABEL_DEFAULT;
21332
+ if (isTypeof(this.filterService, 'string') && this.service) {
21333
+ this.service.fieldLabel = this._fieldLabel;
21334
+ }
21335
+ },
21336
+ enumerable: false,
21337
+ configurable: true
21338
+ });
21339
+ Object.defineProperty(PoMultiselectBaseComponent.prototype, "fieldValue", {
21340
+ get: function () {
21341
+ return this._fieldValue;
21342
+ },
21343
+ /**
21344
+ * @optional
21345
+ *
21346
+ * @description
21347
+ * Deve ser informado o nome da propriedade do objeto que será utilizado para a conversão dos itens apresentados na lista do componente
21348
+ * (`p-options`), esta propriedade será responsável pelo valor de cada item da lista.
21349
+ *
21350
+ * Necessário quando informar o serviço como URL e o mesmo não estiver retornando uma lista de objetos no padrão da interface
21351
+ * `PoMultiSelectOption`.
21352
+ *
21353
+ * @default `value`
21354
+ */
21355
+ set: function (value) {
21356
+ this._fieldValue = value || PO_MULTISELECT_FIELD_VALUE_DEFAULT;
21357
+ if (isTypeof(this.filterService, 'string') && this.service) {
21358
+ this.service.fieldValue = this._fieldValue;
21359
+ }
21360
+ },
21361
+ enumerable: false,
21362
+ configurable: true
21363
+ });
21221
21364
  PoMultiselectBaseComponent.prototype.ngOnInit = function () {
21222
21365
  var _this = this;
21223
21366
  if (this.filterService) {
21224
- this.filterSubject
21225
- .pipe(operators.debounceTime(this.debounceTime), operators.distinctUntilChanged(), operators.tap(function () { return (_this.isServerSearching = true); }), operators.switchMap(function (search) { return _this.applyFilter(search); }), operators.tap(function () { return (_this.isServerSearching = false); }))
21226
- .subscribe();
21367
+ this.setService(this.filterService);
21227
21368
  }
21369
+ this.filterSubject
21370
+ .pipe(operators.debounceTime(this.debounceTime), operators.distinctUntilChanged(), operators.tap(function () { return (_this.isServerSearching = true); }), operators.switchMap(function (search) { return _this.applyFilter(search); }), operators.tap(function () { return (_this.isServerSearching = false); }))
21371
+ .subscribe();
21228
21372
  this.updateList(this.options);
21229
21373
  };
21374
+ PoMultiselectBaseComponent.prototype.setService = function (service) {
21375
+ if (isTypeof(service, 'object')) {
21376
+ this.service = service;
21377
+ }
21378
+ else {
21379
+ this.service = this.defaultService;
21380
+ this.service.configProperties(service, this.fieldLabel, this.fieldValue);
21381
+ }
21382
+ this.isFirstFilter = true;
21383
+ };
21230
21384
  PoMultiselectBaseComponent.prototype.validAndSortOptions = function () {
21231
21385
  if (this.options && this.options.length) {
21232
21386
  removeUndefinedAndNullOptions(this.options);
@@ -21279,6 +21433,9 @@
21279
21433
  });
21280
21434
  this.visibleOptionsDropdown = newOptions_1;
21281
21435
  }
21436
+ else {
21437
+ this.visibleOptionsDropdown = __spreadArray([], __read(options));
21438
+ }
21282
21439
  };
21283
21440
  PoMultiselectBaseComponent.prototype.compareMethod = function (search, option, filterMode) {
21284
21441
  switch (filterMode) {
@@ -21330,8 +21487,8 @@
21330
21487
  PoMultiselectBaseComponent.prototype.writeValue = function (values) {
21331
21488
  var _this = this;
21332
21489
  values = values || [];
21333
- if (this.filterService && values.length) {
21334
- this.getObjectsByValuesSubscription = this.filterService.getObjectsByValues(values).subscribe(function (options) {
21490
+ if (this.service && values.length) {
21491
+ this.getObjectsByValuesSubscription = this.service.getObjectsByValues(values).subscribe(function (options) {
21335
21492
  _this.updateSelectedOptions(options);
21336
21493
  _this.callOnChange(_this.selectedOptions);
21337
21494
  });
@@ -21379,6 +21536,7 @@
21379
21536
  placeholder: [{ type: i0.Input, args: ['p-placeholder',] }],
21380
21537
  placeholderSearch: [{ type: i0.Input, args: ['p-placeholder-search',] }],
21381
21538
  name: [{ type: i0.Input, args: ['name',] }],
21539
+ hideSelectAll: [{ type: i0.Input, args: ['p-hide-select-all',] }],
21382
21540
  change: [{ type: i0.Output, args: ['p-change',] }],
21383
21541
  filterService: [{ type: i0.Input, args: ['p-filter-service',] }],
21384
21542
  autoHeight: [{ type: i0.Input, args: ['p-auto-height',] }],
@@ -21389,19 +21547,81 @@
21389
21547
  hideSearch: [{ type: i0.Input, args: ['p-hide-search',] }],
21390
21548
  options: [{ type: i0.Input, args: ['p-options',] }],
21391
21549
  sort: [{ type: i0.Input, args: ['p-sort',] }],
21392
- filterMode: [{ type: i0.Input, args: ['p-filter-mode',] }]
21550
+ filterMode: [{ type: i0.Input, args: ['p-filter-mode',] }],
21551
+ fieldLabel: [{ type: i0.Input, args: ['p-field-label',] }],
21552
+ fieldValue: [{ type: i0.Input, args: ['p-field-value',] }]
21393
21553
  };
21394
21554
  __decorate([
21395
21555
  InputBoolean()
21396
21556
  ], PoMultiselectBaseComponent.prototype, "autoFocus", void 0);
21557
+ __decorate([
21558
+ InputBoolean()
21559
+ ], PoMultiselectBaseComponent.prototype, "hideSelectAll", void 0);
21397
21560
  __decorate([
21398
21561
  InputBoolean()
21399
21562
  ], PoMultiselectBaseComponent.prototype, "autoHeight", null);
21400
21563
 
21564
+ var PoMultiselectFilterService = /** @class */ (function () {
21565
+ function PoMultiselectFilterService(http) {
21566
+ this.http = http;
21567
+ this.fieldLabel = 'label';
21568
+ this.fieldValue = 'value';
21569
+ this.messages = [];
21570
+ }
21571
+ Object.defineProperty(PoMultiselectFilterService.prototype, "url", {
21572
+ get: function () {
21573
+ return this._url;
21574
+ },
21575
+ enumerable: false,
21576
+ configurable: true
21577
+ });
21578
+ PoMultiselectFilterService.prototype.getFilteredData = function (_a) {
21579
+ var _this = this;
21580
+ var value = _a.value;
21581
+ var params = value ? { filter: value } : {};
21582
+ return this.http
21583
+ .get(this.url, {
21584
+ params: params
21585
+ })
21586
+ .pipe(operators.map(function (response) { return _this.parseToArrayMultiselectOptions(response['items']); }));
21587
+ };
21588
+ PoMultiselectFilterService.prototype.getObjectsByValues = function (value) {
21589
+ var _this = this;
21590
+ return this.http
21591
+ .get(this.url + "?" + this.fieldValue + "=" + value.toString())
21592
+ .pipe(operators.map(function (response) { return _this.parseToArrayMultiselectOptions(response['items']); }));
21593
+ };
21594
+ PoMultiselectFilterService.prototype.configProperties = function (url, fieldLabel, fieldValue) {
21595
+ this._url = url;
21596
+ this.fieldLabel = fieldLabel;
21597
+ this.fieldValue = fieldValue;
21598
+ };
21599
+ PoMultiselectFilterService.prototype.parseToArrayMultiselectOptions = function (items) {
21600
+ var _this = this;
21601
+ if (items && items.length > 0) {
21602
+ return items.map(function (item) { return _this.parseToMultiselectOption(item); });
21603
+ }
21604
+ return [];
21605
+ };
21606
+ PoMultiselectFilterService.prototype.parseToMultiselectOption = function (item) {
21607
+ var label = item[this.fieldLabel];
21608
+ var value = item[this.fieldValue];
21609
+ return { label: label, value: value };
21610
+ };
21611
+ return PoMultiselectFilterService;
21612
+ }());
21613
+ PoMultiselectFilterService.decorators = [
21614
+ { type: i0.Injectable }
21615
+ ];
21616
+ PoMultiselectFilterService.ctorParameters = function () { return [
21617
+ { type: i1.HttpClient }
21618
+ ]; };
21619
+
21401
21620
  var poMultiselectContainerOffset = 8;
21402
21621
  var poMultiselectContainerPositionDefault = 'bottom';
21403
21622
  /* istanbul ignore next */
21404
21623
  var providers$1 = [
21624
+ PoMultiselectFilterService,
21405
21625
  PoControlPositionService,
21406
21626
  {
21407
21627
  provide: forms.NG_VALUE_ACCESSOR,
@@ -21449,12 +21669,13 @@
21449
21669
  */
21450
21670
  var PoMultiselectComponent = /** @class */ (function (_super) {
21451
21671
  __extends(PoMultiselectComponent, _super);
21452
- function PoMultiselectComponent(renderer, changeDetector, el, controlPosition, languageService) {
21672
+ function PoMultiselectComponent(renderer, changeDetector, el, controlPosition, defaultService, languageService) {
21453
21673
  var _this = _super.call(this, languageService) || this;
21454
21674
  _this.renderer = renderer;
21455
21675
  _this.changeDetector = changeDetector;
21456
21676
  _this.el = el;
21457
21677
  _this.controlPosition = controlPosition;
21678
+ _this.defaultService = defaultService;
21458
21679
  _this.disclaimerOffset = 0;
21459
21680
  _this.dropdownIcon = 'po-icon-arrow-down';
21460
21681
  _this.dropdownOpen = false;
@@ -21472,6 +21693,11 @@
21472
21693
  }
21473
21694
  this.initialized = true;
21474
21695
  };
21696
+ PoMultiselectComponent.prototype.ngOnChanges = function (changes) {
21697
+ if (changes.filterService || changes.fieldValue || changes.fieldLabel) {
21698
+ this.setService(this.filterService);
21699
+ }
21700
+ };
21475
21701
  PoMultiselectComponent.prototype.ngDoCheck = function () {
21476
21702
  var inputWidth = this.inputElement.nativeElement.offsetWidth;
21477
21703
  // Permite que os disclaimers sejam calculados na primeira vez que o componente torna-se visível,
@@ -21654,7 +21880,7 @@
21654
21880
  var _this = this;
21655
21881
  if (value === void 0) { value = ''; }
21656
21882
  var param = { property: 'label', value: value };
21657
- return this.filterService.getFilteredData(param).pipe(operators.catchError(function (err) {
21883
+ return this.service.getFilteredData(param).pipe(operators.catchError(function (err) {
21658
21884
  _this.isServerSearching = false;
21659
21885
  return rxjs.of([]);
21660
21886
  }), operators.tap(function (options) {
@@ -21664,7 +21890,10 @@
21664
21890
  PoMultiselectComponent.prototype.applyFilterInFirstClick = function () {
21665
21891
  if (this.isFirstFilter) {
21666
21892
  this.isServerSearching = true;
21667
- this.filterSubject.next();
21893
+ // necessario enviar um objeto string vazia para refazer a busca, quando alterar filterService, fieldValue e fieldLabel
21894
+ // pois temos o distinctUntilChange no pipe do filterSubject
21895
+ /* eslint-disable no-new-wrappers */
21896
+ this.filterSubject.next(new String());
21668
21897
  }
21669
21898
  else {
21670
21899
  this.options = __spreadArray([], __read(this.cacheOptions));
@@ -21727,7 +21956,7 @@
21727
21956
  PoMultiselectComponent.decorators = [
21728
21957
  { type: i0.Component, args: [{
21729
21958
  selector: 'po-multiselect',
21730
- template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\" [class.po-multiselect-show]=\"dropdownOpen\">\n <div\n #inputElement\n [tabindex]=\"disabled ? -1 : 0\"\n class=\"po-input po-input-icon-right po-multiselect-input po-clickable\"\n [class.po-multiselect-input-auto]=\"autoHeight\"\n [class.po-multiselect-input-static]=\"!autoHeight\"\n [class.po-multiselect-input-disabled]=\"disabled\"\n (keyup.enter)=\"toggleDropdownVisibility()\"\n (keydown)=\"onKeyDown($event)\"\n (click)=\"toggleDropdownVisibility()\"\n (blur)=\"onBlur()\"\n >\n <span *ngIf=\"placeholder && !visibleDisclaimers?.length\" class=\"po-multiselect-input-placeholder\">\n {{ placeholder }}\n </span>\n\n <po-disclaimer\n *ngFor=\"let disclaimer of visibleDisclaimers\"\n class=\"po-multiselect-input-disclaimer\"\n [p-label]=\"disclaimer.label\"\n [p-value]=\"disclaimer.value\"\n [p-hide-close]=\"disclaimer.value === '' || disabled\"\n [class.po-clickable]=\"disclaimer.value === '' && !disabled\"\n (click)=\"openDropdown(disclaimer.value === '')\"\n (p-close-action)=\"closeDisclaimer(disclaimer.value)\"\n >\n </po-disclaimer>\n\n <div class=\"po-field-icon-container-right\">\n <span\n #iconElement\n class=\"po-icon po-field-icon {{ dropdownIcon }}\"\n [ngClass]=\"disabled ? 'po-field-icon-disabled' : ''\"\n >\n </span>\n </div>\n </div>\n </div>\n\n <po-multiselect-dropdown\n #dropdownElement\n [p-searching]=\"isServerSearching\"\n [p-hide-search]=\"hideSearch\"\n [p-literals]=\"literals\"\n [p-options]=\"options\"\n [p-visible-options]=\"visibleOptionsDropdown\"\n [p-selected-options]=\"selectedOptions\"\n [p-placeholder-search]=\"placeholderSearch\"\n (p-change)=\"changeItems($event)\"\n (p-change-search)=\"changeSearch($event)\"\n (p-close-dropdown)=\"controlDropdownVisibility(false)\"\n >\n </po-multiselect-dropdown>\n\n <po-field-container-bottom></po-field-container-bottom>\n</po-field-container>\n",
21959
+ template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\" [class.po-multiselect-show]=\"dropdownOpen\">\n <div\n #inputElement\n [tabindex]=\"disabled ? -1 : 0\"\n class=\"po-input po-input-icon-right po-multiselect-input po-clickable\"\n [class.po-multiselect-input-auto]=\"autoHeight\"\n [class.po-multiselect-input-static]=\"!autoHeight\"\n [class.po-multiselect-input-disabled]=\"disabled\"\n (keyup.enter)=\"toggleDropdownVisibility()\"\n (keydown)=\"onKeyDown($event)\"\n (click)=\"toggleDropdownVisibility()\"\n (blur)=\"onBlur()\"\n >\n <span *ngIf=\"placeholder && !visibleDisclaimers?.length\" class=\"po-multiselect-input-placeholder\">\n {{ placeholder }}\n </span>\n\n <po-disclaimer\n *ngFor=\"let disclaimer of visibleDisclaimers\"\n class=\"po-multiselect-input-disclaimer\"\n [p-label]=\"disclaimer.label\"\n [p-value]=\"disclaimer.value\"\n [p-hide-close]=\"disclaimer.value === '' || disabled\"\n [class.po-clickable]=\"disclaimer.value === '' && !disabled\"\n (click)=\"openDropdown(disclaimer.value === '')\"\n (p-close-action)=\"closeDisclaimer(disclaimer.value)\"\n >\n </po-disclaimer>\n\n <div class=\"po-field-icon-container-right\">\n <span\n #iconElement\n class=\"po-icon po-field-icon {{ dropdownIcon }}\"\n [ngClass]=\"disabled ? 'po-field-icon-disabled' : ''\"\n >\n </span>\n </div>\n </div>\n </div>\n\n <po-multiselect-dropdown\n #dropdownElement\n [p-searching]=\"isServerSearching\"\n [p-hide-search]=\"hideSearch\"\n [p-hide-select-all]=\"hideSelectAll\"\n [p-literals]=\"literals\"\n [p-options]=\"options\"\n [p-visible-options]=\"visibleOptionsDropdown\"\n [p-selected-options]=\"selectedOptions\"\n [p-placeholder-search]=\"placeholderSearch\"\n (p-change)=\"changeItems($event)\"\n (p-change-search)=\"changeSearch($event)\"\n (p-close-dropdown)=\"controlDropdownVisibility(false)\"\n >\n </po-multiselect-dropdown>\n\n <po-field-container-bottom></po-field-container-bottom>\n</po-field-container>\n",
21731
21960
  providers: providers$1
21732
21961
  },] }
21733
21962
  ];
@@ -21736,6 +21965,7 @@
21736
21965
  { type: i0.ChangeDetectorRef },
21737
21966
  { type: i0.ElementRef },
21738
21967
  { type: PoControlPositionService },
21968
+ { type: PoMultiselectFilterService },
21739
21969
  { type: PoLanguageService }
21740
21970
  ]; };
21741
21971
  PoMultiselectComponent.propDecorators = {
@@ -21754,7 +21984,7 @@
21754
21984
  */
21755
21985
  var PoMultiselectItemComponent = /** @class */ (function () {
21756
21986
  function PoMultiselectItemComponent() {
21757
- /** Esta propriedade indica se o campo está selecionado ou não. */
21987
+ /** Esta propriedade indica se o campo está selecionado, indenterminate ou não. */
21758
21988
  this.selected = false;
21759
21989
  /** Evento que será disparado toda vez que o usuário marcar ou desmarcar um item. */
21760
21990
  this.change = new i0.EventEmitter();
@@ -21768,7 +21998,7 @@
21768
21998
  PoMultiselectItemComponent.decorators = [
21769
21999
  { type: i0.Component, args: [{
21770
22000
  selector: 'po-multiselect-item',
21771
- template: "<li [class.po-multiselect-item-selected]=\"selected\" (click)=\"itemClicked()\">\n <a class=\"po-multiselect-item\">\n <input\n [checked]=\"selected\"\n class=\"po-multiselect-checkbox-input\"\n [class.po-multiselect-checkbox-input-checked]=\"selected\"\n type=\"checkbox\"\n />\n\n <label class=\"po-multiselect-checkbox-label po-clickable\">\n {{ label }}\n </label>\n </a>\n</li>\n",
22001
+ template: "<li [class.po-multiselect-item-selected]=\"selected\" (click)=\"itemClicked()\">\n <a class=\"po-multiselect-item\">\n <input\n [checked]=\"selected\"\n class=\"po-multiselect-checkbox-input\"\n [class.po-multiselect-checkbox-input-indeterminate]=\"selected === null\"\n [class.po-multiselect-checkbox-input-checked]=\"selected\"\n type=\"checkbox\"\n />\n\n <label class=\"po-multiselect-checkbox-label po-clickable\">\n {{ label }}\n </label>\n </a>\n</li>\n",
21772
22002
  changeDetection: i0.ChangeDetectionStrategy.OnPush
21773
22003
  },] }
21774
22004
  ];
@@ -21811,6 +22041,13 @@
21811
22041
  enumerable: false,
21812
22042
  configurable: true
21813
22043
  });
22044
+ Object.defineProperty(PoMultiselectSearchComponent.prototype, "inputValue", {
22045
+ get: function () {
22046
+ return this.inputElement.nativeElement.value;
22047
+ },
22048
+ enumerable: false,
22049
+ configurable: true
22050
+ });
21814
22051
  PoMultiselectSearchComponent.prototype.onChange = function (event) {
21815
22052
  this.change.emit({ event: event, value: this.inputElement.nativeElement.value });
21816
22053
  };
@@ -23039,8 +23276,8 @@
23039
23276
  var PoInputComponent = /** @class */ (function (_super) {
23040
23277
  __extends(PoInputComponent, _super);
23041
23278
  /* istanbul ignore next */
23042
- function PoInputComponent(el) {
23043
- return _super.call(this, el) || this;
23279
+ function PoInputComponent(el, cd) {
23280
+ return _super.call(this, el, cd) || this;
23044
23281
  }
23045
23282
  PoInputComponent.prototype.extraValidation = function (c) {
23046
23283
  return null;
@@ -23062,11 +23299,13 @@
23062
23299
  useExisting: i0.forwardRef(function () { return PoInputComponent; }),
23063
23300
  multi: true
23064
23301
  }
23065
- ]
23302
+ ],
23303
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
23066
23304
  },] }
23067
23305
  ];
23068
23306
  PoInputComponent.ctorParameters = function () { return [
23069
- { type: i0.ElementRef }
23307
+ { type: i0.ElementRef },
23308
+ { type: i0.ChangeDetectorRef }
23070
23309
  ]; };
23071
23310
 
23072
23311
  var PoNumberBaseComponent = /** @class */ (function (_super) {
@@ -27722,16 +27961,17 @@
27722
27961
  };
27723
27962
  PoDynamicFormFieldsComponent.prototype.onChangeField = function (visibleField, objectValue) {
27724
27963
  return __awaiter(this, void 0, void 0, function () {
27725
- var property, isChangedValueField, _b, changedField, changedFieldIndex;
27964
+ var property, isBooleanType, isChangedValueField, _b, changedField, changedFieldIndex;
27726
27965
  return __generator(this, function (_c) {
27727
27966
  switch (_c.label) {
27728
27967
  case 0:
27729
27968
  property = visibleField.property;
27969
+ isBooleanType = visibleField.type === 'boolean';
27730
27970
  isChangedValueField = this.previousValue[property] !== this.value[property];
27731
27971
  if (visibleField.optionsService) {
27732
27972
  this.objectValue.emit(objectValue);
27733
27973
  }
27734
- if (!(this.form.touched && isChangedValueField)) return [3 /*break*/, 3];
27974
+ if (!((this.form.touched || isBooleanType) && isChangedValueField)) return [3 /*break*/, 3];
27735
27975
  _b = this.getField(property), changedField = _b.changedField, changedFieldIndex = _b.changedFieldIndex;
27736
27976
  if (!changedField.validate) return [3 /*break*/, 2];
27737
27977
  return [4 /*yield*/, this.validateField(changedField, changedFieldIndex, visibleField)];
@@ -36961,7 +37201,11 @@
36961
37201
  this.closed.emit();
36962
37202
  };
36963
37203
  PoHttpInterceptorDetailComponent.prototype.formatDetailItemTitle = function (detail) {
36964
- return detail.code ? detail.code + " - " + detail.message : detail.message;
37204
+ return detail.detailTitle
37205
+ ? detail.detailTitle
37206
+ : detail.code
37207
+ ? detail.code + " - " + detail.message
37208
+ : detail.message;
36965
37209
  };
36966
37210
  PoHttpInterceptorDetailComponent.prototype.open = function () {
36967
37211
  this.modal.open();
@@ -36976,22 +37220,28 @@
36976
37220
  return detail.message ? newDetails.concat(this.getValidDetailProperties(detail)) : newDetails;
36977
37221
  };
36978
37222
  PoHttpInterceptorDetailComponent.prototype.getValidDetailProperties = function (_a) {
36979
- var code = _a.code, message = _a.message, detailedMessage = _a.detailedMessage, type = _a.type;
36980
- return { code: code, message: message, detailedMessage: detailedMessage, type: type };
37223
+ var code = _a.code, message = _a.message, detailedMessage = _a.detailedMessage, type = _a.type, detailTitle = _a.detailTitle;
37224
+ return detailTitle
37225
+ ? { code: code, message: message, detailedMessage: detailedMessage, type: type, detailTitle: detailTitle }
37226
+ : { code: code, message: message, detailedMessage: detailedMessage, type: type };
36981
37227
  };
36982
37228
  PoHttpInterceptorDetailComponent.prototype.filterByValidDetails = function (details) {
36983
37229
  var _this = this;
36984
37230
  return details.reduce(function (newDetails, detail) { return _this.addValidDetail(newDetails, detail); }, []);
36985
37231
  };
36986
37232
  PoHttpInterceptorDetailComponent.prototype.formatTitle = function (details) {
36987
- return details.length > 1 ? this.literals.details + " (" + details.length + ")" : this.literals.detail;
37233
+ return details.length > 1
37234
+ ? this.literals.details + " (" + details.length + ")"
37235
+ : details.length === 1
37236
+ ? this.formatDetailItemTitle(details[0])
37237
+ : this.literals.detail;
36988
37238
  };
36989
37239
  return PoHttpInterceptorDetailComponent;
36990
37240
  }());
36991
37241
  PoHttpInterceptorDetailComponent.decorators = [
36992
37242
  { type: i0.Component, args: [{
36993
37243
  selector: 'po-http-interceptor-detail',
36994
- template: "<po-modal p-hide-close p-size=\"lg\" [p-primary-action]=\"primaryAction\" [p-title]=\"title\">\n <div class=\"po-row\">\n <po-accordion class=\"po-md-12 po-mt-1 po-mb-1\">\n <po-accordion-item *ngFor=\"let detail of details\" [p-label]=\"formatDetailItemTitle(detail)\">\n <div *ngIf=\"detail.type\" class=\"po-row po-mb-1\">\n <po-tag [p-color]=\"typeColor(detail.type)\" [p-value]=\"typeValue(detail.type)\"></po-tag>\n </div>\n\n <div class=\"po-row\">\n <p>{{ detail.detailedMessage }}</p>\n </div>\n </po-accordion-item>\n </po-accordion>\n </div>\n</po-modal>\n"
37244
+ template: "<po-modal p-hide-close p-size=\"lg\" [p-primary-action]=\"primaryAction\" [p-title]=\"title\">\n <div class=\"po-row\">\n <po-accordion class=\"po-md-12 po-mt-1 po-mb-1\" *ngIf=\"details.length > 1; else elseBlock\">\n <po-accordion-item *ngFor=\"let detail of details\" [p-label]=\"formatDetailItemTitle(detail)\">\n <ng-template [ngTemplateOutlet]=\"body\" [ngTemplateOutletContext]=\"{detail}\"></ng-template>\n </po-accordion-item>\n </po-accordion>\n </div>\n</po-modal>\n\n<ng-template #elseBlock>\n <ng-container [ngTemplateOutlet]=\"body\" [ngTemplateOutletContext]=\"{ detail: details[0] || {} }\"></ng-container>\n</ng-template>\n\n<ng-template #body let-detail=\"detail\">\n <div *ngIf=\"detail.type\" class=\"po-row po-mb-1\">\n <po-tag [p-color]=\"typeColor(detail.type)\" [p-value]=\"typeValue(detail.type)\"></po-tag>\n </div>\n\n <p *ngIf=\"detail.detailTitle\">\n <strong>{{ detail.code }}</strong>\n </p>\n\n <div class=\"po-row\">\n <p>{{ detail.detailedMessage }}</p>\n </div>\n</ng-template>\n"
36995
37245
  },] }
36996
37246
  ];
36997
37247
  PoHttpInterceptorDetailComponent.ctorParameters = function () { return [
@@ -37128,6 +37378,7 @@
37128
37378
  * - Caso for informado, será exibido uma ação de "Ajuda" na notificação, para isso não deverá ter a propriedade `detailedMessage`.
37129
37379
  * - `type`: É possível informar `error`, `warning` e `information`, sendo `error` o valor padrão.
37130
37380
  * - `details`: Uma lista de objetos de mensagem (recursiva) com mais detalhes sobre a mensagem principal.
37381
+ * - `detailTitle`: caso for informado, será apresentado como título dos detalhes substituindo o padrão `code - message`
37131
37382
  *
37132
37383
  * > Veja o [Guia de implementação de APIs](guides/api) para mais detalhes sobre a estrutura das mensagens.
37133
37384
  *
@@ -37441,15 +37692,9 @@
37441
37692
  request = this.requestCloneWithoutHeaderParam([noCountPendingRequests, screenLock], request);
37442
37693
  this.setCountPendingRequests(true, requestClone);
37443
37694
  this.setCountOverlayRequests(true, requestClone);
37444
- return next.handle(request).pipe(operators.tap(function (response) {
37445
- if (response instanceof i1.HttpResponse) {
37446
- _this.setCountPendingRequests(false, requestClone);
37447
- _this.setCountOverlayRequests(false, requestClone);
37448
- }
37449
- }), operators.catchError(function (error) {
37695
+ return next.handle(request).pipe(operators.finalize(function () {
37450
37696
  _this.setCountPendingRequests(false, requestClone);
37451
37697
  _this.setCountOverlayRequests(false, requestClone);
37452
- return rxjs.throwError(error);
37453
37698
  }));
37454
37699
  };
37455
37700
  PoHttpRequestInterceptorService.prototype.getCountPendingRequests = function () {
@@ -38515,112 +38760,113 @@
38515
38760
  exports.ɵdr = PoLookupModalService;
38516
38761
  exports.ɵds = PoLookupModalBaseComponent;
38517
38762
  exports.ɵdt = PoMultiselectBaseComponent;
38518
- exports.ɵdu = PoNumberBaseComponent;
38519
- exports.ɵdv = PoRadioGroupBaseComponent;
38520
- exports.ɵdw = PoRichTextBaseComponent;
38521
- exports.ɵdx = PoRichTextService;
38522
- exports.ɵdy = PoRichTextBodyComponent;
38523
- exports.ɵdz = PoSelectBaseComponent;
38763
+ exports.ɵdu = PoMultiselectFilterService;
38764
+ exports.ɵdv = PoNumberBaseComponent;
38765
+ exports.ɵdw = PoRadioGroupBaseComponent;
38766
+ exports.ɵdx = PoRichTextBaseComponent;
38767
+ exports.ɵdy = PoRichTextService;
38768
+ exports.ɵdz = PoRichTextBodyComponent;
38524
38769
  exports.ɵe = PoAvatarBaseComponent;
38525
- exports.ɵea = PoSwitchBaseComponent;
38526
- exports.ɵeb = PoTextareaBaseComponent;
38527
- exports.ɵec = PoUploadBaseComponent;
38528
- exports.ɵed = PoUploadService;
38529
- exports.ɵee = PoUploadBaseService;
38530
- exports.ɵef = PoUploadDragDropComponent;
38531
- exports.ɵeg = PoUploadDragDropAreaComponent;
38532
- exports.ɵeh = PoNotificationBaseService;
38533
- exports.ɵei = PoMultiselectDropdownComponent;
38534
- exports.ɵej = PoMultiselectItemComponent;
38535
- exports.ɵek = PoMultiselectSearchComponent;
38536
- exports.ɵel = PoRichTextImageModalComponent;
38537
- exports.ɵem = PoRichTextLinkModalComponent;
38538
- exports.ɵen = PoRichTextToolbarComponent;
38539
- exports.ɵeo = PoUploadDragDropDirective;
38540
- exports.ɵep = PoUploadDragDropAreaOverlayComponent;
38541
- exports.ɵeq = PoUploadFileRestrictionsComponent;
38542
- exports.ɵer = PoTagBaseComponent;
38543
- exports.ɵes = PoDynamicFormBaseComponent;
38544
- exports.ɵet = PoDynamicFormLoadService;
38545
- exports.ɵeu = PoDynamicFormOperation;
38546
- exports.ɵev = PoDynamicFormValidationService;
38547
- exports.ɵew = PoDynamicFormFieldsComponent;
38548
- exports.ɵex = PoDynamicFormFieldsBaseComponent;
38549
- exports.ɵey = PoDynamicViewBaseComponent;
38550
- exports.ɵez = PoDynamicViewService;
38770
+ exports.ɵea = PoSelectBaseComponent;
38771
+ exports.ɵeb = PoSwitchBaseComponent;
38772
+ exports.ɵec = PoTextareaBaseComponent;
38773
+ exports.ɵed = PoUploadBaseComponent;
38774
+ exports.ɵee = PoUploadService;
38775
+ exports.ɵef = PoUploadBaseService;
38776
+ exports.ɵeg = PoUploadDragDropComponent;
38777
+ exports.ɵeh = PoUploadDragDropAreaComponent;
38778
+ exports.ɵei = PoNotificationBaseService;
38779
+ exports.ɵej = PoMultiselectDropdownComponent;
38780
+ exports.ɵek = PoMultiselectItemComponent;
38781
+ exports.ɵel = PoMultiselectSearchComponent;
38782
+ exports.ɵem = PoRichTextImageModalComponent;
38783
+ exports.ɵen = PoRichTextLinkModalComponent;
38784
+ exports.ɵeo = PoRichTextToolbarComponent;
38785
+ exports.ɵep = PoUploadDragDropDirective;
38786
+ exports.ɵeq = PoUploadDragDropAreaOverlayComponent;
38787
+ exports.ɵer = PoUploadFileRestrictionsComponent;
38788
+ exports.ɵes = PoTagBaseComponent;
38789
+ exports.ɵet = PoDynamicFormBaseComponent;
38790
+ exports.ɵeu = PoDynamicFormLoadService;
38791
+ exports.ɵev = PoDynamicFormOperation;
38792
+ exports.ɵew = PoDynamicFormValidationService;
38793
+ exports.ɵex = PoDynamicFormFieldsComponent;
38794
+ exports.ɵey = PoDynamicFormFieldsBaseComponent;
38795
+ exports.ɵez = PoDynamicViewBaseComponent;
38551
38796
  exports.ɵf = PoBreadcrumbBaseComponent;
38552
- exports.ɵfa = PoGaugeBaseComponent;
38553
- exports.ɵfb = PoGaugeTitleComponent;
38554
- exports.ɵfc = PoGaugeLegendComponent;
38555
- exports.ɵfd = PoGaugeSvgComponent;
38556
- exports.ɵfe = PoGaugePathComponent;
38557
- exports.ɵff = PoGaugeDescriptionComponent;
38558
- exports.ɵfg = PoGaugePointerComponent;
38559
- exports.ɵfh = PoGridCellActionComponent;
38560
- exports.ɵfi = PoGridCellComponent;
38561
- exports.ɵfj = PoGridHeadComponent;
38562
- exports.ɵfk = PoListViewBaseComponent;
38563
- exports.ɵfl = PoBadgeModule;
38564
- exports.ɵfm = PoBadgeComponent;
38565
- exports.ɵfn = PoBadgeBaseComponent;
38566
- exports.ɵfo = PoMenuBaseComponent;
38567
- exports.ɵfp = PoMenuService;
38568
- exports.ɵfq = PoMenuItemsService;
38569
- exports.ɵfr = PoMenuFilterComponent;
38570
- exports.ɵfs = PoMenuItemComponent;
38571
- exports.ɵft = PoMenuPanelBaseComponent;
38572
- exports.ɵfu = PoMenuPanelItemsService;
38573
- exports.ɵfv = PoMenuPanelItemComponent;
38574
- exports.ɵfw = PoNavbarActionsModule;
38575
- exports.ɵfx = PoNavbarActionComponent;
38576
- exports.ɵfy = PoNavbarActionPopupComponent;
38577
- exports.ɵfz = PoNavbarActionsComponent;
38797
+ exports.ɵfa = PoDynamicViewService;
38798
+ exports.ɵfb = PoGaugeBaseComponent;
38799
+ exports.ɵfc = PoGaugeTitleComponent;
38800
+ exports.ɵfd = PoGaugeLegendComponent;
38801
+ exports.ɵfe = PoGaugeSvgComponent;
38802
+ exports.ɵff = PoGaugePathComponent;
38803
+ exports.ɵfg = PoGaugeDescriptionComponent;
38804
+ exports.ɵfh = PoGaugePointerComponent;
38805
+ exports.ɵfi = PoGridCellActionComponent;
38806
+ exports.ɵfj = PoGridCellComponent;
38807
+ exports.ɵfk = PoGridHeadComponent;
38808
+ exports.ɵfl = PoListViewBaseComponent;
38809
+ exports.ɵfm = PoBadgeModule;
38810
+ exports.ɵfn = PoBadgeComponent;
38811
+ exports.ɵfo = PoBadgeBaseComponent;
38812
+ exports.ɵfp = PoMenuBaseComponent;
38813
+ exports.ɵfq = PoMenuService;
38814
+ exports.ɵfr = PoMenuItemsService;
38815
+ exports.ɵfs = PoMenuFilterComponent;
38816
+ exports.ɵft = PoMenuItemComponent;
38817
+ exports.ɵfu = PoMenuPanelBaseComponent;
38818
+ exports.ɵfv = PoMenuPanelItemsService;
38819
+ exports.ɵfw = PoMenuPanelItemComponent;
38820
+ exports.ɵfx = PoNavbarActionsModule;
38821
+ exports.ɵfy = PoNavbarActionComponent;
38822
+ exports.ɵfz = PoNavbarActionPopupComponent;
38578
38823
  exports.ɵg = PoBreadcrumbDropdownComponent;
38579
- exports.ɵga = PoNavbarItemsModule;
38580
- exports.ɵgb = PoNavbarItemComponent;
38581
- exports.ɵgc = PoNavbarItemsComponent;
38582
- exports.ɵgd = PoNavbarItemNavigationModule;
38583
- exports.ɵge = PoNavbarItemNavigationComponent;
38584
- exports.ɵgf = PoNavbarItemNavigationIconComponent;
38585
- exports.ɵgg = PoNavbarBaseComponent;
38586
- exports.ɵgh = PoNavbarLogoComponent;
38587
- exports.ɵgi = PoPageComponent;
38588
- exports.ɵgj = PoPageBaseComponent;
38589
- exports.ɵgk = PoPageContentComponent;
38590
- exports.ɵgl = PoPageContentBaseComponent;
38591
- exports.ɵgm = PoPageDefaultBaseComponent;
38592
- exports.ɵgn = PoPageDetailBaseComponent;
38593
- exports.ɵgo = PoPageEditBaseComponent;
38594
- exports.ɵgp = PoPageHeaderComponent;
38595
- exports.ɵgq = PoPageHeaderBaseComponent;
38596
- exports.ɵgr = PoPageListBaseComponent;
38597
- exports.ɵgs = PoPageSlideBaseComponent;
38598
- exports.ɵgt = PoSlideCirclesComponent;
38599
- exports.ɵgu = PoSlideBaseComponent;
38600
- exports.ɵgv = PoSlideItemComponent;
38601
- exports.ɵgw = PoSlideControlComponent;
38602
- exports.ɵgx = PoStepperCircleComponent;
38603
- exports.ɵgy = PoStepperBaseComponent;
38604
- exports.ɵgz = PoStepperLabelComponent;
38824
+ exports.ɵga = PoNavbarActionsComponent;
38825
+ exports.ɵgb = PoNavbarItemsModule;
38826
+ exports.ɵgc = PoNavbarItemComponent;
38827
+ exports.ɵgd = PoNavbarItemsComponent;
38828
+ exports.ɵge = PoNavbarItemNavigationModule;
38829
+ exports.ɵgf = PoNavbarItemNavigationComponent;
38830
+ exports.ɵgg = PoNavbarItemNavigationIconComponent;
38831
+ exports.ɵgh = PoNavbarBaseComponent;
38832
+ exports.ɵgi = PoNavbarLogoComponent;
38833
+ exports.ɵgj = PoPageComponent;
38834
+ exports.ɵgk = PoPageBaseComponent;
38835
+ exports.ɵgl = PoPageContentComponent;
38836
+ exports.ɵgm = PoPageContentBaseComponent;
38837
+ exports.ɵgn = PoPageDefaultBaseComponent;
38838
+ exports.ɵgo = PoPageDetailBaseComponent;
38839
+ exports.ɵgp = PoPageEditBaseComponent;
38840
+ exports.ɵgq = PoPageHeaderComponent;
38841
+ exports.ɵgr = PoPageHeaderBaseComponent;
38842
+ exports.ɵgs = PoPageListBaseComponent;
38843
+ exports.ɵgt = PoPageSlideBaseComponent;
38844
+ exports.ɵgu = PoSlideCirclesComponent;
38845
+ exports.ɵgv = PoSlideBaseComponent;
38846
+ exports.ɵgw = PoSlideItemComponent;
38847
+ exports.ɵgx = PoSlideControlComponent;
38848
+ exports.ɵgy = PoStepperCircleComponent;
38849
+ exports.ɵgz = PoStepperBaseComponent;
38605
38850
  exports.ɵh = PoBreadcrumbFavoriteComponent;
38606
- exports.ɵha = PoStepperStepComponent;
38607
- exports.ɵhb = PoTabButtonComponent;
38608
- exports.ɵhc = PoTabBaseComponent;
38609
- exports.ɵhd = PoTabDropdownComponent;
38610
- exports.ɵhe = PoTabsBaseComponent;
38611
- exports.ɵhf = PoToolbarActionsComponent;
38612
- exports.ɵhg = PoToolbarBaseComponent;
38613
- exports.ɵhh = PoToolbarNotificationComponent;
38614
- exports.ɵhi = PoToolbarProfileComponent;
38615
- exports.ɵhj = PoTreeViewBaseComponent;
38616
- exports.ɵhk = PoTreeViewService;
38617
- exports.ɵhl = PoTreeViewItemComponent;
38618
- exports.ɵhm = PoTreeViewItemHeaderComponent;
38619
- exports.ɵhn = PoWidgetBaseComponent;
38620
- exports.ɵho = PoHttpInterceptorDetailComponent;
38621
- exports.ɵhp = PoHttpInterceptorBaseService;
38622
- exports.ɵhq = PoHttpRequesControltService;
38623
- exports.ɵhr = PoI18nBaseService;
38851
+ exports.ɵha = PoStepperLabelComponent;
38852
+ exports.ɵhb = PoStepperStepComponent;
38853
+ exports.ɵhc = PoTabButtonComponent;
38854
+ exports.ɵhd = PoTabBaseComponent;
38855
+ exports.ɵhe = PoTabDropdownComponent;
38856
+ exports.ɵhf = PoTabsBaseComponent;
38857
+ exports.ɵhg = PoToolbarActionsComponent;
38858
+ exports.ɵhh = PoToolbarBaseComponent;
38859
+ exports.ɵhi = PoToolbarNotificationComponent;
38860
+ exports.ɵhj = PoToolbarProfileComponent;
38861
+ exports.ɵhk = PoTreeViewBaseComponent;
38862
+ exports.ɵhl = PoTreeViewService;
38863
+ exports.ɵhm = PoTreeViewItemComponent;
38864
+ exports.ɵhn = PoTreeViewItemHeaderComponent;
38865
+ exports.ɵho = PoWidgetBaseComponent;
38866
+ exports.ɵhp = PoHttpInterceptorDetailComponent;
38867
+ exports.ɵhq = PoHttpInterceptorBaseService;
38868
+ exports.ɵhr = PoHttpRequesControltService;
38869
+ exports.ɵhs = PoI18nBaseService;
38624
38870
  exports.ɵi = PoBreadcrumbFavoriteService;
38625
38871
  exports.ɵj = PoBreadcrumbItemComponent;
38626
38872
  exports.ɵk = PoLoadingBaseComponent;