@po-ui/ng-components 19.17.1 → 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.
- package/fesm2022/po-ui-ng-components.mjs +105 -29
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-chart/interfaces/po-chart-options.interface.d.ts +14 -0
- package/lib/components/po-chart/interfaces/po-chart-serie-data-label.interface.d.ts +1 -1
- package/lib/components/po-chart/interfaces/po-chart-serie.interface.d.ts +18 -0
- package/lib/components/po-chart/po-chart-grid-utils.d.ts +3 -1
- package/lib/components/po-chart/po-chart.component.d.ts +5 -0
- package/lib/components/po-field/po-combo/po-combo.component.d.ts +5 -0
- package/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal-base.component.d.ts +1 -0
- package/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.d.ts +7 -2
- package/package.json +4 -4
- package/po-ui-ng-components-19.19.0.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-19.17.1.tgz +0 -0
|
@@ -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
|
}
|
|
@@ -27008,11 +27033,14 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
27008
27033
|
if (this.visibleOptions.length) {
|
|
27009
27034
|
this.focusItem();
|
|
27010
27035
|
}
|
|
27011
|
-
this.
|
|
27036
|
+
if (this.comboOpen) {
|
|
27037
|
+
this.controlComboVisibility(true);
|
|
27038
|
+
}
|
|
27039
|
+
else {
|
|
27040
|
+
this.toggleComboVisibility();
|
|
27041
|
+
}
|
|
27012
27042
|
this.isFiltering = this.changeOnEnter ? this.isFiltering : false;
|
|
27013
|
-
return;
|
|
27014
27043
|
}
|
|
27015
|
-
// Tecla "enter"
|
|
27016
27044
|
if (key === PoKeyCodeEnum.enter && this.selectedView && this.comboOpen) {
|
|
27017
27045
|
const isUpdateModel = this.selectedView.value !== this.selectedValue || inputValue !== this.selectedView.label;
|
|
27018
27046
|
this.controlComboVisibility(false);
|
|
@@ -27024,7 +27052,8 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
27024
27052
|
return;
|
|
27025
27053
|
}
|
|
27026
27054
|
if (key === PoKeyCodeEnum.enter) {
|
|
27027
|
-
|
|
27055
|
+
event.preventDefault();
|
|
27056
|
+
this.toggleComboVisibility();
|
|
27028
27057
|
}
|
|
27029
27058
|
if (key === PoKeyCodeEnum.esc) {
|
|
27030
27059
|
if (key === this.lastKey) {
|
|
@@ -27038,6 +27067,10 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
27038
27067
|
this.onCloseCombo();
|
|
27039
27068
|
}
|
|
27040
27069
|
}
|
|
27070
|
+
if (key === PoKeyCodeEnum.tab && this.shouldHandleTab(event) && !this.isCleanVisible()) {
|
|
27071
|
+
event.preventDefault();
|
|
27072
|
+
this.focusItem();
|
|
27073
|
+
}
|
|
27041
27074
|
this.lastKey = event.keyCode;
|
|
27042
27075
|
if (isFieldFocused) {
|
|
27043
27076
|
this.keydown.emit(event);
|
|
@@ -27307,6 +27340,25 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
27307
27340
|
updateCacheOptions() {
|
|
27308
27341
|
this.cacheOptions = this.comboOptionsList.map(item => item.value === this.selectedValue ? { ...item, selected: true } : item);
|
|
27309
27342
|
}
|
|
27343
|
+
isCleanVisible() {
|
|
27344
|
+
return this.clean && !this.disabled && !!this.inputEl.nativeElement.value;
|
|
27345
|
+
}
|
|
27346
|
+
handleCleanKeyboardTab(event) {
|
|
27347
|
+
if (this.shouldHandleTab(event)) {
|
|
27348
|
+
event.preventDefault();
|
|
27349
|
+
this.focusItem();
|
|
27350
|
+
}
|
|
27351
|
+
}
|
|
27352
|
+
onListboxKeyDown(event) {
|
|
27353
|
+
const key = event?.keyCode;
|
|
27354
|
+
if (key === PoKeyCodeEnum.tab && event.shiftKey) {
|
|
27355
|
+
this.focusInput();
|
|
27356
|
+
event.preventDefault();
|
|
27357
|
+
}
|
|
27358
|
+
if (key === PoKeyCodeEnum.esc) {
|
|
27359
|
+
event.stopPropagation();
|
|
27360
|
+
}
|
|
27361
|
+
}
|
|
27310
27362
|
adjustContainerPosition() {
|
|
27311
27363
|
this.controlPosition.adjustPosition(this.listboxControlPosition);
|
|
27312
27364
|
}
|
|
@@ -27382,7 +27434,7 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
27382
27434
|
window.removeEventListener('scroll', this.onScroll, true);
|
|
27383
27435
|
}
|
|
27384
27436
|
setContainerPosition() {
|
|
27385
|
-
this.controlPosition
|
|
27437
|
+
this.controlPosition?.setElements(this.containerElement?.nativeElement, poComboContainerOffset, this.inputEl, ['top', 'bottom'], true);
|
|
27386
27438
|
this.adjustContainerPosition();
|
|
27387
27439
|
}
|
|
27388
27440
|
setContainerWidth() {
|
|
@@ -27402,20 +27454,32 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
27402
27454
|
setScrollingControl() {
|
|
27403
27455
|
return this.infiniteScroll ? true : false;
|
|
27404
27456
|
}
|
|
27457
|
+
// Define o foco no item apropriado do listbox.
|
|
27405
27458
|
focusItem() {
|
|
27406
27459
|
this.poListbox?.listboxItemList?.nativeElement.focus();
|
|
27407
27460
|
setTimeout(() => {
|
|
27408
|
-
let item;
|
|
27461
|
+
let item = null;
|
|
27409
27462
|
if (this.selectedValue) {
|
|
27410
27463
|
item = document.querySelector('.po-listbox-item[aria-selected="true"]');
|
|
27411
27464
|
}
|
|
27412
|
-
|
|
27413
|
-
|
|
27465
|
+
if (!item) {
|
|
27466
|
+
const items = document.querySelectorAll('.po-listbox-item');
|
|
27467
|
+
item = items.length > 0 ? items[0] : null;
|
|
27468
|
+
}
|
|
27469
|
+
if (item) {
|
|
27470
|
+
item.focus();
|
|
27414
27471
|
}
|
|
27415
|
-
this.poListbox?.listboxItemList?.nativeElement.focus();
|
|
27416
|
-
item?.focus();
|
|
27417
27472
|
});
|
|
27418
27473
|
}
|
|
27474
|
+
// Define o foco no elemento input do combobox.
|
|
27475
|
+
focusInput(event) {
|
|
27476
|
+
event?.preventDefault();
|
|
27477
|
+
this.inputEl.nativeElement.focus();
|
|
27478
|
+
}
|
|
27479
|
+
// Determina se o tab deve abrir o listbox.
|
|
27480
|
+
shouldHandleTab(event) {
|
|
27481
|
+
return this.comboOpen && this.appendBox && !event.shiftKey;
|
|
27482
|
+
}
|
|
27419
27483
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoComboComponent, deps: [{ token: i0.ElementRef }, { token: i0.IterableDiffers }, { token: PoComboFilterService }, { token: i0.Renderer2 }, { token: PoControlPositionService }, { token: i0.ChangeDetectorRef }, { token: PoThemeService }, { token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
27420
27484
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: PoComboComponent, isStandalone: false, selector: "po-combo", providers: [
|
|
27421
27485
|
PoComboFilterService,
|
|
@@ -27430,7 +27494,7 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
27430
27494
|
useExisting: forwardRef(() => PoComboComponent),
|
|
27431
27495
|
multi: true
|
|
27432
27496
|
}
|
|
27433
|
-
], queries: [{ propertyName: "comboOptionTemplate", first: true, predicate: PoComboOptionTemplateDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "outerContainer", first: true, predicate: ["outerContainer "], descendants: true, read: ElementRef }, { propertyName: "containerElement", first: true, predicate: ["containerElement"], descendants: true, read: ElementRef }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, read: ElementRef }, { propertyName: "iconElement", first: true, predicate: ["iconArrow"], descendants: true, read: ElementRef, static: true }, { propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "poListbox", first: true, predicate: ["poListbox"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #outerContainer>\n <po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n >\n <div\n #searchContainer\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-combo-container-content\"\n >\n <div class=\"po-combo-container-wrapper\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon\n class=\"po-field-icon po-icon-input\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [p-icon]=\"icon\"\n ></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-combo-input\"\n [ngClass]=\"\n clean && inp.value\n ? size === 'small'\n ? 'po-input-double-icon-right-aa'\n : 'po-input-double-icon-right'\n : size === 'small'\n ? 'po-input-icon-right-aa'\n : 'po-input-icon-right'\n \"\n [class.po-combo-input-aa]=\"size === 'small'\"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-left-aa]=\"icon && size === 'small'\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [required]=\"required\"\n (click)=\"toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"searchOnEnterOrArrow($event, $event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-combo-clean po-icon-input\"\n [class.po-combo-clean-aa]=\"size === 'small'\"\n *ngIf=\"
|
|
27497
|
+
], queries: [{ propertyName: "comboOptionTemplate", first: true, predicate: PoComboOptionTemplateDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "outerContainer", first: true, predicate: ["outerContainer "], descendants: true, read: ElementRef }, { propertyName: "containerElement", first: true, predicate: ["containerElement"], descendants: true, read: ElementRef }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, read: ElementRef }, { propertyName: "iconElement", first: true, predicate: ["iconArrow"], descendants: true, read: ElementRef, static: true }, { propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "poListbox", first: true, predicate: ["poListbox"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #outerContainer>\n <po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n >\n <div\n #searchContainer\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-combo-container-content\"\n >\n <div class=\"po-combo-container-wrapper\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon\n class=\"po-field-icon po-icon-input\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [p-icon]=\"icon\"\n ></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-combo-input\"\n [ngClass]=\"\n clean && inp.value\n ? size === 'small'\n ? 'po-input-double-icon-right-aa'\n : 'po-input-double-icon-right'\n : size === 'small'\n ? 'po-input-icon-right-aa'\n : 'po-input-icon-right'\n \"\n [class.po-combo-input-aa]=\"size === 'small'\"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-left-aa]=\"icon && size === 'small'\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [required]=\"required\"\n [attr.data-append-in-body]=\"appendBox\"\n (click)=\"toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"searchOnEnterOrArrow($event, $event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-combo-clean po-icon-input\"\n [class.po-combo-clean-aa]=\"size === 'small'\"\n *ngIf=\"isCleanVisible()\"\n [p-element-ref]=\"inputEl\"\n [p-size]=\"size\"\n (p-change-event)=\"clear($event)\"\n (click)=\"clear(null); $event.preventDefault()\"\n (keydown.enter)=\"clearAndFocus(); $event.preventDefault()\"\n (keydown.tab)=\"handleCleanKeyboardTab($event)\"\n >\n </po-clean>\n\n <div\n #iconArrow\n class=\"po-combo-arrow po-field-icon\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-field-icon-disabled-aa]=\"disabled && size === 'small'\"\n (click)=\"toggleComboVisibility(true)\"\n >\n <po-icon\n [p-icon]=\"comboOpen ? 'ICON_ARROW_UP po-icon-input' : 'ICON_ARROW_DOWN po-icon-input'\"\n [class.po-field-icon]=\"!disabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [class.po-combo-default-border]=\"!disabled && inp.value\"\n [class.po-combo-background-arrow-up]=\"!disabled && comboOpen\"\n ></po-icon>\n </div>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"appendBox; then dropdownCDK; else dropdownDefault\"> </ng-container>\n\n <ng-template #dropdownDefault>\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"> </ng-container>\n </ng-template>\n\n <ng-template #dropdownCDK>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"></ng-container>\n </ng-template>\n </ng-template>\n\n <po-field-container-bottom\n [p-additional-help-tooltip]=\"getAdditionalHelpTooltip()\"\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"disabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-show-additional-help]=\"displayAdditionalHelp\"\n [p-show-additional-help-icon]=\"showAdditionalHelpIcon()\"\n (p-additional-help)=\"emitAdditionalHelp()\"\n ></po-field-container-bottom>\n </po-field-container>\n\n <ng-template #dropdownListbox>\n <div #containerElement class=\"po-combo-container\" [hidden]=\"!comboOpen && !isServerSearching\">\n <po-listbox\n #poListbox\n #contentElement\n p-type=\"option\"\n [p-items]=\"visibleOptions\"\n [p-field-value]=\"dynamicValue\"\n [p-field-label]=\"dynamicLabel\"\n [p-template]=\"comboOptionTemplate\"\n [p-search-value]=\"getInputValue()\"\n [p-infinite-loading]=\"infiniteLoading\"\n [p-infinite-scroll]=\"infiniteScroll\"\n [p-filtering]=\"isFiltering\"\n [p-cache]=\"cache\"\n [p-filter-mode]=\"filterMode\"\n [p-visible]=\"comboOpen\"\n [p-is-searching]=\"isServerSearching\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareObjects(cacheOptions, visibleOptions)\"\n [p-combo-service]=\"service\"\n [p-infinite-scroll-distance]=\"infiniteScrollDistance\"\n [p-size]=\"size\"\n [p-container-width]=\"containerWidth\"\n (p-selectcombo-item)=\"onOptionClick($event, $event.event)\"\n (p-update-infinite-scroll)=\"showMoreInfiniteScroll()\"\n (p-close)=\"onCloseCombo()\"\n (keydown)=\"onListboxKeyDown($event)\"\n ></po-listbox>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i6$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i6$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: PoCleanComponent, selector: "po-clean" }, { kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-additional-help-tooltip", "p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-show-additional-help", "p-show-additional-help-icon"], outputs: ["p-additional-help"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-optional", "p-required", "p-show-required"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27434
27498
|
}
|
|
27435
27499
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoComboComponent, decorators: [{
|
|
27436
27500
|
type: Component,
|
|
@@ -27447,7 +27511,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
27447
27511
|
useExisting: forwardRef(() => PoComboComponent),
|
|
27448
27512
|
multi: true
|
|
27449
27513
|
}
|
|
27450
|
-
], standalone: false, template: "<div #outerContainer>\n <po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n >\n <div\n #searchContainer\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-combo-container-content\"\n >\n <div class=\"po-combo-container-wrapper\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon\n class=\"po-field-icon po-icon-input\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [p-icon]=\"icon\"\n ></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-combo-input\"\n [ngClass]=\"\n clean && inp.value\n ? size === 'small'\n ? 'po-input-double-icon-right-aa'\n : 'po-input-double-icon-right'\n : size === 'small'\n ? 'po-input-icon-right-aa'\n : 'po-input-icon-right'\n \"\n [class.po-combo-input-aa]=\"size === 'small'\"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-left-aa]=\"icon && size === 'small'\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [required]=\"required\"\n (click)=\"toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"searchOnEnterOrArrow($event, $event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-combo-clean po-icon-input\"\n [class.po-combo-clean-aa]=\"size === 'small'\"\n *ngIf=\"
|
|
27514
|
+
], standalone: false, template: "<div #outerContainer>\n <po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n >\n <div\n #searchContainer\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-combo-container-content\"\n >\n <div class=\"po-combo-container-wrapper\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon\n class=\"po-field-icon po-icon-input\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [p-icon]=\"icon\"\n ></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-combo-input\"\n [ngClass]=\"\n clean && inp.value\n ? size === 'small'\n ? 'po-input-double-icon-right-aa'\n : 'po-input-double-icon-right'\n : size === 'small'\n ? 'po-input-icon-right-aa'\n : 'po-input-icon-right'\n \"\n [class.po-combo-input-aa]=\"size === 'small'\"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-left-aa]=\"icon && size === 'small'\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [required]=\"required\"\n [attr.data-append-in-body]=\"appendBox\"\n (click)=\"toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"searchOnEnterOrArrow($event, $event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-combo-clean po-icon-input\"\n [class.po-combo-clean-aa]=\"size === 'small'\"\n *ngIf=\"isCleanVisible()\"\n [p-element-ref]=\"inputEl\"\n [p-size]=\"size\"\n (p-change-event)=\"clear($event)\"\n (click)=\"clear(null); $event.preventDefault()\"\n (keydown.enter)=\"clearAndFocus(); $event.preventDefault()\"\n (keydown.tab)=\"handleCleanKeyboardTab($event)\"\n >\n </po-clean>\n\n <div\n #iconArrow\n class=\"po-combo-arrow po-field-icon\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-field-icon-disabled-aa]=\"disabled && size === 'small'\"\n (click)=\"toggleComboVisibility(true)\"\n >\n <po-icon\n [p-icon]=\"comboOpen ? 'ICON_ARROW_UP po-icon-input' : 'ICON_ARROW_DOWN po-icon-input'\"\n [class.po-field-icon]=\"!disabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [class.po-combo-default-border]=\"!disabled && inp.value\"\n [class.po-combo-background-arrow-up]=\"!disabled && comboOpen\"\n ></po-icon>\n </div>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"appendBox; then dropdownCDK; else dropdownDefault\"> </ng-container>\n\n <ng-template #dropdownDefault>\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"> </ng-container>\n </ng-template>\n\n <ng-template #dropdownCDK>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"></ng-container>\n </ng-template>\n </ng-template>\n\n <po-field-container-bottom\n [p-additional-help-tooltip]=\"getAdditionalHelpTooltip()\"\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"disabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-show-additional-help]=\"displayAdditionalHelp\"\n [p-show-additional-help-icon]=\"showAdditionalHelpIcon()\"\n (p-additional-help)=\"emitAdditionalHelp()\"\n ></po-field-container-bottom>\n </po-field-container>\n\n <ng-template #dropdownListbox>\n <div #containerElement class=\"po-combo-container\" [hidden]=\"!comboOpen && !isServerSearching\">\n <po-listbox\n #poListbox\n #contentElement\n p-type=\"option\"\n [p-items]=\"visibleOptions\"\n [p-field-value]=\"dynamicValue\"\n [p-field-label]=\"dynamicLabel\"\n [p-template]=\"comboOptionTemplate\"\n [p-search-value]=\"getInputValue()\"\n [p-infinite-loading]=\"infiniteLoading\"\n [p-infinite-scroll]=\"infiniteScroll\"\n [p-filtering]=\"isFiltering\"\n [p-cache]=\"cache\"\n [p-filter-mode]=\"filterMode\"\n [p-visible]=\"comboOpen\"\n [p-is-searching]=\"isServerSearching\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareObjects(cacheOptions, visibleOptions)\"\n [p-combo-service]=\"service\"\n [p-infinite-scroll-distance]=\"infiniteScrollDistance\"\n [p-size]=\"size\"\n [p-container-width]=\"containerWidth\"\n (p-selectcombo-item)=\"onOptionClick($event, $event.event)\"\n (p-update-infinite-scroll)=\"showMoreInfiniteScroll()\"\n (p-close)=\"onCloseCombo()\"\n (keydown)=\"onListboxKeyDown($event)\"\n ></po-listbox>\n </div>\n </ng-template>\n</div>\n" }]
|
|
27451
27515
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.IterableDiffers }, { type: PoComboFilterService }, { type: i0.Renderer2 }, { type: PoControlPositionService }, { type: i0.ChangeDetectorRef }, { type: PoThemeService }, { type: PoLanguageService }], propDecorators: { comboOptionTemplate: [{
|
|
27452
27516
|
type: ContentChild,
|
|
27453
27517
|
args: [PoComboOptionTemplateDirective, { static: true }]
|
|
@@ -30793,6 +30857,7 @@ class PoLookupModalBaseComponent {
|
|
|
30793
30857
|
page = 1;
|
|
30794
30858
|
pageSize = 10;
|
|
30795
30859
|
searchValue = '';
|
|
30860
|
+
appliedSearchValue = '';
|
|
30796
30861
|
tableLiterals;
|
|
30797
30862
|
// Propriedade da modal de busca avançada:
|
|
30798
30863
|
advancedFilterModalTitle = '';
|
|
@@ -30890,6 +30955,7 @@ class PoLookupModalBaseComponent {
|
|
|
30890
30955
|
createDisclaimer() {
|
|
30891
30956
|
this.disclaimerGroup.disclaimers = [];
|
|
30892
30957
|
this.searchValue = '';
|
|
30958
|
+
this.appliedSearchValue = '';
|
|
30893
30959
|
for (const [key, value] of Object.entries(this.dynamicFormValue)) {
|
|
30894
30960
|
this.addDisclaimer(value, key);
|
|
30895
30961
|
}
|
|
@@ -30919,15 +30985,17 @@ class PoLookupModalBaseComponent {
|
|
|
30919
30985
|
this.disclaimerGroup.disclaimers = [...this.disclaimerGroup.disclaimers, this.disclaimer];
|
|
30920
30986
|
}
|
|
30921
30987
|
onChangeDisclaimerGroup() {
|
|
30922
|
-
if (!this.
|
|
30988
|
+
if (!this.appliedSearchValue) {
|
|
30923
30989
|
this.isLoading = true;
|
|
30924
30990
|
this.searchValue = '';
|
|
30991
|
+
this.appliedSearchValue = '';
|
|
30925
30992
|
this.searchFilteredItems();
|
|
30926
30993
|
}
|
|
30927
30994
|
}
|
|
30928
30995
|
search() {
|
|
30929
30996
|
this.page = 1;
|
|
30930
|
-
|
|
30997
|
+
this.appliedSearchValue = this.searchValue;
|
|
30998
|
+
if (this.appliedSearchValue) {
|
|
30931
30999
|
this.isLoading = true;
|
|
30932
31000
|
this.disclaimerGroup.disclaimers = [];
|
|
30933
31001
|
this.searchFilteredItems();
|
|
@@ -30937,7 +31005,7 @@ class PoLookupModalBaseComponent {
|
|
|
30937
31005
|
}
|
|
30938
31006
|
}
|
|
30939
31007
|
searchFilteredItems() {
|
|
30940
|
-
this.searchSubscription = this.getFilteredItems(this.
|
|
31008
|
+
this.searchSubscription = this.getFilteredItems(this.appliedSearchValue)
|
|
30941
31009
|
.pipe(catchError(error => {
|
|
30942
31010
|
this.setLookupResponseProperties();
|
|
30943
31011
|
return throwError(error);
|
|
@@ -30947,7 +31015,10 @@ class PoLookupModalBaseComponent {
|
|
|
30947
31015
|
showMoreEvent() {
|
|
30948
31016
|
this.page++;
|
|
30949
31017
|
this.isLoading = true;
|
|
30950
|
-
this.
|
|
31018
|
+
if (this.searchValue !== this.appliedSearchValue) {
|
|
31019
|
+
this.searchValue = this.appliedSearchValue;
|
|
31020
|
+
}
|
|
31021
|
+
this.showMoreSubscription = this.getFilteredItems(this.appliedSearchValue)
|
|
30951
31022
|
.pipe(catchError(error => {
|
|
30952
31023
|
this.hasNext = false;
|
|
30953
31024
|
this.isLoading = false;
|
|
@@ -52495,11 +52566,13 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
52495
52566
|
* ## Configuração
|
|
52496
52567
|
*
|
|
52497
52568
|
* Para o correto funcionamento do interceptor `po-http-interceptor`, deve ser importado o `BrowserAnimationsModule` no
|
|
52498
|
-
* 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())`.
|
|
52499
52571
|
*
|
|
52500
52572
|
* Módulo da aplicação:
|
|
52501
52573
|
* ```
|
|
52502
52574
|
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
52575
|
+
* import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
52503
52576
|
* import { PoModule } from '@po-ui/ng-components';
|
|
52504
52577
|
* ...
|
|
52505
52578
|
*
|
|
@@ -52514,7 +52587,10 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message';
|
|
|
52514
52587
|
* AppComponent,
|
|
52515
52588
|
* ...
|
|
52516
52589
|
* ],
|
|
52517
|
-
* providers: [
|
|
52590
|
+
* providers: [
|
|
52591
|
+
* provideHttpClient(withInterceptorsFromDi()),
|
|
52592
|
+
* ...
|
|
52593
|
+
* ],
|
|
52518
52594
|
* bootstrap: [AppComponent]
|
|
52519
52595
|
* })
|
|
52520
52596
|
* export class AppModule { }
|