Skip to content

Commit

Permalink
refactor: imports and exports adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
markuczy committed Mar 12, 2024
1 parent d918537 commit a5455d8
Show file tree
Hide file tree
Showing 31 changed files with 119 additions and 120 deletions.
2 changes: 0 additions & 2 deletions libs/angular-accelerator/assets/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
/* You can add global styles to this file, and also import other style files */
@import '../../../node_modules/primeflex/primeflex.scss';

@import '../../../libs/portal-layout-styles/src/styles/shell/shell.scss';

@import '../../../libs/portal-layout-styles/src/styles/primeng/theme-light.scss';
31 changes: 16 additions & 15 deletions libs/angular-accelerator/src/lib/angular-accelerator.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@ import { CommonModule } from '@angular/common'
import { CUSTOM_ELEMENTS_SCHEMA, LOCALE_ID, NgModule, importProvidersFrom } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { RouterModule } from '@angular/router'
import { HttpClient } from '@angular/common/http'
import {
MissingTranslationHandler,
MissingTranslationHandlerParams,
TranslateLoader,
TranslateModule,
} from '@ngx-translate/core'
import {
IL10nsStrings,
TimeagoClock,
TimeagoCustomFormatter,
TimeagoDefaultClock,
TimeagoFormatter,
TimeagoIntl,
TimeagoModule,
} from 'ngx-timeago'
import { strings as englishStrings } from 'ngx-timeago/language-strings/en'

import { AppStateService, UserService } from '@onecx/angular-integration-interface'
import { createTranslateLoader } from '@onecx/angular-integration-interface'
import { TranslationCacheService } from '@onecx/angular-integration-interface'

import { PrimeNgModule } from './primeng.module'
import { ColumnGroupSelectionComponent } from './components/column-group-selection/column-group-selection.component'
import { CustomGroupColumnSelectorComponent } from './components/custom-group-column-selector/custom-group-column-selector.component'
Expand All @@ -23,23 +39,8 @@ import { SearchHeaderComponent } from './components/search-header/search-header.
import { GroupByCountDiagramComponent } from './components/group-by-count-diagram/group-by-count-diagram.component'
import { DiagramComponent } from './components/diagram/diagram.component'
import { DynamicPipe } from './pipes/dynamic.pipe'

import { IfPermissionDirective } from './directives/if-permission.directive'
import { AppStateService, UserService } from '@onecx/angular-integration-interface'
import { HttpClient } from '@angular/common/http'
import { createTranslateLoader } from '@onecx/angular-integration-interface'
import { TranslationCacheService } from '@onecx/angular-integration-interface'
import {
IL10nsStrings,
TimeagoClock,
TimeagoCustomFormatter,
TimeagoDefaultClock,
TimeagoFormatter,
TimeagoIntl,
TimeagoModule,
} from 'ngx-timeago'
import { OcxTimeAgoPipe } from './pipes/ocxtimeago.pipe'
import { strings as englishStrings } from 'ngx-timeago/language-strings/en'

export class AngularAcceleratorMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { CustomGroupColumnSelectorComponent } from './custom-group-column-selector.component'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { ButtonModule } from 'primeng/button'
import { DialogModule } from 'primeng/dialog'
import { PickListModule } from 'primeng/picklist'
import { CustomGroupColumnSelectorComponent } from './custom-group-column-selector.component'

describe('CustomGroupColumnSelectorComponent', () => {
let component: CustomGroupColumnSelectorComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { CustomGroupColumnSelectorComponent } from './custom-group-column-selector.component'
import { Meta, moduleMetadata, applicationConfig, StoryFn } from '@storybook/angular'
import { TranslateModule } from '@ngx-translate/core'
import { ButtonModule } from 'primeng/button'
import { importProvidersFrom } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { ColumnType } from '../../model/column-type.model'
import { FormsModule } from '@angular/forms'
import { ButtonModule } from 'primeng/button'
import { DropdownModule } from 'primeng/dropdown'
import { DialogModule } from 'primeng/dialog'
import { PickListModule } from 'primeng/picklist'
import { CheckboxModule } from 'primeng/checkbox'
import { FormsModule } from '@angular/forms'
import { SelectButtonModule } from 'primeng/selectbutton'
import { StorybookTranslateModule } from '../../storybook-translate.module'
import { ColumnType } from '../../model/column-type.model'
import { CustomGroupColumnSelectorComponent } from './custom-group-column-selector.component'

type CustomGroupColumnSelectorInputs = Pick<
CustomGroupColumnSelectorComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'

import { DataListGridSortingComponent } from './data-list-grid-sorting.component'
import { FormsModule } from '@angular/forms'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { DropdownModule } from 'primeng/dropdown'
import { ButtonModule } from 'primeng/button'
import { FormsModule } from '@angular/forms'
import { DataListGridSortingComponent } from './data-list-grid-sorting.component'

describe('DataListGridSortingComponent', () => {
let component: DataListGridSortingComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { DataSortDirection } from '../../model/data-sort-direction'
import { BehaviorSubject } from 'rxjs'
import { DataSortDirection } from '../../model/data-sort-direction'
import { DataColumnNameId } from '../../model/data-column-name-id.model'
import { DataTableColumn } from '../../model/data-table-column.model'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { ActivatedRoute, RouterModule } from '@angular/router'
import { TranslateModule, TranslateService } from '@ngx-translate/core'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { DataListGridComponent } from './data-list-grid.component'
import { PrimeNgModule } from '../../primeng.module'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { AngularAcceleratorModule } from '../../angular-accelerator.module'
import { ColumnType } from '../../model/column-type.model'
import { DataListGridHarness } from '../../../../testing/data-list-grid.harness'
import { DataTableHarness } from '../../../../testing/data-table.harness'
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { ActivatedRoute, RouterModule } from '@angular/router'
import { AngularAcceleratorModule } from '../../angular-accelerator.module'

describe('DataListGridComponent', () => {
let fixture: ComponentFixture<DataListGridComponent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import { Router } from '@angular/router'
import { TranslateService } from '@ngx-translate/core'
import { MenuItem, PrimeIcons } from 'primeng/api'
import { BehaviorSubject, Observable, combineLatest, map, mergeMap } from 'rxjs'
import { DataAction } from '../../model/data-action'
import { DataSortDirection } from '../../model/data-sort-direction'
import { DataTableColumn } from '../../model/data-table-column.model'
import { MfeInfo } from '@onecx/integration-interface'
import { AppStateService } from '@onecx/angular-integration-interface'
import { UserService } from '@onecx/angular-integration-interface'
import { DataAction } from '../../model/data-action'
import { DataSortDirection } from '../../model/data-sort-direction'
import { DataTableColumn } from '../../model/data-table-column.model'
import { ObjectUtils } from '../../utils/objectutils'
import { DataSortBase } from '../data-sort-base/data-sort-base'
import { Filter, Row } from '../data-table/data-table.component'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { TranslateModule, TranslateService } from '@ngx-translate/core'
import { DataTableComponent, Row } from './data-table.component'
import { PrimeNgModule } from '../../primeng.module'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { ColumnType } from '../../model/column-type.model'
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { DataTableHarness } from '../../../../testing'
import { PTableCheckboxHarness } from '@onecx/angular-testing'
import { PrimeNgModule } from '../../primeng.module'
import { AngularAcceleratorModule } from '../../angular-accelerator.module'
import { DataTableComponent, Row } from './data-table.component'
import { ColumnType } from '../../model/column-type.model'
import { DataTableHarness } from '../../../../testing'

describe('DataTableComponent', () => {
let fixture: ComponentFixture<DataTableComponent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { StorybookTranslateModule } from './../../storybook-translate.module'
import { importProvidersFrom } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { Meta, moduleMetadata, applicationConfig, StoryFn } from '@storybook/angular'
import { DataTableComponent } from './data-table.component'
import { TableModule } from 'primeng/table'
import { ButtonModule } from 'primeng/button'
import { MultiSelectModule } from 'primeng/multiselect'
import { importProvidersFrom } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { StorybookTranslateModule } from './../../storybook-translate.module'
import { DataTableComponent } from './data-table.component'
import { ColumnType } from '../../model/column-type.model'
type DataTableInputTypes = Pick<DataTableComponent, 'rows' | 'columns' | 'emptyResultsMessage' | 'selectedRows'>
const DataTableComponentSBConfig: Meta<DataTableComponent> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'

import { DataViewComponent } from './data-view.component'
import { DataListGridComponent } from '../data-list-grid/data-list-grid.component'
import { DataViewModule } from 'primeng/dataview'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { HttpClientTestingModule } from '@angular/common/http/testing'
import { DataTableComponent } from '../data-table/data-table.component'
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { DataViewModule } from 'primeng/dataview'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { AngularAcceleratorModule } from '../../angular-accelerator.module'
import { DataListGridHarness, DataTableHarness, DataViewHarness } from '../../../../testing'
import { DataTableComponent } from '../data-table/data-table.component'
import { DataViewComponent } from './data-view.component'
import { DataListGridComponent } from '../data-list-grid/data-list-grid.component'
import { ColumnType } from '../../model/column-type.model'
import { AngularAcceleratorModule } from '../../angular-accelerator.module'

describe('DataViewComponent', () => {
let component: DataViewComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { HttpClientTestingModule } from '@angular/common/http/testing'
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { NoopAnimationsModule } from '@angular/platform-browser/animations'
import { FormsModule } from '@angular/forms'
import { TranslateService } from '@ngx-translate/core'
import 'jest-canvas-mock'
import { PrimeIcons } from 'primeng/api'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { ChartModule } from 'primeng/chart'
import { MessageModule } from 'primeng/message'
import { SelectButtonModule } from 'primeng/selectbutton'
import { DiagramHarness, TestbedHarnessEnvironment } from '../../../../testing'
import { DiagramType } from '../../model/diagram-type'
import { DiagramComponent, DiagramLayouts } from './diagram.component'
import { PrimeIcons } from 'primeng/api'
import { SelectButtonModule } from 'primeng/selectbutton'
import { FormsModule } from '@angular/forms'

describe('DiagramComponent', () => {
let translateService: TranslateService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { importProvidersFrom } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { FormsModule } from '@angular/forms'
import { Meta, StoryFn, applicationConfig, moduleMetadata } from '@storybook/angular'
import { BreadcrumbModule } from 'primeng/breadcrumb'
import { ButtonModule } from 'primeng/button'
import { MenuModule } from 'primeng/menu'
import { SkeletonModule } from 'primeng/skeleton'
import { DynamicPipe } from '../../pipes/dynamic.pipe'
import { ChartModule } from 'primeng/chart'
import { SelectButtonModule } from 'primeng/selectbutton'
import { StorybookTranslateModule } from '../../storybook-translate.module'
import { DynamicPipe } from '../../pipes/dynamic.pipe'
import { DiagramComponent } from './diagram.component'
import { DiagramType } from '../../model/diagram-type'
import { DiagramData } from '../../model/diagram-data'
import { ChartModule } from 'primeng/chart'
import { SelectButtonModule } from 'primeng/selectbutton'
import { FormsModule } from '@angular/forms'

export default {
title: 'DiagramComponent',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { BreadcrumbModule } from 'primeng/breadcrumb'
import { ButtonModule } from 'primeng/button'
import { MenuModule } from 'primeng/menu'
import { SkeletonModule } from 'primeng/skeleton'
import { DynamicPipe } from '../../pipes/dynamic.pipe'
import { StorybookTranslateModule } from '../../storybook-translate.module'
import { DiagramType } from '../../model/diagram-type'
import { ChartModule } from 'primeng/chart'
import { SelectButtonModule } from 'primeng/selectbutton'
import { StorybookTranslateModule } from '../../storybook-translate.module'
import { DynamicPipe } from '../../pipes/dynamic.pipe'
import { DiagramType } from '../../model/diagram-type'
import { GroupByCountDiagramComponent } from './group-by-count-diagram.component'
import { DiagramComponent } from '../diagram/diagram.component'
import { ColumnType } from '../../model/column-type.model'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { TranslateService } from '@ngx-translate/core'
import { BehaviorSubject, Observable, combineLatest, map, mergeMap, of } from 'rxjs'
import { ColumnType } from '../../model/column-type.model'
import { DiagramColumn } from '../../model/diagram-column'
import { ObjectUtils } from '../../utils/objectutils'
import { BehaviorSubject, Observable, combineLatest, map, mergeMap, of } from 'rxjs'
import { TranslateService } from '@ngx-translate/core'
import { DiagramData } from '../../model/diagram-data'
import { DiagramType } from '../../model/diagram-type'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'

import { HarnessLoader, parallel, TestElement } from '@angular/cdk/testing'
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { RouterTestingModule } from '@angular/router/testing'
import { NoopAnimationsModule } from '@angular/platform-browser/animations'
import { HttpClientModule } from '@angular/common/http'
import { TranslateModule } from '@ngx-translate/core'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { ButtonModule } from 'primeng/button'
import { DialogModule } from 'primeng/dialog'
import { PickListModule } from 'primeng/picklist'
import {
PDropdownHarness,
PButtonHarness,
PPicklistHarness,
ButtonHarness,
PMultiSelectListItemHarness,
TableHeaderColumnHarness,
TableRowHarness,
ListItemHarness,
} from '@onecx/angular-testing'
import { UserService } from '@onecx/angular-integration-interface'
import { MockUserService } from '@onecx/angular-integration-interface/mocks'
import { AngularAcceleratorModule } from '../../angular-accelerator.module'
import { InteractiveDataViewComponent } from './interactive-data-view.component'
import { DataLayoutSelectionComponent } from '../data-layout-selection/data-layout-selection.component'
import { DataViewComponent, RowListGridData } from '../data-view/data-view.component'
import { ColumnGroupSelectionComponent } from '../column-group-selection/column-group-selection.component'
import { CustomGroupColumnSelectorComponent } from '../custom-group-column-selector/custom-group-column-selector.component'
import { TranslateModule } from '@ngx-translate/core'
import { HarnessLoader, parallel, TestElement } from '@angular/cdk/testing'
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { ColumnType } from '../../model/column-type.model'
import {
DataViewHarness,
Expand All @@ -20,27 +40,7 @@ import {
DefaultListItemHarness,
InteractiveDataViewHarness,
} from '../../../../testing'
import {
PDropdownHarness,
PButtonHarness,
PPicklistHarness,
ButtonHarness,
PMultiSelectListItemHarness,
TableHeaderColumnHarness,
TableRowHarness,
ListItemHarness,
} from '@onecx/angular-testing'
import { RouterTestingModule } from '@angular/router/testing'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { NoopAnimationsModule } from '@angular/platform-browser/animations'
import { DateUtils } from '../../utils/dateutils'
import { HttpClientModule } from '@angular/common/http'
import { UserService } from '@onecx/angular-integration-interface'
import { MockUserService } from '@onecx/angular-integration-interface/mocks'
import { ButtonModule } from 'primeng/button'
import { DialogModule } from 'primeng/dialog'
import { PickListModule } from 'primeng/picklist'
import { AngularAcceleratorModule } from '../../angular-accelerator.module'

describe('InteractiveDataViewComponent', () => {
let component: InteractiveDataViewComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { ComponentFixture, TestBed, getTestBed } from '@angular/core/testing'
import { Action, ObjectDetailItem, PageHeaderComponent } from './page-header.component'
import { NoopAnimationsModule } from '@angular/platform-browser/animations'
import { RouterTestingModule } from '@angular/router/testing'
import { HttpClientTestingModule } from '@angular/common/http/testing'
import { TranslateTestingModule } from 'ngx-translate-testing'
import { PrimeIcons } from 'primeng/api'
import { BreadcrumbModule } from 'primeng/breadcrumb'
import { MenuModule } from 'primeng/menu'
import { ButtonModule } from 'primeng/button'
import { AppStateService } from '@onecx/angular-integration-interface'
import { UserService } from '@onecx/angular-integration-interface'
import { MockUserService } from '@onecx/angular-integration-interface/mocks'
import { PageHeaderHarness, TestbedHarnessEnvironment } from '../../../../testing'
import { Action, ObjectDetailItem, PageHeaderComponent } from './page-header.component'
import { DynamicPipe } from '../../pipes/dynamic.pipe'
import { PrimeIcons } from 'primeng/api'
import { NoopAnimationsModule } from '@angular/platform-browser/animations'

const mockActions: Action[] = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import {
Type,
ViewEncapsulation,
} from '@angular/core'
import { TranslateService } from '@ngx-translate/core'
import { MenuItem, PrimeIcons } from 'primeng/api'
import { concat, map, Observable, of } from 'rxjs'
import { BreadcrumbService } from '../../services/breadcrumb.service'
import { TranslateService } from '@ngx-translate/core'
import { AppStateService } from '@onecx/angular-integration-interface'
import { UserService } from '@onecx/angular-integration-interface'
import { BreadcrumbService } from '../../services/breadcrumb.service'
import { PrimeIcon } from '../../utils/primeicon.utils'

/**
Expand Down
Loading

0 comments on commit a5455d8

Please sign in to comment.