Skip to content

Commit

Permalink
update with Sayan changes from #1920
Browse files Browse the repository at this point in the history
  • Loading branch information
dkent600 committed May 22, 2024
1 parent 1a5de33 commit fb3c171
Show file tree
Hide file tree
Showing 17 changed files with 451 additions and 202 deletions.
494 changes: 384 additions & 110 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@
"serve-static": "^1.15.0",
"socket.io": "^4.5.4",
"tslib": "^2.4.1",
"typescript": "5.4.2",
"vite": "^4.3.9",
"vite-plugin-sass-glob-import": "^2.0.0"
"typescript": "5.4.5",
"vite": "5.2.11",
"vite-plugin-sass-glob-import": "3.0.2"
},
"overrides": {
"esbuild": "^0.21.3",
"chokidar": "^3.5.3",
"glob-stream": "^7.0.0",
"glob-parent": "^6.0.2",
Expand Down
7 changes: 4 additions & 3 deletions src/pages/resume/resume.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { customElement, IContainer } from "aurelia";
import { customElement, IContainer, resolve } from "aurelia";
import { IRouteViewModel, NavigationInstruction, Params, RouteNode } from "@aurelia/router-lite";

import { IBasics, IResumeStore } from "../../stores/resume-store";
Expand All @@ -17,17 +17,18 @@ export class ResumeDependencies {

@customElement({ name: "resume", template })
export class Resume implements IRouteViewModel {
readonly resumeStore = resolve(IResumeStore);
/**
* given the name or alias of a skill, return the skill json
*/
basics!: IBasics;
readonly basics: IBasics = this.resumeStore.basics;
/**
* used by CSS
*/
isShort = false;
expanded = false;

constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
constructor() {
this.basics = this.resumeStore.basics;
}

Expand Down
8 changes: 3 additions & 5 deletions src/pages/resume/sections/accomplishments/accomplishments.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { customElement } from "aurelia";
import { customElement, resolve } from "aurelia";

import { IAccomplishment, IResumeStore } from "../../../../stores/resume-store";

import template from "./accomplishments.html";
@customElement({ name: "accomplishments", template })
export class Accomplishments {
accomplishments!: Array<IAccomplishment>;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.accomplishments = this.resumeStore.accomplishments;
}
readonly resumeStore = resolve(IResumeStore);
readonly accomplishments: Array<IAccomplishment> = this.resumeStore.accomplishments;
}
8 changes: 3 additions & 5 deletions src/pages/resume/sections/citizenship/citizenship.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { customElement } from "aurelia";
import { customElement, resolve } from "aurelia";

import { ICitizenship, IResumeStore } from "../../../../stores/resume-store";

import template from "./citizenship.html";

@customElement({ name: "citizenship", template })
export class Citizenship {
citizenship!: Array<ICitizenship>;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.citizenship = this.resumeStore.citizenship;
}
readonly resumeStore = resolve(IResumeStore);
readonly citizenship: Array<ICitizenship> = this.resumeStore.citizenship;
}
11 changes: 4 additions & 7 deletions src/pages/resume/sections/contact/contact.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bindable, customElement } from "aurelia";
import { bindable, customElement, resolve } from "aurelia";

import { IBasics, IProfile, IResumeStore } from "../../../../stores/resume-store";

Expand All @@ -7,10 +7,7 @@ import template from "./contact.html";
@customElement({ name: "contact", template })
export class Contact {
@bindable inline = false;
basics!: IBasics;
profiles!: Array<IProfile>;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.basics = this.resumeStore.basics;
this.profiles = this.resumeStore.profiles;
}
readonly resumeStore = resolve(IResumeStore);
readonly basics: IBasics = this.resumeStore.basics;
readonly profiles: Array<IProfile> = this.resumeStore.profiles;
}
12 changes: 5 additions & 7 deletions src/pages/resume/sections/education/education.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bindable, customElement } from "aurelia";
import { bindable, customElement, resolve } from "aurelia";

import { evaluateDateTime } from "../../../../services/utils";
import { IResumeStore, ISchool } from "../../../../stores/resume-store";
Expand All @@ -7,10 +7,8 @@ import template from "./education.html";

@customElement({ name: "education", template })
export class Education {
schools!: Array<ISchool>;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.schools = this.resumeStore.schools.sort((a, b) => {
return evaluateDateTime(a.startDate, b.startDate, -1);
});
}
readonly resumeStore = resolve(IResumeStore);
readonly schools: Array<ISchool> = this.resumeStore.schools.sort((a, b) => {
return evaluateDateTime(a.startDate, b.startDate, -1);
});
}
30 changes: 14 additions & 16 deletions src/pages/resume/sections/history/history.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
import { bindable, customElement } from "aurelia";
import { bindable, customElement, resolve } from "aurelia";

import { ICompany, IResumeStore, ISkill } from "../../../../stores/resume-store";

import template from "./history.html";

@customElement({ name: "history", template })
export class History {
companies!: Array<ICompany>;
@bindable expanded = false;
showingEntireHistory = false;
entireHistoryStartIndex = 3;
skillByName!: Map<string, ISkill>;
@bindable expanded = false;

constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.companies = this.resumeStore.companies
readonly skillByName: Map<string, ISkill>= new Map<string, ISkill>();
readonly resumeStore = resolve(IResumeStore);
readonly companies: Array<ICompany> = this.resumeStore.companies
// .sort((a, b) => {
// return evaluateDateTime(a.endDate, b.endDate, -1);
// })
.map((s, _index) => {
s.showingHighlights = false;
return s;
});
this.skillByName = new Map<string, ISkill>();
/**
// return evaluateDateTime(a.endDate, b.endDate, -1);
// })
.map((s, _index) => {
s.showingHighlights = false;
return s;
});

constructor() {
/**
* Key the skill element by its lowercase name and all its aliases.
* If there is a circular reference here between
* name and the alias, then what ever is the last one encountered
Expand Down
9 changes: 5 additions & 4 deletions src/pages/resume/sections/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
export * from "./accomplishments/accomplishments";
export * from "./contact/contact";
export * from "./education/education";
export * from "./history/history";
export * from "./introduction/introduction";
export * from "./languages/languages";
export * from "./publications/publications";
export * from "./reasons/reasons";
export * from "./testimonials/testimonials";
export * from "./accomplishments/accomplishments";
export * from "./skills/skills";
export * from "./history/history";
export * from "./education/education";
export * from "./publications/publications";
export * from "./toc/toc";
export * from "./travel/travel";
9 changes: 4 additions & 5 deletions src/pages/resume/sections/introduction/introduction.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { bindable, customElement } from "aurelia";
import { customElement, resolve } from "aurelia";

import { IBasics, IResumeStore } from "../../../../stores/resume-store";

import template from "./introduction.html";

@customElement({ name: "introduction", template })
export class Introduction {
basics!: IBasics;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.basics = this.resumeStore.basics;
}
readonly resumeStore = resolve(IResumeStore);
readonly basics:IBasics = this.resumeStore.basics;
}
8 changes: 3 additions & 5 deletions src/pages/resume/sections/languages/languages.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { customElement } from "aurelia";
import { customElement, resolve } from "aurelia";

import { ILanguage, IResumeStore } from "../../../../stores/resume-store";

import template from "./languages.html";

@customElement({ name: "languages", template })
export class Languages {
languages!: Array<ILanguage>;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.languages = this.resumeStore.languages;
}
readonly resumeStore = resolve(IResumeStore);
readonly languages:Array<ILanguage> = this.resumeStore.languages;
}
9 changes: 3 additions & 6 deletions src/pages/resume/sections/publications/publications.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { bindable, customElement } from "aurelia";
import { bindable, customElement, resolve } from "aurelia";

import { IPublication, IResumeStore } from "../../../../stores/resume-store";

import template from "./publications.html";

@customElement({ name: "publications", template })
export class Publications {
publications!: Array<IPublication>;
showingPublications = false;
@bindable expanded = false;

constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.publications = this.resumeStore.publications;
}
readonly resumeStore = resolve(IResumeStore);
readonly publications: Array<IPublication> = this.resumeStore.publications;

binding() {
this.showingPublications = this.expanded;
Expand Down
8 changes: 3 additions & 5 deletions src/pages/resume/sections/reasons/reasons.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { customElement } from "aurelia";
import { customElement, resolve } from "aurelia";

import { IQuality, IResumeStore } from "../../../../stores/resume-store";

import template from "./reasons.html";

@customElement({ name: "reasons", template })
export class Reasons {
qualities!: Array<IQuality>;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.qualities = this.resumeStore.qualities;
}
readonly resumeStore = resolve(IResumeStore);
readonly qualities: Array<IQuality> = this.resumeStore.qualities;
}
9 changes: 3 additions & 6 deletions src/pages/resume/sections/skills/skills.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bindable, customElement } from "aurelia";
import { bindable, customElement, resolve } from "aurelia";

import { ICategory, IResumeStore, ISkill } from "../../../../stores/resume-store";

Expand All @@ -10,13 +10,10 @@ export class Skills {
* Map a category of skills to a set of skill names.
*/
categoryToSkills = new Map<string, Set<ISkill>>();
skillCategories!: Array<ICategory>;
@bindable expanded = false;
showSkillCategories = false;

constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.skillCategories = this.resumeStore.skillCategories;
}
readonly resumeStore = resolve(IResumeStore);
readonly skillCategories: Array<ICategory> = this.resumeStore.skillCategories;

binding() {
this.showSkillCategories = this.expanded;
Expand Down
8 changes: 3 additions & 5 deletions src/pages/resume/sections/testimonials/testimonials.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { bindable, customElement } from "aurelia";
import { bindable, customElement, resolve } from "aurelia";

import { IResumeStore, ITestimonial } from "../../../../stores/resume-store";

import template from "./testimonials.html";

@customElement({ name: "testimonials", template })
export class Testimonials {
testimonials!: Array<ITestimonial>;
@bindable justOne = false;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.testimonials = this.resumeStore.testimonials;
}
readonly resumeStore = resolve(IResumeStore);
readonly testimonials: Array<ITestimonial> = this.resumeStore.testimonials;
}
14 changes: 5 additions & 9 deletions src/pages/resume/sections/travel/travel.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { bindable, customElement } from "aurelia";
import { bindable, customElement, resolve } from "aurelia";

import { IBasics, ICitizenship, ILanguage, IResumeStore } from "../../../../stores/resume-store";

import template from "./travel.html";

@customElement({ name: "travel", template })
export class Travel {
citizenship!: Array<ICitizenship>;
basics!: IBasics;
languages!: Array<ILanguage>;
constructor(@IResumeStore private readonly resumeStore: IResumeStore) {
this.citizenship = this.resumeStore.citizenship;
this.languages = this.resumeStore.languages;
this.basics = this.resumeStore.basics;
}
readonly resumeStore = resolve(IResumeStore);
readonly languages: Array<ILanguage> = this.resumeStore.languages;
readonly basics: IBasics = this.resumeStore.basics;
readonly citizenship: Array<ICitizenship> = this.resumeStore.citizenship;
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"noEmit": true,
"strict": true,
"module": "esnext",
"module": "es2022",
"moduleResolution": "node",
"skipLibCheck": true,
"target": "es2022",
Expand Down

0 comments on commit fb3c171

Please sign in to comment.