Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions .eslintrc.json

This file was deleted.

14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"cSpell.words": [
"Formly",
"stylelint"
],
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.enable": true,
"stylelint.validate": [
"css",
"scss"
],
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": "explicit",
"source.fixAll.eslint": "explicit"
}
},
"files.autoSaveDelay": 500
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Visit components demo application. [Website](https://entry-demo.enigmatry.com/)
|17.x| = 17
|18.x| = 18
|19.x| = 19
|20.x| = 20

## Migrate project to entry

Expand Down
33 changes: 0 additions & 33 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@
}
},
"defaultConfiguration": "production"
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"libs/entry-form/**/*.ts",
"libs/entry-form/**/*.html"
]
}
}
}
},
Expand All @@ -55,15 +46,6 @@
}
},
"defaultConfiguration": "production"
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"libs/entry-components/**/*.ts",
"libs/entry-components/**/*.html"
]
}
}
}
},
Expand Down Expand Up @@ -169,23 +151,8 @@
"options": {
"buildTarget": "@enigmatry/demo-app:build"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"apps/demo-app/**/*.ts",
"apps/demo-app/**/*.html"
]
}
}
}
}
},
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
],
"analytics": false
}
}
45 changes: 0 additions & 45 deletions apps/demo-app/.eslintrc.json

This file was deleted.

11 changes: 11 additions & 0 deletions apps/demo-app/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import defaultEnigmatryConfiguration from '../../libs/eslint-config/index.js';

export default [
...defaultEnigmatryConfiguration,
{
files: ['src/**/*.ts'],
rules: {
'@angular-eslint/prefer-standalone': 'off' // TODO: Remove when we get rid of Formly
}
}
];
5 changes: 3 additions & 2 deletions apps/demo-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable max-len */

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { RouteSegments } from './features/route-segments';
Expand Down Expand Up @@ -51,7 +51,8 @@ const routes: Routes = [
},
{
path: RouteSegments.dateTimePicker,
loadComponent: () => import('./features/date-time-picker/date-time-picker-documentation.component').then(m => m.DateTimePickerDocumentationComponent)
loadComponent: () => import('./features/date-time-picker/date-time-picker-documentation.component')
.then(m => m.DateTimePickerDocumentationComponent)
}
];

Expand Down
7 changes: 3 additions & 4 deletions apps/demo-app/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { IComponentDefinition, COMPONENT_DEFINITIONS } from './features/component-definitions';
import { Component, inject, OnInit } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { filter } from 'rxjs/operators';
import { IComponentDefinition, COMPONENT_DEFINITIONS } from './features/component-definitions';

@Component({
selector: 'app-root',
Expand All @@ -12,8 +12,7 @@ import { filter } from 'rxjs/operators';
export class AppComponent implements OnInit {
menuItems = COMPONENT_DEFINITIONS;
selectedMenuItem: IComponentDefinition | undefined = undefined;

constructor(private router: Router) { }
private readonly router: Router = inject(Router);

ngOnInit(): void {
this.router.events
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { provideHttpClient } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { provideHttpClient } from '@angular/common/http';

import { EntryCommonModule } from '@enigmatry/entry-components/common';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
import { EntryCommonModule } from '@enigmatry/entry-components/common';


@NgModule({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ButtonExampleComponent } from './button-example/button-example.component';
import { SharedModule } from '../../shared/shared.module';
import { NgModule } from '@angular/core';
import { EntryButtonModule, provideEntryButtonConfig } from '@enigmatry/entry-components/button';
import { SharedModule } from '../../shared/shared.module';
import { ButtonExampleComponent } from './button-example/button-example.component';

@NgModule({
declarations: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { EventPluginExampleComponent } from './event-plugin-example/event-plugin-example.component';
import { MatInputModule } from '@angular/material/input';
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatButtonModule } from '@angular/material/button';
import { MatInputModule } from '@angular/material/input';
import { SharedModule } from '../../shared/shared.module';
import { AutoDisableButtonExampleComponent } from './directives/auto-disable-button-example/auto-disable-button-example.component';
import { EventPluginExampleComponent } from './event-plugin-example/event-plugin-example.component';

@NgModule({
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Component, ElementRef, ViewChild } from '@angular/core';
standalone: false
})
export class EventPluginExampleComponent {

@ViewChild('events', { static: true }) events: ElementRef<HTMLTextAreaElement>;

log(eventName: string) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { EntryDateTimePickerModule } from "@enigmatry/entry-components/date-time-picker";
import { MinMaxComponent } from './min-max/min-max.component';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { DateFnsAdapter, MAT_DATE_FNS_FORMATS } from '@angular/material-date-fns-adapter';
import { provideEntryNativeTimeAdapter } from '@enigmatry/entry-components/common';
import { EntryDateTimePickerModule } from '@enigmatry/entry-components/date-time-picker';
import { provideEntryValidationConfig } from '@enigmatry/entry-components/validation';
import { BasicComponent } from './basic/basic.component';
import { DefaultTimeComponent } from './default-time/default-time.component';
import { DisableComponent } from './disable/disable.component';
import { MeridiemComponent } from './meridiem/meridiem.component';
import { provideEntryNativeTimeAdapter } from "@enigmatry/entry-components/common";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { DateFnsAdapter, MAT_DATE_FNS_FORMATS } from "@angular/material-date-fns-adapter";
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from "@angular/material/core";
import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatDatepickerModule } from "@angular/material/datepicker";
import { MatFormFieldModule } from "@angular/material/form-field";
import { MatInputModule } from "@angular/material/input";
import { provideEntryValidationConfig } from "@enigmatry/entry-components/validation";
import { MinMaxComponent } from './min-max/min-max.component';
import { SecondsComponent } from './seconds/seconds.component';
import { DefaultTimeComponent } from './default-time/default-time.component';
import { WithValidationComponent } from "./with-validation/with-validation.component";
import { WithValidationComponent } from './with-validation/with-validation.component';

@NgModule({
declarations: [
Expand Down Expand Up @@ -55,17 +55,17 @@ import { WithValidationComponent } from "./with-validation/with-validation.compo
{
provide: DateAdapter,
useClass: DateFnsAdapter,
deps: [MAT_DATE_LOCALE],
deps: [MAT_DATE_LOCALE]
},
provideEntryNativeTimeAdapter({
parse: {
dateInput: ['dd-MM-yyyy', 'dd-MM-yyyy HH', 'dd-MM-yyyy HH:mm'],
dateInput: ['dd-MM-yyyy', 'dd-MM-yyyy HH', 'dd-MM-yyyy HH:mm']
},
display: {
dateInput: 'dd-MM-yyyy HH:mm',
monthYearLabel: 'LLL uuuu',
dateA11yLabel: 'PP',
monthYearA11yLabel: 'LLLL uuuu',
monthYearA11yLabel: 'LLLL uuuu'
}
}),
provideEntryValidationConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ import { FormControl } from '@angular/forms';
})
export class DefaultTimeComponent {
dateTime = new FormControl();
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
defaultTime = new Date(0, 0, 0, 12, 0, 0);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { provideEntryNativeTimeAdapter } from '@enigmatry/entry-components';
providers: [
provideEntryNativeTimeAdapter({
parse: {
dateInput: ['dd-MM-yyyy', 'dd-MM-yyyy HH', 'dd-MM-yyyy hh:mm aaa'],
dateInput: ['dd-MM-yyyy', 'dd-MM-yyyy HH', 'dd-MM-yyyy hh:mm aaa']
},
display: {
dateInput: 'dd-MM-yyyy hh:mm aaa',
monthYearLabel: 'LLL uuuu',
dateA11yLabel: 'PP',
monthYearA11yLabel: 'LLLL uuuu',
monthYearA11yLabel: 'LLLL uuuu'
}
})
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { FormControl } from '@angular/forms';
standalone: false
})
export class MinMaxComponent {
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
tenDays = 10 * 24 * 60 * 60 * 1000;
minDate = new Date(new Date().getTime() - this.tenDays);
maxDate = new Date(new Date().getTime() + this.tenDays);
Expand Down
Loading
Loading