@po-ui/ng-components 21.21.0 → 21.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/fesm2022/po-ui-ng-components.mjs +217 -50
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +5 -5
- package/lib/components/po-field/po-datetimepicker/po-datetimepicker-base.component.d.ts +1 -2
- package/lib/components/po-field/po-datetimepicker/po-datetimepicker.component.d.ts +12 -1
- package/lib/components/po-field/po-lookup/interfaces/po-lookup-column.interface.d.ts +36 -0
- package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +6 -0
- package/lib/components/po-table/interfaces/po-table-column.interface.d.ts +41 -2
- package/lib/components/po-table/po-table.component.d.ts +2 -0
- package/package.json +4 -4
- package/po-ui-ng-components-21.22.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/v20/index.js +2 -2
- package/schematics/ng-update/v21/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/types/po-ui-ng-components.d.ts +104 -11
- package/po-ui-ng-components-21.21.0.tgz +0 -0
|
@@ -29643,7 +29643,6 @@ class PoDatetimepickerBaseComponent {
|
|
|
29643
29643
|
onTouchedModel = null;
|
|
29644
29644
|
validatorChange;
|
|
29645
29645
|
shortLanguage;
|
|
29646
|
-
currentErrorPattern = signal('', ...(ngDevMode ? [{ debugName: "currentErrorPattern" }] : /* istanbul ignore next */ []));
|
|
29647
29646
|
// --- Inputs ---
|
|
29648
29647
|
/**
|
|
29649
29648
|
* @optional
|
|
@@ -29712,7 +29711,7 @@ class PoDatetimepickerBaseComponent {
|
|
|
29712
29711
|
*
|
|
29713
29712
|
* Mensagem apresentada quando a data/hora for inválida ou fora do período.
|
|
29714
29713
|
*/
|
|
29715
|
-
errorPattern =
|
|
29714
|
+
errorPattern = model('', { ...(ngDevMode ? { debugName: "errorPattern" } : /* istanbul ignore next */ {}), alias: 'p-error-pattern' });
|
|
29716
29715
|
/**
|
|
29717
29716
|
* @optional
|
|
29718
29717
|
*
|
|
@@ -30017,10 +30016,6 @@ class PoDatetimepickerBaseComponent {
|
|
|
30017
30016
|
this._disabled = value === '' ? true : convertToBoolean(value);
|
|
30018
30017
|
this.validateModel(this.getModelValue());
|
|
30019
30018
|
});
|
|
30020
|
-
// p-error-pattern
|
|
30021
|
-
effect(() => {
|
|
30022
|
-
this.currentErrorPattern.set(this.errorPattern());
|
|
30023
|
-
});
|
|
30024
30019
|
// p-locale
|
|
30025
30020
|
effect(() => {
|
|
30026
30021
|
const value = this.localeInput();
|
|
@@ -30137,7 +30132,9 @@ class PoDatetimepickerBaseComponent {
|
|
|
30137
30132
|
this.hasValidatorRequired = true;
|
|
30138
30133
|
}
|
|
30139
30134
|
if (dateFailed(c.value)) {
|
|
30140
|
-
this.
|
|
30135
|
+
this.errorPattern.set(this.errorPattern() ||
|
|
30136
|
+
PoDatetimepickerLiterals[this.locale]?.invalidDatetime ||
|
|
30137
|
+
PoDatetimepickerLiterals['pt'].invalidDatetime);
|
|
30141
30138
|
return { date: { valid: false } };
|
|
30142
30139
|
}
|
|
30143
30140
|
if (this.requiredFailed(c.value)) {
|
|
@@ -30283,10 +30280,12 @@ class PoDatetimepickerBaseComponent {
|
|
|
30283
30280
|
// Formata o horário para exibição, incluindo AM/PM quando em formato 12h.
|
|
30284
30281
|
//
|
|
30285
30282
|
// @param time Horário no formato HH:mm ou HH:mm:ss (24h interno)
|
|
30286
|
-
// @returns Horário formatado para exibição (ex: "02:30
|
|
30283
|
+
// @returns Horário formatado para exibição (ex: "02:30" ou "14:30")
|
|
30284
|
+
// Nota: Para formato 12h, retorna apenas a parte numérica (sem AM/PM).
|
|
30285
|
+
// O período é exibido no input separado gerenciado pelo componente.
|
|
30287
30286
|
formatTimeForDisplay(time) {
|
|
30288
30287
|
if (!time) {
|
|
30289
|
-
return this.is12HourFormat ? '12:00
|
|
30288
|
+
return this.is12HourFormat ? '12:00' : '00:00';
|
|
30290
30289
|
}
|
|
30291
30290
|
// Trunca segundos se showSeconds está desabilitado
|
|
30292
30291
|
const parts = time.split(':');
|
|
@@ -30296,11 +30295,10 @@ class PoDatetimepickerBaseComponent {
|
|
|
30296
30295
|
if (!this.is12HourFormat) {
|
|
30297
30296
|
return time;
|
|
30298
30297
|
}
|
|
30299
|
-
// Converte de 24h para 12h
|
|
30298
|
+
// Converte de 24h para 12h (sem AM/PM — o período é gerenciado separadamente)
|
|
30300
30299
|
let hours = Number.parseInt(parts[0], 10);
|
|
30301
30300
|
const minutes = parts[1];
|
|
30302
30301
|
const seconds = this.showSeconds() && parts.length > 2 ? parts[2] : null;
|
|
30303
|
-
const period = hours >= 12 ? 'PM' : 'AM';
|
|
30304
30302
|
if (hours === 0) {
|
|
30305
30303
|
hours = 12;
|
|
30306
30304
|
}
|
|
@@ -30308,13 +30306,13 @@ class PoDatetimepickerBaseComponent {
|
|
|
30308
30306
|
hours -= 12;
|
|
30309
30307
|
}
|
|
30310
30308
|
const hoursStr = ('0' + hours).slice(-2);
|
|
30311
|
-
|
|
30312
|
-
return `${timeStr} ${period}`;
|
|
30309
|
+
return seconds ? `${hoursStr}:${minutes}:${seconds}` : `${hoursStr}:${minutes}`;
|
|
30313
30310
|
}
|
|
30314
30311
|
// --- Protected / Private ---
|
|
30315
30312
|
// Constrói a máscara para o input de datetime.
|
|
30316
|
-
// Formato resultante: "99/99/9999 99:99" (24h
|
|
30317
|
-
// Com segundos: "99/99/9999 99:99:99"
|
|
30313
|
+
// Formato resultante: "99/99/9999 99:99" (24h e 12h)
|
|
30314
|
+
// Com segundos: "99/99/9999 99:99:99"
|
|
30315
|
+
// Nota: O sufixo AM/PM em formato 12h é gerenciado separadamente (não faz parte da máscara).
|
|
30318
30316
|
buildMask(format = this.format) {
|
|
30319
30317
|
let mask = format.toUpperCase();
|
|
30320
30318
|
// Parte da data
|
|
@@ -30328,10 +30326,7 @@ class PoDatetimepickerBaseComponent {
|
|
|
30328
30326
|
else {
|
|
30329
30327
|
mask += ' 99:99';
|
|
30330
30328
|
}
|
|
30331
|
-
// AM/PM
|
|
30332
|
-
if (this.is12HourFormat) {
|
|
30333
|
-
mask += ' AA';
|
|
30334
|
-
}
|
|
30329
|
+
// AM/PM NÃO é incluído na máscara — é gerenciado como sufixo fixo no componente.
|
|
30335
30330
|
return new PoMask(mask, true);
|
|
30336
30331
|
}
|
|
30337
30332
|
validateModel(value) {
|
|
@@ -30454,11 +30449,11 @@ class PoDatetimepickerBaseComponent {
|
|
|
30454
30449
|
this._size = size;
|
|
30455
30450
|
}
|
|
30456
30451
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PoDatetimepickerBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
30457
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: PoDatetimepickerBaseComponent, isStandalone: true, inputs: { appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: true, isRequired: false, transformFunction: null }, clean: { classPropertyName: "clean", publicName: "p-clean", isSignal: true, isRequired: false, transformFunction: null }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: true, isRequired: false, transformFunction: null }, errorLimit: { classPropertyName: "errorLimit", publicName: "p-error-limit", isSignal: true, isRequired: false, transformFunction: null }, errorPattern: { classPropertyName: "errorPattern", publicName: "p-error-pattern", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "p-loading", isSignal: true, isRequired: false, transformFunction: null }, localeInput: { classPropertyName: "localeInput", publicName: "p-locale", isSignal: true, isRequired: false, transformFunction: null }, maxDateInput: { classPropertyName: "maxDateInput", publicName: "p-max-date", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "p-max-time", isSignal: true, isRequired: false, transformFunction: null }, minDateInput: { classPropertyName: "minDateInput", publicName: "p-min-date", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "p-min-time", isSignal: true, isRequired: false, transformFunction: null }, minuteInterval: { classPropertyName: "minuteInterval", publicName: "p-minute-interval", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, noAutocomplete: { classPropertyName: "noAutocomplete", publicName: "p-no-autocomplete", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "p-placeholder", isSignal: true, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "p-readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: true, isRequired: false, transformFunction: null }, secondInterval: { classPropertyName: "secondInterval", publicName: "p-second-interval", isSignal: true, isRequired: false, transformFunction: null }, showErrorMessageRequired: { classPropertyName: "showErrorMessageRequired", publicName: "p-required-field-error-message", isSignal: true, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "p-show-seconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: true, isRequired: false, transformFunction: null }, timerFormat: { classPropertyName: "timerFormat", publicName: "p-format-time", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "p-format-date", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onblur: "p-blur", onchange: "p-change", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.hostSize" } }, ngImport: i0 });
|
|
30452
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: PoDatetimepickerBaseComponent, isStandalone: true, inputs: { appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: true, isRequired: false, transformFunction: null }, clean: { classPropertyName: "clean", publicName: "p-clean", isSignal: true, isRequired: false, transformFunction: null }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: true, isRequired: false, transformFunction: null }, errorLimit: { classPropertyName: "errorLimit", publicName: "p-error-limit", isSignal: true, isRequired: false, transformFunction: null }, errorPattern: { classPropertyName: "errorPattern", publicName: "p-error-pattern", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "p-loading", isSignal: true, isRequired: false, transformFunction: null }, localeInput: { classPropertyName: "localeInput", publicName: "p-locale", isSignal: true, isRequired: false, transformFunction: null }, maxDateInput: { classPropertyName: "maxDateInput", publicName: "p-max-date", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "p-max-time", isSignal: true, isRequired: false, transformFunction: null }, minDateInput: { classPropertyName: "minDateInput", publicName: "p-min-date", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "p-min-time", isSignal: true, isRequired: false, transformFunction: null }, minuteInterval: { classPropertyName: "minuteInterval", publicName: "p-minute-interval", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, noAutocomplete: { classPropertyName: "noAutocomplete", publicName: "p-no-autocomplete", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "p-placeholder", isSignal: true, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "p-readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: true, isRequired: false, transformFunction: null }, secondInterval: { classPropertyName: "secondInterval", publicName: "p-second-interval", isSignal: true, isRequired: false, transformFunction: null }, showErrorMessageRequired: { classPropertyName: "showErrorMessageRequired", publicName: "p-required-field-error-message", isSignal: true, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "p-show-seconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: true, isRequired: false, transformFunction: null }, timerFormat: { classPropertyName: "timerFormat", publicName: "p-format-time", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "p-format-date", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { errorPattern: "p-error-patternChange", onblur: "p-blur", onchange: "p-change", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.hostSize" } }, ngImport: i0 });
|
|
30458
30453
|
}
|
|
30459
30454
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PoDatetimepickerBaseComponent, decorators: [{
|
|
30460
30455
|
type: Directive
|
|
30461
|
-
}], ctorParameters: () => [{ type: PoLanguageService }], propDecorators: { appendBox: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-append-in-body", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-auto-focus", required: false }] }], clean: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-clean", required: false }] }], compactLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-compact-label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-disabled", required: false }] }], errorLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-error-limit", required: false }] }], errorPattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-error-pattern", required: false }] }], help: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-help", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label", required: false }] }], labelTextWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label-text-wrap", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-loading", required: false }] }], localeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-locale", required: false }] }], maxDateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-max-date", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-max-time", required: false }] }], minDateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-min-date", required: false }] }], minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-min-time", required: false }] }], minuteInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-minute-interval", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], noAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-no-autocomplete", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-optional", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-placeholder", required: false }] }], poHelperComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-helper", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-required", required: false }] }], secondInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-second-interval", required: false }] }], showErrorMessageRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-required-field-error-message", required: false }] }], showRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-show-required", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-show-seconds", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-size", required: false }] }], timerFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-format-time", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-format-date", required: false }] }], onblur: [{
|
|
30456
|
+
}], ctorParameters: () => [{ type: PoLanguageService }], propDecorators: { appendBox: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-append-in-body", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-auto-focus", required: false }] }], clean: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-clean", required: false }] }], compactLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-compact-label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-disabled", required: false }] }], errorLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-error-limit", required: false }] }], errorPattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-error-pattern", required: false }] }, { type: i0.Output, args: ["p-error-patternChange"] }], help: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-help", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label", required: false }] }], labelTextWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label-text-wrap", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-loading", required: false }] }], localeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-locale", required: false }] }], maxDateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-max-date", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-max-time", required: false }] }], minDateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-min-date", required: false }] }], minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-min-time", required: false }] }], minuteInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-minute-interval", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], noAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-no-autocomplete", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-optional", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-placeholder", required: false }] }], poHelperComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-helper", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-required", required: false }] }], secondInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-second-interval", required: false }] }], showErrorMessageRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-required-field-error-message", required: false }] }], showRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-show-required", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-show-seconds", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-size", required: false }] }], timerFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-format-time", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-format-date", required: false }] }], onblur: [{
|
|
30462
30457
|
type: Output,
|
|
30463
30458
|
args: ['p-blur']
|
|
30464
30459
|
}], onchange: [{
|
|
@@ -30525,6 +30520,7 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30525
30520
|
iconClean;
|
|
30526
30521
|
dialogPicker;
|
|
30527
30522
|
helperEl;
|
|
30523
|
+
datetimepickerField;
|
|
30528
30524
|
renderer = inject(Renderer2);
|
|
30529
30525
|
cd = inject(ChangeDetectorRef);
|
|
30530
30526
|
poCalendarService = inject(PoCalendarService);
|
|
@@ -30534,6 +30530,8 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30534
30530
|
el;
|
|
30535
30531
|
literals;
|
|
30536
30532
|
visible = false;
|
|
30533
|
+
currentPeriod = 'AM';
|
|
30534
|
+
isInputFocused = false;
|
|
30537
30535
|
clickListener;
|
|
30538
30536
|
eventResizeListener;
|
|
30539
30537
|
valueBeforeChange = '';
|
|
@@ -30590,12 +30588,6 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30590
30588
|
if (!this.verifyMobile() && focusInput) {
|
|
30591
30589
|
this.focus();
|
|
30592
30590
|
}
|
|
30593
|
-
if (!focusInput && this.isClean && this.inputEl.nativeElement.value) {
|
|
30594
|
-
setTimeout(() => {
|
|
30595
|
-
this.iconDatepicker.focus();
|
|
30596
|
-
}, 0);
|
|
30597
|
-
return;
|
|
30598
|
-
}
|
|
30599
30591
|
requestAnimationFrame(() => {
|
|
30600
30592
|
this.iconDatepicker?.buttonElement?.nativeElement?.focus();
|
|
30601
30593
|
});
|
|
@@ -30626,7 +30618,7 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30626
30618
|
(this.showErrorMessageRequired() && (this.isRequired || this.hasValidatorRequired))));
|
|
30627
30619
|
}
|
|
30628
30620
|
getErrorPattern() {
|
|
30629
|
-
return this.errorPattern() !== '' && this.hasInvalidClass() ? this.
|
|
30621
|
+
return this.errorPattern() !== '' && this.hasInvalidClass() ? this.errorPattern() : '';
|
|
30630
30622
|
}
|
|
30631
30623
|
onKeyup($event) {
|
|
30632
30624
|
if (this.isReadonly || $event?.target !== this.inputEl?.nativeElement) {
|
|
@@ -30643,11 +30635,13 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30643
30635
|
this.date = undefined;
|
|
30644
30636
|
this.timeValue = '';
|
|
30645
30637
|
this.controlModel();
|
|
30638
|
+
this.syncCalendarAndTimer();
|
|
30646
30639
|
}
|
|
30647
30640
|
}
|
|
30648
30641
|
else {
|
|
30649
30642
|
this.date = undefined;
|
|
30650
30643
|
this.timeValue = '';
|
|
30644
|
+
this.syncCalendarAndTimer();
|
|
30651
30645
|
}
|
|
30652
30646
|
}
|
|
30653
30647
|
onKeydown($event) {
|
|
@@ -30665,9 +30659,16 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30665
30659
|
this.keydown.emit($event);
|
|
30666
30660
|
}
|
|
30667
30661
|
}
|
|
30662
|
+
onInputFocus() {
|
|
30663
|
+
this.isInputFocused = true;
|
|
30664
|
+
}
|
|
30665
|
+
onPeriodBlur() {
|
|
30666
|
+
this.isInputFocused = false;
|
|
30667
|
+
}
|
|
30668
30668
|
// Chamado ao sair do campo (blur).
|
|
30669
30669
|
// Finaliza a edição, valida o valor e sincroniza com o calendário/timer.
|
|
30670
30670
|
eventOnBlur($event) {
|
|
30671
|
+
this.isInputFocused = false;
|
|
30671
30672
|
this.onTouchedModel?.();
|
|
30672
30673
|
this.objMask?.blur($event);
|
|
30673
30674
|
this.onblur.emit();
|
|
@@ -30677,6 +30678,7 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30677
30678
|
this.timeValue = '';
|
|
30678
30679
|
this.callOnChange('');
|
|
30679
30680
|
this.emitChangeIfDifferent('');
|
|
30681
|
+
this.syncCalendarAndTimer();
|
|
30680
30682
|
return;
|
|
30681
30683
|
}
|
|
30682
30684
|
const minLength = this.getExpectedInputLength();
|
|
@@ -30685,11 +30687,26 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30685
30687
|
if (this.date && this.timeValue) {
|
|
30686
30688
|
this.emitChangeIfDifferent(this.getModelValue());
|
|
30687
30689
|
}
|
|
30690
|
+
else {
|
|
30691
|
+
this.emitChangeIfDifferent(this.literals.invalidDatetime);
|
|
30692
|
+
}
|
|
30688
30693
|
}
|
|
30689
30694
|
else if (inputValue) {
|
|
30690
30695
|
this.date = undefined;
|
|
30691
30696
|
this.timeValue = '';
|
|
30692
30697
|
this.callOnChange(this.literals.invalidDatetime);
|
|
30698
|
+
this.emitChangeIfDifferent(this.literals.invalidDatetime);
|
|
30699
|
+
this.syncCalendarAndTimer();
|
|
30700
|
+
}
|
|
30701
|
+
}
|
|
30702
|
+
eventOnButtonKeydown(event) {
|
|
30703
|
+
if (event.key === 'Tab' && !event.shiftKey && this.visible) {
|
|
30704
|
+
const firstCombo = this.dialogPicker?.nativeElement?.querySelector('.po-combo-first .po-combo-input');
|
|
30705
|
+
if (firstCombo) {
|
|
30706
|
+
event.preventDefault();
|
|
30707
|
+
event.stopPropagation();
|
|
30708
|
+
firstCombo.focus();
|
|
30709
|
+
}
|
|
30693
30710
|
}
|
|
30694
30711
|
}
|
|
30695
30712
|
// Chamado ao clicar no input.
|
|
@@ -30702,8 +30719,21 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30702
30719
|
this.objMask?.click($event);
|
|
30703
30720
|
}
|
|
30704
30721
|
}
|
|
30722
|
+
// Chamado ao clicar em qualquer parte do wrapper do campo.
|
|
30723
|
+
// Foca o input principal se o clique não foi no period input ou nos ícones.
|
|
30724
|
+
onFieldClick($event) {
|
|
30725
|
+
if (this.isDisabled || this.isReadonly) {
|
|
30726
|
+
return;
|
|
30727
|
+
}
|
|
30728
|
+
const target = $event.target;
|
|
30729
|
+
// Se clicou no period input ou nos botões, não redireciona
|
|
30730
|
+
if (target.closest('.po-datetimepicker-field-period') || target.closest('.po-field-icon-container-right')) {
|
|
30731
|
+
return;
|
|
30732
|
+
}
|
|
30733
|
+
this.focus();
|
|
30734
|
+
}
|
|
30705
30735
|
isFocusOnFirstCombo() {
|
|
30706
|
-
const first = this.dialogPicker
|
|
30736
|
+
const first = this.dialogPicker?.nativeElement?.querySelector('.po-combo-first .po-combo-input');
|
|
30707
30737
|
return first === document.activeElement;
|
|
30708
30738
|
}
|
|
30709
30739
|
eventOnCalendarKeydown(event) {
|
|
@@ -30719,6 +30749,11 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30719
30749
|
this.closeCalendar(false);
|
|
30720
30750
|
}
|
|
30721
30751
|
}
|
|
30752
|
+
// Sobrescreve writeValue para sincronizar valueBeforeChange,
|
|
30753
|
+
writeValue(value) {
|
|
30754
|
+
super.writeValue(value);
|
|
30755
|
+
this.valueBeforeChange = this.getModelValue();
|
|
30756
|
+
}
|
|
30722
30757
|
// Atualiza o valor exibido no input quando o model muda externamente (writeValue)
|
|
30723
30758
|
// ou quando o locale muda em runtime.
|
|
30724
30759
|
refreshValue(value) {
|
|
@@ -30726,6 +30761,11 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30726
30761
|
return;
|
|
30727
30762
|
}
|
|
30728
30763
|
if (value && value instanceof Date && !Number.isNaN(value.getTime())) {
|
|
30764
|
+
// Atualiza o período atual com base no horário armazenado (formato 24h)
|
|
30765
|
+
if (this.is12HourFormat && this.timeValue) {
|
|
30766
|
+
const hours = Number.parseInt(this.timeValue.split(':')[0], 10);
|
|
30767
|
+
this.currentPeriod = hours >= 12 ? 'PM' : 'AM';
|
|
30768
|
+
}
|
|
30729
30769
|
this.inputEl.nativeElement.value = this.formatToDisplay(value, this.timeValue);
|
|
30730
30770
|
}
|
|
30731
30771
|
else if (!value) {
|
|
@@ -30780,8 +30820,8 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30780
30820
|
return;
|
|
30781
30821
|
}
|
|
30782
30822
|
this.date = parsedDate;
|
|
30783
|
-
// "Hoje" — hora já foi definida via p-change-time antes deste evento
|
|
30784
|
-
// Emite model completo e fecha
|
|
30823
|
+
// "Hoje" — hora já foi definida via p-change-time antes deste evento.
|
|
30824
|
+
// Emite model completo e fecha.
|
|
30785
30825
|
if (this.poCalendarService.isToday(parsedDate) && this.timeValue) {
|
|
30786
30826
|
this.controlModel();
|
|
30787
30827
|
this.refreshValue(this.date);
|
|
@@ -30789,17 +30829,33 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30789
30829
|
this.closeCalendar(true);
|
|
30790
30830
|
return;
|
|
30791
30831
|
}
|
|
30792
|
-
//
|
|
30832
|
+
// Se já existe hora preenchida, a seleção de data atualiza o model
|
|
30833
|
+
// imediatamente mas mantém o calendário aberto para possível ajuste de hora.
|
|
30834
|
+
if (this.timeValue) {
|
|
30835
|
+
this.controlModel();
|
|
30836
|
+
this.refreshValue(this.date);
|
|
30837
|
+
this.emitChangeIfDifferent(this.getModelValue());
|
|
30838
|
+
return;
|
|
30839
|
+
}
|
|
30840
|
+
// Seleção de data sem hora — apenas atualiza o display
|
|
30793
30841
|
// (aguarda seleção de hora no timer para completar)
|
|
30794
30842
|
this.refreshValue(this.date);
|
|
30795
30843
|
}
|
|
30796
30844
|
// Chamado ao clicar no botão de limpar (po-clean no input).
|
|
30797
30845
|
// Limpa data, hora, input e reseta o calendário/timer.
|
|
30798
|
-
clear() {
|
|
30846
|
+
clear(triggeredByKeyboard = false) {
|
|
30799
30847
|
this.date = undefined;
|
|
30800
30848
|
this.timeValue = '';
|
|
30849
|
+
this.currentPeriod = 'AM';
|
|
30801
30850
|
this.inputEl.nativeElement.value = '';
|
|
30802
|
-
|
|
30851
|
+
if (triggeredByKeyboard) {
|
|
30852
|
+
setTimeout(() => {
|
|
30853
|
+
this.focus();
|
|
30854
|
+
}, 200);
|
|
30855
|
+
}
|
|
30856
|
+
else {
|
|
30857
|
+
this.focus();
|
|
30858
|
+
}
|
|
30803
30859
|
this.callOnChange('');
|
|
30804
30860
|
this.emitChangeIfDifferent('');
|
|
30805
30861
|
if (this.calendarComponent) {
|
|
@@ -30887,6 +30943,11 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30887
30943
|
if (parsed) {
|
|
30888
30944
|
this.date = parsed.date;
|
|
30889
30945
|
this.timeValue = parsed.time;
|
|
30946
|
+
// Sincroniza currentPeriod com o horário parseado (formato 24h)
|
|
30947
|
+
if (this.is12HourFormat) {
|
|
30948
|
+
const hours = Number.parseInt(parsed.time.split(':')[0], 10);
|
|
30949
|
+
this.currentPeriod = hours >= 12 ? 'PM' : 'AM';
|
|
30950
|
+
}
|
|
30890
30951
|
this.controlModel();
|
|
30891
30952
|
this.syncCalendarAndTimer();
|
|
30892
30953
|
}
|
|
@@ -30950,11 +31011,10 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
30950
31011
|
}
|
|
30951
31012
|
parse12HourTime(timeStr) {
|
|
30952
31013
|
const periodMatch = /(AM|PM)$/i.exec(timeStr);
|
|
30953
|
-
|
|
30954
|
-
|
|
30955
|
-
|
|
30956
|
-
const
|
|
30957
|
-
const timeOnly = timeStr.replace(/(AM|PM)/i, '').trim();
|
|
31014
|
+
// Se o período está na string (ex: "02:30 PM"), usa-o diretamente.
|
|
31015
|
+
// Caso contrário, usa o currentPeriod do input separado.
|
|
31016
|
+
const period = periodMatch ? periodMatch[1].toUpperCase() : this.currentPeriod;
|
|
31017
|
+
const timeOnly = periodMatch ? timeStr.replace(/(AM|PM)/i, '').trim() : timeStr.trim();
|
|
30958
31018
|
const parts = timeOnly.split(':');
|
|
30959
31019
|
if (parts.length < 2) {
|
|
30960
31020
|
return null;
|
|
@@ -31018,26 +31078,36 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
31018
31078
|
}
|
|
31019
31079
|
// Sincroniza o calendário e o timer com os valores internos de date e timeValue.
|
|
31020
31080
|
syncCalendarAndTimer() {
|
|
31021
|
-
if (this.calendarComponent
|
|
31081
|
+
if (!this.calendarComponent) {
|
|
31082
|
+
return;
|
|
31083
|
+
}
|
|
31084
|
+
if (this.date) {
|
|
31022
31085
|
// Sincroniza o calendário com a data selecionada
|
|
31023
31086
|
this.calendarComponent.writeValue(this.date);
|
|
31024
31087
|
// Sincroniza o timer com o horário
|
|
31025
31088
|
if (this.calendarComponent.timerComponent && this.timeValue) {
|
|
31026
31089
|
this.calendarComponent.timerComponent.writeValue(this.timeValue);
|
|
31027
31090
|
}
|
|
31091
|
+
else if (this.calendarComponent.timerComponent) {
|
|
31092
|
+
this.calendarComponent.timerComponent.writeValue(null);
|
|
31093
|
+
}
|
|
31094
|
+
}
|
|
31095
|
+
else {
|
|
31096
|
+
// Sem data válida — reseta o calendário e o timer
|
|
31097
|
+
this.calendarComponent.writeValue(null);
|
|
31098
|
+
if (this.calendarComponent.timerComponent) {
|
|
31099
|
+
this.calendarComponent.timerComponent.writeValue(null);
|
|
31100
|
+
}
|
|
31028
31101
|
}
|
|
31029
31102
|
}
|
|
31030
31103
|
// Retorna o comprimento mínimo esperado do input (sem formatação) para considerar completo.
|
|
31031
31104
|
// Formato 24h: ddmmyyyyHHmm = 12 chars (ou 14 com segundos)
|
|
31032
|
-
// Formato 12h:
|
|
31105
|
+
// Formato 12h: ddmmyyyyHHmm = 12 chars (ou 14 com segundos) — AM/PM é sufixo fixo, não conta.
|
|
31033
31106
|
getExpectedInputLength() {
|
|
31034
31107
|
let length = 12; // ddmmyyyy + HHmm
|
|
31035
31108
|
if (this.showSeconds()) {
|
|
31036
31109
|
length += 2; // ss
|
|
31037
31110
|
}
|
|
31038
|
-
if (this.is12HourFormat) {
|
|
31039
|
-
length += 2; // AM/PM
|
|
31040
|
-
}
|
|
31041
31111
|
return length;
|
|
31042
31112
|
}
|
|
31043
31113
|
// --- Position ---
|
|
@@ -31054,7 +31124,7 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
31054
31124
|
this.dialogPicker.nativeElement.scrollWidth;
|
|
31055
31125
|
this.dialogPicker.nativeElement.style.height = scrollHeight + 'px';
|
|
31056
31126
|
this.dialogPicker.nativeElement.style.width = scrollWidth + 'px';
|
|
31057
|
-
this.controlPosition.setElements(this.dialogPicker.nativeElement, poCalendarContentOffset$1, this.
|
|
31127
|
+
this.controlPosition.setElements(this.dialogPicker.nativeElement, poCalendarContentOffset$1, this.datetimepickerField, ['top-left', 'top-right', 'bottom-left', 'bottom-right'], false, true);
|
|
31058
31128
|
this.controlPosition.adjustPosition(poCalendarPositionDefault$1);
|
|
31059
31129
|
});
|
|
31060
31130
|
}
|
|
@@ -31103,12 +31173,61 @@ class PoDatetimepickerComponent extends PoDatetimepickerBaseComponent {
|
|
|
31103
31173
|
this.onchange.emit(value);
|
|
31104
31174
|
}
|
|
31105
31175
|
}
|
|
31176
|
+
// --- Período AM/PM (input separado) ---
|
|
31177
|
+
// Chamado quando uma tecla é pressionada no input de período AM/PM.
|
|
31178
|
+
onPeriodKeydown(event) {
|
|
31179
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
31180
|
+
event.preventDefault();
|
|
31181
|
+
if (!this.isReadonly && !this.isDisabled) {
|
|
31182
|
+
this.togglePeriod();
|
|
31183
|
+
}
|
|
31184
|
+
return;
|
|
31185
|
+
}
|
|
31186
|
+
if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
31187
|
+
event.preventDefault();
|
|
31188
|
+
return;
|
|
31189
|
+
}
|
|
31190
|
+
// Shift+Tab: volta para o input principal
|
|
31191
|
+
if (event.key === 'Tab' && event.shiftKey) {
|
|
31192
|
+
event.preventDefault();
|
|
31193
|
+
this.focus();
|
|
31194
|
+
return;
|
|
31195
|
+
}
|
|
31196
|
+
// Tab: avança para o clean ou botão do calendário
|
|
31197
|
+
if (event.key === 'Tab' && !event.shiftKey) {
|
|
31198
|
+
// Permite o fluxo natural de tab (para clean/botão)
|
|
31199
|
+
return;
|
|
31200
|
+
}
|
|
31201
|
+
// Bloqueia qualquer outra digitação (o período é read-only toggle)
|
|
31202
|
+
if (event.key.length === 1) {
|
|
31203
|
+
event.preventDefault();
|
|
31204
|
+
}
|
|
31205
|
+
}
|
|
31206
|
+
// Chamado ao clicar no input de período AM/PM — alterna o período.
|
|
31207
|
+
onPeriodClick(event) {
|
|
31208
|
+
if (!this.isReadonly && !this.isDisabled) {
|
|
31209
|
+
this.togglePeriod();
|
|
31210
|
+
}
|
|
31211
|
+
}
|
|
31212
|
+
// Alterna o período entre AM e PM e atualiza o model.
|
|
31213
|
+
togglePeriod() {
|
|
31214
|
+
this.currentPeriod = this.currentPeriod === 'AM' ? 'PM' : 'AM';
|
|
31215
|
+
// Reparse o input para atualizar o model com o novo período
|
|
31216
|
+
const inputValue = this.inputEl.nativeElement.value;
|
|
31217
|
+
const minLength = this.getExpectedInputLength();
|
|
31218
|
+
if (this.objMask?.valueToModel && this.objMask.valueToModel.length >= minLength) {
|
|
31219
|
+
this.parseInputAndSync(inputValue);
|
|
31220
|
+
if (this.date && this.timeValue) {
|
|
31221
|
+
this.emitChangeIfDifferent(this.getModelValue());
|
|
31222
|
+
}
|
|
31223
|
+
}
|
|
31224
|
+
}
|
|
31106
31225
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PoDatetimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31107
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PoDatetimepickerComponent, isStandalone: false, selector: "po-datetimepicker", host: { listeners: { "keyup": "onKeyup($event)", "keydown": "onKeydown($event)" } }, providers: providers$6, viewQueries: [{ propertyName: "iconDatepicker", first: true, predicate: ["iconCalendar"], descendants: true }, { propertyName: "calendarComponent", first: true, predicate: ["calendar"], descendants: true }, { propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "iconClean", first: true, predicate: ["iconClean"], descendants: true, read: ElementRef }, { propertyName: "dialogPicker", first: true, predicate: ["dialogPicker"], descendants: true, read: ElementRef }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, ngImport: i0, template: "@let poHelper = setHelper(label());\n<po-field-container\n [class.po-date-picker-container-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label()\"\n [p-disabled]=\"isDisabled\"\n [p-optional]=\"optional()\"\n [p-required]=\"isRequired\"\n [p-show-required]=\"showRequired()\"\n [p-helper]=\"label() ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label() ? displayAdditionalHelp : undefined\"\n [p-size]=\"hostSize\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div #outerContainer>\n <div\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-field-container-content-datetimepicker\"\n >\n <div class=\"po-field-container-input\">\n <input\n #inp\n type=\"text\"\n class=\"po-input po-datetimepicker\"\n [class.po-input-icon-right]=\"isClean && inp.value && !isDisabled\"\n [class.po-datetimepicker-field-disabled]=\"isDisabled\"\n [attr.data-focused-element]=\"!isDisabled\"\n [attr.data-inactive-component]=\"isDisabled || isReadonly\"\n [attr.name]=\"name()\"\n [attr.p-size]=\"hostSize\"\n [id]=\"id\"\n [autocomplete]=\"isNoAutocomplete\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"isDisabled ? '' : placeholderValue\"\n [readonly]=\"isReadonly\"\n [required]=\"isRequired\"\n [attr.data-append-in-body]=\"appendBox()\"\n (blur)=\"eventOnBlur($event)\"\n (click)=\"eventOnClick($event)\"\n />\n @if (loading()) {\n <po-loading-icon [p-size]=\"mapSizeToIcon(hostSize)\"></po-loading-icon>\n } @else {\n <div class=\"po-field-icon-container-right\">\n @if (isClean && dateTimeInputValue && !isDisabled && !isReadonly) {\n <po-clean\n #iconClean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-icon-input\"\n p-icon=\"ICON_FILL_CLEAR_CONTENT\"\n [p-element-ref]=\"inputEl\"\n [p-size]=\"hostSize\"\n (p-change-event)=\"clear()\"\n (keydown.enter)=\"clear(); $event.preventDefault()\"\n (keydown.space)=\"clear(); $event.preventDefault()\"\n >\n </po-clean>\n <div class=\"po-button-vertical-divider\"></div>\n }\n <po-button\n #iconCalendar\n class=\"po-datetimepicker-button\"\n [class.po-button-tertiary-danger]=\"getErrorPattern()\"\n p-icon=\"ICON_CALENDAR_DOTS\"\n p-kind=\"tertiary\"\n [p-disabled]=\"isDisabled || isReadonly\"\n [p-size]=\"hostSize\"\n (p-click)=\"togglePicker(false)\"\n >\n </po-button>\n </div>\n }\n </div>\n @if ((!this.label() && poHelperComponent()) || (!this.label() && poHelper.hideAdditionalHelp)) {\n <po-helper\n #helperEl\n class=\"po-field-helper-button\"\n [p-size]=\"hostSize\"\n [p-helper]=\"poHelper.helperSettings\"\n [p-disabled]=\"isDisabled\"\n [p-append-in-body]=\"appendBox()\"\n >\n </po-helper>\n }\n </div>\n\n @if (appendBox()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"sharedCalendarContent\"></ng-container>\n </ng-template>\n } @else {\n <ng-container *ngTemplateOutlet=\"sharedCalendarContent\"></ng-container>\n }\n </div>\n\n @if (!isReadonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox()\"\n [p-help]=\"help()\"\n [p-disabled]=\"isDisabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit()\"\n [p-size]=\"hostSize\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n\n<ng-template #sharedCalendarContent>\n <div #dialogPicker [class.po-datetimepicker-popup-calendar]=\"!verifyMobile()\" tabindex=\"-1\" [hidden]=\"!visible\">\n @if (verifyMobile()) {\n <div class=\"po-datetimepicker-calendar-overlay\"></div>\n }\n <po-calendar\n #calendar\n [class.po-datetimepicker-calendar-mobile]=\"verifyMobile()\"\n p-mode=\"date-time\"\n [p-size]=\"hostSize\"\n [p-locale]=\"locale\"\n [p-format]=\"resolvedTimerFormat\"\n [p-min-date]=\"resolvedMinDate\"\n [p-max-date]=\"resolvedMaxDate\"\n [p-max-time]=\"maxTime()\"\n [p-min-time]=\"minTime()\"\n [p-minute-interval]=\"minuteInterval()\"\n [p-second-interval]=\"secondInterval()\"\n [p-show-seconds]=\"showSeconds()\"\n (p-change)=\"onDateChange($event)\"\n (p-change-time)=\"onTimeChange($event)\"\n (p-change-month-year)=\"adjustCalendarPosition()\"\n (p-timer-boundary-tab)=\"onTimerBoundaryTab($event)\"\n (keydown)=\"eventOnCalendarKeydown($event)\"\n ></po-calendar>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: PoCleanComponent, selector: "po-clean" }, { kind: "component", type: PoHelperComponent, selector: "po-helper" }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoCalendarComponent, selector: "po-calendar" }, { kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }] });
|
|
31226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PoDatetimepickerComponent, isStandalone: false, selector: "po-datetimepicker", host: { listeners: { "keyup": "onKeyup($event)", "keydown": "onKeydown($event)" } }, providers: providers$6, viewQueries: [{ propertyName: "iconDatepicker", first: true, predicate: ["iconCalendar"], descendants: true }, { propertyName: "calendarComponent", first: true, predicate: ["calendar"], descendants: true }, { propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "iconClean", first: true, predicate: ["iconClean"], descendants: true, read: ElementRef }, { propertyName: "dialogPicker", first: true, predicate: ["dialogPicker"], descendants: true, read: ElementRef }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }, { propertyName: "datetimepickerField", first: true, predicate: ["datetimepickerField"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "@let poHelper = setHelper(label());\n<po-field-container\n [class.po-date-picker-container-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label()\"\n [p-disabled]=\"isDisabled\"\n [p-optional]=\"optional()\"\n [p-required]=\"isRequired\"\n [p-show-required]=\"showRequired()\"\n [p-helper]=\"label() ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label() ? displayAdditionalHelp : undefined\"\n [p-size]=\"hostSize\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div #outerContainer>\n <div\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-field-container-content-datetimepicker\"\n >\n <div class=\"po-field-container-input\">\n <div\n #datetimepickerField\n class=\"po-datetimepicker-field po-input\"\n [class.po-input-icon-right]=\"isClean && dateTimeInputValue && !isDisabled && !isReadonly\"\n [class.po-datetimepicker-field-disabled]=\"isDisabled\"\n [class.po-datetimepicker-field-readonly]=\"isReadonly\"\n [class.po-datetimepicker-field-focused]=\"isInputFocused\"\n [attr.data-inactive-component]=\"isDisabled || isReadonly\"\n [attr.p-size]=\"hostSize\"\n (keydown)=\"onFieldClick($event)\"\n (click)=\"onFieldClick($event)\"\n >\n <div\n class=\"po-datetimepicker-field-segment\"\n [attr.data-value]=\"dateTimeInputValue || placeholderValue || ' '\"\n >\n <input\n #inp\n type=\"text\"\n class=\"po-datetimepicker-inner-input\"\n [attr.data-focused-element]=\"!isDisabled\"\n [attr.name]=\"name()\"\n [id]=\"id\"\n [autocomplete]=\"isNoAutocomplete\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"isDisabled ? '' : placeholderValue\"\n [readonly]=\"isReadonly\"\n [required]=\"isRequired\"\n [attr.data-append-in-body]=\"appendBox()\"\n (blur)=\"eventOnBlur($event)\"\n (click)=\"eventOnClick($event)\"\n (focus)=\"onInputFocus()\"\n />\n </div>\n @if (is12HourFormat && dateTimeInputValue) {\n <div\n class=\"po-datetimepicker-field-segment po-datetimepicker-field-period\"\n [attr.data-value]=\"currentPeriod\"\n >\n <input\n class=\"po-datetimepicker-segment-input po-datetimepicker-period-input\"\n type=\"text\"\n maxlength=\"2\"\n readonly\n [value]=\"currentPeriod\"\n [disabled]=\"isDisabled\"\n [attr.tabindex]=\"isDisabled || isReadonly ? -1 : 0\"\n role=\"spinbutton\"\n [attr.aria-label]=\"currentPeriod\"\n (keydown)=\"onPeriodKeydown($event)\"\n (click)=\"onPeriodClick($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onPeriodBlur()\"\n />\n </div>\n }\n @if (loading()) {\n <po-loading-icon [p-size]=\"mapSizeToIcon(hostSize)\"></po-loading-icon>\n } @else {\n <div class=\"po-field-icon-container-right\">\n @if (isClean && dateTimeInputValue && !isDisabled && !isReadonly) {\n <po-clean\n #iconClean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-icon-input\"\n p-icon=\"ICON_FILL_CLEAR_CONTENT\"\n [p-element-ref]=\"inputEl\"\n [p-size]=\"hostSize\"\n (p-change-event)=\"clear()\"\n (keydown.enter)=\"clear(true); $event.preventDefault()\"\n (keydown.space)=\"clear(true); $event.preventDefault()\"\n >\n </po-clean>\n <div class=\"po-button-vertical-divider\"></div>\n }\n <po-button\n #iconCalendar\n class=\"po-datetimepicker-button\"\n [class.po-button-tertiary-danger]=\"getErrorPattern()\"\n p-icon=\"ICON_CALENDAR_DOTS\"\n p-kind=\"tertiary\"\n [p-disabled]=\"isDisabled || isReadonly\"\n [p-size]=\"hostSize\"\n (p-click)=\"togglePicker(false)\"\n (keydown)=\"eventOnButtonKeydown($event)\"\n >\n </po-button>\n </div>\n }\n </div>\n </div>\n @if ((!this.label() && poHelperComponent()) || (!this.label() && poHelper.hideAdditionalHelp)) {\n <po-helper\n #helperEl\n class=\"po-field-helper-button\"\n [p-size]=\"hostSize\"\n [p-helper]=\"poHelper.helperSettings\"\n [p-disabled]=\"isDisabled\"\n [p-append-in-body]=\"appendBox()\"\n >\n </po-helper>\n }\n </div>\n\n @if (appendBox()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"sharedCalendarContent\"></ng-container>\n </ng-template>\n } @else {\n <ng-container *ngTemplateOutlet=\"sharedCalendarContent\"></ng-container>\n }\n </div>\n\n @if (!isReadonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox()\"\n [p-help]=\"help()\"\n [p-disabled]=\"isDisabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit()\"\n [p-size]=\"hostSize\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n\n<ng-template #sharedCalendarContent>\n <div #dialogPicker [class.po-datetimepicker-popup-calendar]=\"!verifyMobile()\" tabindex=\"-1\" [hidden]=\"!visible\">\n @if (verifyMobile()) {\n <div class=\"po-datetimepicker-calendar-overlay\"></div>\n }\n <po-calendar\n #calendar\n [class.po-datetimepicker-calendar-mobile]=\"verifyMobile()\"\n p-mode=\"date-time\"\n [p-size]=\"hostSize\"\n [p-locale]=\"locale\"\n [p-format]=\"resolvedTimerFormat\"\n [p-min-date]=\"resolvedMinDate\"\n [p-max-date]=\"resolvedMaxDate\"\n [p-max-time]=\"maxTime()\"\n [p-min-time]=\"minTime()\"\n [p-minute-interval]=\"minuteInterval()\"\n [p-second-interval]=\"secondInterval()\"\n [p-show-seconds]=\"showSeconds()\"\n (p-change)=\"onDateChange($event)\"\n (p-change-time)=\"onTimeChange($event)\"\n (p-change-month-year)=\"adjustCalendarPosition()\"\n (p-timer-boundary-tab)=\"onTimerBoundaryTab($event)\"\n (keydown)=\"eventOnCalendarKeydown($event)\"\n ></po-calendar>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: PoCleanComponent, selector: "po-clean" }, { kind: "component", type: PoHelperComponent, selector: "po-helper" }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoCalendarComponent, selector: "po-calendar" }, { kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }] });
|
|
31108
31227
|
}
|
|
31109
31228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PoDatetimepickerComponent, decorators: [{
|
|
31110
31229
|
type: Component,
|
|
31111
|
-
args: [{ selector: 'po-datetimepicker', providers: providers$6, standalone: false, template: "@let poHelper = setHelper(label());\n<po-field-container\n [class.po-date-picker-container-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label()\"\n [p-disabled]=\"isDisabled\"\n [p-optional]=\"optional()\"\n [p-required]=\"isRequired\"\n [p-show-required]=\"showRequired()\"\n [p-helper]=\"label() ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label() ? displayAdditionalHelp : undefined\"\n [p-size]=\"hostSize\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div #outerContainer>\n <div\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-field-container-content-datetimepicker\"\n >\n <div class=\"po-field-container-input\">\n <
|
|
31230
|
+
args: [{ selector: 'po-datetimepicker', providers: providers$6, standalone: false, template: "@let poHelper = setHelper(label());\n<po-field-container\n [class.po-date-picker-container-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label()\"\n [p-disabled]=\"isDisabled\"\n [p-optional]=\"optional()\"\n [p-required]=\"isRequired\"\n [p-show-required]=\"showRequired()\"\n [p-helper]=\"label() ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label() ? displayAdditionalHelp : undefined\"\n [p-size]=\"hostSize\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div #outerContainer>\n <div\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-field-container-content-datetimepicker\"\n >\n <div class=\"po-field-container-input\">\n <div\n #datetimepickerField\n class=\"po-datetimepicker-field po-input\"\n [class.po-input-icon-right]=\"isClean && dateTimeInputValue && !isDisabled && !isReadonly\"\n [class.po-datetimepicker-field-disabled]=\"isDisabled\"\n [class.po-datetimepicker-field-readonly]=\"isReadonly\"\n [class.po-datetimepicker-field-focused]=\"isInputFocused\"\n [attr.data-inactive-component]=\"isDisabled || isReadonly\"\n [attr.p-size]=\"hostSize\"\n (keydown)=\"onFieldClick($event)\"\n (click)=\"onFieldClick($event)\"\n >\n <div\n class=\"po-datetimepicker-field-segment\"\n [attr.data-value]=\"dateTimeInputValue || placeholderValue || ' '\"\n >\n <input\n #inp\n type=\"text\"\n class=\"po-datetimepicker-inner-input\"\n [attr.data-focused-element]=\"!isDisabled\"\n [attr.name]=\"name()\"\n [id]=\"id\"\n [autocomplete]=\"isNoAutocomplete\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"isDisabled ? '' : placeholderValue\"\n [readonly]=\"isReadonly\"\n [required]=\"isRequired\"\n [attr.data-append-in-body]=\"appendBox()\"\n (blur)=\"eventOnBlur($event)\"\n (click)=\"eventOnClick($event)\"\n (focus)=\"onInputFocus()\"\n />\n </div>\n @if (is12HourFormat && dateTimeInputValue) {\n <div\n class=\"po-datetimepicker-field-segment po-datetimepicker-field-period\"\n [attr.data-value]=\"currentPeriod\"\n >\n <input\n class=\"po-datetimepicker-segment-input po-datetimepicker-period-input\"\n type=\"text\"\n maxlength=\"2\"\n readonly\n [value]=\"currentPeriod\"\n [disabled]=\"isDisabled\"\n [attr.tabindex]=\"isDisabled || isReadonly ? -1 : 0\"\n role=\"spinbutton\"\n [attr.aria-label]=\"currentPeriod\"\n (keydown)=\"onPeriodKeydown($event)\"\n (click)=\"onPeriodClick($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onPeriodBlur()\"\n />\n </div>\n }\n @if (loading()) {\n <po-loading-icon [p-size]=\"mapSizeToIcon(hostSize)\"></po-loading-icon>\n } @else {\n <div class=\"po-field-icon-container-right\">\n @if (isClean && dateTimeInputValue && !isDisabled && !isReadonly) {\n <po-clean\n #iconClean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-icon-input\"\n p-icon=\"ICON_FILL_CLEAR_CONTENT\"\n [p-element-ref]=\"inputEl\"\n [p-size]=\"hostSize\"\n (p-change-event)=\"clear()\"\n (keydown.enter)=\"clear(true); $event.preventDefault()\"\n (keydown.space)=\"clear(true); $event.preventDefault()\"\n >\n </po-clean>\n <div class=\"po-button-vertical-divider\"></div>\n }\n <po-button\n #iconCalendar\n class=\"po-datetimepicker-button\"\n [class.po-button-tertiary-danger]=\"getErrorPattern()\"\n p-icon=\"ICON_CALENDAR_DOTS\"\n p-kind=\"tertiary\"\n [p-disabled]=\"isDisabled || isReadonly\"\n [p-size]=\"hostSize\"\n (p-click)=\"togglePicker(false)\"\n (keydown)=\"eventOnButtonKeydown($event)\"\n >\n </po-button>\n </div>\n }\n </div>\n </div>\n @if ((!this.label() && poHelperComponent()) || (!this.label() && poHelper.hideAdditionalHelp)) {\n <po-helper\n #helperEl\n class=\"po-field-helper-button\"\n [p-size]=\"hostSize\"\n [p-helper]=\"poHelper.helperSettings\"\n [p-disabled]=\"isDisabled\"\n [p-append-in-body]=\"appendBox()\"\n >\n </po-helper>\n }\n </div>\n\n @if (appendBox()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"sharedCalendarContent\"></ng-container>\n </ng-template>\n } @else {\n <ng-container *ngTemplateOutlet=\"sharedCalendarContent\"></ng-container>\n }\n </div>\n\n @if (!isReadonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox()\"\n [p-help]=\"help()\"\n [p-disabled]=\"isDisabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit()\"\n [p-size]=\"hostSize\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n\n<ng-template #sharedCalendarContent>\n <div #dialogPicker [class.po-datetimepicker-popup-calendar]=\"!verifyMobile()\" tabindex=\"-1\" [hidden]=\"!visible\">\n @if (verifyMobile()) {\n <div class=\"po-datetimepicker-calendar-overlay\"></div>\n }\n <po-calendar\n #calendar\n [class.po-datetimepicker-calendar-mobile]=\"verifyMobile()\"\n p-mode=\"date-time\"\n [p-size]=\"hostSize\"\n [p-locale]=\"locale\"\n [p-format]=\"resolvedTimerFormat\"\n [p-min-date]=\"resolvedMinDate\"\n [p-max-date]=\"resolvedMaxDate\"\n [p-max-time]=\"maxTime()\"\n [p-min-time]=\"minTime()\"\n [p-minute-interval]=\"minuteInterval()\"\n [p-second-interval]=\"secondInterval()\"\n [p-show-seconds]=\"showSeconds()\"\n (p-change)=\"onDateChange($event)\"\n (p-change-time)=\"onTimeChange($event)\"\n (p-change-month-year)=\"adjustCalendarPosition()\"\n (p-timer-boundary-tab)=\"onTimerBoundaryTab($event)\"\n (keydown)=\"eventOnCalendarKeydown($event)\"\n ></po-calendar>\n </div>\n</ng-template>\n" }]
|
|
31112
31231
|
}], ctorParameters: () => [], propDecorators: { iconDatepicker: [{
|
|
31113
31232
|
type: ViewChild,
|
|
31114
31233
|
args: ['iconCalendar']
|
|
@@ -31127,6 +31246,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
31127
31246
|
}], helperEl: [{
|
|
31128
31247
|
type: ViewChild,
|
|
31129
31248
|
args: ['helperEl', { read: PoHelperComponent, static: false }]
|
|
31249
|
+
}], datetimepickerField: [{
|
|
31250
|
+
type: ViewChild,
|
|
31251
|
+
args: ['datetimepickerField', { read: ElementRef, static: true }]
|
|
31130
31252
|
}], onKeyup: [{
|
|
31131
31253
|
type: HostListener,
|
|
31132
31254
|
args: ['keyup', ['$event']]
|
|
@@ -32074,7 +32196,8 @@ class PoTimepickerComponent extends PoTimepickerBaseComponent {
|
|
|
32074
32196
|
(this.timepickerFieldEl.nativeElement.contains(relatedTarget) ||
|
|
32075
32197
|
dialogEl?.contains(relatedTarget) ||
|
|
32076
32198
|
this.iconClean?.nativeElement?.contains(relatedTarget) ||
|
|
32077
|
-
this.iconTimepicker?.buttonElement?.nativeElement?.contains(relatedTarget)
|
|
32199
|
+
this.iconTimepicker?.buttonElement?.nativeElement?.contains(relatedTarget) ||
|
|
32200
|
+
relatedTarget.contains(this.el.nativeElement));
|
|
32078
32201
|
if (!isStillInsideComponent) {
|
|
32079
32202
|
this.onblur.emit();
|
|
32080
32203
|
if (this.visible) {
|
|
@@ -39664,6 +39787,42 @@ class PoTableComponent extends PoTableBaseComponent {
|
|
|
39664
39787
|
}
|
|
39665
39788
|
return this.decimalPipe.transform(value, format);
|
|
39666
39789
|
}
|
|
39790
|
+
formatWithMask(value, mask) {
|
|
39791
|
+
if (!mask || value == null || value === '') {
|
|
39792
|
+
return value ?? '';
|
|
39793
|
+
}
|
|
39794
|
+
const rawValue = String(value).replace(/[^a-zA-Z\d]/g, '');
|
|
39795
|
+
let formatted = '';
|
|
39796
|
+
let rawIndex = 0;
|
|
39797
|
+
for (let maskIndex = 0; maskIndex < mask.length && rawIndex < rawValue.length; maskIndex++) {
|
|
39798
|
+
const maskChar = mask[maskIndex];
|
|
39799
|
+
const rawChar = rawValue[rawIndex];
|
|
39800
|
+
const isValid = this.isValidMaskChar(maskChar, rawChar);
|
|
39801
|
+
if (isValid === true) {
|
|
39802
|
+
formatted += rawChar;
|
|
39803
|
+
rawIndex++;
|
|
39804
|
+
}
|
|
39805
|
+
else if (isValid === false) {
|
|
39806
|
+
break;
|
|
39807
|
+
}
|
|
39808
|
+
else {
|
|
39809
|
+
formatted += maskChar;
|
|
39810
|
+
}
|
|
39811
|
+
}
|
|
39812
|
+
return formatted;
|
|
39813
|
+
}
|
|
39814
|
+
isValidMaskChar(maskChar, rawChar) {
|
|
39815
|
+
switch (maskChar) {
|
|
39816
|
+
case '9':
|
|
39817
|
+
return /\d/.test(rawChar);
|
|
39818
|
+
case '@':
|
|
39819
|
+
return /[a-zA-Z]/.test(rawChar);
|
|
39820
|
+
case 'w':
|
|
39821
|
+
return /[a-zA-Z\d]/.test(rawChar);
|
|
39822
|
+
default:
|
|
39823
|
+
return null;
|
|
39824
|
+
}
|
|
39825
|
+
}
|
|
39667
39826
|
getCellData(row, column) {
|
|
39668
39827
|
const arrayProperty = column.property.split('.');
|
|
39669
39828
|
if (arrayProperty.length > 1) {
|
|
@@ -40073,11 +40232,11 @@ class PoTableComponent extends PoTableBaseComponent {
|
|
|
40073
40232
|
}
|
|
40074
40233
|
}
|
|
40075
40234
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PoTableComponent, deps: [{ token: PoDateService }, { token: i0.IterableDiffers }, { token: i0.Renderer2 }, { token: PoLanguageService }, { token: i0.ChangeDetectorRef }, { token: i1.DecimalPipe }, { token: PoTableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
40076
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PoTableComponent, isStandalone: false, selector: "po-table", providers: [PoDateService, PoTableService], queries: [{ propertyName: "tableRowTemplate", first: true, predicate: PoTableRowTemplateDirective, descendants: true, static: true }, { propertyName: "tableCellTemplate", first: true, predicate: PoTableCellTemplateDirective, descendants: true }, { propertyName: "tableColumnTemplates", predicate: PoTableColumnTemplateDirective }], viewQueries: [{ propertyName: "noColumnsHeader", first: true, predicate: ["noColumnsHeader"], descendants: true, read: ElementRef }, { propertyName: "poPopupComponent", first: true, predicate: ["popup"], descendants: true }, { propertyName: "modalDelete", first: true, predicate: PoModalComponent, descendants: true, static: true }, { propertyName: "tableFooterElement", first: true, predicate: ["tableFooter"], descendants: true, read: ElementRef }, { propertyName: "tableWrapperElement", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef }, { propertyName: "tableTemplate", first: true, predicate: ["tableTemplate"], descendants: true, read: ElementRef }, { propertyName: "tableVirtualScroll", first: true, predicate: ["tableVirtualScroll"], descendants: true, read: ElementRef }, { propertyName: "tableScrollable", first: true, predicate: ["tableScrollable"], descendants: true, read: ElementRef }, { propertyName: "columnManager", first: true, predicate: ["columnManager"], descendants: true, read: ElementRef }, { propertyName: "columnBatchActions", first: true, predicate: ["columnBatchActions"], descendants: true, read: ElementRef }, { propertyName: "columnActionLeft", first: true, predicate: ["columnActionLeft"], descendants: true, read: ElementRef }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "poSearchInput", first: true, predicate: ["poSearchInput"], descendants: true, read: ElementRef, static: true }, { propertyName: "viewPort", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "columnManagerTarget", first: true, predicate: ["columnManagerTarget"], descendants: true }, { propertyName: "columnManagerTargetFixed", first: true, predicate: ["columnManagerTargetFixed"], descendants: true }, { propertyName: "actionsIconElement", predicate: ["actionsIconElement"], descendants: true, read: ElementRef }, { propertyName: "actionsElement", predicate: ["actionsElement"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"po-table-actions\">\n @if (hasValidColumns && itemsSelected.length > 0 && !hideBatchActions) {\n <div #columnBatchActions class=\"po-table-actions-batch-actions\">\n <div [ngPlural]=\"itemsSelected.length\" class=\"po-table-actions-batch-actions__label\">\n <strong>\n <ng-template ngPluralCase=\"=0\">{{ literals.noItem }}</ng-template>\n <ng-template ngPluralCase=\"=1\">{{ literals.oneItem }}</ng-template>\n <ng-template ngPluralCase=\"other\">{{ itemsSelected.length }} {{ literals.multipleItems }}</ng-template>\n </strong>\n </div>\n <div class=\"po-table-actions-batch-actions__buttons\">\n <po-button\n p-icon=\"ICON_DELETE\"\n [p-danger]=\"true\"\n [p-disabled]=\"itemsSelected.length > 1 && serviceDeleteApi !== undefined\"\n [p-label]=\"literals.delete\"\n [p-size]=\"componentsSize\"\n (p-click)=\"modalDelete.open()\"\n ></po-button>\n </div>\n </div>\n }\n\n @if (hasValidColumns && !hideColumnsManager) {\n <div #columnManager class=\"po-table-actions-column-manager\">\n <po-button\n #columnManagerTarget\n p-icon=\"ICON_SETTINGS\"\n p-kind=\"tertiary\"\n p-tooltip-position=\"left\"\n [p-aria-label]=\"literals.columnsManager\"\n [p-tooltip]=\"literals.columnsManager\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onOpenColumnManager()\"\n ></po-button>\n </div>\n }\n\n @if (!hideTableSearch && hasValidColumns) {\n <div class=\"po-table-search\">\n <po-search\n [p-items]=\"items\"\n [p-filter-keys]=\"filteredColumns\"\n [p-filter-type]=\"filterType\"\n [p-size]=\"componentsSize\"\n (p-filtered-items-change)=\"onFilteredItemsChange($event)\"\n >\n </po-search>\n </div>\n }\n</div>\n@if (container) {\n <po-container p-no-padding>\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n </po-container>\n} @else {\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n}\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n</ng-template>\n\n<!-- Show More Button -->\n@if (!infiniteScroll) {\n <div\n class=\"po-row po-table-footer-show-more\"\n [class.po-invisible]=\"showMore.observers.length === 0 && !hasService\"\n #tableFooter\n >\n <po-button\n class=\"po-offset-xl-4 po-offset-lg-4 po-offset-md-3 po-lg-4 po-md-6\"\n [p-disabled]=\"showMoreDisabled\"\n [p-label]=\"literals.loadMoreData\"\n [p-loading]=\"loadingShowMore\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onShowMore()\"\n >\n </po-button>\n </div>\n}\n\n<!-- Table default-->\n<ng-template #tableTemplate>\n <table\n #tableScrollable\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n [class.po-table-header-sticky]=\"height > 0 && !virtualScroll\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [ngClass]=\"!height ? { 'no-hover': hideSelectAll, 'po-table-column-drag': this.isDraggable } : ''\"\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n [p-size]=\"componentsSize\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager) && hasMainColumns) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n @for (row of filteredItems; track trackBy(rowIndex); let rowIndex = $index) {\n <tbody class=\"po-table-group-row\">\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table ou pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n [ngClass]=\"getClassColor(row, column)\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{ getCellData(row, column) }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n }\n </table>\n</ng-template>\n\n<!-- Table with virtual scroll -->\n<ng-template #tableVirtualScrollTemplate>\n <cdk-virtual-scroll-viewport\n #tableVirtualScroll\n [itemSize]=\"itemSize\"\n [style.height.px]=\"heightTableContainer\"\n [minBufferPx]=\"heightTableContainer < 100 ? 100 : heightTableContainer\"\n [maxBufferPx]=\"heightTableContainer < 200 ? 200 : heightTableContainer\"\n >\n <table\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n class=\"po-table-header-sticky\"\n [style.top]=\"inverseOfTranslation\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column example-box\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && hasMainColumns && (hasVisibleActions || hideColumnsManager)) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n <tbody\n class=\"po-table-group-row\"\n *cdkVirtualFor=\"let row of filteredItems; let rowIndex = index; trackBy: trackBy\"\n >\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [ngClass]=\"getClassColor(row, column)\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{ getCellData(row, column) }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-size]=\"componentsSize\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if ((containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)) {\n <po-icon [p-icon]=\"row.$showDetail ? 'ICON_ARROW_UP' : 'ICON_ARROW_DOWN'\" class=\"po-clickable\"> </po-icon>\n }\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <po-radio\n [name]=\"idRadio\"\n [p-checked]=\"row.$selected\"\n [p-size]=\"componentsSize\"\n (p-change-selected)=\"selectRow(row)\"\n ></po-radio>\n</ng-template>\n\n<ng-template #inputCheckbox let-row>\n <po-checkbox\n name=\"checkbox\"\n (p-change)=\"selectable ? selectRow(row) : 'javascript:;'\"\n [p-checkboxValue]=\"row.$selected === null ? 'mixed' : row.$selected\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n</ng-template>\n\n<ng-template #contentHeaderTemplate let-column>\n <span\n #columnHeader\n class=\"po-table-header-ellipsis\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n {{ column.label || (column.property | titlecase) }}\n </span>\n\n @if (sort && column.sortable !== false) {\n <span\n [class.po-table-header-icon-unselected]=\"JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)\"\n [class.po-table-header-icon-descending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending\n \"\n [class.po-table-header-icon-ascending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending\n \"\n >\n @if (JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)) {\n <po-icon p-icon=\"ICON_SORT\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending) {\n <po-icon p-icon=\"ICON_SORT_ASC\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending) {\n <po-icon cdkDragHandle p-icon=\"ICON_SORT_DESC\"></po-icon>\n }\n </span>\n }\n</ng-template>\n\n<!-- Template de a\u00E7\u00F5es -->\n<ng-template #ActionsColumnTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if (isSingleAction) {\n <td\n class=\"po-table-column po-table-column-single-action\"\n [style.width.px]=\"height && actionRight ? getWidthColumnManager() : ''\"\n [style.max-width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n [style.width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n >\n @if (firstAction.visible !== false) {\n <div\n class=\"po-table-single-action po-clickable\"\n [class.po-table-action-disabled]=\"firstAction.disabled ? validateTableAction(row, firstAction) : false\"\n (click)=\"executeTableAction(row, firstAction)\"\n >\n @if (firstAction.icon) {\n <po-icon class=\"po-table-single-action-content\" [p-icon]=\"firstAction.icon\"></po-icon>\n }\n @if (firstAction.label) {\n <span>{{ firstAction.label }}</span>\n }\n </div>\n }\n </td>\n }\n\n @if (visibleActions.length > 1) {\n <td class=\"po-table-column-actions\">\n <div #popupTarget class=\"po-clickable\" (click)=\"togglePopup(row, popupTarget)\">\n <po-icon class=\"po-field-icon\" p-icon=\"ICON_MORE\"></po-icon>\n </div>\n </td>\n }\n</ng-template>\n\n@if (!hideColumnsManager) {\n <po-table-column-manager\n [p-columns]=\"columns\"\n [p-max-columns]=\"maxColumns\"\n [p-target]=\"columnManagerTarget\"\n [p-last-visible-columns-selected]=\"lastVisibleColumnsSelected\"\n [p-hide-action-fixed-columns]=\"hideActionFixedColumns\"\n (p-visible-columns-change)=\"onVisibleColumnsChange($event)\"\n (p-change-visible-columns)=\"onChangeVisibleColumns($event)\"\n (p-change-fixed-columns)=\"onChangeFixedColumns($event)\"\n [p-columns-default]=\"initialColumns\"\n [p-components-size]=\"componentsSize\"\n (p-initial-columns)=\"onColumnRestoreManager($event)\"\n >\n </po-table-column-manager>\n}\n\n<po-modal\n #modalDelete\n [p-components-size]=\"componentsSize\"\n [p-title]=\"literals.delete\"\n [p-primary-action]=\"confirm\"\n [p-secondary-action]=\"close\"\n [p-click-out]=\"true\"\n>\n <p class=\"po-font-text-large\">{{ literals.bodyDelete }}</p>\n</po-modal>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgPlural, selector: "[ngPlural]", inputs: ["ngPlural"] }, { kind: "directive", type: i1.NgPluralCase, selector: "[ngPluralCase]" }, { kind: "directive", type: i2$1.ɵɵCdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$1.ɵɵCdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$1.ɵɵCdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoContainerComponent, selector: "po-container" }, { kind: "component", type: PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "component", type: PoModalComponent, selector: "po-modal" }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoCheckboxComponent, selector: "po-checkbox" }, { kind: "component", type: PoRadioComponent, selector: "po-radio", inputs: ["p-value", "p-size", "p-required", "p-label-text-wrap", "p-checked"], outputs: ["p-blur", "p-change-selected"] }, { kind: "component", type: PoSearchComponent, selector: "po-search" }, { kind: "component", type: PoTableColumnIconComponent, selector: "po-table-column-icon", inputs: ["p-column", "p-row", "p-icons"] }, { kind: "component", type: PoTableColumnLabelComponent, selector: "po-table-column-label", inputs: ["p-value"] }, { kind: "component", type: PoTableColumnLinkComponent, selector: "po-table-column-link", inputs: ["p-action", "p-disabled", "p-link", "p-open-new-tab", "p-row", "p-value"] }, { kind: "component", type: PoTableColumnManagerComponent, selector: "po-table-column-manager", inputs: ["p-columns", "p-target", "p-columns-default", "p-last-visible-columns-selected", "p-hide-action-fixed-columns", "p-components-size", "p-max-columns"], outputs: ["p-visible-columns-change", "p-change-visible-columns", "p-change-fixed-columns", "p-initial-columns"] }, { kind: "component", type: PoTableDetailComponent, selector: "po-table-detail", inputs: ["p-components-size", "p-items", "p-parent-row", "p-selectable", "p-detail"], outputs: ["p-select-row"] }, { kind: "component", type: PoTableSubtitleCircleComponent, selector: "po-table-subtitle-circle", inputs: ["p-hide-title", "p-subtitle"] }, { kind: "component", type: PoTableSubtitleFooterComponent, selector: "po-table-subtitle-footer", inputs: ["p-components-size", "p-literals", "p-subtitles"] }, { kind: "directive", type: PoTableColumnFrozenDirective, selector: "[pFrozenColumn]", inputs: ["pFrozenColumn", "alignFrozen"] }, { kind: "pipe", type: i1.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: PoTimePipe, name: "po_time" }] });
|
|
40235
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PoTableComponent, isStandalone: false, selector: "po-table", providers: [PoDateService, PoTableService], queries: [{ propertyName: "tableRowTemplate", first: true, predicate: PoTableRowTemplateDirective, descendants: true, static: true }, { propertyName: "tableCellTemplate", first: true, predicate: PoTableCellTemplateDirective, descendants: true }, { propertyName: "tableColumnTemplates", predicate: PoTableColumnTemplateDirective }], viewQueries: [{ propertyName: "noColumnsHeader", first: true, predicate: ["noColumnsHeader"], descendants: true, read: ElementRef }, { propertyName: "poPopupComponent", first: true, predicate: ["popup"], descendants: true }, { propertyName: "modalDelete", first: true, predicate: PoModalComponent, descendants: true, static: true }, { propertyName: "tableFooterElement", first: true, predicate: ["tableFooter"], descendants: true, read: ElementRef }, { propertyName: "tableWrapperElement", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef }, { propertyName: "tableTemplate", first: true, predicate: ["tableTemplate"], descendants: true, read: ElementRef }, { propertyName: "tableVirtualScroll", first: true, predicate: ["tableVirtualScroll"], descendants: true, read: ElementRef }, { propertyName: "tableScrollable", first: true, predicate: ["tableScrollable"], descendants: true, read: ElementRef }, { propertyName: "columnManager", first: true, predicate: ["columnManager"], descendants: true, read: ElementRef }, { propertyName: "columnBatchActions", first: true, predicate: ["columnBatchActions"], descendants: true, read: ElementRef }, { propertyName: "columnActionLeft", first: true, predicate: ["columnActionLeft"], descendants: true, read: ElementRef }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "poSearchInput", first: true, predicate: ["poSearchInput"], descendants: true, read: ElementRef, static: true }, { propertyName: "viewPort", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "columnManagerTarget", first: true, predicate: ["columnManagerTarget"], descendants: true }, { propertyName: "columnManagerTargetFixed", first: true, predicate: ["columnManagerTargetFixed"], descendants: true }, { propertyName: "actionsIconElement", predicate: ["actionsIconElement"], descendants: true, read: ElementRef }, { propertyName: "actionsElement", predicate: ["actionsElement"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"po-table-actions\">\n @if (hasValidColumns && itemsSelected.length > 0 && !hideBatchActions) {\n <div #columnBatchActions class=\"po-table-actions-batch-actions\">\n <div [ngPlural]=\"itemsSelected.length\" class=\"po-table-actions-batch-actions__label\">\n <strong>\n <ng-template ngPluralCase=\"=0\">{{ literals.noItem }}</ng-template>\n <ng-template ngPluralCase=\"=1\">{{ literals.oneItem }}</ng-template>\n <ng-template ngPluralCase=\"other\">{{ itemsSelected.length }} {{ literals.multipleItems }}</ng-template>\n </strong>\n </div>\n <div class=\"po-table-actions-batch-actions__buttons\">\n <po-button\n p-icon=\"ICON_DELETE\"\n [p-danger]=\"true\"\n [p-disabled]=\"itemsSelected.length > 1 && serviceDeleteApi !== undefined\"\n [p-label]=\"literals.delete\"\n [p-size]=\"componentsSize\"\n (p-click)=\"modalDelete.open()\"\n ></po-button>\n </div>\n </div>\n }\n\n @if (hasValidColumns && !hideColumnsManager) {\n <div #columnManager class=\"po-table-actions-column-manager\">\n <po-button\n #columnManagerTarget\n p-icon=\"ICON_SETTINGS\"\n p-kind=\"tertiary\"\n p-tooltip-position=\"left\"\n [p-aria-label]=\"literals.columnsManager\"\n [p-tooltip]=\"literals.columnsManager\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onOpenColumnManager()\"\n ></po-button>\n </div>\n }\n\n @if (!hideTableSearch && hasValidColumns) {\n <div class=\"po-table-search\">\n <po-search\n [p-items]=\"items\"\n [p-filter-keys]=\"filteredColumns\"\n [p-filter-type]=\"filterType\"\n [p-size]=\"componentsSize\"\n (p-filtered-items-change)=\"onFilteredItemsChange($event)\"\n >\n </po-search>\n </div>\n }\n</div>\n@if (container) {\n <po-container p-no-padding>\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n </po-container>\n} @else {\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n}\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n</ng-template>\n\n<!-- Show More Button -->\n@if (!infiniteScroll) {\n <div\n class=\"po-row po-table-footer-show-more\"\n [class.po-invisible]=\"showMore.observers.length === 0 && !hasService\"\n #tableFooter\n >\n <po-button\n class=\"po-offset-xl-4 po-offset-lg-4 po-offset-md-3 po-lg-4 po-md-6\"\n [p-disabled]=\"showMoreDisabled\"\n [p-label]=\"literals.loadMoreData\"\n [p-loading]=\"loadingShowMore\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onShowMore()\"\n >\n </po-button>\n </div>\n}\n\n<!-- Table default-->\n<ng-template #tableTemplate>\n <table\n #tableScrollable\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n [class.po-table-header-sticky]=\"height > 0 && !virtualScroll\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [ngClass]=\"!height ? { 'no-hover': hideSelectAll, 'po-table-column-drag': this.isDraggable } : ''\"\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n [p-size]=\"componentsSize\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager) && hasMainColumns) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n @for (row of filteredItems; track trackBy(rowIndex); let rowIndex = $index) {\n <tbody class=\"po-table-group-row\">\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table ou pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n [ngClass]=\"getClassColor(row, column)\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{\n column.mask ? formatWithMask(getCellData(row, column), column.mask) : getCellData(row, column)\n }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n }\n </table>\n</ng-template>\n\n<!-- Table with virtual scroll -->\n<ng-template #tableVirtualScrollTemplate>\n <cdk-virtual-scroll-viewport\n #tableVirtualScroll\n [itemSize]=\"itemSize\"\n [style.height.px]=\"heightTableContainer\"\n [minBufferPx]=\"heightTableContainer < 100 ? 100 : heightTableContainer\"\n [maxBufferPx]=\"heightTableContainer < 200 ? 200 : heightTableContainer\"\n >\n <table\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n class=\"po-table-header-sticky\"\n [style.top]=\"inverseOfTranslation\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column example-box\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && hasMainColumns && (hasVisibleActions || hideColumnsManager)) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n <tbody\n class=\"po-table-group-row\"\n *cdkVirtualFor=\"let row of filteredItems; let rowIndex = index; trackBy: trackBy\"\n >\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [ngClass]=\"getClassColor(row, column)\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{\n column.mask ? formatWithMask(getCellData(row, column), column.mask) : getCellData(row, column)\n }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-size]=\"componentsSize\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if ((containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)) {\n <po-icon [p-icon]=\"row.$showDetail ? 'ICON_ARROW_UP' : 'ICON_ARROW_DOWN'\" class=\"po-clickable\"> </po-icon>\n }\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <po-radio\n [name]=\"idRadio\"\n [p-checked]=\"row.$selected\"\n [p-size]=\"componentsSize\"\n (p-change-selected)=\"selectRow(row)\"\n ></po-radio>\n</ng-template>\n\n<ng-template #inputCheckbox let-row>\n <po-checkbox\n name=\"checkbox\"\n (p-change)=\"selectable ? selectRow(row) : 'javascript:;'\"\n [p-checkboxValue]=\"row.$selected === null ? 'mixed' : row.$selected\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n</ng-template>\n\n<ng-template #contentHeaderTemplate let-column>\n <span\n #columnHeader\n class=\"po-table-header-ellipsis\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n {{ column.label || (column.property | titlecase) }}\n </span>\n\n @if (sort && column.sortable !== false) {\n <span\n [class.po-table-header-icon-unselected]=\"JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)\"\n [class.po-table-header-icon-descending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending\n \"\n [class.po-table-header-icon-ascending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending\n \"\n >\n @if (JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)) {\n <po-icon p-icon=\"ICON_SORT\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending) {\n <po-icon p-icon=\"ICON_SORT_ASC\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending) {\n <po-icon cdkDragHandle p-icon=\"ICON_SORT_DESC\"></po-icon>\n }\n </span>\n }\n</ng-template>\n\n<!-- Template de a\u00E7\u00F5es -->\n<ng-template #ActionsColumnTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if (isSingleAction) {\n <td\n class=\"po-table-column po-table-column-single-action\"\n [style.width.px]=\"height && actionRight ? getWidthColumnManager() : ''\"\n [style.max-width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n [style.width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n >\n @if (firstAction.visible !== false) {\n <div\n class=\"po-table-single-action po-clickable\"\n [class.po-table-action-disabled]=\"firstAction.disabled ? validateTableAction(row, firstAction) : false\"\n (click)=\"executeTableAction(row, firstAction)\"\n >\n @if (firstAction.icon) {\n <po-icon class=\"po-table-single-action-content\" [p-icon]=\"firstAction.icon\"></po-icon>\n }\n @if (firstAction.label) {\n <span>{{ firstAction.label }}</span>\n }\n </div>\n }\n </td>\n }\n\n @if (visibleActions.length > 1) {\n <td class=\"po-table-column-actions\">\n <div #popupTarget class=\"po-clickable\" (click)=\"togglePopup(row, popupTarget)\">\n <po-icon class=\"po-field-icon\" p-icon=\"ICON_MORE\"></po-icon>\n </div>\n </td>\n }\n</ng-template>\n\n@if (!hideColumnsManager) {\n <po-table-column-manager\n [p-columns]=\"columns\"\n [p-max-columns]=\"maxColumns\"\n [p-target]=\"columnManagerTarget\"\n [p-last-visible-columns-selected]=\"lastVisibleColumnsSelected\"\n [p-hide-action-fixed-columns]=\"hideActionFixedColumns\"\n (p-visible-columns-change)=\"onVisibleColumnsChange($event)\"\n (p-change-visible-columns)=\"onChangeVisibleColumns($event)\"\n (p-change-fixed-columns)=\"onChangeFixedColumns($event)\"\n [p-columns-default]=\"initialColumns\"\n [p-components-size]=\"componentsSize\"\n (p-initial-columns)=\"onColumnRestoreManager($event)\"\n >\n </po-table-column-manager>\n}\n\n<po-modal\n #modalDelete\n [p-components-size]=\"componentsSize\"\n [p-title]=\"literals.delete\"\n [p-primary-action]=\"confirm\"\n [p-secondary-action]=\"close\"\n [p-click-out]=\"true\"\n>\n <p class=\"po-font-text-large\">{{ literals.bodyDelete }}</p>\n</po-modal>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgPlural, selector: "[ngPlural]", inputs: ["ngPlural"] }, { kind: "directive", type: i1.NgPluralCase, selector: "[ngPluralCase]" }, { kind: "directive", type: i2$1.ɵɵCdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$1.ɵɵCdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$1.ɵɵCdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoContainerComponent, selector: "po-container" }, { kind: "component", type: PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "component", type: PoModalComponent, selector: "po-modal" }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoCheckboxComponent, selector: "po-checkbox" }, { kind: "component", type: PoRadioComponent, selector: "po-radio", inputs: ["p-value", "p-size", "p-required", "p-label-text-wrap", "p-checked"], outputs: ["p-blur", "p-change-selected"] }, { kind: "component", type: PoSearchComponent, selector: "po-search" }, { kind: "component", type: PoTableColumnIconComponent, selector: "po-table-column-icon", inputs: ["p-column", "p-row", "p-icons"] }, { kind: "component", type: PoTableColumnLabelComponent, selector: "po-table-column-label", inputs: ["p-value"] }, { kind: "component", type: PoTableColumnLinkComponent, selector: "po-table-column-link", inputs: ["p-action", "p-disabled", "p-link", "p-open-new-tab", "p-row", "p-value"] }, { kind: "component", type: PoTableColumnManagerComponent, selector: "po-table-column-manager", inputs: ["p-columns", "p-target", "p-columns-default", "p-last-visible-columns-selected", "p-hide-action-fixed-columns", "p-components-size", "p-max-columns"], outputs: ["p-visible-columns-change", "p-change-visible-columns", "p-change-fixed-columns", "p-initial-columns"] }, { kind: "component", type: PoTableDetailComponent, selector: "po-table-detail", inputs: ["p-components-size", "p-items", "p-parent-row", "p-selectable", "p-detail"], outputs: ["p-select-row"] }, { kind: "component", type: PoTableSubtitleCircleComponent, selector: "po-table-subtitle-circle", inputs: ["p-hide-title", "p-subtitle"] }, { kind: "component", type: PoTableSubtitleFooterComponent, selector: "po-table-subtitle-footer", inputs: ["p-components-size", "p-literals", "p-subtitles"] }, { kind: "directive", type: PoTableColumnFrozenDirective, selector: "[pFrozenColumn]", inputs: ["pFrozenColumn", "alignFrozen"] }, { kind: "pipe", type: i1.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: PoTimePipe, name: "po_time" }] });
|
|
40077
40236
|
}
|
|
40078
40237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PoTableComponent, decorators: [{
|
|
40079
40238
|
type: Component,
|
|
40080
|
-
args: [{ selector: 'po-table', providers: [PoDateService, PoTableService], standalone: false, template: "<div class=\"po-table-actions\">\n @if (hasValidColumns && itemsSelected.length > 0 && !hideBatchActions) {\n <div #columnBatchActions class=\"po-table-actions-batch-actions\">\n <div [ngPlural]=\"itemsSelected.length\" class=\"po-table-actions-batch-actions__label\">\n <strong>\n <ng-template ngPluralCase=\"=0\">{{ literals.noItem }}</ng-template>\n <ng-template ngPluralCase=\"=1\">{{ literals.oneItem }}</ng-template>\n <ng-template ngPluralCase=\"other\">{{ itemsSelected.length }} {{ literals.multipleItems }}</ng-template>\n </strong>\n </div>\n <div class=\"po-table-actions-batch-actions__buttons\">\n <po-button\n p-icon=\"ICON_DELETE\"\n [p-danger]=\"true\"\n [p-disabled]=\"itemsSelected.length > 1 && serviceDeleteApi !== undefined\"\n [p-label]=\"literals.delete\"\n [p-size]=\"componentsSize\"\n (p-click)=\"modalDelete.open()\"\n ></po-button>\n </div>\n </div>\n }\n\n @if (hasValidColumns && !hideColumnsManager) {\n <div #columnManager class=\"po-table-actions-column-manager\">\n <po-button\n #columnManagerTarget\n p-icon=\"ICON_SETTINGS\"\n p-kind=\"tertiary\"\n p-tooltip-position=\"left\"\n [p-aria-label]=\"literals.columnsManager\"\n [p-tooltip]=\"literals.columnsManager\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onOpenColumnManager()\"\n ></po-button>\n </div>\n }\n\n @if (!hideTableSearch && hasValidColumns) {\n <div class=\"po-table-search\">\n <po-search\n [p-items]=\"items\"\n [p-filter-keys]=\"filteredColumns\"\n [p-filter-type]=\"filterType\"\n [p-size]=\"componentsSize\"\n (p-filtered-items-change)=\"onFilteredItemsChange($event)\"\n >\n </po-search>\n </div>\n }\n</div>\n@if (container) {\n <po-container p-no-padding>\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n </po-container>\n} @else {\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n}\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n</ng-template>\n\n<!-- Show More Button -->\n@if (!infiniteScroll) {\n <div\n class=\"po-row po-table-footer-show-more\"\n [class.po-invisible]=\"showMore.observers.length === 0 && !hasService\"\n #tableFooter\n >\n <po-button\n class=\"po-offset-xl-4 po-offset-lg-4 po-offset-md-3 po-lg-4 po-md-6\"\n [p-disabled]=\"showMoreDisabled\"\n [p-label]=\"literals.loadMoreData\"\n [p-loading]=\"loadingShowMore\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onShowMore()\"\n >\n </po-button>\n </div>\n}\n\n<!-- Table default-->\n<ng-template #tableTemplate>\n <table\n #tableScrollable\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n [class.po-table-header-sticky]=\"height > 0 && !virtualScroll\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [ngClass]=\"!height ? { 'no-hover': hideSelectAll, 'po-table-column-drag': this.isDraggable } : ''\"\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n [p-size]=\"componentsSize\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager) && hasMainColumns) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n @for (row of filteredItems; track trackBy(rowIndex); let rowIndex = $index) {\n <tbody class=\"po-table-group-row\">\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table ou pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n [ngClass]=\"getClassColor(row, column)\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{ getCellData(row, column) }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n }\n </table>\n</ng-template>\n\n<!-- Table with virtual scroll -->\n<ng-template #tableVirtualScrollTemplate>\n <cdk-virtual-scroll-viewport\n #tableVirtualScroll\n [itemSize]=\"itemSize\"\n [style.height.px]=\"heightTableContainer\"\n [minBufferPx]=\"heightTableContainer < 100 ? 100 : heightTableContainer\"\n [maxBufferPx]=\"heightTableContainer < 200 ? 200 : heightTableContainer\"\n >\n <table\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n class=\"po-table-header-sticky\"\n [style.top]=\"inverseOfTranslation\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column example-box\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && hasMainColumns && (hasVisibleActions || hideColumnsManager)) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n <tbody\n class=\"po-table-group-row\"\n *cdkVirtualFor=\"let row of filteredItems; let rowIndex = index; trackBy: trackBy\"\n >\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [ngClass]=\"getClassColor(row, column)\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{ getCellData(row, column) }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-size]=\"componentsSize\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if ((containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)) {\n <po-icon [p-icon]=\"row.$showDetail ? 'ICON_ARROW_UP' : 'ICON_ARROW_DOWN'\" class=\"po-clickable\"> </po-icon>\n }\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <po-radio\n [name]=\"idRadio\"\n [p-checked]=\"row.$selected\"\n [p-size]=\"componentsSize\"\n (p-change-selected)=\"selectRow(row)\"\n ></po-radio>\n</ng-template>\n\n<ng-template #inputCheckbox let-row>\n <po-checkbox\n name=\"checkbox\"\n (p-change)=\"selectable ? selectRow(row) : 'javascript:;'\"\n [p-checkboxValue]=\"row.$selected === null ? 'mixed' : row.$selected\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n</ng-template>\n\n<ng-template #contentHeaderTemplate let-column>\n <span\n #columnHeader\n class=\"po-table-header-ellipsis\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n {{ column.label || (column.property | titlecase) }}\n </span>\n\n @if (sort && column.sortable !== false) {\n <span\n [class.po-table-header-icon-unselected]=\"JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)\"\n [class.po-table-header-icon-descending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending\n \"\n [class.po-table-header-icon-ascending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending\n \"\n >\n @if (JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)) {\n <po-icon p-icon=\"ICON_SORT\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending) {\n <po-icon p-icon=\"ICON_SORT_ASC\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending) {\n <po-icon cdkDragHandle p-icon=\"ICON_SORT_DESC\"></po-icon>\n }\n </span>\n }\n</ng-template>\n\n<!-- Template de a\u00E7\u00F5es -->\n<ng-template #ActionsColumnTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if (isSingleAction) {\n <td\n class=\"po-table-column po-table-column-single-action\"\n [style.width.px]=\"height && actionRight ? getWidthColumnManager() : ''\"\n [style.max-width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n [style.width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n >\n @if (firstAction.visible !== false) {\n <div\n class=\"po-table-single-action po-clickable\"\n [class.po-table-action-disabled]=\"firstAction.disabled ? validateTableAction(row, firstAction) : false\"\n (click)=\"executeTableAction(row, firstAction)\"\n >\n @if (firstAction.icon) {\n <po-icon class=\"po-table-single-action-content\" [p-icon]=\"firstAction.icon\"></po-icon>\n }\n @if (firstAction.label) {\n <span>{{ firstAction.label }}</span>\n }\n </div>\n }\n </td>\n }\n\n @if (visibleActions.length > 1) {\n <td class=\"po-table-column-actions\">\n <div #popupTarget class=\"po-clickable\" (click)=\"togglePopup(row, popupTarget)\">\n <po-icon class=\"po-field-icon\" p-icon=\"ICON_MORE\"></po-icon>\n </div>\n </td>\n }\n</ng-template>\n\n@if (!hideColumnsManager) {\n <po-table-column-manager\n [p-columns]=\"columns\"\n [p-max-columns]=\"maxColumns\"\n [p-target]=\"columnManagerTarget\"\n [p-last-visible-columns-selected]=\"lastVisibleColumnsSelected\"\n [p-hide-action-fixed-columns]=\"hideActionFixedColumns\"\n (p-visible-columns-change)=\"onVisibleColumnsChange($event)\"\n (p-change-visible-columns)=\"onChangeVisibleColumns($event)\"\n (p-change-fixed-columns)=\"onChangeFixedColumns($event)\"\n [p-columns-default]=\"initialColumns\"\n [p-components-size]=\"componentsSize\"\n (p-initial-columns)=\"onColumnRestoreManager($event)\"\n >\n </po-table-column-manager>\n}\n\n<po-modal\n #modalDelete\n [p-components-size]=\"componentsSize\"\n [p-title]=\"literals.delete\"\n [p-primary-action]=\"confirm\"\n [p-secondary-action]=\"close\"\n [p-click-out]=\"true\"\n>\n <p class=\"po-font-text-large\">{{ literals.bodyDelete }}</p>\n</po-modal>\n" }]
|
|
40239
|
+
args: [{ selector: 'po-table', providers: [PoDateService, PoTableService], standalone: false, template: "<div class=\"po-table-actions\">\n @if (hasValidColumns && itemsSelected.length > 0 && !hideBatchActions) {\n <div #columnBatchActions class=\"po-table-actions-batch-actions\">\n <div [ngPlural]=\"itemsSelected.length\" class=\"po-table-actions-batch-actions__label\">\n <strong>\n <ng-template ngPluralCase=\"=0\">{{ literals.noItem }}</ng-template>\n <ng-template ngPluralCase=\"=1\">{{ literals.oneItem }}</ng-template>\n <ng-template ngPluralCase=\"other\">{{ itemsSelected.length }} {{ literals.multipleItems }}</ng-template>\n </strong>\n </div>\n <div class=\"po-table-actions-batch-actions__buttons\">\n <po-button\n p-icon=\"ICON_DELETE\"\n [p-danger]=\"true\"\n [p-disabled]=\"itemsSelected.length > 1 && serviceDeleteApi !== undefined\"\n [p-label]=\"literals.delete\"\n [p-size]=\"componentsSize\"\n (p-click)=\"modalDelete.open()\"\n ></po-button>\n </div>\n </div>\n }\n\n @if (hasValidColumns && !hideColumnsManager) {\n <div #columnManager class=\"po-table-actions-column-manager\">\n <po-button\n #columnManagerTarget\n p-icon=\"ICON_SETTINGS\"\n p-kind=\"tertiary\"\n p-tooltip-position=\"left\"\n [p-aria-label]=\"literals.columnsManager\"\n [p-tooltip]=\"literals.columnsManager\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onOpenColumnManager()\"\n ></po-button>\n </div>\n }\n\n @if (!hideTableSearch && hasValidColumns) {\n <div class=\"po-table-search\">\n <po-search\n [p-items]=\"items\"\n [p-filter-keys]=\"filteredColumns\"\n [p-filter-type]=\"filterType\"\n [p-size]=\"componentsSize\"\n (p-filtered-items-change)=\"onFilteredItemsChange($event)\"\n >\n </po-search>\n </div>\n }\n</div>\n@if (container) {\n <po-container p-no-padding>\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n </po-container>\n} @else {\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n}\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-sticky]=\"loading\">\n @if (loading) {\n <po-loading-overlay [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\n }\n <div class=\"po-table-main-container\">\n <div\n #tableWrapper\n class=\"po-table-wrapper\"\n [class.po-table-header-fixed-columns-pixels]=\"allColumnsWidthPixels\"\n [style.opacity]=\"tableOpacity\"\n >\n @if (height) {\n <div class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody [class.po-table-container-fixed-inner]=\"virtualScroll\">\n @if (virtualScroll) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n }\n @if (!virtualScroll) {\n <div class=\"po-table-container-overflow\" [style.height.px]=\"heightTableContainer\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n }\n\n @if (!height) {\n <div>\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (hasFooter) {\n <div class=\"po-table-footer\">\n @for (column of subtitleColumns; track trackBy($index)) {\n <po-table-subtitle-footer\n [p-components-size]=\"componentsSize\"\n [p-literals]=\"literals\"\n [p-subtitles]=\"column.subtitles\"\n >\n </po-table-subtitle-footer>\n }\n </div>\n }\n</ng-template>\n\n<!-- Show More Button -->\n@if (!infiniteScroll) {\n <div\n class=\"po-row po-table-footer-show-more\"\n [class.po-invisible]=\"showMore.observers.length === 0 && !hasService\"\n #tableFooter\n >\n <po-button\n class=\"po-offset-xl-4 po-offset-lg-4 po-offset-md-3 po-lg-4 po-md-6\"\n [p-disabled]=\"showMoreDisabled\"\n [p-label]=\"literals.loadMoreData\"\n [p-loading]=\"loadingShowMore\"\n [p-size]=\"componentsSize\"\n (p-click)=\"onShowMore()\"\n >\n </po-button>\n </div>\n}\n\n<!-- Table default-->\n<ng-template #tableTemplate>\n <table\n #tableScrollable\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n [class.po-table-header-sticky]=\"height > 0 && !virtualScroll\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [ngClass]=\"!height ? { 'no-hover': hideSelectAll, 'po-table-column-drag': this.isDraggable } : ''\"\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n [p-size]=\"componentsSize\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{\n 'width':\n height > 0 && !virtualScroll ? (!hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto') : ''\n }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager) && hasMainColumns) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n @for (row of filteredItems; track trackBy(rowIndex); let rowIndex = $index) {\n <tbody class=\"po-table-group-row\">\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table ou pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n [ngClass]=\"getClassColor(row, column)\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{\n column.mask ? formatWithMask(getCellData(row, column), column.mask) : getCellData(row, column)\n }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n }\n </table>\n</ng-template>\n\n<!-- Table with virtual scroll -->\n<ng-template #tableVirtualScrollTemplate>\n <cdk-virtual-scroll-viewport\n #tableVirtualScroll\n [itemSize]=\"itemSize\"\n [style.height.px]=\"heightTableContainer\"\n [minBufferPx]=\"heightTableContainer < 100 ? 100 : heightTableContainer\"\n [maxBufferPx]=\"heightTableContainer < 200 ? 200 : heightTableContainer\"\n >\n <table\n class=\"po-table\"\n [ngClass]=\"{\n 'po-table-interactive': selectable || sort,\n 'po-table-selectable': selectable,\n 'po-table-striped': striped,\n 'po-table-data-fixed-columns': applyFixedColumns(),\n 'po-table-text-wrap-enabled': textWrap\n }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead\n class=\"po-table-header-sticky\"\n [style.top]=\"inverseOfTranslation\"\n [attr.p-spacing]=\"spacing ?? (componentsSize === 'small' ? 'extraSmall' : 'medium')\"\n >\n <tr\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (hasSelectableColumn) {\n <th [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\" class=\"po-table-column-selectable\">\n <div [class.po-table-header-fixed-inner]=\"height\">\n @if (!hideSelectAll) {\n <po-checkbox\n name=\"selectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n }\n </div>\n </th>\n }\n\n @if ((hasMasterDetailColumn || hasRowTemplate) && hasMainColumns && !hasRowTemplateWithArrowDirectionRight) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n @if (!actionRight && hasItems && hasMainColumns && (visibleActions.length > 1 || isSingleAction)) {\n <th\n #columnActionLeft\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n }\n\n @if (!hasMainColumns) {\n <th #noColumnsHeader class=\"po-table-header-column po-text-center\" [attr.colspan]=\"columnCount\">\n @if (height) {\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"hasValidColumns ? headerWidth : null\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n } @else {\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n }\n </th>\n }\n\n @if (this.isDraggable || hasSomeFixed()) {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n [class.po-table-column-drag-box]=\"this.isDraggable\"\n (click)=\"sortColumn(column)\"\n cdkDrag\n cdkDragLockAxis=\"x\"\n [cdkDragDisabled]=\"column.fixed ? 'true' : 'false'\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n @if (this.isDraggable && !column.fixed) {\n <po-icon cdkDragHandle p-icon=\"ICON_DRAG\"></po-icon>\n }\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n } @else {\n @for (column of mainColumns; track trackBy(i); let i = $index) {\n <th\n class=\"po-table-header-ellipsis p-element po-frozen-column example-box\"\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [attr.data-po-table-column-name]=\"column.label || (column.property | titlecase) | lowercase\"\n [class.po-clickable]=\"(sort && column.sortable !== false) || hasService\"\n [ngClass]=\"{\n 'po-table-header-sorted':\n sort &&\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) &&\n (sortedColumn.ascending || !sortedColumn.ascending)\n }\"\n [ngStyle]=\"{ 'width': !hasItems ? '100%' : applyFixedColumns() ? column.width : 'auto' }\"\n [class.po-table-header-subtitle]=\"column.type === 'subtitle'\"\n (click)=\"sortColumn(column)\"\n [pFrozenColumn]=\"column.fixed\"\n >\n <div\n class=\"po-table-header-flex\"\n [class.po-table-header-fixed-inner]=\"height\"\n [class.po-table-header-flex-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-header-flex-center]=\"column.type === 'subtitle'\"\n >\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\">\n </ng-container>\n </div>\n </th>\n }\n }\n\n @if (hasRowTemplateWithArrowDirectionRight && hasMainColumns && (hasVisibleActions || hideColumnsManager)) {\n <th class=\"po-table-header-column po-table-header-master-detail\"></th>\n }\n\n @if (\n hasVisibleActions &&\n actionRight &&\n hasItems &&\n hasMainColumns &&\n (visibleActions.length > 1 || isSingleAction)\n ) {\n <th\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n }\n </tr>\n </thead>\n\n @if (!hasItems || !hasMainColumns) {\n <tbody class=\"po-table-group-row\">\n <tr class=\"po-table-row po-table-row-no-data\">\n <td [colSpan]=\"columnCount\" class=\"po-table-no-data po-text-center\">\n <span> {{ literals.noData }} </span>\n </td>\n </tr>\n </tbody>\n }\n\n @if (hasMainColumns) {\n <tbody\n class=\"po-table-group-row\"\n *cdkVirtualFor=\"let row of filteredItems; let rowIndex = index; trackBy: trackBy\"\n >\n <tr\n class=\"po-table-row\"\n [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\"\n >\n @if (selectable) {\n <td class=\"po-table-column-selectable\">\n <ng-container\n *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\"\n >\n </ng-container>\n </td>\n }\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table pela diretiva -->\n @if (\n (columnMasterDetail && !hideDetail && !hasRowTemplate) ||\n (hasRowTemplate && !hasRowTemplateWithArrowDirectionRight)\n ) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna com as a\u00E7\u00F5es na esquerda (padr\u00E3o)-->\n @if (!actionRight && (visibleActions.length > 1 || isSingleAction)) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n @for (column of mainColumns; track trackBy(columnIndex); let columnIndex = $index) {\n <td\n [style.width]=\"column.width\"\n [style.max-width]=\"column.width\"\n [style.min-width]=\"column.width\"\n [class.po-table-column]=\"column.type !== 'icon'\"\n [class.po-table-column-right]=\"column.type === 'currency' || column.type === 'number'\"\n [class.po-table-column-center]=\"column.type === 'subtitle'\"\n [class.po-table-column-icons]=\"column.type === 'icon'\"\n [ngClass]=\"getClassColor(row, column)\"\n [pFrozenColumn]=\"column.fixed\"\n class=\"p-element po-frozen-column\"\n (click)=\"hasSelectableRow() ? selectRow(row) : 'javascript:;'\"\n >\n <div\n class=\"po-table-column-cell po-table-body-ellipsis notranslate\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n @switch (column.type) {\n @case ('columnTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n }\n @case ('cellTemplate') {\n <span>\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n }\n @case ('boolean') {\n <span>\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n }\n @case ('currency') {\n <span>\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n }\n @case ('date') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n }\n @case ('time') {\n <span>\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n }\n @case ('dateTime') {\n <span>\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n }\n @case ('number') {\n <span>\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n }\n @case ('link') {\n <po-table-column-link\n [p-action]=\"column.action\"\n [p-disabled]=\"checkDisabled(row, column)\"\n [p-link]=\"row[column.link]\"\n [p-row]=\"row\"\n [p-value]=\"getCellData(row, column)\"\n (click)=\"onClickLink($event, row, column)\"\n >\n </po-table-column-link>\n }\n @case ('icon') {\n <po-table-column-icon [p-column]=\"column\" [p-icons]=\"getColumnIcons(row, column)\" [p-row]=\"row\">\n </po-table-column-icon>\n }\n @case ('subtitle') {\n <span>\n <po-table-subtitle-circle\n [p-subtitle]=\"getSubtitleColumn(row, column)\"\n ></po-table-subtitle-circle>\n </span>\n }\n @case ('label') {\n <span>\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n }\n @default {\n <span>{{\n column.mask ? formatWithMask(getCellData(row, column), column.mask) : getCellData(row, column)\n }}</span>\n }\n }\n </div>\n </td>\n }\n @if (hasRowTemplateWithArrowDirectionRight) {\n <td class=\"po-table-column-detail-toggle\" (click)=\"toggleDetail(row)\">\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n }\n <!-- Coluna de a\u00E7oes na direita -->\n @if (actionRight) {\n <ng-template\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n }\n </tr>\n @if (hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)) {\n <tr>\n <td class=\"po-table-row-template-container\" [colSpan]=\"columnCountForMasterDetail\">\n <ng-template\n [ngTemplateOutlet]=\"tableRowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n </tr>\n }\n @if (hasMainColumns && isShowMasterDetail(row)) {\n <tr>\n <td class=\"po-table-column-detail\" [colSpan]=\"columnCountForMasterDetail\">\n <po-table-detail\n [p-selectable]=\"selectable && !detailHideSelect\"\n [p-detail]=\"columnMasterDetail.detail\"\n [p-items]=\"row[nameColumnDetail]\"\n [p-parent-row]=\"row\"\n [p-components-size]=\"componentsSize\"\n (p-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n }\n </tbody>\n }\n </table>\n </cdk-virtual-scroll-viewport>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-size]=\"componentsSize\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if ((containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)) {\n <po-icon [p-icon]=\"row.$showDetail ? 'ICON_ARROW_UP' : 'ICON_ARROW_DOWN'\" class=\"po-clickable\"> </po-icon>\n }\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <po-radio\n [name]=\"idRadio\"\n [p-checked]=\"row.$selected\"\n [p-size]=\"componentsSize\"\n (p-change-selected)=\"selectRow(row)\"\n ></po-radio>\n</ng-template>\n\n<ng-template #inputCheckbox let-row>\n <po-checkbox\n name=\"checkbox\"\n (p-change)=\"selectable ? selectRow(row) : 'javascript:;'\"\n [p-checkboxValue]=\"row.$selected === null ? 'mixed' : row.$selected\"\n [p-size]=\"componentsSize\"\n ></po-checkbox>\n</ng-template>\n\n<ng-template #contentHeaderTemplate let-column>\n <span\n #columnHeader\n class=\"po-table-header-ellipsis\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n {{ column.label || (column.property | titlecase) }}\n </span>\n\n @if (sort && column.sortable !== false) {\n <span\n [class.po-table-header-icon-unselected]=\"JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)\"\n [class.po-table-header-icon-descending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending\n \"\n [class.po-table-header-icon-ascending]=\"\n JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending\n \"\n >\n @if (JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)) {\n <po-icon p-icon=\"ICON_SORT\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending) {\n <po-icon p-icon=\"ICON_SORT_ASC\"></po-icon>\n }\n @if (JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending) {\n <po-icon cdkDragHandle p-icon=\"ICON_SORT_DESC\"></po-icon>\n }\n </span>\n }\n</ng-template>\n\n<!-- Template de a\u00E7\u00F5es -->\n<ng-template #ActionsColumnTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n @if (isSingleAction) {\n <td\n class=\"po-table-column po-table-column-single-action\"\n [style.width.px]=\"height && actionRight ? getWidthColumnManager() : ''\"\n [style.max-width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n [style.width.px]=\"height && !actionRight ? getColumnWidthActionsLeft() : ''\"\n >\n @if (firstAction.visible !== false) {\n <div\n class=\"po-table-single-action po-clickable\"\n [class.po-table-action-disabled]=\"firstAction.disabled ? validateTableAction(row, firstAction) : false\"\n (click)=\"executeTableAction(row, firstAction)\"\n >\n @if (firstAction.icon) {\n <po-icon class=\"po-table-single-action-content\" [p-icon]=\"firstAction.icon\"></po-icon>\n }\n @if (firstAction.label) {\n <span>{{ firstAction.label }}</span>\n }\n </div>\n }\n </td>\n }\n\n @if (visibleActions.length > 1) {\n <td class=\"po-table-column-actions\">\n <div #popupTarget class=\"po-clickable\" (click)=\"togglePopup(row, popupTarget)\">\n <po-icon class=\"po-field-icon\" p-icon=\"ICON_MORE\"></po-icon>\n </div>\n </td>\n }\n</ng-template>\n\n@if (!hideColumnsManager) {\n <po-table-column-manager\n [p-columns]=\"columns\"\n [p-max-columns]=\"maxColumns\"\n [p-target]=\"columnManagerTarget\"\n [p-last-visible-columns-selected]=\"lastVisibleColumnsSelected\"\n [p-hide-action-fixed-columns]=\"hideActionFixedColumns\"\n (p-visible-columns-change)=\"onVisibleColumnsChange($event)\"\n (p-change-visible-columns)=\"onChangeVisibleColumns($event)\"\n (p-change-fixed-columns)=\"onChangeFixedColumns($event)\"\n [p-columns-default]=\"initialColumns\"\n [p-components-size]=\"componentsSize\"\n (p-initial-columns)=\"onColumnRestoreManager($event)\"\n >\n </po-table-column-manager>\n}\n\n<po-modal\n #modalDelete\n [p-components-size]=\"componentsSize\"\n [p-title]=\"literals.delete\"\n [p-primary-action]=\"confirm\"\n [p-secondary-action]=\"close\"\n [p-click-out]=\"true\"\n>\n <p class=\"po-font-text-large\">{{ literals.bodyDelete }}</p>\n</po-modal>\n" }]
|
|
40081
40240
|
}], ctorParameters: () => [{ type: PoDateService }, { type: i0.IterableDiffers }, { type: i0.Renderer2 }, { type: PoLanguageService }, { type: i0.ChangeDetectorRef }, { type: i1.DecimalPipe }, { type: PoTableService }], propDecorators: { tableRowTemplate: [{
|
|
40082
40241
|
type: ContentChild,
|
|
40083
40242
|
args: [PoTableRowTemplateDirective, { static: true }]
|
|
@@ -45951,6 +46110,12 @@ const providers$2 = [
|
|
|
45951
46110
|
* <file name="sample-po-lookup-multiple/sample-po-lookup-multiple.component.ts"> </file>
|
|
45952
46111
|
* <file name="sample-po-lookup-multiple/sample-po-lookup-multiple.service.ts"> </file>
|
|
45953
46112
|
* </example>
|
|
46113
|
+
*
|
|
46114
|
+
* <example name="po-lookup-mask" title="PO Lookup - Mask">
|
|
46115
|
+
* <file name="sample-po-lookup-mask/sample-po-lookup-mask.component.html"> </file>
|
|
46116
|
+
* <file name="sample-po-lookup-mask/sample-po-lookup-mask.component.ts"> </file>
|
|
46117
|
+
* <file name="sample-po-lookup-mask/sample-po-lookup-mask.service.ts"> </file>
|
|
46118
|
+
* </example>
|
|
45954
46119
|
*/
|
|
45955
46120
|
class PoLookupComponent extends PoLookupBaseComponent {
|
|
45956
46121
|
renderer = inject(Renderer2);
|
|
@@ -48039,6 +48204,8 @@ class PoMultiselectComponent extends PoMultiselectBaseComponent {
|
|
|
48039
48204
|
}
|
|
48040
48205
|
}
|
|
48041
48206
|
else {
|
|
48207
|
+
this.visibleTags = [];
|
|
48208
|
+
this.changeDetector.detectChanges();
|
|
48042
48209
|
index = this.selectedOptions.findIndex(option => option[this.fieldValue] === value);
|
|
48043
48210
|
this.selectedOptions.splice(index, 1);
|
|
48044
48211
|
this.updateVisibleItems();
|