@po-ui/ng-components 19.18.0 → 19.19.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.
@@ -13179,6 +13179,7 @@ const gridPaddingValues = {
13179
13179
  class PoChartGridUtils {
13180
13180
  component;
13181
13181
  isTypeDonut = false;
13182
+ textCenterDonut = {};
13182
13183
  constructor(component) {
13183
13184
  this.component = component;
13184
13185
  }
@@ -13315,6 +13316,13 @@ class PoChartGridUtils {
13315
13316
  itemStyle: { opacity: 0.4 }
13316
13317
  };
13317
13318
  this.component.boundaryGap = true;
13319
+ if (this.component.options?.stacked || serie.stackGroupName) {
13320
+ serie.stack = this.component.options?.stacked ? 'total' : serie.stackGroupName;
13321
+ if (this.component.dataLabel?.fixed !== false) {
13322
+ this.component.dataLabel = { fixed: true };
13323
+ serie.label = { show: true };
13324
+ }
13325
+ }
13318
13326
  }
13319
13327
  }
13320
13328
  setSerieTypeDonutPie(serie, color) {
@@ -13329,8 +13337,7 @@ class PoChartGridUtils {
13329
13337
  borderColor: borderColor,
13330
13338
  color: color,
13331
13339
  borderRadius: this.component.options?.borderRadius
13332
- },
13333
- label: { show: this.isTypeDonut && this.component.options?.textCenterGraph }
13340
+ }
13334
13341
  };
13335
13342
  this.component.listTypePieDonut[0].data.push(seriePie);
13336
13343
  }
@@ -13361,20 +13368,30 @@ class PoChartGridUtils {
13361
13368
  center: ['50%', positionHorizontal],
13362
13369
  radius: radius,
13363
13370
  roseType: this.component.options?.roseType ? 'area' : undefined,
13364
- label: {
13365
- show: !!(this.isTypeDonut && this.component.options?.textCenterGraph),
13366
- position: 'center',
13367
- formatter: this.component.options?.textCenterGraph,
13368
- fontSize: this.resolvePx('--font-size-md'),
13369
- fontWeight: Number(this.component.getCSSVariable('--font-weight-hightlight-value', '.po-chart')),
13370
- fontFamily: this.component.getCSSVariable('--font-family-hightlight-value', '.po-chart'),
13371
- color: this.component.getCSSVariable('--color-hightlight-value', '.po-chart')
13372
- },
13371
+ label: { show: false },
13373
13372
  emphasis: { focus: 'self' },
13374
13373
  data: [],
13375
13374
  blur: { itemStyle: { opacity: 0.4 } }
13376
13375
  }
13377
13376
  ];
13377
+ this.setTextCenterDonut();
13378
+ }
13379
+ setTextCenterDonut() {
13380
+ if (this.isTypeDonut && this.component.options?.textCenterGraph) {
13381
+ this.textCenterDonut = {
13382
+ type: 'text',
13383
+ left: 'center',
13384
+ top: this.component.options?.legendVerticalPosition === 'top' ? '52%' : '44%',
13385
+ style: {
13386
+ text: this.component.options?.textCenterGraph,
13387
+ fontSize: this.resolvePx('--font-size-md'),
13388
+ fontWeight: Number(this.component.getCSSVariable('--font-weight-hightlight-value', '.po-chart')),
13389
+ fontFamily: this.component.getCSSVariable('--font-family-hightlight-value', '.po-chart'),
13390
+ fill: this.component.getCSSVariable('--color-hightlight-value', '.po-chart')
13391
+ },
13392
+ silent: true
13393
+ };
13394
+ }
13378
13395
  }
13379
13396
  getAdjustedRadius(radius, innerRadius) {
13380
13397
  const radiusValue = parseFloat(radius);
@@ -13901,6 +13918,11 @@ use([
13901
13918
  * <file name="sample-po-chart-coffee-ranking/sample-po-chart-coffee-ranking.component.ts"> </file>
13902
13919
  * </example>
13903
13920
  *
13921
+ * <example name="po-chart-stacked" title="PO Chart - Stacked">
13922
+ * <file name="sample-po-chart-stacked/sample-po-chart-stacked.component.html"> </file>
13923
+ * <file name="sample-po-chart-stacked/sample-po-chart-stacked.component.ts"> </file>
13924
+ * </example>
13925
+ *
13904
13926
  * <example name="po-chart-summary" title="PO Chart - Summary">
13905
13927
  * <file name="sample-po-chart-summary/sample-po-chart-summary.component.html"> </file>
13906
13928
  * <file name="sample-po-chart-summary/sample-po-chart-summary.component.ts"> </file>
@@ -14254,6 +14276,9 @@ class PoChartComponent extends PoChartBaseComponent {
14254
14276
  this.chartGridUtils.setOptionDataZoom(options);
14255
14277
  }
14256
14278
  }
14279
+ else if (this.chartGridUtils.isTypeDonut && this.options?.textCenterGraph) {
14280
+ options.graphic = this.chartGridUtils.textCenterDonut;
14281
+ }
14257
14282
  if (this.options?.legend !== false) {
14258
14283
  this.setOptionLegend(options);
14259
14284
  }
@@ -30832,6 +30857,7 @@ class PoLookupModalBaseComponent {
30832
30857
  page = 1;
30833
30858
  pageSize = 10;
30834
30859
  searchValue = '';
30860
+ appliedSearchValue = '';
30835
30861
  tableLiterals;
30836
30862
  // Propriedade da modal de busca avançada:
30837
30863
  advancedFilterModalTitle = '';
@@ -30929,6 +30955,7 @@ class PoLookupModalBaseComponent {
30929
30955
  createDisclaimer() {
30930
30956
  this.disclaimerGroup.disclaimers = [];
30931
30957
  this.searchValue = '';
30958
+ this.appliedSearchValue = '';
30932
30959
  for (const [key, value] of Object.entries(this.dynamicFormValue)) {
30933
30960
  this.addDisclaimer(value, key);
30934
30961
  }
@@ -30958,15 +30985,17 @@ class PoLookupModalBaseComponent {
30958
30985
  this.disclaimerGroup.disclaimers = [...this.disclaimerGroup.disclaimers, this.disclaimer];
30959
30986
  }
30960
30987
  onChangeDisclaimerGroup() {
30961
- if (!this.searchValue) {
30988
+ if (!this.appliedSearchValue) {
30962
30989
  this.isLoading = true;
30963
30990
  this.searchValue = '';
30991
+ this.appliedSearchValue = '';
30964
30992
  this.searchFilteredItems();
30965
30993
  }
30966
30994
  }
30967
30995
  search() {
30968
30996
  this.page = 1;
30969
- if (this.searchValue) {
30997
+ this.appliedSearchValue = this.searchValue;
30998
+ if (this.appliedSearchValue) {
30970
30999
  this.isLoading = true;
30971
31000
  this.disclaimerGroup.disclaimers = [];
30972
31001
  this.searchFilteredItems();
@@ -30976,7 +31005,7 @@ class PoLookupModalBaseComponent {
30976
31005
  }
30977
31006
  }
30978
31007
  searchFilteredItems() {
30979
- this.searchSubscription = this.getFilteredItems(this.searchValue)
31008
+ this.searchSubscription = this.getFilteredItems(this.appliedSearchValue)
30980
31009
  .pipe(catchError(error => {
30981
31010
  this.setLookupResponseProperties();
30982
31011
  return throwError(error);
@@ -30986,7 +31015,10 @@ class PoLookupModalBaseComponent {
30986
31015
  showMoreEvent() {
30987
31016
  this.page++;
30988
31017
  this.isLoading = true;
30989
- this.showMoreSubscription = this.getFilteredItems(this.searchValue)
31018
+ if (this.searchValue !== this.appliedSearchValue) {
31019
+ this.searchValue = this.appliedSearchValue;
31020
+ }
31021
+ this.showMoreSubscription = this.getFilteredItems(this.appliedSearchValue)
30990
31022
  .pipe(catchError(error => {
30991
31023
  this.hasNext = false;
30992
31024
  this.isLoading = false;
@@ -52534,11 +52566,13 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
52534
52566
  * ## Configuração
52535
52567
  *
52536
52568
  * Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule` no
52537
- * módulo principal da sua aplicação.
52569
+ * módulo principal da sua aplicação. Além disso, é necessário configurar o `HttpClient` para utilizar os interceptors
52570
+ * registrados no Dependency Injection (DI) por meio da função `provideHttpClient(withInterceptorsFromDi())`.
52538
52571
  *
52539
52572
  * Módulo da aplicação:
52540
52573
  * ```
52541
52574
  * import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
52575
+ * import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
52542
52576
  * import { PoModule } from '@po-ui/ng-components';
52543
52577
  * ...
52544
52578
  *
@@ -52553,7 +52587,10 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
52553
52587
  * AppComponent,
52554
52588
  * ...
52555
52589
  * ],
52556
- * providers: [],
52590
+ * providers: [
52591
+ * provideHttpClient(withInterceptorsFromDi()),
52592
+ * ...
52593
+ * ],
52557
52594
  * bootstrap: [AppComponent]
52558
52595
  * })
52559
52596
  * export class AppModule { }