mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-28 21:58:03 +08:00
Update app from 17 to 18
This commit is contained in:
parent
5cd8c94615
commit
c1171e1da4
513 changed files with 2528 additions and 3248 deletions
28
angular.json
28
angular.json
|
@ -169,34 +169,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"common": {
|
||||
"projectType": "library",
|
||||
"root": "core/app/common",
|
||||
"sourceRoot": "core/app/common/src",
|
||||
"prefix": "lib",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "core/app/common/tsconfig.lib.json",
|
||||
"project": "core/app/common/ng-package.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "core/app/common/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "core/app/common/src/test.ts",
|
||||
"tsConfig": "core/app/common/tsconfig.spec.json",
|
||||
"karmaConfig": "core/app/common/karma.conf.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"core": {
|
||||
"projectType": "library",
|
||||
"root": "core/app/core",
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
# SuiteCRM common
|
||||
|
||||
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.0.
|
||||
|
||||
|
||||
## Build
|
||||
|
||||
Run `yarn build:common` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
@ -1,35 +0,0 @@
|
|||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, '../../coverage/common'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
],
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../../dist/common",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"name": "common",
|
||||
"version": "8.7.1",
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^12.1.0",
|
||||
"@angular/core": "^12.1.0",
|
||||
"@angular/forms": "^12.1.0",
|
||||
"rxjs": "^6.6.3",
|
||||
"@ng-bootstrap/ng-bootstrap": "^9.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
export * from './actions/action.model';
|
||||
export * from './actions/bulk-action.model';
|
||||
export * from './actions/field-logic-action.model';
|
||||
export * from './components/button/button-group.model';
|
||||
export * from './components/button/button.model';
|
||||
export * from './components/button/dropdown-button.model';
|
||||
export * from './components/modal/modal.model';
|
||||
export * from './components/pagination/pagination.model';
|
||||
export * from './components/registry/base-component.registry';
|
||||
export * from './containers/chart/chart.model';
|
||||
export * from './menu/menu.model';
|
||||
export * from './metadata/charts-widget.metadata';
|
||||
export * from './metadata/list.metadata.model';
|
||||
export * from './metadata/metadata.model';
|
||||
export * from './metadata/subpanel.metadata.model';
|
||||
export * from './metadata/widget.metadata';
|
||||
export * from './record/favorites.model';
|
||||
export * from './record/field.model';
|
||||
export * from './record/recently-viewed.model';
|
||||
export * from './record/record.model';
|
||||
export * from './record/record-mappers/record-mapper.model';
|
||||
export * from './record/record-mappers/record-mapper.registry';
|
||||
export * from './registry/base-service.registry';
|
||||
export * from './registry/base-type.registry';
|
||||
export * from './services/ui/resize.model';
|
||||
export * from './services/validators/validators.model';
|
||||
export * from './statistics/statistics-store.model';
|
||||
export * from './statistics/statistics.model';
|
||||
export * from './types/boolean-map';
|
||||
export * from './types/messages';
|
||||
export * from './types/object-map';
|
||||
export * from './types/overridable-map';
|
||||
export * from './types/string-map';
|
||||
export * from './types/string-matrix';
|
||||
export * from './types/user';
|
||||
export * from './utils/object-utils';
|
||||
export * from './utils/value-utils';
|
||||
export * from './utils/view-utils';
|
||||
export * from './views/view.model';
|
||||
export * from './views/list/list-navigation.model';
|
||||
export * from './views/list/record-selection.model';
|
||||
export * from './views/list/search-criteria.model';
|
||||
export * from './views/list/selection.model';
|
|
@ -1,5 +0,0 @@
|
|||
/*
|
||||
* Public API Surface of common
|
||||
*/
|
||||
|
||||
export * from './lib/common';
|
|
@ -1,14 +0,0 @@
|
|||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js';
|
||||
import 'zone.js/testing';
|
||||
import {getTestBed} from '@angular/core/testing';
|
||||
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting(), {
|
||||
teardown: { destroyAfterEach: false }
|
||||
}
|
||||
);
|
|
@ -1,24 +0,0 @@
|
|||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/lib",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"inlineSources": true,
|
||||
"types": [],
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2022"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"compilerOptions": {
|
||||
"declarationMap": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"compilationMode": "partial"
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"extends": "../../../tslint.json",
|
||||
"rules": {
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"lib",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"lib",
|
||||
"kebab-case"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -45,7 +45,6 @@ export interface SubPanelMeta {
|
|||
[key: string]: SubPanelDefinition;
|
||||
}
|
||||
|
||||
/* eslint-disable camelcase */
|
||||
export interface SubPanelDefinition {
|
||||
insightWidget?: WidgetOptionMap;
|
||||
order?: 10;
|
||||
|
@ -69,7 +68,9 @@ export interface SubPanelDefinition {
|
|||
lineActions?: Action[];
|
||||
get_subpanel_data?: string;
|
||||
showFilter?: boolean;
|
||||
parameters?: { [key: string]: any };
|
||||
parameters?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
/* eslint-enable camelcase */
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
||||
import {ActionGroupMenuComponent} from './action-group-menu.component';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import {ApolloTestingModule} from 'apollo-angular/testing';
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {shareReplay, take} from 'rxjs/operators';
|
||||
|
@ -55,7 +55,8 @@ import {AppStateStore} from '../../store/app-state/app-state.store';
|
|||
import {recordActionsMock} from '../../views/record/adapters/actions.adapter.spec.mock';
|
||||
import {RecordActionsAdapter} from '../../views/record/adapters/actions.adapter';
|
||||
import {ImageModule} from '../image/image.module';
|
||||
import {ActionDataSource, Action} from 'common';
|
||||
import {Action, ActionDataSource} from '../../common/actions/action.model';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
@Component({
|
||||
selector: 'action-group-menu-test-host-component',
|
||||
|
@ -94,33 +95,32 @@ describe('ActionGroupMenuComponent', () => {
|
|||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
HttpClientTestingModule,
|
||||
ApolloTestingModule,
|
||||
ImageModule,
|
||||
ButtonModule,
|
||||
ActionGroupMenuModule,
|
||||
RouterTestingModule
|
||||
],
|
||||
declarations: [ActionGroupMenuComponent, ActionGroupMenuTestHostComponent],
|
||||
providers: [
|
||||
{provide: RecordViewStore, useValue: recordviewStoreMock},
|
||||
{
|
||||
provide: ThemeImagesStore, useValue: {
|
||||
images$: of(themeImagesMockData).pipe(take(1))
|
||||
}
|
||||
},
|
||||
{provide: ModuleNavigation, useValue: mockModuleNavigation},
|
||||
{provide: SystemConfigStore, useValue: systemConfigStoreMock},
|
||||
{provide: UserPreferenceStore, useValue: userPreferenceStoreMock},
|
||||
{provide: NavigationStore, useValue: navigationMock},
|
||||
{provide: ModuleNavigation, useValue: mockModuleNavigation},
|
||||
{provide: LanguageStore, useValue: languageStoreMock},
|
||||
{provide: MetadataStore, useValue: metadataStoreMock},
|
||||
{provide: AppStateStore, useValue: appStateStoreMock},
|
||||
{provide: RecordActionsAdapter, useValue: recordActionsMock},
|
||||
],
|
||||
})
|
||||
declarations: [ActionGroupMenuComponent, ActionGroupMenuTestHostComponent],
|
||||
imports: [ApolloTestingModule,
|
||||
ImageModule,
|
||||
ButtonModule,
|
||||
ActionGroupMenuModule,
|
||||
RouterTestingModule],
|
||||
providers: [
|
||||
{ provide: RecordViewStore, useValue: recordviewStoreMock },
|
||||
{
|
||||
provide: ThemeImagesStore, useValue: {
|
||||
images$: of(themeImagesMockData).pipe(take(1))
|
||||
}
|
||||
},
|
||||
{ provide: ModuleNavigation, useValue: mockModuleNavigation },
|
||||
{ provide: SystemConfigStore, useValue: systemConfigStoreMock },
|
||||
{ provide: UserPreferenceStore, useValue: userPreferenceStoreMock },
|
||||
{ provide: NavigationStore, useValue: navigationMock },
|
||||
{ provide: ModuleNavigation, useValue: mockModuleNavigation },
|
||||
{ provide: LanguageStore, useValue: languageStoreMock },
|
||||
{ provide: MetadataStore, useValue: metadataStoreMock },
|
||||
{ provide: AppStateStore, useValue: appStateStoreMock },
|
||||
{ provide: RecordActionsAdapter, useValue: recordActionsMock },
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
testHostFixture = TestBed.createComponent(ActionGroupMenuTestHostComponent);
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
*/
|
||||
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {Action, ActionContext, ActionDataSource, Button, ButtonGroupInterface, ButtonInterface, isFalse} from 'common';
|
||||
import {Action, ActionContext, ActionDataSource} from '../../common/actions/action.model';
|
||||
import {Button, ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {ButtonGroupInterface} from '../../common/components/button/button-group.model';
|
||||
import {isFalse} from '../../common/utils/value-utils';
|
||||
import {BehaviorSubject, combineLatestWith, Observable, Subscription} from 'rxjs';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {SystemConfigStore} from '../../store/system-config/system-config.store';
|
||||
|
|
|
@ -28,7 +28,9 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
|||
import {Component} from '@angular/core';
|
||||
import {BehaviorSubject, Observable, of} from 'rxjs';
|
||||
import {BulkActionDataSource, BulkActionMenuComponent} from './bulk-action-menu.component';
|
||||
import {BulkActionsMap, SelectionDataSource, SelectionStatus} from 'common';
|
||||
import {BulkActionsMap} from '../../common/actions/bulk-action.model';
|
||||
import {SelectionStatus} from '../../common/views/list/record-selection.model';
|
||||
import {SelectionDataSource} from '../../common/views/list/selection.model';
|
||||
import {By} from '@angular/platform-browser';
|
||||
import {shareReplay, take} from 'rxjs/operators';
|
||||
import {NgbDropdownModule} from '@ng-bootstrap/ng-bootstrap';
|
||||
|
|
|
@ -26,7 +26,10 @@
|
|||
|
||||
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
||||
import {Observable, Subscription} from 'rxjs';
|
||||
import {BulkActionsMap, DropdownButtonInterface, SelectionDataSource, SelectionStatus} from 'common';
|
||||
import {BulkActionsMap} from '../../common/actions/bulk-action.model';
|
||||
import {DropdownButtonInterface} from '../../common/components/button/dropdown-button.model';
|
||||
import {SelectionStatus} from '../../common/views/list/record-selection.model';
|
||||
import {SelectionDataSource} from '../../common/views/list/selection.model';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
|
||||
export interface BulkActionDataSource {
|
||||
|
|
|
@ -29,7 +29,7 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
|||
import {ButtonGroupComponent} from './button-group.component';
|
||||
import {Component} from '@angular/core';
|
||||
import {NgbDropdownModule} from '@ng-bootstrap/ng-bootstrap';
|
||||
import {ButtonGroupInterface} from 'common';
|
||||
import {ButtonGroupInterface} from '../../common/components/button/button-group.model';
|
||||
import {shareReplay} from 'rxjs/operators';
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {DropdownButtonModule} from '../dropdown-button/dropdown-button.module';
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
*/
|
||||
|
||||
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
||||
import {Button, ButtonGroupInterface, DropdownButtonInterface, AnyButtonInterface} from 'common';
|
||||
import {Button} from '../../common/components/button/button.model';
|
||||
import {ButtonGroupInterface} from '../../common/components/button/button-group.model';
|
||||
import {DropdownButtonInterface, AnyButtonInterface} from '../../common/components/button/dropdown-button.model';
|
||||
|
||||
import {Observable, Subscription} from 'rxjs';
|
||||
|
||||
interface SplitButtons {
|
||||
|
|
|
@ -28,7 +28,7 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
|||
|
||||
import {ButtonComponent} from './button.component';
|
||||
import {Component} from '@angular/core';
|
||||
import {ButtonInterface} from 'common';
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {languageStoreMock} from '../../store/language/language.store.spec.mock';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
import {ImageModule} from '../image/image.module';
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
||||
import {ButtonCallback, ButtonInterface} from 'common';
|
||||
import {ButtonInterface, ButtonCallback} from '../../common/components/button/button.model';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
import {Observable, Subject, Subscription} from 'rxjs';
|
||||
import {debounceTime} from 'rxjs/operators';
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {AnyButtonInterface} from 'common';
|
||||
import {AnyButtonInterface} from '../../common/components/button/dropdown-button.model';
|
||||
import partial from 'lodash-es/partial';
|
||||
|
||||
@Injectable({
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
*/
|
||||
|
||||
import {Component, ElementRef, Input, signal} from '@angular/core';
|
||||
import {ChartDataSource} from 'common';
|
||||
import {fromEvent, Observable, Subscription} from "rxjs";
|
||||
import {ScreenSizeObserverService} from "../../../../services/ui/screen-size-observer/screen-size-observer.service";
|
||||
import {fromEvent, Subscription} from "rxjs";
|
||||
import {debounceTime, tap} from "rxjs/operators";
|
||||
import {ChartDataSource} from '../../../../common/containers/chart/chart.model';
|
||||
import {ScreenSizeObserverService} from "../../../../services/ui/screen-size-observer/screen-size-observer.service";
|
||||
|
||||
@Component({template: ''})
|
||||
export class BaseChartComponent {
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
*/
|
||||
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {ChartDataSource} from 'common';
|
||||
import {ChartRegistry} from './chart.registry';
|
||||
import {ChartDataSource} from '../../../../common/containers/chart/chart.model';
|
||||
|
||||
@Component({
|
||||
selector: 'scrm-chart',
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {BaseComponentRegistry} from 'common';
|
||||
import {BaseComponentRegistry} from '../../../../common/components/registry/base-component.registry';
|
||||
import {BaseChartComponent} from '../base-chart/base-chart.component';
|
||||
import {chartTypeMap} from './chart.manifest';
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
*/
|
||||
|
||||
import {Component, ElementRef, OnDestroy, OnInit} from '@angular/core';
|
||||
import {isFalse, MultiSeries} from 'common';
|
||||
import {MultiSeries} from '../../../../common/containers/chart/chart.model';
|
||||
import {isFalse} from '../../../../common/utils/value-utils';
|
||||
import {BaseChartComponent} from '../base-chart/base-chart.component';
|
||||
import {ScreenSizeObserverService} from "../../../../services/ui/screen-size-observer/screen-size-observer.service";
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Component, ElementRef, OnDestroy, OnInit} from '@angular/core';
|
||||
import {SeriesResult, SingleSeries} from 'common';
|
||||
import {SeriesResult, SingleSeries} from '../../../../common/containers/chart/chart.model';
|
||||
import {LanguageStore} from '../../../../store/language/language.store';
|
||||
import {BaseChartComponent} from '../base-chart/base-chart.component';
|
||||
import {debounceTime} from "rxjs/operators";
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
*/
|
||||
|
||||
import {Component, ElementRef, OnDestroy, OnInit} from '@angular/core';
|
||||
import {isFalse, SingleSeries} from 'common';
|
||||
import {SingleSeries} from '../../../../common/containers/chart/chart.model';
|
||||
import {isFalse} from '../../../../common/utils/value-utils';
|
||||
import {BaseChartComponent} from '../base-chart/base-chart.component';
|
||||
import {ScreenSizeObserverService} from "../../../../services/ui/screen-size-observer/screen-size-observer.service";
|
||||
import {debounceTime} from "rxjs/operators";
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
||||
import {Component} from '@angular/core';
|
||||
import {CloseButtonComponent} from './close-button.component';
|
||||
import {ButtonInterface} from 'common';
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {ButtonModule} from '../button/button.module';
|
||||
import {languageStoreMock} from '../../store/language/language.store.spec.mock';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {Button, ButtonInterface} from 'common';
|
||||
import {Button, ButtonInterface} from '../../common/components/button/button.model';
|
||||
|
||||
@Component({
|
||||
selector: 'scrm-close-button',
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {CdkDragDrop, moveItemInArray, transferArrayItem} from '@angular/cdk/drag-drop';
|
||||
import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';
|
||||
import {ButtonInterface, ColumnDefinition, ModalCloseFeedBack} from "common";
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {ColumnDefinition} from '../../common/metadata/list.metadata.model';
|
||||
import {ModalCloseFeedBack} from '../../common/components/modal/modal.model';
|
||||
import {AppStateStore} from "../../store/app-state/app-state.store";
|
||||
import {LanguageStore} from "../../store/language/language.store";
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
|||
|
||||
import {DropdownButtonComponent} from './dropdown-button.component';
|
||||
import {Component} from '@angular/core';
|
||||
import {DropdownButtonInterface} from 'common';
|
||||
import {DropdownButtonInterface} from '../../common/components/button/dropdown-button.model';
|
||||
import {NgbDropdownModule, NgbTooltipModule} from '@ng-bootstrap/ng-bootstrap';
|
||||
import {ButtonModule} from '../button/button.module';
|
||||
import {languageStoreMock} from '../../store/language/language.store.spec.mock';
|
||||
|
|
|
@ -25,14 +25,9 @@
|
|||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';
|
||||
import {
|
||||
ButtonInterface,
|
||||
deepClone,
|
||||
DropdownButtonInterface,
|
||||
DropdownButtonSection,
|
||||
DropdownButtonSectionMap,
|
||||
emptyObject
|
||||
} from 'common';
|
||||
import {deepClone, emptyObject} from '../../common/utils/object-utils';
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {DropdownButtonInterface, DropdownButtonSection, DropdownButtonSectionMap} from '../../common/components/button/dropdown-button.model';
|
||||
import {NgbDropdown} from '@ng-bootstrap/ng-bootstrap';
|
||||
import {PlacementArray} from '@ng-bootstrap/ng-bootstrap/util/positioning';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
|
|
|
@ -29,7 +29,7 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
|||
import {DropdownSubmenuComponent} from './dropdown-submenu.component';
|
||||
import {Component} from '@angular/core';
|
||||
import {NgbDropdownModule} from '@ng-bootstrap/ng-bootstrap';
|
||||
import {DropdownButtonInterface} from 'common';
|
||||
import {DropdownButtonInterface} from '../../common/components/button/dropdown-button.model';
|
||||
import {DropdownButtonModule} from '../dropdown-button/dropdown-button.module';
|
||||
import {ButtonModule} from '../button/button.module';
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import {AnyButtonInterface, DropdownButtonInterface} from 'common';
|
||||
import {DropdownButtonInterface, AnyButtonInterface} from '../../common/components/button/dropdown-button.model';
|
||||
|
||||
@Component({
|
||||
selector: 'scrm-dropdown-submenu',
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
||||
import {Component} from '@angular/core';
|
||||
import {Field} from 'common';
|
||||
import {Field} from '../../common/record/field.model';
|
||||
import {UserPreferenceStore} from '../../store/user-preference/user-preference.store';
|
||||
import {datetimeFormatterMock} from '../../services/formatters/datetime/datetime-formatter.service.spec.mock';
|
||||
import {CurrencyFormatter} from '../../services/formatters/currency/currency-formatter.service';
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
*/
|
||||
|
||||
import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';
|
||||
import {FieldMap, StringMap} from 'common';
|
||||
import {FieldMap} from '../../common/record/field.model';
|
||||
import {StringMap} from '../../common/types/string-map';
|
||||
import {Observable} from 'rxjs';
|
||||
import {tap} from 'rxjs/operators';
|
||||
import {LanguageStore, LanguageStrings} from '../../store/language/language.store';
|
||||
|
|
|
@ -28,7 +28,7 @@ import {Directive, Input, OnDestroy, OnInit} from '@angular/core';
|
|||
import {Subscription} from 'rxjs';
|
||||
import {BreakpointObserver, Breakpoints, BreakpointState} from '@angular/cdk/layout';
|
||||
import {FieldGridRow, LabelDisplay} from './field-grid.model';
|
||||
import {ScreenSizeMap} from 'common';
|
||||
import {ScreenSizeMap} from '../../common/services/ui/resize.model';
|
||||
|
||||
|
||||
@Directive()
|
||||
|
|
|
@ -32,7 +32,7 @@ import {LayoutModule} from '@angular/cdk/layout';
|
|||
import {By} from '@angular/platform-browser';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {Field} from 'common';
|
||||
import {Field} from '../../common/record/field.model';
|
||||
import {ApolloTestingModule} from 'apollo-angular/testing';
|
||||
import {FieldModule} from '../../fields/field.module';
|
||||
import {DropdownButtonModule} from '../dropdown-button/dropdown-button.module';
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
|
||||
import {Component, Input, OnChanges} from '@angular/core';
|
||||
import {BreakpointObserver} from '@angular/cdk/layout';
|
||||
import {Field, Record} from 'common';
|
||||
import {Field} from '../../common/record/field.model';
|
||||
import {Record} from '../../common/record/record.model';
|
||||
import {FieldGridColumn, FieldGridRow} from './field-grid.model';
|
||||
import {BaseFieldGridComponent} from './base-field-grid.component';
|
||||
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
* the words "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
import {ButtonInterface, Field, FieldActions} from 'common';
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {Field} from '../../common/record/field.model';
|
||||
|
||||
export interface FieldGridColumn {
|
||||
field?: Field;
|
||||
|
|
|
@ -28,7 +28,10 @@ import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
|||
|
||||
import {FieldLayoutComponent} from './field-layout.component';
|
||||
import {Component} from '@angular/core';
|
||||
import {deepClone, FieldMap, Panel, Record} from 'common';
|
||||
import {Panel} from '../../common/metadata/metadata.model';
|
||||
import {FieldMap} from '../../common/record/field.model';
|
||||
import {Record} from '../../common/record/record.model';
|
||||
import {deepClone} from '../../common/utils/object-utils';
|
||||
import {BrowserDynamicTestingModule} from '@angular/platform-browser-dynamic/testing';
|
||||
import {LayoutModule} from '@angular/cdk/layout';
|
||||
import {CommonModule} from '@angular/common';
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
*/
|
||||
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {FieldMap, Panel, Record} from 'common';
|
||||
import {FieldMap} from '../../common/record/field.model';
|
||||
import {Panel} from '../../common/metadata/metadata.model';
|
||||
import {Record} from '../../common/record/record.model';
|
||||
import {BreakpointObserver} from '@angular/cdk/layout';
|
||||
import {FieldGridColumn, FieldGridRow} from '../field-grid/field-grid.model';
|
||||
import {BaseFieldGridComponent} from '../field-grid/base-field-grid.component';
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
*/
|
||||
|
||||
import {Observable} from 'rxjs';
|
||||
import {Panel} from 'common';
|
||||
import {ViewMode} from 'common';
|
||||
import {FieldMap} from 'common';
|
||||
import {Record} from 'common';
|
||||
import {FieldMap} from '../../common/record/field.model';
|
||||
import {Panel} from '../../common/metadata/metadata.model';
|
||||
import {Record} from '../../common/record/record.model';
|
||||
import {ViewMode} from '../../common/views/view.model';
|
||||
|
||||
export interface FieldLayoutConfig {
|
||||
mode: ViewMode;
|
||||
|
|
|
@ -28,10 +28,11 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
|
||||
import {FooterUiComponent} from './footer.component';
|
||||
import {ApolloTestingModule} from 'apollo-angular/testing';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
describe('FooterUiComponent', () => {
|
||||
let component: FooterUiComponent;
|
||||
|
@ -39,10 +40,11 @@ describe('FooterUiComponent', () => {
|
|||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
imports: [RouterTestingModule, HttpClientTestingModule, FormsModule, ApolloTestingModule],
|
||||
declarations: [FooterUiComponent]
|
||||
})
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [FooterUiComponent],
|
||||
imports: [RouterTestingModule, FormsModule, ApolloTestingModule],
|
||||
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import {shareReplay} from 'rxjs/operators';
|
|||
import {SingleValueStatisticsStoreFactory} from '../../store/single-value-statistics/single-value-statistics.store.factory';
|
||||
import {fieldManagerMock} from '../../services/record/field/field.manager.spec.mock';
|
||||
import {StatisticsFetchGQL} from '../../store/statistics/graphql/api.statistics.get';
|
||||
import {StatisticsMap, StatisticsQueryMap} from 'common';
|
||||
import {StatisticsMap, StatisticsQueryMap} from '../../common/statistics/statistics.model';
|
||||
|
||||
class StatisticsFetchGQLSpy extends StatisticsFetchGQL {
|
||||
constructor() {
|
||||
|
|
|
@ -41,7 +41,8 @@ import {SingleValueStatisticsStoreFactory} from '../../store/single-value-statis
|
|||
import {languageStoreMock} from '../../store/language/language.store.spec.mock';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
import {gridWidgetFactoryMock} from './grid-widget.component.spec.mock';
|
||||
import {ViewContext, WidgetMetadata} from 'common';
|
||||
import {ViewContext} from '../../common/views/view.model';
|
||||
import {WidgetMetadata} from '../../common/metadata/widget.metadata';
|
||||
|
||||
@Component({
|
||||
selector: 'scrm-grid-widget-test-host-component',
|
||||
|
|
|
@ -33,22 +33,19 @@ import {LanguageStore} from '../../store/language/language.store';
|
|||
import {
|
||||
ContentAlign,
|
||||
ContentJustify,
|
||||
FieldMap,
|
||||
isTrue,
|
||||
SingleValueStatisticsState,
|
||||
SingleValueStatisticsStoreInterface,
|
||||
StatisticMetadata,
|
||||
StatisticsQuery,
|
||||
StatisticWidgetLayoutCol,
|
||||
StatisticWidgetLayoutRow,
|
||||
StatisticWidgetOptions,
|
||||
StringMap,
|
||||
TextColor,
|
||||
TextSizes,
|
||||
ViewContext,
|
||||
WidgetMetadata,
|
||||
} from 'common';
|
||||
|
||||
WidgetMetadata
|
||||
} from '../../common/metadata/widget.metadata';
|
||||
import {FieldMap} from '../../common/record/field.model';
|
||||
import {SingleValueStatisticsState, SingleValueStatisticsStoreInterface} from '../../common/statistics/statistics-store.model';
|
||||
import {StatisticMetadata, StatisticsQuery} from '../../common/statistics/statistics.model';
|
||||
import {StringMap} from '../../common/types/string-map';
|
||||
import {ViewContext} from '../../common/views/view.model';
|
||||
import {isTrue} from '../../common/utils/value-utils';
|
||||
interface StatisticsEntry {
|
||||
labelKey?: string;
|
||||
type: string;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {GroupedButtonInterface} from 'common';
|
||||
import {GroupedButtonInterface} from '../../common/components/button/dropdown-button.model';
|
||||
|
||||
@Component({
|
||||
selector: 'scrm-grouped-button',
|
||||
|
|
|
@ -27,13 +27,14 @@
|
|||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {ImageComponent} from './image.component';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import {AngularSvgIconModule} from 'angular-svg-icon';
|
||||
import {of} from 'rxjs';
|
||||
import {take} from 'rxjs/operators';
|
||||
import {Component} from '@angular/core';
|
||||
import {themeImagesMockData} from '../../store/theme-images/theme-images.store.spec.mock';
|
||||
import {ThemeImagesStore} from '../../store/theme-images/theme-images.store';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
@Component({
|
||||
selector: 'host-component',
|
||||
|
@ -54,19 +55,18 @@ describe('ImageComponent', () => {
|
|||
beforeEach(() => {
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ImageComponent, TestHostComponent],
|
||||
imports: [
|
||||
AngularSvgIconModule.forRoot(),
|
||||
HttpClientTestingModule
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: ThemeImagesStore, useValue: {
|
||||
images$: of(themeImagesMockData).pipe(take(1))
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
declarations: [ImageComponent, TestHostComponent],
|
||||
imports: [AngularSvgIconModule.forRoot()],
|
||||
providers: [
|
||||
{
|
||||
provide: ThemeImagesStore, useValue: {
|
||||
images$: of(themeImagesMockData).pipe(take(1))
|
||||
}
|
||||
},
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';
|
||||
import {ButtonInterface, isEmptyString, ModalCloseFeedBack} from 'common';
|
||||
import {ModalCloseFeedBack} from '../../common/components/modal/modal.model';
|
||||
import {isEmptyString} from '../../common/utils/value-utils';
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {AppStateStore} from '../../store/app-state/app-state.store';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
|
||||
|
|
|
@ -24,18 +24,12 @@
|
|||
* the words "Supercharged by SuiteCRM".
|
||||
*/
|
||||
|
||||
import {Component, ElementRef, HostListener, Input, OnDestroy, OnInit, signal} from '@angular/core';
|
||||
import {
|
||||
Action,
|
||||
ActionContext,
|
||||
ActionDataSource,
|
||||
Button,
|
||||
ButtonGroupInterface,
|
||||
ButtonInterface,
|
||||
isFalse,
|
||||
Record,
|
||||
ActiveLineAction
|
||||
} from 'common';
|
||||
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
||||
import {Action, ActionContext, ActionDataSource} from '../../common/actions/action.model';
|
||||
import {Button, ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {ButtonGroupInterface} from '../../common/components/button/button-group.model';
|
||||
import {isFalse} from '../../common/utils/value-utils';
|
||||
import {Record} from '../../common/record/record.model';
|
||||
import {LanguageStore, LanguageStrings} from '../../store/language/language.store';
|
||||
import {BehaviorSubject, combineLatestWith, Observable, Subscription} from 'rxjs';
|
||||
import {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ButtonInterface} from "common";
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
|
||||
@Component({
|
||||
selector: 'scrm-load-more',
|
||||
|
|
|
@ -27,10 +27,11 @@
|
|||
import { ComponentFixture, TestBed, inject, waitForAsync } from '@angular/core/testing';
|
||||
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
||||
import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
|
||||
|
||||
import {LogoUiComponent} from './logo.component';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
describe('LogoComponent', () => {
|
||||
let component: LogoUiComponent;
|
||||
|
@ -38,10 +39,11 @@ describe('LogoComponent', () => {
|
|||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
imports: [RouterTestingModule, HttpClientTestingModule],
|
||||
declarations: [LogoUiComponent]
|
||||
})
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [LogoUiComponent],
|
||||
imports: [RouterTestingModule],
|
||||
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
@Component({
|
||||
selector: 'scrm-logo-ui',
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
||||
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
||||
import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
|
||||
import {LogoutUiComponent} from './logout.component';
|
||||
import {ApolloTestingModule} from 'apollo-angular/testing';
|
||||
|
@ -36,6 +36,7 @@ import {take} from 'rxjs/operators';
|
|||
import {AuthService} from '../../services/auth/auth.service';
|
||||
import {languageStoreMock} from '../../store/language/language.store.spec.mock';
|
||||
import {LanguageStore} from '../../store/language/language.store';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
describe('LogoutComponent', () => {
|
||||
let component: LogoutUiComponent;
|
||||
|
@ -49,24 +50,23 @@ describe('LogoutComponent', () => {
|
|||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
HttpClientTestingModule,
|
||||
ApolloTestingModule
|
||||
],
|
||||
declarations: [LogoutUiComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: AuthService, useValue: authServiceMock
|
||||
},
|
||||
{
|
||||
provide: LanguageStore, useValue: {
|
||||
vm$: of(languageStoreMock).pipe(take(1))
|
||||
}
|
||||
},
|
||||
]
|
||||
}).compileComponents();
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [LogoutUiComponent],
|
||||
imports: [RouterTestingModule,
|
||||
ApolloTestingModule],
|
||||
providers: [
|
||||
{
|
||||
provide: AuthService, useValue: authServiceMock
|
||||
},
|
||||
{
|
||||
provide: LanguageStore, useValue: {
|
||||
vm$: of(languageStoreMock).pipe(take(1))
|
||||
}
|
||||
},
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Message} from 'common';
|
||||
import {Message} from '../../common/types/messages';
|
||||
import {Observable} from 'rxjs';
|
||||
import {transition, trigger, useAnimation} from '@angular/animations';
|
||||
import {fadeIn, fadeOut} from 'ng-animate';
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
||||
import {Component} from '@angular/core';
|
||||
import {MinimiseButtonComponent} from './minimise-button.component';
|
||||
import {ButtonInterface} from 'common';
|
||||
import {ButtonInterface} from '../../common/components/button/button.model';
|
||||
import {themeImagesStoreMock} from '../../store/theme-images/theme-images.store.spec.mock';
|
||||
import {ButtonModule} from '../button/button.module';
|
||||
import {languageStoreMock} from '../../store/language/language.store.spec.mock';
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue