The Angular WML Infinite Dropdown library library provides a flexible and dynamic dropdown component for Angular applications, aiming to enhance user interfaces with nested and infinitely cascading options. It addresses the need for a versatile dropdown menu in Angular projects, offering a solution that supports multiple levels of navigation and interaction. This library is particularly useful for developers looking to implement complex menu structures without the hassle of managing intricate state logic or nested structures manually.
Central to this library is the WmlInfiniteDropdownComponent
, which serves as the main container for the dropdown items. This component can be dynamically populated with a variety of options and sub-options, allowing for deep nesting and a hierarchical menu structure. Alongside it, the WmlInfiniteDropdownItemComponent
represents individual items within the dropdown, which can be further customized using the WmlSampleInfiniteDropdownItemComponent
. These components work in tandem to render the dropdown menu, manage its state, and handle user interactions. Developers can customize the appearance and behavior of the dropdown through parameters like WmlInfiniteDropdownProps
and WmlInfiniteDropdownOption
, which offer control over the items’ content, styling, and interaction handlers. This level of interactivity and customization enables the creation of complex menu systems that are both functional and visually appealing. The library’s design encourages a modular approach, where the main dropdown component acts as a container that can be filled with various configurable options, promoting reusability and maintainability in Angular applications.
Terminal window
npm install -s --verbose @windmillcode/angular-wml-infinite-dropdown
To integrate the wml-infinite-dropdown
component into your Angular project, you can follow these examples to cater to various development needs. The examples demonstrate how to use the component in your template (HTML) and how to configure it in your TypeScript file.
open the preview in a browser and view the hierachy for the true infinite dropdown<iframe src="https://stackblitz.com/edit/stackblitz-starters-cpmz6f?ctl=1&embed=1&file=src%2Fmain.ts&theme=dark" style="width: 100%; height: calc(500/16 * 1em) !important;"></iframe>
<iframe src="https://stackblitz.com/edit/stackblitz-starters-gmewlq?ctl=1&embed=1&file=src%2Fmain.ts&theme=dark" style="width: 100%; height: calc(500/16 * 1em) !important;"></iframe>Property | Type | Description |
---|---|---|
options |
Array<WMLInfiniteDropdownZeroOption | WMLInfiniteDropdownZeroProps> |
List of options or sub-dropdowns. |
customize |
Object |
Object to customize dropdown and option properties. |
optionsSubj |
Subject<WMLInfiniteDropdownZeroInputOptions> |
Subject to handle options updates. |
style |
any |
Style object for custom styling. |
openClass |
string |
Class name to be applied when the dropdown is open. |
closedClass |
string |
Class name to be applied when the dropdown is closed. |
updateOptions |
Function |
Function to update the dropdown options. |
getDropdownStates |
Function |
Function to get the open and closed states of the dropdown. |
toggleDropdownViaDropdown |
Function |
Function to toggle the dropdown on hover interaction. |
toggleDropdown |
Function |
Function to programmatically toggle the dropdown. |
Property | Type | Description |
---|---|---|
text |
string |
Display text for the dropdown option. |
dropdown |
WMLInfiniteDropdownZeroProps |
Nested dropdown parameters, if any. |
openDropdown |
Function |
Function to programmatically open the dropdown. |
closeDropdown |
Function |
Function to programmatically close the dropdown. |
custom |
WMLCustomComponent |
Custom component to be used as the dropdown item. |
detectChangeSubj |
Subject<void> |
Subject to handle change detection. |
clickPredicate |
Function |
Predicate function to be called on click. |
infinite dropdown supported
custom dropdown entries supported
able to customerize option containers able to specficy an interactionType of hover or click
v0.1.1safari ios support replaced option tag with p tag to get component options to render
v0.1.2proivded WmlInfiniteDropdownOption.detectChangeSubj the end developer can call to detectChanges when the developer makes an update that should reflect visually on the UI
v0.1.3removed unneeded WmlInfiniteDropdownComponent.listenForOptions changes
v0.1.4removed a console.log stmt
v0.1.5added cursor pointer to the WmlInfiniteDropdownItemComponentv0.2.0added closeDropdown and openDropdownv0.2.1addded WMLInfiniteDropdownOptionBase to help with typing issues using as base for options and dropdown classes. added id for optionsProps for e2e testing
MAJOR rename to angular-wml-infinite-dropdownfixed major problems concerning ngx-translate
// translate
// first make sure to have ONLY ONE in the imports for AppModule
TranslateModule.forRoot({
defaultLanguage: 'en',
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps:[HttpClient]
}
}),
// then
WmlInfiniteDropdownZeroNGXTranslateModule
// for regular
WmlInfiniteDropdownZeroModule
added isPresnt support to hide the p tag for wml-sample-dropdown-option
remove max width for dropdown items
added cdref access to WmlInfiniteDropdownOption and WmlInfiniteDropdownProps which extends WMLView
added components cdref to WmlInfiniteDropdownProps %!(EXTRA string=
updated package to reflect the version 16.2.80 of @angular/core package),
updated package to reflect the version 16.2.80 of @angular/core package,
updated package to reflect the version 16.2.90 of @angular/core package,
updated package to reflect the version 16.2.91 of @angular/core package,
updated package to reflect the version v16.2.93 of @angular/core package, ,
updated package to reflect the version v16.2.100 of @angular/core package, ,
updated package to reflect the version v16.2.110 of @angular/core package, ,
updated package to reflect the version v16.2.120 of @angular/core package, ,
updated package to reflect the version v17.0.10 of @angular/core package, ,
updated package to reflect the version v17.0.11 of @angular/core package,
updated css and scss variables for the component to be indepent of windmillcode applications ,
updated package to reflect the version ^17.0.2 of @angular/core package,
updated package to reflect the version ^17.0.4 of @angular/core package,
updated package to reflect the version ^17.0.5 of @angular/core package,
updated package to reflect the version ^17.0.6 of @angular/core package,
updated package to reflect the version ^17.0.7 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.0.8 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.1.0 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.1.2 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.1.3 of @angular/core package
added isPresent to WmlInfiniteDropdownProps constructor ,
updated package to reflect the version ^17.2.1 of @angular/core package,
updated package to reflect the version ^17.2.2 of @angular/core package,
updated package to reflect the version ^17.2.2 of @angular/core package,
updated package to reflect the version ^17.2.3 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.2.4 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.3.0 of @angular/core package ,
updated package to reflect the version ^17.3.1 of @angular/core package,
updated package to reflect the version ^17.3.2 of @angular/core package,
updated package to reflect the version ^17.3.3 of @angular/core package,
updated package to reflect the version ^17.3.4 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.3.5 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^17.3.6 of @angular/core package,
updated package to reflect the version ^17.3.7 of @angular/core package,
updated package to reflect the version ^17.3.8 of @angular/core package,
updated package to reflect the version ^17.3.9 of @angular/core package,
updated package to reflect the version ^18.0.0 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^18.0.1 of @angular/core package,
updated package to reflect the version ^18.0.2 of @angular/core package,
updated package to reflect the version ^18.0.3 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^18.0.5 of @angular/core package,
updated package to reflect the version ^18.0.6 of @angular/core package,
updated package to reflect the version ^18.1.0 of @angular/core package,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to reflect the version ^18.1.1 of @angular/core package,
updated package to reflect the version ^18.1.2 of @angular/core package
[UPDATE] Updated models.ts file, replaced WMLView with WMLRoute for WMLInfiniteDropdownOptionBase
[UPDATE] Added conditional links to wml-sample-infinite-dropdown-item.component.html for routerLink and href properties
[CHECKPOINT] Updated *ngIf conditions to handle props.routerLink and props.link in wml-sample-infinite-dropdown-item.component.html ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base ,
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to reflect the version 18.2.1 of @angular/core package
updated package to reflect the version 18.2.2 of @angular/core package
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to reflect the version 18.2.3 of @angular/core package
updated package to reflect the version 18.2.3 of @angular/core package
updated package to conform with @windmillcode/angular-wml-components-base
updated package to conform with @windmillcode/angular-wml-components-base
updated package to reflect the version 18.2.4 of @angular/core package
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to reflect the version 18.2.5 of @angular/core package
updated package to reflect the version 18.2.6 of @angular/core package
updated package to reflect the version 18.2.7 of @angular/core package
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to reflect the version 18.2.8 of @angular/core package
updated package to reflect the version 18.2.8 of @angular/core package
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base
updated package to conform with @windmillcode/wml-components-base