@po-ui/ng-components 19.3.0-beta.1 → 19.3.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 +7 -79
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-field/po-combo/po-combo-base.component.d.ts +1 -10
- package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +1 -10
- package/lib/components/po-field/po-select/po-select.component.d.ts +1 -10
- package/package.json +4 -4
- package/po-ui-ng-components-19.3.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.3.0-beta.1.tgz +0 -0
|
@@ -29297,12 +29297,6 @@ class PoComboBaseComponent {
|
|
|
29297
29297
|
*
|
|
29298
29298
|
*/
|
|
29299
29299
|
inputChange = new EventEmitter();
|
|
29300
|
-
/**
|
|
29301
|
-
* @docsPrivate
|
|
29302
|
-
*
|
|
29303
|
-
* Determinar se o valor do compo deve retorna objeto do tipo {value: any, label: any}
|
|
29304
|
-
*/
|
|
29305
|
-
controlValueWithLabel = false;
|
|
29306
29300
|
cacheOptions = [];
|
|
29307
29301
|
defaultService;
|
|
29308
29302
|
firstInWriteValue = true;
|
|
@@ -29819,7 +29813,6 @@ class PoComboBaseComponent {
|
|
|
29819
29813
|
}
|
|
29820
29814
|
// Recebe as alterações do model
|
|
29821
29815
|
writeValue(value) {
|
|
29822
|
-
value = this.getValueWrite(value);
|
|
29823
29816
|
this.fromWriteValue = true;
|
|
29824
29817
|
if (validValue(value) && !this.service && this.comboOptionsList && this.comboOptionsList.length) {
|
|
29825
29818
|
const option = this.getOptionFromValue(value, this.comboOptionsList);
|
|
@@ -29930,22 +29923,6 @@ class PoComboBaseComponent {
|
|
|
29930
29923
|
return labelA < labelB ? -1 : labelA > labelB ? 1 : 0;
|
|
29931
29924
|
};
|
|
29932
29925
|
}
|
|
29933
|
-
getValueUpdate(data, selectedOption) {
|
|
29934
|
-
if (this.controlValueWithLabel && selectedOption?.value) {
|
|
29935
|
-
const { value, label } = selectedOption;
|
|
29936
|
-
return {
|
|
29937
|
-
value,
|
|
29938
|
-
label
|
|
29939
|
-
};
|
|
29940
|
-
}
|
|
29941
|
-
return data;
|
|
29942
|
-
}
|
|
29943
|
-
getValueWrite(data) {
|
|
29944
|
-
if (this.controlValueWithLabel && data?.value) {
|
|
29945
|
-
return data.value;
|
|
29946
|
-
}
|
|
29947
|
-
return data;
|
|
29948
|
-
}
|
|
29949
29926
|
hasDuplicatedOption(options, currentOption, accumulatedGroupOptions) {
|
|
29950
29927
|
if (accumulatedGroupOptions) {
|
|
29951
29928
|
return accumulatedGroupOptions.some(option => option[this.dynamicLabel] === currentOption);
|
|
@@ -30024,7 +30001,7 @@ class PoComboBaseComponent {
|
|
|
30024
30001
|
updateModel(value) {
|
|
30025
30002
|
if (value !== this.selectedValue) {
|
|
30026
30003
|
if (!this.fromWriteValue) {
|
|
30027
|
-
this.callModelChange(
|
|
30004
|
+
this.callModelChange(value);
|
|
30028
30005
|
}
|
|
30029
30006
|
this.change.emit(this.emitObjectValue ? this.selectedOption : value);
|
|
30030
30007
|
}
|
|
@@ -30043,7 +30020,7 @@ class PoComboBaseComponent {
|
|
|
30043
30020
|
}
|
|
30044
30021
|
}
|
|
30045
30022
|
static ɵfac = function PoComboBaseComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PoComboBaseComponent)(i0.ɵɵdirectiveInject(PoLanguageService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
30046
|
-
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PoComboBaseComponent, inputs: { additionalHelpEventTrigger: "additionalHelpEventTrigger", additionalHelpTooltip: [0, "p-additional-help-tooltip", "additionalHelpTooltip"], autoFocus: [2, "p-auto-focus", "autoFocus", convertToBoolean], label: [0, "p-label", "label"], help: [0, "p-help", "help"], name: "name", filterService: [0, "p-filter-service", "filterService"], infiniteScroll: [0, "p-infinite-scroll", "infiniteScroll"], infiniteScrollDistance: [0, "p-infinite-scroll-distance", "infiniteScrollDistance"], icon: [0, "p-icon", "icon"], optional: [0, "p-optional", "optional"], clean: [2, "p-clean", "clean", convertToBoolean], emitObjectValue: [2, "p-emit-object-value", "emitObjectValue", convertToBoolean], disabledTabFilter: [2, "p-disabled-tab-filter", "disabledTabFilter", convertToBoolean], removeInitialFilter: [0, "p-remove-initial-filter", "removeInitialFilter"], fieldErrorMessage: [0, "p-field-error-message", "fieldErrorMessage"], errorLimit: [0, "p-error-limit", "errorLimit"],
|
|
30023
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PoComboBaseComponent, inputs: { additionalHelpEventTrigger: "additionalHelpEventTrigger", additionalHelpTooltip: [0, "p-additional-help-tooltip", "additionalHelpTooltip"], autoFocus: [2, "p-auto-focus", "autoFocus", convertToBoolean], label: [0, "p-label", "label"], help: [0, "p-help", "help"], name: "name", filterService: [0, "p-filter-service", "filterService"], infiniteScroll: [0, "p-infinite-scroll", "infiniteScroll"], infiniteScrollDistance: [0, "p-infinite-scroll-distance", "infiniteScrollDistance"], icon: [0, "p-icon", "icon"], optional: [0, "p-optional", "optional"], clean: [2, "p-clean", "clean", convertToBoolean], emitObjectValue: [2, "p-emit-object-value", "emitObjectValue", convertToBoolean], disabledTabFilter: [2, "p-disabled-tab-filter", "disabledTabFilter", convertToBoolean], removeInitialFilter: [0, "p-remove-initial-filter", "removeInitialFilter"], fieldErrorMessage: [0, "p-field-error-message", "fieldErrorMessage"], errorLimit: [0, "p-error-limit", "errorLimit"], placeholder: [0, "p-placeholder", "placeholder"], debounceTime: [0, "p-debounce-time", "debounceTime"], disabledInitFilter: [0, "p-disabled-init-filter", "disabledInitFilter"], fieldValue: [0, "p-field-value", "fieldValue"], fieldLabel: [0, "p-field-label", "fieldLabel"], filterMinlength: [0, "p-filter-minlength", "filterMinlength"], required: [0, "p-required", "required"], showRequired: [0, "p-show-required", "showRequired"], changeOnEnter: [0, "p-change-on-enter", "changeOnEnter"], disabled: [0, "p-disabled", "disabled"], sort: [0, "p-sort", "sort"], options: [0, "p-options", "options"], filterMode: [0, "p-filter-mode", "filterMode"], filterParams: [0, "p-filter-params", "filterParams"], literals: [0, "p-literals", "literals"], cache: [2, "p-cache", "cache", convertToBoolean], appendBox: [2, "p-append-in-body", "appendBox", convertToBoolean] }, outputs: { additionalHelp: "p-additional-help", change: "p-change", keydown: "p-keydown", ngModelChange: "ngModelChange", inputChange: "p-input-change" }, features: [i0.ɵɵInputTransformsFeature] });
|
|
30047
30024
|
}
|
|
30048
30025
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoComboBaseComponent, [{
|
|
30049
30026
|
type: Directive
|
|
@@ -30112,9 +30089,6 @@ class PoComboBaseComponent {
|
|
|
30112
30089
|
}], inputChange: [{
|
|
30113
30090
|
type: Output,
|
|
30114
30091
|
args: ['p-input-change']
|
|
30115
|
-
}], controlValueWithLabel: [{
|
|
30116
|
-
type: Input,
|
|
30117
|
-
args: [{ alias: 'p-control-value-with-label', transform: convertToBoolean }]
|
|
30118
30092
|
}], placeholder: [{
|
|
30119
30093
|
type: Input,
|
|
30120
30094
|
args: ['p-placeholder']
|
|
@@ -37629,12 +37603,6 @@ class PoMultiselectBaseComponent {
|
|
|
37629
37603
|
* @default `false`
|
|
37630
37604
|
*/
|
|
37631
37605
|
appendBox = false;
|
|
37632
|
-
/**
|
|
37633
|
-
* @docsPrivate
|
|
37634
|
-
*
|
|
37635
|
-
* Determinar se o valor do compo deve retorna objeto do tipo {value: any, label: any}
|
|
37636
|
-
*/
|
|
37637
|
-
controlValueWithLabel = false;
|
|
37638
37606
|
selectedOptions = [];
|
|
37639
37607
|
visibleOptionsDropdown = [];
|
|
37640
37608
|
visibleTags = [];
|
|
@@ -38016,7 +37984,7 @@ class PoMultiselectBaseComponent {
|
|
|
38016
37984
|
}
|
|
38017
37985
|
callOnChange(selectedOptions) {
|
|
38018
37986
|
if (this.onModelChange) {
|
|
38019
|
-
this.onModelChange(this.
|
|
37987
|
+
this.onModelChange(this.getValuesFromOptions(selectedOptions));
|
|
38020
37988
|
this.eventChange(selectedOptions);
|
|
38021
37989
|
}
|
|
38022
37990
|
}
|
|
@@ -38096,7 +38064,7 @@ class PoMultiselectBaseComponent {
|
|
|
38096
38064
|
this.updateVisibleItems();
|
|
38097
38065
|
}
|
|
38098
38066
|
writeValue(values) {
|
|
38099
|
-
values =
|
|
38067
|
+
values = values || [];
|
|
38100
38068
|
if (this.service && values.length) {
|
|
38101
38069
|
this.getObjectsByValuesSubscription = this.service.getObjectsByValues(values).subscribe(options => {
|
|
38102
38070
|
this.updateSelectedOptions(options);
|
|
@@ -38125,18 +38093,6 @@ class PoMultiselectBaseComponent {
|
|
|
38125
38093
|
registerOnValidatorChange(fn) {
|
|
38126
38094
|
this.validatorChange = fn;
|
|
38127
38095
|
}
|
|
38128
|
-
getValueUpdate(selectedOptions) {
|
|
38129
|
-
if (this.controlValueWithLabel && selectedOptions?.length) {
|
|
38130
|
-
return selectedOptions.map(option => ({ value: option[this.fieldValue], label: option[this.fieldLabel] }));
|
|
38131
|
-
}
|
|
38132
|
-
return this.getValuesFromOptions(selectedOptions);
|
|
38133
|
-
}
|
|
38134
|
-
getValueWrite(data) {
|
|
38135
|
-
if (this.controlValueWithLabel && data?.length && data.some(x => x.value)) {
|
|
38136
|
-
return data.map(option => option.value || null);
|
|
38137
|
-
}
|
|
38138
|
-
return data;
|
|
38139
|
-
}
|
|
38140
38096
|
setLabelsAndValuesOptions() {
|
|
38141
38097
|
if (this.fieldLabel && this.fieldValue && this.options) {
|
|
38142
38098
|
this.options.map(option => {
|
|
@@ -38151,7 +38107,7 @@ class PoMultiselectBaseComponent {
|
|
|
38151
38107
|
}
|
|
38152
38108
|
}
|
|
38153
38109
|
static ɵfac = function PoMultiselectBaseComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PoMultiselectBaseComponent)(i0.ɵɵdirectiveInject(PoLanguageService)); };
|
|
38154
|
-
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PoMultiselectBaseComponent, inputs: { additionalHelpEventTrigger: "additionalHelpEventTrigger", additionalHelpTooltip: [0, "p-additional-help-tooltip", "additionalHelpTooltip"], autoFocus: [2, "p-auto-focus", "autoFocus", convertToBoolean], label: [0, "p-label", "label"], help: [0, "p-help", "help"], optional: [0, "p-optional", "optional"], placeholder: [0, "p-placeholder", "placeholder"], placeholderSearch: [0, "p-placeholder-search", "placeholderSearch"], name: "name", hideSelectAll: [2, "p-hide-select-all", "hideSelectAll", convertToBoolean], fieldErrorMessage: [0, "p-field-error-message", "fieldErrorMessage"], errorLimit: [0, "p-error-limit", "errorLimit"], appendBox: [2, "p-append-in-body", "appendBox", convertToBoolean],
|
|
38110
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PoMultiselectBaseComponent, inputs: { additionalHelpEventTrigger: "additionalHelpEventTrigger", additionalHelpTooltip: [0, "p-additional-help-tooltip", "additionalHelpTooltip"], autoFocus: [2, "p-auto-focus", "autoFocus", convertToBoolean], label: [0, "p-label", "label"], help: [0, "p-help", "help"], optional: [0, "p-optional", "optional"], placeholder: [0, "p-placeholder", "placeholder"], placeholderSearch: [0, "p-placeholder-search", "placeholderSearch"], name: "name", hideSelectAll: [2, "p-hide-select-all", "hideSelectAll", convertToBoolean], fieldErrorMessage: [0, "p-field-error-message", "fieldErrorMessage"], errorLimit: [0, "p-error-limit", "errorLimit"], appendBox: [2, "p-append-in-body", "appendBox", convertToBoolean], filterService: [0, "p-filter-service", "filterService"], autoHeight: [2, "p-auto-height", "autoHeight", convertToBoolean], debounceTime: [0, "p-debounce-time", "debounceTime"], literals: [0, "p-literals", "literals"], required: [0, "p-required", "required"], showRequired: [0, "p-show-required", "showRequired"], disabled: [0, "p-disabled", "disabled"], hideSearch: [0, "p-hide-search", "hideSearch"], options: [0, "p-options", "options"], sort: [0, "p-sort", "sort"], filterMode: [0, "p-filter-mode", "filterMode"], fieldLabel: [0, "p-field-label", "fieldLabel"], fieldValue: [0, "p-field-value", "fieldValue"] }, outputs: { additionalHelp: "p-additional-help", change: "p-change", keydown: "p-keydown" }, features: [i0.ɵɵInputTransformsFeature] });
|
|
38155
38111
|
}
|
|
38156
38112
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoMultiselectBaseComponent, [{
|
|
38157
38113
|
type: Directive
|
|
@@ -38202,9 +38158,6 @@ class PoMultiselectBaseComponent {
|
|
|
38202
38158
|
}], appendBox: [{
|
|
38203
38159
|
type: Input,
|
|
38204
38160
|
args: [{ alias: 'p-append-in-body', transform: convertToBoolean }]
|
|
38205
|
-
}], controlValueWithLabel: [{
|
|
38206
|
-
type: Input,
|
|
38207
|
-
args: [{ alias: 'p-control-value-with-label', transform: convertToBoolean }]
|
|
38208
38161
|
}], filterService: [{
|
|
38209
38162
|
type: Input,
|
|
38210
38163
|
args: ['p-filter-service']
|
|
@@ -43965,12 +43918,6 @@ class PoSelectComponent extends PoFieldValidateModel {
|
|
|
43965
43918
|
this.options = [...this.options];
|
|
43966
43919
|
}
|
|
43967
43920
|
}
|
|
43968
|
-
/**
|
|
43969
|
-
* @docsPrivate
|
|
43970
|
-
*
|
|
43971
|
-
* Determinar se o valor do compo deve retorna objeto do tipo {value: any, label: any}
|
|
43972
|
-
*/
|
|
43973
|
-
controlValueWithLabel = false;
|
|
43974
43921
|
get fieldValue() {
|
|
43975
43922
|
return this._fieldValue;
|
|
43976
43923
|
}
|
|
@@ -44043,14 +43990,13 @@ class PoSelectComponent extends PoFieldValidateModel {
|
|
|
44043
43990
|
if (this.selectedValue !== option[this.fieldValue]) {
|
|
44044
43991
|
this.selectedValue = option[this.fieldValue];
|
|
44045
43992
|
this.selectElement.nativeElement.value = option[this.fieldValue];
|
|
44046
|
-
this.updateModel(this.
|
|
43993
|
+
this.updateModel(option[this.fieldValue]);
|
|
44047
43994
|
this.displayValue = option[this.fieldLabel];
|
|
44048
43995
|
this.emitChange(option[this.fieldValue]);
|
|
44049
43996
|
}
|
|
44050
43997
|
}
|
|
44051
43998
|
// Recebe as alterações do model
|
|
44052
43999
|
onWriteValue(value) {
|
|
44053
|
-
value = this.getValueWrite(value);
|
|
44054
44000
|
const optionFound = this.findOptionValue(value);
|
|
44055
44001
|
if (optionFound) {
|
|
44056
44002
|
this.selectElement.nativeElement.value = optionFound.value;
|
|
@@ -44121,21 +44067,6 @@ class PoSelectComponent extends PoFieldValidateModel {
|
|
|
44121
44067
|
return this.options.find(option => this.isEqual(option.value, value));
|
|
44122
44068
|
}
|
|
44123
44069
|
}
|
|
44124
|
-
getValueUpdate(option) {
|
|
44125
|
-
if (this.controlValueWithLabel) {
|
|
44126
|
-
return {
|
|
44127
|
-
value: option[this.fieldValue],
|
|
44128
|
-
label: option[this.fieldLabel]
|
|
44129
|
-
};
|
|
44130
|
-
}
|
|
44131
|
-
return option[this.fieldValue];
|
|
44132
|
-
}
|
|
44133
|
-
getValueWrite(data) {
|
|
44134
|
-
if (this.controlValueWithLabel) {
|
|
44135
|
-
return data?.value ?? null;
|
|
44136
|
-
}
|
|
44137
|
-
return data;
|
|
44138
|
-
}
|
|
44139
44070
|
transformInArray(objectWithArray) {
|
|
44140
44071
|
return objectWithArray.reduce((options, items) => {
|
|
44141
44072
|
if (items.options) {
|
|
@@ -44168,7 +44099,7 @@ class PoSelectComponent extends PoFieldValidateModel {
|
|
|
44168
44099
|
} if (rf & 2) {
|
|
44169
44100
|
let _t;
|
|
44170
44101
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.selectElement = _t.first);
|
|
44171
|
-
} }, inputs: { readonly: [2, "p-readonly", "readonly", convertToBoolean], placeholder: [0, "p-placeholder", "placeholder"], options: [0, "p-options", "options"], fieldLabel: [0, "p-field-label", "fieldLabel"], fieldValue: [0, "p-field-value", "fieldValue"]
|
|
44102
|
+
} }, inputs: { readonly: [2, "p-readonly", "readonly", convertToBoolean], placeholder: [0, "p-placeholder", "placeholder"], options: [0, "p-options", "options"], fieldLabel: [0, "p-field-label", "fieldLabel"], fieldValue: [0, "p-field-value", "fieldValue"] }, outputs: { ngModelChange: "ngModelChange" }, standalone: false, features: [i0.ɵɵProvidersFeature([
|
|
44172
44103
|
{
|
|
44173
44104
|
provide: NG_VALUE_ACCESSOR,
|
|
44174
44105
|
useExisting: forwardRef(() => PoSelectComponent),
|
|
@@ -44245,9 +44176,6 @@ class PoSelectComponent extends PoFieldValidateModel {
|
|
|
44245
44176
|
}], fieldValue: [{
|
|
44246
44177
|
type: Input,
|
|
44247
44178
|
args: ['p-field-value']
|
|
44248
|
-
}], controlValueWithLabel: [{
|
|
44249
|
-
type: Input,
|
|
44250
|
-
args: [{ alias: 'p-control-value-with-label', transform: convertToBoolean }]
|
|
44251
44179
|
}] }); })();
|
|
44252
44180
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PoSelectComponent, { className: "PoSelectComponent", filePath: "lib/components/po-field/po-select/po-select.component.ts", lineNumber: 124 }); })();
|
|
44253
44181
|
|