@pumpkin-tech/pumpkin-tech-ng 0.2.15 → 0.2.17
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" | "stretch" | "baseline" | "flex-end" | "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>;
|
|
@@ -905,15 +906,20 @@ declare class AlertComponent {
|
|
|
905
906
|
interface ProfileMenuItem {
|
|
906
907
|
label: string;
|
|
907
908
|
icon?: string;
|
|
909
|
+
flagCode?: string;
|
|
910
|
+
flagSize?: number;
|
|
911
|
+
flagSquared?: boolean;
|
|
912
|
+
flagAriaLabel?: string;
|
|
908
913
|
action: () => void;
|
|
909
914
|
dividerBefore?: boolean;
|
|
910
915
|
}
|
|
911
916
|
declare class ProfileMenuComponent {
|
|
917
|
+
icon: string;
|
|
912
918
|
displayName: string;
|
|
913
919
|
items: ProfileMenuItem[];
|
|
914
920
|
handle(item: ProfileMenuItem): void;
|
|
915
921
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileMenuComponent, never>;
|
|
916
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ProfileMenuComponent, "ptech-profile-menu", never, { "displayName": { "alias": "displayName"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, {}, never, ["[extra-items]"], true, never>;
|
|
922
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProfileMenuComponent, "ptech-profile-menu", never, { "icon": { "alias": "icon"; "required": false; }; "displayName": { "alias": "displayName"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, {}, never, ["[extra-items]"], true, never>;
|
|
917
923
|
}
|
|
918
924
|
|
|
919
925
|
declare class CheckBoxComponent extends BaseField implements ControlValueAccessor {
|
|
@@ -1093,7 +1099,7 @@ declare class TableCellDirective {
|
|
|
1093
1099
|
}
|
|
1094
1100
|
|
|
1095
1101
|
type TableAlign = 'left' | 'center' | 'right';
|
|
1096
|
-
type TableColType = 'text' | 'number' | 'date' | 'image' | 'badge';
|
|
1102
|
+
type TableColType = 'text' | 'number' | 'date' | 'image' | 'badge' | 'toggle';
|
|
1097
1103
|
interface TableBadgeConfig<T> {
|
|
1098
1104
|
label: string | ((row: T) => string);
|
|
1099
1105
|
/** Preset da lib ou qualquer CSS color (#hex, rgb, var(...)) */
|
|
@@ -1128,6 +1134,10 @@ interface TableColumn<T> {
|
|
|
1128
1134
|
badges?: TableBadgeConfig<T>[] | ((row: T) => TableBadgeConfig<T>[]);
|
|
1129
1135
|
/** cor dinâmica para o texto */
|
|
1130
1136
|
color?: string | ((row: T) => string);
|
|
1137
|
+
/** Para colunas do tipo 'toggle' */
|
|
1138
|
+
toggleValue?: (row: T) => boolean;
|
|
1139
|
+
toggleLabel?: string | ((row: T) => string);
|
|
1140
|
+
toggleDisabled?: boolean | ((row: T) => boolean);
|
|
1131
1141
|
}
|
|
1132
1142
|
interface TableAction<T> {
|
|
1133
1143
|
icon: string;
|
|
@@ -1137,6 +1147,23 @@ interface TableAction<T> {
|
|
|
1137
1147
|
/** controla se a ação aparece para a linha */
|
|
1138
1148
|
visible?: (row: T) => boolean;
|
|
1139
1149
|
}
|
|
1150
|
+
interface TableReorderEvent<T> {
|
|
1151
|
+
previousIndex: number;
|
|
1152
|
+
currentIndex: number;
|
|
1153
|
+
item: T;
|
|
1154
|
+
data: T[];
|
|
1155
|
+
}
|
|
1156
|
+
interface TableSelectionChangeEvent<T> {
|
|
1157
|
+
mode: 'single' | 'multiple';
|
|
1158
|
+
row: T | null;
|
|
1159
|
+
rows: T[];
|
|
1160
|
+
ids: Array<string | number>;
|
|
1161
|
+
}
|
|
1162
|
+
interface TableToggleChangeEvent<T> {
|
|
1163
|
+
row: T;
|
|
1164
|
+
column: TableColumn<T>;
|
|
1165
|
+
value: boolean;
|
|
1166
|
+
}
|
|
1140
1167
|
declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
1141
1168
|
title: string;
|
|
1142
1169
|
loading: boolean;
|
|
@@ -1149,17 +1176,24 @@ declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
|
1149
1176
|
actions: TableAction<T>[];
|
|
1150
1177
|
selectRow: boolean;
|
|
1151
1178
|
selectMultipleRow: boolean;
|
|
1179
|
+
selectionMode: 'none' | 'single' | 'multiple' | null;
|
|
1180
|
+
usePtechSelectionControls: boolean;
|
|
1152
1181
|
getRowId: (row: T) => string | number;
|
|
1153
1182
|
/** imagem de fallback para <img> quebrada ou ausente */
|
|
1154
1183
|
imageFallback: string;
|
|
1155
1184
|
/** ativa visualização em cards no mobile */
|
|
1156
1185
|
responsiveCards: boolean;
|
|
1186
|
+
reorderable: boolean;
|
|
1157
1187
|
selectedRows: EventEmitter<T[]>;
|
|
1188
|
+
selectedRow: EventEmitter<T | null>;
|
|
1158
1189
|
selectedIds: EventEmitter<(string | number)[]>;
|
|
1190
|
+
selectionChange: EventEmitter<TableSelectionChangeEvent<T>>;
|
|
1159
1191
|
page: EventEmitter<{
|
|
1160
1192
|
pageIndex: number;
|
|
1161
1193
|
pageSize: number;
|
|
1162
1194
|
}>;
|
|
1195
|
+
reorder: EventEmitter<TableReorderEvent<T>>;
|
|
1196
|
+
toggleChange: EventEmitter<TableToggleChangeEvent<T>>;
|
|
1163
1197
|
displayedColumns: string[];
|
|
1164
1198
|
selection: SelectionModel<T>;
|
|
1165
1199
|
private selectedIdSet;
|
|
@@ -1180,6 +1214,7 @@ declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
|
1180
1214
|
/** Verifica se uma linha está selecionada */
|
|
1181
1215
|
isSelected(row: T): boolean;
|
|
1182
1216
|
onPage(ev: any): void;
|
|
1217
|
+
onDrop(event: CdkDragDrop<T[]>): void;
|
|
1183
1218
|
renderCell(row: T, col: TableColumn<T>): any;
|
|
1184
1219
|
resolveImage(row: T, col: TableColumn<T>): string | null;
|
|
1185
1220
|
resolveAlt(row: T, col: TableColumn<T>): string | null;
|
|
@@ -1195,8 +1230,12 @@ declare class TableComponent<T> implements OnChanges, AfterContentInit {
|
|
|
1195
1230
|
}>;
|
|
1196
1231
|
badgeJustify(align?: TableAlign): 'start' | 'center' | 'end';
|
|
1197
1232
|
resolveActionColor(action: TableAction<T>): string;
|
|
1233
|
+
resolveToggleValue(row: T, col: TableColumn<T>): boolean;
|
|
1234
|
+
resolveToggleLabel(row: T, col: TableColumn<T>): string;
|
|
1235
|
+
resolveToggleDisabled(row: T, col: TableColumn<T>): boolean;
|
|
1236
|
+
onToggleColumnChange(row: T, col: TableColumn<T>, value: any): void;
|
|
1198
1237
|
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>;
|
|
1238
|
+
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
1239
|
}
|
|
1201
1240
|
|
|
1202
1241
|
declare class DialogShellComponent {
|
|
@@ -1633,4 +1672,4 @@ declare class FakeDataService {
|
|
|
1633
1672
|
}
|
|
1634
1673
|
|
|
1635
1674
|
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 };
|
|
1675
|
+
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 };
|