@pumpkin-tech/pumpkin-tech-ng 0.2.14 → 0.2.16
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/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { MatSnackBarRef, MatSnackBar } from '@angular/material/snack-bar';
|
|
|
19
19
|
import * as i19 from '@angular/material/datepicker';
|
|
20
20
|
import { MatDatepickerInputEvent, MatDatepicker } from '@angular/material/datepicker';
|
|
21
21
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
22
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
22
23
|
import * as i1 from '@angular/common';
|
|
23
24
|
import * as i3 from '@angular/material/toolbar';
|
|
24
25
|
import * as i5 from '@angular/material/list';
|
|
@@ -344,7 +345,7 @@ declare class BadgeStackComponent {
|
|
|
344
345
|
get dir(): Dir;
|
|
345
346
|
get fwrap(): "wrap" | "nowrap";
|
|
346
347
|
get cssGap(): string;
|
|
347
|
-
get ai(): "center" | "
|
|
348
|
+
get ai(): "center" | "flex-end" | "stretch" | "baseline" | "flex-start";
|
|
348
349
|
get jc(): "center" | "flex-end" | "flex-start" | "space-between" | "space-around" | "space-evenly";
|
|
349
350
|
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeStackComponent, never>;
|
|
350
351
|
static ɵcmp: i0.ɵɵComponentDeclaration<BadgeStackComponent, "ptech-badge-stack", never, { "direction": { "alias": "direction"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "align": { "alias": "align"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "col": { "alias": "col"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
@@ -1093,7 +1094,7 @@ declare class TableCellDirective {
|
|
|
1093
1094
|
}
|
|
1094
1095
|
|
|
1095
1096
|
type TableAlign = 'left' | 'center' | 'right';
|
|
1096
|
-
type TableColType = 'text' | 'number' | 'date' | 'image' | 'badge';
|
|
1097
|
+
type TableColType = 'text' | 'number' | 'date' | 'image' | 'badge' | 'toggle';
|
|
1097
1098
|
interface TableBadgeConfig<T> {
|
|
1098
1099
|
label: string | ((row: T) => string);
|
|
1099
1100
|
/** Preset da lib ou qualquer CSS color (#hex, rgb, var(...)) */
|
|
@@ -1128,6 +1129,10 @@ interface TableColumn<T> {
|
|
|
1128
1129
|
badges?: TableBadgeConfig<T>[] | ((row: T) => TableBadgeConfig<T>[]);
|
|
1129
1130
|
/** cor dinâmica para o texto */
|
|
1130
1131
|
color?: string | ((row: T) => string);
|
|
1132
|
+
/** Para colunas do tipo 'toggle' */
|
|
1133
|
+
toggleValue?: (row: T) => boolean;
|
|
1134
|
+
toggleLabel?: string | ((row: T) => string);
|
|
1135
|
+
toggleDisabled?: boolean | ((row: T) => boolean);
|
|
1131
1136
|
}
|
|
1132
1137
|
interface TableAction<T> {
|
|
1133
1138
|
icon: string;
|
|
@@ -1137,6 +1142,23 @@ interface TableAction<T> {
|
|
|
1137
1142
|
/** controla se a ação aparece para a linha */
|
|
1138
1143
|
visible?: (row: T) => boolean;
|
|
1139
1144
|
}
|
|
1145
|
+
interface TableReorderEvent<T> {
|
|
1146
|
+
previousIndex: number;
|
|
1147
|
+
currentIndex: number;
|
|
1148
|
+
item: T;
|
|
1149
|
+
data: T[];
|
|
1150
|
+
}
|
|
1151
|
+
interface TableSelectionChangeEvent<T> {
|
|
1152
|
+
mode: 'single' | 'multiple';
|
|
1153
|
+
row: T | null;
|
|
1154
|
+
rows: T[];
|
|
1155
|
+
ids: Array<string | number>;
|
|
1156
|
+
}
|
|
1157
|
+
interface TableToggleChangeEvent<T> {
|
|
1158
|
+
row: T;
|
|
1159
|
+
column: TableColumn<T>;
|
|
1160
|
+
value: boolean;
|
|
1161
|
+
}
|
|
1140
1162
|
declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
1141
1163
|
title: string;
|
|
1142
1164
|
loading: boolean;
|
|
@@ -1149,17 +1171,24 @@ declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
|
1149
1171
|
actions: TableAction<T>[];
|
|
1150
1172
|
selectRow: boolean;
|
|
1151
1173
|
selectMultipleRow: boolean;
|
|
1174
|
+
selectionMode: 'none' | 'single' | 'multiple' | null;
|
|
1175
|
+
usePtechSelectionControls: boolean;
|
|
1152
1176
|
getRowId: (row: T) => string | number;
|
|
1153
1177
|
/** imagem de fallback para <img> quebrada ou ausente */
|
|
1154
1178
|
imageFallback: string;
|
|
1155
1179
|
/** ativa visualização em cards no mobile */
|
|
1156
1180
|
responsiveCards: boolean;
|
|
1181
|
+
reorderable: boolean;
|
|
1157
1182
|
selectedRows: EventEmitter<T[]>;
|
|
1183
|
+
selectedRow: EventEmitter<T | null>;
|
|
1158
1184
|
selectedIds: EventEmitter<(string | number)[]>;
|
|
1185
|
+
selectionChange: EventEmitter<TableSelectionChangeEvent<T>>;
|
|
1159
1186
|
page: EventEmitter<{
|
|
1160
1187
|
pageIndex: number;
|
|
1161
1188
|
pageSize: number;
|
|
1162
1189
|
}>;
|
|
1190
|
+
reorder: EventEmitter<TableReorderEvent<T>>;
|
|
1191
|
+
toggleChange: EventEmitter<TableToggleChangeEvent<T>>;
|
|
1163
1192
|
displayedColumns: string[];
|
|
1164
1193
|
selection: SelectionModel<T>;
|
|
1165
1194
|
private selectedIdSet;
|
|
@@ -1180,6 +1209,7 @@ declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
|
1180
1209
|
/** Verifica se uma linha está selecionada */
|
|
1181
1210
|
isSelected(row: T): boolean;
|
|
1182
1211
|
onPage(ev: any): void;
|
|
1212
|
+
onDrop(event: CdkDragDrop<T[]>): void;
|
|
1183
1213
|
renderCell(row: T, col: TableColumn<T>): any;
|
|
1184
1214
|
resolveImage(row: T, col: TableColumn<T>): string | null;
|
|
1185
1215
|
resolveAlt(row: T, col: TableColumn<T>): string | null;
|
|
@@ -1195,8 +1225,12 @@ declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
|
1195
1225
|
}>;
|
|
1196
1226
|
badgeJustify(align?: TableAlign): 'start' | 'center' | 'end';
|
|
1197
1227
|
resolveActionColor(action: TableAction<T>): string;
|
|
1228
|
+
resolveToggleValue(row: T, col: TableColumn<T>): boolean;
|
|
1229
|
+
resolveToggleLabel(row: T, col: TableColumn<T>): string;
|
|
1230
|
+
resolveToggleDisabled(row: T, col: TableColumn<T>): boolean;
|
|
1231
|
+
onToggleColumnChange(row: T, col: TableColumn<T>, value: any): void;
|
|
1198
1232
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
1199
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "ptech-table", never, { "title": { "alias": "title"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "data": { "alias": "data"; "required": false; }; "total": { "alias": "total"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "selectRow": { "alias": "selectRow"; "required": false; }; "selectMultipleRow": { "alias": "selectMultipleRow"; "required": false; }; "getRowId": { "alias": "getRowId"; "required": false; }; "imageFallback": { "alias": "imageFallback"; "required": false; }; "responsiveCards": { "alias": "responsiveCards"; "required": false; }; }, { "selectedRows": "selectedRows"; "selectedIds": "selectedIds"; "page": "page"; }, ["cellTemplates"], ["[table-filters]", "[table-filters-actions]"], true, never>;
|
|
1233
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "ptech-table", never, { "title": { "alias": "title"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "data": { "alias": "data"; "required": false; }; "total": { "alias": "total"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "selectRow": { "alias": "selectRow"; "required": false; }; "selectMultipleRow": { "alias": "selectMultipleRow"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "usePtechSelectionControls": { "alias": "usePtechSelectionControls"; "required": false; }; "getRowId": { "alias": "getRowId"; "required": false; }; "imageFallback": { "alias": "imageFallback"; "required": false; }; "responsiveCards": { "alias": "responsiveCards"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; }, { "selectedRows": "selectedRows"; "selectedRow": "selectedRow"; "selectedIds": "selectedIds"; "selectionChange": "selectionChange"; "page": "page"; "reorder": "reorder"; "toggleChange": "toggleChange"; }, ["cellTemplates"], ["[table-filters]", "[table-filters-actions]"], true, never>;
|
|
1200
1234
|
}
|
|
1201
1235
|
|
|
1202
1236
|
declare class DialogShellComponent {
|
|
@@ -1633,4 +1667,4 @@ declare class FakeDataService {
|
|
|
1633
1667
|
}
|
|
1634
1668
|
|
|
1635
1669
|
export { ActionDialogComponent, ActionResultDialogComponent, ActionRowComponent, AlertComponent, ArrayUtil, BREADCRUMB_PREFIX$, BadgeComponent, BadgeStackComponent, BreadcrumbComponent, BreadcrumbService, ButtonComponent, CheckBoxComponent, ClickCatcherDirective, ConfirmationDialogComponent, CoreMaterialModule, CurrencyBrlPipe, CurrencyPreferenceService, CurrencyUtil, DateAgoPipe, DateMaskDirective, DateUtil, DefaultConsoleMessageService, DefaultMessageService, DialogService, DialogShellComponent, DirectivesModule, DocumentUtil, DynamicTabDirective, FakeDataService, FlagComponent, FooterComponent, ForDirective, GetFirstStringBeforeSpacePipe, HeaderComponent, IconComponent, InfoDetailComponent, InfoDetailDialogComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputTimeComponent, IsLongerThanPipe, LineBreakAfterPeriodPipe, LineBreakAfterPipe, LoadingOverlayComponent, LoadingService, LowerCaseDirective, MESSAGE_SERVICE, MY_DATE_FORMATS, MemoryFormatPipe, ModuleChangeService, NavComponent, NavService, NumberUtil, ObjectUtil, PhoneBrazilPipe, PhoneMaskBrazilDirective, PhoneMaskSpainDirective, PhoneSpainPipe, PipesModule, ProfileMenuComponent, ProgressBarComponent, ProgressBarMultipleComponent, PtechColDirective, PtechGridDirective, PumpkinTechModule, QuantityItemsComponent, RadioGroupEntityComponent, RadioGroupEnumComponent, RedDirective, SelectEntityComponent, SelectEnumComponent, SelectQuantityItemsComponent, SlideToggleComponent, SnackbarMessageService, SpaceDropDirective, StringUtil, TableCellDirective, TableComponent, TextareaComponent, TimeDurationPipe, TitleComponent, UpperCaseDirective, UptimeFormatPipe, UuidUtil };
|
|
1636
|
-
export type { ActionDialogConfig, ActionDialogField, ActionResultData, AlertData, AlertType, BadgePreset, BadgeSize, BadgeVariant, BreadcrumbRoute, ConfirmationDTO, CurrencyCode, DialogModel, FakeUser, FooterItem, HeaderData, IMessageService, NavLink, PasswordOptions, ProfileMenuItem, PtechCurrencyConfig, TableAction, TableAlign, TableBadgeConfig, TableColType, TableColumn };
|
|
1670
|
+
export type { ActionDialogConfig, ActionDialogField, ActionResultData, AlertData, AlertType, BadgePreset, BadgeSize, BadgeVariant, BreadcrumbRoute, ConfirmationDTO, CurrencyCode, DialogModel, FakeUser, FooterItem, HeaderData, IMessageService, NavLink, PasswordOptions, ProfileMenuItem, PtechCurrencyConfig, TableAction, TableAlign, TableBadgeConfig, TableColType, TableColumn, TableReorderEvent, TableSelectionChangeEvent, TableToggleChangeEvent };
|