@masterkeymaterial/ui 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterkeymaterial/ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Biblioteca Angular de componentes UI e campos de formulario reutilizaveis para construir formularios dinamicos.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@angular/platform-browser": "^21.2.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@angular/cdk": "^21.2.7",
|
|
22
23
|
"@floating-ui/dom": "^1.7.6",
|
|
23
24
|
"tslib": "^2.3.0"
|
|
24
25
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { WritableSignal, Type, OnInit, OnDestroy, Signal, ElementRef, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { WritableSignal, Type, OnInit, OnDestroy, Signal, ElementRef, AfterViewInit, InjectionToken } from '@angular/core';
|
|
3
3
|
import * as _masterkeymaterial_ui from '@masterkeymaterial/ui';
|
|
4
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
4
5
|
|
|
5
6
|
interface IKV {
|
|
6
7
|
k: string | number | null | undefined;
|
|
@@ -917,5 +918,298 @@ declare class FieldsGeneric extends BaseFieldsForm {
|
|
|
917
918
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FieldsGeneric, "fields-g", never, {}, {}, never, never, true, never>;
|
|
918
919
|
}
|
|
919
920
|
|
|
920
|
-
|
|
921
|
-
|
|
921
|
+
declare enum ScreenMode {
|
|
922
|
+
Mobile = "Mobile",
|
|
923
|
+
Desktop = "Desktop",
|
|
924
|
+
Tablet = "Tablet"
|
|
925
|
+
}
|
|
926
|
+
interface IMkCellService {
|
|
927
|
+
gridParams: Signal<IGridParam<any> | undefined>;
|
|
928
|
+
updateGridParams(params: IGridParam<any>): void;
|
|
929
|
+
}
|
|
930
|
+
declare const GRID_PARAMS_TOKEN: InjectionToken<IGridParam<any>>;
|
|
931
|
+
interface IGridCellComponentConfig {
|
|
932
|
+
component: Type<unknown>;
|
|
933
|
+
input: any;
|
|
934
|
+
}
|
|
935
|
+
interface IColuna<T> {
|
|
936
|
+
prop: keyof T & string | (keyof T & string)[];
|
|
937
|
+
titulo: string;
|
|
938
|
+
tituloReduzido?: string;
|
|
939
|
+
width?: string;
|
|
940
|
+
minWidth?: string;
|
|
941
|
+
maxWidth?: string;
|
|
942
|
+
visivel?: boolean;
|
|
943
|
+
classeFull?: string;
|
|
944
|
+
classeCell?: string;
|
|
945
|
+
classeHeader?: string;
|
|
946
|
+
sortable?: boolean;
|
|
947
|
+
styleCell?: string;
|
|
948
|
+
styleHeader?: string;
|
|
949
|
+
cellRenderer?: (p: IGridParam<T>) => string;
|
|
950
|
+
cellRendererParams?: any;
|
|
951
|
+
cellComponent?: IGridCellComponentConfig;
|
|
952
|
+
capitalize?: boolean;
|
|
953
|
+
mask?: string | ((value: any) => string);
|
|
954
|
+
textVertical?: boolean;
|
|
955
|
+
iniciaAgrupado?: boolean;
|
|
956
|
+
currency?: string;
|
|
957
|
+
overflow?: string;
|
|
958
|
+
textOverflow?: string;
|
|
959
|
+
}
|
|
960
|
+
type IColunaImage = "";
|
|
961
|
+
declare enum IGridFilterType {
|
|
962
|
+
Exato = "exact",
|
|
963
|
+
Como = "like",
|
|
964
|
+
MaiorQue = "bigger",
|
|
965
|
+
MenorQue = "smaller",
|
|
966
|
+
Entre = "between",
|
|
967
|
+
Column = "column"
|
|
968
|
+
}
|
|
969
|
+
interface IGridFilter<T> {
|
|
970
|
+
propriedade: keyof T;
|
|
971
|
+
propriedade2?: keyof T;
|
|
972
|
+
tipo: IGridFilterType;
|
|
973
|
+
values: string[] | number[] | boolean[];
|
|
974
|
+
}
|
|
975
|
+
interface IGridEventAPI<T> {
|
|
976
|
+
id: string | undefined;
|
|
977
|
+
linha: T;
|
|
978
|
+
action: IGridConfigActions;
|
|
979
|
+
}
|
|
980
|
+
declare const PAGINATION_OPTIONS: IKV[];
|
|
981
|
+
interface IOrdenacao {
|
|
982
|
+
coluna: string | string[];
|
|
983
|
+
direcao: 'asc' | 'desc';
|
|
984
|
+
}
|
|
985
|
+
interface IPaginacao {
|
|
986
|
+
paginaAtual: number;
|
|
987
|
+
totalItens: number;
|
|
988
|
+
totalagrupado: number;
|
|
989
|
+
}
|
|
990
|
+
interface IGridConfigActions {
|
|
991
|
+
inmenu?: boolean;
|
|
992
|
+
display: string;
|
|
993
|
+
name: string;
|
|
994
|
+
tema?: ITiposTema;
|
|
995
|
+
icon?: string;
|
|
996
|
+
showIcon?: boolean;
|
|
997
|
+
action?: (p: IGridEventAPI<any>) => void;
|
|
998
|
+
showAction: boolean;
|
|
999
|
+
showLineAction?: (linha: any) => boolean;
|
|
1000
|
+
actions?: IGridConfigActions[];
|
|
1001
|
+
}
|
|
1002
|
+
interface IDisplayValue {
|
|
1003
|
+
display: string;
|
|
1004
|
+
value: string | number | boolean;
|
|
1005
|
+
}
|
|
1006
|
+
interface IGridBaseActions {
|
|
1007
|
+
menuDisplay: string;
|
|
1008
|
+
menuIcon: string;
|
|
1009
|
+
showMenuIcon: boolean;
|
|
1010
|
+
width: string;
|
|
1011
|
+
widthMax: string;
|
|
1012
|
+
widthMin: string;
|
|
1013
|
+
aloneAlwaysOutside: boolean;
|
|
1014
|
+
}
|
|
1015
|
+
interface IActionsLineConfig extends IGridBaseActions {
|
|
1016
|
+
headerDisplayMore: string;
|
|
1017
|
+
headerClasse?: string;
|
|
1018
|
+
}
|
|
1019
|
+
interface IGridConfig<T> {
|
|
1020
|
+
actionsTop: IGridConfigActions[];
|
|
1021
|
+
actionsTopConfig: IGridBaseActions;
|
|
1022
|
+
actionsLine: IGridConfigActions[];
|
|
1023
|
+
actionsLineConfig: IActionsLineConfig;
|
|
1024
|
+
InativeRule: (linha: any) => boolean;
|
|
1025
|
+
colunas: IColuna<T>[];
|
|
1026
|
+
filterSearchIcon: string;
|
|
1027
|
+
filterBarStartCollapsed: boolean;
|
|
1028
|
+
screen: Signal<ScreenMode>;
|
|
1029
|
+
itensPorPagina: Signal<number>;
|
|
1030
|
+
lastGridEventAPI?: IGridEventAPI<T>;
|
|
1031
|
+
nameEntity: string | undefined;
|
|
1032
|
+
paginations: IKV[];
|
|
1033
|
+
primarykey: string;
|
|
1034
|
+
showControlBar: boolean;
|
|
1035
|
+
showSearch: boolean;
|
|
1036
|
+
showFilterBar: boolean;
|
|
1037
|
+
showGridMenu: boolean;
|
|
1038
|
+
showInfoBar: boolean;
|
|
1039
|
+
showMenuIcon: boolean;
|
|
1040
|
+
showActionsLine: boolean;
|
|
1041
|
+
showActionsTop: boolean;
|
|
1042
|
+
showPagination: boolean;
|
|
1043
|
+
timeRequest?: number;
|
|
1044
|
+
onSelected?: (linha: any, selecionados: any[]) => void;
|
|
1045
|
+
onUnselected?: (linha: any, selecionados: any[]) => void;
|
|
1046
|
+
onSelectionChanged?: (linha: any, selecionados: any[]) => void;
|
|
1047
|
+
startSelected?: (linha: any) => boolean;
|
|
1048
|
+
ruleSelectRow?: (linha: any, selecionados: any[]) => Promise<boolean>;
|
|
1049
|
+
ruleUnSelectRow?: (linha: any, selecionados: any[]) => Promise<boolean>;
|
|
1050
|
+
isSelected: WritableSignal<boolean>;
|
|
1051
|
+
selectionMode: 'single' | 'multiple' | 'none';
|
|
1052
|
+
hasError: boolean;
|
|
1053
|
+
hasVerticalLine: boolean;
|
|
1054
|
+
hasSeletor: boolean;
|
|
1055
|
+
hasGrid: boolean;
|
|
1056
|
+
minLineHeight?: string;
|
|
1057
|
+
isCompacted?: boolean;
|
|
1058
|
+
isLoaded: boolean;
|
|
1059
|
+
backgroundHue?: (linha: any) => number;
|
|
1060
|
+
}
|
|
1061
|
+
interface IGridParam<T> {
|
|
1062
|
+
coluna: IColuna<T>;
|
|
1063
|
+
colunas: IColuna<T>[];
|
|
1064
|
+
data: T;
|
|
1065
|
+
lista?: T[];
|
|
1066
|
+
params: any;
|
|
1067
|
+
value: any;
|
|
1068
|
+
servicoParams: IMkCellService;
|
|
1069
|
+
}
|
|
1070
|
+
interface IFilterFields {
|
|
1071
|
+
propriedade: string;
|
|
1072
|
+
propriedade2?: string;
|
|
1073
|
+
tipo: IGridFilterType;
|
|
1074
|
+
values: string[] | number[] | boolean[];
|
|
1075
|
+
}
|
|
1076
|
+
interface IDadosDaLinha {
|
|
1077
|
+
id: string;
|
|
1078
|
+
dados: any;
|
|
1079
|
+
hue: number | undefined;
|
|
1080
|
+
inativo: boolean;
|
|
1081
|
+
selecionado: boolean;
|
|
1082
|
+
isSelecionando: boolean;
|
|
1083
|
+
groupName: string;
|
|
1084
|
+
isColapsed?: boolean;
|
|
1085
|
+
isGroup?: boolean;
|
|
1086
|
+
isFullLine?: {
|
|
1087
|
+
visible: boolean;
|
|
1088
|
+
colapsed: boolean;
|
|
1089
|
+
colapsedCount?: number;
|
|
1090
|
+
showIco?: boolean;
|
|
1091
|
+
};
|
|
1092
|
+
ordem: number;
|
|
1093
|
+
actions?: IGridConfigActions[];
|
|
1094
|
+
hasActionMenu?: boolean;
|
|
1095
|
+
}
|
|
1096
|
+
interface IActionClickEvent {
|
|
1097
|
+
action?: IGridConfigActions;
|
|
1098
|
+
dadosDaLinha?: IDadosDaLinha;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
interface IColunaComLargura extends IColuna<any> {
|
|
1102
|
+
widthNum: number;
|
|
1103
|
+
ordem: number;
|
|
1104
|
+
}
|
|
1105
|
+
declare class MkGrid {
|
|
1106
|
+
lista: _angular_core.InputSignal<any[] | undefined>;
|
|
1107
|
+
config: _angular_core.InputSignal<IGridConfig<any>>;
|
|
1108
|
+
filtro: _angular_core.InputSignal<any>;
|
|
1109
|
+
colunasDefinidas: _angular_core.WritableSignal<IColunaComLargura[]>;
|
|
1110
|
+
colunasFiltradas: _angular_core.WritableSignal<IColunaComLargura[]>;
|
|
1111
|
+
colunasOrdenadas: _angular_core.WritableSignal<IColunaComLargura[]>;
|
|
1112
|
+
colunasExibir: _angular_core.WritableSignal<IColunaComLargura[]>;
|
|
1113
|
+
gridTemplateColumns: _angular_core.WritableSignal<string>;
|
|
1114
|
+
inputSearchText: _angular_core.WritableSignal<string>;
|
|
1115
|
+
selectedRows: _angular_core.WritableSignal<string[]>;
|
|
1116
|
+
selecionandoLinhas: _angular_core.WritableSignal<string[]>;
|
|
1117
|
+
gruposColapsed: _angular_core.WritableSignal<string[]>;
|
|
1118
|
+
isAgrupado: _angular_core.WritableSignal<boolean>;
|
|
1119
|
+
isAgrupadoLimpo: _angular_core.WritableSignal<boolean>;
|
|
1120
|
+
gruposEncontrados: {
|
|
1121
|
+
itens: Set<string>;
|
|
1122
|
+
};
|
|
1123
|
+
numOrdemPrimeiroExibido: _angular_core.WritableSignal<number>;
|
|
1124
|
+
numOrdemUltimoExibido: _angular_core.WritableSignal<number>;
|
|
1125
|
+
pxVerticalLine: _angular_core.WritableSignal<string>;
|
|
1126
|
+
pxSelector: _angular_core.WritableSignal<string>;
|
|
1127
|
+
pxColunas: _angular_core.WritableSignal<string>;
|
|
1128
|
+
pxActions: _angular_core.WritableSignal<string>;
|
|
1129
|
+
totalColsVisivel: _angular_core.WritableSignal<number>;
|
|
1130
|
+
colAgrupadoAtual: _angular_core.WritableSignal<IColuna<any> | null>;
|
|
1131
|
+
colMovingX: number;
|
|
1132
|
+
minLineHeight: _angular_core.ModelSignal<string>;
|
|
1133
|
+
isCompacted: _angular_core.ModelSignal<boolean>;
|
|
1134
|
+
hasGrid: _angular_core.ModelSignal<boolean>;
|
|
1135
|
+
hasVerticalLine: _angular_core.ModelSignal<boolean>;
|
|
1136
|
+
hasSeletor: _angular_core.ModelSignal<boolean>;
|
|
1137
|
+
todosSelecionados: _angular_core.WritableSignal<boolean>;
|
|
1138
|
+
isSelectingAll: _angular_core.WritableSignal<boolean>;
|
|
1139
|
+
devMode: boolean;
|
|
1140
|
+
maxActionsInLine: number;
|
|
1141
|
+
eHost: ElementRef<any>;
|
|
1142
|
+
gridSize: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
1143
|
+
gridfiltro: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
1144
|
+
protected Math: Math;
|
|
1145
|
+
protected filtroCollapsed: _angular_core.WritableSignal<boolean>;
|
|
1146
|
+
protected gridId: string;
|
|
1147
|
+
protected ordenacoesSignal: _angular_core.WritableSignal<IOrdenacao[]>;
|
|
1148
|
+
protected paginacaoSignal: _angular_core.WritableSignal<IPaginacao>;
|
|
1149
|
+
itensPorPagina: _angular_core.Signal<number>;
|
|
1150
|
+
constructor();
|
|
1151
|
+
ngOnInit(): void;
|
|
1152
|
+
ngOnDestroy(): void;
|
|
1153
|
+
ngAfterViewInit(): void;
|
|
1154
|
+
iniciarSelectedRows(lista: any[] | undefined): void;
|
|
1155
|
+
definirColunas(): void;
|
|
1156
|
+
filtrarColunas(): void;
|
|
1157
|
+
ordenarColunas(): void;
|
|
1158
|
+
colunasKVDefinidas: _angular_core.Signal<IKV[]>;
|
|
1159
|
+
outsideMenuActionsTop: _angular_core.Signal<IGridConfigActions[]>;
|
|
1160
|
+
menuActionsTop: _angular_core.Signal<IGridConfigActions[]>;
|
|
1161
|
+
filterContainer: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
1162
|
+
filterHeight: _angular_core.WritableSignal<number>;
|
|
1163
|
+
protected listaOrdenada: _angular_core.Signal<IDadosDaLinha[]>;
|
|
1164
|
+
protected listaAgrupada: _angular_core.Signal<IDadosDaLinha[]>;
|
|
1165
|
+
protected listaExibir: _angular_core.Signal<IDadosDaLinha[]>;
|
|
1166
|
+
numeroPrimeiroItemExibido: _angular_core.Signal<number>;
|
|
1167
|
+
numeroUltimoItemExibido: _angular_core.Signal<number>;
|
|
1168
|
+
onDropColuna(ev: CdkDragDrop<IColunaComLargura[]>): void;
|
|
1169
|
+
getObjetoInativo(nomeColuna: string | string[], linha: any): boolean;
|
|
1170
|
+
observerResize(): (() => void) | undefined;
|
|
1171
|
+
calcularColunasExibir(): void;
|
|
1172
|
+
calcularAltura(): void;
|
|
1173
|
+
getState(): any;
|
|
1174
|
+
protected totalPaginas: _angular_core.Signal<number>;
|
|
1175
|
+
protected alternarOrdenacao(coluna: string | string[]): void;
|
|
1176
|
+
protected obterDirecaoOrdenacao(coluna: string | string[]): 'asc' | 'desc' | null;
|
|
1177
|
+
protected irParaPagina(pagina: number): void;
|
|
1178
|
+
protected proximaPagina(): void;
|
|
1179
|
+
protected paginaAnterior(): void;
|
|
1180
|
+
limparOrdenacao(): void;
|
|
1181
|
+
onOrdenarPor(coluna: IColunaComLargura | null): Promise<void>;
|
|
1182
|
+
getColDisplay(nomeCampo: string | string[]): string;
|
|
1183
|
+
protected getOrdenacaoTexto(): string;
|
|
1184
|
+
protected onClickClearInfo(): void;
|
|
1185
|
+
protected atualizarColunas(): void;
|
|
1186
|
+
protected onClickCellAction(evento: IActionClickEvent): void;
|
|
1187
|
+
protected onClickAction(action?: IGridConfigActions, linha?: any): void;
|
|
1188
|
+
private _getGridEvent;
|
|
1189
|
+
private compararValores;
|
|
1190
|
+
protected onClickGridMenu(action?: IGridConfigActions): void;
|
|
1191
|
+
protected onInputSearch(text: string): void;
|
|
1192
|
+
protected onClickOpenCloseFilterZone(): void;
|
|
1193
|
+
onChangeTodosSelecionados(todosSelecionados: boolean): Promise<void>;
|
|
1194
|
+
onClickRow(linha: IDadosDaLinha): Promise<void>;
|
|
1195
|
+
unselectAll(): void;
|
|
1196
|
+
selectLinha(linha: IDadosDaLinha): Promise<void>;
|
|
1197
|
+
desselecionarLinha(linha: IDadosDaLinha): Promise<void>;
|
|
1198
|
+
onClickGroup(dadosDaLinha: IDadosDaLinha): void;
|
|
1199
|
+
onRecolherGroups(): void;
|
|
1200
|
+
onExpandirGroups(): void;
|
|
1201
|
+
onAgruparPor(coluna: IColunaComLargura | null): Promise<void>;
|
|
1202
|
+
onChangedAgrupamento(event: IOptionValue): Promise<void>;
|
|
1203
|
+
protected onClearGroups(): void;
|
|
1204
|
+
onChangeLineNumber(): void;
|
|
1205
|
+
onChangeSeletor(): void;
|
|
1206
|
+
onChangeCompacted(): void;
|
|
1207
|
+
onChangeHasGrid(): void;
|
|
1208
|
+
onResizeStart(event: MouseEvent, coluna: IColunaComLargura): void;
|
|
1209
|
+
onDoubleClickControls(event: Event, coluna: IColunaComLargura): void;
|
|
1210
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MkGrid, never>;
|
|
1211
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MkGrid, "lib-mk-grid", never, { "lista": { "alias": "lista"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "filtro": { "alias": "filtro"; "required": false; "isSignal": true; }; "minLineHeight": { "alias": "minLineHeight"; "required": false; "isSignal": true; }; "isCompacted": { "alias": "isCompacted"; "required": false; "isSignal": true; }; "hasGrid": { "alias": "hasGrid"; "required": false; "isSignal": true; }; "hasVerticalLine": { "alias": "hasVerticalLine"; "required": false; "isSignal": true; }; "hasSeletor": { "alias": "hasSeletor"; "required": false; "isSignal": true; }; }, { "minLineHeight": "minLineHeightChange"; "isCompacted": "isCompactedChange"; "hasGrid": "hasGridChange"; "hasVerticalLine": "hasVerticalLineChange"; "hasSeletor": "hasSeletorChange"; }, never, ["*", "[mkGridError]", "[mkGridLoading]"], true, never>;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
export { BaseFieldsForm, BaseFieldsValues, CampoDe, FieldsGeneric, FiltroDe, FormAction, FormFilter, FormNoAction, FormatedValues, Formulario, GRID_PARAMS_TOKEN, IField, IGridFilterType, IRegraTipo, LibUtil, MkGrid, PAGINATION_OPTIONS, Regra, ScreenMode, SingleValues, UiButton, UiCheckBox, UiChip, UiDropZone, UiFileList, UiListErrors, UiLoading, UiMenu, UiProcurar, UiProgress, UiSelect, UiSlide };
|
|
1215
|
+
export type { IActionClickEvent, IActionsDone, IActionsLineConfig, IClassOf, IColuna, IColunaImage, IDadosDaLinha, IDisplayValue, IDropOutput, IDropType, IDropZoneEvent, IFaseCampos, IFaseCamposAgrupados, IFases, IFieldComponent, IFields, IFileMetadata, IFilterFields, IFormatter, IGridBaseActions, IGridCellComponentConfig, IGridConfig, IGridConfigActions, IGridEventAPI, IGridFilter, IGridParam, IKV, IKV_ext, IMkCellService, IModeShowEntidade, IOptionValue, IOrdenacao, IPaginacao, IRegra, ISaveTasks, ITipoBotao, ITiposTema, IUiProgressMode, IUtilFormatters, MapeamentoItem };
|