Ui libs in ein ui projekt gemerged

This commit is contained in:
Lorenz Hilpert
2023-01-30 16:48:39 +01:00
parent 243a288061
commit 2059e4eba4
204 changed files with 1475 additions and 5365 deletions

View File

File diff suppressed because it is too large Load Diff

25
apps/ui/README.md Normal file
View File

@@ -0,0 +1,25 @@
# Ui
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.0.
## Code scaffolding
Run `ng generate component component-name --project ui` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ui`.
> Note: Don't forget to add `--project ui` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build ui` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build ui`, go to the dist folder `cd dist/ui` and run `npm publish`.
## Running unit tests
Run `ng test ui` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@@ -1,25 +0,0 @@
# Autocomplete
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project autocomplete` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project autocomplete`.
> Note: Don't forget to add `--project autocomplete` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build autocomplete` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build autocomplete`, go to the dist folder `cd dist/autocomplete` and run `npm publish`.
## Running unit tests
Run `ng test autocomplete` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/autocomplete",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# BranchDropdown
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.4.
## Code scaffolding
Run `ng generate component component-name --project branch-dropdown` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project branch-dropdown`.
> Note: Don't forget to add `--project branch-dropdown` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build branch-dropdown` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build branch-dropdown`, go to the dist folder `cd dist/branch-dropdown` and run `npm publish`.
## Running unit tests
Run `ng test branch-dropdown` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/branch-dropdown",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.2.4",
"@angular/core": "^10.2.4"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Calendar
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project calendar` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project calendar`.
> Note: Don't forget to add `--project calendar` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build calendar` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build calendar`, go to the dist folder `cd dist/calendar` and run `npm publish`.
## Running unit tests
Run `ng test calendar` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/calendar",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Checkbox
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project checkbox` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project checkbox`.
> Note: Don't forget to add `--project checkbox` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build checkbox` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build checkbox`, go to the dist folder `cd dist/checkbox` and run `npm publish`.
## Running unit tests
Run `ng test checkbox` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/checkbox",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Common
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project common` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project common`.
> Note: Don't forget to add `--project common` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build common` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build common`, go to the dist folder `cd dist/common` and run `npm publish`.
## Running unit tests
Run `ng test common` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/common",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Datepicker
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project datepicker` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project datepicker`.
> Note: Don't forget to add `--project datepicker` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build datepicker` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build datepicker`, go to the dist folder `cd dist/datepicker` and run `npm publish`.
## Running unit tests
Run `ng test datepicker` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/datepicker",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Dropdown
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project dropdown` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project dropdown`.
> Note: Don't forget to add `--project dropdown` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build dropdown` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build dropdown`, go to the dist folder `cd dist/dropdown` and run `npm publish`.
## Running unit tests
Run `ng test dropdown` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/dropdown",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Filter
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project filter` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project filter`.
> Note: Don't forget to add `--project filter` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build filter` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build filter`, go to the dist folder `cd dist/filter` and run `npm publish`.
## Running unit tests
Run `ng test filter` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/filter",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -1,53 +1,53 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { UiSelectFilterComponent } from './select-filter.component';
import { UiSelectFilterOptionComponent } from './select-filter-option.component';
import { NO_ERRORS_SCHEMA } from '@angular/core';
// import { ComponentFixture, TestBed } from '@angular/core/testing';
// import { UiSelectFilterComponent } from './select-filter.component';
// import { UiSelectFilterOptionComponent } from './select-filter-option.component';
// import { NO_ERRORS_SCHEMA } from '@angular/core';
fdescribe('SelectFilterComponent', () => {
let fixture: ComponentFixture<UiSelectFilterComponent>;
let component: UiSelectFilterComponent;
// fdescribe('SelectFilterComponent', () => {
// let fixture: ComponentFixture<UiSelectFilterComponent>;
// let component: UiSelectFilterComponent;
beforeEach(async () => {
TestBed.configureTestingModule({
providers: [],
declarations: [UiSelectFilterComponent, UiSelectFilterOptionComponent],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();
});
// beforeEach(async () => {
// TestBed.configureTestingModule({
// providers: [],
// declarations: [UiSelectFilterComponent, UiSelectFilterOptionComponent],
// schemas: [NO_ERRORS_SCHEMA],
// }).compileComponents();
// });
beforeEach(() => {
fixture = TestBed.createComponent(UiSelectFilterComponent);
component = fixture.componentInstance;
// beforeEach(() => {
// fixture = TestBed.createComponent(UiSelectFilterComponent);
// component = fixture.componentInstance;
spyOn(component, 'ngAfterViewInit').and.callFake(() => {});
fixture.detectChanges();
});
// spyOn(component, 'ngAfterViewInit').and.callFake(() => {});
// fixture.detectChanges();
// });
describe('setAllSelected', () => {
beforeEach(() => {
spyOn(component, 'setAllSelected').and.callThrough();
spyOn(component.allSelected$, 'next').and.callFake(() => {});
});
// describe('setAllSelected', () => {
// beforeEach(() => {
// spyOn(component, 'setAllSelected').and.callThrough();
// spyOn(component.allSelected$, 'next').and.callFake(() => {});
// });
// it('should set allSelected with true', () => {
// const mockFilters = selectFilterOptionsAllSelected;
// component.setAllSelected(mockFilters);
// // it('should set allSelected with true', () => {
// // const mockFilters = selectFilterOptionsAllSelected;
// // component.setAllSelected(mockFilters);
// expect(component.allSelected$.next).toHaveBeenCalledWith(true);
// });
// // expect(component.allSelected$.next).toHaveBeenCalledWith(true);
// // });
// it('should set allSelected to false if only some options are selected', () => {
// const mockFilters = selectFilterOptionsMixedSelected;
// component.setAllSelected(mockFilters);
// // it('should set allSelected to false if only some options are selected', () => {
// // const mockFilters = selectFilterOptionsMixedSelected;
// // component.setAllSelected(mockFilters);
// expect(component.allSelected$.next).toHaveBeenCalledWith(false);
// });
// // expect(component.allSelected$.next).toHaveBeenCalledWith(false);
// // });
// it('should set allSelected with false', () => {
// const mockFilters = selectFilterOptionsAllDeselected;
// component.setAllSelected(mockFilters);
// // it('should set allSelected with false', () => {
// // const mockFilters = selectFilterOptionsAllDeselected;
// // component.setAllSelected(mockFilters);
// expect(component.allSelected$.next).toHaveBeenCalledWith(false);
// });
});
});
// // expect(component.allSelected$.next).toHaveBeenCalledWith(false);
// // });
// });
// });

View File

@@ -1,154 +1,154 @@
import { createComponentFactory, Spectator } from '@ngneat/spectator';
import { UiAutocompleteModule } from '../../../autocomplete';
import { UiSearchboxModule } from '../../../searchbox';
import { IUiInput, IUiInputGroup, UiInput, UiInputGroup, UiInputType } from '../../tree';
// import { createComponentFactory, Spectator } from '@ngneat/spectator';
// import { UiAutocompleteModule } from '../../../autocomplete';
// import { UiSearchboxModule } from '../../../searchbox';
// import { IUiInput, IUiInputGroup, UiInput, UiInputGroup, UiInputType } from '../../tree';
import { isObservable, NEVER, of } from 'rxjs';
import { UiFilterInputGroupMainComponent } from './filter-input-group-main.component';
// import { isObservable, NEVER, of } from 'rxjs';
// import { UiFilterInputGroupMainComponent } from './filter-input-group-main.component';
describe('UiFilterInputGroupMainComponent', () => {
const inputGroupData: IUiInputGroup = {
input: [{ key: 'qs', placeholder: 'ISBN/EAN, Titel, Kundenname', type: 1, constraint: '^.{2,100}$' }],
};
// describe('UiFilterInputGroupMainComponent', () => {
// const inputGroupData: IUiInputGroup = {
// input: [{ key: 'qs', placeholder: 'ISBN/EAN, Titel, Kundenname', type: 1, constraint: '^.{2,100}$' }],
// };
let spectator: Spectator<UiFilterInputGroupMainComponent>;
// let spectator: Spectator<UiFilterInputGroupMainComponent>;
const createSpectator = createComponentFactory({
component: UiFilterInputGroupMainComponent,
imports: [UiSearchboxModule, UiAutocompleteModule],
});
// const createSpectator = createComponentFactory({
// component: UiFilterInputGroupMainComponent,
// imports: [UiSearchboxModule, UiAutocompleteModule],
// });
beforeEach(() => {
spectator = createSpectator();
});
// beforeEach(() => {
// spectator = createSpectator();
// });
it('should create the component', () => {
expect(spectator.component).toBeTruthy();
});
// it('should create the component', () => {
// expect(spectator.component).toBeTruthy();
// });
describe('uiInput', () => {
it('should return undefined when inputGroup is not set', () => {
expect(spectator.component.uiInput).toBeUndefined();
});
// describe('uiInput', () => {
// it('should return undefined when inputGroup is not set', () => {
// expect(spectator.component.uiInput).toBeUndefined();
// });
it('should return an instance of UiInput', () => {
spectator.setInput({
inputGroup: inputGroupData,
});
expect(spectator.component.uiInput instanceof UiInput).toBeTruthy();
});
// it('should return an instance of UiInput', () => {
// spectator.setInput({
// inputGroup: inputGroupData,
// });
// expect(spectator.component.uiInput instanceof UiInput).toBeTruthy();
// });
it('should return the same instance of the input', () => {
const instance = UiInputGroup.create(inputGroupData);
spectator.setInput({
inputGroup: instance,
});
// it('should return the same instance of the input', () => {
// const instance = UiInputGroup.create(inputGroupData);
// spectator.setInput({
// inputGroup: instance,
// });
expect(spectator.component.uiInput).toBe(instance.input[0]);
});
});
// expect(spectator.component.uiInput).toBe(instance.input[0]);
// });
// });
describe('ngOnInit()', () => {
it('should set the autocompleteProvider with the property for to be main', () => {
const provider = { for: 'main', complete: () => NEVER };
spectator.component['autocompleteProviders'] = [provider, { for: 'not main', complete: () => NEVER }];
spectator.component.ngOnInit();
expect(spectator.component.autocompleteProvider).toBe(provider);
});
// describe('ngOnInit()', () => {
// it('should set the autocompleteProvider with the property for to be main', () => {
// const provider = { for: 'main', complete: () => NEVER };
// spectator.component['autocompleteProviders'] = [provider, { for: 'not main', complete: () => NEVER }];
// spectator.component.ngOnInit();
// expect(spectator.component.autocompleteProvider).toBe(provider);
// });
it('should set the scanProvider with the property for to be main', () => {
const provider = { for: 'main', scan: () => NEVER };
spectator.component['scanProviders'] = [provider, { for: 'not main', scan: () => NEVER }];
spectator.component.ngOnInit();
expect(spectator.component.scanProvider).toBe(provider);
});
});
// it('should set the scanProvider with the property for to be main', () => {
// const provider = { for: 'main', scan: () => NEVER };
// spectator.component['scanProviders'] = [provider, { for: 'not main', scan: () => NEVER }];
// spectator.component.ngOnInit();
// expect(spectator.component.scanProvider).toBe(provider);
// });
// });
describe('initAutocomplete()', () => {
it('should create an Observable for autocompleteResult$', () => {
spectator.setInput({
inputGroup: inputGroupData,
});
spectator.component.setAutocompleteProvider({ for: 'main', complete: () => NEVER });
spectator.component.initAutocomplete();
expect(isObservable(spectator.component.autocompleteResults$)).toBe(true);
});
// describe('initAutocomplete()', () => {
// it('should create an Observable for autocompleteResult$', () => {
// spectator.setInput({
// inputGroup: inputGroupData,
// });
// spectator.component.setAutocompleteProvider({ for: 'main', complete: () => NEVER });
// spectator.component.initAutocomplete();
// expect(isObservable(spectator.component.autocompleteResults$)).toBe(true);
// });
it('should call autocompleteComponent.open() if the prvider returns at least one result', () => {
spectator.setInput({
inputGroup: inputGroupData,
});
spectator.component.setAutocompleteProvider({
for: 'main',
complete: (query) => of([{ display: `${query} first` }, { display: `${query} second` }]),
});
spectator.detectComponentChanges();
spyOn(spectator.component.autocompleteComponent, 'open');
spectator.component.complete.next('test');
expect(spectator.component.autocompleteComponent.open).toHaveBeenCalled();
});
// it('should call autocompleteComponent.open() if the prvider returns at least one result', () => {
// spectator.setInput({
// inputGroup: inputGroupData,
// });
// spectator.component.setAutocompleteProvider({
// for: 'main',
// complete: (query) => of([{ display: `${query} first` }, { display: `${query} second` }]),
// });
// spectator.detectComponentChanges();
// spyOn(spectator.component.autocompleteComponent, 'open');
// spectator.component.complete.next('test');
// expect(spectator.component.autocompleteComponent.open).toHaveBeenCalled();
// });
it('should call autocompleteComponent.close() if the prvider returns at no results', () => {
spectator.setInput({
inputGroup: inputGroupData,
});
spectator.component.setAutocompleteProvider({
for: 'main',
complete: (query) => of([]),
});
spectator.detectComponentChanges();
spyOn(spectator.component.autocompleteComponent, 'close');
spectator.component.complete.next('test');
expect(spectator.component.autocompleteComponent.close).toHaveBeenCalled();
});
});
// it('should call autocompleteComponent.close() if the prvider returns at no results', () => {
// spectator.setInput({
// inputGroup: inputGroupData,
// });
// spectator.component.setAutocompleteProvider({
// for: 'main',
// complete: (query) => of([]),
// });
// spectator.detectComponentChanges();
// spyOn(spectator.component.autocompleteComponent, 'close');
// spectator.component.complete.next('test');
// expect(spectator.component.autocompleteComponent.close).toHaveBeenCalled();
// });
// });
describe('ui-searchbox', () => {
describe('input.ui-searchbox-input', () => {
it('should have a placeholder', () => {
spectator.setInput({
inputGroup: { input: [{ type: UiInputType.Text, placeholder: 'Unit Test Placeholder' }] },
});
spectator.detectComponentChanges();
// describe('ui-searchbox', () => {
// describe('input.ui-searchbox-input', () => {
// it('should have a placeholder', () => {
// spectator.setInput({
// inputGroup: { input: [{ type: UiInputType.Text, placeholder: 'Unit Test Placeholder' }] },
// });
// spectator.detectComponentChanges();
expect(spectator.query('input.ui-searchbox-input')).toContainProperty('placeholder', 'Unit Test Placeholder');
});
// expect(spectator.query('input.ui-searchbox-input')).toContainProperty('placeholder', 'Unit Test Placeholder');
// });
it('should have a value', async () => {
spectator.setInput({
inputGroup: { input: [{ type: UiInputType.Text, value: 'Unit Test Value' }] },
});
// it('should have a value', async () => {
// spectator.setInput({
// inputGroup: { input: [{ type: UiInputType.Text, value: 'Unit Test Value' }] },
// });
spectator.detectComponentChanges();
await spectator.fixture.whenStable();
expect(spectator.query('input.ui-searchbox-input')).toHaveValue('Unit Test Value');
});
// spectator.detectComponentChanges();
// await spectator.fixture.whenStable();
// expect(spectator.query('input.ui-searchbox-input')).toHaveValue('Unit Test Value');
// });
it('should call input.setValue when value changes', async () => {
spectator.setInput({
inputGroup: { input: [{ type: UiInputType.Text, value: 'Unit Test Value' }] },
});
spyOn(spectator.component.uiInput, 'setValue');
spectator.detectComponentChanges();
await spectator.fixture.whenStable();
spectator.typeInElement('Unit Test', spectator.query('input.ui-searchbox-input'));
expect(spectator.component.uiInput.setValue).toHaveBeenCalledWith('Unit Test');
});
});
});
// it('should call input.setValue when value changes', async () => {
// spectator.setInput({
// inputGroup: { input: [{ type: UiInputType.Text, value: 'Unit Test Value' }] },
// });
// spyOn(spectator.component.uiInput, 'setValue');
// spectator.detectComponentChanges();
// await spectator.fixture.whenStable();
// spectator.typeInElement('Unit Test', spectator.query('input.ui-searchbox-input'));
// expect(spectator.component.uiInput.setValue).toHaveBeenCalledWith('Unit Test');
// });
// });
// });
describe('ui-autocomplete', () => {
it('should not render the element if no autocompleteProvider is set', () => {
spyOnProperty(spectator.component, 'autocompleteProvider', 'get').and.returnValue(undefined);
spectator.detectComponentChanges();
expect(spectator.query('ui-autocomplete')).toBeNull();
});
// describe('ui-autocomplete', () => {
// it('should not render the element if no autocompleteProvider is set', () => {
// spyOnProperty(spectator.component, 'autocompleteProvider', 'get').and.returnValue(undefined);
// spectator.detectComponentChanges();
// expect(spectator.query('ui-autocomplete')).toBeNull();
// });
it('should render the element if autocompleteProvider is set', () => {
spectator.setInput({ inputGroup: inputGroupData });
spyOnProperty(spectator.component, 'autocompleteProvider', 'get').and.returnValue({ for: 'main', complete: () => NEVER });
spectator.detectComponentChanges();
expect(spectator.query('ui-autocomplete')).not.toBeNull();
});
});
});
// it('should render the element if autocompleteProvider is set', () => {
// spectator.setInput({ inputGroup: inputGroupData });
// spyOnProperty(spectator.component, 'autocompleteProvider', 'get').and.returnValue({ for: 'main', complete: () => NEVER });
// spectator.detectComponentChanges();
// expect(spectator.query('ui-autocomplete')).not.toBeNull();
// });
// });
// });

View File

@@ -1,72 +1,72 @@
import { createComponentFactory, Spectator } from '@ngneat/spectator';
import { UiIconModule } from '@ui/icon';
import { UiInput, UiInputGroup, UiInputType } from '../../tree';
import { UiFilterInputChipComponent } from './filter-input-chip.component';
// import { createComponentFactory, Spectator } from '@ngneat/spectator';
// import { UiIconModule } from '@ui/icon';
// import { UiInput, UiInputGroup, UiInputType } from '../../tree';
// import { UiFilterInputChipComponent } from './filter-input-chip.component';
describe('UiFilterInputChipComponent', () => {
let spectator: Spectator<UiFilterInputChipComponent>;
const createComponent = createComponentFactory({
component: UiFilterInputChipComponent,
imports: [UiIconModule],
});
// describe('UiFilterInputChipComponent', () => {
// let spectator: Spectator<UiFilterInputChipComponent>;
// const createComponent = createComponentFactory({
// component: UiFilterInputChipComponent,
// imports: [UiIconModule],
// });
beforeEach(() => {
spectator = createComponent();
});
// beforeEach(() => {
// spectator = createComponent();
// });
it('should create', () => {
expect(spectator.component).toBeTruthy();
});
// it('should create', () => {
// expect(spectator.component).toBeTruthy();
// });
describe('input', () => {
it('should create an instance of UiInput if value is a plain object', () => {
spectator.setInput({
input: { type: UiInputType.NotSet },
});
// describe('input', () => {
// it('should create an instance of UiInput if value is a plain object', () => {
// spectator.setInput({
// input: { type: UiInputType.NotSet },
// });
expect(spectator.component.uiInput instanceof UiInput).toBe(true);
});
});
// expect(spectator.component.uiInput instanceof UiInput).toBe(true);
// });
// });
describe('button.ui-filter-chip Element', () => {
it('should have the text content of uiInput.label', () => {
spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ label: 'My Label', type: UiInputType.NotSet }));
spectator.detectComponentChanges();
expect(spectator.query('button.ui-filter-chip')).toContainText('My Label');
});
// describe('button.ui-filter-chip Element', () => {
// it('should have the text content of uiInput.label', () => {
// spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ label: 'My Label', type: UiInputType.NotSet }));
// spectator.detectComponentChanges();
// expect(spectator.query('button.ui-filter-chip')).toContainText('My Label');
// });
it('should have the class selected if uiInput.selected is true', () => {
spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ selected: true, type: UiInputType.NotSet }));
spectator.detectComponentChanges();
expect(spectator.query('button.ui-filter-chip')).toHaveClass('selected');
});
// it('should have the class selected if uiInput.selected is true', () => {
// spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ selected: true, type: UiInputType.NotSet }));
// spectator.detectComponentChanges();
// expect(spectator.query('button.ui-filter-chip')).toHaveClass('selected');
// });
it('should not have the class selected if uiInput.selected is true', () => {
spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ selected: false, type: UiInputType.NotSet }));
spectator.detectComponentChanges();
expect(spectator.query('button.ui-filter-chip')).not.toHaveClass('selected');
});
// it('should not have the class selected if uiInput.selected is true', () => {
// spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ selected: false, type: UiInputType.NotSet }));
// spectator.detectComponentChanges();
// expect(spectator.query('button.ui-filter-chip')).not.toHaveClass('selected');
// });
it('should call uiInput.setSelected(!uiInput.selected) on click', () => {
spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ type: UiInputType.NotSet }));
spyOn(spectator.component.uiInput, 'setSelected');
spectator.detectComponentChanges();
spectator.click('button.ui-filter-chip');
expect(spectator.component.uiInput.setSelected).toHaveBeenCalledWith(!spectator.component.uiInput.selected);
});
});
// it('should call uiInput.setSelected(!uiInput.selected) on click', () => {
// spyOnProperty(spectator.component, 'uiInput', 'get').and.returnValue(UiInput.create({ type: UiInputType.NotSet }));
// spyOn(spectator.component.uiInput, 'setSelected');
// spectator.detectComponentChanges();
// spectator.click('button.ui-filter-chip');
// expect(spectator.component.uiInput.setSelected).toHaveBeenCalledWith(!spectator.component.uiInput.selected);
// });
// });
describe('ui-icon Element', () => {
it('should not be visible if selected is false', () => {
spectator.setInput({ input: { type: 0, selected: false } });
spectator.detectComponentChanges();
expect(spectator.query('ui-icon')).not.toBeVisible();
});
// describe('ui-icon Element', () => {
// it('should not be visible if selected is false', () => {
// spectator.setInput({ input: { type: 0, selected: false } });
// spectator.detectComponentChanges();
// expect(spectator.query('ui-icon')).not.toBeVisible();
// });
it('should be visible if selected is true', () => {
spectator.setInput({ input: { type: 0, selected: true } });
spectator.detectComponentChanges();
expect(spectator.query('ui-icon')).toBeVisible();
});
});
});
// it('should be visible if selected is true', () => {
// spectator.setInput({ input: { type: 0, selected: true } });
// spectator.detectComponentChanges();
// expect(spectator.query('ui-icon')).toBeVisible();
// });
// });
// });

View File

@@ -1,74 +1,74 @@
import { createComponentFactory, Spectator } from '@ngneat/spectator';
import { UiInput, UiInputType, UiOption } from '../../../tree';
import { UiFilterInputOptionDateRangeComponent } from './filter-input-option-date-range.component';
// import { createComponentFactory, Spectator } from '@ngneat/spectator';
// import { UiInput, UiInputType, UiOption } from '../../../tree';
// import { UiFilterInputOptionDateRangeComponent } from './filter-input-option-date-range.component';
describe('UiFilterInputOptionDateRangeComponent', () => {
let spectator: Spectator<UiFilterInputOptionDateRangeComponent>;
const createComponent = createComponentFactory({
component: UiFilterInputOptionDateRangeComponent,
});
// describe('UiFilterInputOptionDateRangeComponent', () => {
// let spectator: Spectator<UiFilterInputOptionDateRangeComponent>;
// const createComponent = createComponentFactory({
// component: UiFilterInputOptionDateRangeComponent,
// });
beforeEach(() => {
spectator = createComponent();
});
// beforeEach(() => {
// spectator = createComponent();
// });
it('should create', () => {
expect(spectator.component).toBeTruthy();
});
// it('should create', () => {
// expect(spectator.component).toBeTruthy();
// });
describe('set options(value: IUiOption[])', () => {
it('should create an instance of UiOption when values are not an instance of UiOption', () => {
spectator.setInput({
options: [{ key: 'start' }, { key: 'stop' }],
});
// describe('set options(value: IUiOption[])', () => {
// it('should create an instance of UiOption when values are not an instance of UiOption', () => {
// spectator.setInput({
// options: [{ key: 'start' }, { key: 'stop' }],
// });
spectator.component['_options'].forEach((uiOption) => {
expect(uiOption instanceof UiOption).toBe(true);
});
});
// spectator.component['_options'].forEach((uiOption) => {
// expect(uiOption instanceof UiOption).toBe(true);
// });
// });
it('should set the values when vales are an isntance of UiOption', () => {
const option1 = UiOption.create({ key: 'start' });
const option2 = UiOption.create({ key: 'stop' });
spectator.setInput({
options: [option1, option2],
});
// it('should set the values when vales are an isntance of UiOption', () => {
// const option1 = UiOption.create({ key: 'start' });
// const option2 = UiOption.create({ key: 'stop' });
// spectator.setInput({
// options: [option1, option2],
// });
expect(spectator.component['_options'][0]).toBe(option1);
expect(spectator.component['_options'][1]).toBe(option2);
});
});
// expect(spectator.component['_options'][0]).toBe(option1);
// expect(spectator.component['_options'][1]).toBe(option2);
// });
// });
describe('get uiOptions()', () => {
it('should return the value of _options', () => {
const option1 = UiOption.create({ key: 'start' });
const option2 = UiOption.create({ key: 'stop' });
const options = [option1, option2];
spectator.component['_options'] = options;
// describe('get uiOptions()', () => {
// it('should return the value of _options', () => {
// const option1 = UiOption.create({ key: 'start' });
// const option2 = UiOption.create({ key: 'stop' });
// const options = [option1, option2];
// spectator.component['_options'] = options;
expect(spectator.component.uiOptions).toBe(options);
});
});
// expect(spectator.component.uiOptions).toBe(options);
// });
// });
describe('get uiStartOption()', () => {
it('should retun the option with the key start', () => {
const option1 = UiOption.create({ key: 'start' });
const option2 = UiOption.create({ key: 'stop' });
const options = [option1, option2];
spectator.component['_options'] = options;
// describe('get uiStartOption()', () => {
// it('should retun the option with the key start', () => {
// const option1 = UiOption.create({ key: 'start' });
// const option2 = UiOption.create({ key: 'stop' });
// const options = [option1, option2];
// spectator.component['_options'] = options;
expect(spectator.component.uiStartOption).toBe(option1);
});
});
// expect(spectator.component.uiStartOption).toBe(option1);
// });
// });
describe('get uiStopOption()', () => {
it('should return the option with the key stop', () => {
const option1 = UiOption.create({ key: 'start' });
const option2 = UiOption.create({ key: 'stop' });
const options = [option1, option2];
spectator.component['_options'] = options;
// describe('get uiStopOption()', () => {
// it('should return the option with the key stop', () => {
// const option1 = UiOption.create({ key: 'start' });
// const option2 = UiOption.create({ key: 'stop' });
// const options = [option1, option2];
// spectator.component['_options'] = options;
expect(spectator.component.uiStopOption).toBe(option2);
});
});
});
// expect(spectator.component.uiStopOption).toBe(option2);
// });
// });
// });

View File

@@ -1,17 +1,17 @@
import { createComponentFactory, Spectator } from '@ngneat/spectator';
import { UiFilterInputOptionsComponent } from './filter-input-options.component';
// import { createComponentFactory, Spectator } from '@ngneat/spectator';
// import { UiFilterInputOptionsComponent } from './filter-input-options.component';
describe('UiFilterInputOptionsComponent', () => {
let spectator: Spectator<UiFilterInputOptionsComponent>;
const createComponent = createComponentFactory({
component: UiFilterInputOptionsComponent,
});
// describe('UiFilterInputOptionsComponent', () => {
// let spectator: Spectator<UiFilterInputOptionsComponent>;
// const createComponent = createComponentFactory({
// component: UiFilterInputOptionsComponent,
// });
beforeEach(() => {
spectator = createComponent();
});
// beforeEach(() => {
// spectator = createComponent();
// });
it('should create', () => {
expect(spectator.component).toBeTruthy();
});
});
// it('should create', () => {
// expect(spectator.component).toBeTruthy();
// });
// });

View File

@@ -1,102 +1,102 @@
import { IUiInput, UiInput } from './ui-input';
import { UiInputOptions } from './ui-input-options';
// import { IUiInput, UiInput } from './ui-input';
// import { UiInputOptions } from './ui-input-options';
describe('UiInput', () => {
const testData: IUiInput = {
key: 'qs',
placeholder: 'ISBN/EAN, Titel, Kundenname',
type: 1,
constraint: '^.{2,100}$',
options: { values: [], max: 1 },
target: 'target',
label: 'label',
description: 'description',
maxValue: '4',
minValue: '2',
selected: false,
};
// describe('UiInput', () => {
// const testData: IUiInput = {
// key: 'qs',
// placeholder: 'ISBN/EAN, Titel, Kundenname',
// type: 1,
// constraint: '^.{2,100}$',
// options: { values: [], max: 1 },
// target: 'target',
// label: 'label',
// description: 'description',
// maxValue: '4',
// minValue: '2',
// selected: false,
// };
let uiInput: UiInput;
// let uiInput: UiInput;
beforeEach(() => {
spyOn(UiInputOptions, 'create');
uiInput = UiInput.create(testData);
});
// beforeEach(() => {
// spyOn(UiInputOptions, 'create');
// uiInput = UiInput.create(testData);
// });
describe('setValue(value: string, { emitEvent } = { emitEvent: true })', () => {
it('should set the property value and calls changes.next with the value', () => {
spyOn(uiInput.changes, 'next');
uiInput.setValue('value test');
expect(uiInput.value).toEqual('value test');
expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['value'], target: uiInput });
});
// describe('setValue(value: string, { emitEvent } = { emitEvent: true })', () => {
// it('should set the property value and calls changes.next with the value', () => {
// spyOn(uiInput.changes, 'next');
// uiInput.setValue('value test');
// expect(uiInput.value).toEqual('value test');
// expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['value'], target: uiInput });
// });
it('should set the property value and calls changes.next with the value when emitEvent is true', () => {
spyOn(uiInput.changes, 'next');
uiInput.setValue('value test', { emitEvent: true });
expect(uiInput.value).toEqual('value test');
expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['value'], target: uiInput });
});
// it('should set the property value and calls changes.next with the value when emitEvent is true', () => {
// spyOn(uiInput.changes, 'next');
// uiInput.setValue('value test', { emitEvent: true });
// expect(uiInput.value).toEqual('value test');
// expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['value'], target: uiInput });
// });
it('should set the property value and not calls changes.next with the value when emitEvent is false', () => {
spyOn(uiInput.changes, 'next');
uiInput.setValue('value test', { emitEvent: false });
expect(uiInput.value).toEqual('value test');
expect(uiInput.changes.next).not.toHaveBeenCalled();
});
// it('should set the property value and not calls changes.next with the value when emitEvent is false', () => {
// spyOn(uiInput.changes, 'next');
// uiInput.setValue('value test', { emitEvent: false });
// expect(uiInput.value).toEqual('value test');
// expect(uiInput.changes.next).not.toHaveBeenCalled();
// });
it('should not call changes.next if the value is equal', () => {
uiInput.setValue('value test');
spyOn(uiInput.changes, 'next');
uiInput.setValue('value test', { emitEvent: true });
expect(uiInput.value).toEqual('value test');
expect(uiInput.changes.next).not.toHaveBeenCalled();
});
});
// it('should not call changes.next if the value is equal', () => {
// uiInput.setValue('value test');
// spyOn(uiInput.changes, 'next');
// uiInput.setValue('value test', { emitEvent: true });
// expect(uiInput.value).toEqual('value test');
// expect(uiInput.changes.next).not.toHaveBeenCalled();
// });
// });
describe('setSelected(value: boolean, { emitEvent } = { emitEvent: true })', () => {
it('should set selected to true and calls changes.next when no option is provided', () => {
spyOn(uiInput.changes, 'next');
uiInput.setSelected(true);
expect(uiInput.selected).toBe(true);
expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
});
// describe('setSelected(value: boolean, { emitEvent } = { emitEvent: true })', () => {
// it('should set selected to true and calls changes.next when no option is provided', () => {
// spyOn(uiInput.changes, 'next');
// uiInput.setSelected(true);
// expect(uiInput.selected).toBe(true);
// expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
// });
it('should not call changes.next if value is the same', () => {
uiInput.setSelected(true);
spyOn(uiInput.changes, 'next');
uiInput.setSelected(true);
expect(uiInput.changes.next).not.toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
});
// it('should not call changes.next if value is the same', () => {
// uiInput.setSelected(true);
// spyOn(uiInput.changes, 'next');
// uiInput.setSelected(true);
// expect(uiInput.changes.next).not.toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
// });
it('should call changes.next if option emitEvent is true', () => {
spyOn(uiInput.changes, 'next');
uiInput.setSelected(true, { emitEvent: true });
expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
});
// it('should call changes.next if option emitEvent is true', () => {
// spyOn(uiInput.changes, 'next');
// uiInput.setSelected(true, { emitEvent: true });
// expect(uiInput.changes.next).toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
// });
it('should not call changes.next if option emitEvent is false', () => {
spyOn(uiInput.changes, 'next');
uiInput.setSelected(true, { emitEvent: false });
expect(uiInput.changes.next).not.toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
});
});
// it('should not call changes.next if option emitEvent is false', () => {
// spyOn(uiInput.changes, 'next');
// uiInput.setSelected(true, { emitEvent: false });
// expect(uiInput.changes.next).not.toHaveBeenCalledWith({ keys: ['selected'], target: uiInput });
// });
// });
describe('static create(inputOptions: IUiInputDTO)', () => {
it('should return an instance of UiInputDTO', () => {
expect(uiInput instanceof UiInput).toBe(true);
expect(uiInput.constraint).toBe(testData.constraint);
expect(uiInput.description).toBe(testData.description);
expect(uiInput.key).toBe(testData.key);
expect(uiInput.label).toBe(testData.label);
expect(uiInput.maxValue).toBe(testData.maxValue);
expect(uiInput.minValue).toBe(testData.minValue);
expect(UiInputOptions.create).toHaveBeenCalledWith(testData.options, uiInput);
expect(uiInput.placeholder).toBe(testData.placeholder);
expect(uiInput.target).toBe(testData.target);
expect(uiInput.type).toBe(testData.type);
expect(uiInput.value).toBe(testData.value);
expect(uiInput.selected).toBe(testData.selected);
});
});
});
// describe('static create(inputOptions: IUiInputDTO)', () => {
// it('should return an instance of UiInputDTO', () => {
// expect(uiInput instanceof UiInput).toBe(true);
// expect(uiInput.constraint).toBe(testData.constraint);
// expect(uiInput.description).toBe(testData.description);
// expect(uiInput.key).toBe(testData.key);
// expect(uiInput.label).toBe(testData.label);
// expect(uiInput.maxValue).toBe(testData.maxValue);
// expect(uiInput.minValue).toBe(testData.minValue);
// expect(UiInputOptions.create).toHaveBeenCalledWith(testData.options, uiInput);
// expect(uiInput.placeholder).toBe(testData.placeholder);
// expect(uiInput.target).toBe(testData.target);
// expect(uiInput.type).toBe(testData.type);
// expect(uiInput.value).toBe(testData.value);
// expect(uiInput.selected).toBe(testData.selected);
// });
// });
// });

View File

@@ -1,48 +1,48 @@
import { createComponentFactory, Spectator } from '@ngneat/spectator';
import { UiFilterFilterGroupMainModule } from './filter-group/filter-filter-group-main';
import { UiFilterInputGroupMainModule } from './filter-group/filter-input-group-main';
import { UiInputGroupSelectorPipe } from './pipe';
import { querySettingsData } from './testing';
import { UiFilter } from './tree';
import { UiFilterComponent } from './ui-filter.component';
// import { createComponentFactory, Spectator } from '@ngneat/spectator';
// import { UiFilterFilterGroupMainModule } from './filter-group/filter-filter-group-main';
// import { UiFilterInputGroupMainModule } from './filter-group/filter-input-group-main';
// import { UiInputGroupSelectorPipe } from './pipe';
// import { querySettingsData } from './testing';
// import { UiFilter } from './tree';
// import { UiFilterComponent } from './ui-filter.component';
describe('UiFilterComponent', () => {
let spectator: Spectator<UiFilterComponent>;
const createComponent = createComponentFactory({
component: UiFilterComponent,
declarations: [UiInputGroupSelectorPipe],
imports: [UiFilterFilterGroupMainModule, UiFilterInputGroupMainModule],
});
// describe('UiFilterComponent', () => {
// let spectator: Spectator<UiFilterComponent>;
// const createComponent = createComponentFactory({
// component: UiFilterComponent,
// declarations: [UiInputGroupSelectorPipe],
// imports: [UiFilterFilterGroupMainModule, UiFilterInputGroupMainModule],
// });
beforeEach(() => {
spectator = createComponent();
});
// beforeEach(() => {
// spectator = createComponent();
// });
it('should create', () => {
expect(spectator.component).toBeTruthy();
});
// it('should create', () => {
// expect(spectator.component).toBeTruthy();
// });
describe('ngOnChanges()', () => {
it('should check and create an instance of UiQuerySettingsDTO if querySettings is a plain object', () => {
spectator.setInput({
filter: querySettingsData,
});
// describe('ngOnChanges()', () => {
// it('should check and create an instance of UiQuerySettingsDTO if querySettings is a plain object', () => {
// spectator.setInput({
// filter: querySettingsData,
// });
expect(spectator.component.filter instanceof UiFilter).toBe(true);
});
// expect(spectator.component.filter instanceof UiFilter).toBe(true);
// });
it('should not create a new instance of UiQuerySettingsDTO if querySettings is already an instance of UiQuerySettingsDTO', () => {
const querySettings = UiFilter.create(querySettingsData);
spectator.setInput({
filter: querySettings,
});
// it('should not create a new instance of UiQuerySettingsDTO if querySettings is already an instance of UiQuerySettingsDTO', () => {
// const querySettings = UiFilter.create(querySettingsData);
// spectator.setInput({
// filter: querySettings,
// });
expect(spectator.component.filter).toBe(querySettings);
});
// expect(spectator.component.filter).toBe(querySettings);
// });
it('should skip querySettings check if there is no input change', () => {
spectator.component.ngOnChanges({});
expect(spectator.component.filter).toBeUndefined();
});
});
});
// it('should skip querySettings check if there is no input change', () => {
// spectator.component.ngOnChanges({});
// expect(spectator.component.filter).toBeUndefined();
// });
// });
// });

View File

@@ -1,132 +1,132 @@
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { UiSelectedFilterOptionsComponent } from './selected-filter-options.component';
import { ChangeDetectorRef, Renderer2 } from '@angular/core';
import { IconModule } from '@libs/ui';
import { FilterResetWordingPipe, SelectedFiltersPipe, CheckAllChildOptionsSelectedPipe } from '../pipe';
import { By } from '@angular/platform-browser';
import { SelectFilter } from '../../models';
// import { TestBed, ComponentFixture } from '@angular/core/testing';
// import { UiSelectedFilterOptionsComponent } from './selected-filter-options.component';
// import { ChangeDetectorRef, Renderer2 } from '@angular/core';
// import { IconModule } from '@libs/ui';
// import { FilterResetWordingPipe, SelectedFiltersPipe, CheckAllChildOptionsSelectedPipe } from '../pipe';
// import { By } from '@angular/platform-browser';
// import { SelectFilter } from '../../models';
fdescribe('SelectedFilterOptionsComponent', () => {
let fixture: ComponentFixture<UiSelectedFilterOptionsComponent>;
let component: UiSelectedFilterOptionsComponent;
// fdescribe('SelectedFilterOptionsComponent', () => {
// let fixture: ComponentFixture<UiSelectedFilterOptionsComponent>;
// let component: UiSelectedFilterOptionsComponent;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [IconModule, IconModule],
providers: [ChangeDetectorRef, Renderer2, UiSelectedFilterOptionsComponent],
declarations: [UiSelectedFilterOptionsComponent, SelectedFiltersPipe, FilterResetWordingPipe, CheckAllChildOptionsSelectedPipe],
}).compileComponents();
});
// beforeEach(() => {
// TestBed.configureTestingModule({
// imports: [IconModule, IconModule],
// providers: [ChangeDetectorRef, Renderer2, UiSelectedFilterOptionsComponent],
// declarations: [UiSelectedFilterOptionsComponent, SelectedFiltersPipe, FilterResetWordingPipe, CheckAllChildOptionsSelectedPipe],
// }).compileComponents();
// });
beforeEach(() => {
fixture = TestBed.createComponent(UiSelectedFilterOptionsComponent);
component = fixture.componentInstance;
component.value = [];
fixture.detectChanges();
});
// beforeEach(() => {
// fixture = TestBed.createComponent(UiSelectedFilterOptionsComponent);
// component = fixture.componentInstance;
// component.value = [];
// fixture.detectChanges();
// });
it('should be created', () => {
expect(component).toBeTruthy();
});
// it('should be created', () => {
// expect(component).toBeTruthy();
// });
describe('#ResetFilters', () => {
let button: HTMLButtonElement;
// describe('#ResetFilters', () => {
// let button: HTMLButtonElement;
beforeEach(() => {
spyOn(component, 'resetFilters').and.callThrough();
component.resetStrategy = 'all';
component.showResetButton = true;
// beforeEach(() => {
// spyOn(component, 'resetFilters').and.callThrough();
// component.resetStrategy = 'all';
// component.showResetButton = true;
button = fixture.debugElement.query(By.css('.isa-btn.isa-btn-primary-link.remove-all')).nativeElement;
// button = fixture.debugElement.query(By.css('.isa-btn.isa-btn-primary-link.remove-all')).nativeElement;
fixture.detectChanges();
});
// fixture.detectChanges();
// });
it('should be shown by default', () => {
expect(button).toBeTruthy();
});
// it('should be shown by default', () => {
// expect(button).toBeTruthy();
// });
it('should not be shwon if showResetButton is false', async () => {
component.showResetButton = false;
fixture.detectChanges();
// it('should not be shwon if showResetButton is false', async () => {
// component.showResetButton = false;
// fixture.detectChanges();
await fixture.whenStable();
// await fixture.whenStable();
const debugButtonEl = fixture.debugElement.query(By.css('.isa-btn.isa-btn-primary-link.remove-all'));
button = debugButtonEl && debugButtonEl.nativeElement;
// const debugButtonEl = fixture.debugElement.query(By.css('.isa-btn.isa-btn-primary-link.remove-all'));
// button = debugButtonEl && debugButtonEl.nativeElement;
expect(button).toBeFalsy();
});
// expect(button).toBeFalsy();
// });
it('should deselect all filters when resetStrategy is all', () => {
spyOn(component, 'deselectAllFilters').and.callThrough();
button.click();
fixture.detectChanges();
// it('should deselect all filters when resetStrategy is all', () => {
// spyOn(component, 'deselectAllFilters').and.callThrough();
// button.click();
// fixture.detectChanges();
expect(component.resetFilters).toHaveBeenCalled();
expect(component.deselectAllFilters).toHaveBeenCalled();
});
// expect(component.resetFilters).toHaveBeenCalled();
// expect(component.deselectAllFilters).toHaveBeenCalled();
// });
it('should revert to the default selection of filters when resetStrategy is default', () => {
spyOn(component, 'resetToDefault').and.callThrough();
component.resetStrategy = 'default';
fixture.detectChanges();
// it('should revert to the default selection of filters when resetStrategy is default', () => {
// spyOn(component, 'resetToDefault').and.callThrough();
// component.resetStrategy = 'default';
// fixture.detectChanges();
button.click();
fixture.detectChanges();
// button.click();
// fixture.detectChanges();
expect(component.resetFilters).toHaveBeenCalled();
expect(component.resetToDefault).toHaveBeenCalled();
});
});
// expect(component.resetFilters).toHaveBeenCalled();
// expect(component.resetToDefault).toHaveBeenCalled();
// });
// });
describe('resetToDefault', () => {
/* let primaryFilters: PrimaryFilterOption[];
let selectFilters: SelectFilter[];
// describe('resetToDefault', () => {
// /* let primaryFilters: PrimaryFilterOption[];
// let selectFilters: SelectFilter[];
beforeEach(() => {
primaryFilters = primaryFiltersMock;
selectFilters = mockFilters;
});
// beforeEach(() => {
// primaryFilters = primaryFiltersMock;
// selectFilters = mockFilters;
// });
it('should reset the filters to its initial state', () => {
selectFilters[0].options[0].selected = true;
selectFilters[0].options[0].initial_selected_state = false;
// it('should reset the filters to its initial state', () => {
// selectFilters[0].options[0].selected = true;
// selectFilters[0].options[0].initial_selected_state = false;
spyOn(component, 'resetToDefault').and.callThrough();
// spyOn(component, 'resetToDefault').and.callThrough();
const result = component.resetToDefault(selectFilters);
// const result = component.resetToDefault(selectFilters);
expect(result[0].options[0].selected).toBe(false);
expect(result[0].options[0].initial_selected_state).toBe(false);
expect(result.length).toEqual(selectFilters.length);
}); */
});
// expect(result[0].options[0].selected).toBe(false);
// expect(result[0].options[0].initial_selected_state).toBe(false);
// expect(result.length).toEqual(selectFilters.length);
// }); */
// });
describe('deselectAllFilters', () => {
// let primaryFilters: PrimaryFilterOption[];
let selectFilters: SelectFilter[];
// describe('deselectAllFilters', () => {
// // let primaryFilters: PrimaryFilterOption[];
// let selectFilters: SelectFilter[];
beforeEach(() => {
// primaryFilters = primaryFiltersMock;
// selectFilters = mockFilters;
});
// beforeEach(() => {
// // primaryFilters = primaryFiltersMock;
// // selectFilters = mockFilters;
// });
it('should deselect all filters', () => {
spyOn(component, 'deselectAllFilters').and.callThrough();
// it('should deselect all filters', () => {
// spyOn(component, 'deselectAllFilters').and.callThrough();
const result = component.deselectAllFilters(selectFilters);
// const result = component.deselectAllFilters(selectFilters);
expect(
result.every((filter) => {
if (filter.options) {
return filter.options.every((o) => !o.selected);
}
// expect(
// result.every((filter) => {
// if (filter.options) {
// return filter.options.every((o) => !o.selected);
// }
return true;
})
);
expect(result.length).toEqual(selectFilters.length);
});
});
});
// return true;
// })
// );
// expect(result.length).toEqual(selectFilters.length);
// });
// });
// });

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# FormControl
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project form-control` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project form-control`.
> Note: Don't forget to add `--project form-control` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build form-control` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build form-control`, go to the dist folder `cd dist/form-control` and run `npm publish`.
## Running unit tests
Run `ng test form-control` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/form-control",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# FormField
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
## Code scaffolding
Run `ng generate component component-name --project form-field` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project form-field`.
> Note: Don't forget to add `--project form-field` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build form-field` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build form-field`, go to the dist folder `cd dist/form-field` and run `npm publish`.
## Running unit tests
Run `ng test form-field` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,25 +0,0 @@
# Icon
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project icon` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project icon`.
> Note: Don't forget to add `--project icon` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build icon` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build icon`, go to the dist folder `cd dist/icon` and run `npm publish`.
## Running unit tests
Run `ng test icon` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/icon",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -1 +0,0 @@
describe();

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Input
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project input` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project input`.
> Note: Don't forget to add `--project input` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build input` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build input`, go to the dist folder `cd dist/input` and run `npm publish`.
## Running unit tests
Run `ng test input` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/input",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Loader
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.4.
## Code scaffolding
Run `ng generate component component-name --project loader` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project loader`.
> Note: Don't forget to add `--project loader` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build loader` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build loader`, go to the dist folder `cd dist/loader` and run `npm publish`.
## Running unit tests
Run `ng test loader` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/loader",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.2.4",
"@angular/core": "^10.2.4"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Modal
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project modal` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project modal`.
> Note: Don't forget to add `--project modal` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build modal` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build modal`, go to the dist folder `cd dist/modal` and run `npm publish`.
## Running unit tests
Run `ng test modal` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/modal",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

7
apps/ui/ng-package.json Normal file
View File

@@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/ui",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,25 +0,0 @@
# Notes
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project notes` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project notes`.
> Note: Don't forget to add `--project notes` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build notes` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build notes`, go to the dist folder `cd dist/notes` and run `npm publish`.
## Running unit tests
Run `ng test notes` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/notes",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -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",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -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"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"ui",
"camelCase"
],
"component-selector": [
true,
"element",
"ui",
"kebab-case"
]
}
}

View File

@@ -1,9 +1,9 @@
{
"name": "@ui/form-field",
"name": "ui",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^12.2.0",
"@angular/core": "^12.2.0"
"@angular/common": "^15.0.0",
"@angular/core": "^15.0.0"
},
"dependencies": {
"tslib": "^2.3.0"

View File

@@ -1,25 +0,0 @@
# Progress
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project progress` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project progress`.
> Note: Don't forget to add `--project progress` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build progress` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build progress`, go to the dist folder `cd dist/progress` and run `npm publish`.
## Running unit tests
Run `ng test progress` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,11 +0,0 @@
{
"name": "@ui/progress",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

Some files were not shown because too many files have changed in this diff Show More