-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
214 additions
and
1 deletion.
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
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
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
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
94 changes: 94 additions & 0 deletions
94
libs/features/quest/src/quest-template-locale/quest-template-locale.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,94 @@ | ||
<keira-top-bar [selected]="handlerService.selected" [selectedName]="handlerService.selectedName" [isNew]="handlerService.isNew" /> | ||
|
||
<div class="container-fluid editor-with-preview" [class.show-preview]="questPreviewService.showPreview"> | ||
@if (editorService.loading) { | ||
<span [translate]="'LOADING'"></span> | ||
} | ||
|
||
@if (editorService.form && !!editorService.loadedEntityId && !editorService.loading) { | ||
<div> | ||
<div class="content-block"> | ||
<keira-query-output [docUrl]="docUrl" [editorService]="editorService" (executeQuery)="save($event)" /> | ||
</div> | ||
<div class="content-block"> | ||
<form [formGroup]="editorService.form" class="form-group edit-form"> | ||
<div class="row"> | ||
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4"> | ||
<label class="control-label" for="id">ID</label> | ||
<i class="fas fa-info-circle ms-1" placement="auto" [tooltip]="'UNIQUE_ID' | translate: { ENTITY: 'quest' }"></i> | ||
<input [formControlName]="'ID'" id="id" type="number" class="form-control form-control-sm" /> | ||
</div> | ||
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4"> | ||
<label class="control-label" for="id">Title</label> | ||
<i class="fas fa-info-circle ms-1" placement="auto" [tooltip]="'QUEST.TEMPLATE.LOG_TITLE' | translate"></i> | ||
<input [formControlName]="'Title'" id="title" class="form-control form-control-sm" /> | ||
</div> | ||
<div class="form-group col-12 col-sm-12 col-md-8 col-lg-9 col-xl-12"> | ||
<label class="control-label" for="id">Details</label> | ||
<textarea [formControlName]="'Details'" id="details" class="form-control form-control-sm"></textarea> | ||
</div> | ||
<div class="form-group col-12 col-sm-12 col-md-8 col-lg-9 col-xl-12"> | ||
<label class="control-label" for="id">Objectives</label> | ||
<textarea [formControlName]="'Objectives'" id="objectives" class="form-control form-control-sm"></textarea> | ||
</div> | ||
<div class="form-group col-12 col-sm-12 col-md-8 col-lg-9 col-xl-12"> | ||
<label class="control-label" for="id">EndText</label> | ||
<textarea [formControlName]="'EndText'" id="end-text" class="form-control form-control-sm"></textarea> | ||
</div> | ||
<div class="form-group col-12 col-sm-12 col-md-8 col-lg-9 col-xl-12"> | ||
<label class="control-label" for="id">CompletedText</label> | ||
<textarea [formControlName]="'CompletedText'" id="completed-text" class="form-control form-control-sm"></textarea> | ||
</div> | ||
<div class="form-group col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6"> | ||
<label class="control-label" for="id">ObjectiveText1</label> | ||
<input [formControlName]="'ObjectiveText1'" id="objective-text-1" class="form-control form-control-sm" /> | ||
</div> | ||
<div class="form-group col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6"> | ||
<label class="control-label" for="id">ObjectiveText2</label> | ||
<input [formControlName]="'ObjectiveText2'" id="objective-text-2" class="form-control form-control-sm" /> | ||
</div> | ||
<div class="form-group col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6"> | ||
<label class="control-label" for="id">ObjectiveText3</label> | ||
<input [formControlName]="'ObjectiveText3'" id="objective-text-3" class="form-control form-control-sm" /> | ||
</div> | ||
<div class="form-group col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6"> | ||
<label class="control-label" for="id">ObjectiveText4</label> | ||
<input [formControlName]="'ObjectiveText4'" id="objective-text-4" class="form-control form-control-sm" /> | ||
</div> | ||
<div class="col-12 form-error" [hidden]="editorService.isFormIdUnique()"> | ||
<i class="fas fa-exclamation-triangle"></i> | ||
<span [innerHTML]="'UNIQUE' | translate: { ENTITY_SECOND_ID_FIELD: editorService.entitySecondIdField }"></span> | ||
</div> | ||
</div> | ||
</form> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<keira-editor-buttons [editorService]="editorService" /> | ||
<ngx-datatable | ||
id="editor-table" | ||
class="bootstrap table table-striped text-center datatable-select" | ||
[rows]="editorService.newRows" | ||
[headerHeight]="DTCFG.headerHeight" | ||
[footerHeight]="DTCFG.footerHeight" | ||
[columnMode]="DTCFG.columnMode" | ||
[rowHeight]="DTCFG.rowHeight" | ||
[selectionType]="DTCFG.selectionType" | ||
(select)="editorService.onRowSelection($event)" | ||
(keydown.delete)="editorService.deleteSelectedRow()" | ||
> | ||
<ngx-datatable-column [minWidth]="30" [maxWidth]="30" [sortable]="false"> | ||
<ng-template let-row="row" ngx-datatable-cell-template> | ||
<i [hidden]="!editorService.isRowSelected(row)" class="fas fa-chevron-right"></i> | ||
</ng-template> | ||
</ngx-datatable-column> | ||
<ngx-datatable-column name="Id" prop="ID" [minWidth]="80" [maxWidth]="150"></ngx-datatable-column> | ||
<ngx-datatable-column name="Locale" prop="locale" [minWidth]="200"></ngx-datatable-column> | ||
<ngx-datatable-column name="Title" prop="Title" [minWidth]="200"></ngx-datatable-column> | ||
</ngx-datatable> | ||
</div> | ||
</div> | ||
</div> | ||
<keira-quest-preview /> | ||
</div> | ||
} | ||
</div> |
Empty file.
45 changes: 45 additions & 0 deletions
45
libs/features/quest/src/quest-template-locale/quest-template-locale.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,45 @@ | ||
import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; | ||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | ||
import { EMOTE, QuestTemplateLocale } from '@keira/shared/acore-world-model'; | ||
import { MultiRowEditorComponent } from '@keira/shared/base-abstract-classes'; | ||
import { EditorButtonsComponent, QueryOutputComponent, TopBarComponent } from '@keira/shared/base-editor-components'; | ||
import { GameobjectSelectorBtnComponent, SingleValueSelectorBtnComponent } from '@keira/shared/selectors'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { TooltipModule } from 'ngx-bootstrap/tooltip'; | ||
import { QuestHandlerService } from '../quest-handler.service'; | ||
import { QuestPreviewComponent } from '../quest-preview/quest-preview.component'; | ||
import { QuestPreviewService } from '../quest-preview/quest-preview.service'; | ||
import { QuestTemplateLocaleService } from './quest-template-locale.service'; | ||
import { Model3DViewerComponent } from '@keira/shared/model-3d-viewer'; | ||
import { AsyncPipe } from '@angular/common'; | ||
import { NgxDatatableModule } from '@siemens/ngx-datatable'; | ||
|
||
@Component({ | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
selector: 'keira-quest-template-locale', | ||
templateUrl: './quest-template-locale.component.html', | ||
styleUrls: ['./quest-template-locale.component.scss'], | ||
standalone: true, | ||
imports: [ | ||
TopBarComponent, | ||
TranslateModule, | ||
QueryOutputComponent, | ||
FormsModule, | ||
ReactiveFormsModule, | ||
TooltipModule, | ||
SingleValueSelectorBtnComponent, | ||
QuestPreviewComponent, | ||
Model3DViewerComponent, | ||
GameobjectSelectorBtnComponent, | ||
AsyncPipe, | ||
EditorButtonsComponent, | ||
NgxDatatableModule, | ||
], | ||
}) | ||
export class QuestTemplateLocaleComponent extends MultiRowEditorComponent<QuestTemplateLocale> { | ||
readonly EMOTE = EMOTE; | ||
|
||
protected override readonly editorService = inject(QuestTemplateLocaleService); | ||
readonly handlerService = inject(QuestHandlerService); | ||
readonly questPreviewService = inject(QuestPreviewService); | ||
} |
19 changes: 19 additions & 0 deletions
19
libs/features/quest/src/quest-template-locale/quest-template-locale.service.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,19 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { MultiRowEditorService } from '@keira/shared/base-abstract-classes'; | ||
import { | ||
QUEST_TEMPLATE_LOCALE_ID, | ||
QUEST_TEMPLATE_LOCALE_ID_2, | ||
QUEST_TEMPLATE_LOCALE_TABLE, | ||
QuestTemplateLocale, | ||
} from '@keira/shared/acore-world-model'; | ||
import { QuestHandlerService } from '../quest-handler.service'; | ||
|
||
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class QuestTemplateLocaleService extends MultiRowEditorService<QuestTemplateLocale> { | ||
/* istanbul ignore next */ // because of: https://github.com/gotwarlost/istanbul/issues/690 | ||
constructor(protected override readonly handlerService: QuestHandlerService) { | ||
super(QuestTemplateLocale, QUEST_TEMPLATE_LOCALE_TABLE, QUEST_TEMPLATE_LOCALE_ID, QUEST_TEMPLATE_LOCALE_ID_2, handlerService); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
libs/shared/acore-world-model/src/entities/quest-template-locale.type.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 { TableRow } from '@keira/shared/constants'; | ||
|
||
export const QUEST_TEMPLATE_LOCALE_TABLE = 'quest_template_locale'; | ||
export const QUEST_TEMPLATE_LOCALE_ID = 'ID'; | ||
export const QUEST_TEMPLATE_LOCALE_ID_2 = 'locale'; | ||
|
||
export class QuestTemplateLocale extends TableRow { | ||
ID: number = 0; | ||
locale: string = ''; | ||
Title: string = ''; | ||
Details: string = ''; | ||
Objectives: string = ''; | ||
EndText: string = ''; | ||
CompletedText: string = ''; | ||
ObjectiveText1: string = ''; | ||
ObjectiveText2: string = ''; | ||
ObjectiveText3: string = ''; | ||
ObjectiveText4: string = ''; | ||
VerifiedBuild: number = 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