-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/4.0.0-alpha.4'
- Loading branch information
Showing
49 changed files
with
2,933 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
"metas", | ||
"mnfst", | ||
"nestjs", | ||
"openapi", | ||
"typeorm", | ||
"uniqid" | ||
], | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ore/admin/src/app/modules/shared/inputs/timestamp-input/timestamp-input.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TimestampInputComponent } from './timestamp-input.component'; | ||
|
||
describe('TimestampInputComponent', () => { | ||
let component: TimestampInputComponent; | ||
let fixture: ComponentFixture<TimestampInputComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [TimestampInputComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(TimestampInputComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
44 changes: 44 additions & 0 deletions
44
...ges/core/admin/src/app/modules/shared/inputs/timestamp-input/timestamp-input.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { NgClass } from '@angular/common' | ||
import { | ||
Component, | ||
ElementRef, | ||
EventEmitter, | ||
Input, | ||
Output, | ||
ViewChild | ||
} from '@angular/core' | ||
import { PropertyManifest } from '@mnfst/types' | ||
|
||
@Component({ | ||
selector: 'app-timestamp-input', | ||
standalone: true, | ||
imports: [NgClass], | ||
template: `<label [for]="prop.name">{{ prop.name }}</label> | ||
<input | ||
class="input" | ||
[ngClass]="{ 'is-danger': isError }" | ||
type="datetime-local" | ||
[value]="value" | ||
(change)="onChange($event)" | ||
#input | ||
/>` | ||
}) | ||
export class TimestampInputComponent { | ||
@Input() prop: PropertyManifest | ||
@Input() value: string | ||
@Input() isError: boolean | ||
|
||
@Output() valueChanged: EventEmitter<number> = new EventEmitter() | ||
|
||
@ViewChild('input', { static: true }) input: ElementRef | ||
|
||
ngOnInit(): void { | ||
if (this.value !== undefined) { | ||
this.input.nativeElement.value = this.value | ||
} | ||
} | ||
|
||
onChange(event: any) { | ||
this.valueChanged.emit(event.target.value) | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
packages/core/admin/src/app/modules/shared/yields/date-yield/date-yield.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ore/admin/src/app/modules/shared/yields/timestamp-yield/timestamp-yield.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TimestampYieldComponent } from './timestamp-yield.component'; | ||
|
||
describe('TimestampYieldComponent', () => { | ||
let component: TimestampYieldComponent; | ||
let fixture: ComponentFixture<TimestampYieldComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [TimestampYieldComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(TimestampYieldComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
14 changes: 14 additions & 0 deletions
14
...ges/core/admin/src/app/modules/shared/yields/timestamp-yield/timestamp-yield.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { DatePipe } from '@angular/common' | ||
import { Component, Input } from '@angular/core' | ||
|
||
@Component({ | ||
selector: 'app-timestamp-yield', | ||
standalone: true, | ||
imports: [DatePipe], | ||
template: `<span class="is-nowrap">{{ | ||
value | date : 'yyyy-MM-dd HH:mm:ss' | ||
}}</span>` | ||
}) | ||
export class TimestampYieldComponent { | ||
@Input() value: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.