@po-ui/ng-components 5.18.0 → 5.22.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/bundles/po-ui-ng-components.umd.js +343 -314
- package/bundles/po-ui-ng-components.umd.js.map +1 -1
- package/esm2015/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.js +6 -2
- package/esm2015/lib/components/po-calendar/po-calendar.component.js +2 -1
- package/esm2015/lib/components/po-calendar/services/po-calendar.lang.service.js +10 -1
- package/esm2015/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-field.interface.js +1 -1
- package/esm2015/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields-base.component.js +2 -2
- package/esm2015/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields.component.js +2 -2
- package/esm2015/lib/components/po-field/po-datepicker/po-datepicker.component.js +4 -3
- package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.js +1 -1
- package/esm2015/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.js +12 -5
- package/esm2015/lib/components/po-field/po-decimal/po-decimal.component.js +7 -5
- package/esm2015/lib/components/po-field/po-field-validate.model.js +69 -0
- package/esm2015/lib/components/po-field/po-field.model.js +4 -1
- package/esm2015/lib/components/po-field/po-lookup/po-lookup-base.component.js +2 -1
- package/esm2015/lib/components/po-field/po-lookup/po-lookup.component.js +7 -2
- package/esm2015/lib/components/po-field/po-multiselect/po-multiselect-base.component.js +6 -4
- package/esm2015/lib/components/po-field/po-number/po-number-base.component.js +6 -5
- package/esm2015/lib/components/po-field/po-number/po-number.component.js +7 -5
- package/esm2015/lib/components/po-field/po-select/po-select.component.js +92 -22
- package/esm2015/lib/components/po-field/po-switch/po-switch.component.js +2 -2
- package/esm2015/lib/components/po-field/po-textarea/po-textarea-base.component.js +9 -3
- package/esm2015/lib/components/po-field/po-textarea/po-textarea.component.js +8 -5
- package/esm2015/lib/components/po-modal/index.js +2 -1
- package/esm2015/lib/components/po-modal/po-modal-base.component.js +3 -2
- package/esm2015/lib/components/po-modal/po-modal-footer/po-modal-footer.component.js +43 -0
- package/esm2015/lib/components/po-modal/po-modal.component.js +6 -4
- package/esm2015/lib/components/po-modal/po-modal.module.js +4 -3
- package/esm2015/po-ui-ng-components.js +2 -2
- package/fesm2015/po-ui-ng-components.js +340 -303
- package/fesm2015/po-ui-ng-components.js.map +1 -1
- package/lib/components/po-calendar/po-calendar-wrapper/po-calendar-wrapper.component.d.ts +3 -1
- package/lib/components/po-calendar/services/po-calendar.lang.service.d.ts +2 -0
- package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-field.interface.d.ts +0 -2
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.d.ts +2 -1
- package/lib/components/po-field/po-decimal/po-decimal.component.d.ts +2 -2
- package/lib/components/po-field/po-field-validate.model.d.ts +38 -0
- package/lib/components/po-field/po-field.model.d.ts +1 -0
- package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +2 -2
- package/lib/components/po-field/po-number/po-number-base.component.d.ts +2 -2
- package/lib/components/po-field/po-number/po-number.component.d.ts +2 -2
- package/lib/components/po-field/po-select/po-select.component.d.ts +67 -7
- package/lib/components/po-field/po-textarea/po-textarea-base.component.d.ts +3 -1
- package/lib/components/po-field/po-textarea/po-textarea.component.d.ts +2 -2
- package/lib/components/po-modal/index.d.ts +1 -0
- package/lib/components/po-modal/po-modal-base.component.d.ts +2 -1
- package/lib/components/po-modal/po-modal-footer/po-modal-footer.component.d.ts +30 -0
- package/lib/components/po-modal/po-modal.component.d.ts +2 -0
- package/package.json +4 -4
- package/po-ui-ng-components-5.22.0.tgz +0 -0
- package/po-ui-ng-components.d.ts +1 -1
- package/po-ui-ng-components.metadata.json +1 -1
- 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/esm2015/lib/components/po-field/po-select/po-select-base.component.js +0 -191
- package/lib/components/po-field/po-select/po-select-base.component.d.ts +0 -144
- package/po-ui-ng-components-5.18.0.tgz +0 -0
|
@@ -3977,6 +3977,7 @@
|
|
|
3977
3977
|
}
|
|
3978
3978
|
else {
|
|
3979
3979
|
newValue = selectedDate;
|
|
3980
|
+
this.setActivateDate(selectedDate);
|
|
3980
3981
|
}
|
|
3981
3982
|
this.value = newValue;
|
|
3982
3983
|
var newModel = this.convertDateToISO(this.value);
|
|
@@ -4250,6 +4251,12 @@
|
|
|
4250
4251
|
es: 'Año',
|
|
4251
4252
|
ru: 'Год'
|
|
4252
4253
|
};
|
|
4254
|
+
this.todayLabel = {
|
|
4255
|
+
pt: 'Hoje',
|
|
4256
|
+
en: 'Today',
|
|
4257
|
+
es: 'Hoy',
|
|
4258
|
+
ru: 'Сегодня'
|
|
4259
|
+
};
|
|
4253
4260
|
}
|
|
4254
4261
|
PoCalendarLangService.prototype.getMonth = function (month) {
|
|
4255
4262
|
return this.months[month][this.language];
|
|
@@ -4278,6 +4285,9 @@
|
|
|
4278
4285
|
PoCalendarLangService.prototype.getYearLabel = function () {
|
|
4279
4286
|
return this.yearLabel[this.language];
|
|
4280
4287
|
};
|
|
4288
|
+
PoCalendarLangService.prototype.getTodayLabel = function () {
|
|
4289
|
+
return this.todayLabel[this.language];
|
|
4290
|
+
};
|
|
4281
4291
|
PoCalendarLangService.prototype.setLanguage = function (language) {
|
|
4282
4292
|
if (language && language.length >= 2) {
|
|
4283
4293
|
language = language.toLowerCase().slice(0, 2);
|
|
@@ -4438,6 +4448,9 @@
|
|
|
4438
4448
|
PoCalendarWrapperComponent.prototype.getForegroundColor = function (displayValue, propertyValue) {
|
|
4439
4449
|
return displayValue === propertyValue ? 'po-calendar-box-foreground-selected' : 'po-calendar-box-foreground';
|
|
4440
4450
|
};
|
|
4451
|
+
PoCalendarWrapperComponent.prototype.isTodayUnavailable = function () {
|
|
4452
|
+
return this.minDate > this.today || this.maxDate < this.today;
|
|
4453
|
+
};
|
|
4441
4454
|
PoCalendarWrapperComponent.prototype.onNextMonth = function () {
|
|
4442
4455
|
this.displayMonthNumber < 11
|
|
4443
4456
|
? this.updateDisplay(this.displayYear, this.displayMonthNumber + 1)
|
|
@@ -4563,6 +4576,7 @@
|
|
|
4563
4576
|
this.displayWeekDays = this.poCalendarLangService.getWeekDaysArray();
|
|
4564
4577
|
this.displayMonths = this.poCalendarLangService.getMonthsArray();
|
|
4565
4578
|
this.displayMonth = this.displayMonths[this.displayMonthNumber];
|
|
4579
|
+
this.displayToday = this.poCalendarLangService.getTodayLabel();
|
|
4566
4580
|
};
|
|
4567
4581
|
PoCalendarWrapperComponent.prototype.updateDate = function (value) {
|
|
4568
4582
|
if (value === void 0) { value = new Date(); }
|
|
@@ -4589,7 +4603,7 @@
|
|
|
4589
4603
|
PoCalendarWrapperComponent.decorators = [
|
|
4590
4604
|
{ type: i0.Component, args: [{
|
|
4591
4605
|
selector: 'po-calendar-wrapper',
|
|
4592
|
-
template: "<div class=\"po-calendar-wrapper\">\n <ng-container *ngIf=\"isDayVisible\">\n <po-calendar-header\n [p-hide-previous]=\"isEndPart\"\n [p-hide-next]=\"isStartPart && !responsive\"\n (p-previous)=\"onPreviousMonth()\"\n (p-next)=\"onNextMonth()\"\n >\n <span class=\"po-clickable po-mr-1\" (click)=\"selectDisplayMode('month')\">{{ displayMonth }}</span>\n <span class=\"po-clickable\" (click)=\"selectDisplayMode('year')\">{{ displayYear }}</span>\n </po-calendar-header>\n\n <div class=\"po-calendar-content\">\n <div class=\"po-calendar-labels\">\n <div class=\"po-calendar-label\" *ngFor=\"let weekDay of displayWeekDays\">\n {{ weekDay }}\n </div>\n </div>\n\n <div class=\"po-calendar-content-list-day\">\n <div\n *ngFor=\"let day of displayDays\"\n class=\"po-calendar-day\"\n [ngClass]=\"getDayBackgroundColor(day)\"\n (click)=\"onSelectDate(day)\"\n (mouseenter)=\"onMouseEnter(day)\"\n (mouseleave)=\"onMouseLeave()\"\n attr-calendar\n >\n <span *ngIf=\"day !== 0\" [ngClass]=\"getDayForegroundColor(day)\">\n {{ day.getDate() }}\n </span>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"isMonthVisible\">\n <po-calendar-header (p-previous)=\"updateYear(-1)\" (p-next)=\"updateYear(1)\">\n <span class=\"po-clickable\" (click)=\"selectDisplayMode('year')\">\n {{ displayYear }}\n </span>\n </po-calendar-header>\n\n <div class=\"po-calendar-content\">\n <div class=\"po-calendar-labels\">\n <div class=\"po-calendar-label\">\n {{ monthLabel }}\n </div>\n </div>\n <div class=\"po-calendar-content-list-month\">\n <div\n *ngFor=\"let month of displayMonths; let i = index\"\n class=\"po-calendar-month\"\n [ngClass]=\"getBackgroundColor(i, displayMonthNumber)\"\n (click)=\"onSelectMonth(displayYear, i)\"\n attr-calendar\n >\n <span [ngClass]=\"getForegroundColor(i, displayMonthNumber)\">\n {{ month }}\n </span>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"isYearVisible\">\n <po-calendar-header (p-previous)=\"updateYear(-10)\" (p-next)=\"updateYear(10)\">\n {{ displayStartDecade }} - {{ displayFinalDecade }}\n </po-calendar-header>\n\n <div class=\"po-calendar-content\">\n <div class=\"po-calendar-labels\">\n <div class=\"po-calendar-label\">\n {{ yearLabel }}\n </div>\n </div>\n\n <div class=\"po-calendar-content-list-year\">\n <div\n *ngFor=\"let year of displayDecade; let i = index\"\n class=\"po-calendar-year\"\n [ngClass]=\"getBackgroundColor(year, currentYear)\"\n (click)=\"onSelectYear(year, displayMonthNumber)\"\n attr-calendar\n >\n <span [ngClass]=\"getForegroundColor(year, currentYear)\">\n {{ year }}\n </span>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n",
|
|
4606
|
+
template: "<div class=\"po-calendar-wrapper\">\n <ng-container *ngIf=\"isDayVisible\">\n <po-calendar-header\n [p-hide-previous]=\"isEndPart\"\n [p-hide-next]=\"isStartPart && !responsive\"\n (p-previous)=\"onPreviousMonth()\"\n (p-next)=\"onNextMonth()\"\n >\n <span class=\"po-clickable po-mr-1\" (click)=\"selectDisplayMode('month')\">{{ displayMonth }}</span>\n <span class=\"po-clickable\" (click)=\"selectDisplayMode('year')\">{{ displayYear }}</span>\n </po-calendar-header>\n\n <div class=\"po-calendar-content\">\n <div class=\"po-calendar-labels\">\n <div class=\"po-calendar-label\" *ngFor=\"let weekDay of displayWeekDays\">\n {{ weekDay }}\n </div>\n </div>\n\n <div class=\"po-calendar-content-list-day\">\n <div\n *ngFor=\"let day of displayDays\"\n class=\"po-calendar-day\"\n [ngClass]=\"getDayBackgroundColor(day)\"\n (click)=\"onSelectDate(day)\"\n (mouseenter)=\"onMouseEnter(day)\"\n (mouseleave)=\"onMouseLeave()\"\n attr-calendar\n >\n <span *ngIf=\"day !== 0\" [ngClass]=\"getDayForegroundColor(day)\">\n {{ day.getDate() }}\n </span>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"isMonthVisible\">\n <po-calendar-header (p-previous)=\"updateYear(-1)\" (p-next)=\"updateYear(1)\">\n <span class=\"po-clickable\" (click)=\"selectDisplayMode('year')\">\n {{ displayYear }}\n </span>\n </po-calendar-header>\n\n <div class=\"po-calendar-content\">\n <div class=\"po-calendar-labels\">\n <div class=\"po-calendar-label\">\n {{ monthLabel }}\n </div>\n </div>\n <div class=\"po-calendar-content-list-month\">\n <div\n *ngFor=\"let month of displayMonths; let i = index\"\n class=\"po-calendar-month\"\n [ngClass]=\"getBackgroundColor(i, displayMonthNumber)\"\n (click)=\"onSelectMonth(displayYear, i)\"\n attr-calendar\n >\n <span [ngClass]=\"getForegroundColor(i, displayMonthNumber)\">\n {{ month }}\n </span>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"isYearVisible\">\n <po-calendar-header (p-previous)=\"updateYear(-10)\" (p-next)=\"updateYear(10)\">\n {{ displayStartDecade }} - {{ displayFinalDecade }}\n </po-calendar-header>\n\n <div class=\"po-calendar-content\">\n <div class=\"po-calendar-labels\">\n <div class=\"po-calendar-label\">\n {{ yearLabel }}\n </div>\n </div>\n\n <div class=\"po-calendar-content-list-year\">\n <div\n *ngFor=\"let year of displayDecade; let i = index\"\n class=\"po-calendar-year\"\n [ngClass]=\"getBackgroundColor(year, currentYear)\"\n (click)=\"onSelectYear(year, displayMonthNumber)\"\n attr-calendar\n >\n <span [ngClass]=\"getForegroundColor(year, currentYear)\">\n {{ year }}\n </span>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!range\">\n <div class=\"po-calendar-footer\">\n <div class=\"po-calendar-footer-today\">\n <button class=\"po-calendar-footer-today-button\" (click)=\"onSelectDate(today)\" [disabled]=\"isTodayUnavailable()\">\n {{ displayToday }}\n </button>\n </div>\n </div>\n </ng-container>\n</div>\n",
|
|
4593
4607
|
providers: [PoCalendarService],
|
|
4594
4608
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
4595
4609
|
},] }
|
|
@@ -11060,7 +11074,8 @@
|
|
|
11060
11074
|
multi: true
|
|
11061
11075
|
},
|
|
11062
11076
|
PoControlPositionService
|
|
11063
|
-
]
|
|
11077
|
+
],
|
|
11078
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
11064
11079
|
},] }
|
|
11065
11080
|
];
|
|
11066
11081
|
PoDatepickerComponent.ctorParameters = function () { return [
|
|
@@ -11124,7 +11139,8 @@
|
|
|
11124
11139
|
* `po-table` e os demais componentes do PO.
|
|
11125
11140
|
*
|
|
11126
11141
|
* No rodapé encontram-se os botões de ação primária e secundária, no qual permitem definir uma ação e um rótulo, bem como
|
|
11127
|
-
* definir um estado de carregando e / ou desabilitado
|
|
11142
|
+
* definir um estado de carregando e / ou desabilitado e / ou definir o botão com o tipo *danger*. Também é possível utilizar
|
|
11143
|
+
* o componente [`PoModalFooter`](/documentation/po-modal-footer).
|
|
11128
11144
|
*
|
|
11129
11145
|
* > É possível fechar a modal através da tecla *ESC*, quando a propriedade `p-hide-close` não estiver habilitada.
|
|
11130
11146
|
*/
|
|
@@ -11244,6 +11260,49 @@
|
|
|
11244
11260
|
hideClose: [{ type: i0.Input, args: ['p-hide-close',] }]
|
|
11245
11261
|
};
|
|
11246
11262
|
|
|
11263
|
+
/**
|
|
11264
|
+
* @description
|
|
11265
|
+
*
|
|
11266
|
+
* O componente `po-modal-footer` pode ser utilizado para incluir os botões de ações no rodapé da [`PoModal`](/documentation/po-modal), bem como para dar liberdade ao desenvolvedor de incluir outros itens necessários.
|
|
11267
|
+
* > Como boa prática, deve-se observar a utilização de apenas um botão primário.
|
|
11268
|
+
*
|
|
11269
|
+
* ```
|
|
11270
|
+
* <po-modal p-title="Title Modal" #modal>
|
|
11271
|
+
* <po-modal-footer>
|
|
11272
|
+
* <po-button p-label="Close" (p-click)="modal.close()"> </po-button>
|
|
11273
|
+
* <po-button p-label="Clean" (p-click)="clean()"> </po-button>
|
|
11274
|
+
* <po-button p-label="Confirm" p-type="primary" (p-click)="confirm()"> </po-button>
|
|
11275
|
+
* </po-modal-footer>
|
|
11276
|
+
* </po-modal>
|
|
11277
|
+
* ```
|
|
11278
|
+
*/
|
|
11279
|
+
var PoModalFooterComponent = /** @class */ (function () {
|
|
11280
|
+
function PoModalFooterComponent() {
|
|
11281
|
+
/**
|
|
11282
|
+
* @optional
|
|
11283
|
+
*
|
|
11284
|
+
* @description
|
|
11285
|
+
*
|
|
11286
|
+
* Desabilita o alinhamento padrão, à direita, dos botões de ações que ficam no rodapé da [`PoModal`](/documentation/po-modal).
|
|
11287
|
+
*
|
|
11288
|
+
* > Caso a propriedade esteja habilitada, o alinhamento deverá ser a esquerda e pode ser personalizado.
|
|
11289
|
+
*
|
|
11290
|
+
* @default false
|
|
11291
|
+
*/
|
|
11292
|
+
this.disabledAlign = false;
|
|
11293
|
+
}
|
|
11294
|
+
return PoModalFooterComponent;
|
|
11295
|
+
}());
|
|
11296
|
+
PoModalFooterComponent.decorators = [
|
|
11297
|
+
{ type: i0.Component, args: [{
|
|
11298
|
+
selector: 'po-modal-footer',
|
|
11299
|
+
template: "<div class=\"po-modal-footer\" [class.po-modal-footer-align-right]=\"!disabledAlign\">\n <ng-content></ng-content>\n</div>\n"
|
|
11300
|
+
},] }
|
|
11301
|
+
];
|
|
11302
|
+
PoModalFooterComponent.propDecorators = {
|
|
11303
|
+
disabledAlign: [{ type: i0.Input, args: ['p-disabled-align',] }]
|
|
11304
|
+
};
|
|
11305
|
+
|
|
11247
11306
|
var PoActiveOverlayService = /** @class */ (function () {
|
|
11248
11307
|
function PoActiveOverlayService() {
|
|
11249
11308
|
this.activeOverlay = [];
|
|
@@ -11359,7 +11418,7 @@
|
|
|
11359
11418
|
PoModalComponent.decorators = [
|
|
11360
11419
|
{ type: i0.Component, args: [{
|
|
11361
11420
|
selector: 'po-modal',
|
|
11362
|
-
template: "<div *ngIf=\"!isHidden\" class=\"po-modal\" tabindex=\"0\" (keydown.esc)=\"closeModalOnEscapeKey($event)\">\n <div class=\"po-modal-overlay\">\n <div class=\"po-modal-container po-pb-2 po-pt-2\" (mousedown)=\"onClickOut($event)\">\n <div class=\"po-modal-vertical-align\">\n <div #modalContent class=\"po-modal-content po-modal-{{ size }}\" tabindex=\"-1\">\n <div class=\"po-modal-header\">\n <div class=\"po-modal-title po-text-ellipsis\">\n {{ title }}\n </div>\n\n <a *ngIf=\"!hideClose\" class=\"po-modal-header-close-button\" tabindex=\"0\" (click)=\"close(true)\">\n <span class=\"po-icon po-icon-close\"></span>\n </a>\n </div>\n\n <div class=\"po-modal-body\">\n <ng-content></ng-content>\n </div>\n\n <
|
|
11421
|
+
template: "<div *ngIf=\"!isHidden\" class=\"po-modal\" tabindex=\"0\" (keydown.esc)=\"closeModalOnEscapeKey($event)\">\n <div class=\"po-modal-overlay\">\n <div class=\"po-modal-container po-pb-2 po-pt-2\" (mousedown)=\"onClickOut($event)\">\n <div class=\"po-modal-vertical-align\">\n <div #modalContent class=\"po-modal-content po-modal-{{ size }}\" tabindex=\"-1\">\n <div class=\"po-modal-header\">\n <div class=\"po-modal-title po-text-ellipsis\">\n {{ title }}\n </div>\n\n <a *ngIf=\"!hideClose\" class=\"po-modal-header-close-button\" tabindex=\"0\" (click)=\"close(true)\">\n <span class=\"po-icon po-icon-close\"></span>\n </a>\n </div>\n\n <div class=\"po-modal-body\">\n <ng-content></ng-content>\n </div>\n\n <ng-container *ngIf=\"modalFooter; else defaultModalFooterTemplate\">\n <ng-content select=\"po-modal-footer\"></ng-content>\n </ng-container>\n\n <ng-template #defaultModalFooterTemplate>\n <po-modal-footer>\n <po-button\n *ngIf=\"secondaryAction\"\n [p-disabled]=\"secondaryAction.disabled\"\n [p-label]=\"secondaryAction.label\"\n [p-loading]=\"secondaryAction.loading\"\n [p-type]=\"getSecondaryActionButtonType()\"\n (p-click)=\"secondaryAction.action()\"\n >\n </po-button>\n\n <po-button\n class=\"po-button-modal-first-action\"\n [p-disabled]=\"primaryAction.disabled\"\n [p-label]=\"primaryAction.label\"\n [p-loading]=\"primaryAction.loading\"\n [p-type]=\"getPrimaryActionButtonType()\"\n (p-click)=\"primaryAction.action()\"\n >\n </po-button>\n </po-modal-footer>\n </ng-template>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
|
|
11363
11422
|
},] }
|
|
11364
11423
|
];
|
|
11365
11424
|
PoModalComponent.ctorParameters = function () { return [
|
|
@@ -11367,7 +11426,8 @@
|
|
|
11367
11426
|
{ type: PoLanguageService }
|
|
11368
11427
|
]; };
|
|
11369
11428
|
PoModalComponent.propDecorators = {
|
|
11370
|
-
modalContent: [{ type: i0.ViewChild, args: ['modalContent', { read: i0.ElementRef },] }]
|
|
11429
|
+
modalContent: [{ type: i0.ViewChild, args: ['modalContent', { read: i0.ElementRef },] }],
|
|
11430
|
+
modalFooter: [{ type: i0.ContentChild, args: [PoModalFooterComponent,] }]
|
|
11371
11431
|
};
|
|
11372
11432
|
|
|
11373
11433
|
/**
|
|
@@ -11382,8 +11442,8 @@
|
|
|
11382
11442
|
PoModalModule.decorators = [
|
|
11383
11443
|
{ type: i0.NgModule, args: [{
|
|
11384
11444
|
imports: [common.CommonModule, PoButtonModule],
|
|
11385
|
-
declarations: [PoModalComponent],
|
|
11386
|
-
exports: [PoModalComponent]
|
|
11445
|
+
declarations: [PoModalComponent, PoModalFooterComponent],
|
|
11446
|
+
exports: [PoModalComponent, PoModalFooterComponent]
|
|
11387
11447
|
},] }
|
|
11388
11448
|
];
|
|
11389
11449
|
|
|
@@ -17608,11 +17668,12 @@
|
|
|
17608
17668
|
*/
|
|
17609
17669
|
var PoDatepickerRangeComponent = /** @class */ (function (_super) {
|
|
17610
17670
|
__extends(PoDatepickerRangeComponent, _super);
|
|
17611
|
-
function PoDatepickerRangeComponent(changeDetector, controlPosition, renderer, poDateService, poDatepickerRangeElement, poLanguageService) {
|
|
17671
|
+
function PoDatepickerRangeComponent(changeDetector, controlPosition, renderer, cd, poDateService, poDatepickerRangeElement, poLanguageService) {
|
|
17612
17672
|
var _this = _super.call(this, poDateService, poLanguageService) || this;
|
|
17613
17673
|
_this.changeDetector = changeDetector;
|
|
17614
17674
|
_this.controlPosition = controlPosition;
|
|
17615
17675
|
_this.renderer = renderer;
|
|
17676
|
+
_this.cd = cd;
|
|
17616
17677
|
_this.isCalendarVisible = false;
|
|
17617
17678
|
_this.onScroll = function () {
|
|
17618
17679
|
if (_this.isCalendarVisible) {
|
|
@@ -17759,7 +17820,10 @@
|
|
|
17759
17820
|
this.updateScreenByModel({ start: start || '', end: end || '' });
|
|
17760
17821
|
this.updateModelByScreen(isStartDateTargetEvent, start || '', end || '');
|
|
17761
17822
|
if (start && end) {
|
|
17762
|
-
setTimeout(function () {
|
|
17823
|
+
setTimeout(function () {
|
|
17824
|
+
_this.isCalendarVisible = false;
|
|
17825
|
+
_this.cd.markForCheck();
|
|
17826
|
+
}, 300);
|
|
17763
17827
|
}
|
|
17764
17828
|
};
|
|
17765
17829
|
PoDatepickerRangeComponent.prototype.onFocus = function (event) {
|
|
@@ -18009,6 +18073,7 @@
|
|
|
18009
18073
|
!this.hasAttrCalendar(event.target)) {
|
|
18010
18074
|
this.isCalendarVisible = false;
|
|
18011
18075
|
}
|
|
18076
|
+
this.cd.markForCheck();
|
|
18012
18077
|
};
|
|
18013
18078
|
return PoDatepickerRangeComponent;
|
|
18014
18079
|
}(PoDatepickerRangeBaseComponent));
|
|
@@ -18016,13 +18081,15 @@
|
|
|
18016
18081
|
{ type: i0.Component, args: [{
|
|
18017
18082
|
selector: 'po-datepicker-range',
|
|
18018
18083
|
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",
|
|
18019
|
-
providers: providers$5
|
|
18084
|
+
providers: providers$5,
|
|
18085
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
18020
18086
|
},] }
|
|
18021
18087
|
];
|
|
18022
18088
|
PoDatepickerRangeComponent.ctorParameters = function () { return [
|
|
18023
18089
|
{ type: i0.ChangeDetectorRef },
|
|
18024
18090
|
{ type: PoControlPositionService },
|
|
18025
18091
|
{ type: i0.Renderer2 },
|
|
18092
|
+
{ type: i0.ChangeDetectorRef },
|
|
18026
18093
|
{ type: PoDateService },
|
|
18027
18094
|
{ type: i0.ElementRef },
|
|
18028
18095
|
{ type: PoLanguageService }
|
|
@@ -18479,8 +18546,8 @@
|
|
|
18479
18546
|
*/
|
|
18480
18547
|
var PoDecimalComponent = /** @class */ (function (_super) {
|
|
18481
18548
|
__extends(PoDecimalComponent, _super);
|
|
18482
|
-
function PoDecimalComponent(el, poLanguageService) {
|
|
18483
|
-
var _this = _super.call(this) || this;
|
|
18549
|
+
function PoDecimalComponent(el, poLanguageService, cd) {
|
|
18550
|
+
var _this = _super.call(this, cd) || this;
|
|
18484
18551
|
_this.el = el;
|
|
18485
18552
|
_this.poLanguageService = poLanguageService;
|
|
18486
18553
|
_this._decimalsLength = poDecimalDefaultDecimalsLength;
|
|
@@ -19031,6 +19098,7 @@
|
|
|
19031
19098
|
{ type: i0.Component, args: [{
|
|
19032
19099
|
selector: 'po-decimal',
|
|
19033
19100
|
template: "<po-field-container [p-label]=\"label\" [p-help]=\"help\" [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.max]=\"max\"\n [attr.min]=\"min\"\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 inputmode=\"decimal\"\n type=\"text\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (input)=\"onInput($event)\"\n (keypress)=\"onKeyPress($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]=\"getErrorPatternMessage()\"> </po-field-container-bottom>\n</po-field-container>\n",
|
|
19101
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
19034
19102
|
providers: [
|
|
19035
19103
|
{
|
|
19036
19104
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -19047,7 +19115,8 @@
|
|
|
19047
19115
|
];
|
|
19048
19116
|
PoDecimalComponent.ctorParameters = function () { return [
|
|
19049
19117
|
{ type: i0.ElementRef },
|
|
19050
|
-
{ type: PoLanguageService }
|
|
19118
|
+
{ type: PoLanguageService },
|
|
19119
|
+
{ type: i0.ChangeDetectorRef }
|
|
19051
19120
|
]; };
|
|
19052
19121
|
PoDecimalComponent.propDecorators = {
|
|
19053
19122
|
inputEl: [{ type: i0.ViewChild, args: ['inp', { read: i0.ElementRef, static: true },] }],
|
|
@@ -19843,6 +19912,7 @@
|
|
|
19843
19912
|
}
|
|
19844
19913
|
};
|
|
19845
19914
|
PoLookupBaseComponent.prototype.cleanViewValue = function () {
|
|
19915
|
+
this.setDisclaimers([]);
|
|
19846
19916
|
this.setViewValue('', {});
|
|
19847
19917
|
this.oldValue = '';
|
|
19848
19918
|
this.valueToModel = null;
|
|
@@ -20893,6 +20963,11 @@
|
|
|
20893
20963
|
// eslint-disable-next-line
|
|
20894
20964
|
useExisting: i0.forwardRef(function () { return PoLookupComponent; }),
|
|
20895
20965
|
multi: true
|
|
20966
|
+
},
|
|
20967
|
+
{
|
|
20968
|
+
provide: forms.NgControl,
|
|
20969
|
+
useExisting: i0.forwardRef(function () { return PoLookupComponent; }),
|
|
20970
|
+
multi: false
|
|
20896
20971
|
}
|
|
20897
20972
|
];
|
|
20898
20973
|
/**
|
|
@@ -21529,9 +21604,11 @@
|
|
|
21529
21604
|
*
|
|
21530
21605
|
*/
|
|
21531
21606
|
set: function (value) {
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21607
|
+
if (value) {
|
|
21608
|
+
this._filterService = value;
|
|
21609
|
+
this.autoHeight = this.autoHeightInitialValue !== undefined ? this.autoHeightInitialValue : true;
|
|
21610
|
+
this.options = [];
|
|
21611
|
+
}
|
|
21535
21612
|
},
|
|
21536
21613
|
enumerable: false,
|
|
21537
21614
|
configurable: true
|
|
@@ -23770,8 +23847,8 @@
|
|
|
23770
23847
|
var PoNumberBaseComponent = /** @class */ (function (_super) {
|
|
23771
23848
|
__extends(PoNumberBaseComponent, _super);
|
|
23772
23849
|
/* istanbul ignore next */
|
|
23773
|
-
function PoNumberBaseComponent(elementRef) {
|
|
23774
|
-
var _this = _super.call(this, elementRef) || this;
|
|
23850
|
+
function PoNumberBaseComponent(elementRef, cd) {
|
|
23851
|
+
var _this = _super.call(this, elementRef, cd) || this;
|
|
23775
23852
|
_this.type = 'number';
|
|
23776
23853
|
_this.invalidInputValueOnBlur = false;
|
|
23777
23854
|
return _this;
|
|
@@ -23878,7 +23955,8 @@
|
|
|
23878
23955
|
{ type: i0.Directive }
|
|
23879
23956
|
];
|
|
23880
23957
|
PoNumberBaseComponent.ctorParameters = function () { return [
|
|
23881
|
-
{ type: i0.ElementRef }
|
|
23958
|
+
{ type: i0.ElementRef },
|
|
23959
|
+
{ type: i0.ChangeDetectorRef }
|
|
23882
23960
|
]; };
|
|
23883
23961
|
|
|
23884
23962
|
/**
|
|
@@ -23910,8 +23988,8 @@
|
|
|
23910
23988
|
var PoNumberComponent = /** @class */ (function (_super) {
|
|
23911
23989
|
__extends(PoNumberComponent, _super);
|
|
23912
23990
|
/* istanbul ignore next */
|
|
23913
|
-
function PoNumberComponent(el) {
|
|
23914
|
-
var _this = _super.call(this, el) || this;
|
|
23991
|
+
function PoNumberComponent(el, cd) {
|
|
23992
|
+
var _this = _super.call(this, el, cd) || this;
|
|
23915
23993
|
/**
|
|
23916
23994
|
* @optional
|
|
23917
23995
|
*
|
|
@@ -23982,6 +24060,7 @@
|
|
|
23982
24060
|
{ type: i0.Component, args: [{
|
|
23983
24061
|
selector: 'po-number',
|
|
23984
24062
|
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 <input\n #inp\n class=\"po-input\"\n type=\"number\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.name]=\"name\"\n [attr.step]=\"step\"\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 [tabindex]=\"disabled ? -1 : 0\"\n (blur)=\"onBlur($event)\"\n (focus)=\"eventOnFocus($event)\"\n (input)=\"eventOnInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean\n *ngIf=\"clean && !disabled && !readonly\"\n [p-default-value]=\"null\"\n [p-element-ref]=\"inputEl\"\n (p-change-event)=\"clear($event)\"\n >\n </po-clean>\n </div>\n </div>\n\n <po-field-container-bottom [p-error-pattern]=\"getErrorPatternMessage()\"> </po-field-container-bottom>\n</po-field-container>\n",
|
|
24063
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
23985
24064
|
providers: [
|
|
23986
24065
|
{
|
|
23987
24066
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -23997,7 +24076,8 @@
|
|
|
23997
24076
|
},] }
|
|
23998
24077
|
];
|
|
23999
24078
|
PoNumberComponent.ctorParameters = function () { return [
|
|
24000
|
-
{ type: i0.ElementRef }
|
|
24079
|
+
{ type: i0.ElementRef },
|
|
24080
|
+
{ type: i0.ChangeDetectorRef }
|
|
24001
24081
|
]; };
|
|
24002
24082
|
PoNumberComponent.propDecorators = {
|
|
24003
24083
|
step: [{ type: i0.Input, args: ['p-step',] }],
|
|
@@ -24420,28 +24500,73 @@
|
|
|
24420
24500
|
};
|
|
24421
24501
|
|
|
24422
24502
|
/**
|
|
24503
|
+
* @usedBy PoSelectComponent
|
|
24504
|
+
*
|
|
24423
24505
|
* @description
|
|
24424
24506
|
*
|
|
24425
|
-
*
|
|
24426
|
-
* Os valores listados podem ser fixos ou dinâmicos de acordo com a necessidade do desenvolvedor, dando mais flexibilidade ao componente.
|
|
24427
|
-
* O po-select não permite que o usuário informe um valor diferente dos valores listados, isso garante a consistência da informação.
|
|
24428
|
-
* O po-select não permite que sejam passados valores duplicados, undefined e null para as opções, excluindo-os da lista.
|
|
24507
|
+
* Esta diretiva permite personalizar o conteúdo dos itens exibidos na lista suspensa do componente.
|
|
24429
24508
|
*
|
|
24430
|
-
* >
|
|
24509
|
+
* > Quando utilizada em _mobile_ será exibido o componente nativo.
|
|
24431
24510
|
*
|
|
24432
|
-
*
|
|
24433
|
-
*
|
|
24511
|
+
* Para personalizar o conteúdo de cada item da lista deve-se utilizar a diretiva `p-select-option-template` com `ng-template`
|
|
24512
|
+
* dentro da tag `po-select`.
|
|
24513
|
+
*
|
|
24514
|
+
* Para obter a referência do item atual, use `let-option`, com isso você terá acesso aos valores e poderá personalizar sua exibição.
|
|
24515
|
+
*
|
|
24516
|
+
* Esta diretiva compõe-se de dois meios para uso, de forma explícita tal como em *syntax sugar*. Veja a seguir ambos, respectivamente:
|
|
24517
|
+
*
|
|
24518
|
+
* ```
|
|
24519
|
+
* ...
|
|
24520
|
+
* <po-select
|
|
24521
|
+
* name="select"
|
|
24522
|
+
* [(ngModel)]="select"
|
|
24523
|
+
* [p-options]="options">
|
|
24524
|
+
* <ng-template p-select-option-template let-option>
|
|
24525
|
+
* <option-template [option]="option"></option-template>
|
|
24526
|
+
* </ng-template>
|
|
24527
|
+
* </po-select>
|
|
24528
|
+
* ...
|
|
24529
|
+
* ```
|
|
24530
|
+
*
|
|
24531
|
+
* ```
|
|
24532
|
+
* ...
|
|
24533
|
+
* <po-select
|
|
24534
|
+
* name="select"
|
|
24535
|
+
* [(ngModel)]="select"
|
|
24536
|
+
* [p-options]="options">
|
|
24537
|
+
* <div *p-select-option-template="let option">
|
|
24538
|
+
* <option-template [option]="option"></option-template>
|
|
24539
|
+
* </div>
|
|
24540
|
+
* </po-select>
|
|
24541
|
+
* ...
|
|
24542
|
+
*
|
|
24543
|
+
* ```
|
|
24434
24544
|
*/
|
|
24435
|
-
var
|
|
24436
|
-
|
|
24437
|
-
|
|
24545
|
+
var PoSelectOptionTemplateDirective = /** @class */ (function () {
|
|
24546
|
+
// Necessário manter templateRef para o funcionamento do row template.
|
|
24547
|
+
function PoSelectOptionTemplateDirective(templateRef) {
|
|
24548
|
+
this.templateRef = templateRef;
|
|
24549
|
+
}
|
|
24550
|
+
return PoSelectOptionTemplateDirective;
|
|
24551
|
+
}());
|
|
24552
|
+
PoSelectOptionTemplateDirective.decorators = [
|
|
24553
|
+
{ type: i0.Directive, args: [{
|
|
24554
|
+
selector: '[p-select-option-template]'
|
|
24555
|
+
},] }
|
|
24556
|
+
];
|
|
24557
|
+
PoSelectOptionTemplateDirective.ctorParameters = function () { return [
|
|
24558
|
+
{ type: i0.TemplateRef }
|
|
24559
|
+
]; };
|
|
24560
|
+
|
|
24561
|
+
var PoFieldModel = /** @class */ (function () {
|
|
24562
|
+
function PoFieldModel() {
|
|
24438
24563
|
/**
|
|
24439
24564
|
* @optional
|
|
24440
24565
|
*
|
|
24441
24566
|
* @description
|
|
24442
24567
|
*
|
|
24443
|
-
* Aplica foco no elemento ao ser iniciado.
|
|
24444
|
-
*
|
|
24568
|
+
* Aplica o foco no elemento ao ser iniciado.
|
|
24569
|
+
* > Caso mais de um elemento seja configurado com essa propriedade,
|
|
24445
24570
|
* o último elemento declarado com ela terá o foco.
|
|
24446
24571
|
*
|
|
24447
24572
|
* @default `false`
|
|
@@ -24452,96 +24577,84 @@
|
|
|
24452
24577
|
*
|
|
24453
24578
|
* @description
|
|
24454
24579
|
*
|
|
24455
|
-
*
|
|
24580
|
+
* Indica se o campo será desabilitado.
|
|
24581
|
+
*
|
|
24582
|
+
* @default `false`
|
|
24456
24583
|
*/
|
|
24457
|
-
this.
|
|
24584
|
+
this.disabled = false;
|
|
24458
24585
|
/**
|
|
24459
24586
|
* @optional
|
|
24460
24587
|
*
|
|
24461
24588
|
* @description
|
|
24462
24589
|
*
|
|
24463
|
-
*
|
|
24590
|
+
* Evento disparado ao alterar valor do campo.
|
|
24464
24591
|
*/
|
|
24465
|
-
this.
|
|
24466
|
-
this.readyToValidation = false;
|
|
24467
|
-
this._disabled = false;
|
|
24468
|
-
this._readonly = false;
|
|
24469
|
-
this._required = false;
|
|
24470
|
-
this.element = element;
|
|
24471
|
-
this.changeDetector = changeDetector;
|
|
24592
|
+
this.change = new i0.EventEmitter();
|
|
24472
24593
|
}
|
|
24473
|
-
|
|
24474
|
-
|
|
24475
|
-
|
|
24476
|
-
|
|
24477
|
-
|
|
24478
|
-
|
|
24479
|
-
|
|
24480
|
-
|
|
24481
|
-
|
|
24482
|
-
|
|
24483
|
-
|
|
24484
|
-
|
|
24485
|
-
|
|
24486
|
-
|
|
24487
|
-
|
|
24488
|
-
|
|
24489
|
-
|
|
24490
|
-
|
|
24491
|
-
|
|
24492
|
-
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
|
|
24496
|
-
|
|
24497
|
-
|
|
24498
|
-
|
|
24499
|
-
|
|
24500
|
-
|
|
24501
|
-
|
|
24502
|
-
|
|
24503
|
-
|
|
24504
|
-
|
|
24505
|
-
|
|
24594
|
+
// Função implementada do ControlValueAccessor
|
|
24595
|
+
// Usada para interceptar os estados de habilitado via forms api
|
|
24596
|
+
PoFieldModel.prototype.setDisabledState = function (isDisabled) {
|
|
24597
|
+
this.disabled = isDisabled;
|
|
24598
|
+
};
|
|
24599
|
+
PoFieldModel.prototype.registerOnChange = function (fn) {
|
|
24600
|
+
this.propagateChange = fn;
|
|
24601
|
+
};
|
|
24602
|
+
PoFieldModel.prototype.registerOnTouched = function (fn) {
|
|
24603
|
+
this.onTouched = fn;
|
|
24604
|
+
};
|
|
24605
|
+
PoFieldModel.prototype.writeValue = function (value) {
|
|
24606
|
+
this.onWriteValue(value);
|
|
24607
|
+
};
|
|
24608
|
+
PoFieldModel.prototype.emitChange = function (value) {
|
|
24609
|
+
this.change.emit(value);
|
|
24610
|
+
};
|
|
24611
|
+
PoFieldModel.prototype.updateModel = function (value) {
|
|
24612
|
+
if (this.propagateChange) {
|
|
24613
|
+
this.propagateChange(value);
|
|
24614
|
+
}
|
|
24615
|
+
};
|
|
24616
|
+
return PoFieldModel;
|
|
24617
|
+
}());
|
|
24618
|
+
PoFieldModel.decorators = [
|
|
24619
|
+
{ type: i0.Directive }
|
|
24620
|
+
];
|
|
24621
|
+
PoFieldModel.ctorParameters = function () { return []; };
|
|
24622
|
+
PoFieldModel.propDecorators = {
|
|
24623
|
+
label: [{ type: i0.Input, args: ['p-label',] }],
|
|
24624
|
+
name: [{ type: i0.Input, args: ['name',] }],
|
|
24625
|
+
help: [{ type: i0.Input, args: ['p-help',] }],
|
|
24626
|
+
autoFocus: [{ type: i0.Input, args: ['p-auto-focus',] }],
|
|
24627
|
+
disabled: [{ type: i0.Input, args: ['p-disabled',] }],
|
|
24628
|
+
change: [{ type: i0.Output, args: ['p-change',] }]
|
|
24629
|
+
};
|
|
24630
|
+
__decorate([
|
|
24631
|
+
InputBoolean()
|
|
24632
|
+
], PoFieldModel.prototype, "autoFocus", void 0);
|
|
24633
|
+
__decorate([
|
|
24634
|
+
InputBoolean()
|
|
24635
|
+
], PoFieldModel.prototype, "disabled", void 0);
|
|
24636
|
+
|
|
24637
|
+
/**
|
|
24638
|
+
* @docsExtends PoFieldModel
|
|
24639
|
+
*/
|
|
24640
|
+
var PoFieldValidateModel = /** @class */ (function (_super) {
|
|
24641
|
+
__extends(PoFieldValidateModel, _super);
|
|
24642
|
+
function PoFieldValidateModel() {
|
|
24643
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
24506
24644
|
/**
|
|
24507
24645
|
* @optional
|
|
24508
24646
|
*
|
|
24509
24647
|
* @description
|
|
24510
24648
|
*
|
|
24511
|
-
*
|
|
24512
|
-
*
|
|
24513
|
-
* @default `false`
|
|
24514
|
-
*/
|
|
24515
|
-
set: function (disabled) {
|
|
24516
|
-
this._disabled = convertToBoolean(disabled);
|
|
24517
|
-
this.validateModel();
|
|
24518
|
-
},
|
|
24519
|
-
enumerable: false,
|
|
24520
|
-
configurable: true
|
|
24521
|
-
});
|
|
24522
|
-
Object.defineProperty(PoSelectBaseComponent.prototype, "readonly", {
|
|
24523
|
-
get: function () {
|
|
24524
|
-
return this._readonly;
|
|
24525
|
-
},
|
|
24526
|
-
/**
|
|
24527
|
-
* @optional
|
|
24528
|
-
*
|
|
24529
|
-
* @description
|
|
24649
|
+
* Define se a indicação de campo opcional será exibida.
|
|
24530
24650
|
*
|
|
24531
|
-
*
|
|
24651
|
+
* > Não será exibida a indicação se:
|
|
24652
|
+
* - O campo conter `p-required`;
|
|
24653
|
+
* - Não possuir `p-help` e/ou `p-label`.
|
|
24532
24654
|
*
|
|
24533
24655
|
* @default `false`
|
|
24534
24656
|
*/
|
|
24535
|
-
|
|
24536
|
-
this._readonly = convertToBoolean(value);
|
|
24537
|
-
},
|
|
24538
|
-
enumerable: false,
|
|
24539
|
-
configurable: true
|
|
24540
|
-
});
|
|
24541
|
-
Object.defineProperty(PoSelectBaseComponent.prototype, "required", {
|
|
24542
|
-
get: function () {
|
|
24543
|
-
return this._required;
|
|
24544
|
-
},
|
|
24657
|
+
_this.optional = false;
|
|
24545
24658
|
/**
|
|
24546
24659
|
* @optional
|
|
24547
24660
|
*
|
|
@@ -24551,140 +24664,47 @@
|
|
|
24551
24664
|
*
|
|
24552
24665
|
* @default `false`
|
|
24553
24666
|
*/
|
|
24554
|
-
|
|
24555
|
-
|
|
24556
|
-
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
configurable: true
|
|
24560
|
-
});
|
|
24561
|
-
PoSelectBaseComponent.prototype.callModelChange = function (value) {
|
|
24562
|
-
// Caso o componente estiver dentro de um form, terá acesso ao método onModelChange.
|
|
24563
|
-
return this.onModelChange ? this.onModelChange(value) : this.ngModelChange.emit(value);
|
|
24564
|
-
};
|
|
24565
|
-
PoSelectBaseComponent.prototype.onChange = function (value) {
|
|
24566
|
-
this.change.emit(value);
|
|
24567
|
-
};
|
|
24568
|
-
PoSelectBaseComponent.prototype.validate = function (abstractControl) {
|
|
24569
|
-
if (requiredFailed(this._required, this._disabled, abstractControl.value)) {
|
|
24667
|
+
_this.required = false;
|
|
24668
|
+
return _this;
|
|
24669
|
+
}
|
|
24670
|
+
PoFieldValidateModel.prototype.validate = function (abstractControl) {
|
|
24671
|
+
if (requiredFailed(this.required, this.disabled, abstractControl.value)) {
|
|
24570
24672
|
return {
|
|
24571
24673
|
required: {
|
|
24572
24674
|
valid: false
|
|
24573
24675
|
}
|
|
24574
24676
|
};
|
|
24575
24677
|
}
|
|
24576
|
-
return
|
|
24577
|
-
};
|
|
24578
|
-
// Função implementada do ControlValueAccessor
|
|
24579
|
-
// Usada para interceptar os estados de habilitado via forms api
|
|
24580
|
-
PoSelectBaseComponent.prototype.setDisabledState = function (isDisabled) {
|
|
24581
|
-
this.disabled = isDisabled;
|
|
24582
|
-
this.changeDetector.detectChanges();
|
|
24583
|
-
};
|
|
24584
|
-
PoSelectBaseComponent.prototype.registerOnChange = function (fn) {
|
|
24585
|
-
this.onModelChange = fn;
|
|
24586
|
-
};
|
|
24587
|
-
PoSelectBaseComponent.prototype.registerOnTouched = function (fn) {
|
|
24588
|
-
this.onModelTouched = fn;
|
|
24678
|
+
return this.extraValidation(abstractControl);
|
|
24589
24679
|
};
|
|
24590
|
-
|
|
24680
|
+
PoFieldValidateModel.prototype.registerOnValidatorChange = function (fn) {
|
|
24591
24681
|
this.onValidatorChange = fn;
|
|
24592
24682
|
};
|
|
24593
|
-
|
|
24683
|
+
PoFieldValidateModel.prototype.validateModel = function () {
|
|
24594
24684
|
if (this.onValidatorChange) {
|
|
24595
24685
|
this.onValidatorChange();
|
|
24596
24686
|
}
|
|
24597
24687
|
};
|
|
24598
|
-
return
|
|
24599
|
-
}());
|
|
24600
|
-
|
|
24688
|
+
return PoFieldValidateModel;
|
|
24689
|
+
}(PoFieldModel));
|
|
24690
|
+
PoFieldValidateModel.decorators = [
|
|
24601
24691
|
{ type: i0.Directive }
|
|
24602
24692
|
];
|
|
24603
|
-
|
|
24604
|
-
{ type: i0.ElementRef },
|
|
24605
|
-
{ type: i0.ChangeDetectorRef }
|
|
24606
|
-
]; };
|
|
24607
|
-
PoSelectBaseComponent.propDecorators = {
|
|
24608
|
-
autoFocus: [{ type: i0.Input, args: ['p-auto-focus',] }],
|
|
24609
|
-
label: [{ type: i0.Input, args: ['p-label',] }],
|
|
24610
|
-
name: [{ type: i0.Input, args: ['name',] }],
|
|
24611
|
-
help: [{ type: i0.Input, args: ['p-help',] }],
|
|
24612
|
-
placeholder: [{ type: i0.Input, args: ['p-placeholder',] }],
|
|
24693
|
+
PoFieldValidateModel.propDecorators = {
|
|
24613
24694
|
optional: [{ type: i0.Input, args: ['p-optional',] }],
|
|
24614
|
-
change: [{ type: i0.Output, args: ['p-change',] }],
|
|
24615
|
-
ngModelChange: [{ type: i0.Output, args: ['ngModelChange',] }],
|
|
24616
|
-
options: [{ type: i0.Input, args: ['p-options',] }],
|
|
24617
|
-
disabled: [{ type: i0.Input, args: ['p-disabled',] }],
|
|
24618
|
-
readonly: [{ type: i0.Input, args: ['p-readonly',] }],
|
|
24619
24695
|
required: [{ type: i0.Input, args: ['p-required',] }]
|
|
24620
24696
|
};
|
|
24621
24697
|
__decorate([
|
|
24622
24698
|
InputBoolean()
|
|
24623
|
-
],
|
|
24624
|
-
|
|
24625
|
-
|
|
24626
|
-
|
|
24627
|
-
*
|
|
24628
|
-
* @description
|
|
24629
|
-
*
|
|
24630
|
-
* Esta diretiva permite personalizar o conteúdo dos itens exibidos na lista suspensa do componente.
|
|
24631
|
-
*
|
|
24632
|
-
* > Quando utilizada em _mobile_ será exibido o componente nativo.
|
|
24633
|
-
*
|
|
24634
|
-
* Para personalizar o conteúdo de cada item da lista deve-se utilizar a diretiva `p-select-option-template` com `ng-template`
|
|
24635
|
-
* dentro da tag `po-select`.
|
|
24636
|
-
*
|
|
24637
|
-
* Para obter a referência do item atual, use `let-option`, com isso você terá acesso aos valores e poderá personalizar sua exibição.
|
|
24638
|
-
*
|
|
24639
|
-
* Esta diretiva compõe-se de dois meios para uso, de forma explícita tal como em *syntax sugar*. Veja a seguir ambos, respectivamente:
|
|
24640
|
-
*
|
|
24641
|
-
* ```
|
|
24642
|
-
* ...
|
|
24643
|
-
* <po-select
|
|
24644
|
-
* name="select"
|
|
24645
|
-
* [(ngModel)]="select"
|
|
24646
|
-
* [p-options]="options">
|
|
24647
|
-
* <ng-template p-select-option-template let-option>
|
|
24648
|
-
* <option-template [option]="option"></option-template>
|
|
24649
|
-
* </ng-template>
|
|
24650
|
-
* </po-select>
|
|
24651
|
-
* ...
|
|
24652
|
-
* ```
|
|
24653
|
-
*
|
|
24654
|
-
* ```
|
|
24655
|
-
* ...
|
|
24656
|
-
* <po-select
|
|
24657
|
-
* name="select"
|
|
24658
|
-
* [(ngModel)]="select"
|
|
24659
|
-
* [p-options]="options">
|
|
24660
|
-
* <div *p-select-option-template="let option">
|
|
24661
|
-
* <option-template [option]="option"></option-template>
|
|
24662
|
-
* </div>
|
|
24663
|
-
* </po-select>
|
|
24664
|
-
* ...
|
|
24665
|
-
*
|
|
24666
|
-
* ```
|
|
24667
|
-
*/
|
|
24668
|
-
var PoSelectOptionTemplateDirective = /** @class */ (function () {
|
|
24669
|
-
// Necessário manter templateRef para o funcionamento do row template.
|
|
24670
|
-
function PoSelectOptionTemplateDirective(templateRef) {
|
|
24671
|
-
this.templateRef = templateRef;
|
|
24672
|
-
}
|
|
24673
|
-
return PoSelectOptionTemplateDirective;
|
|
24674
|
-
}());
|
|
24675
|
-
PoSelectOptionTemplateDirective.decorators = [
|
|
24676
|
-
{ type: i0.Directive, args: [{
|
|
24677
|
-
selector: '[p-select-option-template]'
|
|
24678
|
-
},] }
|
|
24679
|
-
];
|
|
24680
|
-
PoSelectOptionTemplateDirective.ctorParameters = function () { return [
|
|
24681
|
-
{ type: i0.TemplateRef }
|
|
24682
|
-
]; };
|
|
24699
|
+
], PoFieldValidateModel.prototype, "optional", void 0);
|
|
24700
|
+
__decorate([
|
|
24701
|
+
InputBoolean()
|
|
24702
|
+
], PoFieldValidateModel.prototype, "required", void 0);
|
|
24683
24703
|
|
|
24684
24704
|
var poSelectContentOffset = 8;
|
|
24685
24705
|
var poSelectContentPositionDefault = 'bottom';
|
|
24686
24706
|
/**
|
|
24687
|
-
* @docsExtends
|
|
24707
|
+
* @docsExtends PoFieldValidateModel
|
|
24688
24708
|
*
|
|
24689
24709
|
* @example
|
|
24690
24710
|
*
|
|
@@ -24705,13 +24725,46 @@
|
|
|
24705
24725
|
* <file name='sample-po-select-customer-registration/sample-po-select-customer-registration.component.e2e-spec.ts'> </file>
|
|
24706
24726
|
* <file name='sample-po-select-customer-registration/sample-po-select-customer-registration.component.po.ts'> </file>
|
|
24707
24727
|
* </example>
|
|
24728
|
+
*
|
|
24729
|
+
* @description
|
|
24730
|
+
*
|
|
24731
|
+
* O componente po-select exibe uma lista de valores e permite que o usuário selecione um desses valores.
|
|
24732
|
+
* Os valores listados podem ser fixos ou dinâmicos de acordo com a necessidade do desenvolvedor, dando mais flexibilidade ao componente.
|
|
24733
|
+
* O po-select não permite que o usuário informe um valor diferente dos valores listados, isso garante a consistência da informação.
|
|
24734
|
+
* O po-select não permite que sejam passados valores duplicados, undefined e null para as opções, excluindo-os da lista.
|
|
24735
|
+
*
|
|
24736
|
+
* > Ao passar um valor para o _model_ que não está na lista de opções, o mesmo será definido como `undefined`.
|
|
24737
|
+
*
|
|
24738
|
+
* Também existe a possibilidade de utilizar um _template_ para a exibição dos itens da lista,
|
|
24739
|
+
* veja mais em **[p-select-option-template](/documentation/po-select-option-template)**.
|
|
24708
24740
|
*/
|
|
24709
24741
|
var PoSelectComponent = /** @class */ (function (_super) {
|
|
24710
24742
|
__extends(PoSelectComponent, _super);
|
|
24743
|
+
/* istanbul ignore next */
|
|
24711
24744
|
function PoSelectComponent(element, changeDetector, differs, renderer, controlPosition) {
|
|
24712
|
-
var _this = _super.call(this
|
|
24745
|
+
var _this = _super.call(this) || this;
|
|
24746
|
+
_this.element = element;
|
|
24747
|
+
_this.changeDetector = changeDetector;
|
|
24713
24748
|
_this.renderer = renderer;
|
|
24714
24749
|
_this.controlPosition = controlPosition;
|
|
24750
|
+
/**
|
|
24751
|
+
* @optional
|
|
24752
|
+
*
|
|
24753
|
+
* @description
|
|
24754
|
+
*
|
|
24755
|
+
* Função para atualizar o ngModel do componente, necessário quando não for utilizado dentro da tag form.
|
|
24756
|
+
*/
|
|
24757
|
+
_this.ngModelChange = new i0.EventEmitter();
|
|
24758
|
+
/**
|
|
24759
|
+
* @optional
|
|
24760
|
+
*
|
|
24761
|
+
* @description
|
|
24762
|
+
*
|
|
24763
|
+
* Indica que o campo será somente para leitura.
|
|
24764
|
+
*
|
|
24765
|
+
* @default `false`
|
|
24766
|
+
*/
|
|
24767
|
+
_this.readonly = false;
|
|
24715
24768
|
_this.isMobile = isMobile();
|
|
24716
24769
|
_this.open = false;
|
|
24717
24770
|
_this.selectIcon = 'po-icon-arrow-down';
|
|
@@ -24721,6 +24774,35 @@
|
|
|
24721
24774
|
_this.differ = differs.find([]).create(null);
|
|
24722
24775
|
return _this;
|
|
24723
24776
|
}
|
|
24777
|
+
Object.defineProperty(PoSelectComponent.prototype, "options", {
|
|
24778
|
+
get: function () {
|
|
24779
|
+
return this._options;
|
|
24780
|
+
},
|
|
24781
|
+
/**
|
|
24782
|
+
* Nesta propriedade deve ser definido uma coleção de objetos que implementam a interface `PoSelectOption`.
|
|
24783
|
+
*
|
|
24784
|
+
* Caso esta lista estiver vazia, o model será `undefined`.
|
|
24785
|
+
*
|
|
24786
|
+
* > Essa propriedade é imutável, ou seja, sempre que quiser atualizar a lista de opções disponíveis
|
|
24787
|
+
* atualize a referência do objeto:
|
|
24788
|
+
*
|
|
24789
|
+
* ```
|
|
24790
|
+
* // atualiza a referência do objeto garantindo a atualização do template
|
|
24791
|
+
* this.options = [...this.options, { value: 'x', label: 'Nova opção' }];
|
|
24792
|
+
*
|
|
24793
|
+
* // evite, pois não atualiza a referência do objeto podendo gerar atrasos na atualização do template
|
|
24794
|
+
* this.options.push({ value: 'x', label: 'Nova opção' });
|
|
24795
|
+
* ```
|
|
24796
|
+
*/
|
|
24797
|
+
set: function (options) {
|
|
24798
|
+
this._options = options;
|
|
24799
|
+
removeDuplicatedOptions(this._options);
|
|
24800
|
+
removeUndefinedAndNullOptions(this._options);
|
|
24801
|
+
this.onUpdateOptions();
|
|
24802
|
+
},
|
|
24803
|
+
enumerable: false,
|
|
24804
|
+
configurable: true
|
|
24805
|
+
});
|
|
24724
24806
|
Object.defineProperty(PoSelectComponent.prototype, "isInvisibleSelectNative", {
|
|
24725
24807
|
get: function () {
|
|
24726
24808
|
return this.readonly && this.isMobile;
|
|
@@ -24795,21 +24877,12 @@
|
|
|
24795
24877
|
this.selectElement.nativeElement.focus();
|
|
24796
24878
|
this.removeListeners();
|
|
24797
24879
|
};
|
|
24798
|
-
PoSelectComponent.prototype.isEqual = function (value, inputValue) {
|
|
24799
|
-
if ((value || value === 0) && inputValue) {
|
|
24800
|
-
return value.toString() === inputValue.toString();
|
|
24801
|
-
}
|
|
24802
|
-
if ((value === null && inputValue !== null) || (value === undefined && inputValue !== undefined)) {
|
|
24803
|
-
value = "" + value; // Transformando em string
|
|
24804
|
-
}
|
|
24805
|
-
return value === inputValue;
|
|
24806
|
-
};
|
|
24807
24880
|
PoSelectComponent.prototype.onBlur = function () {
|
|
24808
24881
|
var _a;
|
|
24809
24882
|
(_a = this.onModelTouched) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
24810
24883
|
};
|
|
24811
24884
|
PoSelectComponent.prototype.onOptionClick = function (option) {
|
|
24812
|
-
this.
|
|
24885
|
+
this.updateValues(option);
|
|
24813
24886
|
this.toggleButton();
|
|
24814
24887
|
};
|
|
24815
24888
|
// Altera o valor ao selecionar um item.
|
|
@@ -24817,7 +24890,7 @@
|
|
|
24817
24890
|
if (value && this.options && this.options.length) {
|
|
24818
24891
|
var optionFound = this.findOptionValue(value);
|
|
24819
24892
|
if (optionFound) {
|
|
24820
|
-
this.
|
|
24893
|
+
this.updateValues(optionFound);
|
|
24821
24894
|
this.setScrollPosition(optionFound.value);
|
|
24822
24895
|
}
|
|
24823
24896
|
}
|
|
@@ -24838,13 +24911,13 @@
|
|
|
24838
24911
|
this.open ? this.hideDropDown() : this.showDropdown();
|
|
24839
24912
|
};
|
|
24840
24913
|
// Atualiza valores
|
|
24841
|
-
PoSelectComponent.prototype.
|
|
24914
|
+
PoSelectComponent.prototype.updateValues = function (option) {
|
|
24842
24915
|
if (this.selectedValue !== option.value) {
|
|
24843
24916
|
this.selectedValue = option.value;
|
|
24844
24917
|
this.selectElement.nativeElement.value = option.value;
|
|
24845
|
-
this.
|
|
24918
|
+
this.updateModel(option.value);
|
|
24846
24919
|
this.displayValue = option.label;
|
|
24847
|
-
this.
|
|
24920
|
+
this.emitChange(option.value);
|
|
24848
24921
|
}
|
|
24849
24922
|
};
|
|
24850
24923
|
// Esconde Content do Select quando for clicado fora
|
|
@@ -24855,7 +24928,7 @@
|
|
|
24855
24928
|
}
|
|
24856
24929
|
};
|
|
24857
24930
|
// Recebe as alterações do model
|
|
24858
|
-
PoSelectComponent.prototype.
|
|
24931
|
+
PoSelectComponent.prototype.onWriteValue = function (value) {
|
|
24859
24932
|
var optionFound = this.findOptionValue(value);
|
|
24860
24933
|
if (optionFound) {
|
|
24861
24934
|
this.selectElement.nativeElement.value = optionFound.value;
|
|
@@ -24865,13 +24938,25 @@
|
|
|
24865
24938
|
}
|
|
24866
24939
|
else if (validValue(this.selectedValue)) {
|
|
24867
24940
|
this.selectElement.nativeElement.value = undefined;
|
|
24868
|
-
this.
|
|
24941
|
+
this.updateModel(undefined);
|
|
24869
24942
|
this.selectedValue = undefined;
|
|
24870
24943
|
this.displayValue = undefined;
|
|
24871
24944
|
}
|
|
24872
24945
|
this.modelValue = value;
|
|
24873
24946
|
this.changeDetector.detectChanges();
|
|
24874
24947
|
};
|
|
24948
|
+
PoSelectComponent.prototype.extraValidation = function (c) {
|
|
24949
|
+
return null;
|
|
24950
|
+
};
|
|
24951
|
+
PoSelectComponent.prototype.isEqual = function (value, inputValue) {
|
|
24952
|
+
if ((value || value === 0) && inputValue) {
|
|
24953
|
+
return value.toString() === inputValue.toString();
|
|
24954
|
+
}
|
|
24955
|
+
if ((value === null && inputValue !== null) || (value === undefined && inputValue !== undefined)) {
|
|
24956
|
+
value = "" + value; // Transformando em string
|
|
24957
|
+
}
|
|
24958
|
+
return value === inputValue;
|
|
24959
|
+
};
|
|
24875
24960
|
// Método necessário para bloquear o evento default do select nativo.
|
|
24876
24961
|
// Ao utilizar event.preventDefault(), nos navegadores Firefox e IE o mesmo não cancela o evento.
|
|
24877
24962
|
PoSelectComponent.prototype.disableDefaultEventAndToggleButton = function () {
|
|
@@ -24936,7 +25021,7 @@
|
|
|
24936
25021
|
}
|
|
24937
25022
|
};
|
|
24938
25023
|
return PoSelectComponent;
|
|
24939
|
-
}(
|
|
25024
|
+
}(PoFieldValidateModel));
|
|
24940
25025
|
PoSelectComponent.decorators = [
|
|
24941
25026
|
{ type: i0.Component, args: [{
|
|
24942
25027
|
selector: 'po-select',
|
|
@@ -24970,81 +25055,15 @@
|
|
|
24970
25055
|
iconElement: [{ type: i0.ViewChild, args: ['icon', { read: i0.ElementRef, static: true },] }],
|
|
24971
25056
|
selectElement: [{ type: i0.ViewChild, args: ['select', { read: i0.ElementRef, static: true },] }],
|
|
24972
25057
|
selectButtonElement: [{ type: i0.ViewChild, args: ['selectButton', { read: i0.ElementRef, static: true },] }],
|
|
25058
|
+
ngModelChange: [{ type: i0.Output, args: ['ngModelChange',] }],
|
|
25059
|
+
readonly: [{ type: i0.Input, args: ['p-readonly',] }],
|
|
25060
|
+
placeholder: [{ type: i0.Input, args: ['p-placeholder',] }],
|
|
25061
|
+
options: [{ type: i0.Input, args: ['p-options',] }],
|
|
24973
25062
|
onKeydown: [{ type: i0.HostListener, args: ['keydown', ['$event'],] }]
|
|
24974
25063
|
};
|
|
24975
|
-
|
|
24976
|
-
var PoFieldModel = /** @class */ (function () {
|
|
24977
|
-
function PoFieldModel() {
|
|
24978
|
-
/**
|
|
24979
|
-
* @optional
|
|
24980
|
-
*
|
|
24981
|
-
* @description
|
|
24982
|
-
*
|
|
24983
|
-
* Aplica o foco no elemento ao ser iniciado.
|
|
24984
|
-
* > Caso mais de um elemento seja configurado com essa propriedade,
|
|
24985
|
-
* o último elemento declarado com ela terá o foco.
|
|
24986
|
-
*
|
|
24987
|
-
* @default `false`
|
|
24988
|
-
*/
|
|
24989
|
-
this.autoFocus = false;
|
|
24990
|
-
/**
|
|
24991
|
-
* @optional
|
|
24992
|
-
*
|
|
24993
|
-
* @description
|
|
24994
|
-
*
|
|
24995
|
-
* Indica se o campo será desabilitado.
|
|
24996
|
-
*
|
|
24997
|
-
* @default `false`
|
|
24998
|
-
*/
|
|
24999
|
-
this.disabled = false;
|
|
25000
|
-
/**
|
|
25001
|
-
* @optional
|
|
25002
|
-
*
|
|
25003
|
-
* @description
|
|
25004
|
-
*
|
|
25005
|
-
* Evento disparado ao alterar valor do campo.
|
|
25006
|
-
*/
|
|
25007
|
-
this.change = new i0.EventEmitter();
|
|
25008
|
-
}
|
|
25009
|
-
// Função implementada do ControlValueAccessor
|
|
25010
|
-
// Usada para interceptar os estados de habilitado via forms api
|
|
25011
|
-
PoFieldModel.prototype.setDisabledState = function (isDisabled) {
|
|
25012
|
-
this.disabled = isDisabled;
|
|
25013
|
-
};
|
|
25014
|
-
PoFieldModel.prototype.registerOnChange = function (fn) {
|
|
25015
|
-
this.propagateChange = fn;
|
|
25016
|
-
};
|
|
25017
|
-
PoFieldModel.prototype.registerOnTouched = function (fn) {
|
|
25018
|
-
this.onTouched = fn;
|
|
25019
|
-
};
|
|
25020
|
-
PoFieldModel.prototype.writeValue = function (value) {
|
|
25021
|
-
this.onWriteValue(value);
|
|
25022
|
-
};
|
|
25023
|
-
PoFieldModel.prototype.updateModel = function (value) {
|
|
25024
|
-
if (this.propagateChange) {
|
|
25025
|
-
this.propagateChange(value);
|
|
25026
|
-
}
|
|
25027
|
-
};
|
|
25028
|
-
return PoFieldModel;
|
|
25029
|
-
}());
|
|
25030
|
-
PoFieldModel.decorators = [
|
|
25031
|
-
{ type: i0.Directive }
|
|
25032
|
-
];
|
|
25033
|
-
PoFieldModel.ctorParameters = function () { return []; };
|
|
25034
|
-
PoFieldModel.propDecorators = {
|
|
25035
|
-
label: [{ type: i0.Input, args: ['p-label',] }],
|
|
25036
|
-
name: [{ type: i0.Input, args: ['name',] }],
|
|
25037
|
-
help: [{ type: i0.Input, args: ['p-help',] }],
|
|
25038
|
-
autoFocus: [{ type: i0.Input, args: ['p-auto-focus',] }],
|
|
25039
|
-
disabled: [{ type: i0.Input, args: ['p-disabled',] }],
|
|
25040
|
-
change: [{ type: i0.Output, args: ['p-change',] }]
|
|
25041
|
-
};
|
|
25042
|
-
__decorate([
|
|
25043
|
-
InputBoolean()
|
|
25044
|
-
], PoFieldModel.prototype, "autoFocus", void 0);
|
|
25045
25064
|
__decorate([
|
|
25046
25065
|
InputBoolean()
|
|
25047
|
-
],
|
|
25066
|
+
], PoSelectComponent.prototype, "readonly", void 0);
|
|
25048
25067
|
|
|
25049
25068
|
/**
|
|
25050
25069
|
* @usedBy PoSwitchComponent
|
|
@@ -25221,7 +25240,7 @@
|
|
|
25221
25240
|
if (this.value !== value) {
|
|
25222
25241
|
this.value = value;
|
|
25223
25242
|
this.updateModel(value);
|
|
25224
|
-
this.
|
|
25243
|
+
this.emitChange(this.value);
|
|
25225
25244
|
}
|
|
25226
25245
|
};
|
|
25227
25246
|
PoSwitchComponent.prototype.eventClick = function () {
|
|
@@ -25280,7 +25299,8 @@
|
|
|
25280
25299
|
* ```
|
|
25281
25300
|
*/
|
|
25282
25301
|
var PoTextareaBaseComponent = /** @class */ (function () {
|
|
25283
|
-
function PoTextareaBaseComponent() {
|
|
25302
|
+
function PoTextareaBaseComponent(cd) {
|
|
25303
|
+
this.cd = cd;
|
|
25284
25304
|
/**
|
|
25285
25305
|
* @optional
|
|
25286
25306
|
*
|
|
@@ -25477,6 +25497,7 @@
|
|
|
25477
25497
|
// Usada para interceptar os estados de habilitado via forms api
|
|
25478
25498
|
PoTextareaBaseComponent.prototype.setDisabledState = function (isDisabled) {
|
|
25479
25499
|
this.disabled = isDisabled;
|
|
25500
|
+
this.cd.markForCheck();
|
|
25480
25501
|
};
|
|
25481
25502
|
// Funções `registerOnChange`, `registerOnTouched` e `registerOnValidatorChange` implementadas referentes ao ControlValueAccessor
|
|
25482
25503
|
// usadas para interceptar as mudanças e não atualizar automaticamente o Model
|
|
@@ -25515,6 +25536,7 @@
|
|
|
25515
25536
|
// Função implementada do ControlValueAccessor
|
|
25516
25537
|
PoTextareaBaseComponent.prototype.writeValue = function (value) {
|
|
25517
25538
|
this.writeValueModel(value);
|
|
25539
|
+
this.cd.markForCheck();
|
|
25518
25540
|
};
|
|
25519
25541
|
PoTextareaBaseComponent.prototype.validateModel = function () {
|
|
25520
25542
|
if (this.validatorChange) {
|
|
@@ -25526,6 +25548,9 @@
|
|
|
25526
25548
|
PoTextareaBaseComponent.decorators = [
|
|
25527
25549
|
{ type: i0.Directive }
|
|
25528
25550
|
];
|
|
25551
|
+
PoTextareaBaseComponent.ctorParameters = function () { return [
|
|
25552
|
+
{ type: i0.ChangeDetectorRef }
|
|
25553
|
+
]; };
|
|
25529
25554
|
PoTextareaBaseComponent.propDecorators = {
|
|
25530
25555
|
autoFocus: [{ type: i0.Input, args: ['p-auto-focus',] }],
|
|
25531
25556
|
label: [{ type: i0.Input, args: ['p-label',] }],
|
|
@@ -25576,8 +25601,8 @@
|
|
|
25576
25601
|
*/
|
|
25577
25602
|
var PoTextareaComponent = /** @class */ (function (_super) {
|
|
25578
25603
|
__extends(PoTextareaComponent, _super);
|
|
25579
|
-
function PoTextareaComponent() {
|
|
25580
|
-
var _this = _super.call(this) || this;
|
|
25604
|
+
function PoTextareaComponent(cd) {
|
|
25605
|
+
var _this = _super.call(this, cd) || this;
|
|
25581
25606
|
_this.fireChange = false;
|
|
25582
25607
|
return _this;
|
|
25583
25608
|
}
|
|
@@ -25656,6 +25681,7 @@
|
|
|
25656
25681
|
{ type: i0.Component, args: [{
|
|
25657
25682
|
selector: 'po-textarea',
|
|
25658
25683
|
template: "<po-field-container [p-help]=\"help\" [p-label]=\"label\" [p-optional]=\"!required && optional\">\n <div class=\"po-field-container-content\">\n <textarea\n #inp\n class=\"po-textarea\"\n (blur)=\"eventOnBlur()\"\n (focus)=\"eventOnFocus()\"\n (input)=\"eventOnInput($event)\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [rows]=\"rows\"\n >\n </textarea>\n </div>\n\n <po-field-container-bottom></po-field-container-bottom>\n</po-field-container>\n",
|
|
25684
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
25659
25685
|
providers: [
|
|
25660
25686
|
{
|
|
25661
25687
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -25670,7 +25696,9 @@
|
|
|
25670
25696
|
]
|
|
25671
25697
|
},] }
|
|
25672
25698
|
];
|
|
25673
|
-
PoTextareaComponent.ctorParameters = function () { return [
|
|
25699
|
+
PoTextareaComponent.ctorParameters = function () { return [
|
|
25700
|
+
{ type: i0.ChangeDetectorRef }
|
|
25701
|
+
]; };
|
|
25674
25702
|
PoTextareaComponent.propDecorators = {
|
|
25675
25703
|
inputEl: [{ type: i0.ViewChild, args: ['inp', { read: i0.ElementRef, static: true },] }]
|
|
25676
25704
|
};
|
|
@@ -28337,7 +28365,7 @@
|
|
|
28337
28365
|
};
|
|
28338
28366
|
PoDynamicFormFieldsBaseComponent.prototype.isMultiselect = function (field) {
|
|
28339
28367
|
var optionsService = field.optionsService, optionsMulti = field.optionsMulti, options = field.options;
|
|
28340
|
-
return
|
|
28368
|
+
return optionsMulti && (!!optionsService || (!!options && options.length > 3));
|
|
28341
28369
|
};
|
|
28342
28370
|
PoDynamicFormFieldsBaseComponent.prototype.isNumberType = function (field, type) {
|
|
28343
28371
|
var mask = field.mask, pattern = field.pattern;
|
|
@@ -28515,7 +28543,7 @@
|
|
|
28515
28543
|
PoDynamicFormFieldsComponent.decorators = [
|
|
28516
28544
|
{ type: i0.Component, args: [{
|
|
28517
28545
|
selector: 'po-dynamic-form-fields',
|
|
28518
|
-
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",
|
|
28546
|
+
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 [p-field-label]=\"field.fieldLabel\"\n [p-field-value]=\"field.fieldValue\"\n [p-filter-service]=\"field.optionsService\"\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",
|
|
28519
28547
|
viewProviders: [{ provide: forms.ControlContainer, useExisting: forms.NgForm }],
|
|
28520
28548
|
providers: [PoDynamicFormValidationService]
|
|
28521
28549
|
},] }
|
|
@@ -39073,6 +39101,7 @@
|
|
|
39073
39101
|
exports.PoMenuPanelComponent = PoMenuPanelComponent;
|
|
39074
39102
|
exports.PoMenuPanelModule = PoMenuPanelModule;
|
|
39075
39103
|
exports.PoModalComponent = PoModalComponent;
|
|
39104
|
+
exports.PoModalFooterComponent = PoModalFooterComponent;
|
|
39076
39105
|
exports.PoModalModule = PoModalModule;
|
|
39077
39106
|
exports.PoModule = PoModule;
|
|
39078
39107
|
exports.PoMultiselectComponent = PoMultiselectComponent;
|
|
@@ -39223,7 +39252,7 @@
|
|
|
39223
39252
|
exports.ɵdy = PoRichTextService;
|
|
39224
39253
|
exports.ɵdz = PoRichTextBodyComponent;
|
|
39225
39254
|
exports.ɵe = PoAvatarBaseComponent;
|
|
39226
|
-
exports.ɵea =
|
|
39255
|
+
exports.ɵea = PoFieldValidateModel;
|
|
39227
39256
|
exports.ɵeb = PoFieldModel;
|
|
39228
39257
|
exports.ɵec = PoTextareaBaseComponent;
|
|
39229
39258
|
exports.ɵed = PoUploadBaseComponent;
|