@po-ui/ng-components 17.7.0 → 17.9.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/esm2022/lib/components/po-table/po-table-base.component.mjs +17 -2
- package/esm2022/lib/components/po-table/po-table-column-label/po-table-column-label.component.mjs +4 -5
- package/esm2022/lib/components/po-table/po-table.component.mjs +7 -7
- package/esm2022/lib/services/index.mjs +2 -1
- package/esm2022/lib/services/po-theme/enum/po-theme-type.enum.mjs +27 -0
- package/esm2022/lib/services/po-theme/helpers/po-theme-dark-defaults.constant.mjs +203 -0
- package/esm2022/lib/services/po-theme/helpers/po-theme-light-defaults.constant.mjs +134 -0
- package/esm2022/lib/services/po-theme/helpers/po-theme-poui.constant.mjs +31 -0
- package/esm2022/lib/services/po-theme/index.mjs +10 -0
- package/esm2022/lib/services/po-theme/interfaces/po-theme-color.interface.mjs +3 -0
- package/esm2022/lib/services/po-theme/interfaces/po-theme-tokens.interface.mjs +2 -0
- package/esm2022/lib/services/po-theme/interfaces/po-theme.interface.mjs +2 -0
- package/esm2022/lib/services/po-theme/po-theme.module.mjs +27 -0
- package/esm2022/lib/services/po-theme/po-theme.service.mjs +260 -0
- package/esm2022/lib/services/services.module.mjs +14 -7
- package/fesm2022/po-ui-ng-components.mjs +711 -20
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-table/po-table-base.component.d.ts +14 -1
- package/lib/components/po-table/po-table-column-label/po-table-column-label.component.d.ts +1 -2
- package/lib/services/index.d.ts +1 -0
- package/lib/services/po-theme/enum/po-theme-type.enum.d.ts +25 -0
- package/lib/services/po-theme/helpers/po-theme-dark-defaults.constant.d.ts +116 -0
- package/lib/services/po-theme/helpers/po-theme-light-defaults.constant.d.ts +41 -0
- package/lib/services/po-theme/helpers/po-theme-poui.constant.d.ts +11 -0
- package/lib/services/po-theme/index.d.ts +9 -0
- package/lib/services/po-theme/interfaces/po-theme-color.interface.d.ts +374 -0
- package/lib/services/po-theme/interfaces/po-theme-tokens.interface.d.ts +61 -0
- package/lib/services/po-theme/interfaces/po-theme.interface.d.ts +28 -0
- package/lib/services/po-theme/po-theme.module.d.ts +9 -0
- package/lib/services/po-theme/po-theme.service.d.ts +129 -0
- package/lib/services/services.module.d.ts +2 -1
- package/package.json +4 -4
- package/po-ui-ng-components-17.9.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/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-17.7.0.tgz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Component, ChangeDetectionStrategy, NgModule, TemplateRef, Injectable, EventEmitter, Output, ElementRef, HostListener, ViewChild, ViewChildren, ContentChildren, HostBinding, forwardRef, ViewContainerRef, inject, ContentChild, Pipe,
|
|
2
|
+
import { Directive, Input, Component, ChangeDetectionStrategy, NgModule, TemplateRef, Injectable, EventEmitter, Output, ElementRef, HostListener, ViewChild, ViewChildren, ContentChildren, HostBinding, forwardRef, ViewContainerRef, inject, ContentChild, Pipe, Inject, Injector, InjectionToken, APP_INITIALIZER } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DecimalPipe, NgOptimizedImage, CurrencyPipe, DatePipe, TitleCasePipe } from '@angular/common';
|
|
4
|
+
import { CommonModule, DOCUMENT, DecimalPipe, NgOptimizedImage, CurrencyPipe, DatePipe, TitleCasePipe } from '@angular/common';
|
|
5
5
|
import * as i2$3 from '@angular/animations';
|
|
6
6
|
import { style, animate, transition, trigger, animateChild, query, group, state, keyframes } from '@angular/animations';
|
|
7
7
|
import { Subject, filter, debounceTime, fromEvent, timer, from, of, Subscription, ReplaySubject, throwError, map as map$1, catchError as catchError$1, Observable } from 'rxjs';
|
|
@@ -17970,6 +17970,473 @@ class PoNotificationModule {
|
|
|
17970
17970
|
}], null, null); })();
|
|
17971
17971
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PoNotificationModule, { declarations: [PoToasterComponent], imports: [CommonModule, PoButtonModule, PoIconModule] }); })();
|
|
17972
17972
|
|
|
17973
|
+
/**
|
|
17974
|
+
* Enum para definir os tipos de tema suportados pelo serviço de temas.
|
|
17975
|
+
*
|
|
17976
|
+
* @usedBy PoThemeService
|
|
17977
|
+
*
|
|
17978
|
+
* @example
|
|
17979
|
+
*
|
|
17980
|
+
* Em um serviço de tema, você pode usar este enum para alternar entre os tipos de temas suportados.
|
|
17981
|
+
*
|
|
17982
|
+
* ```
|
|
17983
|
+
* import { PoThemeTypeEnum } from '@po-ui/theme';
|
|
17984
|
+
*
|
|
17985
|
+
* // Definindo o tipo de tema para light
|
|
17986
|
+
* themeService.setTheme(...theme, PoThemeTypeEnum.light);
|
|
17987
|
+
*
|
|
17988
|
+
* // Definindo o tipo de tema para dark
|
|
17989
|
+
* themeService.setTheme(...theme, PoThemeTypeEnum.dark);
|
|
17990
|
+
* ```
|
|
17991
|
+
*/
|
|
17992
|
+
var PoThemeTypeEnum;
|
|
17993
|
+
(function (PoThemeTypeEnum) {
|
|
17994
|
+
/** Define o tema como claro. */
|
|
17995
|
+
PoThemeTypeEnum[PoThemeTypeEnum["light"] = 0] = "light";
|
|
17996
|
+
/** Define o tema como escuro. */
|
|
17997
|
+
PoThemeTypeEnum[PoThemeTypeEnum["dark"] = 1] = "dark";
|
|
17998
|
+
})(PoThemeTypeEnum || (PoThemeTypeEnum = {}));
|
|
17999
|
+
|
|
18000
|
+
/**
|
|
18001
|
+
* Define as cores de ação padrão para temas claros.
|
|
18002
|
+
*/
|
|
18003
|
+
const poThemeDefaultActions = {
|
|
18004
|
+
/** Cor padrão. */
|
|
18005
|
+
default: 'var(--color-brand-01-base)',
|
|
18006
|
+
/** Cor ao passar o mouse. */
|
|
18007
|
+
hover: 'var(--color-brand-01-dark)',
|
|
18008
|
+
/** Cor quando pressionado. */
|
|
18009
|
+
pressed: 'var(--color-brand-01-darker)',
|
|
18010
|
+
/** Cor quando desabilitado. */
|
|
18011
|
+
disabled: 'var(--color-neutral-light-30)',
|
|
18012
|
+
/** Cor ao focar. */
|
|
18013
|
+
focus: 'var(--color-brand-01-darkest)'
|
|
18014
|
+
};
|
|
18015
|
+
/**
|
|
18016
|
+
* Define as cores neutras padrão para temas claros.
|
|
18017
|
+
*/
|
|
18018
|
+
const poThemeDefaultNeutrals = {
|
|
18019
|
+
/** Tons de cinza claro. */
|
|
18020
|
+
light: {
|
|
18021
|
+
'00': '#ffffff',
|
|
18022
|
+
'05': '#fbfbfb',
|
|
18023
|
+
'10': '#eceeee',
|
|
18024
|
+
'20': '#dadedf',
|
|
18025
|
+
'30': '#b6bdbf'
|
|
18026
|
+
},
|
|
18027
|
+
/** Tons de cinza intermediários. */
|
|
18028
|
+
mid: {
|
|
18029
|
+
'40': '#9da7a9',
|
|
18030
|
+
'60': '#6e7c7f'
|
|
18031
|
+
},
|
|
18032
|
+
/** Tons de cinza escuro. */
|
|
18033
|
+
dark: {
|
|
18034
|
+
'70': '#4a5c60',
|
|
18035
|
+
'80': '#2c3739',
|
|
18036
|
+
'90': '#1d2426',
|
|
18037
|
+
'95': '#0b0e0e'
|
|
18038
|
+
}
|
|
18039
|
+
};
|
|
18040
|
+
/**
|
|
18041
|
+
* Define as cores de feedback padrão para temas claros.
|
|
18042
|
+
*/
|
|
18043
|
+
const poThemeDefaultFeedback = {
|
|
18044
|
+
/** Cores para feedback negativo. */
|
|
18045
|
+
negative: {
|
|
18046
|
+
lightest: '#f6e6e5',
|
|
18047
|
+
lighter: '#e3aeab',
|
|
18048
|
+
light: '#d58581',
|
|
18049
|
+
base: '#be3e37',
|
|
18050
|
+
dark: '#9b2d27',
|
|
18051
|
+
darker: '#72211d',
|
|
18052
|
+
darkest: '#4a1512'
|
|
18053
|
+
},
|
|
18054
|
+
/** Cores para feedback informativo. */
|
|
18055
|
+
info: {
|
|
18056
|
+
lightest: '#e3e9f7',
|
|
18057
|
+
lighter: '#b0c1e8',
|
|
18058
|
+
light: '#7996d7',
|
|
18059
|
+
base: '#23489f',
|
|
18060
|
+
dark: '#173782',
|
|
18061
|
+
darker: '#0f2557',
|
|
18062
|
+
darkest: '#081536'
|
|
18063
|
+
},
|
|
18064
|
+
/** Cores para feedback positivo. */
|
|
18065
|
+
positive: {
|
|
18066
|
+
lightest: '#def7ed',
|
|
18067
|
+
lighter: '#7ecead',
|
|
18068
|
+
light: '#41b483',
|
|
18069
|
+
base: '#107048',
|
|
18070
|
+
dark: '#0f5236',
|
|
18071
|
+
darker: '#083a25',
|
|
18072
|
+
darkest: '#002415'
|
|
18073
|
+
},
|
|
18074
|
+
/** Cores para feedback de aviso. */
|
|
18075
|
+
warning: {
|
|
18076
|
+
lightest: '#fcf6e3',
|
|
18077
|
+
lighter: '#f7dd97',
|
|
18078
|
+
light: '#f1cd6a',
|
|
18079
|
+
base: '#efba2a',
|
|
18080
|
+
dark: '#d8a20e',
|
|
18081
|
+
darker: '#705200',
|
|
18082
|
+
darkest: '#473400'
|
|
18083
|
+
}
|
|
18084
|
+
};
|
|
18085
|
+
const poThemeDefaultBrands = {
|
|
18086
|
+
'01': {
|
|
18087
|
+
lightest: '#f2eaf6',
|
|
18088
|
+
lighter: '#d9c2e5',
|
|
18089
|
+
light: '#bd94d1',
|
|
18090
|
+
base: '#753399',
|
|
18091
|
+
dark: '#5b1c7d',
|
|
18092
|
+
darker: '#400e58',
|
|
18093
|
+
darkest: '#260538'
|
|
18094
|
+
},
|
|
18095
|
+
'02': {
|
|
18096
|
+
base: '#b92f72'
|
|
18097
|
+
},
|
|
18098
|
+
'03': {
|
|
18099
|
+
base: '#ffd464'
|
|
18100
|
+
}
|
|
18101
|
+
};
|
|
18102
|
+
/**
|
|
18103
|
+
* Define estilos específicos por componente e onRoot para temas claros.
|
|
18104
|
+
*/
|
|
18105
|
+
const poThemeDefaultLightValues = {
|
|
18106
|
+
perComponent: {},
|
|
18107
|
+
onRoot: {
|
|
18108
|
+
/* WIDGET */
|
|
18109
|
+
'--color-widget-color-action-active': 'var(--color-primary-dark-20)',
|
|
18110
|
+
'--color-widget-color-action-hover': 'var(--color-primary-dark-20)',
|
|
18111
|
+
'--color-widget-color-action': 'var(--color-primary)',
|
|
18112
|
+
'--color-widget-color-default': 'var(--color-neutral-dark-70)',
|
|
18113
|
+
'--color-widget-color-title-action': 'var(--color-primary)',
|
|
18114
|
+
'--color-widget-color-widget-primary': 'var(--color-neutral-dark-90)',
|
|
18115
|
+
/* CALENDAR */
|
|
18116
|
+
'--color-calendar-arrow': 'var(--color-primary)',
|
|
18117
|
+
'--color-calendar-title': 'var(--color-primary)',
|
|
18118
|
+
'--color-calendar-text-box-background-active': 'var(--color-neutral-dark-90)',
|
|
18119
|
+
'--color-calendar-background-color-border-today': 'var(--color-primary)',
|
|
18120
|
+
'--color-calendar-color-box-foreground': 'var(--color-neutral-dark-70)',
|
|
18121
|
+
'--color-calendar-color-box-foreground-selected': 'var(--color-neutral-dark-90)',
|
|
18122
|
+
'--color-calendar-color-box-foreground-pressed': 'var(--color-neutral-dark-90)',
|
|
18123
|
+
'--color-calendar-color-box-foreground-range': 'var(--color-primary)',
|
|
18124
|
+
'--color-calendar-color-box-foreground-today': 'var(--color-primary)',
|
|
18125
|
+
/* TOOLBAR */
|
|
18126
|
+
'--color-toolbar-color-default': 'var(--color-primary)',
|
|
18127
|
+
'--color-toolbar-color-title': 'var(--color-action-default)',
|
|
18128
|
+
/* CALENDAR */
|
|
18129
|
+
'--color-calendar-background-color-box-background-range': 'var(--color-primary-light-80)'
|
|
18130
|
+
}
|
|
18131
|
+
};
|
|
18132
|
+
|
|
18133
|
+
/**
|
|
18134
|
+
* Tokens de tema padrão para temas claros.
|
|
18135
|
+
*/
|
|
18136
|
+
const poThemeDefaultLight = {
|
|
18137
|
+
color: {
|
|
18138
|
+
brand: poThemeDefaultBrands,
|
|
18139
|
+
action: poThemeDefaultActions,
|
|
18140
|
+
neutral: poThemeDefaultNeutrals,
|
|
18141
|
+
feedback: poThemeDefaultFeedback
|
|
18142
|
+
},
|
|
18143
|
+
perComponent: {
|
|
18144
|
+
...poThemeDefaultLightValues.perComponent
|
|
18145
|
+
},
|
|
18146
|
+
onRoot: {
|
|
18147
|
+
...poThemeDefaultLightValues.onRoot
|
|
18148
|
+
}
|
|
18149
|
+
};
|
|
18150
|
+
/**
|
|
18151
|
+
* Tema padrão.
|
|
18152
|
+
*/
|
|
18153
|
+
const poThemeDefault = {
|
|
18154
|
+
name: 'default',
|
|
18155
|
+
type: {
|
|
18156
|
+
light: poThemeDefaultLight
|
|
18157
|
+
},
|
|
18158
|
+
active: PoThemeTypeEnum.light
|
|
18159
|
+
};
|
|
18160
|
+
|
|
18161
|
+
/**
|
|
18162
|
+
* @description
|
|
18163
|
+
*
|
|
18164
|
+
* O `PoThemeService` possibilita a personalização das cores do tema padrão do `PO-UI`, permitindo a alteração dos valores das variáveis de estilo usadas no CSS padrão.
|
|
18165
|
+
*
|
|
18166
|
+
* > Para saber mais sobre como customizar as cores do tema padrão verifique o item [Customizando cores do tema padrão](https://po-ui.io/guides/colors-customization) na aba `Guias`.
|
|
18167
|
+
*
|
|
18168
|
+
* > Obs.: Não está documentado aqui e não indicamos a customização das cores de 'feedback' por motivos de acessibilidade e usabilidade.
|
|
18169
|
+
*/
|
|
18170
|
+
class PoThemeService {
|
|
18171
|
+
window;
|
|
18172
|
+
document;
|
|
18173
|
+
renderer;
|
|
18174
|
+
theme = poThemeDefault;
|
|
18175
|
+
constructor(window, document, rendererFactory) {
|
|
18176
|
+
this.window = window;
|
|
18177
|
+
this.document = document;
|
|
18178
|
+
this.renderer = rendererFactory.createRenderer(null, null);
|
|
18179
|
+
}
|
|
18180
|
+
/**
|
|
18181
|
+
* Define o tema a ser aplicado no componente, de acordo com o tipo de tema especificado.
|
|
18182
|
+
*
|
|
18183
|
+
* Este método define o tema a ser aplicado no componente com base no objeto `theme` fornecido e no tipo de tema especificado.
|
|
18184
|
+
* Ele atualiza as propriedades do componente para refletir o tema selecionado, como cores, estilos e comportamentos.
|
|
18185
|
+
*
|
|
18186
|
+
* @param {PoTheme} theme - Objeto contendo as definições de tema a serem aplicadas no componente.
|
|
18187
|
+
* @param {PoThemeTypeEnum} [themeType=PoThemeTypeEnum.light] - (Opcional) Tipo de tema a ser aplicado, podendo ser 'light' (claro) ou 'dark' (escuro). Por padrão, o tema claro é aplicado.
|
|
18188
|
+
*/
|
|
18189
|
+
setTheme(theme, themeType = PoThemeTypeEnum.light) {
|
|
18190
|
+
// Change theme name, remove special characteres and number, replace space with dash
|
|
18191
|
+
theme.name = theme.name
|
|
18192
|
+
.toLowerCase()
|
|
18193
|
+
.replace(/[^a-zA-Z ]/g, '')
|
|
18194
|
+
.replace(/\s+/g, '-');
|
|
18195
|
+
theme.active = themeType;
|
|
18196
|
+
const _themeType = theme.type[PoThemeTypeEnum[themeType]];
|
|
18197
|
+
if (!_themeType) {
|
|
18198
|
+
return;
|
|
18199
|
+
}
|
|
18200
|
+
const colorStyles = _themeType.color ? this.generateThemeStyles(_themeType.color) : '';
|
|
18201
|
+
const perComponentStyles = _themeType.perComponent ? this.generatePerComponentStyles(_themeType.perComponent) : '';
|
|
18202
|
+
const onRootStyles = _themeType.onRoot ? this.generateAdditionalStyles(_themeType.onRoot) : '';
|
|
18203
|
+
const additionalStyles = this.generateAdditionalStyles(_themeType);
|
|
18204
|
+
const combinedStyles = `
|
|
18205
|
+
.${theme.name}-${PoThemeTypeEnum[themeType]}:root {
|
|
18206
|
+
${colorStyles}
|
|
18207
|
+
${perComponentStyles}
|
|
18208
|
+
${onRootStyles}
|
|
18209
|
+
${additionalStyles}
|
|
18210
|
+
}`;
|
|
18211
|
+
this.applyThemeStyles(combinedStyles);
|
|
18212
|
+
this.changeThemeType(theme);
|
|
18213
|
+
}
|
|
18214
|
+
/**
|
|
18215
|
+
* @docsPrivate
|
|
18216
|
+
*
|
|
18217
|
+
* Gera estilos adicionais com base nos tokens de tema fornecidos, excluindo os tokens de cor.
|
|
18218
|
+
* @param theme Os tokens de tema contendo os estilos adicionais a serem gerados.
|
|
18219
|
+
* @returns Uma string contendo os estilos adicionais formatados.
|
|
18220
|
+
*/
|
|
18221
|
+
generateAdditionalStyles(theme) {
|
|
18222
|
+
return Object.entries(theme)
|
|
18223
|
+
.filter(([key]) => !['color', 'perComponent', 'onRoot'].includes(key))
|
|
18224
|
+
.map(([key, value]) => `${key}: ${value};`)
|
|
18225
|
+
.join(' ');
|
|
18226
|
+
}
|
|
18227
|
+
/**
|
|
18228
|
+
* @docsPrivate
|
|
18229
|
+
*
|
|
18230
|
+
* Aplica os estilos de tema ao documento.
|
|
18231
|
+
* @param styleCss Os estilos CSS a serem aplicados.
|
|
18232
|
+
*/
|
|
18233
|
+
applyThemeStyles(styleCss) {
|
|
18234
|
+
const styleElement = this.createStyleElement(styleCss);
|
|
18235
|
+
const existingStyleElement = document.head.querySelector('#pouiTheme');
|
|
18236
|
+
if (existingStyleElement) {
|
|
18237
|
+
this.renderer.removeChild(document.head, existingStyleElement);
|
|
18238
|
+
}
|
|
18239
|
+
this.renderer.appendChild(document.head, styleElement);
|
|
18240
|
+
}
|
|
18241
|
+
changeThemeType(theme) {
|
|
18242
|
+
this.cleanThemeActive();
|
|
18243
|
+
this.setThemeActive(theme);
|
|
18244
|
+
document.getElementsByTagName('html')[0].classList.add(...[`${theme.name}-${PoThemeTypeEnum[theme.active]}`]);
|
|
18245
|
+
}
|
|
18246
|
+
/**
|
|
18247
|
+
* Persiste e define o tema do aplicativo com base nos dados armazenados.
|
|
18248
|
+
*
|
|
18249
|
+
* Este método recupera os dados do tema armazenados e os aplica ao aplicativo.
|
|
18250
|
+
*
|
|
18251
|
+
* @returns {PoTheme} Recupera o tema armazenado.
|
|
18252
|
+
*/
|
|
18253
|
+
persistThemeActive() {
|
|
18254
|
+
const _theme = this.getThemeActive();
|
|
18255
|
+
this.setTheme(_theme, _theme.active);
|
|
18256
|
+
return _theme;
|
|
18257
|
+
}
|
|
18258
|
+
/**
|
|
18259
|
+
* Altera o tipo do tema armazenado e aplica os novos estilos ao documento.
|
|
18260
|
+
*
|
|
18261
|
+
* Este método altera o tipo do tema armazenado ativo (light/dark)
|
|
18262
|
+
*
|
|
18263
|
+
* @param {PoThemeTypeEnum} themeType O tipo de tema a ser aplicado, light ou dark.
|
|
18264
|
+
*/
|
|
18265
|
+
changeCurrentThemeType(type) {
|
|
18266
|
+
const _theme = this.getThemeActive();
|
|
18267
|
+
_theme.active = type;
|
|
18268
|
+
this.changeThemeType(_theme);
|
|
18269
|
+
}
|
|
18270
|
+
/**
|
|
18271
|
+
* Método remove o tema armazenado e limpa todos os estilos de tema
|
|
18272
|
+
* aplicados ao documento.
|
|
18273
|
+
*/
|
|
18274
|
+
cleanThemeActive() {
|
|
18275
|
+
const _theme = this.getThemeActive();
|
|
18276
|
+
document.getElementsByTagName('html')[0].classList.remove(`${_theme.name}-${PoThemeTypeEnum[_theme.active]}`);
|
|
18277
|
+
localStorage.removeItem('totvs-theme');
|
|
18278
|
+
}
|
|
18279
|
+
/**
|
|
18280
|
+
* @docsPrivate
|
|
18281
|
+
*
|
|
18282
|
+
* Este método define um dados do tema e o armazena.
|
|
18283
|
+
* @param theme Os tokens de tema contendo os estilos adicionais a serem gerados.
|
|
18284
|
+
*/
|
|
18285
|
+
setThemeActive(theme) {
|
|
18286
|
+
if (theme) {
|
|
18287
|
+
localStorage.setItem('totvs-theme', JSON.stringify(theme));
|
|
18288
|
+
this.theme = theme;
|
|
18289
|
+
}
|
|
18290
|
+
}
|
|
18291
|
+
/**
|
|
18292
|
+
* Retorna o tema ativo como um observable.
|
|
18293
|
+
* @returns {PoTheme} Tema ativo.
|
|
18294
|
+
*/
|
|
18295
|
+
getThemeActive() {
|
|
18296
|
+
try {
|
|
18297
|
+
const themeData = JSON.parse(localStorage.getItem('totvs-theme'));
|
|
18298
|
+
if (themeData && JSON.stringify(themeData) !== JSON.stringify(this.theme)) {
|
|
18299
|
+
this.theme = themeData;
|
|
18300
|
+
}
|
|
18301
|
+
}
|
|
18302
|
+
catch (error) {
|
|
18303
|
+
console.error('Erro ao obter o tema do armazenamento local:', error);
|
|
18304
|
+
}
|
|
18305
|
+
return this.theme;
|
|
18306
|
+
}
|
|
18307
|
+
/**
|
|
18308
|
+
* @docsPrivate
|
|
18309
|
+
*
|
|
18310
|
+
* Gera estilos CSS com base nos tokens de cores fornecidos.
|
|
18311
|
+
* @param themeColor Os tokens de cor a serem usados para gerar os estilos.
|
|
18312
|
+
* @returns Uma string contendo os estilos CSS gerados.
|
|
18313
|
+
*/
|
|
18314
|
+
createStyleElement(css) {
|
|
18315
|
+
const styleElement = this.renderer.createElement('style');
|
|
18316
|
+
styleElement.id = 'pouiTheme';
|
|
18317
|
+
this.renderer.appendChild(styleElement, this.renderer.createText(css));
|
|
18318
|
+
return styleElement;
|
|
18319
|
+
}
|
|
18320
|
+
/**
|
|
18321
|
+
* @docsPrivate
|
|
18322
|
+
*
|
|
18323
|
+
* Gera estilos CSS com base nos tokens de cores fornecidos.
|
|
18324
|
+
* @param themeColor Os tokens de cor a serem usados para gerar os estilos.
|
|
18325
|
+
* @returns Uma string contendo os estilos CSS gerados.
|
|
18326
|
+
*/
|
|
18327
|
+
generateThemeStyles(themeColor) {
|
|
18328
|
+
const selectBgIconStyle = this.getSelectBgIconsStyle(themeColor);
|
|
18329
|
+
return [
|
|
18330
|
+
Object.entries(themeColor)
|
|
18331
|
+
.flatMap(([type, values]) => Object.entries(values).flatMap(([tonality, tonalityValues]) => {
|
|
18332
|
+
if (type === 'action') {
|
|
18333
|
+
return [`--color-${type}-${tonality}: ${tonalityValues};`];
|
|
18334
|
+
}
|
|
18335
|
+
else {
|
|
18336
|
+
return Object.entries(tonalityValues).map(([level, colorValue]) => `--color-${type}-${tonality}-${level}: ${colorValue};`);
|
|
18337
|
+
}
|
|
18338
|
+
}))
|
|
18339
|
+
.join(''),
|
|
18340
|
+
selectBgIconStyle
|
|
18341
|
+
].join('');
|
|
18342
|
+
}
|
|
18343
|
+
/**
|
|
18344
|
+
* @docsPrivate
|
|
18345
|
+
*
|
|
18346
|
+
* Gera estilos CSS com base nos tokens per Component fornecidos.
|
|
18347
|
+
* @param themePerComponent Os tokens de cor a serem usados para gerar os estilos.
|
|
18348
|
+
* @returns Uma string contendo os estilos CSS gerados.
|
|
18349
|
+
*/
|
|
18350
|
+
generatePerComponentStyles(themePerComponent) {
|
|
18351
|
+
return Object.entries(themePerComponent)
|
|
18352
|
+
.flatMap(([type, values]) => Object.entries(values).flatMap(([level, colorValue]) => [`${type} {${level}: ${colorValue};};`]))
|
|
18353
|
+
.join('');
|
|
18354
|
+
}
|
|
18355
|
+
/**
|
|
18356
|
+
* Define o tema atual como o tema "PoUI Padrão".
|
|
18357
|
+
*
|
|
18358
|
+
* @param {PoThemeTypeEnum} type O tipo de Tema a ser aplicado, light / dark.
|
|
18359
|
+
*/
|
|
18360
|
+
setDefaultTheme(type) {
|
|
18361
|
+
this.setTheme(poThemeDefault, type);
|
|
18362
|
+
}
|
|
18363
|
+
/**
|
|
18364
|
+
* @docsPrivate
|
|
18365
|
+
*
|
|
18366
|
+
* Retorna o estilo CSS para o fundo dos ícones do componente po-select, com base nas cores do tema.
|
|
18367
|
+
*
|
|
18368
|
+
* @param {PoThemeColor} themeColor - Objeto contendo as cores do tema.
|
|
18369
|
+
* @returns {string} - Estilo CSS para o fundo dos ícones do po-select.
|
|
18370
|
+
*/
|
|
18371
|
+
getSelectBgIconsStyle(themeColor) {
|
|
18372
|
+
let selectBgIcon = '';
|
|
18373
|
+
if (themeColor?.brand?.['01']?.dark) {
|
|
18374
|
+
selectBgIcon += `po-select { --background-image: url("${this.getSelectBgIcon(themeColor.brand['01'].dark)}"); };`;
|
|
18375
|
+
}
|
|
18376
|
+
if (themeColor?.feedback?.negative?.base)
|
|
18377
|
+
selectBgIcon += `po-select.ng-dirty.ng-invalid select { --background-image: url("${this.getSelectBgIcon(themeColor.feedback.negative.base)}"); };`;
|
|
18378
|
+
if (themeColor?.neutral?.light?.['30'])
|
|
18379
|
+
selectBgIcon += `select:disabled { --background-image: url("${this.getSelectBgIcon(themeColor.neutral.light['30'])}"); };`;
|
|
18380
|
+
return selectBgIcon;
|
|
18381
|
+
}
|
|
18382
|
+
/**
|
|
18383
|
+
* @docsPrivate
|
|
18384
|
+
*
|
|
18385
|
+
* Retorna a imagem SVG utilizada como fundo do po-select.
|
|
18386
|
+
*
|
|
18387
|
+
* @param {string} color Cor da Imagem - Utilizada no atributo 'fill'.
|
|
18388
|
+
* @returns {string} Imagem SVG utilizada no po-select.
|
|
18389
|
+
*/
|
|
18390
|
+
getSelectBgIcon(color) {
|
|
18391
|
+
let svg = `"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' `;
|
|
18392
|
+
svg = svg.concat(`xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' `);
|
|
18393
|
+
svg = svg.concat(`d='M18.707 8.29301C18.316 7.90201 17.684 7.90201 17.293 8.29301L12 13.586L6.70701 `);
|
|
18394
|
+
svg = svg.concat(`8.29301C6.31601 7.90201 5.68401 7.90201 5.29301 8.29301C4.90201 8.68401 4.90201 `);
|
|
18395
|
+
svg = svg.concat(`9.31601 5.29301 9.70701L11.293 15.707C11.488 15.902 11.744 16 12 16C12.256 16 12.512 `);
|
|
18396
|
+
svg = svg.concat(`15.902 12.707 15.707L18.707 9.70701C19.098 9.31601 19.098 8.68401 18.707 8.29301Z' `);
|
|
18397
|
+
svg = svg.concat(`fill='%23${color}'/%3E%3C/svg%3E%0A");`);
|
|
18398
|
+
return svg;
|
|
18399
|
+
}
|
|
18400
|
+
static ɵfac = function PoThemeService_Factory(t) { return new (t || PoThemeService)(i0.ɵɵinject('Window'), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i0.RendererFactory2)); };
|
|
18401
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PoThemeService, factory: PoThemeService.ɵfac, providedIn: 'root' });
|
|
18402
|
+
}
|
|
18403
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoThemeService, [{
|
|
18404
|
+
type: Injectable,
|
|
18405
|
+
args: [{
|
|
18406
|
+
providedIn: 'root'
|
|
18407
|
+
}]
|
|
18408
|
+
}], () => [{ type: Window, decorators: [{
|
|
18409
|
+
type: Inject,
|
|
18410
|
+
args: ['Window']
|
|
18411
|
+
}] }, { type: Document, decorators: [{
|
|
18412
|
+
type: Inject,
|
|
18413
|
+
args: [DOCUMENT]
|
|
18414
|
+
}] }, { type: i0.RendererFactory2 }], null); })();
|
|
18415
|
+
|
|
18416
|
+
/**
|
|
18417
|
+
* Módulo responsável por fornecer serviços relacionados ao tema PO.
|
|
18418
|
+
*/
|
|
18419
|
+
class PoThemeModule {
|
|
18420
|
+
static ɵfac = function PoThemeModule_Factory(t) { return new (t || PoThemeModule)(); };
|
|
18421
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PoThemeModule });
|
|
18422
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
18423
|
+
PoThemeService,
|
|
18424
|
+
// Fornecer o objeto 'Window' para uso no serviço
|
|
18425
|
+
{ provide: 'Window', useValue: window }
|
|
18426
|
+
] });
|
|
18427
|
+
}
|
|
18428
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoThemeModule, [{
|
|
18429
|
+
type: NgModule,
|
|
18430
|
+
args: [{
|
|
18431
|
+
providers: [
|
|
18432
|
+
PoThemeService,
|
|
18433
|
+
// Fornecer o objeto 'Window' para uso no serviço
|
|
18434
|
+
{ provide: 'Window', useValue: window }
|
|
18435
|
+
],
|
|
18436
|
+
bootstrap: []
|
|
18437
|
+
}]
|
|
18438
|
+
}], null, null); })();
|
|
18439
|
+
|
|
17973
18440
|
class PoServicesModule {
|
|
17974
18441
|
static ɵfac = function PoServicesModule_Factory(t) { return new (t || PoServicesModule)(); };
|
|
17975
18442
|
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PoServicesModule });
|
|
@@ -17980,13 +18447,15 @@ class PoServicesModule {
|
|
|
17980
18447
|
PoDateTimeModule,
|
|
17981
18448
|
PoDialogModule,
|
|
17982
18449
|
PoLanguageModule,
|
|
17983
|
-
PoNotificationModule,
|
|
18450
|
+
PoNotificationModule,
|
|
18451
|
+
PoThemeModule, PoActiveOverlayModule,
|
|
17984
18452
|
PoColorPaletteModule,
|
|
17985
18453
|
PoComponentInjectorModule,
|
|
17986
18454
|
PoControlPositionModule,
|
|
17987
18455
|
PoDateTimeModule,
|
|
17988
18456
|
PoDialogModule,
|
|
17989
|
-
PoNotificationModule
|
|
18457
|
+
PoNotificationModule,
|
|
18458
|
+
PoThemeModule] });
|
|
17990
18459
|
}
|
|
17991
18460
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoServicesModule, [{
|
|
17992
18461
|
type: NgModule,
|
|
@@ -18000,7 +18469,8 @@ class PoServicesModule {
|
|
|
18000
18469
|
PoDateTimeModule,
|
|
18001
18470
|
PoDialogModule,
|
|
18002
18471
|
PoLanguageModule,
|
|
18003
|
-
PoNotificationModule
|
|
18472
|
+
PoNotificationModule,
|
|
18473
|
+
PoThemeModule
|
|
18004
18474
|
],
|
|
18005
18475
|
exports: [
|
|
18006
18476
|
PoActiveOverlayModule,
|
|
@@ -18010,7 +18480,8 @@ class PoServicesModule {
|
|
|
18010
18480
|
PoDateTimeModule,
|
|
18011
18481
|
PoDialogModule,
|
|
18012
18482
|
PoI18nPipe,
|
|
18013
|
-
PoNotificationModule
|
|
18483
|
+
PoNotificationModule,
|
|
18484
|
+
PoThemeModule
|
|
18014
18485
|
],
|
|
18015
18486
|
providers: [],
|
|
18016
18487
|
bootstrap: []
|
|
@@ -18023,14 +18494,16 @@ class PoServicesModule {
|
|
|
18023
18494
|
PoDateTimeModule,
|
|
18024
18495
|
PoDialogModule,
|
|
18025
18496
|
PoLanguageModule,
|
|
18026
|
-
PoNotificationModule
|
|
18497
|
+
PoNotificationModule,
|
|
18498
|
+
PoThemeModule], exports: [PoActiveOverlayModule,
|
|
18027
18499
|
PoColorPaletteModule,
|
|
18028
18500
|
PoComponentInjectorModule,
|
|
18029
18501
|
PoControlPositionModule,
|
|
18030
18502
|
PoDateTimeModule,
|
|
18031
18503
|
PoDialogModule,
|
|
18032
18504
|
PoI18nPipe,
|
|
18033
|
-
PoNotificationModule
|
|
18505
|
+
PoNotificationModule,
|
|
18506
|
+
PoThemeModule] }); })();
|
|
18034
18507
|
|
|
18035
18508
|
const PO_POPOVER_DEFAULT_POSITION = 'right';
|
|
18036
18509
|
const PO_POPOVER_DEFAULT_TRIGGER = 'click';
|
|
@@ -19021,24 +19494,23 @@ function PoTableColumnLabelComponent_po_tag_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
19021
19494
|
* Componente para a criação da representação da legenda, em formato de texto .
|
|
19022
19495
|
*/
|
|
19023
19496
|
class PoTableColumnLabelComponent {
|
|
19024
|
-
hasLabel = false;
|
|
19025
19497
|
value;
|
|
19026
19498
|
ngOnInit() {
|
|
19027
19499
|
this.checkValueHasLabel();
|
|
19028
19500
|
}
|
|
19029
19501
|
checkValueHasLabel() {
|
|
19030
|
-
|
|
19502
|
+
return this.value?.label?.trim() ? true : false;
|
|
19031
19503
|
}
|
|
19032
19504
|
static ɵfac = function PoTableColumnLabelComponent_Factory(t) { return new (t || PoTableColumnLabelComponent)(); };
|
|
19033
19505
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoTableColumnLabelComponent, selectors: [["po-table-column-label"]], inputs: { value: [i0.ɵɵInputFlags.None, "p-value", "value"] }, decls: 1, vars: 1, consts: [[3, "p-color", "p-value", "p-text-color", "p-icon", "p-type", 4, "ngIf"], [3, "p-color", "p-value", "p-text-color", "p-icon", "p-type"]], template: function PoTableColumnLabelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19034
19506
|
i0.ɵɵtemplate(0, PoTableColumnLabelComponent_po_tag_0_Template, 1, 5, "po-tag", 0);
|
|
19035
19507
|
} if (rf & 2) {
|
|
19036
|
-
i0.ɵɵproperty("ngIf", ctx.
|
|
19508
|
+
i0.ɵɵproperty("ngIf", ctx.checkValueHasLabel());
|
|
19037
19509
|
} }, dependencies: [i1.NgIf, PoTagComponent], encapsulation: 2, changeDetection: 0 });
|
|
19038
19510
|
}
|
|
19039
19511
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoTableColumnLabelComponent, [{
|
|
19040
19512
|
type: Component,
|
|
19041
|
-
args: [{ selector: 'po-table-column-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<po-tag\n *ngIf=\"
|
|
19513
|
+
args: [{ selector: 'po-table-column-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<po-tag\n *ngIf=\"checkValueHasLabel()\"\n [p-color]=\"value?.color\"\n [p-value]=\"value?.label\"\n [p-text-color]=\"value?.textColor\"\n [p-icon]=\"value?.icon\"\n [p-type]=\"value?.type\"\n>\n</po-tag>\n" }]
|
|
19042
19514
|
}], null, { value: [{
|
|
19043
19515
|
type: Input,
|
|
19044
19516
|
args: ['p-value']
|
|
@@ -20551,6 +21023,18 @@ class PoTableBaseComponent {
|
|
|
20551
21023
|
* @default `true`
|
|
20552
21024
|
*/
|
|
20553
21025
|
hideBatchActions = true;
|
|
21026
|
+
/**
|
|
21027
|
+
* @optional
|
|
21028
|
+
*
|
|
21029
|
+
* @description
|
|
21030
|
+
*
|
|
21031
|
+
* Habilita ou desabilita a quebra automática de texto. Quando ativada, o texto que excede
|
|
21032
|
+
* o espaço disponível é transferido para a próxima linha em pontos apropriados para uma
|
|
21033
|
+
* leitura clara.
|
|
21034
|
+
*
|
|
21035
|
+
* @default `false`
|
|
21036
|
+
*/
|
|
21037
|
+
textWrap = false;
|
|
20554
21038
|
/**
|
|
20555
21039
|
* @optional
|
|
20556
21040
|
*
|
|
@@ -21535,7 +22019,7 @@ class PoTableBaseComponent {
|
|
|
21535
22019
|
});
|
|
21536
22020
|
}
|
|
21537
22021
|
static ɵfac = function PoTableBaseComponent_Factory(t) { return new (t || PoTableBaseComponent)(i0.ɵɵdirectiveInject(PoDateService), i0.ɵɵdirectiveInject(PoLanguageService), i0.ɵɵdirectiveInject(PoTableService)); };
|
|
21538
|
-
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PoTableBaseComponent, inputs: { hideColumnsManager: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-columns-manager", "hideColumnsManager", convertToBoolean], hideBatchActions: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-batch-actions", "hideBatchActions", convertToBoolean], hideActionFixedColumns: [i0.ɵɵInputFlags.None, "p-hide-action-fixed-columns", "hideActionFixedColumns"], hideTableSearch: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-table-search", "hideTableSearch", convertToBoolean], autoCollapse: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-auto-collapse", "autoCollapse", convertToBoolean], loadingShowMore: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-loading-show-more", "loadingShowMore", convertToBoolean], sort: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-sort", "sort", convertToBoolean], showMoreDisabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-show-more-disabled", "showMoreDisabled", convertToBoolean], striped: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-striped", "striped", convertToBoolean], hideSelectAll: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-select-all", "hideSelectAll", convertToBoolean], singleSelect: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-single-select", "singleSelect", convertToBoolean], selectableEntireLine: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-selectable-entire-line", "selectableEntireLine", convertToBoolean], actionRight: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-actions-right", "actionRight", convertToBoolean], maxColumns: [i0.ɵɵInputFlags.None, "p-max-columns", "maxColumns"], filterType: [i0.ɵɵInputFlags.None, "p-filter-type", "filterType"], items: [i0.ɵɵInputFlags.None, "p-items", "items"], columns: [i0.ɵɵInputFlags.None, "p-columns", "columns"], container: [i0.ɵɵInputFlags.None, "p-container", "container"], paramDeleteApi: [i0.ɵɵInputFlags.None, "p-param-delete-api", "paramDeleteApi"], height: [i0.ɵɵInputFlags.None, "p-height", "height"], hideDetail: [i0.ɵɵInputFlags.None, "p-hide-detail", "hideDetail"], literals: [i0.ɵɵInputFlags.None, "p-literals", "literals"], loading: [i0.ɵɵInputFlags.None, "p-loading", "loading"], actions: [i0.ɵɵInputFlags.None, "p-actions", "actions"], selectable: [i0.ɵɵInputFlags.None, "p-selectable", "selectable"], infiniteScroll: [i0.ɵɵInputFlags.None, "p-infinite-scroll", "infiniteScroll"], infiniteScrollDistance: [i0.ɵɵInputFlags.None, "p-infinite-scroll-distance", "infiniteScrollDistance"], serviceApi: [i0.ɵɵInputFlags.None, "p-service-api", "serviceApi"], serviceDeleteApi: [i0.ɵɵInputFlags.None, "p-service-delete", "serviceDeleteApi"], spacing: [i0.ɵɵInputFlags.None, "p-spacing", "spacing"], filteredColumns: [i0.ɵɵInputFlags.None, "p-filtered-columns", "filteredColumns"], draggable: [i0.ɵɵInputFlags.None, "p-draggable", "draggable"] }, outputs: { allSelected: "p-all-selected", allUnselected: "p-all-unselected", collapsed: "p-collapsed", expanded: "p-expanded", eventDelete: "p-delete-items", selected: "p-selected", showMore: "p-show-more", sortBy: "p-sort-by", unselected: "p-unselected", changeVisibleColumns: "p-change-visible-columns", columnRestoreManager: "p-restore-column-manager" }, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature] });
|
|
22022
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PoTableBaseComponent, inputs: { hideColumnsManager: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-columns-manager", "hideColumnsManager", convertToBoolean], hideBatchActions: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-batch-actions", "hideBatchActions", convertToBoolean], textWrap: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-text-wrap", "textWrap", convertToBoolean], hideActionFixedColumns: [i0.ɵɵInputFlags.None, "p-hide-action-fixed-columns", "hideActionFixedColumns"], hideTableSearch: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-table-search", "hideTableSearch", convertToBoolean], autoCollapse: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-auto-collapse", "autoCollapse", convertToBoolean], loadingShowMore: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-loading-show-more", "loadingShowMore", convertToBoolean], sort: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-sort", "sort", convertToBoolean], showMoreDisabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-show-more-disabled", "showMoreDisabled", convertToBoolean], striped: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-striped", "striped", convertToBoolean], hideSelectAll: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-hide-select-all", "hideSelectAll", convertToBoolean], singleSelect: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-single-select", "singleSelect", convertToBoolean], selectableEntireLine: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-selectable-entire-line", "selectableEntireLine", convertToBoolean], actionRight: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-actions-right", "actionRight", convertToBoolean], maxColumns: [i0.ɵɵInputFlags.None, "p-max-columns", "maxColumns"], filterType: [i0.ɵɵInputFlags.None, "p-filter-type", "filterType"], items: [i0.ɵɵInputFlags.None, "p-items", "items"], columns: [i0.ɵɵInputFlags.None, "p-columns", "columns"], container: [i0.ɵɵInputFlags.None, "p-container", "container"], paramDeleteApi: [i0.ɵɵInputFlags.None, "p-param-delete-api", "paramDeleteApi"], height: [i0.ɵɵInputFlags.None, "p-height", "height"], hideDetail: [i0.ɵɵInputFlags.None, "p-hide-detail", "hideDetail"], literals: [i0.ɵɵInputFlags.None, "p-literals", "literals"], loading: [i0.ɵɵInputFlags.None, "p-loading", "loading"], actions: [i0.ɵɵInputFlags.None, "p-actions", "actions"], selectable: [i0.ɵɵInputFlags.None, "p-selectable", "selectable"], infiniteScroll: [i0.ɵɵInputFlags.None, "p-infinite-scroll", "infiniteScroll"], infiniteScrollDistance: [i0.ɵɵInputFlags.None, "p-infinite-scroll-distance", "infiniteScrollDistance"], serviceApi: [i0.ɵɵInputFlags.None, "p-service-api", "serviceApi"], serviceDeleteApi: [i0.ɵɵInputFlags.None, "p-service-delete", "serviceDeleteApi"], spacing: [i0.ɵɵInputFlags.None, "p-spacing", "spacing"], filteredColumns: [i0.ɵɵInputFlags.None, "p-filtered-columns", "filteredColumns"], draggable: [i0.ɵɵInputFlags.None, "p-draggable", "draggable"] }, outputs: { allSelected: "p-all-selected", allUnselected: "p-all-unselected", collapsed: "p-collapsed", expanded: "p-expanded", eventDelete: "p-delete-items", selected: "p-selected", showMore: "p-show-more", sortBy: "p-sort-by", unselected: "p-unselected", changeVisibleColumns: "p-change-visible-columns", columnRestoreManager: "p-restore-column-manager" }, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature] });
|
|
21539
22023
|
}
|
|
21540
22024
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoTableBaseComponent, [{
|
|
21541
22025
|
type: Directive
|
|
@@ -21545,6 +22029,9 @@ class PoTableBaseComponent {
|
|
|
21545
22029
|
}], hideBatchActions: [{
|
|
21546
22030
|
type: Input,
|
|
21547
22031
|
args: [{ alias: 'p-hide-batch-actions', transform: convertToBoolean }]
|
|
22032
|
+
}], textWrap: [{
|
|
22033
|
+
type: Input,
|
|
22034
|
+
args: [{ alias: 'p-text-wrap', transform: convertToBoolean }]
|
|
21548
22035
|
}], hideActionFixedColumns: [{
|
|
21549
22036
|
type: Input,
|
|
21550
22037
|
args: ['p-hide-action-fixed-columns']
|
|
@@ -22650,7 +23137,7 @@ function PoTableComponent_ng_template_8_ng_container_15_Template(rf, ctx) { if (
|
|
|
22650
23137
|
i0.ɵɵadvance();
|
|
22651
23138
|
i0.ɵɵproperty("ngForOf", ctx_r66.filteredItems)("ngForTrackBy", ctx_r66.trackBy);
|
|
22652
23139
|
} }
|
|
22653
|
-
const _c20 = (a0, a1, a2, a3) => ({ "po-table-interactive": a0, "po-table-selectable": a1, "po-table-striped": a2, "po-table-data-fixed-columns": a3 });
|
|
23140
|
+
const _c20 = (a0, a1, a2, a3, a4) => ({ "po-table-interactive": a0, "po-table-selectable": a1, "po-table-striped": a2, "po-table-data-fixed-columns": a3, "po-table-text-wrap-enabled": a4 });
|
|
22654
23141
|
const _c21 = (a0, a1) => ({ "no-hover": a0, "po-table-column-drag": a1 });
|
|
22655
23142
|
function PoTableComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
22656
23143
|
const _r179 = i0.ɵɵgetCurrentView();
|
|
@@ -22664,11 +23151,11 @@ function PoTableComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
22664
23151
|
const _r60 = i0.ɵɵreference(9);
|
|
22665
23152
|
const _r62 = i0.ɵɵreference(11);
|
|
22666
23153
|
const ctx_r7 = i0.ɵɵnextContext();
|
|
22667
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵ
|
|
23154
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction5(16, _c20, ctx_r7.selectable || ctx_r7.sort, ctx_r7.selectable, ctx_r7.striped, ctx_r7.applyFixedColumns(), ctx_r7.textWrap));
|
|
22668
23155
|
i0.ɵɵattribute("p-spacing", ctx_r7.spacing);
|
|
22669
23156
|
i0.ɵɵadvance(2);
|
|
22670
23157
|
i0.ɵɵclassProp("po-table-header", !ctx_r7.height);
|
|
22671
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(
|
|
23158
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(22, _c21, ctx_r7.hideSelectAll, ctx_r7.isDraggable));
|
|
22672
23159
|
i0.ɵɵadvance();
|
|
22673
23160
|
i0.ɵɵproperty("ngIf", ctx_r7.hasSelectableColumn);
|
|
22674
23161
|
i0.ɵɵadvance();
|
|
@@ -23188,7 +23675,7 @@ function PoTableComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
23188
23675
|
i0.ɵɵstyleProp("height", ctx_r9.heightTableContainer, "px");
|
|
23189
23676
|
i0.ɵɵproperty("itemSize", ctx_r9.itemSize)("minBufferPx", ctx_r9.heightTableContainer < 100 ? 100 : ctx_r9.heightTableContainer)("maxBufferPx", ctx_r9.heightTableContainer < 200 ? 200 : ctx_r9.heightTableContainer);
|
|
23190
23677
|
i0.ɵɵadvance(2);
|
|
23191
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵ
|
|
23678
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction5(22, _c20, ctx_r9.selectable || ctx_r9.sort, ctx_r9.selectable, ctx_r9.striped, ctx_r9.applyFixedColumns(), ctx_r9.textWrap));
|
|
23192
23679
|
i0.ɵɵattribute("p-spacing", ctx_r9.spacing);
|
|
23193
23680
|
i0.ɵɵadvance();
|
|
23194
23681
|
i0.ɵɵstyleProp("top", ctx_r9.inverseOfTranslation);
|
|
@@ -24152,7 +24639,7 @@ class PoTableComponent extends PoTableBaseComponent {
|
|
|
24152
24639
|
i0.ɵɵelementStart(0, "div", 0);
|
|
24153
24640
|
i0.ɵɵtemplate(1, PoTableComponent_div_1_Template, 9, 4, "div", 1)(2, PoTableComponent_div_2_Template, 4, 2, "div", 2)(3, PoTableComponent_div_3_Template, 2, 3, "div", 3);
|
|
24154
24641
|
i0.ɵɵelementEnd();
|
|
24155
|
-
i0.ɵɵtemplate(4, PoTableComponent_po_container_4_Template, 2, 1, "po-container", 4)(5, PoTableComponent_ng_template_5_Template, 8, 10, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor)(7, PoTableComponent_div_7_Template, 3, 5, "div", 6)(8, PoTableComponent_ng_template_8_Template, 16,
|
|
24642
|
+
i0.ɵɵtemplate(4, PoTableComponent_po_container_4_Template, 2, 1, "po-container", 4)(5, PoTableComponent_ng_template_5_Template, 8, 10, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor)(7, PoTableComponent_div_7_Template, 3, 5, "div", 6)(8, PoTableComponent_ng_template_8_Template, 16, 25, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor)(10, PoTableComponent_ng_template_10_Template, 18, 28, "ng-template", null, 8, i0.ɵɵtemplateRefExtractor);
|
|
24156
24643
|
i0.ɵɵelement(12, "po-popup", 9, 10);
|
|
24157
24644
|
i0.ɵɵtemplate(14, PoTableComponent_ng_template_14_Template, 1, 1, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor)(16, PoTableComponent_ng_template_16_Template, 1, 2, "ng-template", null, 12, i0.ɵɵtemplateRefExtractor)(18, PoTableComponent_ng_template_18_Template, 1, 1, "ng-template", null, 13, i0.ɵɵtemplateRefExtractor)(20, PoTableComponent_ng_template_20_Template, 5, 6, "ng-template", null, 14, i0.ɵɵtemplateRefExtractor)(22, PoTableComponent_ng_template_22_Template, 2, 3, "ng-template", null, 15, i0.ɵɵtemplateRefExtractor)(24, PoTableComponent_ng_template_24_Template, 1, 1, "ng-template", null, 16, i0.ɵɵtemplateRefExtractor)(26, PoTableComponent_ng_template_26_Template, 2, 2, "ng-template", null, 17, i0.ɵɵtemplateRefExtractor)(28, PoTableComponent_po_table_column_manager_28_Template, 1, 6, "po-table-column-manager", 18);
|
|
24158
24645
|
i0.ɵɵelementStart(29, "po-modal", 19, 20)(31, "p", 21);
|
|
@@ -24182,7 +24669,7 @@ class PoTableComponent extends PoTableBaseComponent {
|
|
|
24182
24669
|
}
|
|
24183
24670
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoTableComponent, [{
|
|
24184
24671
|
type: Component,
|
|
24185
|
-
args: [{ selector: 'po-table', providers: [PoDateService], template: "<div class=\"po-table-actions\">\n <div\n #columnBatchActions\n *ngIf=\"hasValidColumns && itemsSelected.length > 0 && !hideBatchActions\"\n class=\"po-table-actions-batch-actions\"\n >\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\n <div class=\"po-table-actions-batch-actions__buttons\">\n <po-button\n p-icon=\"po-icon-delete\"\n [p-danger]=\"true\"\n [p-disabled]=\"itemsSelected.length > 1 && serviceDeleteApi !== undefined\"\n [p-label]=\"literals.delete\"\n (p-click)=\"modalDelete.open()\"\n ></po-button>\n </div>\n </div>\n\n <div #columnManager *ngIf=\"hasValidColumns && !hideColumnsManager\" class=\"po-table-actions-column-manager\">\n <po-button\n #columnManagerTarget\n p-icon=\"po-icon-settings\"\n p-kind=\"tertiary\"\n p-tooltip-position=\"left\"\n [p-aria-label]=\"literals.columnsManager\"\n [p-tooltip]=\"literals.columnsManager\"\n (p-click)=\"onOpenColumnManager()\"\n ></po-button>\n </div>\n\n <div *ngIf=\"!hideTableSearch && hasValidColumns\" class=\"po-table-search\">\n <po-search\n [p-items]=\"items\"\n [p-filter-keys]=\"filteredColumns\"\n [p-filter-type]=\"filterType\"\n (p-filtered-items-change)=\"onFilteredItemsChange($event)\"\n >\n </po-search>\n </div>\n</div>\n<po-container *ngIf=\"container; else tableContainerTemplate\" p-no-padding>\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n</po-container>\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-sticky]=\"loading\">\n <po-loading-overlay *ngIf=\"loading\" [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\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 <div *ngIf=\"height\" class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody class=\"po-table-container-fixed-inner\">\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n </div>\n\n <div *ngIf=\"!height\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"po-table-footer\" *ngIf=\"hasFooter\">\n <ng-container *ngFor=\"let column of subtitleColumns; trackBy: trackBy\">\n <po-table-subtitle-footer [p-literals]=\"literals\" [p-subtitles]=\"column.subtitles\"> </po-table-subtitle-footer>\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Show More Button -->\n<div\n *ngIf=\"!infiniteScroll\"\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-click)=\"onShowMore()\"\n >\n </po-button>\n</div>\n\n<!-- Table default-->\n<ng-template #tableTemplate>\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 }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead>\n <tr\n [ngClass]=\"{ '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 <th\n *ngIf=\"hasSelectableColumn\"\n [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\"\n class=\"po-table-column-selectable\"\n >\n <div [class.po-table-header-fixed-inner]=\"height\">\n <po-checkbox\n name=\"selectAll\"\n *ngIf=\"!hideSelectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n </div>\n </th>\n\n <th\n *ngIf=\"(hasMasterDetailColumn || hasRowTemplate) && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n <th\n #columnActionLeft\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n\n <th *ngIf=\"!hasMainColumns\" #noColumnsHeader class=\"po-table-header-column po-text-center\">\n <ng-container *ngIf=\"height; then noColumnsWithHeight; else noColumnsWithoutHeight\"> </ng-container>\n </th>\n\n <ng-container\n *ngIf=\"this.isDraggable || hasSomeFixed(); then tableDefaultThDragDrop; else tableDefaultThDefault\"\n >\n </ng-container>\n <ng-template #tableDefaultThDragDrop>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 [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 <ng-container *ngIf=\"this.isDraggable && !column.fixed\">\n <svg\n cdkDragHandle\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"9\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"18\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"18\" r=\"2\" fill=\"black\" />\n </svg>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n </ng-template>\n <ng-template #tableDefaultThDefault>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 [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 </ng-template>\n\n <th\n *ngIf=\"hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager)\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th\n *ngIf=\"hasVisibleActions && actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n </tr>\n </thead>\n\n <tbody class=\"po-table-group-row\" *ngIf=\"!hasItems || !hasMainColumns\">\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 <ng-container *ngIf=\"hasMainColumns\">\n <tbody class=\"po-table-group-row\" *ngFor=\"let row of filteredItems; let rowIndex = index; trackBy: trackBy\">\n <tr class=\"po-table-row\" [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\">\n <td *ngIf=\"selectable\" class=\"po-table-column-selectable\">\n <ng-container *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\">\n </ng-container>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table -->\n <td\n *ngIf=\"columnMasterDetail && !hideDetail && !hasRowTemplate\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n\n <!-- Valida se a origem do detail \u00E9 pela diretiva -->\n <td\n *ngIf=\"hasRowTemplate && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td\n *ngFor=\"let column of mainColumns; let columnIndex = index; trackBy: trackBy\"\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 [ngSwitch]=\"column.type\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n <span *ngSwitchCase=\"'columnTemplate'\">\n <ng-container *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'cellTemplate'\">\n <ng-container *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'boolean'\">\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n\n <span *ngSwitchCase=\"'currency'\">\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n\n <span *ngSwitchCase=\"'date'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n\n <span *ngSwitchCase=\"'time'\">\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n\n <span *ngSwitchCase=\"'dateTime'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n\n <span *ngSwitchCase=\"'number'\">\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n\n <po-table-column-link\n *ngSwitchCase=\"'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 <po-table-column-icon\n *ngSwitchCase=\"'icon'\"\n [p-column]=\"column\"\n [p-icons]=\"getColumnIcons(row, column)\"\n [p-row]=\"row\"\n >\n </po-table-column-icon>\n\n <span *ngSwitchCase=\"'subtitle'\">\n <po-table-subtitle-circle [p-subtitle]=\"getSubtitleColumn(row, column)\"></po-table-subtitle-circle>\n </span>\n <span *ngSwitchCase=\"'label'\">\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n <span *ngSwitchDefault>{{ getCellData(row, column) }}</span>\n </div>\n </td>\n\n <td\n *ngIf=\"hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"actionRight\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)\">\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 <tr *ngIf=\"hasMainColumns && isShowMasterDetail(row)\">\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-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n </tbody>\n </ng-container>\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 }\"\n [attr.p-spacing]=\"spacing\"\n >\n <thead class=\"po-table-header-sticky\" [style.top]=\"inverseOfTranslation\">\n <tr\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n <th\n *ngIf=\"hasSelectableColumn\"\n [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\"\n class=\"po-table-column-selectable\"\n >\n <div [class.po-table-header-fixed-inner]=\"height\">\n <po-checkbox\n name=\"selectAll\"\n *ngIf=\"!hideSelectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n </div>\n </th>\n\n <th\n *ngIf=\"(hasMasterDetailColumn || hasRowTemplate) && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n <th\n #columnActionLeft\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n\n <th *ngIf=\"!hasMainColumns\" #noColumnsHeader class=\"po-table-header-column po-text-center\">\n <ng-container *ngIf=\"height; then noColumnsWithHeight; else noColumnsWithoutHeight\"> </ng-container>\n </th>\n\n <ng-container\n *ngIf=\"\n this.isDraggable || hasSomeFixed();\n then tableVirtualScrollThDragDrop;\n else tableVirtualScrollThDefault\n \"\n >\n </ng-container>\n <ng-template #tableVirtualScrollThDragDrop>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 <ng-container *ngIf=\"this.isDraggable && !column.fixed\">\n <svg\n cdkDragHandle\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"9\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"18\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"18\" r=\"2\" fill=\"black\" />\n </svg>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n </ng-template>\n <ng-template #tableVirtualScrollThDefault>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 }\"> </ng-container>\n </div>\n </th>\n </ng-template>\n\n <th\n *ngIf=\"hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager)\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th\n *ngIf=\"hasVisibleActions && actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n </tr>\n </thead>\n\n <tbody class=\"po-table-group-row\" *ngIf=\"!hasItems || !hasMainColumns\">\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 <ng-container *ngIf=\"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 <td *ngIf=\"selectable\" class=\"po-table-column-selectable\">\n <ng-container *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\">\n </ng-container>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table -->\n <td\n *ngIf=\"columnMasterDetail && !hideDetail && !hasRowTemplate\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n\n <!-- Valida se a origem do detail \u00E9 pela diretiva -->\n <td\n *ngIf=\"hasRowTemplate && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td\n *ngFor=\"let column of mainColumns; let columnIndex = index; trackBy: trackBy\"\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 [ngSwitch]=\"column.type\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n <span *ngSwitchCase=\"'columnTemplate'\">\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'cellTemplate'\">\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'boolean'\">\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n\n <span *ngSwitchCase=\"'currency'\">\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n\n <span *ngSwitchCase=\"'date'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n\n <span *ngSwitchCase=\"'time'\">\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n\n <span *ngSwitchCase=\"'dateTime'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n\n <span *ngSwitchCase=\"'number'\">\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n\n <po-table-column-link\n *ngSwitchCase=\"'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 <po-table-column-icon\n *ngSwitchCase=\"'icon'\"\n [p-column]=\"column\"\n [p-icons]=\"getColumnIcons(row, column)\"\n [p-row]=\"row\"\n >\n </po-table-column-icon>\n\n <span *ngSwitchCase=\"'subtitle'\">\n <po-table-subtitle-circle [p-subtitle]=\"getSubtitleColumn(row, column)\"></po-table-subtitle-circle>\n </span>\n <span *ngSwitchCase=\"'label'\">\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n <span *ngSwitchDefault>{{ getCellData(row, column) }}</span>\n </div>\n </td>\n\n <td\n *ngIf=\"hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"actionRight\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)\">\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 <tr *ngIf=\"hasMainColumns && isShowMasterDetail(row)\">\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-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n </tbody>\n </ng-container>\n </table>\n </cdk-virtual-scroll-viewport>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n <span\n *ngIf=\"(containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)\"\n class=\"po-icon po-clickable\"\n [class.po-icon-arrow-up]=\"row.$showDetail\"\n [class.po-icon-arrow-down]=\"!row.$showDetail\"\n >\n </span>\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <po-radio [name]=\"idRadio\" [p-checked]=\"row.$selected\" (p-change-selected)=\"selectRow(row)\"></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\"\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 <span\n *ngIf=\"sort && column.sortable !== false\"\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 <ng-container *ngIf=\"JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M18.2929 15.2929L17 16.5858L17 10C17 9.44772 16.5523 9 16 9C15.4477 9 15 9.44772 15 10L15 16.5858L13.7071 15.2929C13.3166 14.9024 12.6834 14.9024 12.2929 15.2929C11.9024 15.6834 11.9024 16.3166 12.2929 16.7071L15.2929 19.7071C15.6834 20.0976 16.3166 20.0976 16.7071 19.7071L19.7071 16.7071C20.0976 16.3166 20.0976 15.6834 19.7071 15.2929C19.3166 14.9024 18.6834 14.9024 18.2929 15.2929ZM5.70716 8.7071L7.00006 7.4142L7.00003 14C7.00002 14.5523 7.44774 15 8.00002 15C8.55231 15 9.00002 14.5523 9.00003 14L9.00006 7.41418L10.2929 8.70707C10.6835 9.09759 11.3166 9.09758 11.7072 8.70706C12.0977 8.31653 12.0977 7.68336 11.7072 7.29284L8.70718 4.29286C8.31665 3.90234 7.68349 3.90235 7.29296 4.29287L4.29295 7.29289C3.90242 7.68342 3.90242 8.31658 4.29294 8.70711C4.68347 9.09763 5.31663 9.09762 5.70716 8.7071Z\"\n fill=\"#1D1D30\"\n />\n </svg>\n </ng-container>\n\n <ng-container *ngIf=\"JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M11 9.41421L9.70711 10.7071C9.31658 11.0976 8.68342 11.0976 8.29289 10.7071C7.90237 10.3166 7.90237 9.68342 8.29289 9.29289L11.2929 6.29289C11.6834 5.90237 12.3166 5.90237 12.7071 6.29289L15.7071 9.29289C16.0976 9.68342 16.0976 10.3166 15.7071 10.7071C15.3166 11.0976 14.6834 11.0976 14.2929 10.7071L13 9.41421V16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16V9.41421Z\"\n fill=\"black\"\n />\n </svg>\n </ng-container>\n\n <ng-container *ngIf=\"JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M9.70711 13.2929L11 14.5858V7C11 6.44772 11.4477 6 12 6C12.5523 6 13 6.44772 13 7V14.5858L14.2929 13.2929C14.6834 12.9024 15.3166 12.9024 15.7071 13.2929C16.0976 13.6834 16.0976 14.3166 15.7071 14.7071L12.7071 17.7071C12.3166 18.0976 11.6834 18.0976 11.2929 17.7071L8.29289 14.7071C7.90237 14.3166 7.90237 13.6834 8.29289 13.2929C8.68342 12.9024 9.31658 12.9024 9.70711 13.2929Z\"\n fill=\"black\"\n />\n </svg>\n </ng-container>\n </span>\n</ng-template>\n\n<ng-template #noColumnsWithHeight>\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"headerWidth\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n</ng-template>\n\n<ng-template #noColumnsWithoutHeight>\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n</ng-template>\n\n<!-- Template de a\u00E7\u00F5es -->\n<ng-template #ActionsColumnTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <td\n *ngIf=\"isSingleAction\"\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 <div\n *ngIf=\"firstAction.visible !== false\"\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 <po-icon *ngIf=\"firstAction.icon\" class=\"po-table-single-action-content\" [p-icon]=\"firstAction.icon\"></po-icon>\n {{ firstAction.label }}\n </div>\n </td>\n\n <td *ngIf=\"visibleActions.length > 1\" class=\"po-table-column-actions\">\n <span #popupTarget class=\"po-icon po-icon-more po-clickable\" (click)=\"togglePopup(row, popupTarget)\"></span>\n </td>\n</ng-template>\n\n<po-table-column-manager\n *ngIf=\"!hideColumnsManager\"\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-columns-default]=\"initialColumns\"\n (p-initial-columns)=\"onColumnRestoreManager($event)\"\n>\n</po-table-column-manager>\n\n<po-modal\n #modalDelete\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" }]
|
|
24672
|
+
args: [{ selector: 'po-table', providers: [PoDateService], template: "<div class=\"po-table-actions\">\n <div\n #columnBatchActions\n *ngIf=\"hasValidColumns && itemsSelected.length > 0 && !hideBatchActions\"\n class=\"po-table-actions-batch-actions\"\n >\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\n <div class=\"po-table-actions-batch-actions__buttons\">\n <po-button\n p-icon=\"po-icon-delete\"\n [p-danger]=\"true\"\n [p-disabled]=\"itemsSelected.length > 1 && serviceDeleteApi !== undefined\"\n [p-label]=\"literals.delete\"\n (p-click)=\"modalDelete.open()\"\n ></po-button>\n </div>\n </div>\n\n <div #columnManager *ngIf=\"hasValidColumns && !hideColumnsManager\" class=\"po-table-actions-column-manager\">\n <po-button\n #columnManagerTarget\n p-icon=\"po-icon-settings\"\n p-kind=\"tertiary\"\n p-tooltip-position=\"left\"\n [p-aria-label]=\"literals.columnsManager\"\n [p-tooltip]=\"literals.columnsManager\"\n (p-click)=\"onOpenColumnManager()\"\n ></po-button>\n </div>\n\n <div *ngIf=\"!hideTableSearch && hasValidColumns\" class=\"po-table-search\">\n <po-search\n [p-items]=\"items\"\n [p-filter-keys]=\"filteredColumns\"\n [p-filter-type]=\"filterType\"\n (p-filtered-items-change)=\"onFilteredItemsChange($event)\"\n >\n </po-search>\n </div>\n</div>\n<po-container *ngIf=\"container; else tableContainerTemplate\" p-no-padding>\n <ng-container *ngTemplateOutlet=\"tableContainerTemplate\"></ng-container>\n</po-container>\n\n<ng-template #tableContainerTemplate>\n <div [class.po-table-container-sticky]=\"loading\">\n <po-loading-overlay *ngIf=\"loading\" [p-text]=\"literals.loadingData\" [p-size]=\"sizeLoading\"></po-loading-overlay>\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 <div *ngIf=\"height\" class=\"po-table-container\" [style.height.px]=\"heightTableContainer\">\n <div #poTableTbody class=\"po-table-container-fixed-inner\">\n <ng-container *ngTemplateOutlet=\"tableVirtualScrollTemplate\"></ng-container>\n </div>\n </div>\n\n <div *ngIf=\"!height\">\n <ng-container *ngTemplateOutlet=\"tableTemplate\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"po-table-footer\" *ngIf=\"hasFooter\">\n <ng-container *ngFor=\"let column of subtitleColumns; trackBy: trackBy\">\n <po-table-subtitle-footer [p-literals]=\"literals\" [p-subtitles]=\"column.subtitles\"> </po-table-subtitle-footer>\n </ng-container>\n </div>\n</ng-template>\n\n<!-- Show More Button -->\n<div\n *ngIf=\"!infiniteScroll\"\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-click)=\"onShowMore()\"\n >\n </po-button>\n</div>\n\n<!-- Table default-->\n<ng-template #tableTemplate>\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 <tr\n [ngClass]=\"{ '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 <th\n *ngIf=\"hasSelectableColumn\"\n [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\"\n class=\"po-table-column-selectable\"\n >\n <div [class.po-table-header-fixed-inner]=\"height\">\n <po-checkbox\n name=\"selectAll\"\n *ngIf=\"!hideSelectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n </div>\n </th>\n\n <th\n *ngIf=\"(hasMasterDetailColumn || hasRowTemplate) && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n <th\n #columnActionLeft\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n\n <th *ngIf=\"!hasMainColumns\" #noColumnsHeader class=\"po-table-header-column po-text-center\">\n <ng-container *ngIf=\"height; then noColumnsWithHeight; else noColumnsWithoutHeight\"> </ng-container>\n </th>\n\n <ng-container\n *ngIf=\"this.isDraggable || hasSomeFixed(); then tableDefaultThDragDrop; else tableDefaultThDefault\"\n >\n </ng-container>\n <ng-template #tableDefaultThDragDrop>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 [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 <ng-container *ngIf=\"this.isDraggable && !column.fixed\">\n <svg\n cdkDragHandle\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"9\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"18\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"18\" r=\"2\" fill=\"black\" />\n </svg>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n </ng-template>\n <ng-template #tableDefaultThDefault>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 [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 </ng-template>\n\n <th\n *ngIf=\"hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager)\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th\n *ngIf=\"hasVisibleActions && actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n </tr>\n </thead>\n\n <tbody class=\"po-table-group-row\" *ngIf=\"!hasItems || !hasMainColumns\">\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 <ng-container *ngIf=\"hasMainColumns\">\n <tbody class=\"po-table-group-row\" *ngFor=\"let row of filteredItems; let rowIndex = index; trackBy: trackBy\">\n <tr class=\"po-table-row\" [class.po-table-row-active]=\"row.$selected || (row.$selected === null && selectable)\">\n <td *ngIf=\"selectable\" class=\"po-table-column-selectable\">\n <ng-container *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\">\n </ng-container>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table -->\n <td\n *ngIf=\"columnMasterDetail && !hideDetail && !hasRowTemplate\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n\n <!-- Valida se a origem do detail \u00E9 pela diretiva -->\n <td\n *ngIf=\"hasRowTemplate && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td\n *ngFor=\"let column of mainColumns; let columnIndex = index; trackBy: trackBy\"\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 [ngSwitch]=\"column.type\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n <span *ngSwitchCase=\"'columnTemplate'\">\n <ng-container *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'cellTemplate'\">\n <ng-container *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\">\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'boolean'\">\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n\n <span *ngSwitchCase=\"'currency'\">\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n\n <span *ngSwitchCase=\"'date'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n\n <span *ngSwitchCase=\"'time'\">\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n\n <span *ngSwitchCase=\"'dateTime'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n\n <span *ngSwitchCase=\"'number'\">\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n\n <po-table-column-link\n *ngSwitchCase=\"'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 <po-table-column-icon\n *ngSwitchCase=\"'icon'\"\n [p-column]=\"column\"\n [p-icons]=\"getColumnIcons(row, column)\"\n [p-row]=\"row\"\n >\n </po-table-column-icon>\n\n <span *ngSwitchCase=\"'subtitle'\">\n <po-table-subtitle-circle [p-subtitle]=\"getSubtitleColumn(row, column)\"></po-table-subtitle-circle>\n </span>\n <span *ngSwitchCase=\"'label'\">\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n <span *ngSwitchDefault>{{ getCellData(row, column) }}</span>\n </div>\n </td>\n\n <td\n *ngIf=\"hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"actionRight\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)\">\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 <tr *ngIf=\"hasMainColumns && isShowMasterDetail(row)\">\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-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n </tbody>\n </ng-container>\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 class=\"po-table-header-sticky\" [style.top]=\"inverseOfTranslation\">\n <tr\n [class.po-table-header]=\"!height\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n <th\n *ngIf=\"hasSelectableColumn\"\n [style.pointer-events]=\"hideSelectAll ? 'none' : 'auto'\"\n class=\"po-table-column-selectable\"\n >\n <div [class.po-table-header-fixed-inner]=\"height\">\n <po-checkbox\n name=\"selectAll\"\n *ngIf=\"!hideSelectAll\"\n (p-change)=\"selectAllRows()\"\n [p-checkboxValue]=\"selectAll === null ? 'mixed' : selectAll\"\n ></po-checkbox>\n </div>\n </th>\n\n <th\n *ngIf=\"(hasMasterDetailColumn || hasRowTemplate) && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <!-- Coluna criada para caso as a\u00E7\u00F5es fiquem no lado esquerdo -->\n <th\n #columnActionLeft\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-master-detail]=\"!isSingleAction\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n ></th>\n\n <th *ngIf=\"!hasMainColumns\" #noColumnsHeader class=\"po-table-header-column po-text-center\">\n <ng-container *ngIf=\"height; then noColumnsWithHeight; else noColumnsWithoutHeight\"> </ng-container>\n </th>\n\n <ng-container\n *ngIf=\"\n this.isDraggable || hasSomeFixed();\n then tableVirtualScrollThDragDrop;\n else tableVirtualScrollThDefault\n \"\n >\n </ng-container>\n <ng-template #tableVirtualScrollThDragDrop>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 <ng-container *ngIf=\"this.isDraggable && !column.fixed\">\n <svg\n cdkDragHandle\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"9\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"6\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"12\" r=\"2\" fill=\"black\" />\n <circle cx=\"9\" cy=\"18\" r=\"2\" fill=\"black\" />\n <circle cx=\"15\" cy=\"18\" r=\"2\" fill=\"black\" />\n </svg>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"contentHeaderTemplate; context: { $implicit: column }\"> </ng-container>\n </div>\n </th>\n </ng-template>\n <ng-template #tableVirtualScrollThDefault>\n <th\n *ngFor=\"let column of mainColumns; let i = index; trackBy: trackBy\"\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 }\"> </ng-container>\n </div>\n </th>\n </ng-template>\n\n <th\n *ngIf=\"hasRowTemplateWithArrowDirectionRight && (hasVisibleActions || hideColumnsManager)\"\n class=\"po-table-header-column po-table-header-master-detail\"\n ></th>\n\n <th\n *ngIf=\"hasVisibleActions && actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [class.po-table-header-single-action]=\"isSingleAction\"\n [class.po-table-header-actions]=\"!isSingleAction\"\n ></th>\n </tr>\n </thead>\n\n <tbody class=\"po-table-group-row\" *ngIf=\"!hasItems || !hasMainColumns\">\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 <ng-container *ngIf=\"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 <td *ngIf=\"selectable\" class=\"po-table-column-selectable\">\n <ng-container *ngTemplateOutlet=\"singleSelect ? inputRadio : inputCheckbox; context: { $implicit: row }\">\n </ng-container>\n </td>\n\n <!-- Valida se a origem do detail \u00E9 pelo input do po-table -->\n <td\n *ngIf=\"columnMasterDetail && !hideDetail && !hasRowTemplate\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"!actionRight && (visibleActions.length > 1 || isSingleAction)\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n\n <!-- Valida se a origem do detail \u00E9 pela diretiva -->\n <td\n *ngIf=\"hasRowTemplate && !hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"poTableColumnDetail\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </td>\n\n <td\n *ngFor=\"let column of mainColumns; let columnIndex = index; trackBy: trackBy\"\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 [ngSwitch]=\"column.type\"\n [p-tooltip]=\"tooltipText\"\n [p-append-in-body]=\"true\"\n (mouseenter)=\"tooltipMouseEnter($event, column, row)\"\n (mouseleave)=\"tooltipMouseLeave()\"\n >\n <span *ngSwitchCase=\"'columnTemplate'\">\n <ng-container\n *ngTemplateOutlet=\"getTemplate(column); context: { $implicit: getCellData(row, column) }\"\n >\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'cellTemplate'\">\n <ng-container\n *ngTemplateOutlet=\"tableCellTemplate?.templateRef; context: { row: row, column: column }\"\n >\n </ng-container>\n </span>\n\n <span *ngSwitchCase=\"'boolean'\">\n {{ getBooleanLabel(getCellData(row, column), column) }}\n </span>\n\n <span *ngSwitchCase=\"'currency'\">\n {{ getCellData(row, column) | currency: column.format : 'symbol' : '1.2-2' }}\n </span>\n\n <span *ngSwitchCase=\"'date'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy' }}\n </span>\n\n <span *ngSwitchCase=\"'time'\">\n {{ getCellData(row, column) | po_time: column.format || 'HH:mm:ss.ffffff' }}\n </span>\n\n <span *ngSwitchCase=\"'dateTime'\">\n {{ getCellData(row, column) | date: column.format || 'dd/MM/yyyy HH:mm:ss' }}\n </span>\n\n <span *ngSwitchCase=\"'number'\">\n {{ formatNumber(getCellData(row, column), column.format) }}\n </span>\n\n <po-table-column-link\n *ngSwitchCase=\"'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 <po-table-column-icon\n *ngSwitchCase=\"'icon'\"\n [p-column]=\"column\"\n [p-icons]=\"getColumnIcons(row, column)\"\n [p-row]=\"row\"\n >\n </po-table-column-icon>\n\n <span *ngSwitchCase=\"'subtitle'\">\n <po-table-subtitle-circle [p-subtitle]=\"getSubtitleColumn(row, column)\"></po-table-subtitle-circle>\n </span>\n <span *ngSwitchCase=\"'label'\">\n <po-table-column-label [p-value]=\"getColumnLabel(row, column)\"> </po-table-column-label>\n </span>\n <span *ngSwitchDefault>{{ getCellData(row, column) }}</span>\n </div>\n </td>\n\n <td\n *ngIf=\"hasRowTemplateWithArrowDirectionRight\"\n class=\"po-table-column-detail-toggle\"\n (click)=\"toggleDetail(row)\"\n >\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 <ng-template\n *ngIf=\"actionRight\"\n [ngTemplateOutlet]=\"ActionsColumnTemplate\"\n [ngTemplateOutletContext]=\"{ row: row, rowIndex: rowIndex }\"\n >\n </ng-template>\n </tr>\n\n <tr *ngIf=\"hasMainColumns && hasRowTemplate && row.$showDetail && isShowRowTemplate(row, rowIndex)\">\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 <tr *ngIf=\"hasMainColumns && isShowMasterDetail(row)\">\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-select-row)=\"selectDetailRow($event)\"\n >\n </po-table-detail>\n </td>\n </tr>\n </tbody>\n </ng-container>\n </table>\n </cdk-virtual-scroll-viewport>\n</ng-template>\n\n<po-popup #popup [p-actions]=\"actions\" [p-target]=\"popupTarget\"> </po-popup>\n\n<ng-template #poTableColumnDetail let-row=\"row\" let-rowIndex=\"rowIndex\">\n <span\n *ngIf=\"(containsMasterDetail(row) && !hasRowTemplate) || (isShowRowTemplate(row, rowIndex) && hasRowTemplate)\"\n class=\"po-icon po-clickable\"\n [class.po-icon-arrow-up]=\"row.$showDetail\"\n [class.po-icon-arrow-down]=\"!row.$showDetail\"\n >\n </span>\n</ng-template>\n\n<ng-template #inputRadio let-row>\n <po-radio [name]=\"idRadio\" [p-checked]=\"row.$selected\" (p-change-selected)=\"selectRow(row)\"></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\"\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 <span\n *ngIf=\"sort && column.sortable !== false\"\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 <ng-container *ngIf=\"JSON.stringify(sortedColumn?.property) !== JSON.stringify(column)\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M18.2929 15.2929L17 16.5858L17 10C17 9.44772 16.5523 9 16 9C15.4477 9 15 9.44772 15 10L15 16.5858L13.7071 15.2929C13.3166 14.9024 12.6834 14.9024 12.2929 15.2929C11.9024 15.6834 11.9024 16.3166 12.2929 16.7071L15.2929 19.7071C15.6834 20.0976 16.3166 20.0976 16.7071 19.7071L19.7071 16.7071C20.0976 16.3166 20.0976 15.6834 19.7071 15.2929C19.3166 14.9024 18.6834 14.9024 18.2929 15.2929ZM5.70716 8.7071L7.00006 7.4142L7.00003 14C7.00002 14.5523 7.44774 15 8.00002 15C8.55231 15 9.00002 14.5523 9.00003 14L9.00006 7.41418L10.2929 8.70707C10.6835 9.09759 11.3166 9.09758 11.7072 8.70706C12.0977 8.31653 12.0977 7.68336 11.7072 7.29284L8.70718 4.29286C8.31665 3.90234 7.68349 3.90235 7.29296 4.29287L4.29295 7.29289C3.90242 7.68342 3.90242 8.31658 4.29294 8.70711C4.68347 9.09763 5.31663 9.09762 5.70716 8.7071Z\"\n fill=\"#1D1D30\"\n />\n </svg>\n </ng-container>\n\n <ng-container *ngIf=\"JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && sortedColumn.ascending\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M11 9.41421L9.70711 10.7071C9.31658 11.0976 8.68342 11.0976 8.29289 10.7071C7.90237 10.3166 7.90237 9.68342 8.29289 9.29289L11.2929 6.29289C11.6834 5.90237 12.3166 5.90237 12.7071 6.29289L15.7071 9.29289C16.0976 9.68342 16.0976 10.3166 15.7071 10.7071C15.3166 11.0976 14.6834 11.0976 14.2929 10.7071L13 9.41421V16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16V9.41421Z\"\n fill=\"black\"\n />\n </svg>\n </ng-container>\n\n <ng-container *ngIf=\"JSON.stringify(sortedColumn?.property) === JSON.stringify(column) && !sortedColumn.ascending\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M9.70711 13.2929L11 14.5858V7C11 6.44772 11.4477 6 12 6C12.5523 6 13 6.44772 13 7V14.5858L14.2929 13.2929C14.6834 12.9024 15.3166 12.9024 15.7071 13.2929C16.0976 13.6834 16.0976 14.3166 15.7071 14.7071L12.7071 17.7071C12.3166 18.0976 11.6834 18.0976 11.2929 17.7071L8.29289 14.7071C7.90237 14.3166 7.90237 13.6834 8.29289 13.2929C8.68342 12.9024 9.31658 12.9024 9.70711 13.2929Z\"\n fill=\"black\"\n />\n </svg>\n </ng-container>\n </span>\n</ng-template>\n\n<ng-template #noColumnsWithHeight>\n <div class=\"po-table-header-fixed-inner\" [style.width.px]=\"headerWidth\">\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n </div>\n</ng-template>\n\n<ng-template #noColumnsWithoutHeight>\n {{ hasValidColumns ? literals.noVisibleColumn : literals.noColumns }}\n</ng-template>\n\n<!-- Template de a\u00E7\u00F5es -->\n<ng-template #ActionsColumnTemplate let-row=\"row\" let-rowIndex=\"rowIndex\">\n <td\n *ngIf=\"isSingleAction\"\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 <div\n *ngIf=\"firstAction.visible !== false\"\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 <po-icon *ngIf=\"firstAction.icon\" class=\"po-table-single-action-content\" [p-icon]=\"firstAction.icon\"></po-icon>\n {{ firstAction.label }}\n </div>\n </td>\n\n <td *ngIf=\"visibleActions.length > 1\" class=\"po-table-column-actions\">\n <span #popupTarget class=\"po-icon po-icon-more po-clickable\" (click)=\"togglePopup(row, popupTarget)\"></span>\n </td>\n</ng-template>\n\n<po-table-column-manager\n *ngIf=\"!hideColumnsManager\"\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-columns-default]=\"initialColumns\"\n (p-initial-columns)=\"onColumnRestoreManager($event)\"\n>\n</po-table-column-manager>\n\n<po-modal\n #modalDelete\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" }]
|
|
24186
24673
|
}], () => [{ type: PoDateService }, { type: i0.IterableDiffers }, { type: i0.Renderer2 }, { type: PoLanguageService }, { type: i0.ChangeDetectorRef }, { type: i1.DecimalPipe }, { type: i2.Router }, { type: PoTableService }], { tableRowTemplate: [{
|
|
24187
24674
|
type: ContentChild,
|
|
24188
24675
|
args: [PoTableRowTemplateDirective, { static: true }]
|
|
@@ -55748,9 +56235,213 @@ function initializeLanguageDefault(config, languageService) {
|
|
|
55748
56235
|
return setDefaultLanguage;
|
|
55749
56236
|
}
|
|
55750
56237
|
|
|
56238
|
+
/**
|
|
56239
|
+
* Define as cores de ação padrão para temas escuros.
|
|
56240
|
+
*/
|
|
56241
|
+
const poThemeDefaultActionsDark = {
|
|
56242
|
+
/** Cor padrão. */
|
|
56243
|
+
default: 'var(--color-brand-01-dark)',
|
|
56244
|
+
/** Cor ao passar o mouse. */
|
|
56245
|
+
hover: 'var(--color-brand-01-darker)',
|
|
56246
|
+
/** Cor quando pressionado. */
|
|
56247
|
+
pressed: 'var(--color-brand-01-darkest)',
|
|
56248
|
+
/** Cor quando desabilitado. */
|
|
56249
|
+
disabled: 'var(--color-neutral-mid-40)',
|
|
56250
|
+
/** Cor ao focar. */
|
|
56251
|
+
focus: 'var(--color-brand-01-darkest)'
|
|
56252
|
+
};
|
|
56253
|
+
/**
|
|
56254
|
+
* Define as cores neutras padrão para temas escuros.
|
|
56255
|
+
*/
|
|
56256
|
+
const poThemeDefaultNeutralsDark = {
|
|
56257
|
+
/** Tons de cinza claro. */
|
|
56258
|
+
light: {
|
|
56259
|
+
'00': '#1c1c1c',
|
|
56260
|
+
'05': '#202020',
|
|
56261
|
+
'10': '#2b2b2b',
|
|
56262
|
+
'20': '#3b3b3b',
|
|
56263
|
+
'30': '#5a5a5a'
|
|
56264
|
+
},
|
|
56265
|
+
/** Tons de cinza intermediários. */
|
|
56266
|
+
mid: {
|
|
56267
|
+
'40': '#7c7c7c',
|
|
56268
|
+
'60': '#a1a1a1'
|
|
56269
|
+
},
|
|
56270
|
+
/** Tons de cinza escuro. */
|
|
56271
|
+
dark: {
|
|
56272
|
+
'70': '#c1c1c1',
|
|
56273
|
+
'80': '#d9d9d9',
|
|
56274
|
+
'90': '#eeeeee',
|
|
56275
|
+
'95': '#fbfbfb'
|
|
56276
|
+
}
|
|
56277
|
+
};
|
|
56278
|
+
/**
|
|
56279
|
+
* Define as cores de feedback padrão para temas escuros.
|
|
56280
|
+
*/
|
|
56281
|
+
const poThemeDefaultFeedbackDark = {
|
|
56282
|
+
/** Cores para feedback negativo. */
|
|
56283
|
+
negative: {
|
|
56284
|
+
lightest: '#4a1512',
|
|
56285
|
+
lighter: '#72211d',
|
|
56286
|
+
light: '#9b2d27',
|
|
56287
|
+
base: '#be3e37',
|
|
56288
|
+
dark: '#d58581',
|
|
56289
|
+
darker: '#e3aeab',
|
|
56290
|
+
darkest: '#f6e6e5'
|
|
56291
|
+
},
|
|
56292
|
+
/** Cores para feedback informativo. */
|
|
56293
|
+
info: {
|
|
56294
|
+
lightest: '#081536',
|
|
56295
|
+
lighter: '#0f2557',
|
|
56296
|
+
light: '#173782',
|
|
56297
|
+
base: '#23489f',
|
|
56298
|
+
dark: '#7996d7',
|
|
56299
|
+
darker: '#b0c1e8',
|
|
56300
|
+
darkest: '#e3e9f7'
|
|
56301
|
+
},
|
|
56302
|
+
/** Cores para feedback positivo. */
|
|
56303
|
+
positive: {
|
|
56304
|
+
lightest: '#002415',
|
|
56305
|
+
lighter: '#083a25',
|
|
56306
|
+
light: '#0f5236',
|
|
56307
|
+
base: '#107048',
|
|
56308
|
+
dark: '#41b483',
|
|
56309
|
+
darker: '#7ecead',
|
|
56310
|
+
darkest: '#def7ed'
|
|
56311
|
+
},
|
|
56312
|
+
/** Cores para feedback de aviso. */
|
|
56313
|
+
warning: {
|
|
56314
|
+
lightest: '#473400',
|
|
56315
|
+
lighter: '#705200',
|
|
56316
|
+
light: '#d8a20e',
|
|
56317
|
+
base: '#efba2a',
|
|
56318
|
+
dark: '#f1cd6a',
|
|
56319
|
+
darker: '#f7dd97',
|
|
56320
|
+
darkest: '#fcf6e3'
|
|
56321
|
+
}
|
|
56322
|
+
};
|
|
56323
|
+
/**
|
|
56324
|
+
* Define estilos específicos por componente e onRoot para temas escuros.
|
|
56325
|
+
*/
|
|
56326
|
+
const poThemeDefaultDarkValues = {
|
|
56327
|
+
perComponent: {
|
|
56328
|
+
/** TAB */
|
|
56329
|
+
'.po-tab-border-active': {
|
|
56330
|
+
'background-color': 'var(--color-tab-button-box-shadow-active, var(--color))'
|
|
56331
|
+
},
|
|
56332
|
+
/** GAUGE */
|
|
56333
|
+
'.po-gauge-wrapper': {
|
|
56334
|
+
'background-color': 'var(--color-neutral-light-00)'
|
|
56335
|
+
},
|
|
56336
|
+
/** OVERLAY */
|
|
56337
|
+
'po-overlay': {
|
|
56338
|
+
'--color-overlay': 'var(--color-neutral-light-20)'
|
|
56339
|
+
},
|
|
56340
|
+
/** MODAL */
|
|
56341
|
+
'po-modal': {
|
|
56342
|
+
'--color-overlay': 'var(--color-neutral-light-20)'
|
|
56343
|
+
},
|
|
56344
|
+
/** TOASTER */
|
|
56345
|
+
'po-toaster': {
|
|
56346
|
+
'--color-icon': 'var(--color-neutral-dark-80)'
|
|
56347
|
+
},
|
|
56348
|
+
/** BADGE */
|
|
56349
|
+
'po-badge': {
|
|
56350
|
+
'--color': 'var(--color-neutral-dark-95)'
|
|
56351
|
+
},
|
|
56352
|
+
'po-badge[p-status=warning]': {
|
|
56353
|
+
'--color': 'var(--color-neutral-light-00)'
|
|
56354
|
+
},
|
|
56355
|
+
// CHART: AXIS LABEL
|
|
56356
|
+
'po-chart po-chart-container > svg .po-chart-axis-x-label, .po-chart-axis-y-label': {
|
|
56357
|
+
'fill': 'var(--color-neutral-dark-95)'
|
|
56358
|
+
},
|
|
56359
|
+
// RICH-TEXT: color button border
|
|
56360
|
+
'po-rich-text-toolbar .po-button-default.po-rich-text-toolbar-color-picker-button': {
|
|
56361
|
+
'border-style': 'solid'
|
|
56362
|
+
},
|
|
56363
|
+
// LINK: item visitado
|
|
56364
|
+
'po-link': {
|
|
56365
|
+
'--text-color-visited': 'var(--color-action-default)'
|
|
56366
|
+
},
|
|
56367
|
+
// focus e outline: po-rich-text-body/ poinfo/ po-list-view/ po-stepper-circle (mudar no po-style)
|
|
56368
|
+
'po-rich-text-body .po-rich-text-body:focus-visible, po-info .po-info-link:focus-visible, po-list-view a.po-list-view-title-link:focus-visible, po-stepper-circle .po-stepper-circle:focus-visible': {
|
|
56369
|
+
'border-color': 'var(--color-action-default);',
|
|
56370
|
+
'outline-color': 'var(--color-action-focus);',
|
|
56371
|
+
'outline-width': 'var(--outline-width-focus-visible);',
|
|
56372
|
+
'outline-style': 'solid;',
|
|
56373
|
+
'outline-offset': '2px;'
|
|
56374
|
+
},
|
|
56375
|
+
// background container
|
|
56376
|
+
'po-container': {
|
|
56377
|
+
'--background': 'var(--color-neutral-light-00);'
|
|
56378
|
+
},
|
|
56379
|
+
// Background input disabled
|
|
56380
|
+
'div.po-lookup-filter-content input.po-input, input.po-input, po-datepicker, po-datepicker-range, po-decimal, po-email, po-input, po-login, po-lookup, po-number, po-password, po-url, po-combo, po-search, po-select, po-multiselect': {
|
|
56381
|
+
'--background-disabled': 'var(--color-neutral-light-20);'
|
|
56382
|
+
},
|
|
56383
|
+
// autocomplete dos inputs (setar no po-style)
|
|
56384
|
+
'po-input input:-webkit-autofill, po-datepicker input:-webkit-autofill, po-datepicker-range input:-webkit-autofill, po-decimal input:-webkit-autofill, po-email input:-webkit-autofill, po-input input:-webkit-autofill, po-login input:-webkit-autofill, po-lookup input:-webkit-autofill, po-number input:-webkit-autofill, po-password input:-webkit-autofill, po-url input:-webkit-autofill, po-combo input:-webkit-autofill': {
|
|
56385
|
+
'-webkit-background-clip': 'text',
|
|
56386
|
+
'-webkit-text-fill-color': '#ffffff',
|
|
56387
|
+
'transition': 'background-color 5000s ease-in-out 0s',
|
|
56388
|
+
'box-shadow': 'inset 0 0 20px 20px #23232329'
|
|
56389
|
+
},
|
|
56390
|
+
'po-overlay, po-page-slide': {
|
|
56391
|
+
'--color-overlay': 'var(--color-neutral-light-20)'
|
|
56392
|
+
},
|
|
56393
|
+
'po-select': {
|
|
56394
|
+
'--color-hover': 'var(--color-action-hover);'
|
|
56395
|
+
},
|
|
56396
|
+
'po-select select': {
|
|
56397
|
+
'--color': 'var(--color-neutral-light-30);'
|
|
56398
|
+
}
|
|
56399
|
+
},
|
|
56400
|
+
onRoot: {
|
|
56401
|
+
/* CORES LEGADAS */
|
|
56402
|
+
'--color-neutral': 'var(--color-neutral-dark-70)',
|
|
56403
|
+
'--color-secondary': 'var(--color-action-default)',
|
|
56404
|
+
'--color-secondary-light-20': 'var(--color-brand-01-lighter)',
|
|
56405
|
+
'--color-secondary-light-40': 'var(--color-brand-01-light)',
|
|
56406
|
+
'--color-secondary-dark-20': 'var(--color-brand-01-dark)',
|
|
56407
|
+
'--color-secondary-dark-40': 'var(--color-brand-01-darker)',
|
|
56408
|
+
'--color-secondary-dark-80': 'var(--color-brand-01-darkest)',
|
|
56409
|
+
'--color-black-alpha-10': 'rgba(255, 255, 255, 0.1)',
|
|
56410
|
+
'--color-black-alpha-15': 'rgba(255, 255, 255, 0.15)',
|
|
56411
|
+
'--color-black-alpha-30': 'rgba(255, 255, 255, 0.3)',
|
|
56412
|
+
'--color-primary': 'var(--color-brand-02-base)',
|
|
56413
|
+
'--color-primary-light-80': 'color-mix(in srgb, var(--color-brand-02-base) 80%, black)',
|
|
56414
|
+
'--color-primary-light-95': 'color-mix(in srgb, var(--color-brand-02-base) 95%, black)',
|
|
56415
|
+
'--color-primary-alpha-50': 'color-mix(in srgb, var(--color-brand-02-base) 50%, white)',
|
|
56416
|
+
'--color-primary-dark-20': 'color-mix(in srgb, var(--color-brand-02-base) 20%, white)',
|
|
56417
|
+
'--color-primary-dark-40': 'color-mix(in srgb, var(--color-brand-02-base) 40%, white)',
|
|
56418
|
+
'--color-secondary-dark-60-alpha-70': 'color-mix(in srgb, var(--color-neutral-mid-60) 70%, white)',
|
|
56419
|
+
'--color-tertiary-light-90': 'color-mix(in srgb, var(--color-brand-03-base) 90%, black)',
|
|
56420
|
+
'--color-tertiary-dark-5': 'color-mix(in srgb, var(--color-brand-03-base) 5%, white)',
|
|
56421
|
+
/* PO-PAGE */
|
|
56422
|
+
'--color-page-background-color-page': 'var(--color-neutral-light-00)',
|
|
56423
|
+
/* TOOLBAR BADGE */
|
|
56424
|
+
'--color-toolbar-color-badge-text': 'var(--color-neutral-dark-95)',
|
|
56425
|
+
/* POPOVER */
|
|
56426
|
+
'--shadow-popover-box-shadow': '0 0 4px 0 var(--color-neutral-light-20)',
|
|
56427
|
+
'--shadow-popover-box-shadow-arrow': '-1px -1px 1px 0 var(--color-neutral-light-20)',
|
|
56428
|
+
/* CALENDAR */
|
|
56429
|
+
'--color-calendar-background-color-box-background-range': 'var(--color-brand-01-lightest)',
|
|
56430
|
+
/* STEPPER */
|
|
56431
|
+
'--color-stepper-circle-disabled': 'var(--color-neutral-mid-40)',
|
|
56432
|
+
'--color-stepper-bar-disabled': 'var(--color-neutral-mid-40)',
|
|
56433
|
+
/* TAB */
|
|
56434
|
+
'--po-tab-smart-active': 'var(--color-neutral-dark-95)',
|
|
56435
|
+
'--po-tab-smart-background-item-selected': 'var(--color-brand-01-lighter)',
|
|
56436
|
+
'--po-tab-smart-background-hover': 'var(--color-brand-01-lightest)'
|
|
56437
|
+
}
|
|
56438
|
+
};
|
|
56439
|
+
|
|
56440
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
56441
|
+
|
|
55751
56442
|
/**
|
|
55752
56443
|
* Generated bundle index. Do not edit.
|
|
55753
56444
|
*/
|
|
55754
56445
|
|
|
55755
|
-
export { ForceBooleanComponentEnum, ForceOptionComponentEnum, I18N_CONFIG, InputBoolean, InputRequired, PO_CONTROL_POSITIONS, PoAccordionComponent, PoAccordionItemComponent, PoAccordionModule, PoActiveOverlayModule, PoActiveOverlayService, PoAvatarComponent, PoAvatarModule, PoBadgeComponent, PoBadgeModule, PoBreadcrumbComponent, PoBreadcrumbModule, PoButtonComponent, PoButtonGroupComponent, PoButtonGroupModule, PoButtonGroupToggle, PoButtonModule, PoCalendarComponent, PoCalendarMode, PoCalendarModule, PoChartComponent, PoChartModule, PoChartType, PoCheckboxComponent, PoCheckboxGroupComponent, PoCheckboxGroupModule, PoCheckboxModule, PoCheckboxSize, PoCleanComponent, PoCleanModule, PoColorPaletteModule, PoColorPaletteService, PoComboComponent, PoComboFilterMode, PoComboOptionTemplateDirective, PoComponentInjectorModule, PoComponentInjectorService, PoComponentsModule, PoContainerComponent, PoContainerModule, PoControlPositionModule, PoDateService, PoDateTimeModule, PoDatepickerComponent, PoDatepickerIsoFormat, PoDatepickerModule, PoDatepickerRangeComponent, PoDecimalComponent, PoDialogComponent, PoDialogModule, PoDialogService, PoDialogType, PoDirectivesModule, PoDisclaimerComponent, PoDisclaimerGroupComponent, PoDisclaimerGroupModule, PoDisclaimerModule, PoDividerComponent, PoDividerModule, PoDividerSize, PoDropdownComponent, PoDropdownModule, PoDynamicContainerComponent, PoDynamicFieldType, PoDynamicFormComponent, PoDynamicModule, PoDynamicSharedBase, PoDynamicViewComponent, PoEmailComponent, PoFieldContainerBottomComponent, PoFieldContainerComponent, PoFieldContainerModule, PoFieldModule, PoGaugeComponent, PoGaugeModule, PoGridComponent, PoGridModule, PoGuardsModule, PoHttpInterceptorModule, PoHttpInterceptorService, PoHttpRequestInterceptorService, PoHttpRequestModule, PoI18nModule, PoI18nPipe, PoI18nService, PoIconComponent, PoIconModule, PoImageComponent, PoImageModule, PoInfoComponent, PoInfoModule, PoInfoOrientation, PoInputComponent, PoInterceptorsModule, PoItemListComponent, PoLabelComponent, PoLabelModule, PoLanguageModule, PoLanguageService, PoLinkComponent, PoLinkModule, PoListBoxComponent, PoListBoxModule, PoListViewComponent, PoListViewContentTemplateDirective, PoListViewDetailTemplateDirective, PoListViewModule, PoLoadingComponent, PoLoadingIconComponent, PoLoadingModule, PoLoadingOverlayComponent, PoLoginComponent, PoLogoComponent, PoLogoModule, PoLookupComponent, PoLookupModalComponent, PoMenuComponent, PoMenuGlobalService, PoMenuHeaderTemplateDirective, PoMenuModule, PoMenuPanelComponent, PoMenuPanelModule, PoModalComponent, PoModalFooterComponent, PoModalModule, PoModule, PoMultiselectComponent, PoMultiselectFilterMode, PoMultiselectOptionTemplateDirective, PoNavbarComponent, PoNavbarModule, PoNotificationModule, PoNotificationService, PoNumberComponent, PoOverlayComponent, PoOverlayModule, PoPageDefaultComponent, PoPageDetailComponent, PoPageEditComponent, PoPageListComponent, PoPageModule, PoPageSlideComponent, PoPageSlideModule, PoPasswordComponent, PoPipesModule, PoPopoverComponent, PoPopoverModule, PoPopupComponent, PoPopupModule, PoProgressComponent, PoProgressModule, PoProgressSize, PoProgressStatus, PoRadioComponent, PoRadioGroupComponent, PoRadioGroupModule, PoRadioModule, PoRichTextComponent, PoSearchComponent, PoSearchFilterMode, PoSearchListComponent, PoSearchModule, PoSelectComponent, PoServicesModule, PoSlideComponent, PoSlideContentTemplateDirective, PoSlideModule, PoStepComponent, PoStepperComponent, PoStepperModule, PoStepperOrientation, PoStepperStatus, PoSwitchComponent, PoSwitchLabelPosition, PoSwitchModule, PoTabComponent, PoTableCellTemplateDirective, PoTableColumnFrozenDirective, PoTableColumnSortType, PoTableColumnSpacing, PoTableColumnTemplateDirective, PoTableComponent, PoTableModule, PoTableRowTemplateArrowDirection, PoTableRowTemplateDirective, PoTabsComponent, PoTabsModule, PoTabsService, PoTagComponent, PoTagModule, PoTagOrientation, PoTagType, PoTextareaComponent, PoTimeModule, PoTimePipe, PoToasterOrientation, PoToasterType, PoToolbarComponent, PoToolbarModule, PoTooltipDirective, PoTooltipModule, PoTreeViewComponent, PoTreeViewModule, PoUploadComponent, PoUploadFile, PoUploadStatus, PoUrlComponent, PoWidgetComponent, PoWidgetModule, initializeLanguageDefault, poBreadcrumbLiterals, poDialogAlertLiteralsDefault, poDialogConfirmLiteralsDefault, poLanguageDefault, poLocaleDateSeparatorList, poLocaleDecimalSeparatorList, poLocaleDefault, poLocaleThousandSeparatorList, poLocales, poTabsLiterals, returnPoI18nService };
|
|
56446
|
+
export { ForceBooleanComponentEnum, ForceOptionComponentEnum, I18N_CONFIG, InputBoolean, InputRequired, PO_CONTROL_POSITIONS, PoAccordionComponent, PoAccordionItemComponent, PoAccordionModule, PoActiveOverlayModule, PoActiveOverlayService, PoAvatarComponent, PoAvatarModule, PoBadgeComponent, PoBadgeModule, PoBreadcrumbComponent, PoBreadcrumbModule, PoButtonComponent, PoButtonGroupComponent, PoButtonGroupModule, PoButtonGroupToggle, PoButtonModule, PoCalendarComponent, PoCalendarMode, PoCalendarModule, PoChartComponent, PoChartModule, PoChartType, PoCheckboxComponent, PoCheckboxGroupComponent, PoCheckboxGroupModule, PoCheckboxModule, PoCheckboxSize, PoCleanComponent, PoCleanModule, PoColorPaletteModule, PoColorPaletteService, PoComboComponent, PoComboFilterMode, PoComboOptionTemplateDirective, PoComponentInjectorModule, PoComponentInjectorService, PoComponentsModule, PoContainerComponent, PoContainerModule, PoControlPositionModule, PoDateService, PoDateTimeModule, PoDatepickerComponent, PoDatepickerIsoFormat, PoDatepickerModule, PoDatepickerRangeComponent, PoDecimalComponent, PoDialogComponent, PoDialogModule, PoDialogService, PoDialogType, PoDirectivesModule, PoDisclaimerComponent, PoDisclaimerGroupComponent, PoDisclaimerGroupModule, PoDisclaimerModule, PoDividerComponent, PoDividerModule, PoDividerSize, PoDropdownComponent, PoDropdownModule, PoDynamicContainerComponent, PoDynamicFieldType, PoDynamicFormComponent, PoDynamicModule, PoDynamicSharedBase, PoDynamicViewComponent, PoEmailComponent, PoFieldContainerBottomComponent, PoFieldContainerComponent, PoFieldContainerModule, PoFieldModule, PoGaugeComponent, PoGaugeModule, PoGridComponent, PoGridModule, PoGuardsModule, PoHttpInterceptorModule, PoHttpInterceptorService, PoHttpRequestInterceptorService, PoHttpRequestModule, PoI18nModule, PoI18nPipe, PoI18nService, PoIconComponent, PoIconModule, PoImageComponent, PoImageModule, PoInfoComponent, PoInfoModule, PoInfoOrientation, PoInputComponent, PoInterceptorsModule, PoItemListComponent, PoLabelComponent, PoLabelModule, PoLanguageModule, PoLanguageService, PoLinkComponent, PoLinkModule, PoListBoxComponent, PoListBoxModule, PoListViewComponent, PoListViewContentTemplateDirective, PoListViewDetailTemplateDirective, PoListViewModule, PoLoadingComponent, PoLoadingIconComponent, PoLoadingModule, PoLoadingOverlayComponent, PoLoginComponent, PoLogoComponent, PoLogoModule, PoLookupComponent, PoLookupModalComponent, PoMenuComponent, PoMenuGlobalService, PoMenuHeaderTemplateDirective, PoMenuModule, PoMenuPanelComponent, PoMenuPanelModule, PoModalComponent, PoModalFooterComponent, PoModalModule, PoModule, PoMultiselectComponent, PoMultiselectFilterMode, PoMultiselectOptionTemplateDirective, PoNavbarComponent, PoNavbarModule, PoNotificationModule, PoNotificationService, PoNumberComponent, PoOverlayComponent, PoOverlayModule, PoPageDefaultComponent, PoPageDetailComponent, PoPageEditComponent, PoPageListComponent, PoPageModule, PoPageSlideComponent, PoPageSlideModule, PoPasswordComponent, PoPipesModule, PoPopoverComponent, PoPopoverModule, PoPopupComponent, PoPopupModule, PoProgressComponent, PoProgressModule, PoProgressSize, PoProgressStatus, PoRadioComponent, PoRadioGroupComponent, PoRadioGroupModule, PoRadioModule, PoRichTextComponent, PoSearchComponent, PoSearchFilterMode, PoSearchListComponent, PoSearchModule, PoSelectComponent, PoServicesModule, PoSlideComponent, PoSlideContentTemplateDirective, PoSlideModule, PoStepComponent, PoStepperComponent, PoStepperModule, PoStepperOrientation, PoStepperStatus, PoSwitchComponent, PoSwitchLabelPosition, PoSwitchModule, PoTabComponent, PoTableCellTemplateDirective, PoTableColumnFrozenDirective, PoTableColumnSortType, PoTableColumnSpacing, PoTableColumnTemplateDirective, PoTableComponent, PoTableModule, PoTableRowTemplateArrowDirection, PoTableRowTemplateDirective, PoTabsComponent, PoTabsModule, PoTabsService, PoTagComponent, PoTagModule, PoTagOrientation, PoTagType, PoTextareaComponent, PoThemeModule, PoThemeService, PoThemeTypeEnum, PoTimeModule, PoTimePipe, PoToasterOrientation, PoToasterType, PoToolbarComponent, PoToolbarModule, PoTooltipDirective, PoTooltipModule, PoTreeViewComponent, PoTreeViewModule, PoUploadComponent, PoUploadFile, PoUploadStatus, PoUrlComponent, PoWidgetComponent, PoWidgetModule, initializeLanguageDefault, poBreadcrumbLiterals, poDialogAlertLiteralsDefault, poDialogConfirmLiteralsDefault, poLanguageDefault, poLocaleDateSeparatorList, poLocaleDecimalSeparatorList, poLocaleDefault, poLocaleThousandSeparatorList, poLocales, poTabsLiterals, poThemeDefault, poThemeDefaultActions, poThemeDefaultActionsDark, poThemeDefaultBrands, poThemeDefaultDarkValues, poThemeDefaultFeedback, poThemeDefaultFeedbackDark, poThemeDefaultLight, poThemeDefaultLightValues, poThemeDefaultNeutrals, poThemeDefaultNeutralsDark, returnPoI18nService };
|
|
55756
56447
|
//# sourceMappingURL=po-ui-ng-components.mjs.map
|