ngx-eiffage-material 0.0.42 → 0.0.44
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/fesm2022/ngx-eiffage-material.mjs +361 -8
- package/fesm2022/ngx-eiffage-material.mjs.map +1 -1
- package/index.d.ts +142 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit, ElementRef, WritableSignal, Type, TemplateRef, PipeTransform, InjectionToken, Signal, OnDestroy } from '@angular/core';
|
|
3
|
-
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { FormControl, ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { SubscriptSizing } from '@angular/material/form-field';
|
|
5
5
|
import { MatSelect, MatSelectChange } from '@angular/material/select';
|
|
6
6
|
import { MatDialogRef, MatDialogConfig } from '@angular/material/dialog';
|
|
@@ -132,6 +132,7 @@ interface PaginatedTableConfig<T> {
|
|
|
132
132
|
maxHeight?: string;
|
|
133
133
|
defaultStickyColumn?: keyof T;
|
|
134
134
|
showActions?: () => boolean;
|
|
135
|
+
hideExportData?: () => boolean;
|
|
135
136
|
}
|
|
136
137
|
interface PaginatedTableColumn<T> {
|
|
137
138
|
key: keyof T;
|
|
@@ -276,6 +277,7 @@ interface BasicTableConfig<T> {
|
|
|
276
277
|
maxHeight?: string;
|
|
277
278
|
defaultStickyColumn?: keyof T;
|
|
278
279
|
showActions?: () => boolean;
|
|
280
|
+
hideExportData?: () => boolean;
|
|
279
281
|
}
|
|
280
282
|
interface BasicTableColumn<T> {
|
|
281
283
|
key: keyof T;
|
|
@@ -304,6 +306,42 @@ type SortType = 'string' | 'number' | 'date';
|
|
|
304
306
|
|
|
305
307
|
type AlertType = 'info' | 'warning' | 'error' | 'success';
|
|
306
308
|
|
|
309
|
+
type SkeletonVariant = 'text' | 'circle' | 'rect' | 'rounded';
|
|
310
|
+
type SkeletonAnimation = 'shimmer' | 'pulse' | 'none';
|
|
311
|
+
|
|
312
|
+
/** Visual variant of the file input component. */
|
|
313
|
+
type NgxFileInputVariant = 'default' | 'compact' | 'button';
|
|
314
|
+
/** Validation error codes emitted by the file input. */
|
|
315
|
+
type NgxFileErrorCode = 'SIZE_EXCEEDED' | 'TYPE_NOT_ALLOWED' | 'MAX_FILES_EXCEEDED';
|
|
316
|
+
/** Represents a file selected by the user, with metadata and optional preview. */
|
|
317
|
+
interface NgxFileItem {
|
|
318
|
+
/** The native File object. */
|
|
319
|
+
file: File;
|
|
320
|
+
/** Unique identifier generated internally. */
|
|
321
|
+
id: string;
|
|
322
|
+
/** File name. */
|
|
323
|
+
name: string;
|
|
324
|
+
/** File size in bytes. */
|
|
325
|
+
size: number;
|
|
326
|
+
/** MIME type of the file. */
|
|
327
|
+
type: string;
|
|
328
|
+
/** Data URL for image previews. */
|
|
329
|
+
preview?: string;
|
|
330
|
+
/** Whether the file passed validation. */
|
|
331
|
+
status: 'valid' | 'error';
|
|
332
|
+
/** Validation error message, if any. */
|
|
333
|
+
error?: string;
|
|
334
|
+
}
|
|
335
|
+
/** Describes a validation error for a specific file. */
|
|
336
|
+
interface NgxFileError {
|
|
337
|
+
/** The native File that failed validation. */
|
|
338
|
+
file: File;
|
|
339
|
+
/** Machine-readable error code. */
|
|
340
|
+
code: NgxFileErrorCode;
|
|
341
|
+
/** Human-readable error message. */
|
|
342
|
+
message: string;
|
|
343
|
+
}
|
|
344
|
+
|
|
307
345
|
declare class NgxBasicSelect<T> {
|
|
308
346
|
readonly label: _angular_core.InputSignal<string>;
|
|
309
347
|
readonly options: _angular_core.InputSignal<T[]>;
|
|
@@ -1035,6 +1073,107 @@ declare class NgxPaginatedSelectBottomSheetComponent<T, U extends PaginatedFilte
|
|
|
1035
1073
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxPaginatedSelectBottomSheetComponent<any, any>, "ngx-paginated-select-bottom-sheet", never, {}, {}, never, never, true, never>;
|
|
1036
1074
|
}
|
|
1037
1075
|
|
|
1076
|
+
declare class NgxSkeleton {
|
|
1077
|
+
/** Shape variant of the skeleton: text (horizontal bars), circle, rect, or rounded rect. */
|
|
1078
|
+
variant: _angular_core.InputSignal<SkeletonVariant>;
|
|
1079
|
+
/** Width of the skeleton element. Accepts any valid CSS value (px, %, rem, etc.). */
|
|
1080
|
+
width: _angular_core.InputSignal<string>;
|
|
1081
|
+
/** Height of the skeleton element. Accepts any valid CSS value (px, %, rem, etc.). */
|
|
1082
|
+
height: _angular_core.InputSignal<string>;
|
|
1083
|
+
/** Number of lines to render. Only applies when variant is 'text'. */
|
|
1084
|
+
lines: _angular_core.InputSignal<number>;
|
|
1085
|
+
/** Vertical spacing between text lines. Accepts any valid CSS value. */
|
|
1086
|
+
lineSpacing: _angular_core.InputSignal<string>;
|
|
1087
|
+
/** Width of the last text line for a realistic paragraph effect. Accepts any valid CSS value. */
|
|
1088
|
+
lastLineWidth: _angular_core.InputSignal<string>;
|
|
1089
|
+
/** Type of loading animation: shimmer (sliding highlight), pulse (opacity), or none. */
|
|
1090
|
+
animation: _angular_core.InputSignal<SkeletonAnimation>;
|
|
1091
|
+
/** Duration of one full animation cycle. Accepts any valid CSS time value. */
|
|
1092
|
+
animationDuration: _angular_core.InputSignal<string>;
|
|
1093
|
+
/** Overrides the default border-radius derived from the variant. */
|
|
1094
|
+
borderRadius: _angular_core.InputSignal<string | null>;
|
|
1095
|
+
/** Accessible label read by screen readers. */
|
|
1096
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1097
|
+
/** Whether the component should render multiple stacked lines. */
|
|
1098
|
+
protected isMultiLine: _angular_core.Signal<boolean>;
|
|
1099
|
+
/** Index array used to iterate over text lines in the template. */
|
|
1100
|
+
protected lineIndices: _angular_core.Signal<number[]>;
|
|
1101
|
+
/** Resolved border-radius based on variant with optional override. */
|
|
1102
|
+
protected computedBorderRadius: _angular_core.Signal<string>;
|
|
1103
|
+
/** For circle variant, width equals height to ensure a perfect circle. */
|
|
1104
|
+
protected computedWidth: _angular_core.Signal<string>;
|
|
1105
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxSkeleton, never>;
|
|
1106
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxSkeleton, "ngx-skeleton", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "lineSpacing": { "alias": "lineSpacing"; "required": false; "isSignal": true; }; "lastLineWidth": { "alias": "lastLineWidth"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "animationDuration": { "alias": "animationDuration"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
declare class NgxFileInput implements ControlValueAccessor {
|
|
1110
|
+
private readonly _platform;
|
|
1111
|
+
private readonly _inputId;
|
|
1112
|
+
/** Accepted MIME types or extensions (e.g. `'image/*,.pdf'`). */
|
|
1113
|
+
readonly accept: _angular_core.InputSignal<string>;
|
|
1114
|
+
/** Allow selecting multiple files. */
|
|
1115
|
+
readonly multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1116
|
+
/** Maximum file size in bytes per file. `null` means no limit. */
|
|
1117
|
+
readonly maxSize: _angular_core.InputSignal<number | null>;
|
|
1118
|
+
/** Maximum number of files when `multiple` is true. `null` means no limit. */
|
|
1119
|
+
readonly maxFiles: _angular_core.InputSignal<number | null>;
|
|
1120
|
+
/** Disables the component. */
|
|
1121
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1122
|
+
/** Label text shown inside the drop zone. */
|
|
1123
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1124
|
+
/** Secondary hint text (formats, sizes…). */
|
|
1125
|
+
readonly hint: _angular_core.InputSignal<string | null>;
|
|
1126
|
+
/** Show the file preview list below the drop zone. */
|
|
1127
|
+
readonly showPreview: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1128
|
+
/** Visual variant: `'default'` (large zone), `'compact'` (horizontal), or `'button'`. */
|
|
1129
|
+
readonly variant: _angular_core.InputSignal<NgxFileInputVariant>;
|
|
1130
|
+
/** Emits when valid files are added. */
|
|
1131
|
+
readonly filesSelected: _angular_core.OutputEmitterRef<NgxFileItem[]>;
|
|
1132
|
+
/** Emits when a file is removed from the list. */
|
|
1133
|
+
readonly fileRemoved: _angular_core.OutputEmitterRef<NgxFileItem>;
|
|
1134
|
+
/** Emits for each file that fails validation. */
|
|
1135
|
+
readonly validationError: _angular_core.OutputEmitterRef<NgxFileError>;
|
|
1136
|
+
/** All file items (valid + invalid). */
|
|
1137
|
+
readonly items: _angular_core.WritableSignal<NgxFileItem[]>;
|
|
1138
|
+
/** Whether the user is dragging files over the drop zone. */
|
|
1139
|
+
readonly isDragOver: _angular_core.WritableSignal<boolean>;
|
|
1140
|
+
/** Brief flash after a successful drop. */
|
|
1141
|
+
readonly showDropConfirm: _angular_core.WritableSignal<boolean>;
|
|
1142
|
+
/** Announcement text for screen readers. */
|
|
1143
|
+
readonly liveAnnouncement: _angular_core.WritableSignal<string>;
|
|
1144
|
+
/** Unique id for the hidden file input. */
|
|
1145
|
+
readonly inputId: string;
|
|
1146
|
+
/** Derived: valid files only (used as FormControl value). */
|
|
1147
|
+
protected readonly validFiles: _angular_core.Signal<File[]>;
|
|
1148
|
+
private _onChange;
|
|
1149
|
+
private _onTouched;
|
|
1150
|
+
writeValue(files: File[] | null): void;
|
|
1151
|
+
registerOnChange(fn: (value: File[]) => void): void;
|
|
1152
|
+
registerOnTouched(fn: () => void): void;
|
|
1153
|
+
onDragOver(event: DragEvent): void;
|
|
1154
|
+
onDragLeave(event: DragEvent): void;
|
|
1155
|
+
onDrop(event: DragEvent): void;
|
|
1156
|
+
onFileInputChange(event: Event): void;
|
|
1157
|
+
openFilePicker(): void;
|
|
1158
|
+
removeFile(item: NgxFileItem): void;
|
|
1159
|
+
/** Format bytes to human-readable string. */
|
|
1160
|
+
formatSize(bytes: number): string;
|
|
1161
|
+
/** Get a Material icon name based on MIME type. */
|
|
1162
|
+
getFileIcon(type: string): string;
|
|
1163
|
+
/** Get an accent color class based on MIME type. */
|
|
1164
|
+
getFileColorClass(type: string): string;
|
|
1165
|
+
private _processFiles;
|
|
1166
|
+
private _validateAndCreate;
|
|
1167
|
+
private _toFileItem;
|
|
1168
|
+
private _isTypeAllowed;
|
|
1169
|
+
private _generatePreviews;
|
|
1170
|
+
private _emitChange;
|
|
1171
|
+
private _flashDropConfirm;
|
|
1172
|
+
private _generateId;
|
|
1173
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxFileInput, never>;
|
|
1174
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxFileInput, "ngx-file-input", never, { "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "showPreview": { "alias": "showPreview"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "filesSelected": "filesSelected"; "fileRemoved": "fileRemoved"; "validationError": "validationError"; }, never, never, true, never>;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1038
1177
|
declare class NgxDialogService {
|
|
1039
1178
|
private readonly _dialog;
|
|
1040
1179
|
/**
|
|
@@ -1169,5 +1308,5 @@ declare class DynamicHostDirective<T> {
|
|
|
1169
1308
|
declare const includeNoSensible: (cadena: string, query: string) => boolean;
|
|
1170
1309
|
declare const base64ToUtf8: (str: string) => string;
|
|
1171
1310
|
|
|
1172
|
-
export { DynamicHostDirective, NgxAlert, NgxBasicSelect, NgxBasicTable, NgxConfirmDialogComponent, NgxDialog, NgxDialogService, NgxInputFile, NgxLoadingButton, NgxPaginatedSelect, NgxPaginatedSelectBottomSheetComponent, NgxPaginatedTable, NgxTablesIntl, OPERATOR_BY_FILTER_TYPE, PaginatedSearchableSelectComponent, SearchableSelectComponent, USER_ID_FACTORY, base64ToUtf8, includeNoSensible, isFilterOption };
|
|
1173
|
-
export type { AdvancedFilter, AlertType, BasicFilter, BasicSelectConfig, BasicTableColumn, BasicTableConfig, ColumnPipe, ConfirmDialogData, DeleteConfirm, FilterConnector, FilterGroup, FilterOperator, FilterOption, FilterRule, FilterType, NgxPaginatedSelectBottomSheetData, PaginatedFilter, PaginatedItems, PaginatedSelectConfig, PaginatedTableColumn, PaginatedTableConfig, RowActionClickEvent, RowActionIconColor, RowSelectionAction, SelectionActionEvent, SortBy, SortType, TableBasicAction, TableRowAction };
|
|
1311
|
+
export { DynamicHostDirective, NgxAlert, NgxBasicSelect, NgxBasicTable, NgxConfirmDialogComponent, NgxDialog, NgxDialogService, NgxFileInput, NgxInputFile, NgxLoadingButton, NgxPaginatedSelect, NgxPaginatedSelectBottomSheetComponent, NgxPaginatedTable, NgxSkeleton, NgxTablesIntl, OPERATOR_BY_FILTER_TYPE, PaginatedSearchableSelectComponent, SearchableSelectComponent, USER_ID_FACTORY, base64ToUtf8, includeNoSensible, isFilterOption };
|
|
1312
|
+
export type { AdvancedFilter, AlertType, BasicFilter, BasicSelectConfig, BasicTableColumn, BasicTableConfig, ColumnPipe, ConfirmDialogData, DeleteConfirm, FilterConnector, FilterGroup, FilterOperator, FilterOption, FilterRule, FilterType, NgxFileError, NgxFileErrorCode, NgxFileInputVariant, NgxFileItem, NgxPaginatedSelectBottomSheetData, PaginatedFilter, PaginatedItems, PaginatedSelectConfig, PaginatedTableColumn, PaginatedTableConfig, RowActionClickEvent, RowActionIconColor, RowSelectionAction, SelectionActionEvent, SkeletonAnimation, SkeletonVariant, SortBy, SortType, TableBasicAction, TableRowAction };
|