-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/IDEMSInternational/open-a…
…pp-builder into style/update-comp-styles
- Loading branch information
Showing
35 changed files
with
1,084 additions
and
229 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
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,4 @@ | ||
{ | ||
"name": "components", | ||
"version": "1.0.0" | ||
} |
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,22 +1,19 @@ | ||
import { NgModule, Type } from "@angular/core"; | ||
|
||
import type { ITemplateRowProps } from "src/app/shared/components/template/models"; | ||
import { CommonModule } from "@angular/common"; | ||
import { IonicModule } from "@ionic/angular"; | ||
import { TemplatePipesModule } from "src/app/shared/components/template/pipes"; | ||
import { LottieModule } from "ngx-lottie"; | ||
import { PlhParentPointCounterComponent } from "./parent-point-counter/parent-point-counter.component"; | ||
import { PlhParentPointBoxComponent } from "./parent-point-box/parent-point-box.component"; | ||
import { PlhModuleListItemComponent } from "./plh-kids-kw/components/module-list-item/module-list-item.component"; | ||
|
||
export { PlhParentPointCounterComponent, PlhParentPointBoxComponent, PlhModuleListItemComponent }; | ||
|
||
@NgModule({ | ||
imports: [CommonModule, IonicModule, TemplatePipesModule, LottieModule], | ||
exports: [PlhParentPointCounterComponent, PlhParentPointBoxComponent], | ||
declarations: [PlhParentPointCounterComponent, PlhParentPointBoxComponent], | ||
providers: [], | ||
}) | ||
export class PlhComponentsModule {} | ||
export const PLH_COMPONENTS = [ | ||
PlhParentPointCounterComponent, | ||
PlhParentPointBoxComponent, | ||
PlhModuleListItemComponent, | ||
]; | ||
|
||
export const PLH_COMPONENT_MAPPING: Record<string, Type<ITemplateRowProps>> = { | ||
export const PLH_COMPONENT_MAPPING = { | ||
parent_point_counter: PlhParentPointCounterComponent, | ||
parent_point_box: PlhParentPointBoxComponent, | ||
plh_module_list_item: PlhModuleListItemComponent, | ||
}; | ||
|
||
export type PLHComponentName = keyof typeof PLH_COMPONENT_MAPPING; |
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,6 @@ | ||
import { PLHComponentName } from "."; | ||
import { IComponentManifest } from "../types"; | ||
|
||
export const PLH_COMPONENT_MANIFEST: IComponentManifest<PLHComponentName> = { | ||
parent_point_box: { implicit: ["lottie_animation"] }, | ||
}; |
50 changes: 50 additions & 0 deletions
50
...es/components/plh/plh-kids-kw/components/module-list-item/module-list-item.component.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<div class="module-item" [attr.data-lock]="params.isLocked"> | ||
@if (!params.isLocked) { | ||
<div | ||
class="container" | ||
[attr.data-language-direction]="templateTranslateService.languageDirection()" | ||
(click)="triggerActions('click')" | ||
> | ||
@if (params.moduleImageAsset) { | ||
<div class="module-image"> | ||
<img [src]="params.moduleImageAsset | plhAsset" /> | ||
</div> | ||
} | ||
@if (_row.value) { | ||
<div class="module-title"> | ||
<p [attr.data-variant]="params.textTransform">{{ _row.value }}</p> | ||
</div> | ||
} | ||
@if (params.navImageAsset !== null) { | ||
<div class="nav-icon"> | ||
<img class="icon" [src]="params.navImageAsset | plhAsset" /> | ||
</div> | ||
} @else { | ||
<div class="no-nav"></div> | ||
} | ||
</div> | ||
} @else { | ||
<div | ||
class="container" | ||
[attr.data-language-direction]="templateTranslateService.languageDirection()" | ||
> | ||
@if (params.moduleImageAsset) { | ||
<div class="module-image"> | ||
<img [src]="params.moduleImageAsset | plhAsset" /> | ||
</div> | ||
} | ||
@if (_row.value) { | ||
<div class="module-title"> | ||
<p [attr.data-variant]="params.textTransform">{{ _row.value }}</p> | ||
</div> | ||
} | ||
@if (params.lockedImageAsset !== null) { | ||
<div class="locked"> | ||
<img class="icon" [src]="params.lockedImageAsset | plhAsset" /> | ||
</div> | ||
} @else { | ||
<div class="no-nav"></div> | ||
} | ||
</div> | ||
} | ||
</div> |
Empty file.
24 changes: 24 additions & 0 deletions
24
...components/plh/plh-kids-kw/components/module-list-item/module-list-item.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,24 @@ | ||
import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; | ||
import { IonicModule } from "@ionic/angular"; | ||
|
||
import { PlhModuleListItemComponent } from "./module-list-item.component"; | ||
|
||
describe("ModuleListItemComponent", () => { | ||
let component: PlhModuleListItemComponent; | ||
let fixture: ComponentFixture<PlhModuleListItemComponent>; | ||
|
||
beforeEach(waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [PlhModuleListItemComponent], | ||
imports: [IonicModule.forRoot()], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(PlhModuleListItemComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
})); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.