Skip to content
Merged
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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

26 changes: 0 additions & 26 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ body:
id: other
attributes:
label: Anything else?

- type: dropdown
id: contribute
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/2-feature-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ body:
label: Alternatives considered
validations:
required: true

- type: dropdown
id: contribute
attributes:
Expand All @@ -48,4 +48,4 @@ body:
- 'Yes'
- 'No'
validations:
required: true
required: true
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
fail-fast: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -30,9 +30,9 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '22'
cache: 'npm'

- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: webfactory/ssh-agent@v0.5.3
- uses: actions/checkout@v4
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ testem.log
.DS_Store
Thumbs.db
.angular
.nx/cache
.nx/cache
.nx/workspace-data
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/coverage
/docs/**/*.md

/.nx/cache
/.nx/cache
/.nx/workspace-data
12 changes: 10 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"singleQuote": true
}
"singleQuote": true,
"overrides": [
{
"files": "*.component.html",
"options": {
"parser": "angular"
}
}
]
}
36 changes: 0 additions & 36 deletions apps/ng/.eslintrc.json

This file was deleted.

34 changes: 34 additions & 0 deletions apps/ng/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import baseConfig from '../../eslint.config.mjs';
import nx from '@nx/eslint';

export default [
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'elf',
style: 'camelCase',
},
],

'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'elf',
style: 'kebab-case',
},
],
},
},
{
files: ['**/*.html'],
rules: {},
},
];
7 changes: 4 additions & 3 deletions apps/ng/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "application",
"sourceRoot": "apps/ng/src",
"prefix": "elf",
"tags": [],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
Expand Down Expand Up @@ -62,7 +63,8 @@
"buildTarget": "ng:build:development"
}
},
"defaultConfiguration": "development"
"defaultConfiguration": "development",
"continuous": true
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
Expand All @@ -81,6 +83,5 @@
"jestConfig": "apps/ng/jest.config.ts"
}
}
},
"tags": []
}
}
1 change: 0 additions & 1 deletion apps/ng/src/app/auth/login/login.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ input[type='password'] {
color: #7e3ab7;
opacity: 0.7;
}

61 changes: 32 additions & 29 deletions apps/ng/src/app/contacts/contacts.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,40 @@
<h1 class="d-flex justify-content-center mb-4">Contacts</h1>

@if (contacts$ | async; as contacts) {
<section>
<table class="table table-striped mb-4">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Address</th>
<th scope="col">Email</th>
</tr>
</thead>
<section>
<table class="table table-striped mb-4">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Address</th>
<th scope="col">Email</th>
</tr>
</thead>

<tbody>
@for (contact of contacts; track contact) {
<tr>
<td>{{ contact.name }}</td>
<td>{{ contact.address }}</td>
<td>&#64;{{ contact.email }}</td>
</tr>
}
</tbody>
</table>
<tbody>
@for (contact of contacts; track contact) {
<tr>
<td>{{ contact.name }}</td>
<td>{{ contact.address }}</td>
<td>&#64;{{ contact.email }}</td>
</tr>
}
</tbody>
</table>

@if (paginationData$ | async; as paginationData) {
<ul class="pagination d-flex justify-content-center">
@for (page of paginationData | paginationControls; track page; let i =
$index) {
<li class="page-item page-link" (click)="updateActivePage(i + 1)">
{{ i + 1 }}
</li>
@if (paginationData$ | async; as paginationData) {
<ul class="pagination d-flex justify-content-center">
@for (
page of paginationData | paginationControls;
track page;
let i = $index
) {
<li class="page-item page-link" (click)="updateActivePage(i + 1)">
{{ i + 1 }}
</li>
}
</ul>
}
</ul>
}
</section>
</section>
}
</section>
2 changes: 1 addition & 1 deletion apps/ng/src/app/contacts/contacts.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class ContactsComponent implements OnInit {

constructor(
private service: ContactsService,
private repo: ContactsRepository
private repo: ContactsRepository,
) {}

ngOnInit() {
Expand Down
6 changes: 3 additions & 3 deletions apps/ng/src/app/contacts/state/contacts.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface Contact {
const store = createStore(
{ name: 'contacts' },
withPagination(),
withEntities<Contact>()
withEntities<Contact>(),
);

@Injectable({ providedIn: 'root' })
Expand All @@ -43,8 +43,8 @@ export class ContactsRepository {
updatePaginationData(pagination),
setPage(
page,
data.map((c) => c.id)
)
data.map((c) => c.id),
),
);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/ng/src/app/contacts/state/contacts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class ContactsService {
return timer(300).pipe(
map(() => getData({ page })),
tap((res) => this.repo.addContacts(page, res)),
skipWhilePageExists(this.repo.store, page)
skipWhilePageExists(this.repo.store, page),
);
}
}
33 changes: 16 additions & 17 deletions apps/ng/src/app/gallery/gallery.component.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
<div>
<h1>Artworks:</h1>
@if (items$ | async; as items) {

<div class="gallery-container">
@for (galleryItem of items; track trackByFn($index, galleryItem)) {
<div>
<h2>{{ galleryItem.title }}</h2>
<img [alt]="galleryItem.title" [src]="galleryItem.image" />
@if (!galleryItem.open) {
<div class="pointer" (click)="toggleItemOpen(galleryItem.id)">
click for more details
</div>
} @if (galleryItem.open) {
<div class="pointer" (click)="toggleItemOpen(galleryItem.id)">
{{ galleryItem.description }}
</div>
<div class="gallery-container">
@for (galleryItem of items; track trackByFn($index, galleryItem)) {
<div>
<h2>{{ galleryItem.title }}</h2>
<img [alt]="galleryItem.title" [src]="galleryItem.image" />
@if (!galleryItem.open) {
<div class="pointer" (click)="toggleItemOpen(galleryItem.id)">
click for more details
</div>
}
@if (galleryItem.open) {
<div class="pointer" (click)="toggleItemOpen(galleryItem.id)">
{{ galleryItem.description }}
</div>
}
</div>
}
</div>
}
</div>

}
</div>
2 changes: 1 addition & 1 deletion apps/ng/src/app/gallery/gallery.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class GalleryComponent implements OnInit {

constructor(
private service: GalleryService,
private galleryRepo: GalleryRepository
private galleryRepo: GalleryRepository,
) {}

toggleItemOpen(galleryItemId: number) {
Expand Down
Loading