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