@po-ui/ng-components 6.9.0 → 6.10.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/esm2020/lib/components/po-button/po-button.component.mjs +4 -4
- package/esm2020/lib/components/po-field/po-combo/po-combo-base.component.mjs +9 -4
- package/esm2020/lib/components/po-field/po-decimal/po-decimal.component.mjs +15 -4
- package/esm2020/lib/components/po-field/po-rich-text/po-rich-text-toolbar/po-rich-text-toolbar.component.mjs +8 -8
- package/fesm2015/po-ui-ng-components.mjs +31 -15
- package/fesm2015/po-ui-ng-components.mjs.map +1 -1
- package/fesm2020/po-ui-ng-components.mjs +31 -15
- package/fesm2020/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-field/po-combo/po-combo-base.component.d.ts +1 -0
- package/package.json +4 -4
- package/po-ui-ng-components-6.10.0.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- 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-6.9.0.tgz +0 -0
|
@@ -2530,7 +2530,7 @@ PoButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoButtonC
|
|
|
2530
2530
|
} if (rf & 2) {
|
|
2531
2531
|
let _t;
|
|
2532
2532
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.buttonElement = _t.first);
|
|
2533
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars:
|
|
2533
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 16, consts: [["type", "button", 1, "po-button", "po-text-ellipsis", 3, "disabled", "click"], ["button", ""], ["class", "po-button-loading-icon", 4, "ngIf"], ["class", "po-button-icon", 3, "p-icon", 4, "ngIf"], ["class", "po-button-label", 4, "ngIf"], [1, "po-button-loading-icon"], ["p-neutral-color", ""], [1, "po-button-icon", 3, "p-icon"], [1, "po-button-label"]], template: function PoButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2534
2534
|
i0.ɵɵelementStart(0, "button", 0, 1);
|
|
2535
2535
|
i0.ɵɵlistener("click", function PoButtonComponent_Template_button_click_0_listener() { return ctx.onClick(); });
|
|
2536
2536
|
i0.ɵɵtemplate(2, PoButtonComponent_div_2_Template, 2, 0, "div", 2);
|
|
@@ -2538,7 +2538,7 @@ PoButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoButtonC
|
|
|
2538
2538
|
i0.ɵɵtemplate(4, PoButtonComponent_span_4_Template, 2, 1, "span", 4);
|
|
2539
2539
|
i0.ɵɵelementEnd();
|
|
2540
2540
|
} if (rf & 2) {
|
|
2541
|
-
i0.ɵɵclassProp("po-button-danger", ctx.type === "danger")("po-button-link", ctx.type === "link")("po-button-primary", ctx.type === "primary")("po-button-sm", ctx.small)("po-clickable", ctx.type === "link");
|
|
2541
|
+
i0.ɵɵclassProp("po-button-default", ctx.type === "default")("po-button-danger", ctx.type === "danger")("po-button-link", ctx.type === "link")("po-button-primary", ctx.type === "primary")("po-button-sm", ctx.small)("po-clickable", ctx.type === "link");
|
|
2542
2542
|
i0.ɵɵproperty("disabled", ctx.disabled || ctx.loading);
|
|
2543
2543
|
i0.ɵɵadvance(2);
|
|
2544
2544
|
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
@@ -2549,7 +2549,7 @@ PoButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoButtonC
|
|
|
2549
2549
|
} }, directives: [i1.NgIf, PoLoadingIconComponent, PoIconComponent], encapsulation: 2, changeDetection: 0 });
|
|
2550
2550
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoButtonComponent, [{
|
|
2551
2551
|
type: Component,
|
|
2552
|
-
args: [{ selector: 'po-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n #button\n class=\"po-button po-text-ellipsis\"\n type=\"button\"\n [class.po-button-danger]=\"type === 'danger'\"\n [class.po-button-link]=\"type === 'link'\"\n [class.po-button-primary]=\"type === 'primary'\"\n [class.po-button-sm]=\"small\"\n [class.po-clickable]=\"type === 'link'\"\n [disabled]=\"disabled || loading\"\n (click)=\"onClick()\"\n>\n <div *ngIf=\"loading\" class=\"po-button-loading-icon\">\n <po-loading-icon p-neutral-color></po-loading-icon>\n </div>\n\n <po-icon *ngIf=\"icon\" class=\"po-button-icon\" [p-icon]=\"icon\"></po-icon>\n <span *ngIf=\"label\" class=\"po-button-label\">{{ label }}</span>\n</button>\n" }]
|
|
2552
|
+
args: [{ selector: 'po-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n #button\n class=\"po-button po-text-ellipsis\"\n type=\"button\"\n [class.po-button-default]=\"type === 'default'\"\n [class.po-button-danger]=\"type === 'danger'\"\n [class.po-button-link]=\"type === 'link'\"\n [class.po-button-primary]=\"type === 'primary'\"\n [class.po-button-sm]=\"small\"\n [class.po-clickable]=\"type === 'link'\"\n [disabled]=\"disabled || loading\"\n (click)=\"onClick()\"\n>\n <div *ngIf=\"loading\" class=\"po-button-loading-icon\">\n <po-loading-icon p-neutral-color></po-loading-icon>\n </div>\n\n <po-icon *ngIf=\"icon\" class=\"po-button-icon\" [p-icon]=\"icon\"></po-icon>\n <span *ngIf=\"label\" class=\"po-button-label\">{{ label }}</span>\n</button>\n" }]
|
|
2553
2553
|
}], null, { buttonElement: [{
|
|
2554
2554
|
type: ViewChild,
|
|
2555
2555
|
args: ['button', { static: true }]
|
|
@@ -18196,6 +18196,7 @@ class PoComboBaseComponent {
|
|
|
18196
18196
|
* - A lista deve seguir as definições descritas nas respectivas interfaces, caso contrário não exibirá a(as) opção(ões) fora dos padrões.
|
|
18197
18197
|
* - O componente interpretará o formato da lista de acordo com a interface utilizada e só exibirá as opções correspondentes à ela.
|
|
18198
18198
|
* - Um agrupamento só será exibido se houver pelo menos uma opção válida.
|
|
18199
|
+
* - Aconselha-se utilizar valores distintos no `label` e `value` dos itens.
|
|
18199
18200
|
*/
|
|
18200
18201
|
set options(options) {
|
|
18201
18202
|
this._options = Array.isArray(options) ? options : [];
|
|
@@ -18532,8 +18533,12 @@ class PoComboBaseComponent {
|
|
|
18532
18533
|
return labelA < labelB ? -1 : labelA > labelB ? 1 : 0;
|
|
18533
18534
|
}
|
|
18534
18535
|
hasDuplicatedOption(options, currentOption, accumulatedGroupOptions) {
|
|
18535
|
-
|
|
18536
|
-
|
|
18536
|
+
if (accumulatedGroupOptions) {
|
|
18537
|
+
return accumulatedGroupOptions.some(option => option.label === currentOption);
|
|
18538
|
+
}
|
|
18539
|
+
else {
|
|
18540
|
+
return options.some(option => option.value === currentOption);
|
|
18541
|
+
}
|
|
18537
18542
|
}
|
|
18538
18543
|
listingComboOptions(comboOptions) {
|
|
18539
18544
|
const comboOptionsList = comboOptions.concat();
|
|
@@ -18559,7 +18564,7 @@ class PoComboBaseComponent {
|
|
|
18559
18564
|
verifyComboOptions(comboOptions, verifyingOptionsGroup = false, accumulatedGroupOptions) {
|
|
18560
18565
|
return comboOptions.reduce((accumulatedOptions, currentOption) => {
|
|
18561
18566
|
if (!this.verifyIfHasLabel(currentOption) ||
|
|
18562
|
-
this.hasDuplicatedOption(accumulatedOptions, currentOption
|
|
18567
|
+
this.hasDuplicatedOption(accumulatedOptions, currentOption['value'] || currentOption['label'], accumulatedGroupOptions) ||
|
|
18563
18568
|
!this.validateValue(currentOption, verifyingOptionsGroup)) {
|
|
18564
18569
|
return accumulatedOptions;
|
|
18565
18570
|
}
|
|
@@ -21337,16 +21342,27 @@ class PoDecimalComponent extends PoInputBaseComponent {
|
|
|
21337
21342
|
this.controlChangeEmitter();
|
|
21338
21343
|
}
|
|
21339
21344
|
extraValidation(abstractControl) {
|
|
21345
|
+
const value = abstractControl.value;
|
|
21346
|
+
const thousandValue = Math.trunc(value);
|
|
21340
21347
|
// Verifica se já possui algum error pattern padrão.
|
|
21341
21348
|
this.errorPattern = this.errorPattern !== 'Valor Inválido' ? this.errorPattern : '';
|
|
21342
|
-
if (minFailed(this.min,
|
|
21349
|
+
if (minFailed(this.min, value)) {
|
|
21343
21350
|
return {
|
|
21344
21351
|
min: {
|
|
21345
21352
|
valid: false
|
|
21346
21353
|
}
|
|
21347
21354
|
};
|
|
21348
21355
|
}
|
|
21349
|
-
if (maxFailed(this.max,
|
|
21356
|
+
if (maxFailed(this.max, value)) {
|
|
21357
|
+
return {
|
|
21358
|
+
max: {
|
|
21359
|
+
valid: false
|
|
21360
|
+
}
|
|
21361
|
+
};
|
|
21362
|
+
}
|
|
21363
|
+
if ((maxlengpoailed(this.thousandMaxlength, thousandValue) &&
|
|
21364
|
+
this.thousandMaxlength < poDecimalDefaultThousandMaxlength) ||
|
|
21365
|
+
maxlengpoailed(poDecimalTotalLengthLimit, value)) {
|
|
21350
21366
|
return {
|
|
21351
21367
|
max: {
|
|
21352
21368
|
valid: false
|
|
@@ -28916,7 +28932,7 @@ PoRichTextToolbarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
28916
28932
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.toolbarElement = _t.first);
|
|
28917
28933
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.richTextImageModal = _t.first);
|
|
28918
28934
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.richTextLinkModal = _t.first);
|
|
28919
|
-
} }, inputs: { readonly: ["p-readonly", "readonly"] }, outputs: { command: "p-command", modal: "p-modal", linkEditing: "p-link-editing" }, decls: 17, vars:
|
|
28935
|
+
} }, inputs: { readonly: ["p-readonly", "readonly"] }, outputs: { command: "p-command", modal: "p-modal", linkEditing: "p-link-editing" }, decls: 17, vars: 11, consts: [[1, "po-rich-text-toolbar"], ["toolbarElement", ""], [1, "po-rich-text-toolbar-button-align"], ["p-toggle", "multiple", 3, "p-small", "p-buttons"], ["class", "po-rich-text-toolbar-button-align", 4, "ngIf"], ["p-toggle", "single", 3, "p-small", "p-buttons"], [3, "p-small", "p-buttons"], [3, "p-command"], ["richTextImageModal", ""], [3, "p-command", "p-link-editing"], ["richTextLinkModal", ""], [1, "po-rich-text-toolbar-color-picker-container"], [1, "po-button", "po-button-default", "po-button-sm", "po-text-ellipsis", "po-rich-text-toolbar-color-picker-button", 3, "disabled", "p-tooltip"], ["type", "color", 1, "po-rich-text-toolbar-color-picker-input", 3, "disabled", "change"], ["colorPickerInput", ""]], template: function PoRichTextToolbarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
28920
28936
|
i0.ɵɵelementStart(0, "div", 0, 1)(2, "div", 2);
|
|
28921
28937
|
i0.ɵɵelement(3, "po-button-group", 3);
|
|
28922
28938
|
i0.ɵɵelementEnd();
|
|
@@ -28941,21 +28957,21 @@ PoRichTextToolbarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
28941
28957
|
i0.ɵɵelementEnd();
|
|
28942
28958
|
} if (rf & 2) {
|
|
28943
28959
|
i0.ɵɵadvance(3);
|
|
28944
|
-
i0.ɵɵproperty("p-buttons", ctx.formatButtons);
|
|
28960
|
+
i0.ɵɵproperty("p-small", true)("p-buttons", ctx.formatButtons);
|
|
28945
28961
|
i0.ɵɵadvance(1);
|
|
28946
28962
|
i0.ɵɵproperty("ngIf", !ctx.isInternetExplorer);
|
|
28947
28963
|
i0.ɵɵadvance(2);
|
|
28948
|
-
i0.ɵɵproperty("p-buttons", ctx.alignButtons);
|
|
28964
|
+
i0.ɵɵproperty("p-small", true)("p-buttons", ctx.alignButtons);
|
|
28949
28965
|
i0.ɵɵadvance(2);
|
|
28950
|
-
i0.ɵɵproperty("p-buttons", ctx.listButtons);
|
|
28966
|
+
i0.ɵɵproperty("p-small", true)("p-buttons", ctx.listButtons);
|
|
28951
28967
|
i0.ɵɵadvance(2);
|
|
28952
|
-
i0.ɵɵproperty("p-buttons", ctx.linkButtons);
|
|
28968
|
+
i0.ɵɵproperty("p-small", true)("p-buttons", ctx.linkButtons);
|
|
28953
28969
|
i0.ɵɵadvance(2);
|
|
28954
|
-
i0.ɵɵproperty("p-buttons", ctx.mediaButtons);
|
|
28970
|
+
i0.ɵɵproperty("p-small", true)("p-buttons", ctx.mediaButtons);
|
|
28955
28971
|
} }, directives: [PoButtonGroupComponent, i1.NgIf, PoTooltipDirective, PoRichTextImageModalComponent, PoRichTextLinkModalComponent], encapsulation: 2 });
|
|
28956
28972
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoRichTextToolbarComponent, [{
|
|
28957
28973
|
type: Component,
|
|
28958
|
-
args: [{ selector: 'po-rich-text-toolbar', template: "<div class=\"po-rich-text-toolbar\" #toolbarElement>\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group p-toggle=\"multiple\" [p-buttons]=\"formatButtons\"> </po-button-group>\n </div>\n\n <div *ngIf=\"!isInternetExplorer\" class=\"po-rich-text-toolbar-button-align\">\n <div class=\"po-rich-text-toolbar-color-picker-container\">\n <button\n class=\"po-button po-text-ellipsis po-rich-text-toolbar-color-picker-button\"\n [disabled]=\"readonly\"\n [p-tooltip]=\"literals.textColor\"\n [attr.aria-label]=\"literals.textColor\"\n >\n <input\n #colorPickerInput\n class=\"po-rich-text-toolbar-color-picker-input\"\n type=\"color\"\n [disabled]=\"readonly\"\n (change)=\"changeTextColor($event.target.value)\"\n [attr.aria-label]=\"literals.textColor\"\n />\n </button>\n </div>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"alignButtons\"> </po-button-group>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"listButtons\"> </po-button-group>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group [p-buttons]=\"linkButtons\"> </po-button-group>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group [p-buttons]=\"mediaButtons\"> </po-button-group>\n </div>\n</div>\n\n<po-rich-text-image-modal #richTextImageModal (p-command)=\"emitCommand($event)\"> </po-rich-text-image-modal>\n\n<po-rich-text-link-modal\n #richTextLinkModal\n (p-command)=\"emitCommand($event)\"\n (p-link-editing)=\"emitLinkEditing($event)\"\n>\n</po-rich-text-link-modal>\n" }]
|
|
28974
|
+
args: [{ selector: 'po-rich-text-toolbar', template: "<div class=\"po-rich-text-toolbar\" #toolbarElement>\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group p-toggle=\"multiple\" [p-small]=\"true\" [p-buttons]=\"formatButtons\"> </po-button-group>\n </div>\n\n <div *ngIf=\"!isInternetExplorer\" class=\"po-rich-text-toolbar-button-align\">\n <div class=\"po-rich-text-toolbar-color-picker-container\">\n <button\n class=\"po-button po-button-default po-button-sm po-text-ellipsis po-rich-text-toolbar-color-picker-button\"\n [disabled]=\"readonly\"\n [p-tooltip]=\"literals.textColor\"\n [attr.aria-label]=\"literals.textColor\"\n >\n <input\n #colorPickerInput\n class=\"po-rich-text-toolbar-color-picker-input\"\n type=\"color\"\n [disabled]=\"readonly\"\n (change)=\"changeTextColor($event.target.value)\"\n [attr.aria-label]=\"literals.textColor\"\n />\n </button>\n </div>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group p-toggle=\"single\" [p-small]=\"true\" [p-buttons]=\"alignButtons\"> </po-button-group>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group p-toggle=\"single\" [p-small]=\"true\" [p-buttons]=\"listButtons\"> </po-button-group>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group [p-small]=\"true\" [p-buttons]=\"linkButtons\"> </po-button-group>\n </div>\n\n <div class=\"po-rich-text-toolbar-button-align\">\n <po-button-group [p-small]=\"true\" [p-buttons]=\"mediaButtons\"> </po-button-group>\n </div>\n</div>\n\n<po-rich-text-image-modal #richTextImageModal (p-command)=\"emitCommand($event)\"> </po-rich-text-image-modal>\n\n<po-rich-text-link-modal\n #richTextLinkModal\n (p-command)=\"emitCommand($event)\"\n (p-link-editing)=\"emitLinkEditing($event)\"\n>\n</po-rich-text-link-modal>\n" }]
|
|
28959
28975
|
}], function () { return [{ type: PoLanguageService }]; }, { colorPickerInput: [{
|
|
28960
28976
|
type: ViewChild,
|
|
28961
28977
|
args: ['colorPickerInput', { read: ElementRef }]
|