@energycap/components 0.45.2-multi-select-component.20260303-1245 → 0.45.2-multi-select-component.20260303-1603
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/package.json
CHANGED
|
@@ -57,5 +57,6 @@
|
|
|
57
57
|
"DateInputSelectionMode_range": "Range",
|
|
58
58
|
"DateInput_LatestDataAvailableTitle": "Select most recent data available",
|
|
59
59
|
"DateInput_CalendarCloseButton_Label": "Close",
|
|
60
|
-
"DateInput_CalendarTodayButton_Label": "Go to today"
|
|
60
|
+
"DateInput_CalendarTodayButton_Label": "Go to today",
|
|
61
|
+
"SelectAllMultiSelect_TC": "Select All"
|
|
61
62
|
}
|
|
@@ -344,6 +344,18 @@ $checkbox-indicator-size: $form-control-icon-size;
|
|
|
344
344
|
select:focus {
|
|
345
345
|
outline: none;
|
|
346
346
|
}
|
|
347
|
+
|
|
348
|
+
.sr-only {
|
|
349
|
+
position: absolute;
|
|
350
|
+
width: 1px;
|
|
351
|
+
height: 1px;
|
|
352
|
+
padding: 0;
|
|
353
|
+
margin: -1px;
|
|
354
|
+
overflow: hidden;
|
|
355
|
+
clip: rect(0, 0, 0, 0);
|
|
356
|
+
white-space: nowrap;
|
|
357
|
+
border: 0;
|
|
358
|
+
}
|
|
347
359
|
}
|
|
348
360
|
|
|
349
361
|
@mixin checkbox-radio {
|
|
@@ -6055,6 +6055,10 @@ declare class MultiselectComponent extends FormControlBase implements OnInit, On
|
|
|
6055
6055
|
* Reference to the filter input element
|
|
6056
6056
|
*/
|
|
6057
6057
|
filterInput: ElementRef<HTMLInputElement>;
|
|
6058
|
+
/**
|
|
6059
|
+
* Reference to the custom checkbox menu item template
|
|
6060
|
+
*/
|
|
6061
|
+
checkboxMenuTemplate: TemplateRef<any>;
|
|
6058
6062
|
/**
|
|
6059
6063
|
* Access to the popup directive
|
|
6060
6064
|
*/
|
|
@@ -6075,6 +6079,29 @@ declare class MultiselectComponent extends FormControlBase implements OnInit, On
|
|
|
6075
6079
|
* Placeholder to display on the filter input
|
|
6076
6080
|
*/
|
|
6077
6081
|
effectivePlaceholder: string;
|
|
6082
|
+
/**
|
|
6083
|
+
* The "Select All" menu item, always displayed at the top of the dropdown
|
|
6084
|
+
*/
|
|
6085
|
+
selectAllItem: MenuItem;
|
|
6086
|
+
/**
|
|
6087
|
+
* FormControl for the "Select All" checkbox
|
|
6088
|
+
*/
|
|
6089
|
+
selectAllFormControl: UntypedFormControl;
|
|
6090
|
+
/**
|
|
6091
|
+
* Group of dependent checkbox FormControls passed to the select all checkbox.
|
|
6092
|
+
* The checkbox component uses this to automatically manage the indeterminate state.
|
|
6093
|
+
*/
|
|
6094
|
+
selectAllDependentGroup: {
|
|
6095
|
+
controls: UntypedFormControl[];
|
|
6096
|
+
};
|
|
6097
|
+
/**
|
|
6098
|
+
* Map of MenuItem to its corresponding checkbox FormControl
|
|
6099
|
+
*/
|
|
6100
|
+
checkboxFormControls: Map<MenuItem, UntypedFormControl>;
|
|
6101
|
+
/**
|
|
6102
|
+
* Whether all currently visible selectable options are selected
|
|
6103
|
+
*/
|
|
6104
|
+
get allSelected(): boolean;
|
|
6078
6105
|
/**
|
|
6079
6106
|
* The currently selected items
|
|
6080
6107
|
*/
|
|
@@ -6086,13 +6113,21 @@ declare class MultiselectComponent extends FormControlBase implements OnInit, On
|
|
|
6086
6113
|
/**
|
|
6087
6114
|
* Index of the currently highlighted item for keyboard nav
|
|
6088
6115
|
*/
|
|
6089
|
-
|
|
6116
|
+
highlightedItemIndex: number;
|
|
6117
|
+
/**
|
|
6118
|
+
* The DOM id of the currently highlighted item for aria-activedescendant
|
|
6119
|
+
*/
|
|
6120
|
+
get activeDescendantId(): string | null;
|
|
6090
6121
|
/**
|
|
6091
6122
|
* Selectable items flattened from the options
|
|
6092
6123
|
*/
|
|
6093
|
-
|
|
6124
|
+
selectableItems: MenuItem[];
|
|
6094
6125
|
/** Placeholder text for 'Choose' */
|
|
6095
6126
|
private choosePlaceholder;
|
|
6127
|
+
/** Flag to prevent valueChanges subscriptions from reacting during programmatic sync */
|
|
6128
|
+
private ignoreCheckboxChanges;
|
|
6129
|
+
/** Fired when options change to clean up previous item FormControl subscriptions */
|
|
6130
|
+
private resetItemSubscriptions;
|
|
6096
6131
|
constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, translate: TranslateService, scrollService: ScrollService);
|
|
6097
6132
|
/**
|
|
6098
6133
|
* The angular onChanges lifecycle event
|
|
@@ -6130,10 +6165,18 @@ declare class MultiselectComponent extends FormControlBase implements OnInit, On
|
|
|
6130
6165
|
* Mark the form as touched on blur
|
|
6131
6166
|
*/
|
|
6132
6167
|
onBlur(): void;
|
|
6168
|
+
/**
|
|
6169
|
+
* Toggle select all / deselect all for the currently visible (filtered) items
|
|
6170
|
+
*/
|
|
6171
|
+
toggleSelectAll(): void;
|
|
6133
6172
|
/**
|
|
6134
6173
|
* Clear all selected items
|
|
6135
6174
|
*/
|
|
6136
6175
|
clearAll(): void;
|
|
6176
|
+
/**
|
|
6177
|
+
* Get selectable items from the current filtered options, excluding the select-all item
|
|
6178
|
+
*/
|
|
6179
|
+
getVisibleSelectableItems(): MenuItem[];
|
|
6137
6180
|
/**
|
|
6138
6181
|
* Unfilter options and update selectable items
|
|
6139
6182
|
*/
|
|
@@ -6157,7 +6200,7 @@ declare class MultiselectComponent extends FormControlBase implements OnInit, On
|
|
|
6157
6200
|
/**
|
|
6158
6201
|
* Compare two MenuItems for equality
|
|
6159
6202
|
*/
|
|
6160
|
-
|
|
6203
|
+
isSameItem(a: MenuItem, b: MenuItem): boolean;
|
|
6161
6204
|
/**
|
|
6162
6205
|
* Update the formModel with current selected items
|
|
6163
6206
|
*/
|
|
@@ -6174,6 +6217,21 @@ declare class MultiselectComponent extends FormControlBase implements OnInit, On
|
|
|
6174
6217
|
* Recompute the placeholder text
|
|
6175
6218
|
*/
|
|
6176
6219
|
private updatePlaceholderText;
|
|
6220
|
+
/**
|
|
6221
|
+
* Get or create a FormControl for a menu item's checkbox.
|
|
6222
|
+
* The control value is kept in sync with the item's checked state.
|
|
6223
|
+
*/
|
|
6224
|
+
getCheckboxFormControl(item: MenuItem): UntypedFormControl;
|
|
6225
|
+
/**
|
|
6226
|
+
* Synchronize all checkbox FormControls with the current checked state of their menu items.
|
|
6227
|
+
* Guarded so that the valueChanges subscriptions do not re-trigger selection logic.
|
|
6228
|
+
*/
|
|
6229
|
+
syncCheckboxFormControls(): void;
|
|
6230
|
+
/**
|
|
6231
|
+
* Build checkbox FormControls for all current options and subscribe to their
|
|
6232
|
+
* valueChanges so that user interactions with checkboxes drive selection state.
|
|
6233
|
+
*/
|
|
6234
|
+
private buildCheckboxFormControls;
|
|
6177
6235
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiselectComponent, never>;
|
|
6178
6236
|
static ɵcmp: i0.ɵɵComponentDeclaration<MultiselectComponent, "ec-multiselect", never, { "options": { "alias": "options"; "required": false; }; "menuPosition": { "alias": "menuPosition"; "required": false; }; "popupFixed": { "alias": "popupFixed"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "tagType": { "alias": "tagType"; "required": false; }; "hideNoMatches": { "alias": "hideNoMatches"; "required": false; }; "noMatchesText": { "alias": "noMatchesText"; "required": false; }; "truncateItems": { "alias": "truncateItems"; "required": false; }; "maxSelections": { "alias": "maxSelections"; "required": false; }; }, { "search": "search"; "selectionChanged": "selectionChanged"; }, never, never, false, never>;
|
|
6179
6237
|
}
|
|
@@ -6193,6 +6251,45 @@ declare class ComponentsModule {
|
|
|
6193
6251
|
static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
|
|
6194
6252
|
}
|
|
6195
6253
|
|
|
6254
|
+
/**
|
|
6255
|
+
* Callbacks for shared keyboard navigation in dropdown-style components.
|
|
6256
|
+
* Override individual handlers to customize behavior per component.
|
|
6257
|
+
*/
|
|
6258
|
+
interface KeyNavigateHandlers {
|
|
6259
|
+
/** Current popup/menu status */
|
|
6260
|
+
menuStatus: PopupStatus;
|
|
6261
|
+
/** Toggle the popup menu open/closed */
|
|
6262
|
+
toggleMenu: () => void;
|
|
6263
|
+
/** Handle arrow up/down navigation within the menu list */
|
|
6264
|
+
onArrowDownUp: (event: KeyboardEvent) => void;
|
|
6265
|
+
/** Handle Enter key – called after preventDefault */
|
|
6266
|
+
onEnter?: (event: KeyboardEvent) => void;
|
|
6267
|
+
/** Handle Tab key */
|
|
6268
|
+
onTab?: (event: KeyboardEvent) => void;
|
|
6269
|
+
/** Handle Space/Spacebar key */
|
|
6270
|
+
onSpace?: (event: KeyboardEvent) => void;
|
|
6271
|
+
/** Handle Backspace/Delete key – runs before the shared open-menu-if-hidden logic */
|
|
6272
|
+
onBackspaceDelete?: (event: KeyboardEvent) => void;
|
|
6273
|
+
/** Handle Home key */
|
|
6274
|
+
onHome?: (event: KeyboardEvent) => void;
|
|
6275
|
+
/** Handle End key */
|
|
6276
|
+
onEnd?: (event: KeyboardEvent) => void;
|
|
6277
|
+
/** Override default key handler. If not provided, opens the menu when hidden for non-Shift keys. */
|
|
6278
|
+
onDefault?: (event: KeyboardEvent) => void;
|
|
6279
|
+
}
|
|
6280
|
+
/**
|
|
6281
|
+
* Shared keyboard navigation handler for dropdown-style components (combobox, multiselect).
|
|
6282
|
+
*
|
|
6283
|
+
* Common behavior handled automatically:
|
|
6284
|
+
* - Arrow keys: stop propagation, prevent default, delegate to `onArrowDownUp`
|
|
6285
|
+
* - Escape: close the menu if visible
|
|
6286
|
+
* - Backspace/Delete: run optional `onBackspaceDelete`, then open the menu if hidden
|
|
6287
|
+
* - Default: open the menu if hidden (for non-Shift keys)
|
|
6288
|
+
*
|
|
6289
|
+
* Component-specific behavior is provided via optional handlers.
|
|
6290
|
+
*/
|
|
6291
|
+
declare function handleKeyNavigate(event: KeyboardEvent, handlers: KeyNavigateHandlers): void;
|
|
6292
|
+
|
|
6196
6293
|
declare class CustomValidators {
|
|
6197
6294
|
/**
|
|
6198
6295
|
* Tests the control using Angular's required validator, except returns
|
|
@@ -6538,5 +6635,5 @@ declare class MockTranslationHelperService {
|
|
|
6538
6635
|
setLanguage(): void;
|
|
6539
6636
|
}
|
|
6540
6637
|
|
|
6541
|
-
export { AppBarComponent, AvatarComponent, BannerComponent, ButtonComponent, CacheService, Calendar, CalendarComponent, CheckboxComponent, ClickAreaForDirective, CollapsibleToggleComponent, ComboboxComponent, ComponentsModule, ConfirmComponent, ConfirmDialogContext, CopyButtonBaseTestInjectorFactory, CopyButtonDirective, CopyTableButtonDirective, CustomValidators, DateDisplayPipe, DateDisplayPipe2, DateInput, DateInputComponent, DateTimeHelper, DialogCloseDuration, DialogCloseEvent, DialogCloseLatestEvent, DialogComponent, DialogEvent, DialogGroupComponent, DialogOpenDuration, DialogOpenEndEvent, DialogOpenStartEvent, DialogResult, DialogService, DropdownComponent, ErrorService, FileTypeExtensions, FileUploadComponent, FormControlBase, FormControlComponent, FormControlLabelComponent, FormGroupComponent, FormGroupHelper, HelpPopoverComponent, HierarchyBase, HierarchyBaseTestInjectorFactory, HierarchyItem, HierarchyMocks, HierarchyTreeComponent, HighlightTextPipe, IfViewportWidthDirective, ItemDisplayComponent, ItemPickerComponent, ItemPickerSelectableContext, JsonDisplayComponent, JsonHelper, KeyboardNavContainerDirective, LinkButtonComponent, MenuComponent, MockActivatedRoute, MockDateDisplayPipe, MockDialog, MockDialogContent, MockTranslateService, MockTranslationHelperService, MultiselectComponent, NavGroup, NavItemActiveDirective, NumericboxComponent, Overlay, PageBaseComponent, PageBaseComponentTestHelper, PageBaseComponentTestInjectorFactory, PageInitResult, PageStatus, PageStatuses, PageTitleComponent, PageViewComponent, PanelCloseDuration, PanelOpenDuration, PopoverComponent, PopupContainerDirective, RadioButtonComponent, RadioButtonOption, RelativeDatePipe, ResizableBase, ResizableColumnComponent, ResizableComponent, RouterHelper, RowCountPipe, ScrollService, SearchableTableComponent, SelectComponent, SpinnerComponent, SplashComponent, SplashService, SpyFactory, TableComponent, TableLockedColumnComponent, TableMasterHeaderRowComponent, TableMasterRowComponent, TablePaginationComponent, TableSelectableRowComponent, TableSelectableRowContext, TabsComponent, Tag, TagsComponent, TelemetryService, TelemetryTrackerService, TextboxComponent, TimeDisplayPipe, ToastComponent, ToastEvent, ToastService, ToasterComponent, TooltipComponent, TooltipDirective, TooltipService, TreeComponent, UnicodeStrings, UserPreferenceService, ValidationMessageService, ViewOverlayComponent, WindowService, WizardBaseComponent, WizardButtonsComponent, WizardProgressComponent, canadianPostalCodeRegex, clickEvent, dateInputFormatRegex, domainPattern, findAllSpacesPattern, forEachFormControl, getApiError, getControlValue, getDecimalPattern, integerPattern, isApiError, menuAnimationSpeed, mockRouterFactory, mockRouterHelperFactory, numericboxValidation, orderByIgnoreCase, otherZipCodeRegex, phoneNumberValidationPattern, sortByIgnoreCase, textboxValidation, unitedStatesZipCodeRegex, urlValidationPattern, validateFormGroupValuesAreUnique };
|
|
6542
|
-
export type { ApiError, AppSplashEvent, AppSplashOptions, AvatarUser, BannerCacheEntry, BannerStyle, BannerType, ButtonType, CheckboxState, ClickableElement, ComboboxMenuPosition, ComponentsModuleConfig, ControlLabelPosition, CustomActionResult, DateDisplay, DateDisplayPipeOptions, DatePreferenceContainer, DialogAnimationEvent, DialogContent, DialogOptions, DialogSize, DisplayStatus, DisplayValue, FileOutput, FileType, FileUploadFormGroup, FileValidatorCallback, Help, HelpControl, HelpPopoverConfig, InvalidFileError, LinkItem, LinkTarget, MenuHostElementClasses, MenuItem, MenuTemplateType, MultiselectMenuPosition, NavItem, PagingInfo, PickerItem, PopoverContentPosition, PopupPlacement, PopupStatus, RadioButtonDirection, RadioButtonType, RelativeDateOptions, ResizeCacheEntry, RowCountInfo, SearchableTableRefreshOptions, Tab, TableSearchResults, TableSort, TableSortDirection, TagType, TextboxType, TextboxValidatorParameters, ToastAction, ToastItem, ToastSource, ToggledHierarchyItem, TooltipOptions, TooltipPosition, TreeType, ViewStatus, WizardTab };
|
|
6638
|
+
export { AppBarComponent, AvatarComponent, BannerComponent, ButtonComponent, CacheService, Calendar, CalendarComponent, CheckboxComponent, ClickAreaForDirective, CollapsibleToggleComponent, ComboboxComponent, ComponentsModule, ConfirmComponent, ConfirmDialogContext, CopyButtonBaseTestInjectorFactory, CopyButtonDirective, CopyTableButtonDirective, CustomValidators, DateDisplayPipe, DateDisplayPipe2, DateInput, DateInputComponent, DateTimeHelper, DialogCloseDuration, DialogCloseEvent, DialogCloseLatestEvent, DialogComponent, DialogEvent, DialogGroupComponent, DialogOpenDuration, DialogOpenEndEvent, DialogOpenStartEvent, DialogResult, DialogService, DropdownComponent, ErrorService, FileTypeExtensions, FileUploadComponent, FormControlBase, FormControlComponent, FormControlLabelComponent, FormGroupComponent, FormGroupHelper, HelpPopoverComponent, HierarchyBase, HierarchyBaseTestInjectorFactory, HierarchyItem, HierarchyMocks, HierarchyTreeComponent, HighlightTextPipe, IfViewportWidthDirective, ItemDisplayComponent, ItemPickerComponent, ItemPickerSelectableContext, JsonDisplayComponent, JsonHelper, KeyboardNavContainerDirective, LinkButtonComponent, MenuComponent, MockActivatedRoute, MockDateDisplayPipe, MockDialog, MockDialogContent, MockTranslateService, MockTranslationHelperService, MultiselectComponent, NavGroup, NavItemActiveDirective, NumericboxComponent, Overlay, PageBaseComponent, PageBaseComponentTestHelper, PageBaseComponentTestInjectorFactory, PageInitResult, PageStatus, PageStatuses, PageTitleComponent, PageViewComponent, PanelCloseDuration, PanelOpenDuration, PopoverComponent, PopupContainerDirective, RadioButtonComponent, RadioButtonOption, RelativeDatePipe, ResizableBase, ResizableColumnComponent, ResizableComponent, RouterHelper, RowCountPipe, ScrollService, SearchableTableComponent, SelectComponent, SpinnerComponent, SplashComponent, SplashService, SpyFactory, TableComponent, TableLockedColumnComponent, TableMasterHeaderRowComponent, TableMasterRowComponent, TablePaginationComponent, TableSelectableRowComponent, TableSelectableRowContext, TabsComponent, Tag, TagsComponent, TelemetryService, TelemetryTrackerService, TextboxComponent, TimeDisplayPipe, ToastComponent, ToastEvent, ToastService, ToasterComponent, TooltipComponent, TooltipDirective, TooltipService, TreeComponent, UnicodeStrings, UserPreferenceService, ValidationMessageService, ViewOverlayComponent, WindowService, WizardBaseComponent, WizardButtonsComponent, WizardProgressComponent, canadianPostalCodeRegex, clickEvent, dateInputFormatRegex, domainPattern, findAllSpacesPattern, forEachFormControl, getApiError, getControlValue, getDecimalPattern, handleKeyNavigate, integerPattern, isApiError, menuAnimationSpeed, mockRouterFactory, mockRouterHelperFactory, numericboxValidation, orderByIgnoreCase, otherZipCodeRegex, phoneNumberValidationPattern, sortByIgnoreCase, textboxValidation, unitedStatesZipCodeRegex, urlValidationPattern, validateFormGroupValuesAreUnique };
|
|
6639
|
+
export type { ApiError, AppSplashEvent, AppSplashOptions, AvatarUser, BannerCacheEntry, BannerStyle, BannerType, ButtonType, CheckboxState, ClickableElement, ComboboxMenuPosition, ComponentsModuleConfig, ControlLabelPosition, CustomActionResult, DateDisplay, DateDisplayPipeOptions, DatePreferenceContainer, DialogAnimationEvent, DialogContent, DialogOptions, DialogSize, DisplayStatus, DisplayValue, FileOutput, FileType, FileUploadFormGroup, FileValidatorCallback, Help, HelpControl, HelpPopoverConfig, InvalidFileError, KeyNavigateHandlers, LinkItem, LinkTarget, MenuHostElementClasses, MenuItem, MenuTemplateType, MultiselectMenuPosition, NavItem, PagingInfo, PickerItem, PopoverContentPosition, PopupPlacement, PopupStatus, RadioButtonDirection, RadioButtonType, RelativeDateOptions, ResizeCacheEntry, RowCountInfo, SearchableTableRefreshOptions, Tab, TableSearchResults, TableSort, TableSortDirection, TagType, TextboxType, TextboxValidatorParameters, ToastAction, ToastItem, ToastSource, ToggledHierarchyItem, TooltipOptions, TooltipPosition, TreeType, ViewStatus, WizardTab };
|