import { DemoDropdownBasicComponent } from './demos/basic/basic'; import { DemoDropdownAnchorTriggerComponent } from './demos/anchor-trigger/anchor-trigger'; import { DemoDropdownSplitComponent } from './demos/split/split'; import { DemoDropdownTriggersManualComponent } from './demos/triggers-manual/triggers-manual'; import { DemoDropdownByIsOpenPropComponent } from './demos/trigger-by-isopen-property/trigger-by-isopen-property'; import { DemoDropdownDisabledComponent } from './demos/disabled-menu/disabled-menu'; import { DemoDropdownDisabledItemComponent } from './demos/disabled-item/disabled-item'; import { DemoDropdownAlignmentComponent } from './demos/alignment/menu-alignment'; import { DemoNestedDropdownsComponent } from './demos/nested-dropdowns/nested-dropdowns'; import { DemoDropdownContainerComponent } from './demos/container/container'; import { DemoDropdownDropupComponent } from './demos/dropup/dropup'; import { DemoDropdownMenuDividersComponent } from './demos/menu-dividers/menu-dividers'; import { DemoDropdownConfigComponent } from './demos/config/config'; import { DemoDropdownVisibilityEventsComponent } from './demos/visibility-events/visibility-events'; import { DemoDropdownStateChangeEventComponent } from './demos/state-change-event/state-change-event'; import { DemoDropdownAutoCloseComponent } from './demos/autoclose/autoclose'; import { DemoDropdownCustomHtmlComponent } from './demos/custom-html/custom-html'; import { DemoAccessibilityComponent } from './demos/accessibility/accessibility'; import { DemoDropdownInsideClickComponent } from './demos/inside-click/inside-click'; import { ContentSection } from '@ngx-bootstrap-doc/docs'; import { ExamplesComponent } from '@ngx-bootstrap-doc/docs'; import { ApiSectionsComponent } from '@ngx-bootstrap-doc/docs'; import { NgApiDocComponent, NgApiDocConfigComponent } from '@ngx-bootstrap-doc/docs'; import { DemoDropdownAnimatedComponent } from './demos/animated/animated'; export const demoComponentContent: ContentSection[] = [ { name: 'Overview', anchor: 'overview', tabName: 'overview', outlet: ExamplesComponent, description: `

Wrap the dropdown’s toggle (your button or link) and the dropdown menu within dropdown. Dropdowns can be triggered from <a> or <button> elements to better fit your potential needs.

`, content: [ { title: 'Basic', anchor: 'basic', component: require('!!raw-loader!./demos/basic/basic.ts'), html: require('!!raw-loader!./demos/basic/basic.html'), description: `

Any <button> can became a dropdown toggle with few markup changes. Here’s how dropdown works with single button

`, outlet: DemoDropdownBasicComponent }, { title: 'With animation', anchor: 'animated', component: require('!!raw-loader!./demos/animated/animated'), html: require('!!raw-loader!./demos/animated/animated.html'), description: `You can enable animation via isAnimated input or config option`, outlet: DemoDropdownAnimatedComponent }, { title: 'Trigger by tag ', anchor: 'anchor-trigger', component: require('!!raw-loader!./demos/anchor-trigger/anchor-trigger.ts'), html: require('!!raw-loader!./demos/anchor-trigger/anchor-trigger.html'), outlet: DemoDropdownAnchorTriggerComponent }, { title: 'Split button dropdowns', anchor: 'split-button', component: require('!!raw-loader!./demos/split/split.ts'), html: require('!!raw-loader!./demos/split/split.html'), description: `

Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of .dropdown-toggle-split for proper spacing around the dropdown caret.

`, outlet: DemoDropdownSplitComponent }, { title: 'Manual triggering', anchor: 'triggers-manual', component: require('!!raw-loader!./demos/triggers-manual/triggers-manual.ts'), html: require('!!raw-loader!./demos/triggers-manual/triggers-manual.html'), description: `

Dropdown can be triggered by show, hide and toggle methods from directive
Use method toggle(true) if you want to toggle the dropdown or toggle(false) if you want to only close opened dropdown.

`, outlet: DemoDropdownTriggersManualComponent }, { title: 'Trigger by isOpen property', anchor: 'trigger-by-isopen-property', component: require('!!raw-loader!./demos/trigger-by-isopen-property/trigger-by-isopen-property.ts'), html: require('!!raw-loader!./demos/trigger-by-isopen-property/trigger-by-isopen-property.html'), description: `

Dropdown can be shown or hidden by changing isOpen input property

`, outlet: DemoDropdownByIsOpenPropComponent }, { title: 'Disabled menu', anchor: 'disabled-menu', component: require('!!raw-loader!./demos/disabled-menu/disabled-menu.ts'), html: require('!!raw-loader!./demos/disabled-menu/disabled-menu.html'), description: `

Use isDisabled property to make dropdown disabled.

`, outlet: DemoDropdownDisabledComponent }, { title: 'Mark item as disabled', anchor: 'disabled-item', component: require('!!raw-loader!./demos/disabled-item/disabled-item.ts'), html: require('!!raw-loader!./demos/disabled-item/disabled-item.html'), description: `

Add a disabled class to <a> for bootstrap 4 to make it as disabled.

Add a disabled class to <li> for bootstrap 3 to make it as disabled.

`, outlet: DemoDropdownDisabledItemComponent }, { title: 'Menu alignment', anchor: 'menu-alignment', component: require('!!raw-loader!./demos/alignment/menu-alignment.ts'), html: require('!!raw-loader!./demos/alignment/menu-alignment.html'), description: `

By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add class .dropdown-menu-right to a dropdownMenu to right align the dropdown menu.

`, outlet: DemoDropdownAlignmentComponent }, { title: 'Inside click', anchor: 'inside-click', component: require('!!raw-loader!./demos/inside-click/inside-click.ts'), html: require('!!raw-loader!./demos/inside-click/inside-click.html'), description: `

By default, a dropdown menu closes on document click, even if you clicked on an element inside the dropdown. Use [insideClick]="true" to allow click inside the dropdown

`, outlet: DemoDropdownInsideClickComponent }, { title: 'Nested dropdowns (experimental)', anchor: 'nested-dropdowns', component: require('!!raw-loader!./demos/nested-dropdowns/nested-dropdowns.ts'), html: require('!!raw-loader!./demos/nested-dropdowns/nested-dropdowns.html'), outlet: DemoNestedDropdownsComponent }, { title: 'Append to body', anchor: 'container', component: require('!!raw-loader!./demos/container/container.ts'), html: require('!!raw-loader!./demos/container/container.html'), description: `

Append dropdown to body by adding container="body" to the parent element.

`, outlet: DemoDropdownContainerComponent }, /* not availavle in bs-dropdown version { title: 'Single button with keyboard nav', anchor: 'dropdown-keyboard', component: require('!!raw-loader!./demos/keyboard/keyboard.ts'), html: require('!!raw-loader!./demos/keyboard/keyboard.html'), outlet: DemoDropdownKeyboardComponent },*/ { title: 'Dropup variation', anchor: 'dropup', component: require('!!raw-loader!./demos/dropup/dropup.ts'), html: require('!!raw-loader!./demos/dropup/dropup.html'), description: `

To make dropdown's menu appear above toggle element set dropup property as true

`, outlet: DemoDropdownDropupComponent }, { title: 'Menu dividers', anchor: 'menu-dividers', component: require('!!raw-loader!./demos/menu-dividers/menu-dividers.ts'), html: require('!!raw-loader!./demos/menu-dividers/menu-dividers.html'), description: `

Separate groups of related menu items with a .divider for bootstrap 3 and .dropdown-divider for bootstrap 4.

`, outlet: DemoDropdownMenuDividersComponent }, { title: 'Custom html', anchor: 'custom-html', component: require('!!raw-loader!./demos/custom-html/custom-html.ts'), html: require('!!raw-loader!./demos/custom-html/custom-html.html'), description: `

Dropdown allows you to use any html markup inside of it

`, outlet: DemoDropdownCustomHtmlComponent }, { title: 'Configuring defaults', anchor: 'config-defaults', component: require('!!raw-loader!./demos/config/config.ts'), html: require('!!raw-loader!./demos/config/config.html'), description: `

It is possible to override default dropdown config partially or completely.

`, outlet: DemoDropdownConfigComponent }, { title: 'Visibility Events', anchor: 'visibility-events', component: require('!!raw-loader!./demos/visibility-events/visibility-events.ts'), html: require('!!raw-loader!./demos/visibility-events/visibility-events.html'), description: `

You can subscribe to dropdown's visibility events

`, outlet: DemoDropdownVisibilityEventsComponent }, { title: 'State change event', anchor: 'state-change-event', component: require('!!raw-loader!./demos/state-change-event/state-change-event.ts'), html: require('!!raw-loader!./demos/state-change-event/state-change-event.html'), description: `

You can subscribe to dropdown's state change event (isOpenChange).

`, outlet: DemoDropdownStateChangeEventComponent }, { title: 'Auto close', anchor: 'autoclose', component: require('!!raw-loader!./demos/autoclose/autoclose.ts'), html: require('!!raw-loader!./demos/autoclose/autoclose.html'), description: `

Use autoClose property to change dropdown's default behavior

`, outlet: DemoDropdownAutoCloseComponent }, { title: 'Accessibility', anchor: 'accessibility', outlet: DemoAccessibilityComponent } ] }, { name: 'Installation', anchor: 'api-reference', tabName: 'api', outlet: ApiSectionsComponent, usage: require('!!raw-loader!./docs/usage.md'), importInfo: 'ng add ngx-bootstrap --component dropdowns', content: [ { title: 'BsDropdownDirective', anchor: 'dropdown-directive', outlet: NgApiDocComponent }, { title: 'BsDropdownContainerComponent', anchor: 'dropdown-container', outlet: NgApiDocComponent }, { title: 'BsDropdownMenuDirective', anchor: 'dropdown-menu-directive', outlet: NgApiDocComponent }, { title: 'BsDropdownToggleDirective', anchor: 'dropdown-toggle-directive', outlet: NgApiDocComponent }, { title: 'BsDropdownState', anchor: 'BsDropdownState', outlet: NgApiDocConfigComponent }, { title: 'BsDropdownConfig', anchor: 'dropdown-config', outlet: NgApiDocConfigComponent } ] }, { name: 'Examples', anchor: 'examples', tabName: 'examples', outlet: ExamplesComponent, content: [ { title: 'Basic', anchor: 'basic-ex', outlet: DemoDropdownBasicComponent }, { title: 'With animation', anchor: 'animated-ex', outlet: DemoDropdownAnimatedComponent }, { title: 'Trigger by tag
', anchor: 'anchor-trigger-ex', outlet: DemoDropdownAnchorTriggerComponent }, { title: 'Split button dropdowns', anchor: 'split-button-ex', outlet: DemoDropdownSplitComponent }, { title: 'Manual triggering', anchor: 'triggers-manual-ex', outlet: DemoDropdownTriggersManualComponent }, { title: 'Trigger by isOpen property', anchor: 'trigger-by-isopen-property-ex', outlet: DemoDropdownByIsOpenPropComponent }, { title: 'Disabled menu', anchor: 'disabled-menu-ex', outlet: DemoDropdownDisabledComponent }, { title: 'Mark item as disabled', anchor: 'disabled-item-ex', outlet: DemoDropdownDisabledItemComponent }, { title: 'Menu alignment', anchor: 'menu-alignment-ex', outlet: DemoDropdownAlignmentComponent }, { title: 'Inside click', anchor: 'inside-click-ex', outlet: DemoDropdownInsideClickComponent }, { title: 'Nested dropdowns (experimental)', anchor: 'nested-dropdowns-ex', outlet: DemoNestedDropdownsComponent }, { title: 'Append to body', anchor: 'container-ex', outlet: DemoDropdownContainerComponent }, { title: 'Dropup variation', anchor: 'dropup-ex', outlet: DemoDropdownDropupComponent }, { title: 'Menu dividers', anchor: 'menu-dividers-ex', outlet: DemoDropdownMenuDividersComponent }, { title: 'Custom html', anchor: 'custom-html-ex', outlet: DemoDropdownCustomHtmlComponent }, { title: 'Configuring defaults', anchor: 'config-defaults-ex', outlet: DemoDropdownConfigComponent }, { title: 'Visibility Events', anchor: 'visibility-events-ex', outlet: DemoDropdownVisibilityEventsComponent }, { title: 'State change event', anchor: 'state-change-event-ex', outlet: DemoDropdownStateChangeEventComponent }, { title: 'Auto close', anchor: 'autoclose-ex', outlet: DemoDropdownAutoCloseComponent } ] } ];