-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from casejs/feature/improvements
Improvements before launch
- Loading branch information
Showing
27 changed files
with
227 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] | ||
} |
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
Empty file.
23 changes: 23 additions & 0 deletions
23
packages/case/client/src/app/inputs/url-input/url-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 { UrlInputComponent } from './url-input.component'; | ||
|
||
describe('UrlInputComponent', () => { | ||
let component: UrlInputComponent; | ||
let fixture: ComponentFixture<UrlInputComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ UrlInputComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(UrlInputComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
42 changes: 42 additions & 0 deletions
42
packages/case/client/src/app/inputs/url-input/url-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,42 @@ | ||
import { | ||
Component, | ||
ElementRef, | ||
EventEmitter, | ||
Input, | ||
OnInit, | ||
Output, | ||
ViewChild | ||
} from '@angular/core' | ||
|
||
import { PropertyDescription } from '../../../../../shared/interfaces/property-description.interface' | ||
|
||
@Component({ | ||
selector: 'app-url-input', | ||
standalone: true, | ||
template: `<label [for]="prop.propName">{{ prop.label }}</label> | ||
<input | ||
class="input form-control" | ||
type="url" | ||
placeholder="https://example.com" | ||
(change)="onChange($event)" | ||
#input | ||
/>`, | ||
styleUrls: ['./url-input.component.scss'] | ||
}) | ||
export class UrlInputComponent implements OnInit { | ||
@Input() prop: PropertyDescription | ||
@Input() value: string | ||
|
||
@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/case/client/src/app/yields/currency-yield/currency-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
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
9 changes: 7 additions & 2 deletions
9
packages/case/client/src/app/yields/image-yield/image-yield.component.scss
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
img { | ||
height: 36px; | ||
width: 36px; | ||
&:not(.is-large) { | ||
height: 36px; | ||
width: 36px; | ||
} | ||
&.is-large { | ||
width: 800px; | ||
} | ||
} |
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
Empty file.
23 changes: 23 additions & 0 deletions
23
packages/case/client/src/app/yields/link-yield/link-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 { LinkYieldComponent } from './link-yield.component'; | ||
|
||
describe('LinkYieldComponent', () => { | ||
let component: LinkYieldComponent; | ||
let fixture: ComponentFixture<LinkYieldComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ LinkYieldComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(LinkYieldComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
packages/case/client/src/app/yields/link-yield/link-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,20 @@ | ||
import { NgIf } from '@angular/common' | ||
import { Component, Input } from '@angular/core' | ||
import { TruncatePipe } from '../../pipes/truncate.pipe' | ||
|
||
@Component({ | ||
selector: 'app-link-yield', | ||
standalone: true, | ||
imports: [NgIf, TruncatePipe], | ||
template: ` <a [href]="value" target="_blank"> | ||
<i class="icon icon-external-link mr-1"></i> | ||
<span *ngIf="compact">{{ value | truncate : 44 }}</span> | ||
<span *ngIf="!compact">{{ value }}</span> | ||
</a> | ||
<span class="is-nowrap" *ngIf="!value"> - </span>`, | ||
styleUrls: ['./link-yield.component.scss'] | ||
}) | ||
export class LinkYieldComponent { | ||
@Input() value: string | ||
@Input() compact: boolean = true | ||
} |
Oops, something went wrong.