@po-ui/ng-components 5.14.0 → 5.18.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 (69) hide show
  1. package/bundles/po-ui-ng-components.umd.js +1017 -561
  2. package/bundles/po-ui-ng-components.umd.js.map +1 -1
  3. package/esm2015/lib/components/po-avatar/po-avatar-base.component.js +16 -1
  4. package/esm2015/lib/components/po-avatar/po-avatar.component.js +2 -2
  5. package/esm2015/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-field.interface.js +1 -1
  6. package/esm2015/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields-base.component.js +2 -2
  7. package/esm2015/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields.component.js +2 -2
  8. package/esm2015/lib/components/po-field/po-datepicker/po-datepicker.component.js +2 -1
  9. package/esm2015/lib/components/po-field/po-datepicker-range/interfaces/po-datepicker-range-literals.interface.js +1 -1
  10. package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.js +103 -6
  11. package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.js +8 -3
  12. package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range.literals.js +13 -5
  13. package/esm2015/lib/components/po-field/po-email/po-email.component.js +7 -5
  14. package/esm2015/lib/components/po-field/po-field.model.js +75 -0
  15. package/esm2015/lib/components/po-field/po-login/po-login.component.js +7 -5
  16. package/esm2015/lib/components/po-field/po-lookup/interfaces/po-lookup-filter.interface.js +1 -1
  17. package/esm2015/lib/components/po-field/po-lookup/po-lookup-base.component.js +89 -26
  18. package/esm2015/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal-base.component.js +40 -10
  19. package/esm2015/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal.component.js +45 -7
  20. package/esm2015/lib/components/po-field/po-lookup/po-lookup.component.js +136 -13
  21. package/esm2015/lib/components/po-field/po-lookup/services/po-lookup-filter.service.js +19 -4
  22. package/esm2015/lib/components/po-field/po-lookup/services/po-lookup-modal.service.js +9 -2
  23. package/esm2015/lib/components/po-field/po-password/po-password.component.js +7 -5
  24. package/esm2015/lib/components/po-field/po-switch/po-switch.component.js +85 -9
  25. package/esm2015/lib/components/po-field/po-url/po-url.component.js +7 -5
  26. package/esm2015/lib/components/po-page/po-page-header/po-page-header.component.js +2 -2
  27. package/esm2015/lib/components/po-stepper/po-stepper-circle/po-stepper-circle.component.js +2 -2
  28. package/esm2015/lib/components/po-stepper/po-stepper-step/po-stepper-step.component.js +5 -4
  29. package/esm2015/lib/components/po-stepper/po-stepper.component.js +15 -14
  30. package/esm2015/lib/components/po-table/po-table-base.component.js +2 -2
  31. package/esm2015/lib/components/po-table/po-table-column-label/po-table-column-label.interface.js +1 -1
  32. package/esm2015/lib/components/po-table/po-table.component.js +41 -1
  33. package/esm2015/po-ui-ng-components.js +2 -2
  34. package/fesm2015/po-ui-ng-components.js +955 -512
  35. package/fesm2015/po-ui-ng-components.js.map +1 -1
  36. package/lib/components/po-avatar/po-avatar-base.component.d.ts +14 -0
  37. package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-field.interface.d.ts +6 -0
  38. package/lib/components/po-field/po-datepicker-range/interfaces/po-datepicker-range-literals.interface.d.ts +4 -0
  39. package/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.d.ts +26 -3
  40. package/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.d.ts +3 -2
  41. package/lib/components/po-field/po-email/po-email.component.d.ts +2 -2
  42. package/lib/components/po-field/po-field.model.d.ts +50 -0
  43. package/lib/components/po-field/po-login/po-login.component.d.ts +2 -2
  44. package/lib/components/po-field/po-lookup/interfaces/po-lookup-filter.interface.d.ts +5 -2
  45. package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +53 -7
  46. package/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal-base.component.d.ts +22 -2
  47. package/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal.component.d.ts +10 -3
  48. package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +25 -2
  49. package/lib/components/po-field/po-lookup/services/po-lookup-filter.service.d.ts +6 -2
  50. package/lib/components/po-field/po-lookup/services/po-lookup-modal.service.d.ts +7 -0
  51. package/lib/components/po-field/po-password/po-password.component.d.ts +2 -2
  52. package/lib/components/po-field/po-switch/po-switch.component.d.ts +49 -3
  53. package/lib/components/po-field/po-url/po-url.component.d.ts +2 -2
  54. package/lib/components/po-stepper/po-stepper-step/po-stepper-step.component.d.ts +1 -0
  55. package/lib/components/po-stepper/po-stepper.component.d.ts +6 -2
  56. package/lib/components/po-table/po-table-column-label/po-table-column-label.interface.d.ts +1 -1
  57. package/lib/components/po-table/po-table.component.d.ts +13 -0
  58. package/package.json +4 -4
  59. package/po-ui-ng-components-5.18.0.tgz +0 -0
  60. package/po-ui-ng-components.d.ts +1 -1
  61. package/po-ui-ng-components.metadata.json +1 -1
  62. package/schematics/ng-add/index.js +1 -1
  63. package/schematics/ng-update/v2/index.js +1 -1
  64. package/schematics/ng-update/v3/index.js +1 -1
  65. package/schematics/ng-update/v4/index.js +1 -1
  66. package/schematics/ng-update/v5/index.js +1 -1
  67. package/esm2015/lib/components/po-field/po-switch/po-switch-base.component.js +0 -158
  68. package/lib/components/po-field/po-switch/po-switch-base.component.d.ts +0 -100
  69. package/po-ui-ng-components-5.14.0.tgz +0 -0
@@ -298,6 +298,20 @@ const PO_AVATAR_SIZE_DEFAULT = 'md';
298
298
  */
299
299
  class PoAvatarBaseComponent {
300
300
  constructor() {
301
+ /**
302
+ * @optional
303
+ *
304
+ * @description
305
+ *
306
+ * Indica como o navegador deve carregar a imagem.
307
+ *
308
+ * Valores válidos:
309
+ * - `eager` (a imagem é carregada imediatamente, independente de estar visível ou não)
310
+ * - `lazy` (a imagem só é carregada quando estiver próxima de ser renderizada)
311
+ *
312
+ * @default `eager`
313
+ */
314
+ this.loading = 'eager';
301
315
  /** Evento disparado ao clicar na imagem do *avatar*. */
302
316
  this.click = new EventEmitter();
303
317
  this._size = 'md';
@@ -333,6 +347,7 @@ PoAvatarBaseComponent.decorators = [
333
347
  ];
334
348
  PoAvatarBaseComponent.propDecorators = {
335
349
  src: [{ type: Input, args: ['p-src',] }],
350
+ loading: [{ type: Input, args: ['p-loading',] }],
336
351
  click: [{ type: Output, args: ['p-click',] }],
337
352
  size: [{ type: Input, args: ['p-size',] }]
338
353
  };
@@ -372,7 +387,7 @@ class PoAvatarComponent extends PoAvatarBaseComponent {
372
387
  PoAvatarComponent.decorators = [
373
388
  { type: Component, args: [{
374
389
  selector: 'po-avatar',
375
- template: "<div class=\"po-avatar po-avatar-{{ size }}\" [class.po-clickable]=\"hasClickEvent\" (click)=\"click.emit()\">\n <ng-container *ngIf=\"src; then sourceImage; else defaultIcon\"></ng-container>\n</div>\n\n<ng-template #sourceImage>\n <img class=\"po-avatar-image\" [src]=\"src\" alt=\"\" (error)=\"onError()\" />\n</ng-template>\n\n<ng-template #defaultIcon>\n <span class=\"po-icon po-icon-user po-avatar-default-icon\"></span>\n</ng-template>\n",
390
+ template: "<div class=\"po-avatar po-avatar-{{ size }}\" [class.po-clickable]=\"hasClickEvent\" (click)=\"click.emit()\">\n <ng-container *ngIf=\"src; then sourceImage; else defaultIcon\"></ng-container>\n</div>\n\n<ng-template #sourceImage>\n <img class=\"po-avatar-image\" [src]=\"src\" alt=\"\" [attr.loading]=\"loading\" (error)=\"onError()\" />\n</ng-template>\n\n<ng-template #defaultIcon>\n <span class=\"po-icon po-icon-user po-avatar-default-icon\"></span>\n</ng-template>\n",
376
391
  changeDetection: ChangeDetectionStrategy.OnPush
377
392
  },] }
378
393
  ];
@@ -9857,6 +9872,7 @@ class PoDatepickerComponent extends PoDatepickerBaseComponent {
9857
9872
  else if (this.inputEl) {
9858
9873
  this.inputEl.nativeElement.value = '';
9859
9874
  this.date = undefined;
9875
+ this.callOnChange(this.date, false);
9860
9876
  }
9861
9877
  this.valueBeforeChange = this.formatToDate(this.date);
9862
9878
  }
@@ -12354,7 +12370,7 @@ class PoTableBaseComponent {
12354
12370
  this.items.forEach(item => {
12355
12371
  item.$selected = this.selectAll;
12356
12372
  });
12357
- this.emitSelectAllEvents(this.selectAll, this.items);
12373
+ this.emitSelectAllEvents(this.selectAll, [...this.items]);
12358
12374
  }
12359
12375
  }
12360
12376
  selectRow(row) {
@@ -13157,6 +13173,30 @@ class PoTableComponent extends PoTableBaseComponent {
13157
13173
  this.toggleRowAction(row);
13158
13174
  }
13159
13175
  }
13176
+ /**
13177
+ * Desmarca uma linha que está selecionada.
13178
+ */
13179
+ unselectRowItem(itemfn) {
13180
+ this.toggleSelect(itemfn, false);
13181
+ if (this.items.every(item => !item.$selected)) {
13182
+ this.selectAll = false;
13183
+ }
13184
+ else {
13185
+ this.selectAll = null;
13186
+ }
13187
+ }
13188
+ /**
13189
+ * Seleciona uma linha do 'po-table'.
13190
+ */
13191
+ selectRowItem(itemfn) {
13192
+ this.toggleSelect(itemfn, true);
13193
+ if (this.items.every(item => item.$selected)) {
13194
+ this.selectAll = true;
13195
+ }
13196
+ else {
13197
+ this.selectAll = null;
13198
+ }
13199
+ }
13160
13200
  formatNumber(value, format) {
13161
13201
  if (!format) {
13162
13202
  return value;
@@ -13392,6 +13432,22 @@ class PoTableComponent extends PoTableBaseComponent {
13392
13432
  this.calculateHeightTableContainer(this.height);
13393
13433
  }
13394
13434
  }
13435
+ toggleSelect(compare, selectValue) {
13436
+ if (typeof compare !== 'function') {
13437
+ this.items.forEach(item => {
13438
+ if (item === compare) {
13439
+ item.$selected = selectValue;
13440
+ }
13441
+ });
13442
+ }
13443
+ else {
13444
+ this.items.forEach(item => {
13445
+ if (compare(item)) {
13446
+ item.$selected = selectValue;
13447
+ }
13448
+ });
13449
+ }
13450
+ }
13395
13451
  }
13396
13452
  PoTableComponent.decorators = [
13397
13453
  { type: Component, args: [{
@@ -15366,19 +15422,27 @@ PoComboComponent.propDecorators = {
15366
15422
  const poDatepickerRangeLiteralsDefault = {
15367
15423
  en: {
15368
15424
  invalidFormat: 'Date in invalid format',
15369
- startDateGreaterThanEndDate: 'Start date greater than end date'
15425
+ startDateGreaterThanEndDate: 'Start date greater than end date',
15426
+ invalidDate: 'Invalid date',
15427
+ dateOutOfPeriod: 'Date out of period'
15370
15428
  },
15371
15429
  es: {
15372
15430
  invalidFormat: 'Fecha en formato no válido',
15373
- startDateGreaterThanEndDate: 'Fecha de inicio mayor que fecha final'
15431
+ startDateGreaterThanEndDate: 'Fecha de inicio mayor que fecha final',
15432
+ invalidDate: 'Fecha invalida',
15433
+ dateOutOfPeriod: 'Fecha fuera de período'
15374
15434
  },
15375
15435
  pt: {
15376
15436
  invalidFormat: 'Data no formato inválido',
15377
- startDateGreaterThanEndDate: 'Data inicial maior que data final'
15437
+ startDateGreaterThanEndDate: 'Data inicial maior que data final',
15438
+ invalidDate: 'Data inválida',
15439
+ dateOutOfPeriod: 'Data fora do período'
15378
15440
  },
15379
15441
  ru: {
15380
15442
  invalidFormat: 'Дата в неверном формате',
15381
- startDateGreaterThanEndDate: 'Дата начала больше даты окончания'
15443
+ startDateGreaterThanEndDate: 'Дата начала больше даты окончания',
15444
+ invalidDate: 'Недействительная дата',
15445
+ dateOutOfPeriod: 'дата вне периода'
15382
15446
  }
15383
15447
  };
15384
15448
 
@@ -15553,6 +15617,48 @@ class PoDatepickerRangeBaseComponent {
15553
15617
  get literals() {
15554
15618
  return this._literals || poDatepickerRangeLiteralsDefault[this.language];
15555
15619
  }
15620
+ /**
15621
+ * @optional
15622
+ *
15623
+ * @description
15624
+ *
15625
+ * Define uma data mínima para o `po-datepicker-range`.
15626
+ */
15627
+ set minDate(value) {
15628
+ if (value instanceof Date) {
15629
+ const year = value.getFullYear();
15630
+ const date = new Date(year, value.getMonth(), value.getDate(), 0, 0, 0);
15631
+ setYearFrom0To100(date, year);
15632
+ this._minDate = date;
15633
+ }
15634
+ else {
15635
+ this._minDate = convertIsoToDate(value, true, false);
15636
+ }
15637
+ }
15638
+ get minDate() {
15639
+ return this._minDate;
15640
+ }
15641
+ /**
15642
+ * @optional
15643
+ *
15644
+ * @description
15645
+ *
15646
+ * Define uma data máxima para o `po-datepicker-range`.
15647
+ */
15648
+ set maxDate(value) {
15649
+ if (value instanceof Date) {
15650
+ const year = value.getFullYear();
15651
+ const date = new Date(year, value.getMonth(), value.getDate(), 23, 59, 59);
15652
+ setYearFrom0To100(date, year);
15653
+ this._maxDate = date;
15654
+ }
15655
+ else {
15656
+ this._maxDate = convertIsoToDate(value, false, true);
15657
+ }
15658
+ }
15659
+ get maxDate() {
15660
+ return this._maxDate;
15661
+ }
15556
15662
  /**
15557
15663
  * @optional
15558
15664
  *
@@ -15646,6 +15752,14 @@ class PoDatepickerRangeBaseComponent {
15646
15752
  }
15647
15753
  };
15648
15754
  }
15755
+ if (!this.verifyValidDate(startDate, endDate)) {
15756
+ this.errorMessage = this.literals.invalidDate;
15757
+ return {
15758
+ date: {
15759
+ valid: false
15760
+ }
15761
+ };
15762
+ }
15649
15763
  if (this.dateRangeObjectFailed(control.value) || this.dateRangeFormatFailed(startDate, endDate)) {
15650
15764
  this.errorMessage = this.literals.invalidFormat;
15651
15765
  return {
@@ -15662,8 +15776,19 @@ class PoDatepickerRangeBaseComponent {
15662
15776
  }
15663
15777
  };
15664
15778
  }
15779
+ if ((startDate && !this.validateDateInRange(startDate)) || (endDate && !this.validateDateInRange(endDate))) {
15780
+ this.errorMessage = this.literals.dateOutOfPeriod;
15781
+ return {
15782
+ date: {
15783
+ valid: false
15784
+ }
15785
+ };
15786
+ }
15665
15787
  return null;
15666
15788
  }
15789
+ validateDateInRange(startDate) {
15790
+ return validateDateRange(convertIsoToDate(startDate, false, false), this._minDate, this._maxDate);
15791
+ }
15667
15792
  writeValue(dateRange) {
15668
15793
  this.resetDateRangeInputValidation();
15669
15794
  if (!dateRange || this.dateRangeObjectFailed(dateRange)) {
@@ -15701,6 +15826,17 @@ class PoDatepickerRangeBaseComponent {
15701
15826
  this.validatorChange(model);
15702
15827
  }
15703
15828
  }
15829
+ verifyValidDate(startDate, endDate) {
15830
+ if (startDate !== '' && endDate !== '') {
15831
+ return this.dateIsValid(startDate) && this.dateIsValid(endDate);
15832
+ }
15833
+ else if (startDate !== '') {
15834
+ return this.dateIsValid(startDate);
15835
+ }
15836
+ else {
15837
+ return this.dateIsValid(endDate);
15838
+ }
15839
+ }
15704
15840
  convertPatternDateFormat(value) {
15705
15841
  if (value instanceof Date) {
15706
15842
  return this.poDateService.convertDateToISO(value);
@@ -15724,6 +15860,29 @@ class PoDatepickerRangeBaseComponent {
15724
15860
  requiredFailed(this.required, this.disabled, startDate) &&
15725
15861
  requiredFailed(this.required, this.disabled, endDate));
15726
15862
  }
15863
+ dateIsValid(date) {
15864
+ const [strYear, strMonth, strDay] = date.split('-');
15865
+ const year = Number(strYear);
15866
+ const month = Number(strMonth);
15867
+ const day = Number(strDay);
15868
+ //verificação dos meses com 31 dias
15869
+ if (month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12) {
15870
+ return day < 1 || day > 31 ? false : true;
15871
+ }
15872
+ else if (month === 4 || month === 6 || month === 9 || month === 11) {
15873
+ //verificação dos meses com 30 dias
15874
+ return day < 1 || day > 30 ? false : true;
15875
+ }
15876
+ else {
15877
+ //verificacao de ano bissexto para verificar até qual dia irá o mês de fevereiro
15878
+ if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {
15879
+ return day < 1 || day > 29 ? false : true;
15880
+ }
15881
+ else {
15882
+ return day < 1 || day > 28 ? false : true;
15883
+ }
15884
+ }
15885
+ }
15727
15886
  }
15728
15887
  PoDatepickerRangeBaseComponent.decorators = [
15729
15888
  { type: Directive }
@@ -15742,6 +15901,8 @@ PoDatepickerRangeBaseComponent.propDecorators = {
15742
15901
  disabled: [{ type: Input, args: ['p-disabled',] }],
15743
15902
  endDate: [{ type: Input, args: ['p-end-date',] }],
15744
15903
  literals: [{ type: Input, args: ['p-literals',] }],
15904
+ minDate: [{ type: Input, args: ['p-min-date',] }],
15905
+ maxDate: [{ type: Input, args: ['p-max-date',] }],
15745
15906
  noAutocomplete: [{ type: Input, args: ['p-no-autocomplete',] }],
15746
15907
  readonly: [{ type: Input, args: ['p-readonly',] }],
15747
15908
  required: [{ type: Input, args: ['p-required',] }],
@@ -15862,6 +16023,11 @@ class PoDatepickerRangeComponent extends PoDatepickerRangeBaseComponent {
15862
16023
  // Classe de máscara
15863
16024
  this.poMaskObject = this.buildMask();
15864
16025
  }
16026
+ ngOnChanges(changes) {
16027
+ if (changes.minDate || changes.maxDate) {
16028
+ this.validateModel(this.dateRange);
16029
+ }
16030
+ }
15865
16031
  ngOnDestroy() {
15866
16032
  this.removeListeners();
15867
16033
  }
@@ -15994,7 +16160,7 @@ class PoDatepickerRangeComponent extends PoDatepickerRangeBaseComponent {
15994
16160
  getDateRangeFormatValidation(startDate, endDate, isStartDateTargetEvent) {
15995
16161
  this.setDateRangeInputValidation(startDate, endDate);
15996
16162
  return {
15997
- isValid: this.isDateRangeInputFormatValid && this.isStartDateRangeInputValid,
16163
+ isValid: this.isDateRangeInputFormatValid && this.isStartDateRangeInputValid && this.verifyValidDate(startDate, endDate),
15998
16164
  dateRangeModel: this.getValidatedModel(startDate, endDate, isStartDateTargetEvent)
15999
16165
  };
16000
16166
  }
@@ -16155,7 +16321,7 @@ class PoDatepickerRangeComponent extends PoDatepickerRangeBaseComponent {
16155
16321
  PoDatepickerRangeComponent.decorators = [
16156
16322
  { type: Component, args: [{
16157
16323
  selector: 'po-datepicker-range',
16158
- template: "<po-field-container [p-help]=\"help\" [p-label]=\"label\" [p-optional]=\"!required && optional\">\n <div #dateRangeField class=\"po-datepicker-range-field po-input\" [class.po-datepicker-range-field-disabled]=\"disabled\">\n <div class=\"po-datepicker-range-start-date\">\n <input\n #startDateInput\n class=\"po-datepicker-range-input\"\n maxlength=\"10\"\n type=\"text\"\n [autocomplete]=\"autocomplete\"\n [disabled]=\"disabled\"\n [name]=\"startDateInputName\"\n [readonly]=\"readonly\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n (click)=\"eventOnClick($event)\"\n />\n </div>\n\n <div class=\"po-datepicker-range-separator\">-</div>\n\n <div class=\"po-datepicker-range-end-date\">\n <input\n #endDateInput\n class=\"po-datepicker-range-input\"\n maxlength=\"10\"\n type=\"text\"\n [autocomplete]=\"autocomplete\"\n [disabled]=\"disabled\"\n [name]=\"endDateInputName\"\n [readonly]=\"readonly\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n (click)=\"eventOnClick($event)\"\n />\n </div>\n\n <div class=\"po-datepicker-range-icon\">\n <po-clean *ngIf=\"enableCleaner\" (p-change-event)=\"clear()\"></po-clean>\n </div>\n\n <div class=\"po-datepicker-range-icon\">\n <span\n #iconCalendar\n class=\"po-icon po-field-icon po-icon-calendar\"\n [class.po-clickable]=\"!disabled && !readonly\"\n [class.po-field-icon-disabled]=\"disabled || readonly\"\n (click)=\"toggleCalendar()\"\n >\n </span>\n </div>\n </div>\n\n <po-field-container-bottom [p-error-pattern]=\"getErrorMessage\"></po-field-container-bottom>\n</po-field-container>\n\n<ng-container *ngIf=\"isCalendarVisible\">\n <div #calendarPicker class=\"po-calendar-range-picker\">\n <po-calendar p-mode=\"range\" [ngModel]=\"dateRange\" (ngModelChange)=\"onCalendarChange($event)\"></po-calendar>\n </div>\n</ng-container>\n",
16324
+ template: "<po-field-container [p-help]=\"help\" [p-label]=\"label\" [p-optional]=\"!required && optional\">\n <div #dateRangeField class=\"po-datepicker-range-field po-input\" [class.po-datepicker-range-field-disabled]=\"disabled\">\n <div class=\"po-datepicker-range-start-date\">\n <input\n #startDateInput\n class=\"po-datepicker-range-input\"\n maxlength=\"10\"\n type=\"text\"\n [autocomplete]=\"autocomplete\"\n [disabled]=\"disabled\"\n [name]=\"startDateInputName\"\n [readonly]=\"readonly\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n (click)=\"eventOnClick($event)\"\n />\n </div>\n\n <div class=\"po-datepicker-range-separator\">-</div>\n\n <div class=\"po-datepicker-range-end-date\">\n <input\n #endDateInput\n class=\"po-datepicker-range-input\"\n maxlength=\"10\"\n type=\"text\"\n [autocomplete]=\"autocomplete\"\n [disabled]=\"disabled\"\n [name]=\"endDateInputName\"\n [readonly]=\"readonly\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n (click)=\"eventOnClick($event)\"\n />\n </div>\n\n <div class=\"po-datepicker-range-icon\">\n <po-clean *ngIf=\"enableCleaner\" (p-change-event)=\"clear()\"></po-clean>\n </div>\n\n <div class=\"po-datepicker-range-icon\">\n <span\n #iconCalendar\n class=\"po-icon po-field-icon po-icon-calendar\"\n [class.po-clickable]=\"!disabled && !readonly\"\n [class.po-field-icon-disabled]=\"disabled || readonly\"\n (click)=\"toggleCalendar()\"\n >\n </span>\n </div>\n </div>\n\n <po-field-container-bottom [p-error-pattern]=\"getErrorMessage\"></po-field-container-bottom>\n</po-field-container>\n\n<ng-container *ngIf=\"isCalendarVisible\">\n <div #calendarPicker class=\"po-calendar-range-picker\">\n <po-calendar\n p-mode=\"range\"\n [ngModel]=\"dateRange\"\n [p-max-date]=\"maxDate\"\n [p-min-date]=\"minDate\"\n (ngModelChange)=\"onCalendarChange($event)\"\n ></po-calendar>\n </div>\n</ng-container>\n",
16159
16325
  providers: providers$5
16160
16326
  },] }
16161
16327
  ];
@@ -17344,8 +17510,8 @@ const providers$4 = [
17344
17510
  */
17345
17511
  class PoEmailComponent extends PoInputGeneric {
17346
17512
  /* istanbul ignore next */
17347
- constructor(el) {
17348
- super(el);
17513
+ constructor(el, cd) {
17514
+ super(el, cd);
17349
17515
  this.icon = 'po-icon-mail';
17350
17516
  this.type = 'email';
17351
17517
  // Consideramos o uso do nosso pattern com a seguinte expressão.
@@ -17395,11 +17561,13 @@ PoEmailComponent.decorators = [
17395
17561
  { type: Component, args: [{
17396
17562
  selector: 'po-email',
17397
17563
  template: "<po-field-container [p-help]=\"help\" [p-label]=\"label\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon class=\"po-field-icon\" [class.po-field-icon-disabled]=\"disabled\" [p-icon]=\"icon\"></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-input\"\n [attr.name]=\"name\"\n [autocomplete]=\"autocomplete\"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-right]=\"clean\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [type]=\"type\"\n (blur)=\"eventOnBlur($event)\"\n (click)=\"eventOnClick($event)\"\n (focus)=\"eventOnFocus($event)\"\n (input)=\"eventOnInput($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean *ngIf=\"clean && !disabled && !readonly\" [p-element-ref]=\"inputEl\" (p-change-event)=\"clear($event)\">\n </po-clean>\n </div>\n </div>\n\n <po-field-container-bottom [p-error-pattern]=\"getErrorPattern()\"> </po-field-container-bottom>\n</po-field-container>\n",
17564
+ changeDetection: ChangeDetectionStrategy.OnPush,
17398
17565
  providers: providers$4
17399
17566
  },] }
17400
17567
  ];
17401
17568
  PoEmailComponent.ctorParameters = () => [
17402
- { type: ElementRef }
17569
+ { type: ElementRef },
17570
+ { type: ChangeDetectorRef }
17403
17571
  ];
17404
17572
 
17405
17573
  /* istanbul ignore next */
@@ -17443,8 +17611,8 @@ const providers$3 = [
17443
17611
  */
17444
17612
  class PoLoginComponent extends PoInputGeneric {
17445
17613
  /* istanbul ignore next */
17446
- constructor(el) {
17447
- super(el);
17614
+ constructor(el, cd) {
17615
+ super(el, cd);
17448
17616
  this.type = 'text';
17449
17617
  }
17450
17618
  extraValidation(c) {
@@ -17455,11 +17623,13 @@ PoLoginComponent.decorators = [
17455
17623
  { type: Component, args: [{
17456
17624
  selector: 'po-login',
17457
17625
  template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\">\n <div class=\"po-field-icon-container-left\">\n <span class=\"po-icon po-field-icon po-icon-user\" [class.po-field-icon-disabled]=\"disabled\"></span>\n </div>\n\n <input\n #inp\n class=\"po-input po-input-icon-left\"\n [attr.name]=\"name\"\n [autocomplete]=\"autocomplete\"\n [class.po-input-icon-right]=\"clean\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [type]=\"type\"\n (blur)=\"eventOnBlur($event)\"\n (click)=\"eventOnClick($event)\"\n (focus)=\"eventOnFocus($event)\"\n (input)=\"eventOnInput($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean *ngIf=\"clean && !disabled && !readonly\" [p-element-ref]=\"inputEl\" (p-change-event)=\"clear($event)\">\n </po-clean>\n </div>\n </div>\n\n <po-field-container-bottom [p-error-pattern]=\"getErrorPattern()\"> </po-field-container-bottom>\n</po-field-container>\n",
17626
+ changeDetection: ChangeDetectionStrategy.OnPush,
17458
17627
  providers: providers$3
17459
17628
  },] }
17460
17629
  ];
17461
17630
  PoLoginComponent.ctorParameters = () => [
17462
- { type: ElementRef }
17631
+ { type: ElementRef },
17632
+ { type: ChangeDetectorRef }
17463
17633
  ];
17464
17634
 
17465
17635
  /**
@@ -17475,6 +17645,7 @@ class PoLookupFilterService {
17475
17645
  this.headers = new HttpHeaders({
17476
17646
  'X-PO-No-Message': 'true'
17477
17647
  });
17648
+ this.multiple = false;
17478
17649
  }
17479
17650
  getFilteredItems(filteredItemsParams) {
17480
17651
  const { filterParams, advancedFilters } = filteredItemsParams, restFilteredItemsParams = __rest(filteredItemsParams, ["filterParams", "advancedFilters"]);
@@ -17484,12 +17655,25 @@ class PoLookupFilterService {
17484
17655
  return this.httpClient.get(this.url, { headers: this.headers, params });
17485
17656
  }
17486
17657
  getObjectByValue(value, filterParams) {
17487
- const encodedValue = encodeURIComponent(value);
17488
17658
  const validatedFilterParams = this.validateParams(filterParams);
17489
- return this.httpClient.get(`${this.url}/${encodedValue}`, { headers: this.headers, params: validatedFilterParams });
17659
+ let newURL;
17660
+ let encodedValue;
17661
+ if (this.multiple) {
17662
+ encodedValue = encodeURIComponent(Array.isArray(value) ? value.join(',') : value);
17663
+ newURL = `${this.url}?${this.fieldValue}=${encodedValue}`;
17664
+ }
17665
+ else {
17666
+ encodedValue = encodeURIComponent(value);
17667
+ newURL = `${this.url}/${encodedValue}`;
17668
+ }
17669
+ return this.httpClient
17670
+ .get(newURL, { headers: this.headers, params: validatedFilterParams })
17671
+ .pipe(map((response) => ('items' in response ? response.items : response)));
17490
17672
  }
17491
- setUrl(url) {
17673
+ setConfig(url, fieldValue, multiple) {
17492
17674
  this.url = url;
17675
+ this.fieldValue = fieldValue;
17676
+ this.multiple = multiple;
17493
17677
  }
17494
17678
  validateParams(params) {
17495
17679
  return isTypeof(params, 'object') && !Array.isArray(params) ? params : undefined;
@@ -17506,7 +17690,7 @@ PoLookupFilterService.ctorParameters = () => [
17506
17690
  * @description
17507
17691
  *
17508
17692
  * Componente utilizado para abrir uma janela de busca com uma tabela que lista dados de um serviço. Nesta janela é possível buscar e
17509
- * selecionar o registro que será enviado para o campo. O `po-lookup` permite que o usuário digite um valor e pressione a tecla *TAB* para
17693
+ * selecionar um ou mais registros que serão enviados para o campo. O `po-lookup` permite que o usuário digite um valor e pressione a tecla *TAB* para
17510
17694
  * buscar um registro.
17511
17695
  *
17512
17696
  * > Caso o campo seja iniciado ou preenchido com um valor inexistente na busca, o mesmo será limpado.
@@ -17544,6 +17728,31 @@ class PoLookupBaseComponent {
17544
17728
  * @default `false`
17545
17729
  */
17546
17730
  this.infiniteScroll = false;
17731
+ /** Exibe um ícone que permite limpar o campo. */
17732
+ this.clean = false;
17733
+ /**
17734
+ * @optional
17735
+ *
17736
+ * @description
17737
+ *
17738
+ * Permite a seleção de múltiplos itens.
17739
+ *
17740
+ * > Quando habilitado o valor do campo passará a ser uma lista de valores, por exemplo: `[ 12345, 67890 ]`
17741
+ *
17742
+ * @default `false`
17743
+ */
17744
+ this.multiple = false;
17745
+ /**
17746
+ * @optional
17747
+ *
17748
+ * @description
17749
+ *
17750
+ * Define que a altura do componente será auto ajustável, possuindo uma altura minima porém a altura máxima será de acordo
17751
+ * com o número de itens selecionados e a extensão dos mesmos, mantendo-os sempre visíveis.
17752
+ *
17753
+ * @default `false`
17754
+ */
17755
+ this.autoHeight = false;
17547
17756
  /**
17548
17757
  * Evento será disparado quando ocorrer algum erro na requisição de busca do item.
17549
17758
  * Será passado por parâmetro o objeto de erro retornado.
@@ -17567,6 +17776,7 @@ class PoLookupBaseComponent {
17567
17776
  * Por parâmetro será passado o novo valor.
17568
17777
  */
17569
17778
  this.change = new EventEmitter();
17779
+ this.selectedOptions = [];
17570
17780
  this.oldValue = '';
17571
17781
  this.oldValueToModel = null;
17572
17782
  // eslint-disable-next-line
@@ -17574,6 +17784,7 @@ class PoLookupBaseComponent {
17574
17784
  this._disabled = false;
17575
17785
  this._placeholder = '';
17576
17786
  this._required = false;
17787
+ this._autoHeight = false;
17577
17788
  this.onChangePropagate = null;
17578
17789
  }
17579
17790
  /** Mensagem que aparecerá enquanto o campo não estiver preenchido. */
@@ -17619,6 +17830,20 @@ class PoLookupBaseComponent {
17619
17830
  * url + ?page=1&pageSize=20&age=23&filter=Peter
17620
17831
  * ```
17621
17832
  *
17833
+ * Ao iniciar o campo com valor, os registros serão buscados da seguinte forma:
17834
+ * ```
17835
+ * model = 1234;
17836
+ *
17837
+ * GET url/1234
17838
+ * ```
17839
+ *
17840
+ * Caso estiver com múltipla seleção habilitada:
17841
+ * ```
17842
+ * model = [1234, 5678]
17843
+ *
17844
+ * GET url?${fieldValue}=1234,5678
17845
+ * ```
17846
+ *
17622
17847
  * > Esta URL deve retornar e receber os dados no padrão de [API do PO UI](https://po-ui.io/guides/api) e utiliza os valores
17623
17848
  * definidos nas propriedades `p-field-label` e `p-field-value` para a construção do `po-lookup`.
17624
17849
  *
@@ -17695,6 +17920,15 @@ class PoLookupBaseComponent {
17695
17920
  ngAfterViewInit() {
17696
17921
  this.setControl();
17697
17922
  }
17923
+ cleanModel() {
17924
+ this.cleanViewValue();
17925
+ this.callOnChange(undefined);
17926
+ }
17927
+ ngOnChanges(changes) {
17928
+ if (changes.multiple && isTypeof(this.filterService, 'string')) {
17929
+ this.service.setConfig(this.filterService, this.fieldValue, this.multiple);
17930
+ }
17931
+ }
17698
17932
  // Função implementada do ControlValueAccessor
17699
17933
  // Usada para interceptar os estados de habilitado via forms api
17700
17934
  setDisabledState(isDisabled) {
@@ -17715,7 +17949,7 @@ class PoLookupBaseComponent {
17715
17949
  }
17716
17950
  // Seleciona o valor do model.
17717
17951
  selectValue(valueSelected) {
17718
- this.valueToModel = valueSelected[this.fieldValue];
17952
+ this.valueToModel = valueSelected;
17719
17953
  this.callOnChange(this.valueToModel);
17720
17954
  this.selected.emit(valueSelected);
17721
17955
  }
@@ -17753,10 +17987,12 @@ class PoLookupBaseComponent {
17753
17987
  }
17754
17988
  }))
17755
17989
  .subscribe(element => {
17756
- if (element) {
17757
- this.oldValue = element[this.fieldLabel];
17758
- this.selectValue(element);
17759
- this.setViewValue(this.getFormattedLabel(element), element);
17990
+ if ((element === null || element === void 0 ? void 0 : element.length) || (!Array.isArray(element) && element)) {
17991
+ if (Array.isArray(element) && element.length > 1) {
17992
+ this.setDisclaimers(element);
17993
+ this.updateVisibleItems();
17994
+ }
17995
+ this.selectModel(this.multiple ? element : [element]);
17760
17996
  }
17761
17997
  else {
17762
17998
  this.cleanModel();
@@ -17780,13 +18016,7 @@ class PoLookupBaseComponent {
17780
18016
  }
17781
18017
  }
17782
18018
  writeValue(value) {
17783
- if (value && value instanceof Object) {
17784
- // Esta condição é executada quando é retornado o objeto selecionado do componente Po Lookup Modal.
17785
- this.oldValue = value[this.fieldLabel];
17786
- this.valueToModel = value[this.fieldValue];
17787
- this.setViewValue(this.getFormattedLabel(value), value);
17788
- }
17789
- else if (value) {
18019
+ if ((value === null || value === void 0 ? void 0 : value.length) || (!Array.isArray(value) && value)) {
17790
18020
  // Esta condição é executada somente quando é passado o ID para realizar a busca pelo ID.
17791
18021
  this.searchById(value);
17792
18022
  }
@@ -17794,10 +18024,6 @@ class PoLookupBaseComponent {
17794
18024
  this.cleanViewValue();
17795
18025
  }
17796
18026
  }
17797
- cleanModel() {
17798
- this.cleanViewValue();
17799
- this.callOnChange(undefined);
17800
- }
17801
18027
  cleanViewValue() {
17802
18028
  this.setViewValue('', {});
17803
18029
  this.oldValue = '';
@@ -17808,10 +18034,19 @@ class PoLookupBaseComponent {
17808
18034
  return value ? this.keysDescription.map(column => value[column]).join(' - ') : '';
17809
18035
  }
17810
18036
  // Chama o método writeValue e preenche o model.
17811
- selectModel(value) {
17812
- this.writeValue(value);
17813
- if (value && value instanceof Object) {
17814
- this.selectValue(value);
18037
+ selectModel(options) {
18038
+ if (options.length) {
18039
+ this.selectedOptions = [...options];
18040
+ const newModel = this.multiple ? options.map(option => option[this.fieldValue]) : options[0][this.fieldValue];
18041
+ this.selectValue(newModel);
18042
+ if (options.length === 1) {
18043
+ this.oldValue = options[0][this.fieldLabel];
18044
+ this.setViewValue(this.getFormattedLabel(options[0]), options[0]);
18045
+ }
18046
+ }
18047
+ else {
18048
+ this.selectValue(undefined);
18049
+ this.cleanViewValue();
17815
18050
  }
17816
18051
  }
17817
18052
  validateModel(model) {
@@ -17825,7 +18060,7 @@ class PoLookupBaseComponent {
17825
18060
  }
17826
18061
  if (service && isTypeof(service, 'string')) {
17827
18062
  this.service = this.defaultService;
17828
- this.service.setUrl(service);
18063
+ this.service.setConfig(service, this.fieldValue, this.multiple);
17829
18064
  }
17830
18065
  }
17831
18066
  setControl() {
@@ -17866,6 +18101,9 @@ PoLookupBaseComponent.propDecorators = {
17866
18101
  optional: [{ type: Input, args: ['p-optional',] }],
17867
18102
  advancedFilters: [{ type: Input, args: ['p-advanced-filters',] }],
17868
18103
  infiniteScroll: [{ type: Input, args: ['p-infinite-scroll',] }],
18104
+ clean: [{ type: Input, args: ['p-clean',] }],
18105
+ multiple: [{ type: Input, args: ['p-multiple',] }],
18106
+ autoHeight: [{ type: Input, args: ['p-auto-height',] }],
17869
18107
  onError: [{ type: Output, args: ['p-error',] }],
17870
18108
  selected: [{ type: Output, args: ['p-selected',] }],
17871
18109
  change: [{ type: Output, args: ['p-change',] }],
@@ -17880,6 +18118,350 @@ __decorate([
17880
18118
  __decorate([
17881
18119
  InputBoolean()
17882
18120
  ], PoLookupBaseComponent.prototype, "infiniteScroll", void 0);
18121
+ __decorate([
18122
+ InputBoolean()
18123
+ ], PoLookupBaseComponent.prototype, "clean", void 0);
18124
+ __decorate([
18125
+ InputBoolean()
18126
+ ], PoLookupBaseComponent.prototype, "multiple", void 0);
18127
+ __decorate([
18128
+ InputBoolean()
18129
+ ], PoLookupBaseComponent.prototype, "autoHeight", void 0);
18130
+
18131
+ const poLookupLiteralsDefault = {
18132
+ en: {
18133
+ modalPrimaryActionLabel: 'Select',
18134
+ modalSecondaryActionLabel: 'Cancel',
18135
+ modalPlaceholder: 'Search',
18136
+ modalTitle: 'Select a record',
18137
+ modalTableNoColumns: poTableLiteralsDefault.en.noColumns,
18138
+ modalTableNoData: poTableLiteralsDefault.en.noData,
18139
+ modalTableLoadingData: poTableLiteralsDefault.en.loadingData,
18140
+ modalTableLoadMoreData: poTableLiteralsDefault.en.loadMoreData,
18141
+ modalAdvancedSearch: 'Advanced search',
18142
+ modalAdvancedSearchTitle: 'Advanced search',
18143
+ modalAdvancedSearchPrimaryActionLabel: 'Filter',
18144
+ modalAdvancedSearchSecondaryActionLabel: 'Return',
18145
+ modalDisclaimerGroupTitle: 'Presenting results filtered by:'
18146
+ },
18147
+ es: {
18148
+ modalPrimaryActionLabel: 'Seleccionar',
18149
+ modalSecondaryActionLabel: 'Cancelar',
18150
+ modalPlaceholder: 'Buscar',
18151
+ modalTitle: 'Seleccione un registro',
18152
+ modalTableNoColumns: poTableLiteralsDefault.es.noColumns,
18153
+ modalTableNoData: poTableLiteralsDefault.es.noData,
18154
+ modalTableLoadingData: poTableLiteralsDefault.es.loadingData,
18155
+ modalTableLoadMoreData: poTableLiteralsDefault.es.loadMoreData,
18156
+ modalAdvancedSearch: 'Búsqueda Avanzada',
18157
+ modalAdvancedSearchTitle: 'Búsqueda Avanzada',
18158
+ modalAdvancedSearchPrimaryActionLabel: 'Filtrar',
18159
+ modalAdvancedSearchSecondaryActionLabel: 'Vuelve',
18160
+ modalDisclaimerGroupTitle: 'Presentar resultados filtrados por:'
18161
+ },
18162
+ pt: {
18163
+ modalPrimaryActionLabel: 'Selecionar',
18164
+ modalSecondaryActionLabel: 'Cancelar',
18165
+ modalPlaceholder: 'Pesquisar',
18166
+ modalTitle: 'Selecione um registro',
18167
+ modalTableNoColumns: poTableLiteralsDefault.pt.noColumns,
18168
+ modalTableNoData: poTableLiteralsDefault.pt.noData,
18169
+ modalTableLoadingData: poTableLiteralsDefault.pt.loadingData,
18170
+ modalTableLoadMoreData: poTableLiteralsDefault.pt.loadMoreData,
18171
+ modalAdvancedSearch: 'Busca avançada',
18172
+ modalAdvancedSearchTitle: 'Busca Avançada',
18173
+ modalAdvancedSearchPrimaryActionLabel: 'Filtrar',
18174
+ modalAdvancedSearchSecondaryActionLabel: 'Voltar',
18175
+ modalDisclaimerGroupTitle: 'Apresentando resultados filtrados por:'
18176
+ },
18177
+ ru: {
18178
+ modalPrimaryActionLabel: 'выбирать',
18179
+ modalSecondaryActionLabel: 'отменить',
18180
+ modalPlaceholder: 'поиск',
18181
+ modalTitle: 'Выберите запись',
18182
+ modalTableNoColumns: poTableLiteralsDefault.ru.noColumns,
18183
+ modalTableNoData: poTableLiteralsDefault.ru.noData,
18184
+ modalTableLoadingData: poTableLiteralsDefault.ru.loadingData,
18185
+ modalTableLoadMoreData: poTableLiteralsDefault.ru.loadMoreData,
18186
+ modalAdvancedSearch: 'Расширенный поиск',
18187
+ modalAdvancedSearchTitle: 'Расширенный поиск',
18188
+ modalAdvancedSearchPrimaryActionLabel: 'Фильтр',
18189
+ modalAdvancedSearchSecondaryActionLabel: 'Вернись',
18190
+ modalDisclaimerGroupTitle: 'Представление результатов отфильтровано по:'
18191
+ }
18192
+ };
18193
+ /**
18194
+ * @docsPrivate
18195
+ *
18196
+ * Classe base do componente Po Lookup Modal.
18197
+ */
18198
+ class PoLookupModalBaseComponent {
18199
+ constructor(languageService, changeDetector) {
18200
+ this.changeDetector = changeDetector;
18201
+ /** Se verdadeiro, ativa a funcionalidade de scroll infinito para a tabela exibida no retorno da consulta. */
18202
+ this.infiniteScroll = false;
18203
+ /** Se verdadeiro, ativa a funcionalidade de multipla seleção. */
18204
+ this.multiple = false;
18205
+ /** Evento utilizado ao selecionar um registro da tabela. */
18206
+ this.model = new EventEmitter();
18207
+ this.hasNext = true;
18208
+ this.isLoading = false;
18209
+ this.page = 1;
18210
+ this.pageSize = 10;
18211
+ this.searchValue = '';
18212
+ // Propriedade da modal de busca avançada:
18213
+ this.advancedFilterModalTitle = '';
18214
+ this.dynamicFormValue = {};
18215
+ this.isAdvancedFilter = false;
18216
+ this.selecteds = [];
18217
+ this.language = poLocaleDefault;
18218
+ // eslint-disable-next-line @typescript-eslint/member-ordering
18219
+ this.primaryAction = {
18220
+ action: () => {
18221
+ const selectedsItems = this.selecteds;
18222
+ this.model.emit(selectedsItems);
18223
+ this.poModal.close();
18224
+ },
18225
+ label: this.literals.modalPrimaryActionLabel
18226
+ };
18227
+ // eslint-disable-next-line @typescript-eslint/member-ordering
18228
+ this.secondaryAction = {
18229
+ action: () => {
18230
+ this.model.emit(null);
18231
+ this.poModal.close();
18232
+ },
18233
+ label: this.literals.modalSecondaryActionLabel
18234
+ };
18235
+ this.language = languageService.getShortLanguage();
18236
+ }
18237
+ /** Objeto com as literais usadas no `po-lookup-modal`. */
18238
+ set literals(value) {
18239
+ if (value instanceof Object && !(value instanceof Array)) {
18240
+ this._literals = Object.assign(Object.assign(Object.assign({}, poLookupLiteralsDefault[poLocaleDefault]), poLookupLiteralsDefault[this.language]), value);
18241
+ if (value.modalTitle) {
18242
+ this.title = this.literals.modalTitle;
18243
+ }
18244
+ }
18245
+ else {
18246
+ this._literals = poLookupLiteralsDefault[this.language];
18247
+ }
18248
+ this.primaryAction.label = this.literals.modalPrimaryActionLabel;
18249
+ this.secondaryAction.label = this.literals.modalSecondaryActionLabel;
18250
+ this.setTableLiterals();
18251
+ }
18252
+ get literals() {
18253
+ return this._literals || poLookupLiteralsDefault[this.language];
18254
+ }
18255
+ /** Título da modal. */
18256
+ set title(value) {
18257
+ this._title = isTypeof(value, 'string') ? value : this.literals.modalTitle;
18258
+ }
18259
+ get title() {
18260
+ return this._title;
18261
+ }
18262
+ ngOnDestroy() {
18263
+ if (this.filterSubscription) {
18264
+ this.filterSubscription.unsubscribe();
18265
+ }
18266
+ if (this.searchSubscription) {
18267
+ this.searchSubscription.unsubscribe();
18268
+ }
18269
+ if (this.showMoreSubscription) {
18270
+ this.showMoreSubscription.unsubscribe();
18271
+ }
18272
+ }
18273
+ ngOnInit() {
18274
+ this.setAdvancedFilterModalProperties();
18275
+ this.initializeData();
18276
+ this.setTableLiterals();
18277
+ }
18278
+ createDisclaimer() {
18279
+ this.disclaimerGroup.disclaimers = [];
18280
+ this.searchValue = '';
18281
+ for (const [key, value] of Object.entries(this.dynamicFormValue)) {
18282
+ this.addDisclaimer(value, key);
18283
+ }
18284
+ if (!Object.values(this.dynamicFormValue).some(v => v !== null && typeof v !== 'undefined')) {
18285
+ this.initializeData();
18286
+ }
18287
+ }
18288
+ addDisclaimer(value, property) {
18289
+ this.disclaimer = { property: property };
18290
+ this.disclaimer.value = value;
18291
+ this.disclaimerGroup.disclaimers = [...this.disclaimerGroup.disclaimers, this.disclaimer];
18292
+ }
18293
+ onChangeDisclaimerGroup() {
18294
+ if (!this.searchValue) {
18295
+ this.isLoading = true;
18296
+ this.searchValue = '';
18297
+ this.searchFilteredItems();
18298
+ }
18299
+ }
18300
+ search() {
18301
+ this.page = 1;
18302
+ if (this.searchValue) {
18303
+ this.isLoading = true;
18304
+ this.disclaimerGroup.disclaimers = [];
18305
+ this.searchFilteredItems();
18306
+ }
18307
+ else {
18308
+ this.initializeData();
18309
+ }
18310
+ }
18311
+ searchFilteredItems() {
18312
+ this.searchSubscription = this.getFilteredItems(this.searchValue)
18313
+ .pipe(catchError(error => {
18314
+ this.setLookupResponseProperties();
18315
+ return throwError(error);
18316
+ }))
18317
+ .subscribe((data) => this.setLookupResponseProperties(data), () => { });
18318
+ }
18319
+ showMoreEvent() {
18320
+ this.page++;
18321
+ this.isLoading = true;
18322
+ this.showMoreSubscription = this.getFilteredItems(this.searchValue)
18323
+ .pipe(catchError(error => {
18324
+ this.hasNext = false;
18325
+ this.isLoading = false;
18326
+ return throwError(error);
18327
+ }))
18328
+ .subscribe((data) => {
18329
+ this.items = [...this.items, ...data.items];
18330
+ this.hasNext = data.hasNext;
18331
+ this.isLoading = false;
18332
+ this.changeDetector.detectChanges();
18333
+ this.setSelectedItems();
18334
+ }, () => { });
18335
+ }
18336
+ //Método responsável por selecionar as linhas quando abre o modal.
18337
+ setSelectedItems() {
18338
+ this.selecteds.forEach(selectedItem => this.poTable.selectRowItem(item => item[this.fieldValue] === selectedItem.value));
18339
+ }
18340
+ //Método responsável por criar os disclaimers quando abre o modal.
18341
+ setDisclaimersItems() {
18342
+ if (this.selectedItems && !Array.isArray(this.selectedItems)) {
18343
+ this.selecteds = [{ value: this.selectedItems }];
18344
+ return;
18345
+ }
18346
+ if (this.selectedItems && this.selectedItems.length) {
18347
+ this.selecteds = [...this.selectedItems];
18348
+ }
18349
+ }
18350
+ setAdvancedFilterModalProperties() {
18351
+ this.advancedFilterModalTitle = this.literals.modalAdvancedSearchTitle;
18352
+ this.disclaimerGroup = {
18353
+ title: this.literals.modalDisclaimerGroupTitle,
18354
+ disclaimers: []
18355
+ };
18356
+ this.primaryActionAdvancedFilter = {
18357
+ action: () => {
18358
+ this.destroyDynamicForm();
18359
+ this.isAdvancedFilter = false;
18360
+ this.createDisclaimer();
18361
+ },
18362
+ label: this.literals.modalAdvancedSearchPrimaryActionLabel
18363
+ };
18364
+ this.secondaryActionAdvancedFilter = {
18365
+ action: () => {
18366
+ this.destroyDynamicForm();
18367
+ this.isAdvancedFilter = false;
18368
+ },
18369
+ label: this.literals.modalAdvancedSearchSecondaryActionLabel
18370
+ };
18371
+ }
18372
+ getAdvancedFilters(advancedParams) {
18373
+ if (advancedParams && advancedParams.length > 0) {
18374
+ const filters = {};
18375
+ let validatedAdvacendFilters;
18376
+ advancedParams.forEach((filter) => {
18377
+ filters[filter.property] = filter.value instanceof Array ? filter.value.join() : filter.value;
18378
+ validatedAdvacendFilters = Object.assign(Object.assign({}, validatedAdvacendFilters), filters);
18379
+ });
18380
+ return validatedAdvacendFilters;
18381
+ }
18382
+ return undefined;
18383
+ }
18384
+ getFilteredItems(filter) {
18385
+ const filteredParams = this.getFilteredParams(filter);
18386
+ return this.filterService.getFilteredItems(filteredParams);
18387
+ }
18388
+ getFilteredParams(filter) {
18389
+ const { page, pageSize, filterParams, sort } = this;
18390
+ const filteredParams = {};
18391
+ const order = this.getOrderParam(sort);
18392
+ const advancedFilters = this.getAdvancedFilters(this.disclaimerGroup.disclaimers);
18393
+ const params = { filter, page, pageSize, order, filterParams, advancedFilters };
18394
+ for (const key in params) {
18395
+ if (params.hasOwnProperty(key) && params[key] !== undefined) {
18396
+ filteredParams[key] = params[key];
18397
+ }
18398
+ }
18399
+ return filteredParams;
18400
+ }
18401
+ getOrderParam(sort = { type: undefined }) {
18402
+ const { column, type } = sort;
18403
+ if (!column) {
18404
+ return;
18405
+ }
18406
+ if (type === PoTableColumnSortType.Descending) {
18407
+ return `-${column.property}`;
18408
+ }
18409
+ return `${column.property}`;
18410
+ }
18411
+ initializeData() {
18412
+ this.isLoading = true;
18413
+ this.filterSubscription = this.getFilteredItems('').subscribe(data => {
18414
+ this.setLookupResponseProperties(data);
18415
+ });
18416
+ }
18417
+ setLookupResponseProperties(data) {
18418
+ var _a, _b;
18419
+ this.items = (_a = data === null || data === void 0 ? void 0 : data.items) !== null && _a !== void 0 ? _a : [];
18420
+ this.hasNext = (_b = data === null || data === void 0 ? void 0 : data.hasNext) !== null && _b !== void 0 ? _b : false;
18421
+ this.isLoading = false;
18422
+ this.changeDetector.detectChanges();
18423
+ this.setDisclaimersItems();
18424
+ this.setSelectedItems();
18425
+ }
18426
+ setTableLiterals() {
18427
+ this.tableLiterals = {
18428
+ 'noColumns': this.literals.modalTableNoColumns,
18429
+ 'noData': this.literals.modalTableNoData,
18430
+ 'loadingData': this.literals.modalTableLoadingData,
18431
+ 'loadMoreData': this.literals.modalTableLoadMoreData
18432
+ };
18433
+ }
18434
+ }
18435
+ PoLookupModalBaseComponent.decorators = [
18436
+ { type: Directive }
18437
+ ];
18438
+ PoLookupModalBaseComponent.ctorParameters = () => [
18439
+ { type: PoLanguageService },
18440
+ { type: ChangeDetectorRef }
18441
+ ];
18442
+ PoLookupModalBaseComponent.propDecorators = {
18443
+ poModal: [{ type: ViewChild, args: [PoModalComponent, { static: true },] }],
18444
+ poTable: [{ type: ViewChild, args: [PoTableComponent, { static: true },] }],
18445
+ advancedFilters: [{ type: Input, args: ['p-advanced-filters',] }],
18446
+ columns: [{ type: Input, args: ['p-columns',] }],
18447
+ items: [{ type: Input, args: ['p-items',] }],
18448
+ filterService: [{ type: Input, args: ['p-filter-service',] }],
18449
+ filterParams: [{ type: Input, args: ['p-filter-params',] }],
18450
+ infiniteScroll: [{ type: Input, args: ['p-infinite-scroll',] }],
18451
+ multiple: [{ type: Input, args: ['p-multiple',] }],
18452
+ model: [{ type: Output, args: ['p-change-model',] }],
18453
+ selectedItems: [{ type: Input, args: ['p-selected-items',] }],
18454
+ fieldLabel: [{ type: Input, args: ['p-field-label',] }],
18455
+ fieldValue: [{ type: Input, args: ['p-field-value',] }],
18456
+ literals: [{ type: Input, args: ['p-literals',] }],
18457
+ title: [{ type: Input, args: ['p-title',] }]
18458
+ };
18459
+ __decorate([
18460
+ InputBoolean()
18461
+ ], PoLookupModalBaseComponent.prototype, "infiniteScroll", void 0);
18462
+ __decorate([
18463
+ InputBoolean()
18464
+ ], PoLookupModalBaseComponent.prototype, "multiple", void 0);
17883
18465
 
17884
18466
  /**
17885
18467
  *
@@ -18227,320 +18809,14 @@ PoDynamicFormComponent.propDecorators = {
18227
18809
  form: [{ type: ViewChild, args: ['dynamicForm',] }]
18228
18810
  };
18229
18811
 
18230
- const poLookupLiteralsDefault = {
18231
- en: {
18232
- modalPrimaryActionLabel: 'Select',
18233
- modalSecondaryActionLabel: 'Cancel',
18234
- modalPlaceholder: 'Search',
18235
- modalTitle: 'Select a record',
18236
- modalTableNoColumns: poTableLiteralsDefault.en.noColumns,
18237
- modalTableNoData: poTableLiteralsDefault.en.noData,
18238
- modalTableLoadingData: poTableLiteralsDefault.en.loadingData,
18239
- modalTableLoadMoreData: poTableLiteralsDefault.en.loadMoreData,
18240
- modalAdvancedSearch: 'Advanced search',
18241
- modalAdvancedSearchTitle: 'Advanced search',
18242
- modalAdvancedSearchPrimaryActionLabel: 'Filter',
18243
- modalAdvancedSearchSecondaryActionLabel: 'Return',
18244
- modalDisclaimerGroupTitle: 'Presenting results filtered by:'
18245
- },
18246
- es: {
18247
- modalPrimaryActionLabel: 'Seleccionar',
18248
- modalSecondaryActionLabel: 'Cancelar',
18249
- modalPlaceholder: 'Buscar',
18250
- modalTitle: 'Seleccione un registro',
18251
- modalTableNoColumns: poTableLiteralsDefault.es.noColumns,
18252
- modalTableNoData: poTableLiteralsDefault.es.noData,
18253
- modalTableLoadingData: poTableLiteralsDefault.es.loadingData,
18254
- modalTableLoadMoreData: poTableLiteralsDefault.es.loadMoreData,
18255
- modalAdvancedSearch: 'Búsqueda Avanzada',
18256
- modalAdvancedSearchTitle: 'Búsqueda Avanzada',
18257
- modalAdvancedSearchPrimaryActionLabel: 'Filtrar',
18258
- modalAdvancedSearchSecondaryActionLabel: 'Vuelve',
18259
- modalDisclaimerGroupTitle: 'Presentar resultados filtrados por:'
18260
- },
18261
- pt: {
18262
- modalPrimaryActionLabel: 'Selecionar',
18263
- modalSecondaryActionLabel: 'Cancelar',
18264
- modalPlaceholder: 'Pesquisar',
18265
- modalTitle: 'Selecione um registro',
18266
- modalTableNoColumns: poTableLiteralsDefault.pt.noColumns,
18267
- modalTableNoData: poTableLiteralsDefault.pt.noData,
18268
- modalTableLoadingData: poTableLiteralsDefault.pt.loadingData,
18269
- modalTableLoadMoreData: poTableLiteralsDefault.pt.loadMoreData,
18270
- modalAdvancedSearch: 'Busca avançada',
18271
- modalAdvancedSearchTitle: 'Busca Avançada',
18272
- modalAdvancedSearchPrimaryActionLabel: 'Filtrar',
18273
- modalAdvancedSearchSecondaryActionLabel: 'Voltar',
18274
- modalDisclaimerGroupTitle: 'Apresentando resultados filtrados por:'
18275
- },
18276
- ru: {
18277
- modalPrimaryActionLabel: 'выбирать',
18278
- modalSecondaryActionLabel: 'отменить',
18279
- modalPlaceholder: 'поиск',
18280
- modalTitle: 'Выберите запись',
18281
- modalTableNoColumns: poTableLiteralsDefault.ru.noColumns,
18282
- modalTableNoData: poTableLiteralsDefault.ru.noData,
18283
- modalTableLoadingData: poTableLiteralsDefault.ru.loadingData,
18284
- modalTableLoadMoreData: poTableLiteralsDefault.ru.loadMoreData,
18285
- modalAdvancedSearch: 'Расширенный поиск',
18286
- modalAdvancedSearchTitle: 'Расширенный поиск',
18287
- modalAdvancedSearchPrimaryActionLabel: 'Фильтр',
18288
- modalAdvancedSearchSecondaryActionLabel: 'Вернись',
18289
- modalDisclaimerGroupTitle: 'Представление результатов отфильтровано по:'
18290
- }
18291
- };
18292
- /**
18293
- * @docsPrivate
18294
- *
18295
- * Classe base do componente Po Lookup Modal.
18296
- */
18297
- class PoLookupModalBaseComponent {
18298
- constructor(languageService) {
18299
- /** Se verdadeiro, ativa a funcionalidade de scroll infinito para a tabela exibida no retorno da consulta. */
18300
- this.infiniteScroll = false;
18301
- /** Evento utilizado ao selecionar um registro da tabela. */
18302
- this.model = new EventEmitter();
18303
- this.hasNext = true;
18304
- this.isLoading = false;
18305
- this.page = 1;
18306
- this.pageSize = 10;
18307
- this.searchValue = '';
18308
- // Propriedade da modal de busca avançada:
18309
- this.advancedFilterModalTitle = '';
18310
- this.dynamicFormValue = {};
18311
- this.isAdvancedFilter = false;
18312
- this.language = poLocaleDefault;
18313
- // eslint-disable-next-line @typescript-eslint/member-ordering
18314
- this.primaryAction = {
18315
- action: () => {
18316
- this.items.forEach(element => {
18317
- if (element['$selected']) {
18318
- this.model.emit(element);
18319
- this.poModal.close();
18320
- }
18321
- });
18322
- },
18323
- label: this.literals.modalPrimaryActionLabel
18324
- };
18325
- // eslint-disable-next-line @typescript-eslint/member-ordering
18326
- this.secondaryAction = {
18327
- action: () => {
18328
- this.model.emit(null);
18329
- this.poModal.close();
18330
- },
18331
- label: this.literals.modalSecondaryActionLabel
18332
- };
18333
- this.language = languageService.getShortLanguage();
18334
- }
18335
- /** Objeto com as literais usadas no `po-lookup-modal`. */
18336
- set literals(value) {
18337
- if (value instanceof Object && !(value instanceof Array)) {
18338
- this._literals = Object.assign(Object.assign(Object.assign({}, poLookupLiteralsDefault[poLocaleDefault]), poLookupLiteralsDefault[this.language]), value);
18339
- if (value.modalTitle) {
18340
- this.title = this.literals.modalTitle;
18341
- }
18342
- }
18343
- else {
18344
- this._literals = poLookupLiteralsDefault[this.language];
18345
- }
18346
- this.primaryAction.label = this.literals.modalPrimaryActionLabel;
18347
- this.secondaryAction.label = this.literals.modalSecondaryActionLabel;
18348
- this.setTableLiterals();
18349
- }
18350
- get literals() {
18351
- return this._literals || poLookupLiteralsDefault[this.language];
18352
- }
18353
- /** Título da modal. */
18354
- set title(value) {
18355
- this._title = isTypeof(value, 'string') ? value : this.literals.modalTitle;
18356
- }
18357
- get title() {
18358
- return this._title;
18359
- }
18360
- ngOnDestroy() {
18361
- if (this.filterSubscription) {
18362
- this.filterSubscription.unsubscribe();
18363
- }
18364
- if (this.searchSubscription) {
18365
- this.searchSubscription.unsubscribe();
18366
- }
18367
- if (this.showMoreSubscription) {
18368
- this.showMoreSubscription.unsubscribe();
18369
- }
18370
- }
18371
- ngOnInit() {
18372
- this.setAdvancedFilterModalProperties();
18373
- this.initializeData();
18374
- this.setTableLiterals();
18375
- }
18376
- createDisclaimer() {
18377
- this.disclaimerGroup.disclaimers = [];
18378
- this.searchValue = '';
18379
- for (const [key, value] of Object.entries(this.dynamicFormValue)) {
18380
- this.addDisclaimer(value, key);
18381
- }
18382
- if (!Object.values(this.dynamicFormValue).some(v => v !== null && typeof v !== 'undefined')) {
18383
- this.initializeData();
18384
- }
18385
- }
18386
- addDisclaimer(value, property) {
18387
- this.disclaimer = { property: property };
18388
- this.disclaimer.value = value;
18389
- this.disclaimerGroup.disclaimers = [...this.disclaimerGroup.disclaimers, this.disclaimer];
18390
- }
18391
- onChangeDisclaimerGroup() {
18392
- if (!this.searchValue) {
18393
- this.isLoading = true;
18394
- this.searchValue = '';
18395
- this.searchFilteredItems();
18396
- }
18397
- }
18398
- search() {
18399
- this.page = 1;
18400
- if (this.searchValue) {
18401
- this.isLoading = true;
18402
- this.disclaimerGroup.disclaimers = [];
18403
- this.searchFilteredItems();
18404
- }
18405
- else {
18406
- this.initializeData();
18407
- }
18408
- }
18409
- searchFilteredItems() {
18410
- this.searchSubscription = this.getFilteredItems(this.searchValue)
18411
- .pipe(catchError(error => {
18412
- this.setLookupResponseProperties();
18413
- return throwError(error);
18414
- }))
18415
- .subscribe((data) => this.setLookupResponseProperties(data), () => { });
18416
- }
18417
- showMoreEvent() {
18418
- this.page++;
18419
- this.isLoading = true;
18420
- this.showMoreSubscription = this.getFilteredItems(this.searchValue)
18421
- .pipe(catchError(error => {
18422
- this.hasNext = false;
18423
- this.isLoading = false;
18424
- return throwError(error);
18425
- }))
18426
- .subscribe((data) => {
18427
- this.items = [...this.items, ...data.items];
18428
- this.hasNext = data.hasNext;
18429
- this.isLoading = false;
18430
- }, () => { });
18431
- }
18432
- setAdvancedFilterModalProperties() {
18433
- this.advancedFilterModalTitle = this.literals.modalAdvancedSearchTitle;
18434
- this.disclaimerGroup = {
18435
- title: this.literals.modalDisclaimerGroupTitle,
18436
- disclaimers: []
18437
- };
18438
- this.primaryActionAdvancedFilter = {
18439
- action: () => {
18440
- this.destroyDynamicForm();
18441
- this.isAdvancedFilter = false;
18442
- this.createDisclaimer();
18443
- },
18444
- label: this.literals.modalAdvancedSearchPrimaryActionLabel
18445
- };
18446
- this.secondaryActionAdvancedFilter = {
18447
- action: () => {
18448
- this.destroyDynamicForm();
18449
- this.isAdvancedFilter = false;
18450
- },
18451
- label: this.literals.modalAdvancedSearchSecondaryActionLabel
18452
- };
18453
- }
18454
- getAdvancedFilters(advancedParams) {
18455
- if (advancedParams && advancedParams.length > 0) {
18456
- const filters = {};
18457
- let validatedAdvacendFilters;
18458
- advancedParams.forEach((filter) => {
18459
- filters[filter.property] = filter.value instanceof Array ? filter.value.join() : filter.value;
18460
- validatedAdvacendFilters = Object.assign(Object.assign({}, validatedAdvacendFilters), filters);
18461
- });
18462
- return validatedAdvacendFilters;
18463
- }
18464
- return undefined;
18465
- }
18466
- getFilteredItems(filter) {
18467
- const filteredParams = this.getFilteredParams(filter);
18468
- return this.filterService.getFilteredItems(filteredParams);
18469
- }
18470
- getFilteredParams(filter) {
18471
- const { page, pageSize, filterParams, sort } = this;
18472
- const filteredParams = {};
18473
- const order = this.getOrderParam(sort);
18474
- const advancedFilters = this.getAdvancedFilters(this.disclaimerGroup.disclaimers);
18475
- const params = { filter, page, pageSize, order, filterParams, advancedFilters };
18476
- for (const key in params) {
18477
- if (params.hasOwnProperty(key) && params[key] !== undefined) {
18478
- filteredParams[key] = params[key];
18479
- }
18480
- }
18481
- return filteredParams;
18482
- }
18483
- getOrderParam(sort = { type: undefined }) {
18484
- const { column, type } = sort;
18485
- if (!column) {
18486
- return;
18487
- }
18488
- if (type === PoTableColumnSortType.Descending) {
18489
- return `-${column.property}`;
18490
- }
18491
- return `${column.property}`;
18492
- }
18493
- initializeData() {
18494
- this.isLoading = true;
18495
- this.filterSubscription = this.getFilteredItems('').subscribe(data => {
18496
- this.setLookupResponseProperties(data);
18497
- });
18498
- }
18499
- setLookupResponseProperties(data) {
18500
- var _a, _b;
18501
- this.items = (_a = data === null || data === void 0 ? void 0 : data.items) !== null && _a !== void 0 ? _a : [];
18502
- this.hasNext = (_b = data === null || data === void 0 ? void 0 : data.hasNext) !== null && _b !== void 0 ? _b : false;
18503
- this.isLoading = false;
18504
- }
18505
- setTableLiterals() {
18506
- this.tableLiterals = {
18507
- 'noColumns': this.literals.modalTableNoColumns,
18508
- 'noData': this.literals.modalTableNoData,
18509
- 'loadingData': this.literals.modalTableLoadingData,
18510
- 'loadMoreData': this.literals.modalTableLoadMoreData
18511
- };
18512
- }
18513
- }
18514
- PoLookupModalBaseComponent.decorators = [
18515
- { type: Directive }
18516
- ];
18517
- PoLookupModalBaseComponent.ctorParameters = () => [
18518
- { type: PoLanguageService }
18519
- ];
18520
- PoLookupModalBaseComponent.propDecorators = {
18521
- poModal: [{ type: ViewChild, args: [PoModalComponent, { static: true },] }],
18522
- advancedFilters: [{ type: Input, args: ['p-advanced-filters',] }],
18523
- columns: [{ type: Input, args: ['p-columns',] }],
18524
- items: [{ type: Input, args: ['p-items',] }],
18525
- filterService: [{ type: Input, args: ['p-filter-service',] }],
18526
- filterParams: [{ type: Input, args: ['p-filter-params',] }],
18527
- infiniteScroll: [{ type: Input, args: ['p-infinite-scroll',] }],
18528
- model: [{ type: Output, args: ['p-change-model',] }],
18529
- literals: [{ type: Input, args: ['p-literals',] }],
18530
- title: [{ type: Input, args: ['p-title',] }]
18531
- };
18532
- __decorate([
18533
- InputBoolean()
18534
- ], PoLookupModalBaseComponent.prototype, "infiniteScroll", void 0);
18535
-
18536
18812
  /**
18537
18813
  * @docsPrivate
18538
18814
  *
18539
18815
  * @docsExtends PoLookupModalBaseComponent
18540
18816
  */
18541
18817
  class PoLookupModalComponent extends PoLookupModalBaseComponent {
18542
- constructor(componentFactory, poLanguage) {
18543
- super(poLanguage);
18818
+ constructor(componentFactory, poLanguage, changeDetector) {
18819
+ super(poLanguage, changeDetector);
18544
18820
  this.componentFactory = componentFactory;
18545
18821
  this.keyUpObservable = null;
18546
18822
  this.containerHeight = 375;
@@ -18552,6 +18828,31 @@ class PoLookupModalComponent extends PoLookupModalBaseComponent {
18552
18828
  ngAfterViewInit() {
18553
18829
  this.initializeEventInput();
18554
18830
  }
18831
+ // Seleciona um item na tabela
18832
+ onSelect(item) {
18833
+ if (this.multiple) {
18834
+ this.selecteds = [...this.selecteds, Object.assign({ value: item[this.fieldValue], label: item[this.fieldLabel] }, item)];
18835
+ }
18836
+ else {
18837
+ this.selecteds = [Object.assign({ value: item[this.fieldValue], label: item[this.fieldLabel] }, item)];
18838
+ }
18839
+ }
18840
+ // Remove a seleção de um item na tabela
18841
+ onUnselect(unselectedItem) {
18842
+ this.selecteds = this.selecteds.filter(itemSelected => itemSelected.value !== unselectedItem[this.fieldValue]);
18843
+ }
18844
+ onUnselectFromDisclaimer(removedDisclaimer) {
18845
+ this.poTable.unselectRowItem(item => item[this.fieldValue] === removedDisclaimer.value);
18846
+ }
18847
+ // Seleciona todos os itens visíveis na tabela
18848
+ onAllSelected(items) {
18849
+ this.selecteds = items.map(item => (Object.assign({ value: item[this.fieldValue], label: item[this.fieldLabel] }, item)));
18850
+ }
18851
+ // Remove a seleção de todos os itens visíveis na tabela
18852
+ onAllUnselected(items) {
18853
+ this.poTable.unselectRows();
18854
+ this.selecteds = [];
18855
+ }
18555
18856
  initializeEventInput() {
18556
18857
  this.keyUpObservable = fromEvent(this.inputSearchEl.nativeElement, 'keyup').pipe(filter((e) => this.validateEnterPressed(e)), debounceTime(400));
18557
18858
  this.keyUpObservable.subscribe(() => {
@@ -18574,6 +18875,16 @@ class PoLookupModalComponent extends PoLookupModalBaseComponent {
18574
18875
  this.createDynamicForm();
18575
18876
  }
18576
18877
  setTableHeight() {
18878
+ var _a;
18879
+ if (this.multiple) {
18880
+ if (((_a = this.selecteds) === null || _a === void 0 ? void 0 : _a.length) !== 0) {
18881
+ this.tableHeight = 300;
18882
+ }
18883
+ else {
18884
+ this.tableHeight = 370;
18885
+ this.containerHeight = 375;
18886
+ }
18887
+ }
18577
18888
  // precisa ser 315 por as linhas terem altura de 32px (quando tela menor que 1366px).
18578
18889
  // O retorno padrão é 10 itens fazendo com que gere scroll caso houver paginação, 370 não gerava.
18579
18890
  this.tableHeight = this.infiniteScroll ? 315 : 370;
@@ -18607,14 +18918,16 @@ class PoLookupModalComponent extends PoLookupModalBaseComponent {
18607
18918
  PoLookupModalComponent.decorators = [
18608
18919
  { type: Component, args: [{
18609
18920
  selector: 'po-lookup-modal',
18610
- template: "<po-modal\n p-click-out=\"false\"\n p-hide-close=\"false\"\n p-size=\"lg\"\n [p-primary-action]=\"isAdvancedFilter ? primaryActionAdvancedFilter : primaryAction\"\n [p-secondary-action]=\"isAdvancedFilter ? secondaryActionAdvancedFilter : secondaryAction\"\n [p-title]=\"isAdvancedFilter ? advancedFilterModalTitle : title\"\n>\n <div [hidden]=\"isAdvancedFilter\">\n <po-field-container class=\"po-lookup-header po-pull-right\" [p-optional]=\"false\">\n <div class=\"po-lookup-filter-content\">\n <div class=\"po-field-icon-container-right\">\n <span #iconLookup class=\"po-icon po-field-icon po-icon-search\" (click)=\"search()\"> </span>\n </div>\n\n <input\n #inpsearch\n class=\"po-input po-input-icon-right\"\n name=\"contentSearch\"\n [(ngModel)]=\"searchValue\"\n [placeholder]=\"literals.modalPlaceholder\"\n type=\"text\"\n />\n </div>\n\n <div *ngIf=\"advancedFilters && advancedFilters.length > 0\" class=\"po-lookup-advanced-search\">\n <span\n class=\"po-lookup-advanced-search-link\"\n tabindex=\"0\"\n (click)=\"onAdvancedFilter()\"\n (keydown.enter)=\"onAdvancedFilter()\"\n tabindex=\"0\"\n >\n {{ literals.modalAdvancedSearch }}\n </span>\n </div>\n </po-field-container>\n\n <!-- DISCLAIMER -->\n <po-disclaimer-group\n class=\"po-md-12\"\n *ngIf=\"!!disclaimerGroup\"\n [p-disclaimers]=\"disclaimerGroup?.disclaimers\"\n [p-title]=\"disclaimerGroup?.title\"\n (p-change)=\"onChangeDisclaimerGroup()\"\n >\n </po-disclaimer-group>\n\n <div class=\"po-row po-lookup-container-table\" [style.height.px]=\"containerHeight\">\n <po-table\n class=\"po-md-12\"\n [p-selectable]=\"true\"\n [p-hide-detail]=\"true\"\n [p-single-select]=\"true\"\n [p-sort]=\"true\"\n [p-columns]=\"columns\"\n [p-height]=\"tableHeight\"\n [p-items]=\"items\"\n [p-literals]=\"tableLiterals\"\n [p-loading]=\"isLoading\"\n [p-show-more-disabled]=\"!hasNext\"\n [p-infinite-scroll]=\"infiniteScroll\"\n (p-show-more)=\"showMoreEvent()\"\n (p-sort-by)=\"sortBy($event)\"\n >\n </po-table>\n </div>\n </div>\n <div [hidden]=\"!isAdvancedFilter\">\n <ng-container #container> </ng-container>\n </div>\n</po-modal>\n"
18921
+ template: "<po-modal\n p-click-out=\"false\"\n p-hide-close=\"false\"\n p-size=\"lg\"\n [p-primary-action]=\"isAdvancedFilter ? primaryActionAdvancedFilter : primaryAction\"\n [p-secondary-action]=\"isAdvancedFilter ? secondaryActionAdvancedFilter : secondaryAction\"\n [p-title]=\"isAdvancedFilter ? advancedFilterModalTitle : title\"\n>\n <div [hidden]=\"isAdvancedFilter\">\n <po-field-container class=\"po-lookup-header po-pull-right\" [p-optional]=\"false\">\n <div class=\"po-lookup-filter-content\">\n <div class=\"po-field-icon-container-right\">\n <span #iconLookup class=\"po-icon po-field-icon po-icon-search\" (click)=\"search()\"> </span>\n </div>\n\n <input\n #inpsearch\n class=\"po-input po-input-icon-right\"\n name=\"contentSearch\"\n [(ngModel)]=\"searchValue\"\n [placeholder]=\"literals.modalPlaceholder\"\n type=\"text\"\n />\n </div>\n\n <div *ngIf=\"advancedFilters && advancedFilters.length > 0\" class=\"po-lookup-advanced-search\">\n <span\n class=\"po-lookup-advanced-search-link\"\n tabindex=\"0\"\n (click)=\"onAdvancedFilter()\"\n (keydown.enter)=\"onAdvancedFilter()\"\n tabindex=\"0\"\n >\n {{ literals.modalAdvancedSearch }}\n </span>\n </div>\n </po-field-container>\n\n <!-- DISCLAIMER -->\n <po-disclaimer-group\n *ngIf=\"!!disclaimerGroup\"\n class=\"po-md-12\"\n [p-disclaimers]=\"disclaimerGroup?.disclaimers\"\n [p-title]=\"disclaimerGroup?.title\"\n (p-change)=\"onChangeDisclaimerGroup()\"\n >\n </po-disclaimer-group>\n\n <div class=\"po-row po-lookup-container-table\" [style.height.px]=\"containerHeight\">\n <po-table\n #poTable\n class=\"po-md-12\"\n [p-selectable]=\"true\"\n [p-hide-detail]=\"true\"\n [p-single-select]=\"!multiple\"\n [p-sort]=\"true\"\n [p-columns]=\"columns\"\n [p-height]=\"tableHeight\"\n [p-items]=\"items\"\n [p-literals]=\"tableLiterals\"\n [p-loading]=\"isLoading\"\n [p-show-more-disabled]=\"!hasNext\"\n [p-infinite-scroll]=\"infiniteScroll\"\n (p-selected)=\"onSelect($event)\"\n (p-unselected)=\"onUnselect($event)\"\n (p-all-selected)=\"onAllSelected($event)\"\n (p-all-unselected)=\"onAllUnselected($event)\"\n (p-show-more)=\"showMoreEvent()\"\n (p-sort-by)=\"sortBy($event)\"\n >\n </po-table>\n </div>\n\n <!-- DISCLAIMER -->\n <po-disclaimer-group\n *ngIf=\"multiple\"\n class=\"po-md-12\"\n [p-disclaimers]=\"selecteds\"\n (p-remove)=\"onUnselectFromDisclaimer($event.removedDisclaimer)\"\n (p-remove-all)=\"onAllUnselected($event)\"\n >\n </po-disclaimer-group>\n </div>\n <div [hidden]=\"!isAdvancedFilter\">\n <ng-container #container> </ng-container>\n </div>\n</po-modal>\n"
18611
18922
  },] }
18612
18923
  ];
18613
18924
  PoLookupModalComponent.ctorParameters = () => [
18614
18925
  { type: ComponentFactoryResolver },
18615
- { type: PoLanguageService }
18926
+ { type: PoLanguageService },
18927
+ { type: ChangeDetectorRef }
18616
18928
  ];
18617
18929
  PoLookupModalComponent.propDecorators = {
18930
+ poTable: [{ type: ViewChild, args: [PoTableComponent, { static: true },] }],
18618
18931
  inputSearchEl: [{ type: ViewChild, args: ['inpsearch',] }],
18619
18932
  container: [{ type: ViewChild, args: ['container', { read: ViewContainerRef },] }]
18620
18933
  };
@@ -18639,9 +18952,12 @@ class PoLookupModalService {
18639
18952
  * @param filterParams {any} Valor que será repassado aos métodos do serviço para auxiliar no filtro dos dados.
18640
18953
  * @param title {string} Definição do título da modal.
18641
18954
  * @param literals {PoLookupLiterals} Literais utilizadas no componente.
18955
+ * @param selectedItems {any} Valor que está selecionado que será repassado para o modal para apresentar na tabela.
18956
+ * @param fieldLabel {string} Valor que será utilizado como descrição do campo.
18957
+ * @param fieldValue {string} Valor que será utilizado como valor do campo.
18642
18958
  */
18643
18959
  openModal(params) {
18644
- const { advancedFilters, service, columns, filterParams, title, literals, infiniteScroll } = params;
18960
+ const { advancedFilters, service, columns, filterParams, title, literals, infiniteScroll, multiple, selectedItems, fieldLabel, fieldValue } = params;
18645
18961
  this.componentRef = this.poComponentInjector.createComponentInApplication(PoLookupModalComponent);
18646
18962
  this.componentRef.instance.advancedFilters = advancedFilters;
18647
18963
  this.componentRef.instance.title = title;
@@ -18653,6 +18969,10 @@ class PoLookupModalService {
18653
18969
  this.selectValue($event);
18654
18970
  });
18655
18971
  this.componentRef.instance.infiniteScroll = infiniteScroll;
18972
+ this.componentRef.instance.multiple = multiple;
18973
+ this.componentRef.instance.selectedItems = selectedItems;
18974
+ this.componentRef.instance.fieldLabel = fieldLabel;
18975
+ this.componentRef.instance.fieldValue = fieldValue;
18656
18976
  this.componentRef.changeDetectorRef.detectChanges();
18657
18977
  this.componentRef.instance.openModal();
18658
18978
  }
@@ -18738,11 +19058,23 @@ const providers$2 = [
18738
19058
  * <file name="sample-po-lookup-sw-films/sample-po-lookup-sw-films.component.ts"> </file>
18739
19059
  * <file name="sample-po-lookup-sw-films/sample-po-lookup-sw-films.service.ts"> </file>
18740
19060
  * </example>
19061
+ *
19062
+ * <example name="po-lookup-multiple" title="PO Lookup - Multiple">
19063
+ * <file name="sample-po-lookup-multiple/sample-po-lookup-multiple.component.html"> </file>
19064
+ * <file name="sample-po-lookup-multiple/sample-po-lookup-multiple.component.ts"> </file>
19065
+ * <file name="sample-po-lookup-multiple/sample-po-lookup-multiple.service.ts"> </file>
19066
+ * </example>
18741
19067
  */
18742
19068
  class PoLookupComponent extends PoLookupBaseComponent {
18743
- constructor(poLookupFilterService, poLookupModalService, injector) {
19069
+ constructor(renderer, poLookupFilterService, poLookupModalService, injector) {
18744
19070
  super(poLookupFilterService, injector);
19071
+ this.renderer = renderer;
18745
19072
  this.poLookupModalService = poLookupModalService;
19073
+ this.initialized = false;
19074
+ this.visibleElement = false;
19075
+ this.disclaimers = [];
19076
+ this.visibleDisclaimers = [];
19077
+ this.isCalculateVisibleItems = true;
18746
19078
  }
18747
19079
  get autocomplete() {
18748
19080
  return this.noAutocomplete ? 'off' : 'on';
@@ -18752,6 +19084,17 @@ class PoLookupComponent extends PoLookupBaseComponent {
18752
19084
  if (this.autoFocus) {
18753
19085
  this.focus();
18754
19086
  }
19087
+ this.initialized = true;
19088
+ }
19089
+ ngDoCheck() {
19090
+ var _a;
19091
+ const inputWidth = (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth;
19092
+ // Permite que os disclaimers sejam calculados na primeira vez que o componente torna-se visível,
19093
+ // evitando com isso, problemas com Tabs ou Divs que iniciem escondidas.
19094
+ if ((inputWidth && !this.visibleElement && this.initialized) || (inputWidth && this.isCalculateVisibleItems)) {
19095
+ this.debounceResize();
19096
+ this.visibleElement = true;
19097
+ }
18755
19098
  }
18756
19099
  ngOnDestroy() {
18757
19100
  if (this.modalSubscription) {
@@ -18760,6 +19103,7 @@ class PoLookupComponent extends PoLookupBaseComponent {
18760
19103
  }
18761
19104
  ngOnInit() {
18762
19105
  super.ngOnInit();
19106
+ this.initializeListeners();
18763
19107
  }
18764
19108
  /**
18765
19109
  * Função que atribui foco ao componente.
@@ -18785,7 +19129,8 @@ class PoLookupComponent extends PoLookupBaseComponent {
18785
19129
  }
18786
19130
  openLookup() {
18787
19131
  if (this.isAllowedOpenModal()) {
18788
- const { advancedFilters, service, columns, filterParams, literals, infiniteScroll } = this;
19132
+ const { advancedFilters, service, columns, filterParams, literals, infiniteScroll, multiple, fieldLabel, fieldValue } = this;
19133
+ const selectedItems = this.checkSelectedItems();
18789
19134
  this.poLookupModalService.openModal({
18790
19135
  advancedFilters,
18791
19136
  service,
@@ -18793,20 +19138,44 @@ class PoLookupComponent extends PoLookupBaseComponent {
18793
19138
  filterParams,
18794
19139
  title: this.label,
18795
19140
  literals,
18796
- infiniteScroll
19141
+ infiniteScroll,
19142
+ multiple,
19143
+ selectedItems,
19144
+ fieldLabel,
19145
+ fieldValue
18797
19146
  });
18798
19147
  if (!this.modalSubscription) {
18799
- this.modalSubscription = this.poLookupModalService.selectValueEvent.subscribe(element => {
18800
- this.selectModel(element);
19148
+ this.modalSubscription = this.poLookupModalService.selectValueEvent.subscribe(selectedOptions => {
19149
+ if (selectedOptions.length > 1 || this.disclaimers.length) {
19150
+ this.setDisclaimers(selectedOptions);
19151
+ this.updateVisibleItems();
19152
+ }
19153
+ this.selectModel(selectedOptions);
18801
19154
  });
18802
19155
  }
18803
19156
  }
18804
19157
  }
19158
+ checkSelectedItems() {
19159
+ var _a;
19160
+ if (this.multiple) {
19161
+ if (!this.disclaimers.length && ((_a = this.valueToModel) === null || _a === void 0 ? void 0 : _a.length)) {
19162
+ return [Object.assign({ value: this.valueToModel[0], label: this.oldValue }, this.selectedOptions[0])];
19163
+ }
19164
+ return this.disclaimers;
19165
+ }
19166
+ else {
19167
+ return this.valueToModel;
19168
+ }
19169
+ }
19170
+ setDisclaimers(selectedOptions) {
19171
+ this.disclaimers = selectedOptions.map(selectedOption => (Object.assign({ value: selectedOption[this.fieldValue], label: selectedOption[this.fieldLabel] }, selectedOption)));
19172
+ this.visibleDisclaimers = [...this.disclaimers];
19173
+ }
18805
19174
  setViewValue(value, object) {
18806
- if (this.fieldFormat) {
19175
+ if (this.inputEl && this.fieldFormat) {
18807
19176
  this.setInputValueWipoieldFormat(object);
18808
19177
  }
18809
- else {
19178
+ else if (this.inputEl) {
18810
19179
  this.inputEl.nativeElement.value = this.valueToModel || this.valueToModel === 0 ? value : '';
18811
19180
  }
18812
19181
  }
@@ -18814,13 +19183,81 @@ class PoLookupComponent extends PoLookupBaseComponent {
18814
19183
  return this.inputEl.nativeElement.value;
18815
19184
  }
18816
19185
  searchEvent() {
18817
- var _a;
19186
+ var _a, _b;
18818
19187
  (_a = this.onTouched) === null || _a === void 0 ? void 0 : _a.call(this);
18819
19188
  const value = this.getViewValue();
18820
- if (this.oldValue.toString() !== value) {
19189
+ if (((_b = this.oldValue) === null || _b === void 0 ? void 0 : _b.toString()) !== value) {
18821
19190
  this.searchById(value);
18822
19191
  }
18823
19192
  }
19193
+ closeDisclaimer(value) {
19194
+ this.disclaimers = this.disclaimers.filter(disclaimer => disclaimer.value !== value);
19195
+ this.valueToModel = this.valueToModel.filter(model => model !== value);
19196
+ this.updateVisibleItems();
19197
+ this.callOnChange(this.valueToModel.length ? this.valueToModel : undefined);
19198
+ }
19199
+ updateVisibleItems() {
19200
+ if (this.disclaimers && this.disclaimers.length > 0) {
19201
+ this.visibleDisclaimers = [].concat(this.disclaimers);
19202
+ }
19203
+ this.debounceResize();
19204
+ if (!this.inputEl.nativeElement.offsetWidth) {
19205
+ this.isCalculateVisibleItems = true;
19206
+ }
19207
+ }
19208
+ debounceResize() {
19209
+ if (!this.autoHeight) {
19210
+ clearTimeout(this.timeoutResize);
19211
+ this.timeoutResize = setTimeout(() => {
19212
+ this.calculateVisibleItems();
19213
+ }, 200);
19214
+ }
19215
+ }
19216
+ getInputWidth() {
19217
+ return this.inputEl.nativeElement.offsetWidth - 40;
19218
+ }
19219
+ getDisclaimersWidth() {
19220
+ const disclaimers = this.inputEl.nativeElement.querySelectorAll('po-disclaimer');
19221
+ return Array.from(disclaimers).map(disclaimer => disclaimer['offsetWidth']);
19222
+ }
19223
+ calculateVisibleItems() {
19224
+ const disclaimersWidth = this.getDisclaimersWidth();
19225
+ const inputWidth = this.getInputWidth();
19226
+ const extraDisclaimerSize = 38;
19227
+ const disclaimersVisible = disclaimersWidth[0];
19228
+ const newDisclaimers = [];
19229
+ const disclaimers = this.disclaimers;
19230
+ if (inputWidth > 0) {
19231
+ let sum = 0;
19232
+ let i = 0;
19233
+ for (i = 0; i < disclaimers.length; i++) {
19234
+ sum += disclaimersWidth[i];
19235
+ newDisclaimers.push(disclaimers[i]);
19236
+ if (sum > inputWidth) {
19237
+ sum -= disclaimersWidth[i];
19238
+ this.isCalculateVisibleItems = false;
19239
+ break;
19240
+ }
19241
+ }
19242
+ if (disclaimersVisible || !disclaimers.length) {
19243
+ if (i === disclaimers.length) {
19244
+ this.isCalculateVisibleItems = false;
19245
+ return;
19246
+ }
19247
+ if (sum + extraDisclaimerSize > inputWidth) {
19248
+ newDisclaimers.splice(-2, 2);
19249
+ const label = '+' + (disclaimers.length + 1 - i).toString();
19250
+ newDisclaimers.push({ value: '', label: label });
19251
+ }
19252
+ else {
19253
+ newDisclaimers.splice(-1, 1);
19254
+ const label = '+' + (disclaimers.length - i).toString();
19255
+ newDisclaimers.push({ value: '', label: label });
19256
+ }
19257
+ }
19258
+ }
19259
+ this.visibleDisclaimers = [...newDisclaimers];
19260
+ }
18824
19261
  isAllowedOpenModal() {
18825
19262
  if (!this.service) {
18826
19263
  console.warn('No service informed');
@@ -18858,21 +19295,27 @@ class PoLookupComponent extends PoLookupBaseComponent {
18858
19295
  this.oldValue = isEmpty ? '' : fieldFormated;
18859
19296
  this.inputEl.nativeElement.value = isEmpty ? '' : fieldFormated;
18860
19297
  }
19298
+ initializeListeners() {
19299
+ this.resizeListener = this.renderer.listen('window', 'resize', () => {
19300
+ this.updateVisibleItems();
19301
+ });
19302
+ }
18861
19303
  }
18862
19304
  PoLookupComponent.decorators = [
18863
19305
  { type: Component, args: [{
18864
19306
  selector: 'po-lookup',
18865
- template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\">\n <input\n #inp\n class=\"po-input po-input-icon-right\"\n type=\"text\"\n [autocomplete]=\"autocomplete\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n (blur)=\"searchEvent()\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <span\n #iconLookup\n class=\"po-icon po-field-icon po-icon-search\"\n tabindex=\"-1\"\n [class.po-field-icon]=\"!disabled\"\n [class.po-field-icon-disabled]=\"disabled\"\n (click)=\"openLookup()\"\n (focus)=\"inp.focus()\"\n >\n </span>\n </div>\n </div>\n\n <po-field-container-bottom></po-field-container-bottom>\n</po-field-container>\n",
19307
+ template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\" *ngIf=\"!disclaimers.length; else disclaimersTemplate\">\n <input\n #inp\n class=\"po-input\"\n type=\"text\"\n [ngClass]=\"clean && inp.value ? 'po-input-double-icon-right' : 'po-input-icon-right'\"\n [autocomplete]=\"autocomplete\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n (blur)=\"searchEvent()\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean *ngIf=\"clean && !disabled\" [p-element-ref]=\"inputEl\" (p-change-event)=\"cleanModel()\"> </po-clean>\n\n <span\n #iconLookup\n class=\"po-icon po-field-icon po-icon-search\"\n tabindex=\"-1\"\n [class.po-field-icon]=\"!disabled\"\n [class.po-field-icon-disabled]=\"disabled\"\n (click)=\"openLookup()\"\n (focus)=\"inp.focus()\"\n >\n </span>\n </div>\n </div>\n <po-field-container-bottom></po-field-container-bottom>\n</po-field-container>\n\n<ng-template #disclaimersTemplate>\n <div class=\"po-field-container-content\">\n <div\n #inp\n [tabindex]=\"disabled ? -1 : 0\"\n class=\"po-input po-input-icon-right po-lookup-input\"\n [class.po-lookup-input-auto]=\"autoHeight\"\n [class.po-lookup-input-static]=\"!autoHeight\"\n [class.po-lookup-input-disabled]=\"disabled\"\n >\n <span *ngIf=\"placeholder && !disclaimers?.length\" class=\"po-lookup-input-placeholder\">\n {{ placeholder }}\n </span>\n\n <po-disclaimer\n *ngFor=\"let disclaimer of visibleDisclaimers\"\n class=\"po-lookup-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 (p-close-action)=\"closeDisclaimer(disclaimer.value)\"\n >\n </po-disclaimer>\n </div>\n\n <div class=\"po-field-icon-container-right\">\n <span\n #iconLookup\n class=\"po-icon po-field-icon po-icon-search\"\n tabindex=\"-1\"\n [class.po-field-icon]=\"!disabled\"\n [class.po-field-icon-disabled]=\"disabled\"\n (click)=\"openLookup()\"\n (focus)=\"inp.focus()\"\n >\n </span>\n </div>\n </div>\n</ng-template>\n",
18866
19308
  providers: providers$2
18867
19309
  },] }
18868
19310
  ];
18869
19311
  PoLookupComponent.ctorParameters = () => [
19312
+ { type: Renderer2 },
18870
19313
  { type: PoLookupFilterService },
18871
19314
  { type: PoLookupModalService },
18872
19315
  { type: Injector }
18873
19316
  ];
18874
19317
  PoLookupComponent.propDecorators = {
18875
- inputEl: [{ type: ViewChild, args: ['inp', { read: ElementRef, static: true },] }]
19318
+ inputEl: [{ type: ViewChild, args: ['inp', { read: ElementRef, static: false },] }]
18876
19319
  };
18877
19320
 
18878
19321
  /**
@@ -21486,8 +21929,8 @@ PoNumberComponent.propDecorators = {
21486
21929
  */
21487
21930
  class PoPasswordComponent extends PoInputGeneric {
21488
21931
  /* istanbul ignore next */
21489
- constructor(el) {
21490
- super(el);
21932
+ constructor(el, cd) {
21933
+ super(el, cd);
21491
21934
  this.type = 'password';
21492
21935
  this.visiblePassword = false;
21493
21936
  this._hidePasswordPeek = false;
@@ -21526,6 +21969,7 @@ PoPasswordComponent.decorators = [
21526
21969
  { type: Component, args: [{
21527
21970
  selector: 'po-password',
21528
21971
  template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\">\n <div class=\"po-field-icon-container-left\">\n <span class=\"po-icon po-field-icon po-icon-lock\" [class.po-field-icon-disabled]=\"disabled\"> </span>\n </div>\n\n <input\n #inp\n class=\"po-input po-input-icon-left\"\n [attr.name]=\"name\"\n [autocomplete]=\"autocomplete\"\n [class.po-input-double-icon-right]=\"clean && inp.value && !hidePasswordPeek\"\n [class.po-input-icon-right]=\"clean || !hidePasswordPeek\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [type]=\"disabled ? 'password' : type\"\n (blur)=\"eventOnBlur($event)\"\n (click)=\"eventOnClick($event)\"\n (focus)=\"eventOnFocus($event)\"\n (input)=\"eventOnInput($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean *ngIf=\"clean && !disabled && !readonly\" [p-element-ref]=\"inputEl\" (p-change-event)=\"clear($event)\">\n </po-clean>\n\n <span\n *ngIf=\"!hidePasswordPeek && !disabled\"\n class=\"po-icon po-field-icon\"\n [ngClass]=\"visiblePassword ? 'po-icon-eye' : 'po-icon-eye-off po-field-icon-disabled'\"\n (click)=\"showPassword()\"\n >\n </span>\n </div>\n </div>\n\n <po-field-container-bottom [p-error-pattern]=\"getErrorPattern()\"> </po-field-container-bottom>\n</po-field-container>\n",
21972
+ changeDetection: ChangeDetectionStrategy.OnPush,
21529
21973
  providers: [
21530
21974
  {
21531
21975
  provide: NG_VALUE_ACCESSOR,
@@ -21541,7 +21985,8 @@ PoPasswordComponent.decorators = [
21541
21985
  },] }
21542
21986
  ];
21543
21987
  PoPasswordComponent.ctorParameters = () => [
21544
- { type: ElementRef }
21988
+ { type: ElementRef },
21989
+ { type: ChangeDetectorRef }
21545
21990
  ];
21546
21991
  PoPasswordComponent.propDecorators = {
21547
21992
  hidePasswordPeek: [{ type: Input, args: ['p-hide-password-peek',] }]
@@ -22367,37 +22812,8 @@ PoSelectComponent.propDecorators = {
22367
22812
  onKeydown: [{ type: HostListener, args: ['keydown', ['$event'],] }]
22368
22813
  };
22369
22814
 
22370
- /**
22371
- * @usedBy PoSwitchComponent
22372
- *
22373
- * @description
22374
- *
22375
- * Enum para posicionar o label do valor do po-switch.
22376
- */
22377
- var PoSwitchLabelPosition;
22378
- (function (PoSwitchLabelPosition) {
22379
- /** Posiciona o label do lado esquerdo do switch. */
22380
- PoSwitchLabelPosition[PoSwitchLabelPosition["Right"] = 0] = "Right";
22381
- /** Posiciona o label do lado direito do switch. */
22382
- PoSwitchLabelPosition[PoSwitchLabelPosition["Left"] = 1] = "Left";
22383
- })(PoSwitchLabelPosition || (PoSwitchLabelPosition = {}));
22384
-
22385
- /**
22386
- * @description
22387
- *
22388
- * O componente `po-switch` é um [checkbox](/documentation/po-checkbox-group) mais intuitivo, pois faz analogia a um interruptor.
22389
- * Deve ser usado quando deseja-se transmitir a ideia de ligar / desligar uma funcionalidade específica.
22390
- *
22391
- * Pode-se ligar ou deligar o botão utilizando a tecla de espaço ou o clique do mouse.
22392
- *
22393
- * O texto exibido pode ser alterado de acordo com o valor setado aumentando as possibilidades de uso do componente,
22394
- * portanto, recomenda-se informar textos que contextualizem seu uso para que facilite a compreensão do usuário.
22395
- *
22396
- * > O componente não altera o valor incial informado no *model*, portanto indica-se inicializa-lo caso ter necessidade.
22397
- */
22398
- class PoSwitchBaseComponent {
22399
- constructor(changeDetector) {
22400
- this.changeDetector = changeDetector;
22815
+ class PoFieldModel {
22816
+ constructor() {
22401
22817
  /**
22402
22818
  * @optional
22403
22819
  *
@@ -22415,85 +22831,19 @@ class PoSwitchBaseComponent {
22415
22831
  *
22416
22832
  * @description
22417
22833
  *
22418
- * Evento disparado ao alterar valor do campo.
22419
- */
22420
- this.change = new EventEmitter();
22421
- /**
22422
- * @optional
22423
- *
22424
- * @description
22425
- *
22426
- * Função para atualizar o ngModel do componente, necessário quando não for utilizado dentro da tag form.
22427
- */
22428
- this.ngModelChange = new EventEmitter();
22429
- this.switchValue = false;
22430
- this._disabled = false;
22431
- /**
22432
- * Texto exibido quando o valor do componente for `true`.
22433
- *
22434
- * @default `true`
22435
- */
22436
- // eslint-disable-next-line @typescript-eslint/member-ordering
22437
- this.labelOn = 'true';
22438
- /**
22439
- * Texto exibido quando o valor do componente for `false`.
22834
+ * Indica se o campo será desabilitado.
22440
22835
  *
22441
22836
  * @default `false`
22442
22837
  */
22443
- // eslint-disable-next-line @typescript-eslint/member-ordering
22444
- this.labelOff = 'false';
22838
+ this.disabled = false;
22445
22839
  /**
22446
22840
  * @optional
22447
22841
  *
22448
22842
  * @description
22449
22843
  *
22450
- * Posição de exibição do rótulo.
22451
- *
22452
- * > Por padrão exibe à direita.
22844
+ * Evento disparado ao alterar valor do campo.
22453
22845
  */
22454
- // eslint-disable-next-line @typescript-eslint/member-ordering
22455
- this.labelPosition = PoSwitchLabelPosition.Right;
22456
- }
22457
- set setLabelOn(label) {
22458
- this.labelOn = label || 'true';
22459
- }
22460
- set setLabelOff(label) {
22461
- this.labelOff = label || 'false';
22462
- }
22463
- set setLabelPosition(position) {
22464
- this.labelPosition = position in PoSwitchLabelPosition ? parseInt(position, 10) : PoSwitchLabelPosition.Right;
22465
- }
22466
- /**
22467
- * @optional
22468
- *
22469
- * @description
22470
- *
22471
- * Indica se o campo será desabilitado.
22472
- *
22473
- * @default `false`
22474
- */
22475
- set disabled(disabled) {
22476
- this._disabled = convertToBoolean(disabled);
22477
- }
22478
- get disabled() {
22479
- return this._disabled;
22480
- }
22481
- changeValue(value) {
22482
- if (this.switchValue !== value) {
22483
- this.switchValue = value;
22484
- if (this.propagateChange) {
22485
- this.propagateChange(value);
22486
- }
22487
- else {
22488
- this.ngModelChange.emit(value);
22489
- }
22490
- this.change.emit(this.switchValue);
22491
- }
22492
- }
22493
- eventClick() {
22494
- if (!this.disabled) {
22495
- this.changeValue(!this.switchValue);
22496
- }
22846
+ this.change = new EventEmitter();
22497
22847
  }
22498
22848
  // Função implementada do ControlValueAccessor
22499
22849
  // Usada para interceptar os estados de habilitado via forms api
@@ -22507,36 +22857,62 @@ class PoSwitchBaseComponent {
22507
22857
  this.onTouched = fn;
22508
22858
  }
22509
22859
  writeValue(value) {
22510
- if (value !== this.switchValue) {
22511
- this.switchValue = !!value;
22512
- this.changeDetector.markForCheck();
22860
+ this.onWriteValue(value);
22861
+ }
22862
+ updateModel(value) {
22863
+ if (this.propagateChange) {
22864
+ this.propagateChange(value);
22513
22865
  }
22514
22866
  }
22515
22867
  }
22516
- PoSwitchBaseComponent.decorators = [
22868
+ PoFieldModel.decorators = [
22517
22869
  { type: Directive }
22518
22870
  ];
22519
- PoSwitchBaseComponent.ctorParameters = () => [
22520
- { type: ChangeDetectorRef }
22521
- ];
22522
- PoSwitchBaseComponent.propDecorators = {
22523
- name: [{ type: Input, args: ['name',] }],
22524
- autoFocus: [{ type: Input, args: ['p-auto-focus',] }],
22871
+ PoFieldModel.ctorParameters = () => [];
22872
+ PoFieldModel.propDecorators = {
22525
22873
  label: [{ type: Input, args: ['p-label',] }],
22874
+ name: [{ type: Input, args: ['name',] }],
22526
22875
  help: [{ type: Input, args: ['p-help',] }],
22527
- change: [{ type: Output, args: ['p-change',] }],
22528
- ngModelChange: [{ type: Output, args: ['ngModelChange',] }],
22529
- setLabelOn: [{ type: Input, args: ['p-label-on',] }],
22530
- setLabelOff: [{ type: Input, args: ['p-label-off',] }],
22531
- setLabelPosition: [{ type: Input, args: ['p-label-position',] }],
22532
- disabled: [{ type: Input, args: ['p-disabled',] }]
22876
+ autoFocus: [{ type: Input, args: ['p-auto-focus',] }],
22877
+ disabled: [{ type: Input, args: ['p-disabled',] }],
22878
+ change: [{ type: Output, args: ['p-change',] }]
22533
22879
  };
22534
22880
  __decorate([
22535
22881
  InputBoolean()
22536
- ], PoSwitchBaseComponent.prototype, "autoFocus", void 0);
22882
+ ], PoFieldModel.prototype, "autoFocus", void 0);
22883
+ __decorate([
22884
+ InputBoolean()
22885
+ ], PoFieldModel.prototype, "disabled", void 0);
22886
+
22887
+ /**
22888
+ * @usedBy PoSwitchComponent
22889
+ *
22890
+ * @description
22891
+ *
22892
+ * Enum para posicionar o label do valor do po-switch.
22893
+ */
22894
+ var PoSwitchLabelPosition;
22895
+ (function (PoSwitchLabelPosition) {
22896
+ /** Posiciona o label do lado esquerdo do switch. */
22897
+ PoSwitchLabelPosition[PoSwitchLabelPosition["Right"] = 0] = "Right";
22898
+ /** Posiciona o label do lado direito do switch. */
22899
+ PoSwitchLabelPosition[PoSwitchLabelPosition["Left"] = 1] = "Left";
22900
+ })(PoSwitchLabelPosition || (PoSwitchLabelPosition = {}));
22537
22901
 
22538
22902
  /**
22539
- * @docsExtends PoSwitchBaseComponent
22903
+ * @docsExtends PoFieldModel
22904
+ *
22905
+ * @description
22906
+ *
22907
+ * O componente `po-switch` é um [checkbox](/documentation/po-checkbox-group) mais intuitivo, pois faz analogia a um interruptor.
22908
+ * Deve ser usado quando deseja-se transmitir a ideia de ligar / desligar uma funcionalidade específica.
22909
+ *
22910
+ * Pode-se ligar ou deligar o botão utilizando a tecla de espaço ou o clique do mouse.
22911
+ *
22912
+ * O texto exibido pode ser alterado de acordo com o valor setado aumentando as possibilidades de uso do componente,
22913
+ * portanto, recomenda-se informar textos que contextualizem seu uso para que facilite a compreensão do usuário.
22914
+ *
22915
+ * > O componente não altera o valor incial informado no *model*, portanto indica-se inicializa-lo caso ter necessidade.
22540
22916
  *
22541
22917
  * @example
22542
22918
  *
@@ -22562,9 +22938,51 @@ __decorate([
22562
22938
  * <file name="sample-po-switch-order-reactive-form/sample-po-switch-order-reactive-form.component.ts"> </file>
22563
22939
  * </example>
22564
22940
  */
22565
- class PoSwitchComponent extends PoSwitchBaseComponent {
22941
+ class PoSwitchComponent extends PoFieldModel {
22566
22942
  constructor(changeDetector) {
22567
- super(changeDetector);
22943
+ super();
22944
+ this.changeDetector = changeDetector;
22945
+ this.value = false;
22946
+ this._labelOff = 'false';
22947
+ this._labelOn = 'true';
22948
+ this._labelPosition = PoSwitchLabelPosition.Right;
22949
+ }
22950
+ /**
22951
+ * @optional
22952
+ *
22953
+ * @description
22954
+ *
22955
+ * Posição de exibição do rótulo.
22956
+ *
22957
+ * > Por padrão exibe à direita.
22958
+ */
22959
+ set labelPosition(position) {
22960
+ this._labelPosition = position in PoSwitchLabelPosition ? parseInt(position, 10) : PoSwitchLabelPosition.Right;
22961
+ }
22962
+ get labelPosition() {
22963
+ return this._labelPosition;
22964
+ }
22965
+ /**
22966
+ * Texto exibido quando o valor do componente for `false`.
22967
+ *
22968
+ * @default `false`
22969
+ */
22970
+ set labelOff(label) {
22971
+ this._labelOff = label || 'false';
22972
+ }
22973
+ get labelOff() {
22974
+ return this._labelOff;
22975
+ }
22976
+ /**
22977
+ * Texto exibido quando o valor do componente for `true`.
22978
+ *
22979
+ * @default `true`
22980
+ */
22981
+ set labelOn(label) {
22982
+ this._labelOn = label || 'true';
22983
+ }
22984
+ get labelOn() {
22985
+ return this._labelOn;
22568
22986
  }
22569
22987
  ngAfterViewInit() {
22570
22988
  if (this.autoFocus) {
@@ -22618,16 +23036,34 @@ class PoSwitchComponent extends PoSwitchBaseComponent {
22618
23036
  }
22619
23037
  }
22620
23038
  onKeyDown(event) {
22621
- if (event.which === 32 || event.keyCode === 32) {
23039
+ if (event.which === PoKeyCodeEnum.space || event.keyCode === PoKeyCodeEnum.space) {
22622
23040
  event.preventDefault();
22623
23041
  this.eventClick();
22624
23042
  }
22625
23043
  }
23044
+ changeValue(value) {
23045
+ if (this.value !== value) {
23046
+ this.value = value;
23047
+ this.updateModel(value);
23048
+ this.change.emit(this.value);
23049
+ }
23050
+ }
23051
+ eventClick() {
23052
+ if (!this.disabled) {
23053
+ this.changeValue(!this.value);
23054
+ }
23055
+ }
23056
+ onWriteValue(value) {
23057
+ if (value !== this.value) {
23058
+ this.value = !!value;
23059
+ this.changeDetector.markForCheck();
23060
+ }
23061
+ }
22626
23062
  }
22627
23063
  PoSwitchComponent.decorators = [
22628
23064
  { type: Component, args: [{
22629
23065
  selector: 'po-switch',
22630
- template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\">\n <div class=\"po-field-container-content po-switch-content\" [attr.name]=\"name\">\n <div\n class=\"po-switch-container po-clickable\"\n #switchContainer\n [class.po-switch-container-disabled]=\"disabled\"\n [class.po-switch-container-off]=\"switchValue === false && !disabled\"\n [class.po-switch-container-on]=\"switchValue === true && !disabled\"\n [class.po-switch-container-right]=\"getSwitchPosition() === 'right'\"\n [tabindex]=\"disabled ? -1 : 0\"\n (click)=\"eventClick()\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n >\n <div\n class=\"po-switch-button\"\n [class.po-switch-button-on]=\"switchValue === true\"\n [class.po-switch-button-off]=\"switchValue === false\"\n [class.po-switch-button-disabled]=\"disabled\"\n >\n <span class=\"po-icon po-icon-{{ switchValue === true ? 'ok' : 'close' }}\"></span>\n </div>\n </div>\n\n <span class=\"po-switch-label po-clickable po-switch-label-{{ getLabelPosition() }}\" (click)=\"eventClick()\">\n {{ switchValue === true ? labelOn : labelOff }}\n </span>\n </div>\n\n <po-field-container-bottom></po-field-container-bottom>\n</po-field-container>\n",
23066
+ template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\">\n <div class=\"po-field-container-content po-switch-content\" [attr.name]=\"name\">\n <div\n class=\"po-switch-container po-clickable\"\n #switchContainer\n [class.po-switch-container-disabled]=\"disabled\"\n [class.po-switch-container-off]=\"value === false && !disabled\"\n [class.po-switch-container-on]=\"value === true && !disabled\"\n [class.po-switch-container-right]=\"getSwitchPosition() === 'right'\"\n [tabindex]=\"disabled ? -1 : 0\"\n (click)=\"eventClick()\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n >\n <div\n class=\"po-switch-button\"\n [class.po-switch-button-on]=\"value === true\"\n [class.po-switch-button-off]=\"value === false\"\n [class.po-switch-button-disabled]=\"disabled\"\n >\n <span class=\"po-icon po-icon-{{ value === true ? 'ok' : 'close' }}\"></span>\n </div>\n </div>\n\n <span class=\"po-switch-label po-clickable po-switch-label-{{ getLabelPosition() }}\" (click)=\"eventClick()\">\n {{ value === true ? labelOn : labelOff }}\n </span>\n </div>\n\n <po-field-container-bottom></po-field-container-bottom>\n</po-field-container>\n",
22631
23067
  changeDetection: ChangeDetectionStrategy.OnPush,
22632
23068
  providers: [
22633
23069
  {
@@ -22642,7 +23078,10 @@ PoSwitchComponent.ctorParameters = () => [
22642
23078
  { type: ChangeDetectorRef }
22643
23079
  ];
22644
23080
  PoSwitchComponent.propDecorators = {
22645
- switchContainer: [{ type: ViewChild, args: ['switchContainer', { static: true },] }]
23081
+ switchContainer: [{ type: ViewChild, args: ['switchContainer', { static: true },] }],
23082
+ labelPosition: [{ type: Input, args: ['p-label-position',] }],
23083
+ labelOff: [{ type: Input, args: ['p-label-off',] }],
23084
+ labelOn: [{ type: Input, args: ['p-label-on',] }]
22646
23085
  };
22647
23086
 
22648
23087
  /**
@@ -24610,8 +25049,8 @@ PoUploadFileRestrictionsComponent.propDecorators = {
24610
25049
  */
24611
25050
  class PoUrlComponent extends PoInputGeneric {
24612
25051
  /* istanbul ignore next */
24613
- constructor(el) {
24614
- super(el);
25052
+ constructor(el, cd) {
25053
+ super(el, cd);
24615
25054
  this.icon = 'po-icon-world';
24616
25055
  this.type = 'url';
24617
25056
  this.pattern = '^((https|http):\\/\\/)?' + // protocol
@@ -24646,6 +25085,7 @@ PoUrlComponent.decorators = [
24646
25085
  { type: Component, args: [{
24647
25086
  selector: 'po-url',
24648
25087
  template: "<po-field-container [p-help]=\"help\" [p-label]=\"label\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon class=\"po-field-icon\" [class.po-field-icon-disabled]=\"disabled\" [p-icon]=\"icon\"></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-input\"\n [attr.name]=\"name\"\n [autocomplete]=\"autocomplete\"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-right]=\"clean\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [type]=\"type\"\n (blur)=\"eventOnBlur($event)\"\n (click)=\"eventOnClick($event)\"\n (focus)=\"eventOnFocus($event)\"\n (input)=\"eventOnInput($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean *ngIf=\"clean && !disabled && !readonly\" [p-element-ref]=\"inputEl\" (p-change-event)=\"clear($event)\">\n </po-clean>\n </div>\n </div>\n\n <po-field-container-bottom [p-error-pattern]=\"getErrorPattern()\"> </po-field-container-bottom>\n</po-field-container>\n",
25088
+ changeDetection: ChangeDetectionStrategy.OnPush,
24649
25089
  providers: [
24650
25090
  {
24651
25091
  provide: NG_VALUE_ACCESSOR,
@@ -24661,7 +25101,8 @@ PoUrlComponent.decorators = [
24661
25101
  },] }
24662
25102
  ];
24663
25103
  PoUrlComponent.ctorParameters = () => [
24664
- { type: ElementRef }
25104
+ { type: ElementRef },
25105
+ { type: ChangeDetectorRef }
24665
25106
  ];
24666
25107
 
24667
25108
  /**
@@ -25345,7 +25786,7 @@ class PoDynamicFormFieldsBaseComponent {
25345
25786
  return 'switch';
25346
25787
  }
25347
25788
  else if (this.compareTo(type, PoDynamicFieldType.Date) || this.compareTo(type, PoDynamicFieldType.DateTime)) {
25348
- return 'datepicker';
25789
+ return field.range ? 'datepickerrange' : 'datepicker';
25349
25790
  }
25350
25791
  else if (this.compareTo(type, PoDynamicFieldType.Time)) {
25351
25792
  field.mask = field.mask || '99:99';
@@ -25544,7 +25985,7 @@ class PoDynamicFormFieldsComponent extends PoDynamicFormFieldsBaseComponent {
25544
25985
  PoDynamicFormFieldsComponent.decorators = [
25545
25986
  { type: Component, args: [{
25546
25987
  selector: 'po-dynamic-form-fields',
25547
- template: "<div class=\"po-row\" *ngIf=\"visibleFields && visibleFields.length > 0\">\n <ng-container *ngFor=\"let field of visibleFields; trackBy: trackBy\">\n <po-divider *ngIf=\"field?.divider?.trim()\" class=\"po-sm-12\" [p-label]=\"field.divider\"> </po-divider>\n\n <po-datepicker\n #component\n *ngIf=\"compareTo(field.control, 'datepicker')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-format]=\"field.format\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-locale]=\"field.locale\"\n [p-max-date]=\"field.maxValue\"\n [p-min-date]=\"field.minValue\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-datepicker>\n\n <po-input\n #component\n *ngIf=\"compareTo(field.control, 'input')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-mask-format-model]=\"field.maskFormatModel\"\n [p-mask]=\"field.mask\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-pattern]=\"field.pattern\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-icon]=\"field.icon\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-input>\n\n <po-number\n #component\n *ngIf=\"compareTo(field.control, 'number')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-min]=\"field.minValue\"\n [p-max]=\"field.maxValue\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-icon]=\"field.icon\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-number>\n\n <po-decimal\n #component\n *ngIf=\"compareTo(field.control, 'decimal')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-decimals-length]=\"field.decimalsLength\"\n [p-thousand-maxlength]=\"field.thousandMaxlength\"\n [p-icon]=\"field.icon\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-locale]=\"field.locale\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-decimal>\n\n <po-select\n #component\n *ngIf=\"compareTo(field.control, 'select')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-select>\n\n <po-radio-group\n #component\n *ngIf=\"compareTo(field.control, 'radioGroup')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-columns=\"3\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n >\n </po-radio-group>\n\n <po-switch\n #component\n *ngIf=\"compareTo(field.control, 'switch')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-label-off]=\"field.booleanFalse\"\n [p-label-on]=\"field.booleanTrue\"\n (p-change)=\"onChangeField(field)\"\n >\n </po-switch>\n\n <po-combo\n #component\n *ngIf=\"compareTo(field.control, 'combo')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-emit-object-value\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-field-label]=\"field.fieldLabel\"\n [p-field-value]=\"field.fieldValue\"\n [p-filter-params]=\"field.params\"\n [p-filter-service]=\"field.optionsService\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field, $event)\"\n [p-icon]=\"field.icon\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-combo>\n\n <po-lookup\n #component\n *ngIf=\"compareTo(field.control, 'lookup')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n p-field-label=\"label\"\n p-field-value=\"value\"\n [ngClass]=\"field.componentClass\"\n [p-columns]=\"field.columns\"\n [p-disabled]=\"isDisabled(field)\"\n [p-field-label]=\"field.fieldLabel || 'label'\"\n [p-field-value]=\"field.fieldValue || 'value'\"\n [p-filter-params]=\"field.params\"\n [p-filter-service]=\"field.searchService\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-field-format]=\"field.format\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-lookup>\n\n <po-checkbox-group\n #component\n *ngIf=\"compareTo(field.control, 'checkboxGroup')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-columns=\"3\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n >\n </po-checkbox-group>\n\n <po-multiselect\n #component\n *ngIf=\"compareTo(field.control, 'multiselect')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-disabled]=\"isDisabled(field)\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-multiselect>\n\n <po-textarea\n #component\n *ngIf=\"compareTo(field.control, 'textarea')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-disabled]=\"isDisabled(field)\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n [p-rows]=\"field.rows\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-textarea>\n\n <po-password\n #component\n *ngIf=\"compareTo(field.control, 'password')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-pattern]=\"field.pattern\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-password>\n </ng-container>\n</div>\n",
25988
+ template: "<div class=\"po-row\" *ngIf=\"visibleFields && visibleFields.length > 0\">\n <ng-container *ngFor=\"let field of visibleFields; trackBy: trackBy\">\n <po-divider *ngIf=\"field?.divider?.trim()\" class=\"po-sm-12\" [p-label]=\"field.divider\"> </po-divider>\n\n <po-datepicker\n #component\n *ngIf=\"compareTo(field.control, 'datepicker')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-format]=\"field.format\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-locale]=\"field.locale\"\n [p-max-date]=\"field.maxValue\"\n [p-min-date]=\"field.minValue\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-datepicker>\n\n <po-datepicker-range\n #component\n *ngIf=\"compareTo(field.control, 'datepickerrange')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n >\n </po-datepicker-range>\n\n <po-input\n #component\n *ngIf=\"compareTo(field.control, 'input')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-mask-format-model]=\"field.maskFormatModel\"\n [p-mask]=\"field.mask\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-pattern]=\"field.pattern\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-icon]=\"field.icon\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-input>\n\n <po-number\n #component\n *ngIf=\"compareTo(field.control, 'number')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-min]=\"field.minValue\"\n [p-max]=\"field.maxValue\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-icon]=\"field.icon\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-number>\n\n <po-decimal\n #component\n *ngIf=\"compareTo(field.control, 'decimal')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-decimals-length]=\"field.decimalsLength\"\n [p-thousand-maxlength]=\"field.thousandMaxlength\"\n [p-icon]=\"field.icon\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-locale]=\"field.locale\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-decimal>\n\n <po-select\n #component\n *ngIf=\"compareTo(field.control, 'select')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-select>\n\n <po-radio-group\n #component\n *ngIf=\"compareTo(field.control, 'radioGroup')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-columns=\"3\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n >\n </po-radio-group>\n\n <po-switch\n #component\n *ngIf=\"compareTo(field.control, 'switch')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-label-off]=\"field.booleanFalse\"\n [p-label-on]=\"field.booleanTrue\"\n (p-change)=\"onChangeField(field)\"\n >\n </po-switch>\n\n <po-combo\n #component\n *ngIf=\"compareTo(field.control, 'combo')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-emit-object-value\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-field-label]=\"field.fieldLabel\"\n [p-field-value]=\"field.fieldValue\"\n [p-filter-params]=\"field.params\"\n [p-filter-service]=\"field.optionsService\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field, $event)\"\n [p-icon]=\"field.icon\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-combo>\n\n <po-lookup\n #component\n *ngIf=\"compareTo(field.control, 'lookup')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n p-field-label=\"label\"\n p-field-value=\"value\"\n [ngClass]=\"field.componentClass\"\n [p-columns]=\"field.columns\"\n [p-disabled]=\"isDisabled(field)\"\n [p-field-label]=\"field.fieldLabel || 'label'\"\n [p-field-value]=\"field.fieldValue || 'value'\"\n [p-filter-params]=\"field.params\"\n [p-filter-service]=\"field.searchService\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-field-format]=\"field.format\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-lookup>\n\n <po-checkbox-group\n #component\n *ngIf=\"compareTo(field.control, 'checkboxGroup')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-columns=\"3\"\n [p-auto-focus]=\"field.focus\"\n [p-disabled]=\"isDisabled(field)\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n >\n </po-checkbox-group>\n\n <po-multiselect\n #component\n *ngIf=\"compareTo(field.control, 'multiselect')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-disabled]=\"isDisabled(field)\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-optional]=\"field.optional\"\n [p-options]=\"field.options\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-multiselect>\n\n <po-textarea\n #component\n *ngIf=\"compareTo(field.control, 'textarea')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n [p-disabled]=\"isDisabled(field)\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-required]=\"field.required\"\n [p-rows]=\"field.rows\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-textarea>\n\n <po-password\n #component\n *ngIf=\"compareTo(field.control, 'password')\"\n [name]=\"field.property\"\n [(ngModel)]=\"value[field.property]\"\n [ngClass]=\"field.componentClass\"\n p-clean\n [p-disabled]=\"isDisabled(field)\"\n [p-error-pattern]=\"field.errorMessage\"\n [p-auto-focus]=\"field.focus\"\n [p-help]=\"field.help\"\n [p-label]=\"field.label\"\n [p-maxlength]=\"field.maxLength\"\n [p-minlength]=\"field.minLength\"\n [p-optional]=\"field.optional\"\n [p-pattern]=\"field.pattern\"\n [p-required]=\"field.required\"\n (p-change)=\"onChangeField(field)\"\n [p-placeholder]=\"field.placeholder\"\n >\n </po-password>\n </ng-container>\n</div>\n",
25548
25989
  viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],
25549
25990
  providers: [PoDynamicFormValidationService]
25550
25991
  },] }
@@ -30408,7 +30849,7 @@ class PoPageHeaderComponent extends PoPageHeaderBaseComponent {
30408
30849
  PoPageHeaderComponent.decorators = [
30409
30850
  { type: Component, args: [{
30410
30851
  selector: 'po-page-header',
30411
- template: "<div class=\"po-page-header\">\n <!-- Breadcrumb -->\n <div class=\"po-page-header-breadcrumb\" *ngIf=\"breadcrumb && breadcrumb.items.length\">\n <po-breadcrumb\n [p-favorite-service]=\"breadcrumb.favorite\"\n [p-items]=\"breadcrumb.items\"\n [p-params-service]=\"breadcrumb.params\"\n >\n </po-breadcrumb>\n </div>\n\n <!-- Titulo -->\n <h1 class=\"po-page-header-title\" *ngIf=\"title\">\n {{ title }}\n </h1>\n\n <!-- Opera\u00E7\u00F5es -->\n <ng-content></ng-content>\n</div>\n"
30852
+ template: "<div class=\"po-page-header\">\n <!-- Breadcrumb -->\n <div class=\"po-page-header-breadcrumb\" *ngIf=\"breadcrumb && breadcrumb.items.length\">\n <po-breadcrumb\n [p-favorite-service]=\"breadcrumb.favorite\"\n [p-items]=\"breadcrumb.items\"\n [p-params-service]=\"breadcrumb.params\"\n >\n </po-breadcrumb>\n </div>\n\n <div class=\"po-pt-1\">\n <!-- Titulo -->\n <h1 class=\"po-page-header-title\" *ngIf=\"title\">\n {{ title }}\n </h1>\n\n <!-- Opera\u00E7\u00F5es -->\n <ng-content></ng-content>\n </div>\n</div>\n"
30412
30853
  },] }
30413
30854
  ];
30414
30855
 
@@ -31724,7 +32165,7 @@ class PoStepperCircleComponent {
31724
32165
  PoStepperCircleComponent.decorators = [
31725
32166
  { type: Component, args: [{
31726
32167
  selector: 'po-stepper-circle',
31727
- template: "<div\n class=\"po-stepper-circle\"\n [class.po-stepper-circle-with-icon]=\"icons\"\n [style.height.px]=\"size\"\n [style.width.px]=\"size\"\n [tabindex]=\"isDisabled ? -1 : 0\"\n>\n <span\n class=\"po-stepper-circle-content\"\n [class.po-icon]=\"icons\"\n [class.po-icon-exclamation]=\"icons && isError\"\n [class.po-icon-info]=\"icons && (isActive || isDefault || isDisabled)\"\n [class.po-icon-ok]=\"icons && isDone\"\n [class.po-stepper-circle-content-lg]=\"isLargeStep\"\n [class.po-stepper-circle-content-md]=\"isMediumStep\"\n >\n {{ !icons ? content : '' }}\n </span>\n</div>\n"
32168
+ template: "<div class=\"po-stepper-circle\" [style.height.px]=\"size\" [style.width.px]=\"size\" [tabindex]=\"isDisabled ? -1 : 0\">\n <span\n *ngIf=\"!isActive\"\n class=\"po-stepper-circle-content\"\n [class.po-icon]=\"icons || isDone\"\n [class.po-icon-exclamation]=\"icons && isError\"\n [class.po-icon-info]=\"icons && (isActive || isDefault || isDisabled)\"\n [class.po-icon-ok]=\"isDone\"\n [class.po-stepper-circle-content-lg]=\"isLargeStep\"\n [class.po-stepper-circle-content-md]=\"isMediumStep\"\n >\n {{ !icons && !isDone ? content : '' }}\n </span>\n\n <div *ngIf=\"isActive || isError\" class=\"po-stepper-circle-active\"></div>\n</div>\n"
31728
32169
  },] }
31729
32170
  ];
31730
32171
  PoStepperCircleComponent.propDecorators = {
@@ -31911,6 +32352,12 @@ PoStepperBaseComponent.propDecorators = {
31911
32352
  * <file name="sample-po-stepper-sales/sample-po-stepper-sales.component.html"> </file>
31912
32353
  * <file name="sample-po-stepper-sales/sample-po-stepper-sales.component.ts"> </file>
31913
32354
  * </example>
32355
+ *
32356
+ * <example name="po-stepper-active" title="PO Stepper - Active">
32357
+ * <file name="sample-po-stepper-active/sample-po-stepper-active.component.html"> </file>
32358
+ * <file name="sample-po-stepper-active/sample-po-stepper-active.component.ts"> </file>
32359
+ * <file name="sample-po-stepper-active/sample-po-stepper-active.service.ts"> </file>
32360
+ * </example>
31914
32361
  */
31915
32362
  class PoStepperComponent extends PoStepperBaseComponent {
31916
32363
  constructor(changeDetector) {
@@ -31945,11 +32392,7 @@ class PoStepperComponent extends PoStepperBaseComponent {
31945
32392
  }
31946
32393
  const stepsArray = this.getPoSteps();
31947
32394
  const step = stepsArray[index];
31948
- const isDisabledStep = step.status === PoStepperStatus.Disabled;
31949
- const isErrorStep = step.status === PoStepperStatus.Error;
31950
- if (!isDisabledStep || isErrorStep) {
31951
- this.changeStep(index, step);
31952
- }
32395
+ this.changeStep(index, step);
31953
32396
  }
31954
32397
  /**
31955
32398
  * Ativa o primeiro *step*.
@@ -32011,8 +32454,12 @@ class PoStepperComponent extends PoStepperBaseComponent {
32011
32454
  }
32012
32455
  onStepActive(step) {
32013
32456
  this.currentActiveStep = step;
32014
- this.previousActiveStep = this.poSteps.find(stepChild => stepChild.status === PoStepperStatus.Active && stepChild.id !== step.id);
32015
- this.setPreviousStepAsDone();
32457
+ const { stepIndex } = this.getStepsAndIndex(this.currentActiveStep);
32458
+ this.poSteps.forEach((stepChild, i) => {
32459
+ if (i < stepIndex) {
32460
+ stepChild.status = PoStepperStatus.Done;
32461
+ }
32462
+ });
32016
32463
  }
32017
32464
  trackByFn(step) {
32018
32465
  return step.id;
@@ -32085,16 +32532,11 @@ class PoStepperComponent extends PoStepperBaseComponent {
32085
32532
  steps[nextIndex].status = PoStepperStatus.Default;
32086
32533
  }
32087
32534
  }
32088
- setPreviousStepAsDone() {
32089
- if (this.previousActiveStep) {
32090
- this.previousActiveStep.status = PoStepperStatus.Done;
32091
- }
32092
- }
32093
32535
  }
32094
32536
  PoStepperComponent.decorators = [
32095
32537
  { type: Component, args: [{
32096
32538
  selector: 'po-stepper',
32097
- template: "<div class=\"po-stepper po-stepper-{{ orientation }}\">\n <div class=\"po-stepper-container\">\n <po-stepper-step\n *ngFor=\"let step of stepList; let index = index; trackBy: trackByFn\"\n class=\"po-stepper-step-position\"\n [p-circle-content]=\"index + 1\"\n [p-label]=\"step.label\"\n [p-orientation]=\"orientation\"\n [p-status]=\"step.status\"\n [p-step-icons]=\"stepIcons\"\n [p-step-size]=\"stepSize\"\n (p-activated)=\"onStepActive(step)\"\n (p-click)=\"changeStep(index, step)\"\n (p-enter)=\"changeStep(index, step)\"\n >\n </po-stepper-step>\n </div>\n\n <div *ngIf=\"usePoSteps\" class=\"po-stepper-content\">\n <ng-content></ng-content>\n </div>\n</div>\n"
32539
+ template: "<div class=\"po-stepper po-stepper-{{ orientation }}\">\n <div class=\"po-stepper-container\">\n <po-stepper-step\n *ngFor=\"let step of stepList; let index = index; trackBy: trackByFn\"\n class=\"po-stepper-step-position\"\n [p-circle-content]=\"index + 1\"\n [p-label]=\"step.label\"\n [p-orientation]=\"orientation\"\n [p-status]=\"step.status\"\n [p-step-icons]=\"stepIcons\"\n [p-step-size]=\"stepSize\"\n [p-next-status]=\"poSteps.get(index + 1)?.status\"\n (p-activated)=\"onStepActive(step)\"\n (p-click)=\"changeStep(index, step)\"\n (p-enter)=\"changeStep(index, step)\"\n >\n </po-stepper-step>\n </div>\n\n <div *ngIf=\"usePoSteps\" class=\"po-stepper-content\">\n <ng-content></ng-content>\n </div>\n</div>\n"
32098
32540
  },] }
32099
32541
  ];
32100
32542
  PoStepperComponent.ctorParameters = () => [
@@ -32193,11 +32635,11 @@ class PoStepperStepComponent {
32193
32635
  getStatusClass(status) {
32194
32636
  switch (status) {
32195
32637
  case PoStepperStatus.Active:
32196
- return 'po-stepper-step-active';
32638
+ return 'po-stepper-step-default';
32197
32639
  case PoStepperStatus.Disabled:
32198
32640
  return 'po-stepper-step-disabled';
32199
32641
  case PoStepperStatus.Done:
32200
- return 'po-stepper-step-done';
32642
+ return 'po-stepper-step-default';
32201
32643
  case PoStepperStatus.Error:
32202
32644
  return 'po-stepper-step-error';
32203
32645
  default:
@@ -32218,12 +32660,13 @@ class PoStepperStepComponent {
32218
32660
  PoStepperStepComponent.decorators = [
32219
32661
  { type: Component, args: [{
32220
32662
  selector: 'po-stepper-step',
32221
- template: "<div class=\"po-stepper-step\" [ngClass]=\"getStatusClass(status)\" (click)=\"onClick()\" (keydown.enter)=\"onEnter()\">\n <div class=\"po-stepper-step-container\" [style.width.px]=\"isVerticalOrientation ? stepSize : undefined\">\n <div\n [class.po-stepper-step-bar-top]=\"isVerticalOrientation\"\n [class.po-stepper-step-bar-left]=\"!isVerticalOrientation\"\n [style.margin-right.px]=\"marginHorizontalBar\"\n ></div>\n\n <po-stepper-circle [p-content]=\"circleContent\" [p-icons]=\"stepIcons\" [p-size]=\"stepSize\" [p-status]=\"status\">\n </po-stepper-circle>\n\n <div\n [class.po-stepper-step-bar-bottom]=\"isVerticalOrientation\"\n [class.po-stepper-step-bar-right]=\"!isVerticalOrientation\"\n [style.margin-left.px]=\"marginHorizontalBar\"\n ></div>\n </div>\n\n <po-stepper-label class=\"po-stepper-step-label-position\" [p-content]=\"label\"> </po-stepper-label>\n</div>\n"
32663
+ template: "<div class=\"po-stepper-step\" [ngClass]=\"getStatusClass(status)\" (click)=\"onClick()\" (keydown.enter)=\"onEnter()\">\n <div class=\"po-stepper-step-container\" [style.width.px]=\"isVerticalOrientation ? stepSize : undefined\">\n <div\n [class.po-stepper-step-bar-top]=\"isVerticalOrientation\"\n [class.po-stepper-step-bar-left]=\"!isVerticalOrientation\"\n [style.margin-right.px]=\"marginHorizontalBar\"\n ></div>\n\n <po-stepper-circle [p-content]=\"circleContent\" [p-icons]=\"stepIcons\" [p-size]=\"stepSize\" [p-status]=\"status\">\n </po-stepper-circle>\n\n <div\n [class.po-stepper-step-bar-bottom]=\"isVerticalOrientation\"\n [class.po-stepper-step-bar-right]=\"!isVerticalOrientation\"\n [class.po-stepper-step-dashed-border]=\"nextStatus === 'disabled' && !isVerticalOrientation\"\n [class.po-stepper-step-dashed-border-vertical]=\"nextStatus === 'disabled' && isVerticalOrientation\"\n [style.margin-left.px]=\"marginHorizontalBar\"\n ></div>\n </div>\n\n <po-stepper-label class=\"po-stepper-step-label-position\" [p-content]=\"label\"> </po-stepper-label>\n</div>\n"
32222
32664
  },] }
32223
32665
  ];
32224
32666
  PoStepperStepComponent.propDecorators = {
32225
32667
  circleContent: [{ type: Input, args: ['p-circle-content',] }],
32226
32668
  orientation: [{ type: Input, args: ['p-orientation',] }],
32669
+ nextStatus: [{ type: Input, args: ['p-next-status',] }],
32227
32670
  activated: [{ type: Output, args: ['p-activated',] }],
32228
32671
  click: [{ type: Output, args: ['p-click',] }],
32229
32672
  enter: [{ type: Output, args: ['p-enter',] }],
@@ -35016,5 +35459,5 @@ function initializeLanguageDefault(config, languageService) {
35016
35459
  * Generated bundle index. Do not edit.
35017
35460
  */
35018
35461
 
35019
- export { I18N_CONFIG, InputBoolean, InputRequired, PO_CONTROL_POSITIONS, PoAccordionComponent, PoAccordionItemComponent, PoAccordionModule, PoActiveOverlayModule, PoActiveOverlayService, PoAvatarComponent, PoAvatarModule, PoBreadcrumbComponent, PoBreadcrumbModule, PoButtonComponent, PoButtonGroupComponent, PoButtonGroupModule, PoButtonGroupToggle, PoButtonModule, PoCalendarComponent, PoCalendarMode, PoCalendarModule, PoChartComponent, PoChartModule, PoChartType, PoCheckboxComponent, PoCheckboxGroupComponent, PoCheckboxGroupModule, PoCleanComponent, PoColorPaletteModule, PoColorPaletteService, PoComboComponent, PoComboFilterMode, PoComboOptionTemplateDirective, PoComponentInjectorModule, PoComponentInjectorService, PoComponentsModule, PoContainerComponent, PoContainerModule, PoControlPositionModule, PoDateService, PoDateTimeModule, PoDatepickerComponent, PoDatepickerIsoFormat, PoDatepickerModule, PoDatepickerRangeComponent, PoDecimalComponent, PoDialogComponent, PoDialogModule, PoDialogService, PoDialogType, PoDirectivesModule, PoDisclaimerComponent, PoDisclaimerGroupComponent, PoDisclaimerGroupModule, PoDisclaimerModule, PoDividerComponent, PoDividerModule, PoDropdownComponent, PoDropdownModule, PoDynamicFieldType, PoDynamicFormComponent, PoDynamicModule, PoDynamicViewComponent, PoEmailComponent, PoFieldModule, PoGaugeComponent, PoGaugeModule, PoGridComponent, PoGridModule, PoGuardsModule, PoHttpInterceptorModule, PoHttpInterceptorService, PoHttpRequestInterceptorService, PoHttpRequestModule, PoI18nModule, PoI18nPipe, PoI18nService, PoIconComponent, PoIconModule, PoInfoComponent, PoInfoModule, PoInfoOrientation, PoInputComponent, PoInterceptorsModule, PoLanguageModule, PoLanguageService, PoListViewComponent, PoListViewContentTemplateDirective, PoListViewDetailTemplateDirective, PoListViewModule, PoLoadingComponent, PoLoadingIconComponent, PoLoadingModule, PoLoadingOverlayComponent, PoLoginComponent, PoLookupComponent, PoLookupModalComponent, PoMenuComponent, PoMenuGlobalService, PoMenuHeaderTemplateDirective, PoMenuModule, PoMenuPanelComponent, PoMenuPanelModule, PoModalComponent, PoModalModule, PoModule, PoMultiselectComponent, PoMultiselectFilterMode, PoNavbarComponent, PoNavbarModule, PoNotificationModule, PoNotificationService, PoNumberComponent, PoPageDefaultComponent, PoPageDetailComponent, PoPageEditComponent, PoPageListComponent, PoPageModule, PoPageSlideComponent, PoPasswordComponent, PoPipesModule, PoPopoverComponent, PoPopoverModule, PoPopupComponent, PoPopupModule, PoProgressComponent, PoProgressModule, PoProgressStatus, PoRadioGroupComponent, PoRichTextComponent, PoSelectComponent, PoSelectOptionTemplateDirective, PoServicesModule, PoSlideComponent, PoSlideContentTemplateDirective, PoSlideModule, PoStepComponent, PoStepperComponent, PoStepperModule, PoStepperOrientation, PoStepperStatus, PoSwitchComponent, PoSwitchLabelPosition, PoTabComponent, PoTableCellTemplateDirective, PoTableColumnSortType, PoTableColumnTemplateDirective, PoTableComponent, PoTableModule, PoTableRowTemplateArrowDirection, PoTableRowTemplateDirective, PoTabsComponent, PoTabsModule, PoTagComponent, PoTagModule, PoTagOrientation, PoTagType, PoTextareaComponent, PoTimeModule, PoTimePipe, PoToasterOrientation, PoToasterType, PoToolbarComponent, PoToolbarModule, PoTooltipDirective, PoTooltipModule, PoTreeViewComponent, PoTreeViewModule, PoUploadComponent, PoUrlComponent, PoWidgetComponent, PoWidgetModule, initializeLanguageDefault, poDialogAlertLiteralsDefault, poDialogConfirmLiteralsDefault, poLanguageDefault, poLocaleDecimalSeparatorList, poLocaleDefault, poLocaleThousandSeparatorList, poLocales, returnPoI18nService, ɵ0, PoAccordionBaseComponent as ɵa, PoAccordionService as ɵb, PoChartMathsService as ɵba, PoChartAxisComponent as ɵbb, PoChartAxisPathComponent as ɵbc, PoChartAxisLabelComponent as ɵbd, PoChartBaseComponent as ɵbe, PoColorService as ɵbf, PoChartSvgContainerService as ɵbg, PoChartContainerComponent as ɵbh, PoChartGaugeComponent as ɵbi, PoChartCircular as ɵbj, PoChartDynamicTypeComponent as ɵbk, PoChartGaugeTextContentComponent as ɵbl, PoChartLegendComponent as ɵbm, PoChartLineComponent as ɵbn, PoChartPathComponent as ɵbo, PoChartPieComponent as ɵbp, PoChartCircularComponent as ɵbq, PoChartDonutComponent as ɵbr, PoChartSeriesPointComponent as ɵbs, PoChartBarComponent as ɵbt, PoChartBarBaseComponent as ɵbu, PoChartColumnComponent as ɵbv, PoChartBarPathComponent as ɵbw, PoChartCircularPathComponent as ɵbx, PoChartCircularLabelComponent as ɵby, PoChartTooltipDirective as ɵbz, PoAccordionItemBodyComponent as ɵc, PoResizeObserverDirective as ɵca, PoContainerBaseComponent as ɵcb, PoDisclaimerBaseComponent as ɵcc, PoDisclaimerGroupBaseComponent as ɵcd, PoDisclaimerRemoveComponent as ɵce, PoDividerBaseComponent as ɵcf, PoPopupBaseComponent as ɵcg, PoDropdownBaseComponent as ɵch, PoInfoBaseComponent as ɵci, PoCleanModule as ɵcj, PoCleanBaseComponent as ɵck, PoFieldContainerModule as ɵcl, PoFieldContainerBottomComponent as ɵcm, PoFieldContainerComponent as ɵcn, PoCheckboxGroupBaseComponent as ɵco, PoDatepickerBaseComponent as ɵcp, PoModalBaseComponent as ɵcq, PoProgressBaseComponent as ɵcr, PoProgressBarComponent as ɵcs, PoI18nBasePipe as ɵct, PoDialogBaseService as ɵcu, PoToasterComponent as ɵcv, PoToasterBaseComponent as ɵcw, PoPopoverBaseComponent as ɵcx, PoTableBaseComponent as ɵcy, PoTableService as ɵcz, PoAccordionItemHeaderComponent as ɵd, PoTableColumnIconComponent as ɵda, PoTableColumnLabelComponent as ɵdb, PoTableColumnLinkComponent as ɵdc, PoTableColumnManagerComponent as ɵdd, PoTableDetailComponent as ɵde, PoTableIconComponent as ɵdf, PoTableShowSubtitleComponent as ɵdg, PoTableSubtitleCircleComponent as ɵdh, PoTableSubtitleFooterComponent as ɵdi, PoCheckboxBaseComponent as ɵdj, PoComboBaseComponent as ɵdk, PoComboFilterService as ɵdl, PoInputBaseComponent as ɵdm, PoDatepickerRangeBaseComponent as ɵdn, PoInputGeneric as ɵdo, PoLookupBaseComponent as ɵdp, PoLookupFilterService as ɵdq, PoLookupModalService as ɵdr, PoLookupModalBaseComponent as ɵds, PoMultiselectBaseComponent as ɵdt, PoMultiselectFilterService as ɵdu, PoNumberBaseComponent as ɵdv, PoRadioGroupBaseComponent as ɵdw, PoRichTextBaseComponent as ɵdx, PoRichTextService as ɵdy, PoRichTextBodyComponent as ɵdz, PoAvatarBaseComponent as ɵe, PoSelectBaseComponent as ɵea, PoSwitchBaseComponent as ɵeb, PoTextareaBaseComponent as ɵec, PoUploadBaseComponent as ɵed, PoUploadService as ɵee, PoUploadBaseService as ɵef, PoUploadDragDropComponent as ɵeg, PoUploadDragDropAreaComponent as ɵeh, PoNotificationBaseService as ɵei, PoMultiselectDropdownComponent as ɵej, PoMultiselectItemComponent as ɵek, PoMultiselectSearchComponent as ɵel, PoRichTextImageModalComponent as ɵem, PoRichTextLinkModalComponent as ɵen, PoRichTextToolbarComponent as ɵeo, PoUploadDragDropDirective as ɵep, PoUploadDragDropAreaOverlayComponent as ɵeq, PoUploadFileRestrictionsComponent as ɵer, PoTagBaseComponent as ɵes, PoDynamicFormBaseComponent as ɵet, PoDynamicFormLoadService as ɵeu, PoDynamicFormOperation as ɵev, PoDynamicFormValidationService as ɵew, PoDynamicFormFieldsComponent as ɵex, PoDynamicFormFieldsBaseComponent as ɵey, PoDynamicViewBaseComponent as ɵez, PoBreadcrumbBaseComponent as ɵf, PoDynamicViewService as ɵfa, PoGaugeBaseComponent as ɵfb, PoGaugeTitleComponent as ɵfc, PoGaugeLegendComponent as ɵfd, PoGaugeSvgComponent as ɵfe, PoGaugePathComponent as ɵff, PoGaugeDescriptionComponent as ɵfg, PoGaugePointerComponent as ɵfh, PoGridCellActionComponent as ɵfi, PoGridCellComponent as ɵfj, PoGridHeadComponent as ɵfk, PoListViewBaseComponent as ɵfl, PoBadgeModule as ɵfm, PoBadgeComponent as ɵfn, PoBadgeBaseComponent as ɵfo, PoMenuBaseComponent as ɵfp, PoMenuService as ɵfq, PoMenuItemsService as ɵfr, PoMenuFilterComponent as ɵfs, PoMenuItemComponent as ɵft, PoMenuPanelBaseComponent as ɵfu, PoMenuPanelItemsService as ɵfv, PoMenuPanelItemComponent as ɵfw, PoNavbarActionsModule as ɵfx, PoNavbarActionComponent as ɵfy, PoNavbarActionPopupComponent as ɵfz, PoBreadcrumbDropdownComponent as ɵg, PoNavbarActionsComponent as ɵga, PoNavbarItemsModule as ɵgb, PoNavbarItemComponent as ɵgc, PoNavbarItemsComponent as ɵgd, PoNavbarItemNavigationModule as ɵge, PoNavbarItemNavigationComponent as ɵgf, PoNavbarItemNavigationIconComponent as ɵgg, PoNavbarBaseComponent as ɵgh, PoNavbarLogoComponent as ɵgi, PoPageComponent as ɵgj, PoPageBaseComponent as ɵgk, PoPageContentComponent as ɵgl, PoPageContentBaseComponent as ɵgm, PoPageDefaultBaseComponent as ɵgn, PoPageDetailBaseComponent as ɵgo, PoPageEditBaseComponent as ɵgp, PoPageHeaderComponent as ɵgq, PoPageHeaderBaseComponent as ɵgr, PoPageListBaseComponent as ɵgs, PoPageSlideBaseComponent as ɵgt, PoSlideCirclesComponent as ɵgu, PoSlideBaseComponent as ɵgv, PoSlideItemComponent as ɵgw, PoSlideControlComponent as ɵgx, PoStepperCircleComponent as ɵgy, PoStepperBaseComponent as ɵgz, PoBreadcrumbFavoriteComponent as ɵh, PoStepperLabelComponent as ɵha, PoStepperStepComponent as ɵhb, PoTabButtonComponent as ɵhc, PoTabBaseComponent as ɵhd, PoTabDropdownComponent as ɵhe, PoTabsBaseComponent as ɵhf, PoToolbarActionsComponent as ɵhg, PoToolbarBaseComponent as ɵhh, PoToolbarNotificationComponent as ɵhi, PoToolbarProfileComponent as ɵhj, PoTreeViewBaseComponent as ɵhk, PoTreeViewService as ɵhl, PoTreeViewItemComponent as ɵhm, PoTreeViewItemHeaderComponent as ɵhn, PoWidgetBaseComponent as ɵho, PoHttpInterceptorDetailComponent as ɵhp, PoHttpInterceptorBaseService as ɵhq, PoHttpRequesControltService as ɵhr, PoI18nBaseService as ɵhs, PoBreadcrumbFavoriteService as ɵi, PoBreadcrumbItemComponent as ɵj, PoLoadingBaseComponent as ɵk, PoLoadingOverlayBaseComponent as ɵl, PoButtonBaseComponent as ɵm, InputBoolean as ɵn, PoTooltipBaseDirective as ɵo, PoTooltipControlPositionService as ɵp, PoControlPositionService as ɵq, PoButtonGroupBaseComponent as ɵr, PoCalendarBaseComponent as ɵs, PoDateService as ɵt, PoCalendarHeaderComponent as ɵu, PoCalendarWrapperComponent as ɵv, PoCalendarService as ɵw, PoCalendarLangService as ɵx, PoChartAreaComponent as ɵy, PoChartLineBaseComponent as ɵz };
35462
+ export { I18N_CONFIG, InputBoolean, InputRequired, PO_CONTROL_POSITIONS, PoAccordionComponent, PoAccordionItemComponent, PoAccordionModule, PoActiveOverlayModule, PoActiveOverlayService, PoAvatarComponent, PoAvatarModule, PoBreadcrumbComponent, PoBreadcrumbModule, PoButtonComponent, PoButtonGroupComponent, PoButtonGroupModule, PoButtonGroupToggle, PoButtonModule, PoCalendarComponent, PoCalendarMode, PoCalendarModule, PoChartComponent, PoChartModule, PoChartType, PoCheckboxComponent, PoCheckboxGroupComponent, PoCheckboxGroupModule, PoCleanComponent, PoColorPaletteModule, PoColorPaletteService, PoComboComponent, PoComboFilterMode, PoComboOptionTemplateDirective, PoComponentInjectorModule, PoComponentInjectorService, PoComponentsModule, PoContainerComponent, PoContainerModule, PoControlPositionModule, PoDateService, PoDateTimeModule, PoDatepickerComponent, PoDatepickerIsoFormat, PoDatepickerModule, PoDatepickerRangeComponent, PoDecimalComponent, PoDialogComponent, PoDialogModule, PoDialogService, PoDialogType, PoDirectivesModule, PoDisclaimerComponent, PoDisclaimerGroupComponent, PoDisclaimerGroupModule, PoDisclaimerModule, PoDividerComponent, PoDividerModule, PoDropdownComponent, PoDropdownModule, PoDynamicFieldType, PoDynamicFormComponent, PoDynamicModule, PoDynamicViewComponent, PoEmailComponent, PoFieldModule, PoGaugeComponent, PoGaugeModule, PoGridComponent, PoGridModule, PoGuardsModule, PoHttpInterceptorModule, PoHttpInterceptorService, PoHttpRequestInterceptorService, PoHttpRequestModule, PoI18nModule, PoI18nPipe, PoI18nService, PoIconComponent, PoIconModule, PoInfoComponent, PoInfoModule, PoInfoOrientation, PoInputComponent, PoInterceptorsModule, PoLanguageModule, PoLanguageService, PoListViewComponent, PoListViewContentTemplateDirective, PoListViewDetailTemplateDirective, PoListViewModule, PoLoadingComponent, PoLoadingIconComponent, PoLoadingModule, PoLoadingOverlayComponent, PoLoginComponent, PoLookupComponent, PoLookupModalComponent, PoMenuComponent, PoMenuGlobalService, PoMenuHeaderTemplateDirective, PoMenuModule, PoMenuPanelComponent, PoMenuPanelModule, PoModalComponent, PoModalModule, PoModule, PoMultiselectComponent, PoMultiselectFilterMode, PoNavbarComponent, PoNavbarModule, PoNotificationModule, PoNotificationService, PoNumberComponent, PoPageDefaultComponent, PoPageDetailComponent, PoPageEditComponent, PoPageListComponent, PoPageModule, PoPageSlideComponent, PoPasswordComponent, PoPipesModule, PoPopoverComponent, PoPopoverModule, PoPopupComponent, PoPopupModule, PoProgressComponent, PoProgressModule, PoProgressStatus, PoRadioGroupComponent, PoRichTextComponent, PoSelectComponent, PoSelectOptionTemplateDirective, PoServicesModule, PoSlideComponent, PoSlideContentTemplateDirective, PoSlideModule, PoStepComponent, PoStepperComponent, PoStepperModule, PoStepperOrientation, PoStepperStatus, PoSwitchComponent, PoSwitchLabelPosition, PoTabComponent, PoTableCellTemplateDirective, PoTableColumnSortType, PoTableColumnTemplateDirective, PoTableComponent, PoTableModule, PoTableRowTemplateArrowDirection, PoTableRowTemplateDirective, PoTabsComponent, PoTabsModule, PoTagComponent, PoTagModule, PoTagOrientation, PoTagType, PoTextareaComponent, PoTimeModule, PoTimePipe, PoToasterOrientation, PoToasterType, PoToolbarComponent, PoToolbarModule, PoTooltipDirective, PoTooltipModule, PoTreeViewComponent, PoTreeViewModule, PoUploadComponent, PoUrlComponent, PoWidgetComponent, PoWidgetModule, initializeLanguageDefault, poDialogAlertLiteralsDefault, poDialogConfirmLiteralsDefault, poLanguageDefault, poLocaleDecimalSeparatorList, poLocaleDefault, poLocaleThousandSeparatorList, poLocales, returnPoI18nService, ɵ0, PoAccordionBaseComponent as ɵa, PoAccordionService as ɵb, PoChartMathsService as ɵba, PoChartAxisComponent as ɵbb, PoChartAxisPathComponent as ɵbc, PoChartAxisLabelComponent as ɵbd, PoChartBaseComponent as ɵbe, PoColorService as ɵbf, PoChartSvgContainerService as ɵbg, PoChartContainerComponent as ɵbh, PoChartGaugeComponent as ɵbi, PoChartCircular as ɵbj, PoChartDynamicTypeComponent as ɵbk, PoChartGaugeTextContentComponent as ɵbl, PoChartLegendComponent as ɵbm, PoChartLineComponent as ɵbn, PoChartPathComponent as ɵbo, PoChartPieComponent as ɵbp, PoChartCircularComponent as ɵbq, PoChartDonutComponent as ɵbr, PoChartSeriesPointComponent as ɵbs, PoChartBarComponent as ɵbt, PoChartBarBaseComponent as ɵbu, PoChartColumnComponent as ɵbv, PoChartBarPathComponent as ɵbw, PoChartCircularPathComponent as ɵbx, PoChartCircularLabelComponent as ɵby, PoChartTooltipDirective as ɵbz, PoAccordionItemBodyComponent as ɵc, PoResizeObserverDirective as ɵca, PoContainerBaseComponent as ɵcb, PoDisclaimerBaseComponent as ɵcc, PoDisclaimerGroupBaseComponent as ɵcd, PoDisclaimerRemoveComponent as ɵce, PoDividerBaseComponent as ɵcf, PoPopupBaseComponent as ɵcg, PoDropdownBaseComponent as ɵch, PoInfoBaseComponent as ɵci, PoCleanModule as ɵcj, PoCleanBaseComponent as ɵck, PoFieldContainerModule as ɵcl, PoFieldContainerBottomComponent as ɵcm, PoFieldContainerComponent as ɵcn, PoCheckboxGroupBaseComponent as ɵco, PoDatepickerBaseComponent as ɵcp, PoModalBaseComponent as ɵcq, PoProgressBaseComponent as ɵcr, PoProgressBarComponent as ɵcs, PoI18nBasePipe as ɵct, PoDialogBaseService as ɵcu, PoToasterComponent as ɵcv, PoToasterBaseComponent as ɵcw, PoPopoverBaseComponent as ɵcx, PoTableBaseComponent as ɵcy, PoTableService as ɵcz, PoAccordionItemHeaderComponent as ɵd, PoTableColumnIconComponent as ɵda, PoTableColumnLabelComponent as ɵdb, PoTableColumnLinkComponent as ɵdc, PoTableColumnManagerComponent as ɵdd, PoTableDetailComponent as ɵde, PoTableIconComponent as ɵdf, PoTableShowSubtitleComponent as ɵdg, PoTableSubtitleCircleComponent as ɵdh, PoTableSubtitleFooterComponent as ɵdi, PoCheckboxBaseComponent as ɵdj, PoComboBaseComponent as ɵdk, PoComboFilterService as ɵdl, PoInputBaseComponent as ɵdm, PoDatepickerRangeBaseComponent as ɵdn, PoInputGeneric as ɵdo, PoLookupBaseComponent as ɵdp, PoLookupFilterService as ɵdq, PoLookupModalService as ɵdr, PoLookupModalBaseComponent as ɵds, PoMultiselectBaseComponent as ɵdt, PoMultiselectFilterService as ɵdu, PoNumberBaseComponent as ɵdv, PoRadioGroupBaseComponent as ɵdw, PoRichTextBaseComponent as ɵdx, PoRichTextService as ɵdy, PoRichTextBodyComponent as ɵdz, PoAvatarBaseComponent as ɵe, PoSelectBaseComponent as ɵea, PoFieldModel as ɵeb, PoTextareaBaseComponent as ɵec, PoUploadBaseComponent as ɵed, PoUploadService as ɵee, PoUploadBaseService as ɵef, PoUploadDragDropComponent as ɵeg, PoUploadDragDropAreaComponent as ɵeh, PoNotificationBaseService as ɵei, PoMultiselectDropdownComponent as ɵej, PoMultiselectItemComponent as ɵek, PoMultiselectSearchComponent as ɵel, PoRichTextImageModalComponent as ɵem, PoRichTextLinkModalComponent as ɵen, PoRichTextToolbarComponent as ɵeo, PoUploadDragDropDirective as ɵep, PoUploadDragDropAreaOverlayComponent as ɵeq, PoUploadFileRestrictionsComponent as ɵer, PoTagBaseComponent as ɵes, PoDynamicFormBaseComponent as ɵet, PoDynamicFormLoadService as ɵeu, PoDynamicFormOperation as ɵev, PoDynamicFormValidationService as ɵew, PoDynamicFormFieldsComponent as ɵex, PoDynamicFormFieldsBaseComponent as ɵey, PoDynamicViewBaseComponent as ɵez, PoBreadcrumbBaseComponent as ɵf, PoDynamicViewService as ɵfa, PoGaugeBaseComponent as ɵfb, PoGaugeTitleComponent as ɵfc, PoGaugeLegendComponent as ɵfd, PoGaugeSvgComponent as ɵfe, PoGaugePathComponent as ɵff, PoGaugeDescriptionComponent as ɵfg, PoGaugePointerComponent as ɵfh, PoGridCellActionComponent as ɵfi, PoGridCellComponent as ɵfj, PoGridHeadComponent as ɵfk, PoListViewBaseComponent as ɵfl, PoBadgeModule as ɵfm, PoBadgeComponent as ɵfn, PoBadgeBaseComponent as ɵfo, PoMenuBaseComponent as ɵfp, PoMenuService as ɵfq, PoMenuItemsService as ɵfr, PoMenuFilterComponent as ɵfs, PoMenuItemComponent as ɵft, PoMenuPanelBaseComponent as ɵfu, PoMenuPanelItemsService as ɵfv, PoMenuPanelItemComponent as ɵfw, PoNavbarActionsModule as ɵfx, PoNavbarActionComponent as ɵfy, PoNavbarActionPopupComponent as ɵfz, PoBreadcrumbDropdownComponent as ɵg, PoNavbarActionsComponent as ɵga, PoNavbarItemsModule as ɵgb, PoNavbarItemComponent as ɵgc, PoNavbarItemsComponent as ɵgd, PoNavbarItemNavigationModule as ɵge, PoNavbarItemNavigationComponent as ɵgf, PoNavbarItemNavigationIconComponent as ɵgg, PoNavbarBaseComponent as ɵgh, PoNavbarLogoComponent as ɵgi, PoPageComponent as ɵgj, PoPageBaseComponent as ɵgk, PoPageContentComponent as ɵgl, PoPageContentBaseComponent as ɵgm, PoPageDefaultBaseComponent as ɵgn, PoPageDetailBaseComponent as ɵgo, PoPageEditBaseComponent as ɵgp, PoPageHeaderComponent as ɵgq, PoPageHeaderBaseComponent as ɵgr, PoPageListBaseComponent as ɵgs, PoPageSlideBaseComponent as ɵgt, PoSlideCirclesComponent as ɵgu, PoSlideBaseComponent as ɵgv, PoSlideItemComponent as ɵgw, PoSlideControlComponent as ɵgx, PoStepperCircleComponent as ɵgy, PoStepperBaseComponent as ɵgz, PoBreadcrumbFavoriteComponent as ɵh, PoStepperLabelComponent as ɵha, PoStepperStepComponent as ɵhb, PoTabButtonComponent as ɵhc, PoTabBaseComponent as ɵhd, PoTabDropdownComponent as ɵhe, PoTabsBaseComponent as ɵhf, PoToolbarActionsComponent as ɵhg, PoToolbarBaseComponent as ɵhh, PoToolbarNotificationComponent as ɵhi, PoToolbarProfileComponent as ɵhj, PoTreeViewBaseComponent as ɵhk, PoTreeViewService as ɵhl, PoTreeViewItemComponent as ɵhm, PoTreeViewItemHeaderComponent as ɵhn, PoWidgetBaseComponent as ɵho, PoHttpInterceptorDetailComponent as ɵhp, PoHttpInterceptorBaseService as ɵhq, PoHttpRequesControltService as ɵhr, PoI18nBaseService as ɵhs, PoBreadcrumbFavoriteService as ɵi, PoBreadcrumbItemComponent as ɵj, PoLoadingBaseComponent as ɵk, PoLoadingOverlayBaseComponent as ɵl, PoButtonBaseComponent as ɵm, InputBoolean as ɵn, PoTooltipBaseDirective as ɵo, PoTooltipControlPositionService as ɵp, PoControlPositionService as ɵq, PoButtonGroupBaseComponent as ɵr, PoCalendarBaseComponent as ɵs, PoDateService as ɵt, PoCalendarHeaderComponent as ɵu, PoCalendarWrapperComponent as ɵv, PoCalendarService as ɵw, PoCalendarLangService as ɵx, PoChartAreaComponent as ɵy, PoChartLineBaseComponent as ɵz };
35020
35463
  //# sourceMappingURL=po-ui-ng-components.js.map