ngx-eiffage-material 0.0.36 → 0.0.38
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 +26 -18
- package/fesm2022/ngx-eiffage-material.mjs.map +1 -1
- package/index.d.ts +23 -19
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -70,21 +70,11 @@ interface BasicSelectConfig<T> {
|
|
|
70
70
|
displayedLabel: (item: T) => string;
|
|
71
71
|
disabled?: (item: T) => boolean;
|
|
72
72
|
}
|
|
73
|
-
interface FilterKeyOption<T> {
|
|
74
|
-
key: keyof T;
|
|
75
|
-
label: () => string;
|
|
76
|
-
}
|
|
77
|
-
interface PaginatedSelectConfig<T> {
|
|
78
|
-
valueKey: keyof T;
|
|
79
|
-
displayedLabel: (item: T) => string;
|
|
80
|
-
disabled?: (item: T) => boolean;
|
|
81
|
-
filtersKeys?: FilterKeyOption<T>[];
|
|
82
|
-
}
|
|
83
73
|
/**
|
|
84
74
|
* Configuration for NgxPaginatedSelect.
|
|
85
75
|
* Only `valueKey` is required — `displayedLabel` falls back to `String(item[valueKey])`.
|
|
86
76
|
*/
|
|
87
|
-
interface
|
|
77
|
+
interface PaginatedSelectConfig<T> {
|
|
88
78
|
/**
|
|
89
79
|
* Property key used as the unique identifier and as the FormControl value.
|
|
90
80
|
* This is the ONLY required field — all others are optional.
|
|
@@ -872,7 +862,7 @@ declare class NgxAlert {
|
|
|
872
862
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxAlert, "ngx-alert", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
873
863
|
}
|
|
874
864
|
|
|
875
|
-
declare class
|
|
865
|
+
declare class NgxPaginatedSelect<T, U extends PaginatedFilter<T>> implements OnInit {
|
|
876
866
|
private readonly _bottomSheet;
|
|
877
867
|
private readonly _cdr;
|
|
878
868
|
private readonly _matSelect;
|
|
@@ -883,7 +873,7 @@ declare class NgxPaginatedSelectComponent<T, U extends PaginatedFilter<T>> imple
|
|
|
883
873
|
/** Endpoint to fetch paginated data */
|
|
884
874
|
readonly endpoint: _angular_core.InputSignal<(filters: U) => Observable<PaginatedItems<T>>>;
|
|
885
875
|
/** Config for display and value binding */
|
|
886
|
-
readonly config: _angular_core.InputSignal<
|
|
876
|
+
readonly config: _angular_core.InputSignal<PaginatedSelectConfig<T>>;
|
|
887
877
|
/** Writable signal with the current filter state */
|
|
888
878
|
readonly filters: _angular_core.InputSignal<WritableSignal<U>>;
|
|
889
879
|
/** FormControl to integrate with reactive forms */
|
|
@@ -902,6 +892,8 @@ declare class NgxPaginatedSelectComponent<T, U extends PaginatedFilter<T>> imple
|
|
|
902
892
|
* - 'text': a single comma-joined text line
|
|
903
893
|
*/
|
|
904
894
|
readonly displayMode: _angular_core.InputSignal<"text" | "chips">;
|
|
895
|
+
/** Whether to show the search input inside the bottom sheet */
|
|
896
|
+
readonly showSearch: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
905
897
|
/** Placeholder for the search input inside the bottom sheet */
|
|
906
898
|
readonly searchPlaceholder: _angular_core.InputSignal<string>;
|
|
907
899
|
/** Message when no results are found */
|
|
@@ -946,18 +938,19 @@ declare class NgxPaginatedSelectComponent<T, U extends PaginatedFilter<T>> imple
|
|
|
946
938
|
removeChip(item: Partial<T>, _event: MatChipEvent): void;
|
|
947
939
|
preventOpen(isOpen: boolean): void;
|
|
948
940
|
clearSelection(event: Event): void;
|
|
949
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
950
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<
|
|
941
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgxPaginatedSelect<any, any>, never>;
|
|
942
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgxPaginatedSelect<any, any>, "ngx-paginated-select", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "endpoint": { "alias": "endpoint"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "selectedItems": { "alias": "selectedItems"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "displayMode": { "alias": "displayMode"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "noResultsMessage": { "alias": "noResultsMessage"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "resetLabel": { "alias": "resetLabel"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; "extraFiltersTemplate": { "alias": "extraFiltersTemplate"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
951
943
|
}
|
|
952
944
|
|
|
953
945
|
interface NgxPaginatedSelectBottomSheetData<T, U extends PaginatedFilter<T>> {
|
|
954
946
|
title: string;
|
|
955
|
-
config:
|
|
947
|
+
config: PaginatedSelectConfig<T>;
|
|
956
948
|
endpoint: (filters: U) => Observable<PaginatedItems<T>>;
|
|
957
949
|
filters: WritableSignal<U>;
|
|
958
950
|
/** Accepts full objects OR partials containing only the valueKey */
|
|
959
951
|
selectedItems: Partial<T>[];
|
|
960
952
|
multiple: boolean;
|
|
953
|
+
showSearch: boolean;
|
|
961
954
|
searchPlaceholder: string;
|
|
962
955
|
noResultsMessage: string;
|
|
963
956
|
confirmLabel: string;
|
|
@@ -972,7 +965,7 @@ declare class NgxPaginatedSelectBottomSheetComponent<T, U extends PaginatedFilte
|
|
|
972
965
|
private readonly _destroy;
|
|
973
966
|
readonly data: NgxPaginatedSelectBottomSheetData<T, U>;
|
|
974
967
|
/** Raw input value — updates on every keystroke, does NOT trigger the resource */
|
|
975
|
-
readonly query: WritableSignal<string>;
|
|
968
|
+
readonly query: WritableSignal<string | undefined>;
|
|
976
969
|
/** Holds Partial<T> initially; items get upgraded to full T when toggled from the list */
|
|
977
970
|
readonly selectedItems: WritableSignal<Partial<T>[]>;
|
|
978
971
|
/**
|
|
@@ -992,6 +985,17 @@ declare class NgxPaginatedSelectBottomSheetComponent<T, U extends PaginatedFilte
|
|
|
992
985
|
readonly options: _angular_core.Signal<T[]>;
|
|
993
986
|
readonly total: _angular_core.Signal<number>;
|
|
994
987
|
readonly selectedCount: _angular_core.Signal<number>;
|
|
988
|
+
/**
|
|
989
|
+
* Only reads `resource.value()` — never `data.filters()`.
|
|
990
|
+
*
|
|
991
|
+
* When a query change or a new open resets to page 1 we call
|
|
992
|
+
* `accumulatedItems.set([])` synchronously *before* updating the filter,
|
|
993
|
+
* so by the time this effect fires with new data it always appends onto an
|
|
994
|
+
* already-clean array. Reading `data.filters()` here would cause the effect
|
|
995
|
+
* to run a second time (with stale resource data) the moment the page number
|
|
996
|
+
* is incremented on scroll, duplicating items and making
|
|
997
|
+
* `options().length >= total()` so `onScroll` would never fire again.
|
|
998
|
+
*/
|
|
995
999
|
private readonly _accumEffect;
|
|
996
1000
|
constructor();
|
|
997
1001
|
isSelected(item: T): boolean;
|
|
@@ -1147,5 +1151,5 @@ declare class DynamicHostDirective<T> {
|
|
|
1147
1151
|
declare const includeNoSensible: (cadena: string, query: string) => boolean;
|
|
1148
1152
|
declare const base64ToUtf8: (str: string) => string;
|
|
1149
1153
|
|
|
1150
|
-
export { DynamicHostDirective, NgxAlert, NgxBasicSelect, NgxBasicTable, NgxConfirmDialogComponent, NgxDialog, NgxDialogService, NgxInputFile, NgxLoadingButton,
|
|
1151
|
-
export type { AdvancedFilter, AlertType, BasicFilter, BasicSelectConfig, BasicTableColumn, BasicTableConfig, ColumnPipe, ConfirmDialogData, DeleteConfirm, FilterConnector, FilterGroup, FilterOperator, FilterOption, FilterRule, FilterType, NgxPaginatedSelectBottomSheetData, PaginatedFilter, PaginatedItems, PaginatedSelectConfig,
|
|
1154
|
+
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 };
|
|
1155
|
+
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 };
|