@angular/cdk/portal#PortalModule TypeScript Examples

The following examples show how to use @angular/cdk/portal#PortalModule. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: np-auto-complete.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpAutoCompleteComponent],
  imports: [
    CommonModule,
    OverlayModule,
    PortalModule,
    NpAutofocusModule,
    NpOrderByModule,
    NpHighlightModule,
    NpTranslationsModule,
  ],
  exports: [NpAutoCompleteComponent],
})
export class NpAutoCompleteModule { }
Example #2
Source File: shared.module.ts    From WiLearning with GNU Affero General Public License v3.0 6 votes vote down vote up
@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    FlexLayoutModule,
    LayoutModule,
    OverlayModule,
    PortalModule,
    DragDropModule,
    ReactiveFormsModule,
    HttpClientModule,
    MaterialComponentsModule
  ],
  exports: [
    CommonModule,
    FormsModule,
    FlexLayoutModule,
    LayoutModule,
    OverlayModule,
    PortalModule,
    DragDropModule,
    ReactiveFormsModule,
    HttpClientModule,
    MaterialComponentsModule
  ]
})
export class SharedModule {}
Example #3
Source File: np-time-picker.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpTimePickerComponent],
  imports: [
    CommonModule,
    OverlayModule,
    PortalModule,
    NpAutofocusModule,
    NpTranslationsModule,
  ],
  exports: [NpTimePickerComponent],
})
export class NpTimePickerModule { }
Example #4
Source File: np-tags.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpTagsComponent],
  imports: [
    CommonModule,
    OverlayModule,
    PortalModule,
    NpAutofocusModule,
    NpTranslationsModule,
    NpOrderByModule,
    NpHighlightModule,
  ],
  exports: [NpTagsComponent],
})
export class NpTagsModule { }
Example #5
Source File: np-dropdown.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpDropdownComponent],
  imports: [
    CommonModule,
    OverlayModule,
    PortalModule,
    NpAutofocusModule,
    NpOrderByModule,
  ],
  exports: [NpDropdownComponent],
})
export class NpDropdownModule { }
Example #6
Source File: np-dialog.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpDialogContainerComponent],
  imports: [
    CommonModule,
    FormsModule,
    OverlayModule,
    PortalModule,
    NpTranslationsModule,
    NpAutofocusModule,
  ],
  exports: [NpDialogContainerComponent],
  entryComponents: [NpDialogContainerComponent],
  providers: [NpDialogService],
})
export class NpDialogModule { }
Example #7
Source File: np-date-picker.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpDatePickerComponent],
  imports: [
    CommonModule,
    OverlayModule,
    PortalModule,
    NpTooltipModule,
    NpAutofocusModule,
    NpTranslationsModule,
  ],
  exports: [NpDatePickerComponent],
})
export class NpDatePickerModule { }
Example #8
Source File: np-data-grid.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpDataGridComponent, NpFilterTypesPipe, NpSearchColumnsPipe],
  imports: [
    CommonModule,
    FormsModule,
    DragDropModule,
    OverlayModule,
    PortalModule,
    NpDatePickerModule,
    NpDialogModule,
    NpPaginatorModule,
    NpCheckboxModule,
    NpTranslationsModule,
  ],
  exports: [NpDataGridComponent],
  providers: [
    NpFilterService,
    NpGridUtilityService,
    NpODataService,
    NpFileService,
  ],
})
export class NpDataGridModule { }
Example #9
Source File: np-color-picker.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [NpColorPickerComponent],
  imports: [
    CommonModule,
    OverlayModule,
    PortalModule,
    NpAutofocusModule,
    NpTranslationsModule,
  ],
  exports: [NpColorPickerComponent],
})
export class NpColorPickerModule { }
Example #10
Source File: dialog.module.ts    From alauda-ui with MIT License 6 votes vote down vote up
@NgModule({
  imports: [
    CommonModule,
    OverlayModule,
    PortalModule,
    IconModule,
    ButtonModule,
  ],
  declarations: [
    DialogComponent,
    DialogHeaderComponent,
    DialogContentComponent,
    DialogFooterComponent,
    DialogCloseDirective,
    ConfirmDialogComponent,
  ],
  exports: [
    DialogComponent,
    DialogHeaderComponent,
    DialogContentComponent,
    DialogFooterComponent,
    DialogCloseDirective,
  ],
  entryComponents: [DialogComponent, ConfirmDialogComponent],
  providers: [DialogService],
})
export class DialogModule {}
Example #11
Source File: np-accordion.module.ts    From np-ui-lib with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    NpAccordionComponent,
    NpAccordionItemComponent,
    NpAccordionContent,
  ],
  imports: [CommonModule, PortalModule],
  exports: [NpAccordionComponent, NpAccordionItemComponent, NpAccordionContent],
})
export class NpAccordionModule { }
Example #12
Source File: step.module.ts    From ng-ant-admin with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [StepComponent, StepOneComponent, StepTwoComponent, StepThreeComponent],
    imports: [
        SharedModule,
        StepRoutingModule,
        PortalModule,
    ]
})
export class StepModule {
}
Example #13
Source File: color-picker.module.ts    From angular-material-components with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    NgxMatColorPaletteComponent,
    NgxMatColorCanvasComponent,
    NgxMatColorCollectionComponent,
    NgxMatColorSliderComponent,
    NumericColorInputDirective,
    NgxMatColorPickerContentComponent,
    NgxMatColorPickerComponent,
    NgxMatColorToggleComponent,
    NgxMatColorPickerInput
  ],
  imports: [
    CommonModule,
    MatInputModule,
    MatButtonModule,
    MatCardModule,
    MatRadioModule,
    FormsModule,
    ReactiveFormsModule,
    MatDialogModule,
    PortalModule,
    MatIconModule
  ],
  exports: [
    NgxMatColorToggleComponent,
    NgxMatColorPickerInput,
    NgxMatColorPickerComponent
  ],
  entryComponents: [
    NgxMatColorPickerContentComponent
  ],
  providers: [
    ColorAdapter,
    NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
  ]
})
export class NgxMatColorPickerModule { }
Example #14
Source File: tabbed-section.module.ts    From halstack-angular with Apache License 2.0 6 votes vote down vote up
@NgModule({
  declarations: [    
    TabbedSectionComponent
    ],
  imports: [
    BrowserModule,
    ReactiveFormsModule,
    FormsModule,
    CommonModule,
    PortalModule,
    DynamicModule,
    MatTabsModule,
    MatIconModule,
    DxcTabbedSectionModule
  ],
  exports: [
    TabbedSectionComponent
  ],
  entryComponents: [
    DynamicComponentComponent
  ]
})
export class TabbedSectionModule {}
Example #15
Source File: time-picker.module.ts    From alauda-ui with MIT License 6 votes vote down vote up
@NgModule({
  imports: [
    FormsModule,
    ReactiveFormsModule,
    PortalModule,
    OverlayModule,
    CommonModule,
    InputModule,
    TooltipModule,
    IconModule,
    ButtonModule,
    I18nModule,
  ],
  declarations: [TimePickerComponent, TimePickerPanelComponent],
  exports: [TimePickerComponent, TimePickerPanelComponent],
})
export class TimePickerModule {}
Example #16
Source File: tabs.module.ts    From alauda-ui with MIT License 6 votes vote down vote up
@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    PortalModule,
    ButtonModule,
    IconModule,
    A11yModule,
    ObserversModule,
  ],
  declarations: [
    TabGroupComponent,
    TabComponent,
    TabLabelDirective,
    TabContentDirective,
    TabHeaderAddonDirective,
    TabTitleDirective,
    TabHeaderComponent,
    TabBodyComponent,
    TabBodyPortalDirective,
    TabLabelWrapperDirective,
    TabHeaderActiveIndicatorComponent,
  ],
  exports: [
    TabGroupComponent,
    TabComponent,
    TabLabelDirective,
    TabContentDirective,
    TabHeaderAddonDirective,
    TabTitleDirective,
    TabLabelWrapperDirective,
    TabHeaderComponent,
  ],
})
export class TabsModule {}
Example #17
Source File: echarts.module.ts    From ng-ant-admin with MIT License 6 votes vote down vote up
@NgModule({
  declarations: [
    EchartsComponent,
    StartedComponent,
    AdvancedComponent,
    SeriesComponent,
    SimpleChartComponent,
    EventsChartsComponent,
    ThemeChartsComponent,
    LoadingChartsComponent,
    MergeChartsComponent,
    InitOptsChartsComponent,
    InstanceOptsChartsComponent,
    ConnectChartsComponent,
    DraggableChartsComponent,
    SimpleGraphComponent,
    FromLeftToRightComponent,
    RadialTreeComponent,
  ],
  imports: [
    SharedModule,
    NgxEchartsModule.forRoot({
      echarts: () => import('echarts'),
    }),
    EchartsRoutingModule,
    PortalModule
  ]
})
export class EchartsModule { }
Example #18
Source File: np-modal.module.ts    From np-ui-lib with MIT License 5 votes vote down vote up
@NgModule({
  declarations: [NpModalContainerComponent],
  imports: [CommonModule, OverlayModule, PortalModule],
  exports: [NpModalContainerComponent],
  entryComponents: [NpModalContainerComponent],
  providers: [NpModalService],
})
export class NpModalModule { }
Example #19
Source File: drawer.module.ts    From alauda-ui with MIT License 5 votes vote down vote up
@NgModule({
  imports: [CommonModule, IconModule, IconModule, OverlayModule, PortalModule],
  declarations: COMMON,
  exports: COMMON,
  entryComponents: [DrawerComponent],
  providers: [DrawerService],
})
export class DrawerModule {}
Example #20
Source File: ngx-mat-timepicker.module.ts    From ngx-mat-timepicker with MIT License 5 votes vote down vote up
@NgModule({
    imports: [
        CommonModule,
        A11yModule,
        FormsModule,
        MatButtonModule,
        MatFormFieldModule,
        MatDialogModule,
        MatInputModule,
        MatSelectModule,
        MatToolbarModule,
        MatIconModule,
        OverlayModule,
        PortalModule,
        SmpCoreUtilsModule.forRoot()
    ],
    exports: [
        NgxMatTimepickerComponent,
        NgxMatTimepickerToggleComponent,
        NgxMatTimepickerFieldComponent,
        NgxMatTimepickerDirective,
        NgxMatTimepickerToggleIconDirective
    ],
    declarations: [
        // Not really used, but needed to use it as abstract class
        NgxMatTimepickerBaseDirective,
        NgxMatTimepickerHoursFaceDirective,
        //
        NgxMatTimepickerActiveHourPipe,
        NgxMatTimepickerActiveMinutePipe,
        NgxMatTimepickerComponent,
        NgxMatTimepickerDialComponent,
        NgxMatTimepickerDialControlComponent,
        NgxMatTimepickerDialogComponent,
        NgxMatTimepickerDirective,
        NgxMatTimepickerFaceComponent,
        NgxMatTimepickerMinutesFaceComponent,
        NgxMatTimepickerPeriodComponent,
        NgxMatTimepickerStandaloneComponent,
        NgxMatTimepickerToggleComponent,
        NgxMatTimepicker12HoursFaceComponent,
        NgxMatTimepicker24HoursFaceComponent,
        NgxMatTimepickerToggleIconDirective,
        NgxMatTimepickerAutofocusDirective,
        NgxMatTimepickerMinutesFormatterPipe,
        NgxMatTimepickerThemeDirective,
        NgxMatTimepickerFieldComponent,
        NgxMatTimepickerControlComponent,
        NgxMatTimepickerParserPipe,
        NgxMatTimepickerContentComponent,
        NgxMatTimepickerTimeFormatterPipe,
        NgxMatTimepickerTimeLocalizerPipe
    ],
    entryComponents: [
        NgxMatTimepickerDialogComponent,
        NgxMatTimepickerStandaloneComponent
    ]
})
export class NgxMatTimepickerModule {

    static setLocale(locale: string): ModuleWithProviders<NgxMatTimepickerModule> {
        return {
            ngModule: NgxMatTimepickerModule,
            providers: [
                {provide: NGX_MAT_TIMEPICKER_LOCALE, useValue: locale},
                {provide: NGX_MAT_TIMEPICKER_CONFIG, useValue: undefined},
            ]
        };
    }
}
Example #21
Source File: material.module.ts    From ngSurvey with MIT License 5 votes vote down vote up
@NgModule({
  exports: [
    A11yModule,
    ClipboardModule,
    CdkStepperModule,
    CdkTableModule,
    CdkTreeModule,
    DragDropModule,
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,
    PortalModule,
    ScrollingModule,
  ]
})
export class MaterialModule {}
Example #22
Source File: notification.module.ts    From alauda-ui with MIT License 5 votes vote down vote up
@NgModule({
  imports: [CommonModule, OverlayModule, PortalModule, IconModule],
  declarations: [NotificationWrapperComponent, NotificationComponent],
  entryComponents: [NotificationWrapperComponent, NotificationComponent],
  providers: [NotificationService],
})
export class NotificationModule {}
Example #23
Source File: tab-header.component.spec.ts    From alauda-ui with MIT License 5 votes vote down vote up
describe('TabHeaderComponent', () => {
  const change = new Subject();
  let fixture: ComponentFixture<SimpleTabHeaderAppComponent>;
  let appComponent: SimpleTabHeaderAppComponent;

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [CommonModule, PortalModule, IconModule],
      declarations: [
        TabHeaderComponent,
        TabHeaderActiveIndicatorComponent,
        TabLabelWrapperDirective,
        SimpleTabHeaderAppComponent,
      ],
      providers: [
        ViewportRuler,
        {
          provide: Directionality,
          useFactory: () => ({ value: 'ltr', change: change.asObservable() }),
        },
      ],
    });
  });

  describe('pagination', () => {
    beforeEach(() => {
      fixture = TestBed.createComponent(SimpleTabHeaderAppComponent);
      fixture.detectChanges();
      appComponent = fixture.componentInstance;
    });

    // FIXME: looks like JSDom does not work properly with offsetWidth?
    // eslint-disable-next-line jest/no-disabled-tests
    it.skip('should show width when tab list width exceeds container', () => {
      fixture.detectChanges();
      expect(appComponent.tabHeader._showPaginationControls).toBe(false);

      // Add enough tabs that it will obviously exceed the width
      appComponent.addTabsForScrolling();
      fixture.detectChanges();

      fixture.detectChanges();

      expect(appComponent.tabHeader._showPaginationControls).toBe(true);
    });
  });
});
Example #24
Source File: np-tabs.module.ts    From np-ui-lib with MIT License 5 votes vote down vote up
@NgModule({
  declarations: [NpTabsComponent, NpTabComponent, NpTabContent],
  imports: [CommonModule, PortalModule],
  exports: [NpTabsComponent, NpTabComponent, NpTabContent],
})
export class NpTabsModule { }
Example #25
Source File: np-sidepanel.module.ts    From np-ui-lib with MIT License 5 votes vote down vote up
@NgModule({
  declarations: [NpSidepanelComponent, NpSidepanelContent],
  imports: [CommonModule, PortalModule],
  exports: [NpSidepanelComponent, NpSidepanelContent],
})
export class NpSidepanelModule { }
Example #26
Source File: np-panel.module.ts    From np-ui-lib with MIT License 5 votes vote down vote up
@NgModule({
  declarations: [NpPanelComponent, NpPanelContent],
  imports: [CommonModule, PortalModule],
  exports: [NpPanelComponent, NpPanelContent],
})
export class NpPanelModule { }
Example #27
Source File: dynamic.module.ts    From halstack-angular with Apache License 2.0 5 votes vote down vote up
@NgModule({
  declarations: [DynamicComponentComponent],
  imports: [BrowserModule, FormsModule, PortalModule],
  exports: [DynamicComponentComponent],
  entryComponents: [],
})
export class DynamicModule {}
Example #28
Source File: theme-builder-dynamic.module.ts    From halstack-angular with Apache License 2.0 5 votes vote down vote up
@NgModule({
  declarations: [ThemeBuilderDynamicComponentComponent],
  imports: [CommonModule, FormsModule, PortalModule],
  exports: [ThemeBuilderDynamicComponentComponent],
  entryComponents: [],
})
export class ThemeBuilderDynamicModule {}
Example #29
Source File: datetime-picker.module.ts    From angular-material-components with MIT License 5 votes vote down vote up
@NgModule({
   imports: [
      CommonModule,
      MatDatepickerModule,
      MatDialogModule,
      PortalModule,
      FormsModule,
      MatIconModule,
      MatButtonModule,
      MatInputModule,
      NgxMatTimepickerModule
   ],
   exports: [
      NgxMatDatetimePicker,
      NgxMatDatetimeInput,
      NgxMatCalendar,
      NgxMatMonthView,
      NgxMatYearView,
      NgxMatMultiYearView,
      NgxMatCalendarHeader
   ],
   declarations: [
      NgxMatDatetimePicker,
      NgxMatDatetimeContent,
      NgxMatDatetimeInput,
      NgxMatCalendar,
      NgxMatMonthView,
      NgxMatYearView,
      NgxMatMultiYearView,
      NgxMatCalendarHeader
   ],
   entryComponents: [
      NgxMatDatetimeContent,
      NgxMatCalendarHeader
   ],
   providers: [
      MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
   ]
})
export class NgxMatDatetimePickerModule { }