@gipisistemas/ngx-core 1.0.13 → 1.0.15
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.
|
@@ -4853,11 +4853,24 @@ class FilterPersistenceService {
|
|
|
4853
4853
|
return runInInjectionContext(this._injector, () => {
|
|
4854
4854
|
const activatedRoute = inject(ActivatedRoute);
|
|
4855
4855
|
const normalizedStorageKey = this._normalizeStorageKey(storageKey, useUserSegregation);
|
|
4856
|
-
const
|
|
4857
|
-
|
|
4856
|
+
const rawQueryParams = activatedRoute.snapshot.queryParams;
|
|
4857
|
+
const hasAnyQueryParams = Object.keys(rawQueryParams).some((key) => {
|
|
4858
|
+
const value = rawQueryParams[key];
|
|
4859
|
+
return value !== undefined && value !== null && value !== '';
|
|
4860
|
+
});
|
|
4861
|
+
const hasExternalContextParams = this._hasExternalContextParams(rawQueryParams, defaultFilter);
|
|
4862
|
+
// Navegação contextual (ex.: dashboard): ignora URL/localStorage de filtros da listagem.
|
|
4863
|
+
// A tela decide como interpretar os query params externos.
|
|
4864
|
+
if (hasExternalContextParams) {
|
|
4865
|
+
return defaultFilter;
|
|
4866
|
+
}
|
|
4867
|
+
// Se tem QUALQUER query param (ex.: preFilter), não sobrescreve com localStorage
|
|
4868
|
+
if (hasAnyQueryParams) {
|
|
4869
|
+
const snapshotParams = this._parseQueryParams(rawQueryParams, defaultFilter);
|
|
4870
|
+
// Retorna o que conseguiu parsear + default (preFilter fica na URL pra tela usar)
|
|
4858
4871
|
return snapshotParams;
|
|
4859
4872
|
}
|
|
4860
|
-
// FALLBACK do localStorage
|
|
4873
|
+
// FALLBACK do localStorage (somente se NÃO tiver nada na URL)
|
|
4861
4874
|
const saved = this._loadFromStorage(normalizedStorageKey);
|
|
4862
4875
|
if (saved) {
|
|
4863
4876
|
this._updateUrl(this._serializeToQueryParams(saved));
|
|
@@ -4870,16 +4883,18 @@ class FilterPersistenceService {
|
|
|
4870
4883
|
updateFilter(storageKey, filters, useUserSegregation = true) {
|
|
4871
4884
|
const queryParams = this._serializeToQueryParams(filters);
|
|
4872
4885
|
const cleanedParams = this._cleanQueryParams(queryParams);
|
|
4886
|
+
const mergedParams = this._mergeWithCurrentQueryParams(filters, cleanedParams);
|
|
4873
4887
|
const normalizedStorageKey = this._normalizeStorageKey(storageKey, useUserSegregation);
|
|
4874
4888
|
// Atualiza URL
|
|
4875
|
-
this._updateUrl(
|
|
4889
|
+
this._updateUrl(mergedParams);
|
|
4876
4890
|
// Salva no localStorage
|
|
4877
4891
|
this._saveToStorage(normalizedStorageKey, filters);
|
|
4878
4892
|
}
|
|
4879
4893
|
/** Limpa filtros da URL e storage */
|
|
4880
4894
|
clearFilter(storageKey, defaultFilter, useUserSegregation = true) {
|
|
4881
4895
|
const normalizedStorageKey = this._normalizeStorageKey(storageKey, useUserSegregation);
|
|
4882
|
-
this.
|
|
4896
|
+
const mergedParams = this._mergeWithCurrentQueryParams(defaultFilter, {});
|
|
4897
|
+
this._updateUrl(mergedParams);
|
|
4883
4898
|
this._saveToStorage(normalizedStorageKey, defaultFilter);
|
|
4884
4899
|
}
|
|
4885
4900
|
/** Normaliza a chave de storage incluindo o usuário quando necessário */
|
|
@@ -5035,6 +5050,35 @@ class FilterPersistenceService {
|
|
|
5035
5050
|
return null;
|
|
5036
5051
|
}
|
|
5037
5052
|
}
|
|
5053
|
+
_mergeWithCurrentQueryParams(filterLike, nextFilterParams) {
|
|
5054
|
+
return runInInjectionContext(this._injector, () => {
|
|
5055
|
+
const activatedRoute = inject(ActivatedRoute);
|
|
5056
|
+
const currentParams = activatedRoute.snapshot.queryParams;
|
|
5057
|
+
const merged = { ...currentParams };
|
|
5058
|
+
const filterKeys = Object.keys(filterLike ?? {});
|
|
5059
|
+
// Remove da URL as chaves controladas pelo filtro atual.
|
|
5060
|
+
filterKeys.forEach((key) => {
|
|
5061
|
+
if (Object.prototype.hasOwnProperty.call(merged, key)) {
|
|
5062
|
+
delete merged[key];
|
|
5063
|
+
}
|
|
5064
|
+
});
|
|
5065
|
+
// Reaplica somente os parâmetros de filtro válidos (não vazios).
|
|
5066
|
+
Object.entries(nextFilterParams).forEach(([key, value]) => {
|
|
5067
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
5068
|
+
merged[key] = value;
|
|
5069
|
+
}
|
|
5070
|
+
});
|
|
5071
|
+
return merged;
|
|
5072
|
+
});
|
|
5073
|
+
}
|
|
5074
|
+
_hasExternalContextParams(params, defaultFilter) {
|
|
5075
|
+
const filterKeys = new Set(Object.keys(defaultFilter ?? {}));
|
|
5076
|
+
return Object.keys(params ?? {}).some((key) => {
|
|
5077
|
+
const value = params[key];
|
|
5078
|
+
const hasValue = value !== undefined && value !== null && value !== '';
|
|
5079
|
+
return hasValue && !filterKeys.has(key);
|
|
5080
|
+
});
|
|
5081
|
+
}
|
|
5038
5082
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FilterPersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5039
5083
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FilterPersistenceService, providedIn: 'root' }); }
|
|
5040
5084
|
}
|
|
@@ -5118,7 +5162,8 @@ class BaseListComponent extends BaseComponent {
|
|
|
5118
5162
|
this.filterPersistenceService = inject(FilterPersistenceService);
|
|
5119
5163
|
this.pageAdjustService = inject(PageAdjustService);
|
|
5120
5164
|
this._SESSION_STORAGE_FILTER = `gipi.filter.${this.getFilterStorageKey()}`;
|
|
5121
|
-
this.
|
|
5165
|
+
this._isHydrating = signal(true, ...(ngDevMode ? [{ debugName: "_isHydrating" }] : []));
|
|
5166
|
+
this._persistTimer = null;
|
|
5122
5167
|
this.filter = signal(this.newFilter(), ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
5123
5168
|
this.page = signal(this.newPage(), ...(ngDevMode ? [{ debugName: "page" }] : []));
|
|
5124
5169
|
this.tableColumns = signal([], ...(ngDevMode ? [{ debugName: "tableColumns" }] : []));
|
|
@@ -5157,13 +5202,18 @@ class BaseListComponent extends BaseComponent {
|
|
|
5157
5202
|
// Effect para persistência automática dos filtros
|
|
5158
5203
|
effect(() => {
|
|
5159
5204
|
const currentFilter = this.filter();
|
|
5160
|
-
const isInitializing = this._isInitializingScreen();
|
|
5161
5205
|
// Não persiste durante a inicialização
|
|
5162
|
-
if (
|
|
5206
|
+
if (this._isHydrating()) {
|
|
5163
5207
|
return;
|
|
5164
5208
|
}
|
|
5209
|
+
if (this._persistTimer) {
|
|
5210
|
+
clearTimeout(this._persistTimer);
|
|
5211
|
+
}
|
|
5165
5212
|
// Debounce manual para evitar muitas atualizações
|
|
5166
|
-
setTimeout(() =>
|
|
5213
|
+
this._persistTimer = setTimeout(() => {
|
|
5214
|
+
const toPersist = this._filterToPersist(currentFilter);
|
|
5215
|
+
this.filterPersistenceService.updateFilter(this._SESSION_STORAGE_FILTER, toPersist);
|
|
5216
|
+
}, 150);
|
|
5167
5217
|
});
|
|
5168
5218
|
}
|
|
5169
5219
|
/**
|
|
@@ -5173,7 +5223,7 @@ class BaseListComponent extends BaseComponent {
|
|
|
5173
5223
|
getFilterStorageKey() {
|
|
5174
5224
|
return this.getPath();
|
|
5175
5225
|
}
|
|
5176
|
-
/** Método chamado após a inicialização do `filter`
|
|
5226
|
+
/** Método chamado após a inicialização do `filter` ser finalizada. */
|
|
5177
5227
|
afterFilterInit() {
|
|
5178
5228
|
// Método para ser sobrescrito se necessário
|
|
5179
5229
|
}
|
|
@@ -5205,14 +5255,12 @@ class BaseListComponent extends BaseComponent {
|
|
|
5205
5255
|
*/
|
|
5206
5256
|
onInitForm() {
|
|
5207
5257
|
super.onInitForm();
|
|
5258
|
+
this._isHydrating.set(true);
|
|
5208
5259
|
this.page.set(this.newPage());
|
|
5209
5260
|
const defaultFilter = this.newFilter();
|
|
5210
5261
|
const persistedFilter = this.filterPersistenceService.initializeFilter(this._SESSION_STORAGE_FILTER, defaultFilter);
|
|
5211
5262
|
this.filter.set(persistedFilter);
|
|
5212
|
-
// Hook para ações após a inicialização do filtro
|
|
5213
5263
|
this.afterFilterInit();
|
|
5214
|
-
// Marca que a inicialização terminou (agora o effect vai funcionar)
|
|
5215
|
-
setTimeout(() => this._isInitializingScreen.set(false));
|
|
5216
5264
|
this.tableColumns.set(this.createTableColumns());
|
|
5217
5265
|
this.tableMenuItemsContext.set(this.createMenuItemsContext());
|
|
5218
5266
|
this.treeTableColumns.set(this.createTreeTableColumns());
|
|
@@ -5220,6 +5268,8 @@ class BaseListComponent extends BaseComponent {
|
|
|
5220
5268
|
if (!ObjectUtil.isEmpty(this.filter())) {
|
|
5221
5269
|
this.setAppliedFilters();
|
|
5222
5270
|
}
|
|
5271
|
+
// libera a persistência só no final (microtask)
|
|
5272
|
+
queueMicrotask(() => this._isHydrating.set(false));
|
|
5223
5273
|
}
|
|
5224
5274
|
/**
|
|
5225
5275
|
* Método para obter os dados da listagem.
|
|
@@ -5268,6 +5318,15 @@ class BaseListComponent extends BaseComponent {
|
|
|
5268
5318
|
this.handleError(e);
|
|
5269
5319
|
}
|
|
5270
5320
|
}
|
|
5321
|
+
_filterToPersist(filter) {
|
|
5322
|
+
const clone = { ...filter };
|
|
5323
|
+
delete clone.page;
|
|
5324
|
+
delete clone.size;
|
|
5325
|
+
delete clone.pageNumber;
|
|
5326
|
+
delete clone.pageSize;
|
|
5327
|
+
// delete clone.sorts;
|
|
5328
|
+
return clone;
|
|
5329
|
+
}
|
|
5271
5330
|
/**
|
|
5272
5331
|
* Método chamado após a busca dos registros.
|
|
5273
5332
|
* - Chamado após a execução do método `findAll()`
|
|
@@ -8909,19 +8968,14 @@ class Chips extends BaseControlValueAccessor {
|
|
|
8909
8968
|
}
|
|
8910
8969
|
|
|
8911
8970
|
@if (showRemoveAll() && hasChips()) {
|
|
8912
|
-
<mat-chip
|
|
8971
|
+
<mat-chip
|
|
8972
|
+
class="g-chips-control-item g-chips-control-item-all"
|
|
8973
|
+
[class.disabled]="$disabled()"
|
|
8974
|
+
[attr.aria-label]="'Remover todos'"
|
|
8975
|
+
(click)="removeAll()"
|
|
8976
|
+
>
|
|
8913
8977
|
{{ labelRemoveAll() }}
|
|
8914
|
-
|
|
8915
|
-
<button
|
|
8916
|
-
class="g-control-item-button g-control-item-button-all"
|
|
8917
|
-
[attr.aria-label]="'Remover todos'"
|
|
8918
|
-
[disabled]="$disabled()"
|
|
8919
|
-
(click)="removeAll()"
|
|
8920
|
-
>
|
|
8921
|
-
<span class="material-symbols-rounded g-control-item-button-icon">
|
|
8922
|
-
delete
|
|
8923
|
-
</span>
|
|
8924
|
-
</button>
|
|
8978
|
+
<span class="material-symbols-rounded g-control-item-all-icon">delete</span>
|
|
8925
8979
|
</mat-chip>
|
|
8926
8980
|
}
|
|
8927
8981
|
</mat-chip-set>
|
|
@@ -8956,19 +9010,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
8956
9010
|
}
|
|
8957
9011
|
|
|
8958
9012
|
@if (showRemoveAll() && hasChips()) {
|
|
8959
|
-
<mat-chip
|
|
9013
|
+
<mat-chip
|
|
9014
|
+
class="g-chips-control-item g-chips-control-item-all"
|
|
9015
|
+
[class.disabled]="$disabled()"
|
|
9016
|
+
[attr.aria-label]="'Remover todos'"
|
|
9017
|
+
(click)="removeAll()"
|
|
9018
|
+
>
|
|
8960
9019
|
{{ labelRemoveAll() }}
|
|
8961
|
-
|
|
8962
|
-
<button
|
|
8963
|
-
class="g-control-item-button g-control-item-button-all"
|
|
8964
|
-
[attr.aria-label]="'Remover todos'"
|
|
8965
|
-
[disabled]="$disabled()"
|
|
8966
|
-
(click)="removeAll()"
|
|
8967
|
-
>
|
|
8968
|
-
<span class="material-symbols-rounded g-control-item-button-icon">
|
|
8969
|
-
delete
|
|
8970
|
-
</span>
|
|
8971
|
-
</button>
|
|
9020
|
+
<span class="material-symbols-rounded g-control-item-all-icon">delete</span>
|
|
8972
9021
|
</mat-chip>
|
|
8973
9022
|
}
|
|
8974
9023
|
</mat-chip-set>
|
|
@@ -12854,7 +12903,10 @@ class DatePicker extends BaseControlValueAccessor {
|
|
|
12854
12903
|
!('start' in value));
|
|
12855
12904
|
}
|
|
12856
12905
|
_formatDate(date) {
|
|
12857
|
-
|
|
12906
|
+
const day = date.getDate().toString().padStart(2, '0');
|
|
12907
|
+
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
12908
|
+
const year = date.getFullYear();
|
|
12909
|
+
return `${day}/${month}/${year}`;
|
|
12858
12910
|
}
|
|
12859
12911
|
_formatDateTime(date) {
|
|
12860
12912
|
const dateStr = this._formatDate(date);
|
|
@@ -18986,7 +19038,8 @@ class SidenavMenuItem {
|
|
|
18986
19038
|
[attr.id]="menu().id"
|
|
18987
19039
|
[attr.name]="menu().id"
|
|
18988
19040
|
[routerLink]="menuRoute | async"
|
|
18989
|
-
(click)="onSelect.emit(menu())"
|
|
19041
|
+
(click)="onSelect.emit(menu())"
|
|
19042
|
+
>
|
|
18990
19043
|
<div class="g-sidenav-menu-item-content">
|
|
18991
19044
|
@if (menu().icon || menu().svgIcon) {
|
|
18992
19045
|
<gipi-icon
|
|
@@ -18994,7 +19047,8 @@ class SidenavMenuItem {
|
|
|
18994
19047
|
[fontSet]="'ROUNDED'"
|
|
18995
19048
|
[icon]="menu().icon || ''"
|
|
18996
19049
|
[svgIcon]="menu().svgIcon || ''"
|
|
18997
|
-
[size]="22"
|
|
19050
|
+
[size]="22"
|
|
19051
|
+
/>
|
|
18998
19052
|
}
|
|
18999
19053
|
|
|
19000
19054
|
@if (sidenavOpened()) {
|
|
@@ -19013,7 +19067,8 @@ class SidenavMenuItem {
|
|
|
19013
19067
|
@if (menu().showTagNew && menu().type !== 'COLLAPSABLE') {
|
|
19014
19068
|
<div
|
|
19015
19069
|
class="g-sidenav-tag-new"
|
|
19016
|
-
[class.g-sidenav-tag-new-closed]="!sidenavOpened()"
|
|
19070
|
+
[class.g-sidenav-tag-new-closed]="!sidenavOpened()"
|
|
19071
|
+
>
|
|
19017
19072
|
Novo
|
|
19018
19073
|
</div>
|
|
19019
19074
|
}
|
|
@@ -19031,7 +19086,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19031
19086
|
[attr.id]="menu().id"
|
|
19032
19087
|
[attr.name]="menu().id"
|
|
19033
19088
|
[routerLink]="menuRoute | async"
|
|
19034
|
-
(click)="onSelect.emit(menu())"
|
|
19089
|
+
(click)="onSelect.emit(menu())"
|
|
19090
|
+
>
|
|
19035
19091
|
<div class="g-sidenav-menu-item-content">
|
|
19036
19092
|
@if (menu().icon || menu().svgIcon) {
|
|
19037
19093
|
<gipi-icon
|
|
@@ -19039,7 +19095,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19039
19095
|
[fontSet]="'ROUNDED'"
|
|
19040
19096
|
[icon]="menu().icon || ''"
|
|
19041
19097
|
[svgIcon]="menu().svgIcon || ''"
|
|
19042
|
-
[size]="22"
|
|
19098
|
+
[size]="22"
|
|
19099
|
+
/>
|
|
19043
19100
|
}
|
|
19044
19101
|
|
|
19045
19102
|
@if (sidenavOpened()) {
|
|
@@ -19058,7 +19115,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19058
19115
|
@if (menu().showTagNew && menu().type !== 'COLLAPSABLE') {
|
|
19059
19116
|
<div
|
|
19060
19117
|
class="g-sidenav-tag-new"
|
|
19061
|
-
[class.g-sidenav-tag-new-closed]="!sidenavOpened()"
|
|
19118
|
+
[class.g-sidenav-tag-new-closed]="!sidenavOpened()"
|
|
19119
|
+
>
|
|
19062
19120
|
Novo
|
|
19063
19121
|
</div>
|
|
19064
19122
|
}
|
|
@@ -19069,6 +19127,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19069
19127
|
class: 'g-sidenav-menu-item',
|
|
19070
19128
|
}, imports: [CommonModule, RouterModule, TooltipModule, IconModule] }]
|
|
19071
19129
|
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu", required: true }] }], sidenavOpened: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidenavOpened", required: true }] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }] } });
|
|
19130
|
+
class SidenavContent {
|
|
19131
|
+
constructor() { }
|
|
19132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19133
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: SidenavContent, isStandalone: true, selector: "gipi-sidenav-content", host: { classAttribute: "g-sidenav-content" }, exportAs: ["gSidenavContent"], ngImport: i0, template: `
|
|
19134
|
+
<ng-content />
|
|
19135
|
+
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
19136
|
+
}
|
|
19137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavContent, decorators: [{
|
|
19138
|
+
type: Component,
|
|
19139
|
+
args: [{ selector: 'gipi-sidenav-content', exportAs: 'gSidenavContent', template: `
|
|
19140
|
+
<ng-content />
|
|
19141
|
+
`, host: {
|
|
19142
|
+
class: 'g-sidenav-content',
|
|
19143
|
+
}, imports: [CommonModule] }]
|
|
19144
|
+
}], ctorParameters: () => [] });
|
|
19145
|
+
class SidenavContainer {
|
|
19146
|
+
constructor() { }
|
|
19147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavContainer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19148
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: SidenavContainer, isStandalone: true, selector: "gipi-sidenav-container", host: { classAttribute: "g-sidenav-container" }, exportAs: ["gSidenavContainer"], ngImport: i0, template: `
|
|
19149
|
+
<div class="g-sidenav-container-inner">
|
|
19150
|
+
<ng-content select="gipi-sidenav" />
|
|
19151
|
+
<ng-content select="gipi-sidenav-content" />
|
|
19152
|
+
</div>
|
|
19153
|
+
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
19154
|
+
}
|
|
19155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavContainer, decorators: [{
|
|
19156
|
+
type: Component,
|
|
19157
|
+
args: [{ selector: 'gipi-sidenav-container', exportAs: 'gSidenavContainer', template: `
|
|
19158
|
+
<div class="g-sidenav-container-inner">
|
|
19159
|
+
<ng-content select="gipi-sidenav" />
|
|
19160
|
+
<ng-content select="gipi-sidenav-content" />
|
|
19161
|
+
</div>
|
|
19162
|
+
`, host: {
|
|
19163
|
+
class: 'g-sidenav-container',
|
|
19164
|
+
}, imports: [CommonModule] }]
|
|
19165
|
+
}], ctorParameters: () => [] });
|
|
19072
19166
|
class Sidenav {
|
|
19073
19167
|
set opened(value) {
|
|
19074
19168
|
this._opened = booleanAttribute(value);
|
|
@@ -19092,9 +19186,12 @@ class Sidenav {
|
|
|
19092
19186
|
}
|
|
19093
19187
|
constructor() {
|
|
19094
19188
|
this._uniqueId = inject(_IdGenerator).getId('gipi-sidenav-');
|
|
19095
|
-
this.arrowType = signal('arrow_left', ...(ngDevMode ? [{ debugName: "arrowType" }] : []));
|
|
19096
|
-
this._menuLevel = signal([], ...(ngDevMode ? [{ debugName: "_menuLevel" }] : []));
|
|
19097
19189
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
19190
|
+
this._menuLevel = signal([], ...(ngDevMode ? [{ debugName: "_menuLevel" }] : []));
|
|
19191
|
+
this.arrowType = signal('arrow_left', ...(ngDevMode ? [{ debugName: "arrowType" }] : []));
|
|
19192
|
+
this.mode = signal('over', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
19193
|
+
this.viewportSize = signal('mobile', ...(ngDevMode ? [{ debugName: "viewportSize" }] : []));
|
|
19194
|
+
this._hoverExpanded = false;
|
|
19098
19195
|
this.id = input(this._uniqueId, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
19099
19196
|
this.name = input(this._uniqueId, ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
19100
19197
|
this._opened = false;
|
|
@@ -19115,6 +19212,9 @@ class Sidenav {
|
|
|
19115
19212
|
: '';
|
|
19116
19213
|
}, ...(ngDevMode ? [{ debugName: "menuLevelName" }] : []));
|
|
19117
19214
|
}
|
|
19215
|
+
ngOnInit() {
|
|
19216
|
+
this._applyResponsiveState(true);
|
|
19217
|
+
}
|
|
19118
19218
|
ngOnChanges(changes) {
|
|
19119
19219
|
const menuValue = changes['menuList'];
|
|
19120
19220
|
if (menuValue && menuValue !== menuValue.previousValue) {
|
|
@@ -19122,48 +19222,129 @@ class Sidenav {
|
|
|
19122
19222
|
this._changeDetectorRef.detectChanges();
|
|
19123
19223
|
}
|
|
19124
19224
|
}
|
|
19125
|
-
|
|
19225
|
+
handleWindowResize() {
|
|
19226
|
+
this._applyResponsiveState();
|
|
19227
|
+
}
|
|
19228
|
+
handleMouseEnter() {
|
|
19229
|
+
if (!this.opened) {
|
|
19230
|
+
this._hoverExpanded = true;
|
|
19231
|
+
this.opened = true;
|
|
19232
|
+
this._changeDetectorRef.detectChanges();
|
|
19233
|
+
}
|
|
19234
|
+
}
|
|
19235
|
+
handleMouseLeave() {
|
|
19236
|
+
if (this._hoverExpanded && this.opened) {
|
|
19237
|
+
this.opened = false;
|
|
19238
|
+
this._hoverExpanded = false;
|
|
19239
|
+
this._menuLevel.set([]);
|
|
19240
|
+
this._changeDetectorRef.detectChanges();
|
|
19241
|
+
}
|
|
19242
|
+
}
|
|
19243
|
+
handleToggleSidenav() {
|
|
19126
19244
|
this.opened = !this.opened;
|
|
19245
|
+
this._hoverExpanded = false;
|
|
19127
19246
|
this._menuLevel.set([]);
|
|
19128
19247
|
this._changeDetectorRef.detectChanges();
|
|
19129
19248
|
}
|
|
19130
|
-
|
|
19249
|
+
handleMenuLevelGoBack() {
|
|
19131
19250
|
const level = this._menuLevel();
|
|
19132
19251
|
if (level.length > 0) {
|
|
19133
19252
|
this._menuLevel.set(level.slice(0, level.length - 1));
|
|
19134
19253
|
}
|
|
19135
19254
|
this._changeDetectorRef.detectChanges();
|
|
19136
19255
|
}
|
|
19137
|
-
|
|
19256
|
+
handleMenuItemSelect(menu) {
|
|
19257
|
+
if (!this.opened) {
|
|
19258
|
+
this._menuLevel.set([]);
|
|
19259
|
+
this._changeDetectorRef.detectChanges();
|
|
19260
|
+
menu.action?.();
|
|
19261
|
+
return;
|
|
19262
|
+
}
|
|
19138
19263
|
if (menu.type === 'COLLAPSABLE') {
|
|
19139
19264
|
this._menuLevel.update((level) => [...level, menu]);
|
|
19265
|
+
this._changeDetectorRef.detectChanges();
|
|
19266
|
+
return;
|
|
19267
|
+
}
|
|
19268
|
+
this._menuLevel.set([]);
|
|
19269
|
+
if (this.mode() === 'over' && this.opened) {
|
|
19270
|
+
this.opened = false;
|
|
19271
|
+
this._hoverExpanded = false;
|
|
19140
19272
|
}
|
|
19141
19273
|
this._changeDetectorRef.detectChanges();
|
|
19142
19274
|
menu.action?.();
|
|
19143
19275
|
}
|
|
19276
|
+
_applyResponsiveState(force = false) {
|
|
19277
|
+
if (typeof window === 'undefined') {
|
|
19278
|
+
return;
|
|
19279
|
+
}
|
|
19280
|
+
const nextViewport = this._getViewportSize(window.innerWidth);
|
|
19281
|
+
if (!force && nextViewport === this.viewportSize()) {
|
|
19282
|
+
return;
|
|
19283
|
+
}
|
|
19284
|
+
this.viewportSize.set(nextViewport);
|
|
19285
|
+
if (nextViewport === 'desktop') {
|
|
19286
|
+
this.mode.set('side');
|
|
19287
|
+
this.opened = true;
|
|
19288
|
+
this._hoverExpanded = false;
|
|
19289
|
+
}
|
|
19290
|
+
else {
|
|
19291
|
+
this.mode.set('over');
|
|
19292
|
+
this.opened = false;
|
|
19293
|
+
this._hoverExpanded = false;
|
|
19294
|
+
}
|
|
19295
|
+
this._menuLevel.set([]);
|
|
19296
|
+
this._changeDetectorRef.detectChanges();
|
|
19297
|
+
}
|
|
19298
|
+
_getViewportSize(width) {
|
|
19299
|
+
if (width <= 640) {
|
|
19300
|
+
return 'mobile';
|
|
19301
|
+
}
|
|
19302
|
+
if (width < 1366) {
|
|
19303
|
+
return 'tablet';
|
|
19304
|
+
}
|
|
19305
|
+
return 'desktop';
|
|
19306
|
+
}
|
|
19144
19307
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: Sidenav, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19145
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: Sidenav, isStandalone: true, selector: "gipi-sidenav", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: false, isRequired: false, transformFunction: null }, menuList: { classPropertyName: "menuList", publicName: "menuList", isSignal: false, isRequired: false, transformFunction: null }, menuFooterList: { classPropertyName: "menuFooterList", publicName: "menuFooterList", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "attr.name": "name()", "class.g-sidenav-opened": "opened", "class.g-sidenav-closed": "!opened" }, classAttribute: "g-sidenav" }, exportAs: ["gSidenav"], usesOnChanges: true, ngImport: i0, template: `
|
|
19308
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: Sidenav, isStandalone: true, selector: "gipi-sidenav", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: false, isRequired: false, transformFunction: null }, menuList: { classPropertyName: "menuList", publicName: "menuList", isSignal: false, isRequired: false, transformFunction: null }, menuFooterList: { classPropertyName: "menuFooterList", publicName: "menuFooterList", isSignal: false, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "handleWindowResize()" }, properties: { "attr.id": "id()", "attr.name": "name()", "class.g-sidenav-opened": "opened", "class.g-sidenav-closed": "!opened", "class.g-sidenav-mode-over": "mode() === 'over'", "class.g-sidenav-mode-side": "mode() === 'side'", "class.g-sidenav-mobile": "viewportSize() === 'mobile'", "class.g-sidenav-tablet": "viewportSize() === 'tablet'", "class.g-sidenav-desktop": "viewportSize() === 'desktop'" }, classAttribute: "g-sidenav" }, exportAs: ["gSidenav"], usesOnChanges: true, ngImport: i0, template: `
|
|
19309
|
+
@if (mode() === 'over' && opened) {
|
|
19310
|
+
<button
|
|
19311
|
+
type="button"
|
|
19312
|
+
class="g-sidenav-backdrop"
|
|
19313
|
+
aria-label="Fechar menu lateral"
|
|
19314
|
+
(click)="handleToggleSidenav()"
|
|
19315
|
+
>
|
|
19316
|
+
<!-- Fechar menu lateral -->
|
|
19317
|
+
</button>
|
|
19318
|
+
}
|
|
19319
|
+
|
|
19146
19320
|
<button
|
|
19147
19321
|
id="btnToggleSidenav"
|
|
19148
19322
|
name="btnToggleSidenav"
|
|
19149
19323
|
class="g-sidenav-control"
|
|
19150
|
-
(click)="
|
|
19324
|
+
(click)="handleToggleSidenav()"
|
|
19325
|
+
>
|
|
19151
19326
|
<span
|
|
19152
19327
|
class="material-symbols-rounded g-sidenav-control-icon"
|
|
19153
|
-
[@rotateArrow]="arrowType()!"
|
|
19328
|
+
[@rotateArrow]="arrowType()!"
|
|
19329
|
+
>
|
|
19154
19330
|
chevron_left
|
|
19155
19331
|
</span>
|
|
19156
19332
|
{{ opened ? 'Retrair menu' : '' }}
|
|
19157
19333
|
</button>
|
|
19158
19334
|
|
|
19159
|
-
<div
|
|
19335
|
+
<div
|
|
19336
|
+
class="g-sidenav-menu"
|
|
19337
|
+
(mouseenter)="handleMouseEnter()"
|
|
19338
|
+
(mouseleave)="handleMouseLeave()"
|
|
19339
|
+
>
|
|
19160
19340
|
<div class="g-sidenav-menu-list-base g-sidenav-menu-list">
|
|
19161
19341
|
@if (opened && menuLevelName()) {
|
|
19162
19342
|
<button
|
|
19163
19343
|
id="btnMenuLevelGoBack"
|
|
19164
19344
|
name="btnMenuLevelGoBack"
|
|
19165
19345
|
class="g-sidenav-menu-item-level-back"
|
|
19166
|
-
(click)="
|
|
19346
|
+
(click)="handleMenuLevelGoBack()"
|
|
19347
|
+
>
|
|
19167
19348
|
<div class="g-sidenav-menu-item-content">
|
|
19168
19349
|
<span class="material-symbols-rounded g-sidenav-menu-level-back-icon">
|
|
19169
19350
|
arrow_left_alt
|
|
@@ -19178,7 +19359,8 @@ class Sidenav {
|
|
|
19178
19359
|
<gipi-sidenav-menu-item
|
|
19179
19360
|
[menu]="menu"
|
|
19180
19361
|
[sidenavOpened]="opened"
|
|
19181
|
-
(onSelect)="
|
|
19362
|
+
(onSelect)="handleMenuItemSelect($event)"
|
|
19363
|
+
/>
|
|
19182
19364
|
}
|
|
19183
19365
|
</div>
|
|
19184
19366
|
@if (menuFooterList.length) {
|
|
@@ -19187,7 +19369,8 @@ class Sidenav {
|
|
|
19187
19369
|
<gipi-sidenav-menu-item
|
|
19188
19370
|
[menu]="menu"
|
|
19189
19371
|
[sidenavOpened]="opened"
|
|
19190
|
-
(onSelect)="
|
|
19372
|
+
(onSelect)="handleMenuItemSelect($event)"
|
|
19373
|
+
/>
|
|
19191
19374
|
}
|
|
19192
19375
|
</div>
|
|
19193
19376
|
}
|
|
@@ -19197,27 +19380,45 @@ class Sidenav {
|
|
|
19197
19380
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: Sidenav, decorators: [{
|
|
19198
19381
|
type: Component,
|
|
19199
19382
|
args: [{ selector: 'gipi-sidenav', exportAs: 'gSidenav', template: `
|
|
19383
|
+
@if (mode() === 'over' && opened) {
|
|
19384
|
+
<button
|
|
19385
|
+
type="button"
|
|
19386
|
+
class="g-sidenav-backdrop"
|
|
19387
|
+
aria-label="Fechar menu lateral"
|
|
19388
|
+
(click)="handleToggleSidenav()"
|
|
19389
|
+
>
|
|
19390
|
+
<!-- Fechar menu lateral -->
|
|
19391
|
+
</button>
|
|
19392
|
+
}
|
|
19393
|
+
|
|
19200
19394
|
<button
|
|
19201
19395
|
id="btnToggleSidenav"
|
|
19202
19396
|
name="btnToggleSidenav"
|
|
19203
19397
|
class="g-sidenav-control"
|
|
19204
|
-
(click)="
|
|
19398
|
+
(click)="handleToggleSidenav()"
|
|
19399
|
+
>
|
|
19205
19400
|
<span
|
|
19206
19401
|
class="material-symbols-rounded g-sidenav-control-icon"
|
|
19207
|
-
[@rotateArrow]="arrowType()!"
|
|
19402
|
+
[@rotateArrow]="arrowType()!"
|
|
19403
|
+
>
|
|
19208
19404
|
chevron_left
|
|
19209
19405
|
</span>
|
|
19210
19406
|
{{ opened ? 'Retrair menu' : '' }}
|
|
19211
19407
|
</button>
|
|
19212
19408
|
|
|
19213
|
-
<div
|
|
19409
|
+
<div
|
|
19410
|
+
class="g-sidenav-menu"
|
|
19411
|
+
(mouseenter)="handleMouseEnter()"
|
|
19412
|
+
(mouseleave)="handleMouseLeave()"
|
|
19413
|
+
>
|
|
19214
19414
|
<div class="g-sidenav-menu-list-base g-sidenav-menu-list">
|
|
19215
19415
|
@if (opened && menuLevelName()) {
|
|
19216
19416
|
<button
|
|
19217
19417
|
id="btnMenuLevelGoBack"
|
|
19218
19418
|
name="btnMenuLevelGoBack"
|
|
19219
19419
|
class="g-sidenav-menu-item-level-back"
|
|
19220
|
-
(click)="
|
|
19420
|
+
(click)="handleMenuLevelGoBack()"
|
|
19421
|
+
>
|
|
19221
19422
|
<div class="g-sidenav-menu-item-content">
|
|
19222
19423
|
<span class="material-symbols-rounded g-sidenav-menu-level-back-icon">
|
|
19223
19424
|
arrow_left_alt
|
|
@@ -19232,7 +19433,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19232
19433
|
<gipi-sidenav-menu-item
|
|
19233
19434
|
[menu]="menu"
|
|
19234
19435
|
[sidenavOpened]="opened"
|
|
19235
|
-
(onSelect)="
|
|
19436
|
+
(onSelect)="handleMenuItemSelect($event)"
|
|
19437
|
+
/>
|
|
19236
19438
|
}
|
|
19237
19439
|
</div>
|
|
19238
19440
|
@if (menuFooterList.length) {
|
|
@@ -19241,7 +19443,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19241
19443
|
<gipi-sidenav-menu-item
|
|
19242
19444
|
[menu]="menu"
|
|
19243
19445
|
[sidenavOpened]="opened"
|
|
19244
|
-
(onSelect)="
|
|
19446
|
+
(onSelect)="handleMenuItemSelect($event)"
|
|
19447
|
+
/>
|
|
19245
19448
|
}
|
|
19246
19449
|
</div>
|
|
19247
19450
|
}
|
|
@@ -19252,6 +19455,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19252
19455
|
class: 'g-sidenav',
|
|
19253
19456
|
'[class.g-sidenav-opened]': 'opened',
|
|
19254
19457
|
'[class.g-sidenav-closed]': '!opened',
|
|
19458
|
+
'[class.g-sidenav-mode-over]': "mode() === 'over'",
|
|
19459
|
+
'[class.g-sidenav-mode-side]': "mode() === 'side'",
|
|
19460
|
+
'[class.g-sidenav-mobile]': "viewportSize() === 'mobile'",
|
|
19461
|
+
'[class.g-sidenav-tablet]': "viewportSize() === 'tablet'",
|
|
19462
|
+
'[class.g-sidenav-desktop]': "viewportSize() === 'desktop'",
|
|
19255
19463
|
}, animations: [rotateArrowBtnControl], imports: [CommonModule, SidenavMenuItem] }]
|
|
19256
19464
|
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], opened: [{
|
|
19257
19465
|
type: Input$1
|
|
@@ -19259,17 +19467,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
19259
19467
|
type: Input$1
|
|
19260
19468
|
}], menuFooterList: [{
|
|
19261
19469
|
type: Input$1
|
|
19470
|
+
}], handleWindowResize: [{
|
|
19471
|
+
type: HostListener,
|
|
19472
|
+
args: ['window:resize']
|
|
19262
19473
|
}] } });
|
|
19263
19474
|
class SidenavModule {
|
|
19264
19475
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
19265
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: SidenavModule, imports: [SidenavMenuItem, Sidenav], exports: [SidenavMenuItem, Sidenav] }); }
|
|
19266
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavModule, imports: [SidenavMenuItem, Sidenav] }); }
|
|
19476
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: SidenavModule, imports: [SidenavMenuItem, SidenavContent, SidenavContainer, Sidenav], exports: [SidenavMenuItem, SidenavContent, SidenavContainer, Sidenav] }); }
|
|
19477
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavModule, imports: [SidenavMenuItem, SidenavContent, SidenavContainer, Sidenav] }); }
|
|
19267
19478
|
}
|
|
19268
19479
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavModule, decorators: [{
|
|
19269
19480
|
type: NgModule,
|
|
19270
19481
|
args: [{
|
|
19271
|
-
imports: [SidenavMenuItem, Sidenav],
|
|
19272
|
-
exports: [SidenavMenuItem, Sidenav],
|
|
19482
|
+
imports: [SidenavMenuItem, SidenavContent, SidenavContainer, Sidenav],
|
|
19483
|
+
exports: [SidenavMenuItem, SidenavContent, SidenavContainer, Sidenav],
|
|
19273
19484
|
}]
|
|
19274
19485
|
}] });
|
|
19275
19486
|
|
|
@@ -20523,27 +20734,21 @@ class Table {
|
|
|
20523
20734
|
get columnExpandDetailColspan() {
|
|
20524
20735
|
return this.columnsToDisplay().length;
|
|
20525
20736
|
}
|
|
20526
|
-
get _matSortDirection() {
|
|
20527
|
-
const matSortDirection = this.matSortDirection();
|
|
20528
|
-
return !StringUtil.isEmpty(matSortDirection)
|
|
20529
|
-
? matSortDirection === 'DESC'
|
|
20530
|
-
? 'desc'
|
|
20531
|
-
: 'asc'
|
|
20532
|
-
: '';
|
|
20533
|
-
}
|
|
20534
20737
|
get _matSortStart() {
|
|
20535
|
-
const
|
|
20536
|
-
return
|
|
20738
|
+
const configuredStart = this._toMaterialSortDirection(this.matSortStart());
|
|
20739
|
+
return StringUtil.isEmpty(configuredStart) ? 'asc' : configuredStart;
|
|
20537
20740
|
}
|
|
20538
20741
|
constructor() {
|
|
20742
|
+
this._uniqueId = inject(_IdGenerator).getId('gipi-table-');
|
|
20743
|
+
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
20744
|
+
this._ngZone = inject(NgZone);
|
|
20539
20745
|
this.expandDetailRef = contentChild('expandDetail', ...(ngDevMode ? [{ debugName: "expandDetailRef" }] : []));
|
|
20540
20746
|
this.actionsRef = contentChild('actions', ...(ngDevMode ? [{ debugName: "actionsRef" }] : []));
|
|
20541
20747
|
this.menuContextRef = contentChild('menuContext', ...(ngDevMode ? [{ debugName: "menuContextRef" }] : []));
|
|
20542
20748
|
this.footerRef = contentChild('footer', ...(ngDevMode ? [{ debugName: "footerRef" }] : []));
|
|
20543
|
-
this._uniqueId = inject(_IdGenerator).getId('gipi-table-');
|
|
20544
|
-
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
20545
|
-
this._ngZone = inject(NgZone);
|
|
20546
20749
|
this.menuContextWrapperElement = signal(null, ...(ngDevMode ? [{ debugName: "menuContextWrapperElement" }] : []));
|
|
20750
|
+
this.sortActiveState = signal('', ...(ngDevMode ? [{ debugName: "sortActiveState" }] : []));
|
|
20751
|
+
this.sortDirectionState = signal('', ...(ngDevMode ? [{ debugName: "sortDirectionState" }] : []));
|
|
20547
20752
|
this.tableFooterElement = signal(null, ...(ngDevMode ? [{ debugName: "tableFooterElement" }] : []));
|
|
20548
20753
|
this.tableMinHeight = computed(() => {
|
|
20549
20754
|
const headerHeight = ROW_HEIGHT$1;
|
|
@@ -20731,6 +20936,17 @@ class Table {
|
|
|
20731
20936
|
this.onSort = output();
|
|
20732
20937
|
this.onPage = output();
|
|
20733
20938
|
this.onClickRow = output();
|
|
20939
|
+
effect(() => {
|
|
20940
|
+
const externalActive = this.matSortActive();
|
|
20941
|
+
const externalDirection = this._toMaterialSortDirection(this.matSortDirection());
|
|
20942
|
+
// Evita sobrescrever a interação local com estado externo vazio
|
|
20943
|
+
// enquanto o parent ainda processa o sort/page assíncrono.
|
|
20944
|
+
if (StringUtil.isEmpty(externalActive) && StringUtil.isEmpty(externalDirection)) {
|
|
20945
|
+
return;
|
|
20946
|
+
}
|
|
20947
|
+
this.sortActiveState.set(externalActive);
|
|
20948
|
+
this.sortDirectionState.set(externalDirection);
|
|
20949
|
+
});
|
|
20734
20950
|
}
|
|
20735
20951
|
ngOnInit() {
|
|
20736
20952
|
queueMicrotask(() => {
|
|
@@ -20768,7 +20984,9 @@ class Table {
|
|
|
20768
20984
|
return CssUtil.coerceCssPixelValue(width);
|
|
20769
20985
|
}
|
|
20770
20986
|
onHandleSort(event) {
|
|
20771
|
-
|
|
20987
|
+
this.sortActiveState.set(event.active ?? '');
|
|
20988
|
+
this.sortDirectionState.set(event.direction ?? '');
|
|
20989
|
+
const sort = new BaseSortModel(event.active, this._toCoreSortDirection(event.direction));
|
|
20772
20990
|
this.onSort.emit(sort);
|
|
20773
20991
|
const pageEvent = {
|
|
20774
20992
|
pageIndex: this.paginatorPageNumber(),
|
|
@@ -20942,7 +21160,12 @@ class Table {
|
|
|
20942
21160
|
else if (!NumberUtil.isEmpty(columnInitial)) {
|
|
20943
21161
|
throw new Error(`Final column is not available`);
|
|
20944
21162
|
}
|
|
20945
|
-
|
|
21163
|
+
/**
|
|
21164
|
+
* Ponto incial do menu referente ao mouse.
|
|
21165
|
+
* - Se contem 1 ou 2 itens, o ponto inicial é mais próximo ao canto esquerdo do menu.
|
|
21166
|
+
* - Se contem mais de 2 itens, o ponto inicial é mais próximo ao centro do menu.
|
|
21167
|
+
*/
|
|
21168
|
+
const offsetX = menuContextRect.width < 85 ? event.clientX - 20 : event.clientX - 60;
|
|
20946
21169
|
const clampedX = Math.min(Math.max(offsetX, startX), endX);
|
|
20947
21170
|
this._ngZone.run(() => {
|
|
20948
21171
|
menuContextWrapperElement.style.top = `${rowTop}px`;
|
|
@@ -21000,13 +21223,39 @@ class Table {
|
|
|
21000
21223
|
}
|
|
21001
21224
|
return JSON.stringify(row1) === JSON.stringify(row2);
|
|
21002
21225
|
}
|
|
21226
|
+
_toMaterialSortDirection(direction) {
|
|
21227
|
+
if (StringUtil.isEmpty(direction)) {
|
|
21228
|
+
return '';
|
|
21229
|
+
}
|
|
21230
|
+
const normalizedDirection = String(direction).toUpperCase();
|
|
21231
|
+
if (normalizedDirection === 'ASC') {
|
|
21232
|
+
return 'asc';
|
|
21233
|
+
}
|
|
21234
|
+
if (normalizedDirection === 'DESC') {
|
|
21235
|
+
return 'desc';
|
|
21236
|
+
}
|
|
21237
|
+
return '';
|
|
21238
|
+
}
|
|
21239
|
+
_toCoreSortDirection(direction) {
|
|
21240
|
+
if (StringUtil.isEmpty(direction)) {
|
|
21241
|
+
return '';
|
|
21242
|
+
}
|
|
21243
|
+
const normalizedDirection = String(direction).toUpperCase();
|
|
21244
|
+
if (normalizedDirection === 'ASC') {
|
|
21245
|
+
return 'ASC';
|
|
21246
|
+
}
|
|
21247
|
+
if (normalizedDirection === 'DESC') {
|
|
21248
|
+
return 'DESC';
|
|
21249
|
+
}
|
|
21250
|
+
return '';
|
|
21251
|
+
}
|
|
21003
21252
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: Table, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21004
21253
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: Table, isStandalone: true, selector: "gipi-table", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, calcMinHeight: { classPropertyName: "calcMinHeight", publicName: "calcMinHeight", isSignal: true, isRequired: false, transformFunction: null }, isRowHighlightFn: { classPropertyName: "isRowHighlightFn", publicName: "isRowHighlightFn", isSignal: true, isRequired: false, transformFunction: null }, matSortFrontend: { classPropertyName: "matSortFrontend", publicName: "sortFrontend", isSignal: true, isRequired: false, transformFunction: null }, matSortActive: { classPropertyName: "matSortActive", publicName: "sortActive", isSignal: true, isRequired: false, transformFunction: null }, matSortDirection: { classPropertyName: "matSortDirection", publicName: "sortDirection", isSignal: true, isRequired: false, transformFunction: null }, matSortDisableClear: { classPropertyName: "matSortDisableClear", publicName: "sortDisableClear", isSignal: true, isRequired: false, transformFunction: null }, matSortDisabled: { classPropertyName: "matSortDisabled", publicName: "sortDisabled", isSignal: true, isRequired: false, transformFunction: null }, matSortStart: { classPropertyName: "matSortStart", publicName: "sortStart", isSignal: true, isRequired: false, transformFunction: null }, expandedRows: { classPropertyName: "expandedRows", publicName: "expandedRows", isSignal: false, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, expandedRowsInitial: { classPropertyName: "expandedRowsInitial", publicName: "expandedRows", isSignal: true, isRequired: false, transformFunction: null }, expandAllEnabled: { classPropertyName: "expandAllEnabled", publicName: "expandAllEnabled", isSignal: true, isRequired: false, transformFunction: null }, multiExpandable: { classPropertyName: "multiExpandable", publicName: "multiExpandable", isSignal: true, isRequired: false, transformFunction: null }, expandablePosition: { classPropertyName: "expandablePosition", publicName: "expandablePosition", isSignal: true, isRequired: false, transformFunction: null }, expandableByClickInRow: { classPropertyName: "expandableByClickInRow", publicName: "expandableByClickInRow", isSignal: true, isRequired: false, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: false, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, multiSelectionWithClick: { classPropertyName: "multiSelectionWithClick", publicName: "multiSelectionWithClick", isSignal: true, isRequired: false, transformFunction: null }, multiSelectable: { classPropertyName: "multiSelectable", publicName: "multiSelectable", isSignal: true, isRequired: false, transformFunction: null }, expandableCompareWithFn: { classPropertyName: "expandableCompareWithFn", publicName: "expandableCompareWithFn", isSignal: true, isRequired: false, transformFunction: null }, isRowExpandableFn: { classPropertyName: "isRowExpandableFn", publicName: "isRowExpandableFn", isSignal: true, isRequired: false, transformFunction: null }, selectAllEnabled: { classPropertyName: "selectAllEnabled", publicName: "selectAllEnabled", isSignal: true, isRequired: false, transformFunction: null }, selectablePosition: { classPropertyName: "selectablePosition", publicName: "selectablePosition", isSignal: true, isRequired: false, transformFunction: null }, selectByClickInRow: { classPropertyName: "selectByClickInRow", publicName: "selectByClickInRow", isSignal: true, isRequired: false, transformFunction: null }, selectCompareWithFn: { classPropertyName: "selectCompareWithFn", publicName: "selectCompareWithFn", isSignal: true, isRequired: false, transformFunction: null }, selectedRowsInitial: { classPropertyName: "selectedRowsInitial", publicName: "selectedRowsInitial", isSignal: true, isRequired: false, transformFunction: null }, isRowSelectableFn: { classPropertyName: "isRowSelectableFn", publicName: "isRowSelectableFn", isSignal: true, isRequired: false, transformFunction: null }, trackByFn: { classPropertyName: "trackByFn", publicName: "trackByFn", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: true, transformFunction: null }, columnInitial: { classPropertyName: "columnInitial", publicName: "columnInitial", isSignal: true, isRequired: false, transformFunction: null }, columnFinal: { classPropertyName: "columnFinal", publicName: "columnFinal", isSignal: true, isRequired: false, transformFunction: null }, showActionsOnHover: { classPropertyName: "showActionsOnHover", publicName: "showActionsOnHover", isSignal: true, isRequired: false, transformFunction: null }, actionsWidth: { classPropertyName: "actionsWidth", publicName: "actionsWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsMinWidth: { classPropertyName: "actionsMinWidth", publicName: "actionsMinWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsMaxWidth: { classPropertyName: "actionsMaxWidth", publicName: "actionsMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, paginatorFrontend: { classPropertyName: "paginatorFrontend", publicName: "paginatorFrontend", isSignal: true, isRequired: false, transformFunction: null }, paginatorDisabled: { classPropertyName: "paginatorDisabled", publicName: "paginatorDisabled", isSignal: true, isRequired: false, transformFunction: null }, paginatorPageSize: { classPropertyName: "paginatorPageSize", publicName: "paginatorPageSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, paginatorPageNumber: { classPropertyName: "paginatorPageNumber", publicName: "paginatorPageNumber", isSignal: true, isRequired: false, transformFunction: null }, paginatorLength: { classPropertyName: "paginatorLength", publicName: "paginatorLength", isSignal: true, isRequired: false, transformFunction: null }, paginatorPageSizeOptions: { classPropertyName: "paginatorPageSizeOptions", publicName: "paginatorPageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, paginatorHidePageSize: { classPropertyName: "paginatorHidePageSize", publicName: "paginatorHidePageSize", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null }, menuItemsContext: { classPropertyName: "menuItemsContext", publicName: "menuItemsContext", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, outputs: { expandedRowsChange: "expandedRowsChange", onExpandedRows: "onExpandedRows", onExpandRow: "onExpandRow", selectedRowsChange: "selectedRowsChange", onSelectedRows: "onSelectedRows", onSelectRow: "onSelectRow", onSort: "onSort", onPage: "onPage", onClickRow: "onClickRow" }, host: { properties: { "attr.id": "id()", "attr.name": "name()", "attr.role": "'table'", "style.min-height": "this.tableMinHeightPx" }, classAttribute: "g-table" }, providers: [
|
|
21005
21254
|
{
|
|
21006
21255
|
provide: MatPaginatorIntl,
|
|
21007
21256
|
useFactory: () => inject(PaginatorIntlToken),
|
|
21008
21257
|
},
|
|
21009
|
-
], queries: [{ propertyName: "expandDetailRef", first: true, predicate: ["expandDetail"], descendants: true, isSignal: true }, { propertyName: "actionsRef", first: true, predicate: ["actions"], descendants: true, isSignal: true }, { propertyName: "menuContextRef", first: true, predicate: ["menuContext"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tableFooterRef", first: true, predicate: ["gTableFooter"], descendants: true, read: ElementRef }, { propertyName: "matPaginatorRef", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "matSortRef", first: true, predicate: MatSort, descendants: true }, { propertyName: "menuContextWrapperRef", first: true, predicate: ["menuContextWrapper"], descendants: true, read: ElementRef }], exportAs: ["gTable"], ngImport: i0, template: "<table\n #gTable\n class=\"g-table-content\"\n tabindex=\"-1\"\n cdk-table\n [dataSource]=\"dataSource\"\n [trackBy]=\"trackByFn()\"\n [multiTemplateDataRows]=\"expandable()\"\n matSort\n [matSortActive]=\"matSortActive()\"\n [matSortDirection]=\"_matSortDirection\"\n [matSortDisableClear]=\"matSortDisableClear()\"\n [matSortDisabled]=\"matSortDisabled()\"\n [matSortStart]=\"_matSortStart\"\n (matSortChange)=\"onHandleSort($event)\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n>\n <!-- Expand Column -->\n @if (expandable()) {\n <ng-container cdkColumnDef=\"expand\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (expandAllEnabled() && multiExpandable()) {\n <button\n type=\"button\"\n class=\"g-table-button-expand g-table-button-expand-all\"\n [class.g-table-button-expanded]=\"\n expandedRows?.hasValue() && isAllExpanded()\n \"\n (click)=\"onHandleToggleExpandAll(); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"isAllExpanded() ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\"\n />\n </button>\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <button\n mat-icon-button\n aria-label=\"expand row\"\n class=\"g-table-button-expand\"\n [class.g-table-button-expanded]=\"expandedRows?.isSelected(row)\"\n [disabled]=\"!isRowExpandableFn()(row)\"\n (click)=\"onHandleExpandRow(row); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"\n expandedRows?.isSelected(row)\n ? 'keyboard_arrow_up'\n : 'keyboard_arrow_down'\n \"\n />\n </button>\n </td>\n </ng-container>\n }\n\n <!-- Checkbox Column -->\n @if (selectable()) {\n <ng-container cdkColumnDef=\"select\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (selectAllEnabled() && multiSelectable()) {\n <gipi-checkbox\n [variant]=\"'primary'\"\n [checked]=\"selectedRows?.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectedRows?.hasValue() && !isAllSelected()\"\n (change)=\"onHandleToggleSelectAll()\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <gipi-checkbox\n [variant]=\"'secondary'\"\n [disabled]=\"!isRowSelectableFn()(row)\"\n [checked]=\"selectedRows?.isSelected(row)\"\n (change)=\"onHandleSelectRow(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <!-- Dynamic Columns -->\n @for (column of columns; track column) {\n <ng-container [cdkColumnDef]=\"column.property\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [mat-sort-header]=\"column.property\"\n [disabled]=\"!coerceConditionByColumn(column.sortable)\"\n [disableClear]=\"coerceConditionByColumn(column.sortDisableClear)\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"_columnWidth(column.width)\"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerHeader\"\n [style.justify-items]=\"column.alignHorHeader\"\n [class.g-table-align-center]=\"column.alignTextHeader === 'center'\"\n [class.g-table-align-end]=\"column.alignTextHeader === 'end'\"\n [class.g-table-align-start]=\"column.alignTextHeader === 'start'\"\n [class.g-table-align-left]=\"column.alignTextHeader === 'left'\"\n [class.g-table-align-right]=\"column.alignTextHeader === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextHeader === 'justify'\"\n >\n @if (column.templateHeader) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateHeader\"\n [ngTemplateOutletContext]=\"{ $implicit: column }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByColumn(column.slice)\"\n >\n {{ column.label }}\n </span>\n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"\n !!column.maxWidth && column.maxWidth !== '100%'\n ? '100%'\n : _columnWidth(column.width)\n \"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerCell\"\n [style.justify-items]=\"column.alignHorCell\"\n [class.g-table-align-center]=\"column.alignTextCell === 'center'\"\n [class.g-table-align-end]=\"column.alignTextCell === 'end'\"\n [class.g-table-align-start]=\"column.alignTextCell === 'start'\"\n [class.g-table-align-left]=\"column.alignTextCell === 'left'\"\n [class.g-table-align-right]=\"column.alignTextCell === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextCell === 'justify'\"\n (click)=\"columnCellAction(column, row, 'click')\"\n (dblclick)=\"columnCellAction(column, row, 'dblClick')\"\n (mouseenter)=\"columnCellAction(column, row, 'mouseEnter')\"\n (mouseleave)=\"columnCellAction(column, row, 'mouseLeave')\"\n >\n @if (column.templateCell) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateCell\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"column.subValue ? 1 : 2\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellValue(column, row) }}\n </span>\n\n @if (column.subValue) {\n <small\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellSubValue(column, row) }}\n </small>\n }\n }\n </td>\n </ng-container>\n }\n\n <!-- Actions Column -->\n @if (actionsRef()) {\n <ng-container cdkColumnDef=\"actions\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.text-align]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n A\u00E7\u00F5es\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n @if (!showActionsOnHover() || rowHovered() === row) {\n <ng-template\n [ngTemplateOutlet]=\"actionsRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n \n }\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The detail row is made up of this one column that spans across all columns -->\n @if (expandable() && expandDetailRef()) {\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [attr.colspan]=\"columnExpandDetailColspan\"\n style=\"padding: 0 !important\"\n >\n <div\n class=\"g-table-expand-detail-wrapper\"\n [class.g-table-expand-detail-wrapper-expanded]=\"expandedRows?.isSelected(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"expandDetailRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n ></ng-template>\n </div>\n </td>\n </ng-container>\n }\n\n <tr\n cdk-header-row\n *cdkHeaderRowDef=\"columnsToDisplay()\"\n class=\"g-table-header-row\"\n [class.hidden]=\"!showHeader()\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"menuContextHover = false; closeMenuContext()\"\n ></tr>\n\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: columnsToDisplay()\"\n class=\"g-table-row\"\n [class.g-table-row-hover]=\"menuContextRow() === row\"\n [class.g-table-row-highlight]=\"isRowHighlightFn()(row)\"\n [style.display]=\"loading ? 'none' : 'table-row'\"\n (mousemove)=\"showMenuContext($event, row)\"\n (mouseenter)=\"rowHovered.set(row)\"\n (mouseleave)=\"rowHovered.set(null)\"\n (click)=\"onHandleClickRow(row)\"\n ></tr>\n\n @if (expandable()) {\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: ['expandedDetail']\"\n class=\"g-table-expand-detail-row\"\n [class.g-table-expand-detail-row-expanded]=\"expandedRows?.isSelected(row)\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"rowHovered.set(row); menuContextHover = false; closeMenuContext()\"\n (mouseleave)=\"rowHovered.set(null)\"\n ></tr>\n }\n</table>\n\n@if (loading) {\n <gipi-loading type=\"progress-bar\" />\n}\n\n@if (!loading && dataSource.data.length <= 0) {\n <gipi-empty />\n}\n\n@if (!loading && dataSource.data.length > 0) {\n <div\n #gTableFooter\n class=\"g-table-footer-row\"\n >\n @if (footerRef()) {\n <ng-template\n [ngTemplateOutlet]=\"footerRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataSource }\"\n />\n }\n\n @if (paginator()) {\n <mat-paginator\n class=\"g-table-paginator\"\n [disabled]=\"paginatorDisabled() || loading\"\n [hidePageSize]=\"paginatorHidePageSize()\"\n [length]=\"paginatorLength()\"\n [pageIndex]=\"paginatorPageNumber()\"\n [pageSize]=\"paginatorPageSize\"\n [pageSizeOptions]=\"paginatorPageSizeOptions()\"\n [selectConfig]=\"{}\"\n [showFirstLastButtons]=\"true\"\n (page)=\"onHandlePage($event)\"\n />\n }\n </div>\n}\n\n@if (!loading && dataSource.data.length && (menuItemsContext().length > 0 || menuContextRef())) {\n <div\n #menuContextWrapper\n class=\"g-table-menu-context\"\n [attr.id]=\"'menuContext'\"\n [attr.role]=\"'menu'\"\n (mouseover)=\"menuContextHover = true\"\n (focus)=\"menuContextHover = true\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n >\n @if (menuItemsContext() && menuItemsContext().length > 0) {\n @for (menu of menuItemsContext(); track menu) {\n @if (coerceConditionByRow(menu.visible, menuContextRow())) {\n <button\n class=\"g-table-menu-item-context\"\n [class.g-table-menu-item-context-show-tag-new]=\"\n coerceConditionByRow(menu.showTagNew, menuContextRow())\n \"\n [attr.id]=\"menu.id\"\n [name]=\"menu.name\"\n [tabIndex]=\"$index\"\n [gTooltip]=\"menu.tooltip\"\n [gTooltipPosition]=\"'below'\"\n (click)=\"\n menu?.action(menuContextRow()!);\n menuContextHover = false;\n closeMenuContext()\n \"\n >\n @if (menu.icon || menu.svgIcon) {\n <gipi-icon\n class=\"g-button-icon\"\n [size]=\"22\"\n [icon]=\"menu.icon\"\n [svgIcon]=\"menu.svgIcon\"\n [fontSet]=\"menu.iconFontSet\"\n [variation]=\"menu.iconVariation\"\n [weight]=\"menu.iconWeight\"\n [grade]=\"menu.iconGrade\"\n [optical]=\"menu.iconOptical\"\n />\n }\n </button>\n }\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuContextRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: menuContextRow() }\"\n />\n }\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "component", type: i2$4.CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: i2$4.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2$4.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2$4.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2$4.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: i2$4.CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "component", type: i2$4.CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: i2$4.CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "component", type: i2$4.CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: i2$4.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i3$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i3$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: TextEllipsisModule }, { kind: "directive", type: TextEllipsisDirective, selector: "[gTextEllipsis]", inputs: ["gTextEllipsis", "gTextEllipsisEnabled"], exportAs: ["gTextEllipsis"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: TooltipDirective, selector: "[gTooltip]", inputs: ["gTooltip", "gTooltipPosition", "gTooltipDisabled", "gTooltipShowDelay", "gTooltipHideDelay"], exportAs: ["gTooltip"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: Checkbox, selector: "gipi-checkbox", inputs: ["label", "help", "variant", "checked", "indeterminate"], outputs: ["indeterminateChange", "change", "focus", "blur"], exportAs: ["gCheckbox"] }, { kind: "ngmodule", type: IconModule }, { kind: "component", type: Icon, selector: "gipi-icon", inputs: ["id", "name", "class", "style", "variation", "weight", "grade", "optical", "inline", "aria-label", "tooltip", "icon", "svgIcon", "size", "color", "fontSet"], exportAs: ["gIcon"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: Loading, selector: "gipi-loading", inputs: ["id", "name", "variant", "type"], exportAs: ["gLoading"] }, { kind: "ngmodule", type: EmptyModule }, { kind: "component", type: Empty, selector: "gipi-empty", inputs: ["id", "name", "label"], exportAs: ["gEmpty"] }] }); }
|
|
21258
|
+
], queries: [{ propertyName: "expandDetailRef", first: true, predicate: ["expandDetail"], descendants: true, isSignal: true }, { propertyName: "actionsRef", first: true, predicate: ["actions"], descendants: true, isSignal: true }, { propertyName: "menuContextRef", first: true, predicate: ["menuContext"], descendants: true, isSignal: true }, { propertyName: "footerRef", first: true, predicate: ["footer"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tableFooterRef", first: true, predicate: ["gTableFooter"], descendants: true, read: ElementRef }, { propertyName: "matPaginatorRef", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "matSortRef", first: true, predicate: MatSort, descendants: true }, { propertyName: "menuContextWrapperRef", first: true, predicate: ["menuContextWrapper"], descendants: true, read: ElementRef }], exportAs: ["gTable"], ngImport: i0, template: "<table\n #gTable\n class=\"g-table-content\"\n tabindex=\"-1\"\n cdk-table\n [dataSource]=\"dataSource\"\n [trackBy]=\"trackByFn()\"\n [multiTemplateDataRows]=\"expandable()\"\n matSort\n [matSortActive]=\"sortActiveState()\"\n [matSortDirection]=\"sortDirectionState()\"\n [matSortDisableClear]=\"matSortDisableClear()\"\n [matSortDisabled]=\"matSortDisabled()\"\n [matSortStart]=\"_matSortStart\"\n (matSortChange)=\"onHandleSort($event)\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n>\n <!-- Expand Column -->\n @if (expandable()) {\n <ng-container cdkColumnDef=\"expand\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (expandAllEnabled() && multiExpandable()) {\n <button\n type=\"button\"\n class=\"g-table-button-expand g-table-button-expand-all\"\n [class.g-table-button-expanded]=\"\n expandedRows?.hasValue() && isAllExpanded()\n \"\n (click)=\"onHandleToggleExpandAll(); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"isAllExpanded() ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\"\n />\n </button>\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <button\n mat-icon-button\n aria-label=\"expand row\"\n class=\"g-table-button-expand\"\n [class.g-table-button-expanded]=\"expandedRows?.isSelected(row)\"\n [disabled]=\"!isRowExpandableFn()(row)\"\n (click)=\"onHandleExpandRow(row); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"\n expandedRows?.isSelected(row)\n ? 'keyboard_arrow_up'\n : 'keyboard_arrow_down'\n \"\n />\n </button>\n </td>\n </ng-container>\n }\n\n <!-- Checkbox Column -->\n @if (selectable()) {\n <ng-container cdkColumnDef=\"select\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (selectAllEnabled() && multiSelectable()) {\n <gipi-checkbox\n [variant]=\"'primary'\"\n [checked]=\"selectedRows?.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectedRows?.hasValue() && !isAllSelected()\"\n (change)=\"onHandleToggleSelectAll()\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <gipi-checkbox\n [variant]=\"'secondary'\"\n [disabled]=\"!isRowSelectableFn()(row)\"\n [checked]=\"selectedRows?.isSelected(row)\"\n (change)=\"onHandleSelectRow(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <!-- Dynamic Columns -->\n @for (column of columns; track column) {\n <ng-container [cdkColumnDef]=\"column.property\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [mat-sort-header]=\"column.property\"\n [disabled]=\"!coerceConditionByColumn(column.sortable)\"\n [disableClear]=\"coerceConditionByColumn(column.sortDisableClear)\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"_columnWidth(column.width)\"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerHeader\"\n [style.justify-items]=\"column.alignHorHeader\"\n [class.g-table-align-center]=\"column.alignTextHeader === 'center'\"\n [class.g-table-align-end]=\"column.alignTextHeader === 'end'\"\n [class.g-table-align-start]=\"column.alignTextHeader === 'start'\"\n [class.g-table-align-left]=\"column.alignTextHeader === 'left'\"\n [class.g-table-align-right]=\"column.alignTextHeader === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextHeader === 'justify'\"\n >\n @if (column.templateHeader) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateHeader\"\n [ngTemplateOutletContext]=\"{ $implicit: column }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByColumn(column.slice)\"\n >\n {{ column.label }}\n </span>\n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"\n !!column.maxWidth && column.maxWidth !== '100%'\n ? '100%'\n : _columnWidth(column.width)\n \"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerCell\"\n [style.justify-items]=\"column.alignHorCell\"\n [class.g-table-align-center]=\"column.alignTextCell === 'center'\"\n [class.g-table-align-end]=\"column.alignTextCell === 'end'\"\n [class.g-table-align-start]=\"column.alignTextCell === 'start'\"\n [class.g-table-align-left]=\"column.alignTextCell === 'left'\"\n [class.g-table-align-right]=\"column.alignTextCell === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextCell === 'justify'\"\n (click)=\"columnCellAction(column, row, 'click')\"\n (dblclick)=\"columnCellAction(column, row, 'dblClick')\"\n (mouseenter)=\"columnCellAction(column, row, 'mouseEnter')\"\n (mouseleave)=\"columnCellAction(column, row, 'mouseLeave')\"\n >\n @if (column.templateCell) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateCell\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"column.subValue ? 1 : 2\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellValue(column, row) }}\n </span>\n\n @if (column.subValue) {\n <small\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellSubValue(column, row) }}\n </small>\n }\n }\n </td>\n </ng-container>\n }\n\n <!-- Actions Column -->\n @if (actionsRef()) {\n <ng-container cdkColumnDef=\"actions\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.text-align]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n A\u00E7\u00F5es\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n @if (!showActionsOnHover() || rowHovered() === row) {\n <ng-template\n [ngTemplateOutlet]=\"actionsRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n \n }\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The detail row is made up of this one column that spans across all columns -->\n @if (expandable() && expandDetailRef()) {\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [attr.colspan]=\"columnExpandDetailColspan\"\n style=\"padding: 0 !important\"\n >\n <div\n class=\"g-table-expand-detail-wrapper\"\n [class.g-table-expand-detail-wrapper-expanded]=\"expandedRows?.isSelected(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"expandDetailRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n ></ng-template>\n </div>\n </td>\n </ng-container>\n }\n\n <tr\n cdk-header-row\n *cdkHeaderRowDef=\"columnsToDisplay()\"\n class=\"g-table-header-row\"\n [class.hidden]=\"!showHeader()\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"menuContextHover = false; closeMenuContext()\"\n ></tr>\n\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: columnsToDisplay()\"\n class=\"g-table-row\"\n [class.g-table-row-hover]=\"menuContextRow() === row\"\n [class.g-table-row-highlight]=\"isRowHighlightFn()(row)\"\n [style.display]=\"loading ? 'none' : 'table-row'\"\n (mousemove)=\"showMenuContext($event, row)\"\n (mouseenter)=\"rowHovered.set(row)\"\n (mouseleave)=\"rowHovered.set(null)\"\n (click)=\"onHandleClickRow(row)\"\n ></tr>\n\n @if (expandable()) {\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: ['expandedDetail']\"\n class=\"g-table-expand-detail-row\"\n [class.g-table-expand-detail-row-expanded]=\"expandedRows?.isSelected(row)\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"rowHovered.set(row); menuContextHover = false; closeMenuContext()\"\n (mouseleave)=\"rowHovered.set(null)\"\n ></tr>\n }\n</table>\n\n@if (loading) {\n <gipi-loading type=\"progress-bar\" />\n}\n\n@if (!loading && dataSource.data.length <= 0) {\n <gipi-empty />\n}\n\n@if (!loading && dataSource.data.length > 0) {\n <div\n #gTableFooter\n class=\"g-table-footer-row\"\n >\n @if (footerRef()) {\n <ng-template\n [ngTemplateOutlet]=\"footerRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataSource }\"\n />\n }\n\n @if (paginator()) {\n <mat-paginator\n class=\"g-table-paginator\"\n [disabled]=\"paginatorDisabled() || loading\"\n [hidePageSize]=\"paginatorHidePageSize()\"\n [length]=\"paginatorLength()\"\n [pageIndex]=\"paginatorPageNumber()\"\n [pageSize]=\"paginatorPageSize\"\n [pageSizeOptions]=\"paginatorPageSizeOptions()\"\n [selectConfig]=\"{}\"\n [showFirstLastButtons]=\"true\"\n (page)=\"onHandlePage($event)\"\n />\n }\n </div>\n}\n\n@if (!loading && dataSource.data.length && (menuItemsContext().length > 0 || menuContextRef())) {\n <div\n #menuContextWrapper\n class=\"g-table-menu-context\"\n [attr.id]=\"'menuContext'\"\n [attr.role]=\"'menu'\"\n (mouseover)=\"menuContextHover = true\"\n (focus)=\"menuContextHover = true\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n >\n @if (menuItemsContext() && menuItemsContext().length > 0) {\n @for (menu of menuItemsContext(); track menu) {\n @if (coerceConditionByRow(menu.visible, menuContextRow())) {\n <button\n class=\"g-table-menu-item-context\"\n [class.g-table-menu-item-context-show-tag-new]=\"\n coerceConditionByRow(menu.showTagNew, menuContextRow())\n \"\n [attr.id]=\"menu.id\"\n [name]=\"menu.name\"\n [tabIndex]=\"$index\"\n [gTooltip]=\"menu.tooltip\"\n [gTooltipPosition]=\"'below'\"\n (click)=\"\n menu?.action(menuContextRow()!);\n menuContextHover = false;\n closeMenuContext()\n \"\n >\n @if (menu.icon || menu.svgIcon) {\n <gipi-icon\n class=\"g-button-icon\"\n [size]=\"22\"\n [icon]=\"menu.icon\"\n [svgIcon]=\"menu.svgIcon\"\n [fontSet]=\"menu.iconFontSet\"\n [variation]=\"menu.iconVariation\"\n [weight]=\"menu.iconWeight\"\n [grade]=\"menu.iconGrade\"\n [optical]=\"menu.iconOptical\"\n />\n }\n </button>\n }\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuContextRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: menuContextRow() }\"\n />\n }\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "component", type: i2$4.CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: i2$4.CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "directive", type: i2$4.CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: i2$4.CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: i2$4.CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: i2$4.CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "component", type: i2$4.CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: i2$4.CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "component", type: i2$4.CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: i2$4.CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i3$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i3$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: TextEllipsisModule }, { kind: "directive", type: TextEllipsisDirective, selector: "[gTextEllipsis]", inputs: ["gTextEllipsis", "gTextEllipsisEnabled"], exportAs: ["gTextEllipsis"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: TooltipDirective, selector: "[gTooltip]", inputs: ["gTooltip", "gTooltipPosition", "gTooltipDisabled", "gTooltipShowDelay", "gTooltipHideDelay"], exportAs: ["gTooltip"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: Checkbox, selector: "gipi-checkbox", inputs: ["label", "help", "variant", "checked", "indeterminate"], outputs: ["indeterminateChange", "change", "focus", "blur"], exportAs: ["gCheckbox"] }, { kind: "ngmodule", type: IconModule }, { kind: "component", type: Icon, selector: "gipi-icon", inputs: ["id", "name", "class", "style", "variation", "weight", "grade", "optical", "inline", "aria-label", "tooltip", "icon", "svgIcon", "size", "color", "fontSet"], exportAs: ["gIcon"] }, { kind: "ngmodule", type: LoadingModule }, { kind: "component", type: Loading, selector: "gipi-loading", inputs: ["id", "name", "variant", "type"], exportAs: ["gLoading"] }, { kind: "ngmodule", type: EmptyModule }, { kind: "component", type: Empty, selector: "gipi-empty", inputs: ["id", "name", "label"], exportAs: ["gEmpty"] }] }); }
|
|
21010
21259
|
}
|
|
21011
21260
|
__decorate([
|
|
21012
21261
|
Debounce(50)
|
|
@@ -21035,7 +21284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
21035
21284
|
IconModule,
|
|
21036
21285
|
LoadingModule,
|
|
21037
21286
|
EmptyModule,
|
|
21038
|
-
], template: "<table\n #gTable\n class=\"g-table-content\"\n tabindex=\"-1\"\n cdk-table\n [dataSource]=\"dataSource\"\n [trackBy]=\"trackByFn()\"\n [multiTemplateDataRows]=\"expandable()\"\n matSort\n [matSortActive]=\"matSortActive()\"\n [matSortDirection]=\"_matSortDirection\"\n [matSortDisableClear]=\"matSortDisableClear()\"\n [matSortDisabled]=\"matSortDisabled()\"\n [matSortStart]=\"_matSortStart\"\n (matSortChange)=\"onHandleSort($event)\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n>\n <!-- Expand Column -->\n @if (expandable()) {\n <ng-container cdkColumnDef=\"expand\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (expandAllEnabled() && multiExpandable()) {\n <button\n type=\"button\"\n class=\"g-table-button-expand g-table-button-expand-all\"\n [class.g-table-button-expanded]=\"\n expandedRows?.hasValue() && isAllExpanded()\n \"\n (click)=\"onHandleToggleExpandAll(); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"isAllExpanded() ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\"\n />\n </button>\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <button\n mat-icon-button\n aria-label=\"expand row\"\n class=\"g-table-button-expand\"\n [class.g-table-button-expanded]=\"expandedRows?.isSelected(row)\"\n [disabled]=\"!isRowExpandableFn()(row)\"\n (click)=\"onHandleExpandRow(row); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"\n expandedRows?.isSelected(row)\n ? 'keyboard_arrow_up'\n : 'keyboard_arrow_down'\n \"\n />\n </button>\n </td>\n </ng-container>\n }\n\n <!-- Checkbox Column -->\n @if (selectable()) {\n <ng-container cdkColumnDef=\"select\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (selectAllEnabled() && multiSelectable()) {\n <gipi-checkbox\n [variant]=\"'primary'\"\n [checked]=\"selectedRows?.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectedRows?.hasValue() && !isAllSelected()\"\n (change)=\"onHandleToggleSelectAll()\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <gipi-checkbox\n [variant]=\"'secondary'\"\n [disabled]=\"!isRowSelectableFn()(row)\"\n [checked]=\"selectedRows?.isSelected(row)\"\n (change)=\"onHandleSelectRow(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <!-- Dynamic Columns -->\n @for (column of columns; track column) {\n <ng-container [cdkColumnDef]=\"column.property\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [mat-sort-header]=\"column.property\"\n [disabled]=\"!coerceConditionByColumn(column.sortable)\"\n [disableClear]=\"coerceConditionByColumn(column.sortDisableClear)\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"_columnWidth(column.width)\"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerHeader\"\n [style.justify-items]=\"column.alignHorHeader\"\n [class.g-table-align-center]=\"column.alignTextHeader === 'center'\"\n [class.g-table-align-end]=\"column.alignTextHeader === 'end'\"\n [class.g-table-align-start]=\"column.alignTextHeader === 'start'\"\n [class.g-table-align-left]=\"column.alignTextHeader === 'left'\"\n [class.g-table-align-right]=\"column.alignTextHeader === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextHeader === 'justify'\"\n >\n @if (column.templateHeader) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateHeader\"\n [ngTemplateOutletContext]=\"{ $implicit: column }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByColumn(column.slice)\"\n >\n {{ column.label }}\n </span>\n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"\n !!column.maxWidth && column.maxWidth !== '100%'\n ? '100%'\n : _columnWidth(column.width)\n \"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerCell\"\n [style.justify-items]=\"column.alignHorCell\"\n [class.g-table-align-center]=\"column.alignTextCell === 'center'\"\n [class.g-table-align-end]=\"column.alignTextCell === 'end'\"\n [class.g-table-align-start]=\"column.alignTextCell === 'start'\"\n [class.g-table-align-left]=\"column.alignTextCell === 'left'\"\n [class.g-table-align-right]=\"column.alignTextCell === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextCell === 'justify'\"\n (click)=\"columnCellAction(column, row, 'click')\"\n (dblclick)=\"columnCellAction(column, row, 'dblClick')\"\n (mouseenter)=\"columnCellAction(column, row, 'mouseEnter')\"\n (mouseleave)=\"columnCellAction(column, row, 'mouseLeave')\"\n >\n @if (column.templateCell) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateCell\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"column.subValue ? 1 : 2\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellValue(column, row) }}\n </span>\n\n @if (column.subValue) {\n <small\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellSubValue(column, row) }}\n </small>\n }\n }\n </td>\n </ng-container>\n }\n\n <!-- Actions Column -->\n @if (actionsRef()) {\n <ng-container cdkColumnDef=\"actions\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.text-align]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n A\u00E7\u00F5es\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n @if (!showActionsOnHover() || rowHovered() === row) {\n <ng-template\n [ngTemplateOutlet]=\"actionsRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n \n }\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The detail row is made up of this one column that spans across all columns -->\n @if (expandable() && expandDetailRef()) {\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [attr.colspan]=\"columnExpandDetailColspan\"\n style=\"padding: 0 !important\"\n >\n <div\n class=\"g-table-expand-detail-wrapper\"\n [class.g-table-expand-detail-wrapper-expanded]=\"expandedRows?.isSelected(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"expandDetailRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n ></ng-template>\n </div>\n </td>\n </ng-container>\n }\n\n <tr\n cdk-header-row\n *cdkHeaderRowDef=\"columnsToDisplay()\"\n class=\"g-table-header-row\"\n [class.hidden]=\"!showHeader()\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"menuContextHover = false; closeMenuContext()\"\n ></tr>\n\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: columnsToDisplay()\"\n class=\"g-table-row\"\n [class.g-table-row-hover]=\"menuContextRow() === row\"\n [class.g-table-row-highlight]=\"isRowHighlightFn()(row)\"\n [style.display]=\"loading ? 'none' : 'table-row'\"\n (mousemove)=\"showMenuContext($event, row)\"\n (mouseenter)=\"rowHovered.set(row)\"\n (mouseleave)=\"rowHovered.set(null)\"\n (click)=\"onHandleClickRow(row)\"\n ></tr>\n\n @if (expandable()) {\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: ['expandedDetail']\"\n class=\"g-table-expand-detail-row\"\n [class.g-table-expand-detail-row-expanded]=\"expandedRows?.isSelected(row)\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"rowHovered.set(row); menuContextHover = false; closeMenuContext()\"\n (mouseleave)=\"rowHovered.set(null)\"\n ></tr>\n }\n</table>\n\n@if (loading) {\n <gipi-loading type=\"progress-bar\" />\n}\n\n@if (!loading && dataSource.data.length <= 0) {\n <gipi-empty />\n}\n\n@if (!loading && dataSource.data.length > 0) {\n <div\n #gTableFooter\n class=\"g-table-footer-row\"\n >\n @if (footerRef()) {\n <ng-template\n [ngTemplateOutlet]=\"footerRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataSource }\"\n />\n }\n\n @if (paginator()) {\n <mat-paginator\n class=\"g-table-paginator\"\n [disabled]=\"paginatorDisabled() || loading\"\n [hidePageSize]=\"paginatorHidePageSize()\"\n [length]=\"paginatorLength()\"\n [pageIndex]=\"paginatorPageNumber()\"\n [pageSize]=\"paginatorPageSize\"\n [pageSizeOptions]=\"paginatorPageSizeOptions()\"\n [selectConfig]=\"{}\"\n [showFirstLastButtons]=\"true\"\n (page)=\"onHandlePage($event)\"\n />\n }\n </div>\n}\n\n@if (!loading && dataSource.data.length && (menuItemsContext().length > 0 || menuContextRef())) {\n <div\n #menuContextWrapper\n class=\"g-table-menu-context\"\n [attr.id]=\"'menuContext'\"\n [attr.role]=\"'menu'\"\n (mouseover)=\"menuContextHover = true\"\n (focus)=\"menuContextHover = true\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n >\n @if (menuItemsContext() && menuItemsContext().length > 0) {\n @for (menu of menuItemsContext(); track menu) {\n @if (coerceConditionByRow(menu.visible, menuContextRow())) {\n <button\n class=\"g-table-menu-item-context\"\n [class.g-table-menu-item-context-show-tag-new]=\"\n coerceConditionByRow(menu.showTagNew, menuContextRow())\n \"\n [attr.id]=\"menu.id\"\n [name]=\"menu.name\"\n [tabIndex]=\"$index\"\n [gTooltip]=\"menu.tooltip\"\n [gTooltipPosition]=\"'below'\"\n (click)=\"\n menu?.action(menuContextRow()!);\n menuContextHover = false;\n closeMenuContext()\n \"\n >\n @if (menu.icon || menu.svgIcon) {\n <gipi-icon\n class=\"g-button-icon\"\n [size]=\"22\"\n [icon]=\"menu.icon\"\n [svgIcon]=\"menu.svgIcon\"\n [fontSet]=\"menu.iconFontSet\"\n [variation]=\"menu.iconVariation\"\n [weight]=\"menu.iconWeight\"\n [grade]=\"menu.iconGrade\"\n [optical]=\"menu.iconOptical\"\n />\n }\n </button>\n }\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuContextRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: menuContextRow() }\"\n />\n }\n </div>\n}\n" }]
|
|
21287
|
+
], template: "<table\n #gTable\n class=\"g-table-content\"\n tabindex=\"-1\"\n cdk-table\n [dataSource]=\"dataSource\"\n [trackBy]=\"trackByFn()\"\n [multiTemplateDataRows]=\"expandable()\"\n matSort\n [matSortActive]=\"sortActiveState()\"\n [matSortDirection]=\"sortDirectionState()\"\n [matSortDisableClear]=\"matSortDisableClear()\"\n [matSortDisabled]=\"matSortDisabled()\"\n [matSortStart]=\"_matSortStart\"\n (matSortChange)=\"onHandleSort($event)\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n>\n <!-- Expand Column -->\n @if (expandable()) {\n <ng-container cdkColumnDef=\"expand\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (expandAllEnabled() && multiExpandable()) {\n <button\n type=\"button\"\n class=\"g-table-button-expand g-table-button-expand-all\"\n [class.g-table-button-expanded]=\"\n expandedRows?.hasValue() && isAllExpanded()\n \"\n (click)=\"onHandleToggleExpandAll(); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"isAllExpanded() ? 'keyboard_arrow_up' : 'keyboard_arrow_down'\"\n />\n </button>\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <button\n mat-icon-button\n aria-label=\"expand row\"\n class=\"g-table-button-expand\"\n [class.g-table-button-expanded]=\"expandedRows?.isSelected(row)\"\n [disabled]=\"!isRowExpandableFn()(row)\"\n (click)=\"onHandleExpandRow(row); $event.stopPropagation()\"\n >\n <gipi-icon\n [icon]=\"\n expandedRows?.isSelected(row)\n ? 'keyboard_arrow_up'\n : 'keyboard_arrow_down'\n \"\n />\n </button>\n </td>\n </ng-container>\n }\n\n <!-- Checkbox Column -->\n @if (selectable()) {\n <ng-container cdkColumnDef=\"select\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n class=\"g-table-column-fixed-wrapper\"\n >\n @if (selectAllEnabled() && multiSelectable()) {\n <gipi-checkbox\n [variant]=\"'primary'\"\n [checked]=\"selectedRows?.hasValue() && isAllSelected()\"\n [indeterminate]=\"selectedRows?.hasValue() && !isAllSelected()\"\n (change)=\"onHandleToggleSelectAll()\"\n (click)=\"$event.stopPropagation()\"\n />\n } @else {\n \n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n class=\"g-table-column-fixed-wrapper\"\n >\n <gipi-checkbox\n [variant]=\"'secondary'\"\n [disabled]=\"!isRowSelectableFn()(row)\"\n [checked]=\"selectedRows?.isSelected(row)\"\n (change)=\"onHandleSelectRow(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <!-- Dynamic Columns -->\n @for (column of columns; track column) {\n <ng-container [cdkColumnDef]=\"column.property\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [mat-sort-header]=\"column.property\"\n [disabled]=\"!coerceConditionByColumn(column.sortable)\"\n [disableClear]=\"coerceConditionByColumn(column.sortDisableClear)\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"_columnWidth(column.width)\"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerHeader\"\n [style.justify-items]=\"column.alignHorHeader\"\n [class.g-table-align-center]=\"column.alignTextHeader === 'center'\"\n [class.g-table-align-end]=\"column.alignTextHeader === 'end'\"\n [class.g-table-align-start]=\"column.alignTextHeader === 'start'\"\n [class.g-table-align-left]=\"column.alignTextHeader === 'left'\"\n [class.g-table-align-right]=\"column.alignTextHeader === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextHeader === 'justify'\"\n >\n @if (column.templateHeader) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateHeader\"\n [ngTemplateOutletContext]=\"{ $implicit: column }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByColumn(column.slice)\"\n >\n {{ column.label }}\n </span>\n }\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.padding-inline.px]=\"column.borderSpacing\"\n [style.min-width]=\"_columnWidth(column.minWidth)\"\n [style.width]=\"\n !!column.maxWidth && column.maxWidth !== '100%'\n ? '100%'\n : _columnWidth(column.width)\n \"\n [style.max-width]=\"_columnWidth(column.maxWidth)\"\n [style.align-content]=\"column.alignVerCell\"\n [style.justify-items]=\"column.alignHorCell\"\n [class.g-table-align-center]=\"column.alignTextCell === 'center'\"\n [class.g-table-align-end]=\"column.alignTextCell === 'end'\"\n [class.g-table-align-start]=\"column.alignTextCell === 'start'\"\n [class.g-table-align-left]=\"column.alignTextCell === 'left'\"\n [class.g-table-align-right]=\"column.alignTextCell === 'right'\"\n [class.g-table-align-justify]=\"column.alignTextCell === 'justify'\"\n (click)=\"columnCellAction(column, row, 'click')\"\n (dblclick)=\"columnCellAction(column, row, 'dblClick')\"\n (mouseenter)=\"columnCellAction(column, row, 'mouseEnter')\"\n (mouseleave)=\"columnCellAction(column, row, 'mouseLeave')\"\n >\n @if (column.templateCell) {\n <ng-container\n [ngTemplateOutlet]=\"column.templateCell\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n <span\n [gTextEllipsis]=\"column.subValue ? 1 : 2\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellValue(column, row) }}\n </span>\n\n @if (column.subValue) {\n <small\n [gTextEllipsis]=\"1\"\n [gTextEllipsisEnabled]=\"coerceConditionByRow(column.slice, row)\"\n >\n {{ columnCellSubValue(column, row) }}\n </small>\n }\n }\n </td>\n </ng-container>\n }\n\n <!-- Actions Column -->\n @if (actionsRef()) {\n <ng-container cdkColumnDef=\"actions\">\n <th\n cdk-header-cell\n *cdkHeaderCellDef\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.text-align]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n A\u00E7\u00F5es\n </th>\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [style.justify-items]=\"'center'\"\n [style.align-content]=\"'center'\"\n [style.min-width]=\"_columnWidth(actionsMinWidth())\"\n [style.width]=\"_columnWidth(actionsWidth())\"\n [style.max-width]=\"_columnWidth(actionsMaxWidth())\"\n >\n @if (!showActionsOnHover() || rowHovered() === row) {\n <ng-template\n [ngTemplateOutlet]=\"actionsRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n />\n } @else {\n \n }\n </td>\n </ng-container>\n }\n\n <!-- Expanded Content Column - The detail row is made up of this one column that spans across all columns -->\n @if (expandable() && expandDetailRef()) {\n <ng-container cdkColumnDef=\"expandedDetail\">\n <td\n cdk-cell\n *cdkCellDef=\"let row\"\n [attr.colspan]=\"columnExpandDetailColspan\"\n style=\"padding: 0 !important\"\n >\n <div\n class=\"g-table-expand-detail-wrapper\"\n [class.g-table-expand-detail-wrapper-expanded]=\"expandedRows?.isSelected(row)\"\n >\n <ng-template\n [ngTemplateOutlet]=\"expandDetailRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: row }\"\n ></ng-template>\n </div>\n </td>\n </ng-container>\n }\n\n <tr\n cdk-header-row\n *cdkHeaderRowDef=\"columnsToDisplay()\"\n class=\"g-table-header-row\"\n [class.hidden]=\"!showHeader()\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"menuContextHover = false; closeMenuContext()\"\n ></tr>\n\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: columnsToDisplay()\"\n class=\"g-table-row\"\n [class.g-table-row-hover]=\"menuContextRow() === row\"\n [class.g-table-row-highlight]=\"isRowHighlightFn()(row)\"\n [style.display]=\"loading ? 'none' : 'table-row'\"\n (mousemove)=\"showMenuContext($event, row)\"\n (mouseenter)=\"rowHovered.set(row)\"\n (mouseleave)=\"rowHovered.set(null)\"\n (click)=\"onHandleClickRow(row)\"\n ></tr>\n\n @if (expandable()) {\n <tr\n cdk-row\n *cdkRowDef=\"let row; columns: ['expandedDetail']\"\n class=\"g-table-expand-detail-row\"\n [class.g-table-expand-detail-row-expanded]=\"expandedRows?.isSelected(row)\"\n (focus)=\"menuContextHover = false; closeMenuContext()\"\n (mouseenter)=\"rowHovered.set(row); menuContextHover = false; closeMenuContext()\"\n (mouseleave)=\"rowHovered.set(null)\"\n ></tr>\n }\n</table>\n\n@if (loading) {\n <gipi-loading type=\"progress-bar\" />\n}\n\n@if (!loading && dataSource.data.length <= 0) {\n <gipi-empty />\n}\n\n@if (!loading && dataSource.data.length > 0) {\n <div\n #gTableFooter\n class=\"g-table-footer-row\"\n >\n @if (footerRef()) {\n <ng-template\n [ngTemplateOutlet]=\"footerRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataSource }\"\n />\n }\n\n @if (paginator()) {\n <mat-paginator\n class=\"g-table-paginator\"\n [disabled]=\"paginatorDisabled() || loading\"\n [hidePageSize]=\"paginatorHidePageSize()\"\n [length]=\"paginatorLength()\"\n [pageIndex]=\"paginatorPageNumber()\"\n [pageSize]=\"paginatorPageSize\"\n [pageSizeOptions]=\"paginatorPageSizeOptions()\"\n [selectConfig]=\"{}\"\n [showFirstLastButtons]=\"true\"\n (page)=\"onHandlePage($event)\"\n />\n }\n </div>\n}\n\n@if (!loading && dataSource.data.length && (menuItemsContext().length > 0 || menuContextRef())) {\n <div\n #menuContextWrapper\n class=\"g-table-menu-context\"\n [attr.id]=\"'menuContext'\"\n [attr.role]=\"'menu'\"\n (mouseover)=\"menuContextHover = true\"\n (focus)=\"menuContextHover = true\"\n (mouseleave)=\"menuContextHover = false; closeMenuContext()\"\n (blur)=\"menuContextHover = false; closeMenuContext()\"\n >\n @if (menuItemsContext() && menuItemsContext().length > 0) {\n @for (menu of menuItemsContext(); track menu) {\n @if (coerceConditionByRow(menu.visible, menuContextRow())) {\n <button\n class=\"g-table-menu-item-context\"\n [class.g-table-menu-item-context-show-tag-new]=\"\n coerceConditionByRow(menu.showTagNew, menuContextRow())\n \"\n [attr.id]=\"menu.id\"\n [name]=\"menu.name\"\n [tabIndex]=\"$index\"\n [gTooltip]=\"menu.tooltip\"\n [gTooltipPosition]=\"'below'\"\n (click)=\"\n menu?.action(menuContextRow()!);\n menuContextHover = false;\n closeMenuContext()\n \"\n >\n @if (menu.icon || menu.svgIcon) {\n <gipi-icon\n class=\"g-button-icon\"\n [size]=\"22\"\n [icon]=\"menu.icon\"\n [svgIcon]=\"menu.svgIcon\"\n [fontSet]=\"menu.iconFontSet\"\n [variation]=\"menu.iconVariation\"\n [weight]=\"menu.iconWeight\"\n [grade]=\"menu.iconGrade\"\n [optical]=\"menu.iconOptical\"\n />\n }\n </button>\n }\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuContextRef()\"\n [ngTemplateOutletContext]=\"{ $implicit: menuContextRow() }\"\n />\n }\n </div>\n}\n" }]
|
|
21039
21288
|
}], ctorParameters: () => [], propDecorators: { tableFooterRef: [{
|
|
21040
21289
|
type: ViewChild,
|
|
21041
21290
|
args: ['gTableFooter', { read: ElementRef }]
|
|
@@ -23916,5 +24165,5 @@ function useLinkedFilter(initialValue, options) {
|
|
|
23916
24165
|
* Generated bundle index. Do not edit.
|
|
23917
24166
|
*/
|
|
23918
24167
|
|
|
23919
|
-
export { ActionRow, ActionRowModule, AllowedPublicRoutesToken, AppMessagesToken, ArrayUtil, AutoFocusDirective, AutoFocusModule, Avatar, AvatarModule, BaseAppliedFilter, BaseAuthService, BaseAuthServiceToken, BaseAuthorityModel, BaseComponent, BaseControlValueAccessor, BaseCrudService, BaseFilterModel, BaseFormComponent, BaseFormDialogComponent, BaseFormDialogDataModel, BaseInput, BaseListComponent, BaseListDialogComponent, BaseListDialogDataModel, BaseMenuModel, BaseModel, BasePageModel, BaseQueryParams, BaseReportComponent, BaseService, BaseSortModel, BaseTokenModel, BaseUserModel, Button, ButtonGroup, ButtonGroupModule, ButtonModule, CAPITALIZE_ACRONYMS, CAPITALIZE_PREPOSITIONS, CURRENCY_OPTIONS_DEFAULT, CacheableService, Checkbox, CheckboxGroup, CheckboxModule, Chips, ChipsModule, ConfirmDialog, ConfirmDialogIcon, ConfirmDialogModel, ConfirmDialogModule, ConfirmDialogService, CssUtil, CurrencyDirective, CurrencyModule, CurrencyUtil, DEFAULT_MESSAGES, DatePicker, DatePickerModule, DateUtil, Debounce, DialogConfig, DialogService, DisableAutoFillDirective, DocumentPipe, DocumentUtil, EchartsConfigToken, EchartsDirective, EchartsModule, EmailUtil, Empty, EmptyModule, ExpansionPanel, ExpansionPanelModule, Fieldset, FieldsetModule, FileDragAndDrop, FileDragAndDropModule, FileSaverService, FilterListbox, FilterListboxModule, FilterPersistenceService, FilterService, FilterURLService, FlexLayoutDirective, FlexLayoutModule, FormField, FormFieldErrors, FormFieldInputDirective, FormFieldModule, FormFieldPrefixDirective, FormFieldSuffixDirective, FormWrapper, FormWrapperDialog, FormWrapperModule, HelpfulTip, HelpfulTipModule, Icon, IconModule, Input, InputCurrency, InputCurrencyModule, InputFile, InputFileModule, InputGroup, InputGroupAddon, InputGroupModule, InputModule, InputPhone, InputPhoneModule, Label, LabelModule, Loading, LoadingModule, LocalStorageToken, Lozenge, LozengeModule, MoneyPipe, NomalizeTextPipe, NumberToWordsUtil, NumberUtil, ObjectUtil, PAGINATOR_INTL_PT_BR, PageAdjustService, Paginator, PaginatorIntlToken, PaginatorModule, PaginatorPipe, PasswordRequirements, PasswordRequirementsModule, PasswordValidationUtil, PdfViewer, PdfViewerDialog, PdfViewerDialogModel, PdfViewerDialogModule, PdfViewerService, PhoneUtil, Popover, PopoverModule, PopoverTargetDirective, PopoverTriggerDirective, RadioGroup, RadioGroupModule, STATES_DATA, ScrollFadeDirective, ScrollFadeModule, SelectClientSide, SelectEnum, SelectModule, SelectServerSide, SessionStorageToken, Sidenav, SidenavMenuItem, SidenavModule, Skeleton, SkeletonModule, SplitButton, SplitButtonModule, StateUtil, Step, Stepper, StepperModule, StringUtil, SvgRegisterService, Tab, TabGroup, Table, TableColumn, TableColumnBuilder, TableMenuItemContext, TableMenuItemContextBuilder, TableModule, TabsModule, Tag, TagModule, TextCapitalizeDirective, TextCapitalizeModule, TextEllipsisDirective, TextEllipsisModule, Textarea, TextareaModule, Toast, ToastIcon, ToastModel, ToastModule, ToastService, ToggleSwitch, ToggleSwitchModule, Toolbar, ToolbarModule, TooltipDirective, TooltipModule, TopNav, TopNavModule, TreeTable, TreeTableColumn, TreeTableColumnBuilder, TreeTableMenuItemContext, TreeTableMenuItemContextBuilder, TreeTableModule, UUIDUtil, UserProfile, UserProfileModule, animationFlyInOut, authChildGuard, authGuard, authInterceptor, eConfirmDialogTypes, eCurrencyInputMode, eMenuType, eSortDirection, eToastTypes, eTypeOperationCloseDialogEnum, eTypeOperationDialog, entityFilterSignal, errorInterceptor, filterSignal, provideAllowedPublicRoutes, provideAppMessages, provideBaseAuthService, provideEchartsCore, providePaginatorIntl, provideValueAccessor, publicChildGuard, publicGuard, rotateAnimation, rotateArrowTreeTableExpand, stateNamesMap, transformFilterSignal, useFilterPersistence, useLinkedFilter };
|
|
24168
|
+
export { ActionRow, ActionRowModule, AllowedPublicRoutesToken, AppMessagesToken, ArrayUtil, AutoFocusDirective, AutoFocusModule, Avatar, AvatarModule, BaseAppliedFilter, BaseAuthService, BaseAuthServiceToken, BaseAuthorityModel, BaseComponent, BaseControlValueAccessor, BaseCrudService, BaseFilterModel, BaseFormComponent, BaseFormDialogComponent, BaseFormDialogDataModel, BaseInput, BaseListComponent, BaseListDialogComponent, BaseListDialogDataModel, BaseMenuModel, BaseModel, BasePageModel, BaseQueryParams, BaseReportComponent, BaseService, BaseSortModel, BaseTokenModel, BaseUserModel, Button, ButtonGroup, ButtonGroupModule, ButtonModule, CAPITALIZE_ACRONYMS, CAPITALIZE_PREPOSITIONS, CURRENCY_OPTIONS_DEFAULT, CacheableService, Checkbox, CheckboxGroup, CheckboxModule, Chips, ChipsModule, ConfirmDialog, ConfirmDialogIcon, ConfirmDialogModel, ConfirmDialogModule, ConfirmDialogService, CssUtil, CurrencyDirective, CurrencyModule, CurrencyUtil, DEFAULT_MESSAGES, DatePicker, DatePickerModule, DateUtil, Debounce, DialogConfig, DialogService, DisableAutoFillDirective, DocumentPipe, DocumentUtil, EchartsConfigToken, EchartsDirective, EchartsModule, EmailUtil, Empty, EmptyModule, ExpansionPanel, ExpansionPanelModule, Fieldset, FieldsetModule, FileDragAndDrop, FileDragAndDropModule, FileSaverService, FilterListbox, FilterListboxModule, FilterPersistenceService, FilterService, FilterURLService, FlexLayoutDirective, FlexLayoutModule, FormField, FormFieldErrors, FormFieldInputDirective, FormFieldModule, FormFieldPrefixDirective, FormFieldSuffixDirective, FormWrapper, FormWrapperDialog, FormWrapperModule, HelpfulTip, HelpfulTipModule, Icon, IconModule, Input, InputCurrency, InputCurrencyModule, InputFile, InputFileModule, InputGroup, InputGroupAddon, InputGroupModule, InputModule, InputPhone, InputPhoneModule, Label, LabelModule, Loading, LoadingModule, LocalStorageToken, Lozenge, LozengeModule, MoneyPipe, NomalizeTextPipe, NumberToWordsUtil, NumberUtil, ObjectUtil, PAGINATOR_INTL_PT_BR, PageAdjustService, Paginator, PaginatorIntlToken, PaginatorModule, PaginatorPipe, PasswordRequirements, PasswordRequirementsModule, PasswordValidationUtil, PdfViewer, PdfViewerDialog, PdfViewerDialogModel, PdfViewerDialogModule, PdfViewerService, PhoneUtil, Popover, PopoverModule, PopoverTargetDirective, PopoverTriggerDirective, RadioGroup, RadioGroupModule, STATES_DATA, ScrollFadeDirective, ScrollFadeModule, SelectClientSide, SelectEnum, SelectModule, SelectServerSide, SessionStorageToken, Sidenav, SidenavContainer, SidenavContent, SidenavMenuItem, SidenavModule, Skeleton, SkeletonModule, SplitButton, SplitButtonModule, StateUtil, Step, Stepper, StepperModule, StringUtil, SvgRegisterService, Tab, TabGroup, Table, TableColumn, TableColumnBuilder, TableMenuItemContext, TableMenuItemContextBuilder, TableModule, TabsModule, Tag, TagModule, TextCapitalizeDirective, TextCapitalizeModule, TextEllipsisDirective, TextEllipsisModule, Textarea, TextareaModule, Toast, ToastIcon, ToastModel, ToastModule, ToastService, ToggleSwitch, ToggleSwitchModule, Toolbar, ToolbarModule, TooltipDirective, TooltipModule, TopNav, TopNavModule, TreeTable, TreeTableColumn, TreeTableColumnBuilder, TreeTableMenuItemContext, TreeTableMenuItemContextBuilder, TreeTableModule, UUIDUtil, UserProfile, UserProfileModule, animationFlyInOut, authChildGuard, authGuard, authInterceptor, eConfirmDialogTypes, eCurrencyInputMode, eMenuType, eSortDirection, eToastTypes, eTypeOperationCloseDialogEnum, eTypeOperationDialog, entityFilterSignal, errorInterceptor, filterSignal, provideAllowedPublicRoutes, provideAppMessages, provideBaseAuthService, provideEchartsCore, providePaginatorIntl, provideValueAccessor, publicChildGuard, publicGuard, rotateAnimation, rotateArrowTreeTableExpand, stateNamesMap, transformFilterSignal, useFilterPersistence, useLinkedFilter };
|
|
23920
24169
|
//# sourceMappingURL=gipisistemas-ngx-core.mjs.map
|