From a000e2d4f961d9af8ec5d1299a4e2c5c7e5ab5f4 Mon Sep 17 00:00:00 2001 From: Exitare Date: Mon, 6 Jan 2025 05:27:30 -0800 Subject: [PATCH 01/18] ci: fix I18n sync ignoring master branch (#3225) --- .github/workflows/sync_i18n.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync_i18n.yml b/.github/workflows/sync_i18n.yml index f46461d2e9..3cf85041c0 100644 --- a/.github/workflows/sync_i18n.yml +++ b/.github/workflows/sync_i18n.yml @@ -2,11 +2,8 @@ name: Check and Fix Missing Translation Keys on: push: - branches: - - '**' - pull_request: - branches: - - main + branches-ignore: + - master jobs: check-translation-keys: @@ -15,6 +12,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + fetch-depth: 0 # Ensure full Git history is fetched + ref: ${{ github.ref }} # Checkout the branch that triggered the workflow - name: Set up Python uses: actions/setup-python@v4 @@ -35,7 +35,7 @@ jobs: git config user.email "action@github.com" git add apps/keira/src/assets/i18n/*.json git commit -m "Fix missing translation keys" - git push + git push origin HEAD else echo "No missing keys detected." fi From ea4c694cc389dd2b4b9aa4ac1dc1b81fffd6eb07 Mon Sep 17 00:00:00 2001 From: Exitare Date: Mon, 6 Jan 2025 05:32:57 -0800 Subject: [PATCH 02/18] fix(i18n): key for conditions (#3226) --- apps/keira/src/assets/i18n/de.json | 2 +- apps/keira/src/assets/i18n/el.json | 2 +- apps/keira/src/assets/i18n/en.json | 2 +- apps/keira/src/assets/i18n/es.json | 2 +- apps/keira/src/assets/i18n/fr.json | 2 +- apps/keira/src/assets/i18n/it.json | 2 +- apps/keira/src/assets/i18n/ko.json | 2 +- apps/keira/src/assets/i18n/nl.json | 2 +- apps/keira/src/assets/i18n/pl.json | 2 +- apps/keira/src/assets/i18n/pt.json | 2 +- apps/keira/src/assets/i18n/ro.json | 2 +- apps/keira/src/assets/i18n/ru.json | 2 +- apps/keira/src/assets/i18n/sk.json | 2 +- apps/keira/src/assets/i18n/sv.json | 2 +- apps/keira/src/assets/i18n/zh.json | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/keira/src/assets/i18n/de.json b/apps/keira/src/assets/i18n/de.json index 8195cbadd6..e4500ef2e3 100644 --- a/apps/keira/src/assets/i18n/de.json +++ b/apps/keira/src/assets/i18n/de.json @@ -569,7 +569,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Quellgruppe:", - "SOURCE_ENTRY:": "Quelleintrag:", + "SOURCE_ENTRY": "Quelleintrag:", "CREATE_NEW": "Neu erstellen" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/el.json b/apps/keira/src/assets/i18n/el.json index c41afdd39f..3bfad0da05 100644 --- a/apps/keira/src/assets/i18n/el.json +++ b/apps/keira/src/assets/i18n/el.json @@ -570,7 +570,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/en.json b/apps/keira/src/assets/i18n/en.json index ff56377d43..fa09fc1088 100644 --- a/apps/keira/src/assets/i18n/en.json +++ b/apps/keira/src/assets/i18n/en.json @@ -570,7 +570,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/es.json b/apps/keira/src/assets/i18n/es.json index f7e726b039..20af5fd623 100644 --- a/apps/keira/src/assets/i18n/es.json +++ b/apps/keira/src/assets/i18n/es.json @@ -571,7 +571,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Fuente de Grupo:", - "SOURCE_ENTRY:": "Fuente de Entrada:", + "SOURCE_ENTRY": "Fuente de Entrada:", "CREATE_NEW": "Crear nuevo" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/fr.json b/apps/keira/src/assets/i18n/fr.json index 43c7ecf843..f08f8ba760 100644 --- a/apps/keira/src/assets/i18n/fr.json +++ b/apps/keira/src/assets/i18n/fr.json @@ -566,7 +566,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/it.json b/apps/keira/src/assets/i18n/it.json index 2e14240293..b9b3a5125d 100644 --- a/apps/keira/src/assets/i18n/it.json +++ b/apps/keira/src/assets/i18n/it.json @@ -569,7 +569,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/ko.json b/apps/keira/src/assets/i18n/ko.json index c41afdd39f..3bfad0da05 100644 --- a/apps/keira/src/assets/i18n/ko.json +++ b/apps/keira/src/assets/i18n/ko.json @@ -570,7 +570,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/nl.json b/apps/keira/src/assets/i18n/nl.json index c41afdd39f..3bfad0da05 100644 --- a/apps/keira/src/assets/i18n/nl.json +++ b/apps/keira/src/assets/i18n/nl.json @@ -570,7 +570,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/pl.json b/apps/keira/src/assets/i18n/pl.json index c41afdd39f..3bfad0da05 100644 --- a/apps/keira/src/assets/i18n/pl.json +++ b/apps/keira/src/assets/i18n/pl.json @@ -570,7 +570,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/pt.json b/apps/keira/src/assets/i18n/pt.json index b0bc7e616d..2540a929f8 100644 --- a/apps/keira/src/assets/i18n/pt.json +++ b/apps/keira/src/assets/i18n/pt.json @@ -566,7 +566,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Criar nova" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/ro.json b/apps/keira/src/assets/i18n/ro.json index c41afdd39f..3bfad0da05 100644 --- a/apps/keira/src/assets/i18n/ro.json +++ b/apps/keira/src/assets/i18n/ro.json @@ -570,7 +570,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/ru.json b/apps/keira/src/assets/i18n/ru.json index eb74491740..35e3cf7a1f 100644 --- a/apps/keira/src/assets/i18n/ru.json +++ b/apps/keira/src/assets/i18n/ru.json @@ -566,7 +566,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/sk.json b/apps/keira/src/assets/i18n/sk.json index c41afdd39f..3bfad0da05 100644 --- a/apps/keira/src/assets/i18n/sk.json +++ b/apps/keira/src/assets/i18n/sk.json @@ -570,7 +570,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/sv.json b/apps/keira/src/assets/i18n/sv.json index 17544e8f84..9b25fb4acb 100644 --- a/apps/keira/src/assets/i18n/sv.json +++ b/apps/keira/src/assets/i18n/sv.json @@ -566,7 +566,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "Source Group:", - "SOURCE_ENTRY:": "Source Entry:", + "SOURCE_ENTRY": "Source Entry:", "CREATE_NEW": "Create new" }, "EDITOR": { diff --git a/apps/keira/src/assets/i18n/zh.json b/apps/keira/src/assets/i18n/zh.json index d413c4c4da..ef3a6da10a 100644 --- a/apps/keira/src/assets/i18n/zh.json +++ b/apps/keira/src/assets/i18n/zh.json @@ -564,7 +564,7 @@ "CONDITIONS": { "SELECT": { "SOURCE_GROUP": "源组:", - "SOURCE_ENTRY:": "源输入:", + "SOURCE_ENTRY": "源输入:", "CREATE_NEW": "新建" }, "EDITOR": { From 77a9b68c79e1f34ff9b139cb364d628b398ad0de Mon Sep 17 00:00:00 2001 From: Exitare Date: Wed, 8 Jan 2025 02:04:55 -0800 Subject: [PATCH 03/18] chore(creature_template): update initial unit class from being 0 to 1 (warrior class) (#3235) --- .../creature-template/creature-template.integration.spec.ts | 4 ++-- .../acore-world-model/src/entities/creature-template.type.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/features/creature/src/creature-template/creature-template.integration.spec.ts b/libs/features/creature/src/creature-template/creature-template.integration.spec.ts index 2b73011362..bd0f5594a0 100644 --- a/libs/features/creature/src/creature-template/creature-template.integration.spec.ts +++ b/libs/features/creature/src/creature-template/creature-template.integration.spec.ts @@ -36,7 +36,7 @@ describe('CreatureTemplate integration tests', () => { '`maxgold`, `AIName`, `MovementType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `ExperienceModifier`, ' + '`RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `spell_school_immune_mask`, ' + '`flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES\n' + - "(1234, 0, 0, 0, 0, 0, '', '', '', 0, 1, 1, 0, 0, 0, 1, 1.14286, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, " + + "(1234, 0, 0, 0, 0, 0, '', '', '', 0, 1, 1, 0, 0, 0, 1, 1.14286, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, " + "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, '', 0);\n"; const originalEntity = new CreatureTemplate(); @@ -93,7 +93,7 @@ describe('CreatureTemplate integration tests', () => { '`lootid`, `pickpocketloot`, `skinloot`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, ' + '`AIName`, `MovementType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `ExperienceModifier`, `RacialLeader`, ' + '`movementId`, `RegenHealth`, `mechanic_immune_mask`, `spell_school_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES\n' + - "(1234, 0, 0, 0, 0, 0, 'Shin', '', '', 0, 1, 1, 0, 0, 0, 1, 1.14286, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0," + + "(1234, 0, 0, 0, 0, 0, 'Shin', '', '', 0, 1, 1, 0, 0, 0, 1, 1.14286, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0," + " 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, '', 0);"; querySpy.calls.reset(); diff --git a/libs/shared/acore-world-model/src/entities/creature-template.type.ts b/libs/shared/acore-world-model/src/entities/creature-template.type.ts index dfe7c2f68c..c3160fb842 100644 --- a/libs/shared/acore-world-model/src/entities/creature-template.type.ts +++ b/libs/shared/acore-world-model/src/entities/creature-template.type.ts @@ -39,7 +39,7 @@ export class CreatureTemplate extends TableRow { RangeAttackTime: number = 0; BaseVariance: number = 0; RangeVariance: number = 0; - unit_class: number = 0; + unit_class: number = 1; unit_flags: number = 0; unit_flags2: number = 0; dynamicflags: number = 0; From 3a6646e0ec92826290a98354bf4e7703cc66db00 Mon Sep 17 00:00:00 2001 From: Exitare Date: Wed, 8 Jan 2025 02:22:52 -0800 Subject: [PATCH 04/18] chore(creature_template_model): change initial probability from 0 to 1 (#3234) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stefano Borzì --- ...reature-template-model.integration.spec.ts | 48 +++++++++---------- .../entities/creature-template-model.type.ts | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/libs/features/creature/src/creature-template-model/creature-template-model.integration.spec.ts b/libs/features/creature/src/creature-template-model/creature-template-model.integration.spec.ts index cacc4a6419..da3f429b7b 100644 --- a/libs/features/creature/src/creature-template-model/creature-template-model.integration.spec.ts +++ b/libs/features/creature/src/creature-template-model/creature-template-model.integration.spec.ts @@ -101,9 +101,9 @@ describe('CreatureTemplateModel integration tests', () => { const expectedQuery = 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234) AND (`Idx` IN (0, 1, 2));\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0),\n' + - '(1234, 1, 0, 1, 0, 0),\n' + - '(1234, 2, 0, 1, 0, 0);'; + '(1234, 0, 0, 1, 1, 0),\n' + + '(1234, 1, 0, 1, 1, 0),\n' + + '(1234, 2, 0, 1, 1, 0);'; querySpy.calls.reset(); page.addNewRow(); @@ -127,12 +127,12 @@ describe('CreatureTemplateModel integration tests', () => { page.expectDiffQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234) AND (`Idx` IN (0));\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0);', + '(1234, 0, 0, 1, 1, 0);', ); page.expectFullQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234);\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0)', + '(1234, 0, 0, 1, 1, 0)', ); page.setInputValueById('Idx', '28'); @@ -140,12 +140,12 @@ describe('CreatureTemplateModel integration tests', () => { page.expectDiffQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234) AND (`Idx` IN (28));\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 28, 0, 1, 0, 0);', + '(1234, 28, 0, 1, 1, 0);', ); page.expectFullQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234);\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 28, 0, 1, 0, 0);', + '(1234, 28, 0, 1, 1, 0);', ); page.removeNativeElement(); }); @@ -161,14 +161,14 @@ describe('CreatureTemplateModel integration tests', () => { page.expectDiffQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234) AND (`Idx` IN (28, 0));\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 28, 0, 1, 0, 0),\n' + - '(1234, 0, 0, 1, 0, 0);', + '(1234, 28, 0, 1, 1, 0),\n' + + '(1234, 0, 0, 1, 1, 0);', ); page.expectFullQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234);\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 28, 0, 1, 0, 0),\n' + - '(1234, 0, 0, 1, 0, 0);', + '(1234, 28, 0, 1, 1, 0),\n' + + '(1234, 0, 0, 1, 1, 0);', ); page.removeNativeElement(); }); @@ -183,9 +183,9 @@ describe('CreatureTemplateModel integration tests', () => { page.expectFullQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234);\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0),\n' + - '(1234, 1, 0, 1, 0, 0),\n' + - '(1234, 2, 0, 1, 0, 0);', + '(1234, 0, 0, 1, 1, 0),\n' + + '(1234, 1, 0, 1, 1, 0),\n' + + '(1234, 2, 0, 1, 1, 0);', ); expect(page.getEditorTableRowsCount()).toBe(3); expect(page.getAllModelViewers().length).toBe(3); // check one model viewer per row @@ -199,8 +199,8 @@ describe('CreatureTemplateModel integration tests', () => { page.expectDiffQueryToContain('DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234) AND (`Idx` IN (1));'); page.expectFullQueryToContain( 'creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0),\n' + - '(1234, 2, 0, 1, 0, 0);', + '(1234, 0, 0, 1, 1, 0),\n' + + '(1234, 2, 0, 1, 1, 0);', ); page.deleteRow(1); @@ -209,7 +209,7 @@ describe('CreatureTemplateModel integration tests', () => { page.expectFullQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234);\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0);', + '(1234, 0, 0, 1, 1, 0);', ); page.deleteRow(0); @@ -235,9 +235,9 @@ describe('CreatureTemplateModel integration tests', () => { page.expectFullQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234);\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0),\n' + + '(1234, 0, 0, 1, 1, 0),\n' + '(1234, 1, 1111, 222, 333, 0),\n' + - '(1234, 2, 0, 1, 0, 0);', + '(1234, 2, 0, 1, 1, 0);', ); page.removeNativeElement(); }); @@ -258,15 +258,15 @@ describe('CreatureTemplateModel integration tests', () => { page.expectDiffQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234) AND (`Idx` IN (1, 2, 28, 3));\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 28, 0, 1, 0, 0),\n' + - '(1234, 3, 0, 1, 0, 0);', + '(1234, 28, 0, 1, 1, 0),\n' + + '(1234, 3, 0, 1, 1, 0);', ); page.expectFullQueryToContain( 'DELETE FROM `creature_template_model` WHERE (`CreatureID` = 1234);\n' + 'INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES\n' + - '(1234, 0, 0, 1, 0, 0),\n' + - '(1234, 28, 0, 1, 0, 0),\n' + - '(1234, 3, 0, 1, 0, 0);', + '(1234, 0, 0, 1, 1, 0),\n' + + '(1234, 28, 0, 1, 1, 0),\n' + + '(1234, 3, 0, 1, 1, 0);', ); page.removeNativeElement(); }); diff --git a/libs/shared/acore-world-model/src/entities/creature-template-model.type.ts b/libs/shared/acore-world-model/src/entities/creature-template-model.type.ts index fd5e8bb21d..b2a8b1f5bf 100644 --- a/libs/shared/acore-world-model/src/entities/creature-template-model.type.ts +++ b/libs/shared/acore-world-model/src/entities/creature-template-model.type.ts @@ -9,6 +9,6 @@ export class CreatureTemplateModel extends TableRow { Idx: number = 0; CreatureDisplayID: number = 0; DisplayScale: number = 1; - Probability: number = 0; + Probability: number = 1; VerifiedBuild: number = 0; } From bc6eee88449dc24e2d768d809222edeb36cd7591 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 09:39:14 +0100 Subject: [PATCH 05/18] chore(deps): update dependency @types/node to v22.10.5 (#3229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency @types/node to v22.10.5 * Fix missing translation keys --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: i18n Sync Bot Co-authored-by: Francesco Borzì --- apps/keira/src/assets/i18n/de.json | 305 +++++++++++++++++++++++------ apps/keira/src/assets/i18n/el.json | 8 +- apps/keira/src/assets/i18n/es.json | 17 +- apps/keira/src/assets/i18n/fr.json | 12 +- apps/keira/src/assets/i18n/it.json | 11 +- apps/keira/src/assets/i18n/ko.json | 8 +- apps/keira/src/assets/i18n/nl.json | 8 +- apps/keira/src/assets/i18n/pl.json | 8 +- apps/keira/src/assets/i18n/pt.json | 12 +- apps/keira/src/assets/i18n/ro.json | 8 +- apps/keira/src/assets/i18n/ru.json | 12 +- apps/keira/src/assets/i18n/sk.json | 8 +- apps/keira/src/assets/i18n/sv.json | 12 +- apps/keira/src/assets/i18n/zh.json | 14 +- package-lock.json | 8 +- package.json | 2 +- 16 files changed, 348 insertions(+), 105 deletions(-) diff --git a/apps/keira/src/assets/i18n/de.json b/apps/keira/src/assets/i18n/de.json index e4500ef2e3..825b309c5e 100644 --- a/apps/keira/src/assets/i18n/de.json +++ b/apps/keira/src/assets/i18n/de.json @@ -92,7 +92,8 @@ "SPAWN": "Spawn", "SPAWN_ADDON": "Spawn-Addon", "SMARTAI": "SmartAI", - "TEXT": "Text" + "TEXT": "Text", + "FORMATIONS": "Formations" }, "QUEST": { "TITLE": "Quest", @@ -256,61 +257,61 @@ "MOUNT": "Die Modell-ID des Reittiers, das verwendet werden soll, um die Kreatur als reitend erscheinen zu lassen. Der hier angegebene Wert überschreibt den Wert für das Kreaturen-Einheitsfeld UNIT_FIELD_MOUNTDISPLAYID.", "VISIBILITY_DISTANCE_TYPE": "Normal = 0, 100,0f (Standard-Sichtweite, 100 Yards auf Kontinenten); Tiny = 1, 25,0f; Small = 2, 50,0f; Large = 3, 200,0f; Gigantic = 4, 400,0f; Infinite = 5 (Größe der Gitter maximale Entfernung für sichtbare Objekte)", "AURAS": "Eine Liste von durch Leerzeichen getrennten Auren, die auf die Kreatur angewendet werden. Wenn die Kreatur Daten im Spawn-Addon hat, wird dies überschrieben." + }, + "ONKILL_REPUTATION": { + "IS_TEAM_AWARD1": "Boolean (0 or 1) whether the player receives the reputation also the faction team or not.", + "REW_ON_KILL_REP_VALUE1": "The reputation value that the player gains (or loses if negative) by killing the creature.", + "IS_TEAM_AWARD2": "Boolean (0 or 1) whether the player receives the reputation also the faction team or not.", + "REW_ON_KILL_REP_VALUE2": "The reputation value that the player gains (or loses if negative) by killing the creature.", + "TEAM_DEPENDENT_TOOLTIP": "Boolean value. 0 - Will give reputation to the any player from both fields (RewOnKillRepFaction1 and RewOnKillRepFaction2); 1 - Will give reputation to alliance players from RewOnKillRepFaction1 and horde players from RewOnKillRepFaction2" + }, + "SPAWN": { + "ORIENTATION": "The orientation of the creatures spawn point. (North = 0.0; South = pi (3.14159))", + "EQUIPMENT_ID_TOOLTIP": "1 = uses the info set in equipment template 0 = no weapons equipped", + "SPAWN_DIST_TOOLTIP": "The maximum distance that the creature may spawn from its spawn point. Also controls how far away the creature can walk from its spawn point if its MovementType = 1.", + "SCRIPT_NAME": "The name of the C++ script that this creature uses, if any.", + "GUID": "Link to creature.guid", + "PATH_ID": "If the creature has waypoint pathed movement, contains the waypoint_data.id for the path the creature is to follow.", + "MOUNT": "The model ID of the mount to be used to make the creature appear mounted. The value here overrides the value for the creature unit field UNIT_FIELD_MOUNTDISPLAYID.", + "VISIBILITY_DISTANCE_TYPE": "Normal = 0, 100.0f (default visible distance, 100 yards on continents); Tiny = 1, 25.0f; Small = 2, 50.0f; Large = 3, 200.0f; Gigantic = 4, 400.0f; Infinite = 5 (SIZE_OF_GRIDS max distance for visible objects)", + "AURAS": "A list of space separated auras to be applied on the creature.", + "COMMENT": "Comment" + }, + "TEMPLATE_MOVEMENT": { + "GROUND": "0 = None; 1 = Run; 2 = Hover", + "SWIM": "0 = None; 1 = Swim", + "FLIGHT": "0 = None; 1 = Disable Gravity; 2 = CanFly", + "ROOTED": "0 = None; 1 = Rooted; ", + "CHASE": "0 = Run; 1 = CanWalk; 2 = AlwaysWalk", + "RANDOM": "0 = Walk; 1 = CanRun; 2 = AlwaysRun", + "INTERACTION_PAUSE_TIMER": "Time (in milliseconds) during which creature will not move after interaction with player" + }, + "TEMPLATE_SPELL": { + "INDEX": "Allowed values: 0-7" + }, + "NPC_TRAINER": { + "MONEY_COST": "The cost to pay to learn the spell represented in copper (1 gold = 100 silver = 10000 cooper)", + "REQ_SKILL_LINE": "The required skill the player needs to have in order to be able to learn the spell", + "REQ_SKILL_RANK": "The proficiency in the skill from reqskill that the player needs to meet to learn the spell", + "REQ_LEVEL": "The minimum level the player needs to be in order to learn the spell." + }, + "NPC_VENDOR": { + "SLOT": "Position of the item in the vendor window", + "MAXCOUNT": "The maximum number of items carried by the vendor at any time. 0 for infinite (if choosing a value of 1 or higher also requires incrtime value to work)", + "INCRTIME": "Combined with maxcount, how often (in seconds) the vendor list is refreshed", + "EXTENDED_COST": "Value comes from DBC and a selector for this will be implemented later in Keira3" + }, + "TEXT": { + "GROUP_ID": "If there is more than one of the same entry (more than one text the creature says), this column is used to choose if it is a random say or an ordered list. If a creature has got more than one say text to be shown in a given order, it must be incremented for each new matching entry (ex. 0, 1, 2, 3...). If there is only one entry or only one group, this value should be 0. If there are multiple groups of texts, this value stays the same within the group while the id increments within the same group.", + "ID": "Entry for each group of texts. This is the unique identifier when entry (creature) is the same and groupid is unchanged, it must be incremented (ex. 0, 1, 2, 3...). A creature say will be randomly selected from this list based on the groupid it belongs to.", + "LANGUAGE": "Value from Languages.dbc (+ the wiki table from the dbc file). When set to 0, the current default language will be used.", + "PROBABILITY": "A value from 1-100 that represents the percentage chance that this text will be executed.\n\nValue must be >=0. If the value does not meet the condition the SQL will fail on creature_text_chk_1.", + "EMOTE": "The emote that the creature plays when the text is executed. Value to use in this field can be obtained from the emote.dbc", + "DURATION": "Time in ms to see text. 0 is default and calculated by core.", + "SOUND": "The sound entry this creature will play at the same time the text is executed. Sounds are found in SoundEntries.dbc.", + "BROADCAST_TEXT_ID": "Id of the equivalent text found in broadcast_text" } }, - "ONKILL_REPUTATION": { - "IS_TEAM_AWARD1": "Boolean (0 oder 1), ob der Spieler den Ruf auch für das Fraktionsteam erhält oder nicht.", - "REW_ON_KILL_REP_VALUE1": "Der Rufwert, den der Spieler durch das Töten der Kreatur erhält (oder verliert, falls negativ).", - "IS_TEAM_AWARD2": "Boolean (0 oder 1), ob der Spieler den Ruf auch für das Fraktionsteam erhält oder nicht.", - "REW_ON_KILL_REP_VALUE2": "Der Rufwert, den der Spieler durch das Töten der Kreatur erhält (oder verliert, falls negativ).", - "TEAM_DEPENDENT_TOOLTIP": "Boolean-Wert. 0 - Gibt Ruf für jeden Spieler aus beiden Feldern (RewOnKillRepFaction1 und RewOnKillRepFaction2); 1 - Gibt Ruf für Allianzspieler von RewOnKillRepFaction1 und für Hordespieler von RewOnKillRepFaction2." - }, - "SPAWN": { - "ORIENTATION": "Die Orientierung des Spawnpunkts der Kreatur. (Norden = 0.0; Süden = pi (3.14159))", - "EQUIPMENT_ID_TOOLTIP": "1 = Verwendet die Informationen aus der Ausrüstungsvorlage; 0 = Keine Waffen ausgerüstet; -1 = Eine zufällige Ausrüstung aus der Gruppe der Ausrüstungen in creature_equip_template wird ausgewählt.", - "SPAWN_DIST_TOOLTIP": "Die maximale Entfernung, die die Kreatur von ihrem Spawnpunkt entfernt spawnen kann. Kontrolliert auch, wie weit sich die Kreatur von ihrem Spawnpunkt entfernen kann, wenn ihr MovementType = 1 ist.", - "SCRIPT_NAME": "Der Name des C++-Skripts, das diese Kreatur verwendet, falls vorhanden.", - "GUID": "Verknüpft mit creature.guid", - "PATH_ID": "Wenn die Kreatur eine Wegpunktbewegung hat, enthält dies die waypoint_data.id für den Pfad, dem die Kreatur folgen soll.", - "MOUNT": "Die Modell-ID des Reittiers, das verwendet werden soll, um die Kreatur als reitend erscheinen zu lassen. Der hier angegebene Wert überschreibt den Wert für das Kreaturen-Einheitsfeld UNIT_FIELD_MOUNTDISPLAYID.", - "VISIBILITY_DISTANCE_TYPE": "Normal = 0, 100,0f (Standard-Sichtweite, 100 Yards auf Kontinenten); Tiny = 1, 25,0f; Small = 2, 50,0f; Large = 3, 200,0f; Gigantic = 4, 400,0f; Infinite = 5 (Größe der Gitter maximale Entfernung für sichtbare Objekte)", - "AURAS": "Eine Liste von durch Leerzeichen getrennten Auren, die auf die Kreatur angewendet werden.", - "COMMENT": "Kommentar" - }, - "TEMPLATE_MOVEMENT": { - "GROUND": "0 = Keine; 1 = Laufen; 2 = Schweben", - "SWIM": "0 = Keine; 1 = Schwimmen", - "FLIGHT": "0 = Keine; 1 = Schwerkraft deaktivieren; 2 = Kann fliegen", - "ROOTED": "0 = Keine; 1 = Verwurzelt", - "CHASE": "0 = Laufen; 1 = Kann gehen; 2 = Immer gehen", - "RANDOM": "0 = Gehen; 1 = Kann laufen; 2 = Immer laufen", - "INTERACTION_PAUSE_TIMER": "Zeit (in Millisekunden), während der die Kreatur nach der Interaktion mit dem Spieler nicht bewegt wird." - }, - "TEMPLATE_SPELL": { - "INDEX": "Zulässige Werte: 0-7" - }, - "NPC_TRAINER": { - "MONEY_COST": "Die Kosten, um den Zauber zu lernen, dargestellt in Kupfer (1 Gold = 100 Silber = 10000 Kupfer).", - "REQ_SKILL_LINE": "Die erforderliche Fähigkeit, die der Spieler haben muss, um den Zauber lernen zu können.", - "REQ_SKILL_RANK": "Die Fertigkeit in der Fähigkeit aus reqskill, die der Spieler haben muss, um den Zauber zu lernen.", - "REQ_LEVEL": "Das Mindestlevel, das der Spieler haben muss, um den Zauber zu lernen." - }, - "NPC_VENDOR": { - "SLOT": "Position des Gegenstands im Händlerfenster", - "MAXCOUNT": "Die maximale Anzahl von Gegenständen, die der Händler gleichzeitig führt. 0 für unendlich (wenn ein Wert von 1 oder höher gewählt wird, ist auch ein incrtime-Wert erforderlich).", - "INCRTIME": "In Kombination mit maxcount, wie oft (in Sekunden) die Händlerliste aktualisiert wird.", - "EXTENDED_COST": "Wert stammt aus DBC, und ein Selektor dafür wird später in Keira3 implementiert." - }, - "TEXT": { - "GROUP_ID": "Wenn es mehr als einen Eintrag derselben Art gibt (mehr als einen Text, den die Kreatur sagt), wird diese Spalte verwendet, um auszuwählen, ob es sich um eine zufällige Auswahl oder eine geordnete Liste handelt. Wenn eine Kreatur mehr als einen Text hat, der in einer bestimmten Reihenfolge angezeigt werden soll, muss dieser Wert für jeden neuen passenden Eintrag inkrementiert werden (z. B. 0, 1, 2, 3...). Wenn es nur einen Eintrag oder nur eine Gruppe gibt, sollte dieser Wert 0 sein. Wenn es mehrere Textgruppen gibt, bleibt dieser Wert innerhalb der Gruppe gleich, während die ID innerhalb derselben Gruppe inkrementiert wird.", - "ID": "Eintrag für jede Gruppe von Texten. Dies ist der eindeutige Identifikator, wenn entry (Kreatur) gleich ist und groupid unverändert ist, muss er inkrementiert werden (z. B. 0, 1, 2, 3...). Ein Kreaturtext wird zufällig aus dieser Liste ausgewählt, basierend auf der groupid, zu der er gehört.", - "LANGUAGE": "Wert aus Languages.dbc (+ die Wiki-Tabelle aus der dbc-Datei). Wenn auf 0 gesetzt, wird die aktuelle Standardsprache verwendet.", - "PROBABILITY": "Ein Wert von 1-100, der den Prozentsatz angibt, mit dem dieser Text ausgeführt wird.\n\nDer Wert muss >=0 sein. Wenn der Wert die Bedingung nicht erfüllt, schlägt die SQL-Prüfung bei creature_text_chk_1 fehl.", - "EMOTE": "Das Emote, das die Kreatur spielt, wenn der Text ausgeführt wird. Der zu verwendende Wert in diesem Feld kann aus der emote.dbc abgerufen werden.", - "DURATION": "Zeit in ms, um den Text anzuzeigen. 0 ist Standard und wird vom Kern berechnet.", - "SOUND": "Die Sound-Einträge, die diese Kreatur gleichzeitig mit dem Ausführen des Textes abspielt. Sounds befinden sich in SoundEntries.dbc.", - "BROADCAST_TEXT_ID": "ID des entsprechenden Textes, der in broadcast_text gefunden wird." - }, "QUEST": { "TEMPLATE": { "BASE": "Basis", @@ -603,6 +604,122 @@ "SOURCE_TYPE_VEHICLE_SPELL": "creature_template Eintrag", "SOURCE_TYPE_SMART_EVENT": "ID (smart_scripts.id) + 1", "SOURCE_TYPE_NPC_VENDOR": "npc_vendor Eintrag" + }, + "ENTRY": { + "SOURCE_TYPE_CREATURE_LOOT_TEMPLATE": "creature_loot_template or reference_loot_template Item", + "SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE": "disenchant_loot_template or reference_loot_template Item", + "SOURCE_TYPE_FISHING_LOOT_TEMPLATE": "fishing_loot_template or reference_loot_template Item", + "SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE": "gameobject_loot_template or reference_loot_template Item", + "SOURCE_TYPE_ITEM_LOOT_TEMPLATE": "item_loot_template or reference_loot_template Item", + "SOURCE_TYPE_MAIL_LOOT_TEMPLATE": "mail_loot_template or reference_loot_template Item", + "SOURCE_TYPE_MILLING_LOOT_TEMPLATE": "milling_loot_template or reference_loot_template Item", + "SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE": "pickpocketing_loot_template or reference_loot_template Item", + "SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE": "prospecting_loot_template or reference_loot_template Item", + "SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE": "reference_loot_template Item", + "SOURCE_TYPE_SKINNING_LOOT_TEMPLATE": "skinning_loot_template or reference_loot_template Item", + "SOURCE_TYPE_SPELL_LOOT_TEMPLATE": "spell_loot_template or reference_loot_template Item", + "SOURCE_TYPE_SPELL_IMPLICIT_TARGET": "Spell Id from Spell.dbc", + "SOURCE_TYPE_GOSSIP_MENU": "gossip_menu.TextID (points to npc_text.ID)", + "SOURCE_TYPE_GOSSIP_MENU_OPTION": "gossip_menu_option.OptionID", + "SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE": "creature_template.entry", + "SOURCE_TYPE_SPELL": "Spell ID from Spell.dbc", + "SOURCE_TYPE_SPELL_CLICK_EVENT": "Spell (npc_spellclick_spells.spell_id)", + "SOURCE_TYPE_QUEST_AVAILABLE": "Quest ID", + "SOURCE_TYPE_VEHICLE_SPELL": "Spell ID from Spell.dbc", + "SOURCE_TYPE_SMART_EVENT": "smart_scripts.entryorguid", + "SOURCE_TYPE_NPC_VENDOR": "npc_vendor.item", + "SOURCE_TYPE_SPELL_PROC": "Spell ID of aura which triggers the proc" + }, + "TARGET": { + "SOURCE_TYPE_SPELL_IMPLICIT_TARGET": "0 = Potential spell Target; 1 = spell Caster", + "SOURCE_TYPE_GOSSIP_MENU": "0 = Player; 1 = WorldObject", + "SOURCE_TYPE_GOSSIP_MENU_OPTION": "0 = Player; 1 = WorldObject", + "SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE": "0 = Player riding vehicle; 1 = Vehicle creature", + "SOURCE_TYPE_SPELL": "0 = spell Caster; 1 = Explicit Target of the spell (only for spells which take the object selected by caster into account)", + "SOURCE_TYPE_SPELL_CLICK_EVENT": "0 = Clicker; 1 = Spellclick target (clickee)", + "SOURCE_TYPE_VEHICLE_SPELL": "0 = Player for whom spell bar is shown; 1 = Vehicle creature", + "SOURCE_TYPE_SMART_EVENT": "0 = Invoker; 1 = Object", + "SOURCE_TYPE_SPELL_PROC": "0 = Actor; 1 = ActionTarget" + }, + "VALUE1": { + "CONDITION_NONE": "(Never used)", + "CONDITION_AURA": "Spell ID from Spell.dbc", + "CONDITION_ITEM": "item_template.entry", + "CONDITION_ITEM_EQUIPPED": "item_template.entry", + "CONDITION_ZONEID": "Zone ID where this condition will be true.", + "CONDITION_REPUTATION_RANK": "Faction template ID from Faction.dbc", + "CONDITION_TEAM": "Team id (Alliance = 469; Horde = 67)", + "CONDITION_SKILL": "Required skill. See SkillLine.dbc", + "CONDITION_QUESTREWARDED": "quest_template.ID", + "CONDITION_QUESTTAKEN": "quest_template.ID", + "CONDITION_DRUNKENSTATE": "Sober=0, Tipsy=1, Drunk=2, Smashed=3", + "CONDITION_WORLD_STATE": "World state index", + "CONDITION_ACTIVE_EVENT": "game_event.eventEntry", + "CONDITION_INSTANCE_INFO": "entry (see corresponding source script files for info)", + "CONDITION_QUEST_NONE": "quest_template.ID", + "CONDITION_CLASS": "Class mask from ChrClasses.dbc. Add flags together for all classes where condition is true", + "CONDITION_RACE": "Player must be this race. See ChrRaces.dbc. Add flags together for all races where condition is true.", + "CONDITION_ACHIEVEMENT": "Achievement ID from Achievement.dbc", + "CONDITION_TITLE": "Title ID from CharTitles.dbc\t", + "CONDITION_SPAWNMASK": "spawnMask fromm creature.spawnMask or gameobject.spawnMask", + "CONDITION_GENDER": "0 = Male, 1 = Female, 2 = None", + "CONDITION_UNIT_STATE": "UnitState (enum from Unit.h)", + "CONDITION_MAPID": "Map entry from Map.dbc (0=Eastern Kingdoms, 1=Kalimdor, etc..)", + "CONDITION_AREAID": "Area ID from AreaTable.dbc", + "CONDITION_CREATURE_TYPE": "Creature type from creature_template.type (True if creature_template.type == ConditionValue1)", + "CONDITION_SPELL": "Spell ID from Spell.dbc", + "CONDITION_PHASEMASK": "phasemask value", + "CONDITION_LEVEL": "Player level (1-80)", + "CONDITION_QUEST_COMPLETE": "quest_template.ID", + "CONDITION_NEAR_CREATURE": "creature_template.entry", + "CONDITION_NEAR_GAMEOBJECT": "gameobject_template.entry", + "CONDITION_OBJECT_ENTRY_GUID": "TypeID. 3-TYPEID_UNIT, 4-TYPEID_PLAYER, 5-TYPEID_GAMEOBJECT, 7-TYPEID_CORPSE(player corpse, after spirit release)", + "CONDITION_TYPE_MASK": "TypeMask - a bitmask of following object types: 0x0008 - TYPEMASK_UNIT (8) 0x0010 - TYPEMASK_PLAYER (16) 0x0020 - TYPEMASK_GAMEOBJECT (32) 0x0080 - TYPEMASK_CORPSE (player corpse after spirit release) (128)", + "CONDITION_TO": "Target to which relation is checked. One of the ConditionTargets available in current SourceType", + "CONDITION_ALIVE": "Always 0 (use NegativeCondition to require dead)", + "CONDITION_HP_VAL": "HP value", + "CONDITION_HP_PCT": "Percentage of max HP", + "CONDITION_REALM_ACHIEVEMENT": "Achievement ID from Achievement.dbc", + "CONDITION_IN_WATER": "Always 0", + "CONDITION_STAND_STATE": "stateType (\"exact\" or \"any\"): 0 = Exact state used in ConditionValue2; 1 = Any type of state in ConditionValue2", + "CONDITION_DAILY_QUEST_DONE": "quest_template.ID", + "CONDITION_CHARMED": "Always 0", + "CONDITION_PET_TYPE": "mask", + "CONDITION_TAXI": "Always 0", + "CONDITION_QUESTSTATE": "quest_template.ID", + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" + }, + "VALUE2": { + "CONDITION_NONE": "(Never used)", + "CONDITION_AURA": "Effect index (0-2)", + "CONDITION_ITEM": "Item count", + "RANK_MASK": "Rank mask. 1=hated, 2=hostile, 4=unfriendly, 8=neutral, 16=friendly, 32=honored, 64=revered, 128=exalted", + "CONDITION_SKILL": "Skill rank value (1-450)", + "CONDITION_WORLD_STATE": "World state value", + "CONDITION_INSTANCE_INFO": "data (see corresponding script source files for more info)", + "CONDITION_LEVEL": "Optional: 0 = Level must be equal, 1 = Level must be higher, 2 = Level must be lower, 3 = Level must be higher or equal, 4 = Level must be lower or equal.", + "CONDITION_NEAR_CREATURE": "Distance in yards", + "CONDITION_NEAR_GAMEOBJECT": "Distance in yards", + "CONDITION_OBJECT_ENTRY_GUID": "0 = Any object of given TypeID; if TypeID = TYPEID_UNIT => Creature entry from creature_template.entry; if TypeID = TYPEID_GAMEOBJECT => Gameobject entry from gameobject_template.entry", + "CONDITION_RELATION_TO": "RelationType - defines relation of current ConditionTarget to target specified in ConditionValue1. 0 - RELATION_SELF; 1 - RELATION_IN_PARTY; 2 - RELATION_IN_RAID_OR_PARTY; 3 - RELATION_OWNED_BY (ConditionTarget is owned by ConditionValue1); 4 - RELATION_PASSENGER_OF (ConditionTarget is passenger of ConditionValue1); 5 - RELATION_CREATED_BY (ConditionTarget is summoned by ConditionValue1)", + "CONDITION_DISTANCE_TO": "Defines distance between current ConditionTarget and target specified in ConditionValue1", + "CONDITION_HP_VAL": "ComparisionType:; 0 = HP must be equal; 1 = HP must be higher; 2 = HP must be lesser; 3 = HP must be equal or higher; 4 = HP must be equal or lower", + "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", + "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", + "CONDITION_QUESTSTATE": "state_mask", + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" + }, + "VALUE3": { + "CONDITION_NONE": "(Never used)", + "CONDITION_ITEM": "0 = not in bank; 1 = in bank", + "CONDITION_INSTANCE_INFO": "0=INSTANCE_INFO_DATA; 1=INSTANCE_INFO_GUID_DATA; 2=INSTANCE_INFO_BOSS_STATE; 3=INSTANCE_INFO_DATA64; ", + "CONDITION_NEAR_CREATURE": "Alive=0; Dead=1", + "CONDITION_NEAR_GAMEOBJECT": "GoState |0 Ignore |1 Ready |2 Not Ready", + "CONDITION_OBJECT_ENTRY_GUID": "0 = Any object of given type; 1 - 500k = creature/gameobject GUID", + "CONDITION_DISTANCE_TO": "ComparisionType: 0 = distance must be equal to ConditionValue2; 1 = distance must be higher than ConditionValue2; 2 = distance must be lower than ConditionValue2; 3 = distance must be equal to or higher than ConditionValue2; 4 = distance must be equal to or lower than ConditionValue2", + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective Count" } } }, @@ -666,6 +783,84 @@ "SPELL_VISUAL_ID_2": "Visuelle Effekte eines Zaubers. Verknüpfung mit Eintrag in SpellVisual.dbc", "SPELL_MISSILE_ID": "Wird zur Erstellung visueller Zaubereffekte verwendet. Verknüpfung mit SpellMissile.dbc", "POWER_DISPLAY_ID": "Verknüpfung mit Eintrag in PowerDisplay.dbc" + }, + "FLAGS": { + "GENERAL": "General", + "INTERRUPT_FLAGS": "Interrupt Flags", + "SPELL_ATTRIBUTES": "Spell Attributes", + "TARGET_CREATURE_TYPE": "Mask of creature types on which is spell usable. 0 = None", + "SHAPESHIFT_MASK": "Shapeshifts/Stances in which the spell is castable. 0 = No shape/stance required", + "SHAPESHIFT_EXCLUDE": "Shapeshifts/Stances in which the spell is not castable. 0 = No restriction", + "FACING_CASTER_FLAGS": "If marked, forces the Caster to use the ability in front of the enemy.", + "INTERRUPT_FLAGS_TOOLTIP": "Mask of cases which interrupt casting of a spell. 0 = None", + "AURA_INTERRUPT_FLAGS": "Mask of cases which interrupt casting of a spell. 0 = None", + "CHANNEL_INTERRUPT_FLAGS": "Mask of cases which interrupt casting of a spell. 0 = None", + "ATTRIBUTES": "General miscellaneous flags. 0 = None" + }, + "ITEMS": { + "GENERAL": "General", + "NON_CONSUMABLE_ITEMS": "Non-consumable items", + "CONSUMABLE_ITEMS": "Consumable items", + "EQUIPPED_ITEM_CLASS": "item_template.class value which casters item held in hand must have", + "EQUIPPED_ITEM_SUBCLASS": "Mask of item_template.subclass values which caster's item held in hand must have", + "EQUIPPED_ITEM_INV_TYPES": "Mask of item_template.InventoryType values which targeted item must have", + "TOTEM_1": "Non consumable item required to cast the spell.", + "TOTEM_2": "Non consumable item required to cast the spell.", + "REQUIRED_TOTEM_CATEGORY_ID_1": "Non consumable items (e.g. enchanter rods) required to cast the spell.", + "REQUIRED_TOTEM_CATEGORY_ID_2": "Non consumable items (e.g. enchanter rods) required to cast the spell.", + "REAGENT": "Entry of item used by this spell as resources. Gets consumed. Materials for professions.", + "REAGENT_COUNT": "Number of reagent items needed by spell" + }, + "TEXTS": { + "LANGUAGE": "Bitmask for Language string data", + "NAMESUBTEXT": "Bitmask for NameSubtext string data", + "DESCRIPTION": "Bitmask for Description string data", + "AURADESCRIPTION": "Bitmask for AuraDescription string data" + }, + "EFFECTS": { + "TARGETS": "Which type of targets can be targeted by the Spell. 0 = TARGET_FLAG_NONE", + "PROC_TYPE_MASK": "Under which conditions a spell can proc. 0 = PROC_FLAG_NONE", + "PROC_CHANCE": "Most spells with 100% chance tend to have value 101.", + "PROC_CHARGES": "How many times a spell can proc. 0 = infinite" + }, + "SPELL_EFFECTS": { + "EFFECT": "Effect", + "EFFECT_MECHANIC": "Effect Mechanic", + "EFFECT_AURA": "Effect Aura", + "MISC": "Misc", + "FIELD": { + "EFFECT": "Type of effect which spell has. All following effect fields refer to these.", + "EFFECT_BASE_POINTS": "Base points added to result of according effects rolled dice. e.g. EffectDieSides=26 and EffectBasePoints=49 will make 50-75.", + "EFFECT_REAL_POINTS_PER_LEVEL": "Base points added to according EffectBasePoints based on caster level.", + "EFFECT_RADIUS_INDEX": "According spell effect radius. May differ with caster level. Link to entry in SpellRadius.dbc", + "EFFECT_MULTIPLE_VALUE": "Number of stacks for Buffs/Debuffs", + "EFFECT_MISC_VALUE": "Used for according effects special misc values, commonly entries of called or used creature/item/gameobject.", + "EFFECT_MISC_VALUE_B": "Used for according effects special misc values, commonly entries of called or used creature/item/gameobject.", + "EFFECT_TRIGGER_SPELL": "Entry of spell triggered on affected target by this according effect.", + "EFFECT_POINTS_PER_COMBO": "Bonus to effect base value based on amount of combo points on target.", + "EFFECT_DIE_SIDES": "Number of sides of dice which is being rolled for random value of according effect.", + "EFFECT_CHAIN_AMPLITUDE": "Used for decreasing (or increasing) according effect value on next chained targets.", + "EFFECT_BONUS_MULTIPLIER": "Seems to be used for calculation of the according effect value of ticks for DoTs and HoTs.", + "EFFECT_MECHANIC": "Mechanic of according spell effect. Used by spells granting bonuses/immunities against certain effect types (stun, charm...).", + "EFFECT_AURA": "Type of aura (effect of effect) which according effect applies.", + "EFFECT_AURA_PERIOD": "How often the effect ticks in ms.", + "SPELL_CLASS_MASK": "?Mask for spells which are affected (buffed, ...) by this spell?", + "IMPLICIT_TARGET_A": "Type of implicit target(s) of according effect.", + "IMPLICIT_TARGET_B": "Type of implicit target(s) of according effect.", + "EFFECT_CHAIN_TARGETS": "?Used to create chaining visual effects (e.g. chain lightning)?", + "EFFECT_SPELL_CLASS_MASK_A": "Entry of fields 210-212 as hex value of the spell this spell is affecting. Used for effect #1", + "EFFECT_SPELL_CLASS_MASK_B": "Entry of fields 210-212 as hex value of the spell this spell is affecting. Used for effect #2", + "EFFECT_SPELL_CLASS_MASK_C": "Entry of fields 210-212 as hex value of the spell this spell is affecting. Used for effect #3" + } + }, + "MISC": { + "UNK_320_2": "Unused since patch 3.2.0", + "UNK_320_3": "Unused since patch 3.2.0", + "START_RECOVERY_CATEGORY": "The only value which seems to be used here apart of 0 is 133 (spells affected by global CD).", + "START_RECOVERY_TIME": "The only value (in ms) which seems to be used here apart of 0 is 1500 (global CD value).", + "MODAL_NEXT_SPELL": "Seems to be only used for Hunter spells with the values 59 and 75.", + "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", + "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/el.json b/apps/keira/src/assets/i18n/el.json index 3bfad0da05..15b30545d2 100644 --- a/apps/keira/src/assets/i18n/el.json +++ b/apps/keira/src/assets/i18n/el.json @@ -687,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -707,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -861,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/es.json b/apps/keira/src/assets/i18n/es.json index 20af5fd623..6e9ae68664 100644 --- a/apps/keira/src/assets/i18n/es.json +++ b/apps/keira/src/assets/i18n/es.json @@ -48,6 +48,10 @@ "EXECUTE_AND_COPY": "Execute & copy", "RELOAD": "Recargar", "CANCEL": "Cancelar", + "SELECTORS": { + "ENABLED": "Enabled", + "DISABLED": "Disabled" + }, "CONNECTION_WINDOW": { "HOST": "Host", "PORT": "Puerto", @@ -145,11 +149,6 @@ "NPC_TEXT": "NPC Text", "SELECT_PAGE_TEXT": "Select Page Text", "PAGE_TEXT": "Page Text", - "PAGE_TEXTS": { - "ID": "The ID of the text in the page. This number is unique to every text ID.", - "NEXT_PAGE_ID": "The ID of the next page's text ID.", - "TEXT": "The actual text. The message in this field will be shown as the text on a page." - }, "ACORE_STRING_TEXT": "Acore Strings", "SELECT_ACORE_STRING_TEXT": "Select Acore Strings" }, @@ -688,7 +687,8 @@ "CONDITION_PET_TYPE": "Máscara del Tipo de Mascota", "CONDITION_TAXI": "Siempre es 0", "CONDITION_QUESTSTATE": "Identificador de Misión extrado dentro de la tabla quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Identificador de Misión extrado dentro de la tabla 'quest_template.id'" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Identificador de Misión extrado dentro de la tabla 'quest_template.id'", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -708,7 +708,8 @@ "CONDITION_HP_PCT": "Tipo de Comparación o 'ComparisionType': 0 = Porcentaje de Salud debe ser igual; 1 = Porcentaje de Salud debe ser mayor; 2 = Porcentaje de Salud debe ser menor; 3 = Porcentaje de Salud debe ser mayor o igual; 4 = Porcentaje de Salud debe ser menor o igual", "CONDITION_STAND_STATE": "Estado exacto al estar parado, o también para un estado genérico (parado/sentado), dependiendo del valor. 10 = De pie; 1 = Sentado", "CONDITION_QUESTSTATE": "Máscara de Estado de Misión (state_mask)", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Identificador de Objetivo de Misión - Véase la tabla quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Identificador de Objetivo de Misión - Véase la tabla quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Nunca Usado)", @@ -862,4 +863,4 @@ "REQUIRED_AURA_VISION": "Desconocido. Sólo 16 hechizos usan otro valor como 0. Podría ser usado para efectos visuales." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/fr.json b/apps/keira/src/assets/i18n/fr.json index f08f8ba760..b67b544b12 100644 --- a/apps/keira/src/assets/i18n/fr.json +++ b/apps/keira/src/assets/i18n/fr.json @@ -48,6 +48,10 @@ "EXECUTE_AND_COPY": "Execute & copy", "RELOAD": "Recharger", "CANCEL": "Annuler", + "SELECTORS": { + "ENABLED": "Enabled", + "DISABLED": "Disabled" + }, "CONNECTION_WINDOW": { "HOST": "Hôte", "PORT": "Port", @@ -683,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -703,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -857,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/it.json b/apps/keira/src/assets/i18n/it.json index b9b3a5125d..6b895d1c1f 100644 --- a/apps/keira/src/assets/i18n/it.json +++ b/apps/keira/src/assets/i18n/it.json @@ -13,7 +13,8 @@ "POLISH": "Polacco", "PORTUGUESE": "Portoghese", "KOREAN": "Coreano", - "ROMANIAN": "Rumeno" + "ROMANIAN": "Rumeno", + "SLOVAK": "Slovak" }, "MODAL": { "YES": "Yes", @@ -686,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -706,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -860,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/ko.json b/apps/keira/src/assets/i18n/ko.json index 3bfad0da05..15b30545d2 100644 --- a/apps/keira/src/assets/i18n/ko.json +++ b/apps/keira/src/assets/i18n/ko.json @@ -687,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -707,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -861,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/nl.json b/apps/keira/src/assets/i18n/nl.json index 3bfad0da05..15b30545d2 100644 --- a/apps/keira/src/assets/i18n/nl.json +++ b/apps/keira/src/assets/i18n/nl.json @@ -687,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -707,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -861,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/pl.json b/apps/keira/src/assets/i18n/pl.json index 3bfad0da05..15b30545d2 100644 --- a/apps/keira/src/assets/i18n/pl.json +++ b/apps/keira/src/assets/i18n/pl.json @@ -687,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -707,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -861,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/pt.json b/apps/keira/src/assets/i18n/pt.json index 2540a929f8..901b8fbb53 100644 --- a/apps/keira/src/assets/i18n/pt.json +++ b/apps/keira/src/assets/i18n/pt.json @@ -48,6 +48,10 @@ "EXECUTE_AND_COPY": "Execute & copy", "RELOAD": "Recarregar", "CANCEL": "Cancelar", + "SELECTORS": { + "ENABLED": "Enabled", + "DISABLED": "Disabled" + }, "CONNECTION_WINDOW": { "HOST": "Host", "PORT": "Port", @@ -683,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Sempre 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Nunca usado)", @@ -703,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Porcentagem do HP máximo tem que ser igual; 1 = Porcentagem do HP máximo tem que ser maior; 2 = Porcentagem do HP máximo tem que ser menor; 3 = Porcentagem do HP máximo tem que ser maior ou igual; 4 = Porcentagem do HP máximo tem que ser menor ou igual", "CONDITION_STAND_STATE": "Exact stand state, ou generic state (levantar/sentar), denpendendo no valor 10 = Standing/Levantado; 1 = Sitting/Sentado", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - veja quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - veja quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Nunca usado)", @@ -857,4 +863,4 @@ "REQUIRED_AURA_VISION": "Desconhecido. Somente 16 Spells usam um valor diferente de 0. Talvez é usado para efeitos visuais." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/ro.json b/apps/keira/src/assets/i18n/ro.json index 3bfad0da05..15b30545d2 100644 --- a/apps/keira/src/assets/i18n/ro.json +++ b/apps/keira/src/assets/i18n/ro.json @@ -687,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -707,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -861,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/ru.json b/apps/keira/src/assets/i18n/ru.json index 35e3cf7a1f..8b88571dc7 100644 --- a/apps/keira/src/assets/i18n/ru.json +++ b/apps/keira/src/assets/i18n/ru.json @@ -48,6 +48,10 @@ "EXECUTE_AND_COPY": "Execute & copy", "RELOAD": "Перезагрузить", "CANCEL": "Отменить", + "SELECTORS": { + "ENABLED": "Enabled", + "DISABLED": "Disabled" + }, "CONNECTION_WINDOW": { "HOST": "Хост", "PORT": "Порт", @@ -683,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -703,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -857,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/sk.json b/apps/keira/src/assets/i18n/sk.json index 3bfad0da05..15b30545d2 100644 --- a/apps/keira/src/assets/i18n/sk.json +++ b/apps/keira/src/assets/i18n/sk.json @@ -687,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -707,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -861,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/sv.json b/apps/keira/src/assets/i18n/sv.json index 9b25fb4acb..fa52bd4810 100644 --- a/apps/keira/src/assets/i18n/sv.json +++ b/apps/keira/src/assets/i18n/sv.json @@ -48,6 +48,10 @@ "EXECUTE_AND_COPY": "Execute & copy", "RELOAD": "Ladda om", "CANCEL": "Avbryt", + "SELECTORS": { + "ENABLED": "Enabled", + "DISABLED": "Disabled" + }, "CONNECTION_WINDOW": { "HOST": "Host", "PORT": "Port", @@ -683,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -703,7 +708,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", @@ -857,4 +863,4 @@ "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } } -} +} \ No newline at end of file diff --git a/apps/keira/src/assets/i18n/zh.json b/apps/keira/src/assets/i18n/zh.json index ef3a6da10a..ef8c7bee0b 100644 --- a/apps/keira/src/assets/i18n/zh.json +++ b/apps/keira/src/assets/i18n/zh.json @@ -48,6 +48,10 @@ "EXECUTE_AND_COPY": "Execute & copy", "RELOAD": "重新加载", "CANCEL": "取消", + "SELECTORS": { + "ENABLED": "Enabled", + "DISABLED": "Disabled" + }, "CONNECTION_WINDOW": { "HOST": "主机", "PORT": "端口", @@ -237,6 +241,7 @@ "HOVER_HEIGHT": "如果设置了MOVEMENTFLAG_DISABLE_GRAVITY,则生物悬停在地面上的距离在这里设置", "SCALE": "生物尺寸控制(生物模型的大小)。如果为0,则使用DBC默认模型大小。", "DAMAGE_MODIFIER": "伤害倍数,影响mindmg和maxdmg", + "ARMOR_MODIFIER_TOOLTIP": "Damage taken from physical attacks, a value of 1 is normal; Values under 1 mean it will take more damage; Values over 1 mean it will take less damage", "SPEED_RUN": "控制生物的移动速度。对于飞行载具来说,提高飞行速度。", "SPEED_WALK": "控制生物的奔跑速度。对于陆地载具来说,提高地面移动速度。", "SPEED_SWIM": "控制生物游泳的速度。", @@ -262,6 +267,7 @@ }, "SPAWN": { "ORIENTATION": "生物刷新的方向。(北=0.0;南=圆周率(3.14159)", + "EQUIPMENT_ID_TOOLTIP": "1 = uses the info set in equipment template 0 = no weapons equipped", "SPAWN_DIST_TOOLTIP": "生物刷新点的刷新范围距离。如果MovementType = 1,就是生物刷新后可以走多远。", "SCRIPT_NAME": "此生物使用的C++脚本的名称(如果有的话)。", "GUID": "creature表中的guid字段", @@ -681,7 +687,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "总是 0", "CONDITION_QUESTSTATE": "quest_template表的ID字段", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template表的id字段" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template表的id字段", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(未使用)", @@ -701,7 +708,8 @@ "CONDITION_HP_PCT": "比较类型: 0 = 最大生命值必须相等; 1 = 最大生命值的百分比必须更高; 2 = 最大生命值的百分比必须更低; 3 = 最大生命值的百分比必须等于或高于; 4 = 最大生命值的百分比必须等于或低于", "CONDITION_STAND_STATE": "站立/坐下的状态, 10 = 站立; 1 = 坐下", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "任务目标ID - 参见quest_template表的RequiredNpcOrGo字段" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "任务目标ID - 参见quest_template表的RequiredNpcOrGo字段", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(从未使用)", @@ -855,4 +863,4 @@ "REQUIRED_AURA_VISION": "未知...只有16个法术使用,其他均为0,可以用于视觉效果。" } } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 109621cc8b..cea82ae18e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,7 +62,7 @@ "@types/jasminewd2": "2.0.13", "@types/jquery": "3.5.32", "@types/mysql": "2.15.26", - "@types/node": "22.10.2", + "@types/node": "22.10.5", "@types/sqlite3": "3.1.11", "@types/sqlstring": "2.3.2", "@typescript-eslint/eslint-plugin": "7.18.0", @@ -8382,9 +8382,9 @@ } }, "node_modules/@types/node": { - "version": "22.10.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", - "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "version": "22.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz", + "integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" diff --git a/package.json b/package.json index 72b751b943..8a597889f9 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@types/jasminewd2": "2.0.13", "@types/jquery": "3.5.32", "@types/mysql": "2.15.26", - "@types/node": "22.10.2", + "@types/node": "22.10.5", "@types/sqlite3": "3.1.11", "@types/sqlstring": "2.3.2", "@typescript-eslint/eslint-plugin": "7.18.0", From a5bd8870b68cd50988c3f6e95d51a00b71e3f90e Mon Sep 17 00:00:00 2001 From: Exitare Date: Sat, 11 Jan 2025 07:15:39 -0800 Subject: [PATCH 06/18] feat(pagination): update editor to jump back to first page after a new search was triggered (#3233) * Update editor to jump back to first page after a new search was triggered * Remove debug line of code --- .../select-conditions/select-conditions.component.html | 2 ++ .../src/select-creature/select-creature.component.html | 2 ++ .../select-gameobject/select-gameobject.component.html | 2 ++ .../gossip/src/select-gossip/select-gossip.component.html | 2 ++ .../item/src/select-item/select-item.component.html | 2 ++ libs/features/other-loots/src/select-loot.component.html | 2 ++ .../quest/src/select-quest/select-quest.component.html | 2 ++ .../spell/src/select-spell/select-spell.component.html | 2 ++ .../components/editors/select-complex-key.component.ts | 6 +++++- .../src/components/editors/select.component.ts | 6 +++++- .../src/service/select/search.service.ts | 4 ++++ libs/shared/constants/src/types/general.ts | 8 ++++++++ 12 files changed, 38 insertions(+), 2 deletions(-) diff --git a/libs/features/conditions/src/select-conditions/select-conditions.component.html b/libs/features/conditions/src/select-conditions/select-conditions.component.html index 3809c1403a..ffb314bf4c 100644 --- a/libs/features/conditions/src/select-conditions/select-conditions.component.html +++ b/libs/features/conditions/src/select-conditions/select-conditions.component.html @@ -79,6 +79,8 @@ [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" (select)="onSelect($event)" + [offset]="selectService.pageOffset" + (page)="onPage($event)" > diff --git a/libs/features/creature/src/select-creature/select-creature.component.html b/libs/features/creature/src/select-creature/select-creature.component.html index b14fbcddd9..a621890f3c 100644 --- a/libs/features/creature/src/select-creature/select-creature.component.html +++ b/libs/features/creature/src/select-creature/select-creature.component.html @@ -52,6 +52,8 @@ [rowHeight]="DTCFG.rowHeight" [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" + [offset]="selectService.pageOffset" + (page)="onPage($event)" (select)="selectService.onSelect($event)" > diff --git a/libs/features/gameobject/src/select-gameobject/select-gameobject.component.html b/libs/features/gameobject/src/select-gameobject/select-gameobject.component.html index 8cbfb50b15..de3c8a806c 100644 --- a/libs/features/gameobject/src/select-gameobject/select-gameobject.component.html +++ b/libs/features/gameobject/src/select-gameobject/select-gameobject.component.html @@ -59,6 +59,8 @@ [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" (select)="selectService.onSelect($event)" + [offset]="selectService.pageOffset" + (page)="onPage($event)" > diff --git a/libs/features/gossip/src/select-gossip/select-gossip.component.html b/libs/features/gossip/src/select-gossip/select-gossip.component.html index 7e5d756175..ab7f04d1c1 100644 --- a/libs/features/gossip/src/select-gossip/select-gossip.component.html +++ b/libs/features/gossip/src/select-gossip/select-gossip.component.html @@ -47,6 +47,8 @@ [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" (select)="selectService.onSelect($event)" + [offset]="selectService.pageOffset" + (page)="onPage($event)" > diff --git a/libs/features/item/src/select-item/select-item.component.html b/libs/features/item/src/select-item/select-item.component.html index 5ee48186f0..6f172db211 100644 --- a/libs/features/item/src/select-item/select-item.component.html +++ b/libs/features/item/src/select-item/select-item.component.html @@ -47,6 +47,8 @@ [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" (select)="selectService.onSelect($event)" + [offset]="selectService.pageOffset" + (page)="onPage($event)" > diff --git a/libs/features/other-loots/src/select-loot.component.html b/libs/features/other-loots/src/select-loot.component.html index fe6d0e6935..0bd0f07ab9 100644 --- a/libs/features/other-loots/src/select-loot.component.html +++ b/libs/features/other-loots/src/select-loot.component.html @@ -45,6 +45,8 @@ [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" (select)="selectService.onSelect($event)" + [offset]="selectService.pageOffset" + (page)="onPage($event)" > diff --git a/libs/features/quest/src/select-quest/select-quest.component.html b/libs/features/quest/src/select-quest/select-quest.component.html index 78154514b9..491555ab80 100644 --- a/libs/features/quest/src/select-quest/select-quest.component.html +++ b/libs/features/quest/src/select-quest/select-quest.component.html @@ -47,6 +47,8 @@ [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" (select)="selectService.onSelect($event)" + [offset]="selectService.pageOffset" + (page)="onPage($event)" > diff --git a/libs/features/spell/src/select-spell/select-spell.component.html b/libs/features/spell/src/select-spell/select-spell.component.html index 3081aa58e1..5806c25c27 100644 --- a/libs/features/spell/src/select-spell/select-spell.component.html +++ b/libs/features/spell/src/select-spell/select-spell.component.html @@ -68,6 +68,8 @@ [limit]="DTCFG.limit" [selectionType]="DTCFG.selectionType" (select)="selectService.onSelect($event)" + [offset]="selectService.pageOffset" + (page)="onPage($event)" > diff --git a/libs/shared/base-abstract-classes/src/components/editors/select-complex-key.component.ts b/libs/shared/base-abstract-classes/src/components/editors/select-complex-key.component.ts index 066816364f..11161c6805 100644 --- a/libs/shared/base-abstract-classes/src/components/editors/select-complex-key.component.ts +++ b/libs/shared/base-abstract-classes/src/components/editors/select-complex-key.component.ts @@ -1,5 +1,5 @@ import { ComplexKeyHandlerService } from '../../service/handlers/complex-key.handler.service'; -import { TableRow, WIKI_BASE_URL } from '@keira/shared/constants'; +import { DataTablePageEvent, TableRow, WIKI_BASE_URL } from '@keira/shared/constants'; import { DTCFG } from '@keira/shared/config'; import { ChangeDetectorRef, inject } from '@angular/core'; import { SearchService } from '../../service/select/search.service'; @@ -25,4 +25,8 @@ export abstract class SelectComplexKeyComponent { onSearch(): void { this.selectService.onSearch(this.changeDetectorRef); } + + onPage(event: DataTablePageEvent): void { + this.selectService.pageOffset = event.offset; + } } diff --git a/libs/shared/base-abstract-classes/src/components/editors/select.component.ts b/libs/shared/base-abstract-classes/src/components/editors/select.component.ts index 2c071811f4..46affa11f2 100644 --- a/libs/shared/base-abstract-classes/src/components/editors/select.component.ts +++ b/libs/shared/base-abstract-classes/src/components/editors/select.component.ts @@ -1,6 +1,6 @@ /* istanbul ignore file */ // TODO: fix coverage import { ChangeDetectorRef, inject } from '@angular/core'; -import { TableRow } from '@keira/shared/constants'; +import { DataTablePageEvent, TableRow } from '@keira/shared/constants'; import { SelectService } from '../../service/select/select.service'; import { MysqlQueryService } from '@keira/shared/db-layer'; import { HandlerService } from '../../service/handlers/handler.service'; @@ -21,4 +21,8 @@ export abstract class SelectComponent { onSearch(): void { this.selectService.onSearch(this.changeDetectorRef); } + + onPage(event: DataTablePageEvent): void { + this.selectService.pageOffset = event.offset; + } } diff --git a/libs/shared/base-abstract-classes/src/service/select/search.service.ts b/libs/shared/base-abstract-classes/src/service/select/search.service.ts index bf58d87cf3..83d5bcadae 100644 --- a/libs/shared/base-abstract-classes/src/service/select/search.service.ts +++ b/libs/shared/base-abstract-classes/src/service/select/search.service.ts @@ -7,6 +7,7 @@ import { ModelForm, ModelNestedForm, SubscriptionHandler } from '@keira/shared/u export abstract class SearchService extends SubscriptionHandler { query: string; rows: T[] | undefined; + pageOffset = 0; // Initialize to the first page fields: FormGroup> = new FormGroup({} as any); queryForm = new FormGroup>>({ limit: new FormControl(50) as any, // TODO: fix typing @@ -43,6 +44,9 @@ export abstract class SearchService extends SubscriptionHand } onSearch(changeDetectorRef: ChangeDetectorRef): void { + // Reset to the first page + this.pageOffset = 0; + this.subscriptions.push( this.queryService.query(this.query).subscribe((data) => { this.rows = data as T[]; diff --git a/libs/shared/constants/src/types/general.ts b/libs/shared/constants/src/types/general.ts index 3f223bd79c..0f0e025b71 100644 --- a/libs/shared/constants/src/types/general.ts +++ b/libs/shared/constants/src/types/general.ts @@ -48,3 +48,11 @@ export interface FieldDefinition { name: string; tooltip: string; } + +// Defines a type for the ngx datatable page event +export interface DataTablePageEvent { + count: number; // Total number of rows in the table + pageSize: number; // Number of rows per page (same as the 'limit' property) + limit: number; // Maximum rows displayed per page (also same as 'pageSize') + offset: number; // Current page index (0-based) +} From 1efeb1845bad5162062b00577f5beac5cfec64ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 16:36:21 +0100 Subject: [PATCH 07/18] chore(deps): update dependency @swc/core to v1.10.7 (#3220) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 86 +++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index cea82ae18e..3922af4002 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7740,9 +7740,9 @@ } }, "node_modules/@swc/core": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.2.tgz", - "integrity": "sha512-d3reIYowBL6gbp4jC6FRZ3hE0eWcWwqh0XcHd6k5rKF/oZA6jLb7gxIRduJhrn+jyLz/HCC8WyfomUkEcs7iZQ==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.7.tgz", + "integrity": "sha512-py91kjI1jV5D5W/Q+PurBdGsdU5TFbrzamP7zSCqLdMcHkKi3rQEM5jkQcZr0MXXSJTaayLxS3MWYTBIkzPDrg==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -7758,16 +7758,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.10.2", - "@swc/core-darwin-x64": "1.10.2", - "@swc/core-linux-arm-gnueabihf": "1.10.2", - "@swc/core-linux-arm64-gnu": "1.10.2", - "@swc/core-linux-arm64-musl": "1.10.2", - "@swc/core-linux-x64-gnu": "1.10.2", - "@swc/core-linux-x64-musl": "1.10.2", - "@swc/core-win32-arm64-msvc": "1.10.2", - "@swc/core-win32-ia32-msvc": "1.10.2", - "@swc/core-win32-x64-msvc": "1.10.2" + "@swc/core-darwin-arm64": "1.10.7", + "@swc/core-darwin-x64": "1.10.7", + "@swc/core-linux-arm-gnueabihf": "1.10.7", + "@swc/core-linux-arm64-gnu": "1.10.7", + "@swc/core-linux-arm64-musl": "1.10.7", + "@swc/core-linux-x64-gnu": "1.10.7", + "@swc/core-linux-x64-musl": "1.10.7", + "@swc/core-win32-arm64-msvc": "1.10.7", + "@swc/core-win32-ia32-msvc": "1.10.7", + "@swc/core-win32-x64-msvc": "1.10.7" }, "peerDependencies": { "@swc/helpers": "*" @@ -7779,9 +7779,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.2.tgz", - "integrity": "sha512-xPDbCUfGdVjA/0yhRFVSyog73wO3/W3JNgx1PkOcCc+0OgZtgAnt4YD8QbSsUE+euc5bQJs/7HfJQ3305+HWVA==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.7.tgz", + "integrity": "sha512-SI0OFg987P6hcyT0Dbng3YRISPS9uhLX1dzW4qRrfqQdb0i75lPJ2YWe9CN47HBazrIA5COuTzrD2Dc0TcVsSQ==", "cpu": [ "arm64" ], @@ -7796,9 +7796,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.10.2.tgz", - "integrity": "sha512-Dm4R9ffQw4yrGjvdYxxuO5RViwkRkSsn64WF7YGYZIlhkyFoseibPnQlOsx5qnjquc8f3h1C8/806XG+y3rMaQ==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.10.7.tgz", + "integrity": "sha512-RFIAmWVicD/l3RzxgHW0R/G1ya/6nyMspE2cAeDcTbjHi0I5qgdhBWd6ieXOaqwEwiCd0Mot1g2VZrLGoBLsjQ==", "cpu": [ "x64" ], @@ -7813,9 +7813,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.10.2.tgz", - "integrity": "sha512-aXTqgel7AueM7CcCOFFUq6+gJyD/A3rFBWxPT6wA34IC7oQ0IIFpJjBLl8zN6/0aZ4OQ1ExlQ7zoKaTlk5tBug==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.10.7.tgz", + "integrity": "sha512-QP8vz7yELWfop5mM5foN6KkLylVO7ZUgWSF2cA0owwIaziactB2hCPZY5QU690coJouk9KmdFsPWDnaCFUP8tg==", "cpu": [ "arm" ], @@ -7830,9 +7830,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.10.2.tgz", - "integrity": "sha512-HYFag6ULpnVMnHuKKAFuZH3kco/2eKKZ24I+gI2M4JlIW4soDmP8Oc2eAADIloln4SfQXzADX34m6merCWp65g==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.10.7.tgz", + "integrity": "sha512-NgUDBGQcOeLNR+EOpmUvSDIP/F7i/OVOKxst4wOvT5FTxhnkWrW+StJGKj+DcUVSK5eWOYboSXr1y+Hlywwokw==", "cpu": [ "arm64" ], @@ -7847,9 +7847,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.10.2.tgz", - "integrity": "sha512-N8es+V+M9GijYsxfiIG3NJ+lHgoZosX+yjblc5eOx0xrBDeqH3kNLhJpctOczrJk0rUjN+zX5x+8H8qurcEAaw==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.10.7.tgz", + "integrity": "sha512-gp5Un3EbeSThBIh6oac5ZArV/CsSmTKj5jNuuUAuEsML3VF9vqPO+25VuxCvsRf/z3py+xOWRaN2HY/rjMeZog==", "cpu": [ "arm64" ], @@ -7864,9 +7864,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.10.2.tgz", - "integrity": "sha512-fI4rxJkWQaNeG4UcuqKJrc1JM+nAwIzzFba9+A4Aohc6z0EgPokrA1v7WmPUObO+cdZjVXdMpDGkhGQhbok1aQ==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.10.7.tgz", + "integrity": "sha512-k/OxLLMl/edYqbZyUNg6/bqEHTXJT15l9WGqsl/2QaIGwWGvles8YjruQYQ9d4h/thSXLT9gd8bExU2D0N+bUA==", "cpu": [ "x64" ], @@ -7881,9 +7881,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.10.2.tgz", - "integrity": "sha512-ycDOxBgII/2xkusMgq2S9n81IQ8SeWk1FU0zuUsZrUkaXEq/78+nHFo/0IStPLrtRxzG2gJ0JZvfaa6jMxr79Q==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.10.7.tgz", + "integrity": "sha512-XeDoURdWt/ybYmXLCEE8aSiTOzEn0o3Dx5l9hgt0IZEmTts7HgHHVeRgzGXbR4yDo0MfRuX5nE1dYpTmCz0uyA==", "cpu": [ "x64" ], @@ -7898,9 +7898,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.10.2.tgz", - "integrity": "sha512-s7/UrbdfYGdUar+Nj8jxNeXaFdryWnKuJU5udDONgk9gb1xp7K5TPxBL9j7EtCrAenM2sR9Bd84ZemwzyZ/VLw==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.10.7.tgz", + "integrity": "sha512-nYAbi/uLS+CU0wFtBx8TquJw2uIMKBnl04LBmiVoFrsIhqSl+0MklaA9FVMGA35NcxSJfcm92Prl2W2LfSnTqQ==", "cpu": [ "arm64" ], @@ -7915,9 +7915,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.10.2.tgz", - "integrity": "sha512-sz8f+dmrzb816Ji25G+vs8HMq6zHq1IMKF4hVUnSJKdNr2k789+qRjF1fnv3YDcz5kkeYSvolXqVS1mCezDebg==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.10.7.tgz", + "integrity": "sha512-+aGAbsDsIxeLxw0IzyQLtvtAcI1ctlXVvVcXZMNXIXtTURM876yNrufRo4ngoXB3jnb1MLjIIjgXfFs/eZTUSw==", "cpu": [ "ia32" ], @@ -7932,9 +7932,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.10.2.tgz", - "integrity": "sha512-XXYHuc5KdhuLx1nP8cEKW+5Kakxy+iq/jcuJ52+27E2uB+xxzLeXvbPvz645je3Cti5nQ4la2HIn6tpST5ufSw==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.10.7.tgz", + "integrity": "sha512-TBf4clpDBjF/UUnkKrT0/th76/zwvudk5wwobiTFqDywMApHip5O0VpBgZ+4raY2TM8k5+ujoy7bfHb22zu17Q==", "cpu": [ "x64" ], From 14aa948be880b28a1f426e8ee39af57f682c4bd7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 16:36:29 +0100 Subject: [PATCH 08/18] chore(deps): update nx monorepo to v20.3.1 (#3238) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 210 +++++++++++++++++++++++----------------------- package.json | 20 ++--- 2 files changed, 115 insertions(+), 115 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3922af4002..415f3cb7d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,11 +47,11 @@ "@angular/platform-browser-dynamic": "18.2.12", "@angular/router": "18.2.12", "@fortawesome/fontawesome-free": "6.7.2", - "@nx/angular": "20.3.0", - "@nx/eslint": "20.3.0", - "@nx/eslint-plugin": "20.3.0", - "@nx/js": "20.3.0", - "@nx/workspace": "20.3.0", + "@nx/angular": "20.3.1", + "@nx/eslint": "20.3.1", + "@nx/eslint-plugin": "20.3.1", + "@nx/js": "20.3.1", + "@nx/workspace": "20.3.1", "@playwright/test": "1.49.1", "@schematics/angular": "18.2.12", "@siemens/ngx-datatable": "22.4.1", @@ -94,7 +94,7 @@ "ngx-highlightjs": "10.0.0", "ngx-page-object-model": "0.0.3", "npm-run-all2": "7.0.2", - "nx": "20.3.0", + "nx": "20.3.1", "playwright": "1.49.1", "prettier": "3.4.2", "pretty-quick": "4.0.0", @@ -109,10 +109,10 @@ "zone.js": "0.14.10" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.3.0", - "@nx/nx-darwin-x64": "20.3.0", - "@nx/nx-linux-x64-gnu": "20.3.0", - "@nx/nx-win32-x64-msvc": "20.3.0" + "@nx/nx-darwin-arm64": "20.3.1", + "@nx/nx-darwin-x64": "20.3.1", + "@nx/nx-linux-x64-gnu": "20.3.1", + "@nx/nx-win32-x64-msvc": "20.3.1" } }, "node_modules/@adobe/css-tools": { @@ -5550,19 +5550,19 @@ } }, "node_modules/@nx/angular": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/angular/-/angular-20.3.0.tgz", - "integrity": "sha512-QdgHkOza4f3brmyepHoMvpMKFyPXTGvp5R4zImq0hkwX4UguZyKgSEQV5ldOPsDxe9HOAgypXZnGo/CfQAdhmQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/angular/-/angular-20.3.1.tgz", + "integrity": "sha512-z73TiRPBkKN48krfcnPBe3TyQGprFDFlylq5WzpIwP6OCEzVuW9mkQCZMQCRd3psAzxUA7AkMbiVzbKcT3huAw==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.3.0", - "@nx/eslint": "20.3.0", - "@nx/js": "20.3.0", - "@nx/module-federation": "20.3.0", - "@nx/web": "20.3.0", - "@nx/webpack": "20.3.0", - "@nx/workspace": "20.3.0", + "@nx/devkit": "20.3.1", + "@nx/eslint": "20.3.1", + "@nx/js": "20.3.1", + "@nx/module-federation": "20.3.1", + "@nx/web": "20.3.1", + "@nx/webpack": "20.3.1", + "@nx/workspace": "20.3.1", "@phenomnomnominal/tsquery": "~5.0.1", "@typescript-eslint/type-utils": "^8.0.0", "chalk": "^4.1.0", @@ -5597,9 +5597,9 @@ } }, "node_modules/@nx/devkit": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.3.0.tgz", - "integrity": "sha512-u9oRd2F33DLNWPbzpYGW7xuMEYUAOwO9DLP9nGYpxbZXy6Z4AdoKeqhN+KBTyg8+DyQGuKUSEXcWriDyLLgcHw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.3.1.tgz", + "integrity": "sha512-Z6VdBg5GRu2Vg9FpeQJY+zQ1TvBoMWk8cTCZOf8J6myjoWYbksRfpWfNIvEk9OUsEMhpg98vxH2Cc8JR1zfiew==", "dev": true, "license": "MIT", "dependencies": { @@ -5617,14 +5617,14 @@ } }, "node_modules/@nx/eslint": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/eslint/-/eslint-20.3.0.tgz", - "integrity": "sha512-QhApF0HAcMm0tc7kXna4XuFUuO3oroWvGmvzGqBSa3GyuXbAz1VJ1RFWYkyQzjAsltaBcMUFCA+ORUM+PN1sWA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/eslint/-/eslint-20.3.1.tgz", + "integrity": "sha512-7yhS9LIipg60Dj0/3tGA11jpz1+ToeITze1/wTcQfgNSVN+ZXC21t2/UracI9+ReituWENM12S0ZurNef7zm/A==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.3.0", - "@nx/js": "20.3.0", + "@nx/devkit": "20.3.1", + "@nx/js": "20.3.1", "semver": "^7.5.3", "tslib": "^2.3.0", "typescript": "~5.6.2" @@ -5640,14 +5640,14 @@ } }, "node_modules/@nx/eslint-plugin": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-20.3.0.tgz", - "integrity": "sha512-U9DvbR7quyfnWk8ZCJlwKbIInZ5gd4be93X5gii966vM81n3lbWLc7y4avU4r3732X2pnpFGJqBgP8ov8JE/fw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/eslint-plugin/-/eslint-plugin-20.3.1.tgz", + "integrity": "sha512-R+slt72ZLisT2uPpOJGUt/HnVf8hDWZvUcqyrSKJ8A8XZQlBYnSaFuKerse/if/en6iRAzjSWjUo9vnBIFgVIQ==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.3.0", - "@nx/js": "20.3.0", + "@nx/devkit": "20.3.1", + "@nx/js": "20.3.1", "@typescript-eslint/type-utils": "^8.0.0", "@typescript-eslint/utils": "^8.0.0", "chalk": "^4.1.0", @@ -5695,9 +5695,9 @@ } }, "node_modules/@nx/js": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/js/-/js-20.3.0.tgz", - "integrity": "sha512-hnO1jzJUvO7+bBsC2uaUElpX9gpMiSA3wdt34V8nnPcIBWtdMrjKX7yRFSwZKimeNauesiX0uorTJf+z28R2bg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/js/-/js-20.3.1.tgz", + "integrity": "sha512-IHf1rLiwH1NUMphedJJMfstehD94IkwU4YxOkUMRA1tPbrmidF391gh70pE4VMkji/jzzkQXYhNsrNnAN6LRpw==", "dev": true, "license": "MIT", "dependencies": { @@ -5708,8 +5708,8 @@ "@babel/preset-env": "^7.23.2", "@babel/preset-typescript": "^7.22.5", "@babel/runtime": "^7.22.6", - "@nx/devkit": "20.3.0", - "@nx/workspace": "20.3.0", + "@nx/devkit": "20.3.1", + "@nx/workspace": "20.3.1", "@zkochan/js-yaml": "0.0.7", "babel-plugin-const-enum": "^1.0.1", "babel-plugin-macros": "^2.8.0", @@ -5923,18 +5923,18 @@ } }, "node_modules/@nx/module-federation": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/module-federation/-/module-federation-20.3.0.tgz", - "integrity": "sha512-txb3Gs9BkxnCo0Xo0EYqs8dRyScue4p6AcIxHHaTne469JS1qKzr0rGSpkL3j6KH5PAjfDpp8XZHtQg4Yd3TsQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/module-federation/-/module-federation-20.3.1.tgz", + "integrity": "sha512-q0yHodPHekZqR1fxBaTf7eyyTL0vMBQAFAUhKdLugdd3yOE1pkDk0wwUTQdaqak0JHKilfFW9qIJsy0X+Gsrpw==", "dev": true, "license": "MIT", "dependencies": { "@module-federation/enhanced": "0.7.6", "@module-federation/node": "2.6.11", "@module-federation/sdk": "0.7.6", - "@nx/devkit": "20.3.0", - "@nx/js": "20.3.0", - "@nx/web": "20.3.0", + "@nx/devkit": "20.3.1", + "@nx/js": "20.3.1", + "@nx/web": "20.3.1", "@rspack/core": "^1.1.5", "express": "^4.19.2", "http-proxy-middleware": "^3.0.3", @@ -6076,9 +6076,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.3.0.tgz", - "integrity": "sha512-9PqSe1Sh7qNqA4GL0cZH0t3S0EZzb2Xn14XY9au7yf0+eoxyag1oETjjULrxLeUmSoXW2hDxzNtoqKFE9zF07Q==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.3.1.tgz", + "integrity": "sha512-bx++T9/8l4PK1yDTxPnROT7RG8CkWGkxKC0D7xlS/YQzE7CelDfgNYu0Bd7upZF4gafW2Uz3dd3j6WhvZLxbbg==", "cpu": [ "arm64" ], @@ -6092,9 +6092,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.3.0.tgz", - "integrity": "sha512-gsGGhJVvi5QZVVTZie5sNMo1zOAU+A2edm6DGegObdFRLV41Ju/Yrm/gTaSp4yUtywd3UU4S/30C/nI2c55adA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.3.1.tgz", + "integrity": "sha512-elg2GiSivMHU1iLFYZ+FojM2V/FmTlC8e5FKM6nZ+bIqeoBoJm8Rxxe/kEtcsPdvjj+YiKSmXOP9s45DJb9WWw==", "cpu": [ "x64" ], @@ -6108,9 +6108,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.3.0.tgz", - "integrity": "sha512-DiymYZBBu0upbiskdfn9KRyoXdyvKohezJiV3j4VkeRE8KR2p04NgwRQviDFbeD1cjWrDy9wk8y+G5PabLlqAA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.3.1.tgz", + "integrity": "sha512-1iKZOCcU7bVAC2kdoukfJ7AOTLBhm69+vPff3HCJQ0DI/5ZbmiaPeBMsAVFtJ0jFGix8yYIhgvtXgDEfbXXRFQ==", "cpu": [ "x64" ], @@ -6125,9 +6125,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.3.0.tgz", - "integrity": "sha512-Aksx66e8jmt/4rGJ/5z34SWXbPcYr9Ht52UonEeuCdQdoEvAOs7yBUbllYOjIcUsfZikEyZgvqfiQslsggSJdQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.3.1.tgz", + "integrity": "sha512-LAteJ1/mWYdvj7zpXuWRUq1lvUiV6YVXCdFK3+7lDW+qvW3bb5zzUwbVDAF/pPeTjBrsdHDzSWOCLm/LKtYtMw==", "cpu": [ "arm" ], @@ -6142,9 +6142,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.3.0.tgz", - "integrity": "sha512-Y5wmYEwF1bl014Ps8QjagI911VbViQSFHSTVOCNSObdAzig9E5o6NOkoWe+doT1UZLrrInnlkrggQUsbtdKjOg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.3.1.tgz", + "integrity": "sha512-2Qf+6NcAeODELyJR+V9hjC9kl2DwJTdI7Bw+BuiyXftfPHvZ86P//FC8kPjNaJCEEm/ZStP6Jcb1zlp4Eo2wBw==", "cpu": [ "arm64" ], @@ -6159,9 +6159,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.3.0.tgz", - "integrity": "sha512-yGcIkmImyOMfPkQSYH2EVjPmFE0VkLcO71Bbkpr3RlJ1N/vjYxsGbdnqPiBb8Wshib/hmwpiMHf/yzQtKH0SQw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.3.1.tgz", + "integrity": "sha512-8S8jlN6GFQpRakZ2ZVWq6eFnLVrEObIaxnYD0QMbsMf+qiedDJt+cDh1xebcPRvgpSgJVlJ8P6hun5+K/FiQDQ==", "cpu": [ "arm64" ], @@ -6176,9 +6176,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.3.0.tgz", - "integrity": "sha512-nkA2DLI+rpmiuiy7dyXP4l9s7dgHkQWDX7lG1XltiT41RzAReJF1h8qBE6XrsAYE1CtI76DRWVphnc93+iZr+A==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.3.1.tgz", + "integrity": "sha512-qC2On2qwYCtn/Kt8epvUn0H3NY6zG9yYhiNjkm6RvVTDmvogFQ4gtfiWSRP/EnabCRqM8FACDIO/ws5CnRBX+Q==", "cpu": [ "x64" ], @@ -6192,9 +6192,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.3.0.tgz", - "integrity": "sha512-sPMtTt9iTrCmFEIp9Qv27UX9PeL1aqKck2dz2TAFbXKVtF6+djOdTcNnTYw45KIP6izcUcOXXAq4G0QSQE7CLg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.3.1.tgz", + "integrity": "sha512-KKwHSfV1PEKW82eJ8vxZTPepoaLbaXH/aI0VOKZbBO4ytGyGUr9wFuWPsyo06rK7qtSD7w9bN7xpiBGQk0QTsg==", "cpu": [ "x64" ], @@ -6209,9 +6209,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.3.0.tgz", - "integrity": "sha512-ppfNa/8OfpWA9o26Pz3vArN4ulAC+Hx70/ghPRCP7ed1Mb3Z6yR2Ry9KfBRImbqajvuAExM0TePKMGq9LCdXmg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.3.1.tgz", + "integrity": "sha512-YujkXXHn9rhtwZRDxiaxSPOMX7JkfGmXAFdyEfxhE3Dc/HjFgI+xJZ478/atttR7DWIwGpQJVLpbFWbFFpoNNg==", "cpu": [ "arm64" ], @@ -6226,9 +6226,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.3.0.tgz", - "integrity": "sha512-8FOejZ4emtLSVn3pYWs4PIc3n4//qMbwMDPVxmPE8us3ir91Qh0bzr5zRj7Q8sEdSgvneXRXqtBp2grY2KMJsw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.3.1.tgz", + "integrity": "sha512-Os8iCamvHhE5noQKFE9D9xkiI529918tufTYmEhJ9ZmLU/ybVA0We6r7gXjYzdNfA3DtwfGXvNvUpy3u+pZXOg==", "cpu": [ "x64" ], @@ -6242,14 +6242,14 @@ } }, "node_modules/@nx/web": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/web/-/web-20.3.0.tgz", - "integrity": "sha512-MKmXI9uAX+fdLY0GfF/3rH4EXrEjyLI6FSt3kUuF1/UzAUUUqww6owoM+9EaC1mRcCYDd0nwN7piblVz/wIVLw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/web/-/web-20.3.1.tgz", + "integrity": "sha512-l//KatoXLYKd8fcqvAD2695w4bVh+8lSTIKmZDjciUu4HxS8xhZenE35SYYxpcBijQRcvUc84MoJNuKKazZb1A==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.3.0", - "@nx/js": "20.3.0", + "@nx/devkit": "20.3.1", + "@nx/js": "20.3.1", "detect-port": "^1.5.1", "http-server": "^14.1.0", "picocolors": "^1.1.0", @@ -6257,15 +6257,15 @@ } }, "node_modules/@nx/webpack": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/webpack/-/webpack-20.3.0.tgz", - "integrity": "sha512-KW04Ge8cQtv5RmezWV6bsIptLwXNhq5d6Ew3GigL5h6BKYPEmyMes5yMSUsNqNGC1SPI5nNPwzRkTxW18b+jnA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/webpack/-/webpack-20.3.1.tgz", + "integrity": "sha512-HH3yyVi/kyElapa6cgMTIw3nhqIl/DGM9d7IvpgYd0JJ7pG872rVjwxcagXPwZRQeVPePnMjVX6J/ckPDCV7Ww==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.23.2", - "@nx/devkit": "20.3.0", - "@nx/js": "20.3.0", + "@nx/devkit": "20.3.1", + "@nx/js": "20.3.1", "@phenomnomnominal/tsquery": "~5.0.1", "ajv": "^8.12.0", "autoprefixer": "^10.4.9", @@ -6635,16 +6635,16 @@ } }, "node_modules/@nx/workspace": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-20.3.0.tgz", - "integrity": "sha512-z8NSAo5SiLEMPuwasDvLdCCtaTGdINh1cSZMCom8HeLbT8F7risbR0IlHVqVrKj9FPKqrAIsH+4knVb4dHHCnQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-20.3.1.tgz", + "integrity": "sha512-2GQX19POWzTDV8XIAc/UCNruzs77jD2WwAkYAOveiTBqJIJVd64ueOBXZw1YkZLhXTFd0C13xT1CFo2fOvyJLg==", "dev": true, "license": "MIT", "dependencies": { - "@nx/devkit": "20.3.0", + "@nx/devkit": "20.3.1", "chalk": "^4.1.0", "enquirer": "~2.3.6", - "nx": "20.3.0", + "nx": "20.3.1", "tslib": "^2.3.0", "yargs-parser": "21.1.1" } @@ -20208,9 +20208,9 @@ } }, "node_modules/nx": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/nx/-/nx-20.3.0.tgz", - "integrity": "sha512-Nzi4k7tV22zwO2iBLk+pHxorLEWPJpPrVCACtz0SQ63j/LiAgfhoqruJO+VU+V+E9qdyPsvmqIL/Iaf/GRQlqA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.3.1.tgz", + "integrity": "sha512-pO48DoQAwVKBEF7/od3bc1tHBYfafgiuS/hHX3yGmhpWW58baIlxMWFp6QY9+A9Q0R+26pd6AEGnE7d1f7+i/g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -20255,16 +20255,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.3.0", - "@nx/nx-darwin-x64": "20.3.0", - "@nx/nx-freebsd-x64": "20.3.0", - "@nx/nx-linux-arm-gnueabihf": "20.3.0", - "@nx/nx-linux-arm64-gnu": "20.3.0", - "@nx/nx-linux-arm64-musl": "20.3.0", - "@nx/nx-linux-x64-gnu": "20.3.0", - "@nx/nx-linux-x64-musl": "20.3.0", - "@nx/nx-win32-arm64-msvc": "20.3.0", - "@nx/nx-win32-x64-msvc": "20.3.0" + "@nx/nx-darwin-arm64": "20.3.1", + "@nx/nx-darwin-x64": "20.3.1", + "@nx/nx-freebsd-x64": "20.3.1", + "@nx/nx-linux-arm-gnueabihf": "20.3.1", + "@nx/nx-linux-arm64-gnu": "20.3.1", + "@nx/nx-linux-arm64-musl": "20.3.1", + "@nx/nx-linux-x64-gnu": "20.3.1", + "@nx/nx-linux-x64-musl": "20.3.1", + "@nx/nx-win32-arm64-msvc": "20.3.1", + "@nx/nx-win32-x64-msvc": "20.3.1" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -20427,9 +20427,9 @@ "license": "ISC" }, "node_modules/nx/node_modules/yaml": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", - "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "dev": true, "license": "ISC", "bin": { diff --git a/package.json b/package.json index 8a597889f9..e3fa251560 100644 --- a/package.json +++ b/package.json @@ -77,11 +77,11 @@ "@angular/platform-browser-dynamic": "18.2.12", "@angular/router": "18.2.12", "@fortawesome/fontawesome-free": "6.7.2", - "@nx/angular": "20.3.0", - "@nx/eslint": "20.3.0", - "@nx/eslint-plugin": "20.3.0", - "@nx/js": "20.3.0", - "@nx/workspace": "20.3.0", + "@nx/angular": "20.3.1", + "@nx/eslint": "20.3.1", + "@nx/eslint-plugin": "20.3.1", + "@nx/js": "20.3.1", + "@nx/workspace": "20.3.1", "@playwright/test": "1.49.1", "@schematics/angular": "18.2.12", "@siemens/ngx-datatable": "22.4.1", @@ -124,7 +124,7 @@ "ngx-highlightjs": "10.0.0", "ngx-page-object-model": "0.0.3", "npm-run-all2": "7.0.2", - "nx": "20.3.0", + "nx": "20.3.1", "playwright": "1.49.1", "prettier": "3.4.2", "pretty-quick": "4.0.0", @@ -139,10 +139,10 @@ "zone.js": "0.14.10" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.3.0", - "@nx/nx-darwin-x64": "20.3.0", - "@nx/nx-linux-x64-gnu": "20.3.0", - "@nx/nx-win32-x64-msvc": "20.3.0" + "@nx/nx-darwin-arm64": "20.3.1", + "@nx/nx-darwin-x64": "20.3.1", + "@nx/nx-linux-x64-gnu": "20.3.1", + "@nx/nx-win32-x64-msvc": "20.3.1" }, "husky": { "hooks": { From cecc3f7b59329bb3ccf27dcac130d9aab4190c18 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 22:25:43 +0100 Subject: [PATCH 09/18] chore(deps): update dependency wait-on to v8.0.2 (#3240) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 415f3cb7d2..c85ace798c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -104,7 +104,7 @@ "ts-mockito": "2.6.1", "ts-node": "10.9.2", "typescript": "5.5.4", - "wait-on": "8.0.1", + "wait-on": "8.0.2", "webdriver-manager": "13.0.2", "zone.js": "0.14.10" }, @@ -10045,9 +10045,9 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "dev": true, "license": "MIT", "dependencies": { @@ -26980,13 +26980,13 @@ } }, "node_modules/wait-on": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.1.tgz", - "integrity": "sha512-1wWQOyR2LVVtaqrcIL2+OM+x7bkpmzVROa0Nf6FryXkS+er5Sa1kzFGjzZRqLnHa3n1rACFLeTwUqE1ETL9Mig==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-8.0.2.tgz", + "integrity": "sha512-qHlU6AawrgAIHlueGQHQ+ETcPLAauXbnoTKl3RKq20W0T8x0DKVAo5xWIYjHSyvHxQlcYbFdR0jp4T9bDVITFA==", "dev": true, "license": "MIT", "dependencies": { - "axios": "^1.7.7", + "axios": "^1.7.9", "joi": "^17.13.3", "lodash": "^4.17.21", "minimist": "^1.2.8", diff --git a/package.json b/package.json index e3fa251560..912bbc8d21 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "ts-mockito": "2.6.1", "ts-node": "10.9.2", "typescript": "5.5.4", - "wait-on": "8.0.1", + "wait-on": "8.0.2", "webdriver-manager": "13.0.2", "zone.js": "0.14.10" }, From 9c8300402ff8be30681d9cafbb607045a7bc7559 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 22:26:05 +0100 Subject: [PATCH 10/18] chore(deps): update dependency lint-staged to v15.3.0 (#3221) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index c85ace798c..80ab52ab55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -88,7 +88,7 @@ "karma-jasmine": "5.1.0", "karma-jasmine-html-reporter": "2.1.0", "karma-time-stats-reporter": "0.1.0", - "lint-staged": "15.2.11", + "lint-staged": "15.3.0", "ngx-bootstrap": "18.1.3", "ngx-clipboard": "16.0.0", "ngx-highlightjs": "10.0.0", @@ -17851,13 +17851,13 @@ } }, "node_modules/lint-staged": { - "version": "15.2.11", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.11.tgz", - "integrity": "sha512-Ev6ivCTYRTGs9ychvpVw35m/bcNDuBN+mnTeObCL5h+boS5WzBEC6LHI4I9F/++sZm1m+J2LEiy0gxL/R9TBqQ==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.3.0.tgz", + "integrity": "sha512-vHFahytLoF2enJklgtOtCtIjZrKD/LoxlaUusd5nh7dWv/dkKQJY74ndFSzxCdv7g0ueGg1ORgTSt4Y9LPZn9A==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "~5.3.0", + "chalk": "~5.4.1", "commander": "~12.1.0", "debug": "~4.4.0", "execa": "~8.0.1", @@ -17905,9 +17905,9 @@ } }, "node_modules/lint-staged/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 912bbc8d21..763dcdb048 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "karma-jasmine": "5.1.0", "karma-jasmine-html-reporter": "2.1.0", "karma-time-stats-reporter": "0.1.0", - "lint-staged": "15.2.11", + "lint-staged": "15.3.0", "ngx-bootstrap": "18.1.3", "ngx-clipboard": "16.0.0", "ngx-highlightjs": "10.0.0", From 4d68335d039620beaffbc1f902fe4276bc13eb58 Mon Sep 17 00:00:00 2001 From: Exitare Date: Mon, 13 Jan 2025 03:06:03 -0800 Subject: [PATCH 11/18] fix(npc-vendor): wrong color for item extended cost. (#3249) --- apps/keira/src/app/scss/_utils.scss | 4 ++-- .../creature/src/npc-vendor/npc-vendor.component.html | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/keira/src/app/scss/_utils.scss b/apps/keira/src/app/scss/_utils.scss index de32d05261..a0dca10ead 100644 --- a/apps/keira/src/app/scss/_utils.scss +++ b/apps/keira/src/app/scss/_utils.scss @@ -52,8 +52,8 @@ input[type='radio'] { } .item-extended-cost { display: inline-block; - background-color: #080d22; - color: #fff; + background-color: inherit; + color: inherit; padding: 4px 10px 4px 0px; } .item-extended-cost img { diff --git a/libs/features/creature/src/npc-vendor/npc-vendor.component.html b/libs/features/creature/src/npc-vendor/npc-vendor.component.html index 0bcaca76e7..139d24e8be 100644 --- a/libs/features/creature/src/npc-vendor/npc-vendor.component.html +++ b/libs/features/creature/src/npc-vendor/npc-vendor.component.html @@ -21,7 +21,6 @@ From b391d2a0e80c9a9e836081d0ec6622dcfac29407 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:17:39 +0100 Subject: [PATCH 12/18] chore(deps): update dependency electron to v33.3.1 (#3241) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80ab52ab55..553cabeb25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,7 +70,7 @@ "bootstrap": "5.3.3", "conventional-changelog-cli": "4.1.0", "cross-env": "7.0.3", - "electron": "33.2.1", + "electron": "33.3.1", "electron-builder": "25.1.8", "electron-reload": "1.5.0", "eslint": "8.57.1", @@ -13128,9 +13128,9 @@ } }, "node_modules/electron": { - "version": "33.2.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-33.2.1.tgz", - "integrity": "sha512-SG/nmSsK9Qg1p6wAW+ZfqU+AV8cmXMTIklUL18NnOKfZLlum4ZsDoVdmmmlL39ZmeCaq27dr7CgslRPahfoVJg==", + "version": "33.3.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-33.3.1.tgz", + "integrity": "sha512-Z7l2bVgpdKxHQMI4i0CirBX2n+iCYKOx5mbzNM3BpOyFELwlobEXKmzCmEnwP+3EcNeIhUQyIEBFQxN06QgdIw==", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -13279,9 +13279,9 @@ "license": "ISC" }, "node_modules/electron/node_modules/@types/node": { - "version": "20.17.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", - "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", + "version": "20.17.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.12.tgz", + "integrity": "sha512-vo/wmBgMIiEA23A/knMfn/cf37VnuF52nZh5ZoW0GWt4e4sxNquibrMRJ7UQsA06+MBx9r/H1jsI9grYjQCQlw==", "license": "MIT", "dependencies": { "undici-types": "~6.19.2" diff --git a/package.json b/package.json index 763dcdb048..81f327ab9a 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "bootstrap": "5.3.3", "conventional-changelog-cli": "4.1.0", "cross-env": "7.0.3", - "electron": "33.2.1", + "electron": "33.3.1", "electron-builder": "25.1.8", "electron-reload": "1.5.0", "eslint": "8.57.1", From dadecbc8116c4fa1a8db1ba13986d344c3eaacb1 Mon Sep 17 00:00:00 2001 From: Exitare Date: Mon, 13 Jan 2025 14:12:53 -0800 Subject: [PATCH 13/18] Improve item quality visibility (#3250) * Update handler to allow for a custom class. * Add more tests to fix coverage * Fix code coverage * Update select.service.spec.ts * Fix tests --- apps/keira/src/app/scss/_item-select.scss | 18 +++++----- .../item-enchantment-template.component.html | 7 +++- .../features/item/src/item-handler.service.ts | 5 +++ .../item-template.component.html | 9 +++-- .../select-item/select-item.component.html | 4 +-- .../loot-template-id.component.html | 7 +++- .../loot-template.component.html | 7 +++- .../service/handlers/handler.service.spec.ts | 36 +++++++++++++++++++ .../src/service/handlers/handler.service.ts | 10 ++++++ .../src/service/select/select.service.spec.ts | 34 ++++++++++++++++-- .../src/service/select/select.service.ts | 2 ++ .../src/top-bar/top-bar.component.html | 2 +- .../src/top-bar/top-bar.component.spec.ts | 30 ++++++++++++++-- .../src/top-bar/top-bar.component.ts | 8 +++++ 14 files changed, 157 insertions(+), 22 deletions(-) diff --git a/apps/keira/src/app/scss/_item-select.scss b/apps/keira/src/app/scss/_item-select.scss index 9318b8d4fa..661e980698 100644 --- a/apps/keira/src/app/scss/_item-select.scss +++ b/apps/keira/src/app/scss/_item-select.scss @@ -1,29 +1,29 @@ -.item-select { +.item-quality { /* Quality (used for text with white background) */ - .q { + &-q { color: #ffd100; } - .q0 { + &-q0 { color: #757575; } /* .q1 { color:#ffffff; } */ - .q2 { + &-q2 { color: #4caf50; } - .q3 { + &-q3 { color: #0070dd; } - .q4 { + &-q4 { color: #a335ee; } - .q5 { + &-q5 { color: #ffc107; } - .q6 { + &-q6 { color: #ffab00; } - .q7 { + &-q7 { color: #ff8a65; } } diff --git a/libs/features/item/src/item-enchantment/item-enchantment-template.component.html b/libs/features/item/src/item-enchantment/item-enchantment-template.component.html index d043c8f929..2c1f00b959 100644 --- a/libs/features/item/src/item-enchantment/item-enchantment-template.component.html +++ b/libs/features/item/src/item-enchantment/item-enchantment-template.component.html @@ -1,4 +1,9 @@ - +
@if (editorService.loading) { diff --git a/libs/features/item/src/item-handler.service.ts b/libs/features/item/src/item-handler.service.ts index 648cfe0145..190f6f5346 100644 --- a/libs/features/item/src/item-handler.service.ts +++ b/libs/features/item/src/item-handler.service.ts @@ -19,18 +19,23 @@ export class ItemHandlerService extends HandlerService { get isItemTemplateUnsaved(): boolean { return this.statusMap[ITEM_TEMPLATE_TABLE]; } + get isItemEnchantmentUnsaved(): boolean { return this.statusMap[ITEM_ENCHANTMENT_TEMPLATE_TABLE]; } + get isItemLootTemplateUnsaved(): boolean { return this.statusMap[ITEM_LOOT_TEMPLATE_TABLE]; } + get isDisenchantmentLootTemplateUnsaved(): boolean { return this.statusMap[DISENCHANT_LOOT_TEMPLATE_TABLE]; } + get isProspectingLootTemplateUnsaved(): boolean { return this.statusMap[PROSPECTING_LOOT_TEMPLATE_TABLE]; } + get isMillingLootTemplateUnsaved(): boolean { return this.statusMap[MILLING_LOOT_TEMPLATE_TABLE]; } diff --git a/libs/features/item/src/item-template/item-template.component.html b/libs/features/item/src/item-template/item-template.component.html index 2e37919a4f..cc4757e9df 100644 --- a/libs/features/item/src/item-template/item-template.component.html +++ b/libs/features/item/src/item-template/item-template.component.html @@ -1,4 +1,9 @@ - +
@if (editorService.loading) { @@ -22,7 +27,7 @@
- +
diff --git a/libs/features/item/src/select-item/select-item.component.html b/libs/features/item/src/select-item/select-item.component.html index 6f172db211..fa2672697b 100644 --- a/libs/features/item/src/select-item/select-item.component.html +++ b/libs/features/item/src/select-item/select-item.component.html @@ -62,8 +62,8 @@ -
- {{ row.name }} +
+ {{ row.name }}
diff --git a/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template-id.component.html b/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template-id.component.html index bd17a053b8..7b23a84580 100644 --- a/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template-id.component.html +++ b/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template-id.component.html @@ -1,4 +1,9 @@ - + @if (lootId !== null) {
diff --git a/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template.component.html b/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template.component.html index 78c0726b1b..08c5d2282d 100644 --- a/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template.component.html +++ b/libs/shared/base-abstract-classes/src/components/editors/loot-template/loot-template.component.html @@ -1,4 +1,9 @@ - +
@if (editorService.loading) { diff --git a/libs/shared/base-abstract-classes/src/service/handlers/handler.service.spec.ts b/libs/shared/base-abstract-classes/src/service/handlers/handler.service.spec.ts index 87d3d6d203..f91685237b 100644 --- a/libs/shared/base-abstract-classes/src/service/handlers/handler.service.spec.ts +++ b/libs/shared/base-abstract-classes/src/service/handlers/handler.service.spec.ts @@ -24,6 +24,7 @@ describe('HandlerService', () => { expect(service.selectedName).toBeUndefined(); expect(service.isNew).toBe(false); expect(service.canActivate()).toBe(false); + expect(service.itemQualityScssClass).toBe(''); }); it('selection should behave correctly', () => { @@ -41,6 +42,20 @@ describe('HandlerService', () => { expect(navigateSpy).toHaveBeenCalledWith(['mock/route']); }); + it('should not throw error when _statusMap is undefined in resetStatus()', () => { + (service as any)._statusMap = undefined; + + expect(() => (service as any).resetStatus()).not.toThrow(); + }); + + it('should correctly stringify object id', () => { + const id = { entryorguid: 123, source_type: 456 }; + const name = 'myName'; + service.select(true, id, name); + + expect(service.selected).toEqual(JSON.stringify(id)); + }); + it('selects the same entity and force the reload', () => { const id = 'myId'; const name = 'myName'; @@ -53,4 +68,25 @@ describe('HandlerService', () => { expect(service.forceReload).toBeTrue(); }); + + it('should correctly save custom scss class', () => { + const quality = 5; + service.itemQualityScssClass = quality; + expect(service.itemQualityScssClass).toEqual(`item-quality-q${quality}`); + }); + + it('should correctly set the default itemQualityScssClass when quality is 0', () => { + service.itemQualityScssClass = 0; + expect(service.itemQualityScssClass).toEqual('item-quality-q0'); + }); + + it('should not navigate when navigate is false', () => { + const navigateSpy = spyOn(TestBed.inject(Router), 'navigate'); + const id = 'myId'; + const name = 'myName'; + + service.select(true, id, name, false); + + expect(navigateSpy).not.toHaveBeenCalled(); + }); }); diff --git a/libs/shared/base-abstract-classes/src/service/handlers/handler.service.ts b/libs/shared/base-abstract-classes/src/service/handlers/handler.service.ts index 3b4233fe37..b0fd26d7cb 100644 --- a/libs/shared/base-abstract-classes/src/service/handlers/handler.service.ts +++ b/libs/shared/base-abstract-classes/src/service/handlers/handler.service.ts @@ -6,7 +6,9 @@ import { SubscriptionHandler } from '@keira/shared/utils'; export abstract class HandlerService extends SubscriptionHandler { protected readonly router = inject(Router); + private _customItemScssClass: string = ''; protected _selected!: string; + selectedName!: string; isNew = false; forceReload = false; @@ -40,6 +42,14 @@ export abstract class HandlerService extends SubscriptionHan } } + set itemQualityScssClass(quality: number) { + this._customItemScssClass = `item-quality-q${quality || '0'}`; + } + + get itemQualityScssClass(): string { + return this._customItemScssClass; + } + select(isNew: boolean, id: string | number | Partial, name?: string, navigate = true) { this.resetStatus(); this.isNew = isNew; diff --git a/libs/shared/base-abstract-classes/src/service/select/select.service.spec.ts b/libs/shared/base-abstract-classes/src/service/select/select.service.spec.ts index c62d8d27d1..3ee59fc2ce 100644 --- a/libs/shared/base-abstract-classes/src/service/select/select.service.spec.ts +++ b/libs/shared/base-abstract-classes/src/service/select/select.service.spec.ts @@ -1,16 +1,21 @@ import { TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { instance, mock } from 'ts-mockito'; - import { MysqlQueryService } from '@keira/shared/db-layer'; - import { MockHandlerService, SelectMockService } from '../../core.mock'; describe('SelectService', () => { beforeEach(() => TestBed.configureTestingModule({ imports: [RouterTestingModule], - providers: [{ provide: MysqlQueryService, useValue: instance(mock(MysqlQueryService)) }, SelectMockService, MockHandlerService], + providers: [ + { + provide: MysqlQueryService, + useValue: instance(mock(MysqlQueryService)), + }, + SelectMockService, + MockHandlerService, + ], }), ); @@ -26,6 +31,29 @@ describe('SelectService', () => { `${selected[0][service['entityIdField']]}`, `${selected[0][service['entityNameField'] as string]}`, ); + expect(service.handlerService.itemQualityScssClass).toBe(''); + }); + + it('onSelect() should correctly extract the Quality field if present', () => { + const service = TestBed.inject(SelectMockService); + const spy = spyOn(TestBed.inject(MockHandlerService), 'select'); + const selected = [ + { + [service['entityIdField']]: 'myId', + [service['entityNameField'] as string]: 'myName', + Quality: 5, + }, + ]; + + service.onSelect({ selected }); + + expect(spy).toHaveBeenCalledWith( + false, + `${selected[0][service['entityIdField']]}`, + `${selected[0][service['entityNameField'] as string]}`, + ); + + expect(service.handlerService.itemQualityScssClass).toBe('item-quality-q5'); }); it('onSelect() should use the table name when the entityNameField is not defined', () => { diff --git a/libs/shared/base-abstract-classes/src/service/select/select.service.ts b/libs/shared/base-abstract-classes/src/service/select/select.service.ts index f8fc8a1bec..795ffe0e5d 100644 --- a/libs/shared/base-abstract-classes/src/service/select/select.service.ts +++ b/libs/shared/base-abstract-classes/src/service/select/select.service.ts @@ -24,5 +24,7 @@ export abstract class SelectService extends SearchService `${selected[0][this.entityIdField]}`, this.entityNameField ? `${selected[0][this.entityNameField]}` : this.entityTable, ); + + if ('Quality' in selected[0]) this.handlerService.itemQualityScssClass = selected[0]['Quality'] as number; } } diff --git a/libs/shared/base-editor-components/src/top-bar/top-bar.component.html b/libs/shared/base-editor-components/src/top-bar/top-bar.component.html index efbcc0b98f..68342fd09d 100644 --- a/libs/shared/base-editor-components/src/top-bar/top-bar.component.html +++ b/libs/shared/base-editor-components/src/top-bar/top-bar.component.html @@ -1,6 +1,6 @@
@if (selected) { - + @if (isNew) { Creating new: {{ selected }} } @else { diff --git a/libs/shared/base-editor-components/src/top-bar/top-bar.component.spec.ts b/libs/shared/base-editor-components/src/top-bar/top-bar.component.spec.ts index 34194ed794..8037faf7d7 100644 --- a/libs/shared/base-editor-components/src/top-bar/top-bar.component.spec.ts +++ b/libs/shared/base-editor-components/src/top-bar/top-bar.component.spec.ts @@ -1,12 +1,11 @@ import { Component, ViewChild } from '@angular/core'; import { TestBed } from '@angular/core/testing'; - import { PageObject } from '@keira/shared/test-utils'; import { TopBarComponent } from './top-bar.component'; describe(TopBarComponent.name, () => { @Component({ - template: ` `, + template: ` `, standalone: true, imports: [TopBarComponent], }) @@ -15,6 +14,7 @@ describe(TopBarComponent.name, () => { selected: string | undefined; selectedName: string | undefined; isNew: boolean = false; + customScssClass: string | undefined; } class Page extends PageObject { @@ -52,6 +52,32 @@ describe(TopBarComponent.name, () => { }); }); + describe('when there is a custom scss class', () => { + it('should correctly show the custom scss class', () => { + const { host, page } = setup(); + host.selected = '1234'; // Ensure selected is truthy + host.customScssClass = 'item-quality-q6'; + + page.detectChanges(); + + expect(page.mainText().nativeElement.classList).toContain('item-quality-q6'); + }); + }); + + describe('when there is no custom scss class', () => { + it('should correctly use the default scss class', () => { + const { host, page } = setup(); + host.selected = '1234'; // Ensure selected is truthy + host.customScssClass = undefined; // Falsy value + + page.detectChanges(); + + expect(page.mainText().nativeElement.classList).toContain('main-text'); + expect(page.mainText().nativeElement.classList).toContain('text-truncate'); + expect(page.mainText().nativeElement.classList).not.toContain('item-quality-q6'); // Ensure no custom class + }); + }); + describe('when there is a selected', () => { it('should correctly show a new selection', () => { const selected = '1234'; diff --git a/libs/shared/base-editor-components/src/top-bar/top-bar.component.ts b/libs/shared/base-editor-components/src/top-bar/top-bar.component.ts index 0d18c79812..a004d132cf 100644 --- a/libs/shared/base-editor-components/src/top-bar/top-bar.component.ts +++ b/libs/shared/base-editor-components/src/top-bar/top-bar.component.ts @@ -10,4 +10,12 @@ export class TopBarComponent { @Input({ required: true }) selected: string | undefined; @Input({ required: true }) selectedName: string | undefined; @Input({ required: true }) isNew = false; + @Input({ required: false }) customScssClass: string | undefined = undefined; + + get scssClass(): string { + if (this.customScssClass) { + return 'main-text text-truncate ' + this.customScssClass; + } + return 'main-text text-truncate'; + } } From 92241cdc0e0ec4698d16d8ada5cedf7783a2c77e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:59:24 +0100 Subject: [PATCH 14/18] chore(deps): update dependency @types/node to v22.10.6 (#3251) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 553cabeb25..bc876857d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,7 +62,7 @@ "@types/jasminewd2": "2.0.13", "@types/jquery": "3.5.32", "@types/mysql": "2.15.26", - "@types/node": "22.10.5", + "@types/node": "22.10.6", "@types/sqlite3": "3.1.11", "@types/sqlstring": "2.3.2", "@typescript-eslint/eslint-plugin": "7.18.0", @@ -8382,9 +8382,9 @@ } }, "node_modules/@types/node": { - "version": "22.10.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz", - "integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==", + "version": "22.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.6.tgz", + "integrity": "sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" diff --git a/package.json b/package.json index 81f327ab9a..b2d9e4a8af 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@types/jasminewd2": "2.0.13", "@types/jquery": "3.5.32", "@types/mysql": "2.15.26", - "@types/node": "22.10.5", + "@types/node": "22.10.6", "@types/sqlite3": "3.1.11", "@types/sqlstring": "2.3.2", "@typescript-eslint/eslint-plugin": "7.18.0", From c69d9a94bc31bb8ee90816edd17cae6a430871a7 Mon Sep 17 00:00:00 2001 From: Exitare Date: Sun, 19 Jan 2025 09:37:13 -0800 Subject: [PATCH 15/18] chore: add default behaviour override for flag selectors. (#3252) * Update default behaviour override for flag selectors * Address code review --- .../item-template.component.html | 4 +-- .../flags-selector-modal.component.spec.ts | 27 ++++++++++++++++++- .../flags-selector-modal.component.ts | 2 +- .../flags-selector/flags-selector.model.ts | 1 + .../flags-selector/flags.service.spec.ts | 25 +++++++++++++++++ .../selectors/flags-selector/flags.service.ts | 9 +++++-- 6 files changed, 62 insertions(+), 6 deletions(-) diff --git a/libs/features/item/src/item-template/item-template.component.html b/libs/features/item/src/item-template/item-template.component.html index cc4757e9df..1d20312196 100644 --- a/libs/features/item/src/item-template/item-template.component.html +++ b/libs/features/item/src/item-template/item-template.component.html @@ -315,7 +315,7 @@ @@ -325,7 +325,7 @@ diff --git a/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.spec.ts b/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.spec.ts index 6f351aa5f4..3014dd7407 100644 --- a/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.spec.ts +++ b/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.spec.ts @@ -54,7 +54,32 @@ describe('FlagsSelectorModalComponent', () => { expect(component.flagValues).toEqual([true, true, true]); expect(spyGetValueFromBits).toHaveBeenCalledTimes(1); - expect(spyGetValueFromBits).toHaveBeenCalledWith([true, true, true]); + expect(spyGetValueFromBits).toHaveBeenCalledWith([true, true, true], false); expect(component.value).toEqual(value); }); + + it('toggleBit() override should properly work', () => { + const value = 123456; + const overrideDefaultBehavior = true; + const flags = [{ bit: 1, name: 'flag-1' }]; + const initialFlagValues = [true, false, true]; + const updatedValue = 654321; + + // Set up the component's initial state + component.value = value; + component.config = { name: 'Mock Modal Name', flags, overrideDefaultBehavior }; + component.flagValues = [...initialFlagValues]; + + // Spy on the flagsService.getValueFromBits method + const spyGetValueFromBits = spyOn(flagsService, 'getValueFromBits').and.returnValue(updatedValue); + + // Act: Call toggleBit with a specific bit index + component.toggleBit(1); // Toggle the second bit (index 1) + + // Assertions + expect(component.flagValues).toEqual([true, true, true]); // Bit at index 1 should toggle to `true` + expect(spyGetValueFromBits).toHaveBeenCalledTimes(1); + expect(spyGetValueFromBits).toHaveBeenCalledWith([true, true, true], overrideDefaultBehavior); + expect(component.value).toEqual(updatedValue); // Value should update based on the override behavior + }); }); diff --git a/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.ts b/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.ts index 8170c4c9d1..cea31d3049 100644 --- a/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.ts +++ b/libs/shared/selectors/src/selectors/flags-selector/flags-selector-modal.component.ts @@ -28,6 +28,6 @@ export class FlagsSelectorModalComponent extends BaseSelectorModalComponent { expect(service.getBitsArray(flags, value)).toEqual(mockResult); expect(getBitsFromValueSpy).toHaveBeenCalledWith(value, flags[0].bit + 1); }); + + it('should handle value -1 (all bits not set)', () => { + const service = TestBed.inject(FlagsService); + expect(service.getBitsFromValue(-1, 5)).toEqual([false, false, false, false, false]); + }); + + it('should handle value 0 (all bits unset)', () => { + const service = TestBed.inject(FlagsService); + expect(service.getBitsFromValue(0, 3)).toEqual([false, false, false]); + }); + + it('should handle count 0 (empty bits array)', () => { + const service = TestBed.inject(FlagsService); + expect(service.getBitsFromValue(5, 0)).toEqual([]); + }); + + it('should return -1 when overrideDefaultBehavior is true and all bits are false', () => { + const service = TestBed.inject(FlagsService); + expect(service.getValueFromBits([false, false, false], true)).toEqual(-1); + }); + + it('should return 0 when overrideDefaultBehavior is false and all bits are false', () => { + const service = TestBed.inject(FlagsService); + expect(service.getValueFromBits([false, false, false], false)).toEqual(0); + }); }); diff --git a/libs/shared/selectors/src/selectors/flags-selector/flags.service.ts b/libs/shared/selectors/src/selectors/flags-selector/flags.service.ts index 10a9c429e3..0f6722b3a8 100644 --- a/libs/shared/selectors/src/selectors/flags-selector/flags.service.ts +++ b/libs/shared/selectors/src/selectors/flags-selector/flags.service.ts @@ -7,7 +7,7 @@ import { Flag } from '@keira/shared/constants'; export class FlagsService { getBitsFromValue(value: number, bitsCount: number): boolean[] { const bits = new Array(bitsCount); - const binaryStr: string = value.toString(2).split('').reverse().join(''); + const binaryStr: string = value !== -1 ? value.toString(2).split('').reverse().join('') : '0'.repeat(bitsCount); for (let i = 0; i < bitsCount; i++) { bits[i] = parseInt(binaryStr[i], 10) === 1; @@ -16,7 +16,12 @@ export class FlagsService { return bits; } - getValueFromBits(bits: boolean[]): number { + getValueFromBits(bits: boolean[], overrideDefaultBehavior: boolean = false): number { + // override default behavior if all bits are false + if (overrideDefaultBehavior && bits.every((bit) => !bit)) { + return -1; + } + let result = 0; for (let i = 0; i < bits.length; i++) { From aa6fade8e096ea252d4a26dc0dcc44139b0620b0 Mon Sep 17 00:00:00 2001 From: Exitare Date: Sun, 19 Jan 2025 09:57:13 -0800 Subject: [PATCH 16/18] feat(game-tele): add new editor game-tele (#3227) * Start adding game_tele * Add working game_tele * Fix errors * Fix typo * Update game-tele.integration.spec.ts * Fix typo * Fix unit test * Update based on code review * Fix linting * Update code * Add missing map selector * Update sidebar & add missing translation * Address code review --- apps/keira/src/app/routes.ts | 15 ++ apps/keira/src/assets/i18n/de.json | 10 +- apps/keira/src/assets/i18n/el.json | 10 +- apps/keira/src/assets/i18n/en.json | 8 + apps/keira/src/assets/i18n/es.json | 10 +- apps/keira/src/assets/i18n/fr.json | 10 +- apps/keira/src/assets/i18n/it.json | 10 +- apps/keira/src/assets/i18n/ko.json | 10 +- apps/keira/src/assets/i18n/nl.json | 10 +- apps/keira/src/assets/i18n/pl.json | 10 +- apps/keira/src/assets/i18n/pt.json | 10 +- apps/keira/src/assets/i18n/ro.json | 10 +- apps/keira/src/assets/i18n/ru.json | 10 +- apps/keira/src/assets/i18n/sk.json | 10 +- apps/keira/src/assets/i18n/sv.json | 10 +- apps/keira/src/assets/i18n/zh.json | 10 +- libs/features/game-tele/.eslintrc.json | 33 ++++ libs/features/game-tele/karma.conf.js | 15 ++ libs/features/game-tele/project.json | 25 +++ .../edit-game-tele/game-tele.component.html | 55 ++++++ .../src/edit-game-tele/game-tele.component.ts | 22 +++ .../game-tele.integration.spec.ts | 171 ++++++++++++++++++ .../edit-game-tele/game-tele.service.spec.ts | 26 +++ .../src/edit-game-tele/game-tele.service.ts | 14 ++ .../src/game-tele-handler.service.spec.ts | 17 ++ .../src/game-tele-handler.service.ts | 22 +++ libs/features/game-tele/src/index.ts | 3 + .../select-game-tele.component.html | 65 +++++++ .../select-game-tele.component.ts | 35 ++++ .../select-game-tele.integration.spec.ts | 163 +++++++++++++++++ .../select-game-tele.service.ts | 18 ++ libs/features/game-tele/tsconfig.json | 29 +++ libs/features/game-tele/tsconfig.lib.json | 12 ++ libs/features/game-tele/tsconfig.spec.json | 9 + .../src/sidebar/sidebar.component.html | 27 +++ .../src/sidebar/sidebar.component.ts | 5 + .../src/entities/game-tele.type.ts | 17 ++ libs/shared/acore-world-model/src/index.ts | 1 + .../src/search/game-tele-search.service.ts | 14 ++ .../game-tele-selector-btn.component.spec.ts | 24 +++ .../game-tele-selector-btn.component.ts | 14 ++ .../game-tele-selector-modal.component.html | 53 ++++++ ...game-tele-selector-modal.component.spec.ts | 33 ++++ .../game-tele-selector-modal.component.ts | 20 ++ tsconfig.base.json | 1 + 45 files changed, 1092 insertions(+), 14 deletions(-) create mode 100644 libs/features/game-tele/.eslintrc.json create mode 100644 libs/features/game-tele/karma.conf.js create mode 100644 libs/features/game-tele/project.json create mode 100644 libs/features/game-tele/src/edit-game-tele/game-tele.component.html create mode 100644 libs/features/game-tele/src/edit-game-tele/game-tele.component.ts create mode 100644 libs/features/game-tele/src/edit-game-tele/game-tele.integration.spec.ts create mode 100644 libs/features/game-tele/src/edit-game-tele/game-tele.service.spec.ts create mode 100644 libs/features/game-tele/src/edit-game-tele/game-tele.service.ts create mode 100644 libs/features/game-tele/src/game-tele-handler.service.spec.ts create mode 100644 libs/features/game-tele/src/game-tele-handler.service.ts create mode 100644 libs/features/game-tele/src/index.ts create mode 100644 libs/features/game-tele/src/select-game-tele/select-game-tele.component.html create mode 100644 libs/features/game-tele/src/select-game-tele/select-game-tele.component.ts create mode 100644 libs/features/game-tele/src/select-game-tele/select-game-tele.integration.spec.ts create mode 100644 libs/features/game-tele/src/select-game-tele/select-game-tele.service.ts create mode 100644 libs/features/game-tele/tsconfig.json create mode 100644 libs/features/game-tele/tsconfig.lib.json create mode 100644 libs/features/game-tele/tsconfig.spec.json create mode 100644 libs/shared/acore-world-model/src/entities/game-tele.type.ts create mode 100644 libs/shared/selectors/src/search/game-tele-search.service.ts create mode 100644 libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.spec.ts create mode 100644 libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.ts create mode 100644 libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.html create mode 100644 libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.spec.ts create mode 100644 libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.ts diff --git a/apps/keira/src/app/routes.ts b/apps/keira/src/app/routes.ts index 3a93976f10..3a640f0546 100644 --- a/apps/keira/src/app/routes.ts +++ b/apps/keira/src/app/routes.ts @@ -92,6 +92,7 @@ import { AcoreStringHandlerService, SelectAcoreStringComponent, } from 'texts'; +import { GameTeleComponent, GameTeleHandlerService, SelectGameTeleComponent } from '@keira/features/game-tele'; export const KEIRA_ROUTES: Routes = [ { @@ -484,4 +485,18 @@ export const KEIRA_ROUTES: Routes = [ }, ], }, + { + path: 'game-tele', + children: [ + { + path: 'select', + component: SelectGameTeleComponent, + }, + { + path: 'tele', + component: GameTeleComponent, + canActivate: [GameTeleHandlerService], + }, + ], + }, ]; diff --git a/apps/keira/src/assets/i18n/de.json b/apps/keira/src/assets/i18n/de.json index 825b309c5e..136b77ac5e 100644 --- a/apps/keira/src/assets/i18n/de.json +++ b/apps/keira/src/assets/i18n/de.json @@ -173,6 +173,11 @@ "TITLE": "Zauber-DBC-Overrides", "SEARCH_SPELL": "Zauber suchen", "SPELL_DBC_EDITOR": "Zauber-DBC-Editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/el.json b/apps/keira/src/assets/i18n/el.json index 15b30545d2..7810b1339e 100644 --- a/apps/keira/src/assets/i18n/el.json +++ b/apps/keira/src/assets/i18n/el.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/en.json b/apps/keira/src/assets/i18n/en.json index fa09fc1088..1a11911f4b 100644 --- a/apps/keira/src/assets/i18n/en.json +++ b/apps/keira/src/assets/i18n/en.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } } diff --git a/apps/keira/src/assets/i18n/es.json b/apps/keira/src/assets/i18n/es.json index 6e9ae68664..178cdc04e0 100644 --- a/apps/keira/src/assets/i18n/es.json +++ b/apps/keira/src/assets/i18n/es.json @@ -173,6 +173,11 @@ "TITLE": "Anulaciones de Hechizos (Spell DBC)", "SEARCH_SPELL": "Buscar Hechizos", "SPELL_DBC_EDITOR": "Editor de Hechizos (Spell DBC)" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Desconocido. Sólo se usa el valor 50 para algunos hechizos.", "REQUIRED_AURA_VISION": "Desconocido. Sólo 16 hechizos usan otro valor como 0. Podría ser usado para efectos visuales." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/fr.json b/apps/keira/src/assets/i18n/fr.json index b67b544b12..6bdd1c9752 100644 --- a/apps/keira/src/assets/i18n/fr.json +++ b/apps/keira/src/assets/i18n/fr.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/it.json b/apps/keira/src/assets/i18n/it.json index 6b895d1c1f..a67dc60dba 100644 --- a/apps/keira/src/assets/i18n/it.json +++ b/apps/keira/src/assets/i18n/it.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/ko.json b/apps/keira/src/assets/i18n/ko.json index 15b30545d2..7810b1339e 100644 --- a/apps/keira/src/assets/i18n/ko.json +++ b/apps/keira/src/assets/i18n/ko.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/nl.json b/apps/keira/src/assets/i18n/nl.json index 15b30545d2..7810b1339e 100644 --- a/apps/keira/src/assets/i18n/nl.json +++ b/apps/keira/src/assets/i18n/nl.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/pl.json b/apps/keira/src/assets/i18n/pl.json index 15b30545d2..7810b1339e 100644 --- a/apps/keira/src/assets/i18n/pl.json +++ b/apps/keira/src/assets/i18n/pl.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/pt.json b/apps/keira/src/assets/i18n/pt.json index 901b8fbb53..2887f516f7 100644 --- a/apps/keira/src/assets/i18n/pt.json +++ b/apps/keira/src/assets/i18n/pt.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Procurar Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Desconhecido. O único valor usado é 50 para alguns spells.", "REQUIRED_AURA_VISION": "Desconhecido. Somente 16 Spells usam um valor diferente de 0. Talvez é usado para efeitos visuais." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/ro.json b/apps/keira/src/assets/i18n/ro.json index 15b30545d2..7810b1339e 100644 --- a/apps/keira/src/assets/i18n/ro.json +++ b/apps/keira/src/assets/i18n/ro.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/ru.json b/apps/keira/src/assets/i18n/ru.json index 8b88571dc7..1965f570bf 100644 --- a/apps/keira/src/assets/i18n/ru.json +++ b/apps/keira/src/assets/i18n/ru.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Искать заклинание", "SPELL_DBC_EDITOR": "Редактор Spell DBC" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/sk.json b/apps/keira/src/assets/i18n/sk.json index 15b30545d2..7810b1339e 100644 --- a/apps/keira/src/assets/i18n/sk.json +++ b/apps/keira/src/assets/i18n/sk.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/sv.json b/apps/keira/src/assets/i18n/sv.json index fa52bd4810..1bda7a780f 100644 --- a/apps/keira/src/assets/i18n/sv.json +++ b/apps/keira/src/assets/i18n/sv.json @@ -173,6 +173,11 @@ "TITLE": "Spell DBC overrides", "SEARCH_SPELL": "Search Spell", "SPELL_DBC_EDITOR": "Spell DBC editor" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "Unknown. Only used value is 50 for some spells.", "REQUIRED_AURA_VISION": "Unknown. Only 16 Spells use another value as 0. Could be used for visual effects." } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/apps/keira/src/assets/i18n/zh.json b/apps/keira/src/assets/i18n/zh.json index ef8c7bee0b..59f4a26e45 100644 --- a/apps/keira/src/assets/i18n/zh.json +++ b/apps/keira/src/assets/i18n/zh.json @@ -173,6 +173,11 @@ "TITLE": "技能DBC修改", "SEARCH_SPELL": "搜索技能", "SPELL_DBC_EDITOR": "技能DBC编辑" + }, + "GAME_TELE": { + "TITLE": "Game Teleport", + "SEARCH_GAME_TELE": "Search Teleport", + "SELECT_GAME_TELE": "Game Tele Editor" } }, "DASHBOARD": { @@ -862,5 +867,8 @@ "SPELL_PRIORITY": "未知...某些法术的唯一使用的值是50。", "REQUIRED_AURA_VISION": "未知...只有16个法术使用,其他均为0,可以用于视觉效果。" } + }, + "GAME_TELE": { + "EDITOR": "Teleport Editor" } -} \ No newline at end of file +} diff --git a/libs/features/game-tele/.eslintrc.json b/libs/features/game-tele/.eslintrc.json new file mode 100644 index 0000000000..a20cf65c22 --- /dev/null +++ b/libs/features/game-tele/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "extends": ["../../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts"], + "extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], + "rules": { + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": "keira", + "style": "camelCase" + } + ], + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "keira", + "style": "kebab-case" + } + ] + } + }, + { + "files": ["*.html"], + "extends": ["plugin:@nx/angular-template"], + "rules": {} + } + ] +} diff --git a/libs/features/game-tele/karma.conf.js b/libs/features/game-tele/karma.conf.js new file mode 100644 index 0000000000..e30ae3de6e --- /dev/null +++ b/libs/features/game-tele/karma.conf.js @@ -0,0 +1,15 @@ +const { join } = require('path'); +const getBaseKarmaConfig = require('../../../karma.conf'); + +module.exports = function (config) { + const baseConfig = getBaseKarmaConfig(config); + config.set({ + ...baseConfig, + frameworks: [...baseConfig.frameworks], + plugins: [...baseConfig.plugins], + coverageReporter: { + ...baseConfig.coverageReporter, + dir: join(__dirname, '../../../coverage/libs/features/game_tele'), + }, + }); +}; diff --git a/libs/features/game-tele/project.json b/libs/features/game-tele/project.json new file mode 100644 index 0000000000..3d645d15d8 --- /dev/null +++ b/libs/features/game-tele/project.json @@ -0,0 +1,25 @@ +{ + "name": "keira-features-game-tele", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/features/game-tele/src", + "prefix": "keira", + "tags": ["scope:features"], + "projectType": "library", + "targets": { + "test": { + "executor": "@angular-devkit/build-angular:karma", + "options": { + "tsConfig": "libs/features/game-tele/tsconfig.spec.json", + "karmaConfig": "libs/features/game-tele/karma.conf.js", + "polyfills": ["zone.js", "zone.js/testing"], + "sourceMap": true, + "codeCoverage": true, + "styles": ["apps/keira/src/app/scss/main-test.scss"], + "scripts": ["node_modules/squel/dist/squel.min.js"] + } + }, + "lint": { + "executor": "@nx/eslint:lint" + } + } +} diff --git a/libs/features/game-tele/src/edit-game-tele/game-tele.component.html b/libs/features/game-tele/src/edit-game-tele/game-tele.component.html new file mode 100644 index 0000000000..f0c88fd222 --- /dev/null +++ b/libs/features/game-tele/src/edit-game-tele/game-tele.component.html @@ -0,0 +1,55 @@ +
+ @if (editorService.loading) { + + } + + @if (editorService.form && !!editorService.loadedEntityId && !editorService.loading) { +
+
+ +
+
+
+ +
+
+ + +
+
+ + +
+
+ + + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ } +
diff --git a/libs/features/game-tele/src/edit-game-tele/game-tele.component.ts b/libs/features/game-tele/src/edit-game-tele/game-tele.component.ts new file mode 100644 index 0000000000..5be1462763 --- /dev/null +++ b/libs/features/game-tele/src/edit-game-tele/game-tele.component.ts @@ -0,0 +1,22 @@ +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { GameTele } from '@keira/shared/acore-world-model'; +import { SingleRowEditorComponent } from '@keira/shared/base-abstract-classes'; +import { TranslateModule } from '@ngx-translate/core'; +import { TooltipModule } from 'ngx-bootstrap/tooltip'; +import { GameTeleService } from './game-tele.service'; +import { GameTeleHandlerService } from '../game-tele-handler.service'; +import { QueryOutputComponent } from '@keira/shared/base-editor-components'; +import { MapSelectorBtnComponent } from '@keira/shared/selectors'; + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'keira-conditions', + templateUrl: './game-tele.component.html', + standalone: true, + imports: [TranslateModule, FormsModule, ReactiveFormsModule, TooltipModule, QueryOutputComponent, MapSelectorBtnComponent], +}) +export class GameTeleComponent extends SingleRowEditorComponent { + protected override readonly editorService = inject(GameTeleService); + protected readonly handlerService = inject(GameTeleHandlerService); +} diff --git a/libs/features/game-tele/src/edit-game-tele/game-tele.integration.spec.ts b/libs/features/game-tele/src/edit-game-tele/game-tele.integration.spec.ts new file mode 100644 index 0000000000..28e477d370 --- /dev/null +++ b/libs/features/game-tele/src/edit-game-tele/game-tele.integration.spec.ts @@ -0,0 +1,171 @@ +import { TestBed, waitForAsync } from '@angular/core/testing'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { GameTele } from '@keira/shared/acore-world-model'; +import { MysqlQueryService, SqliteService } from '@keira/shared/db-layer'; +import { EditorPageObject, TranslateTestingModule } from '@keira/shared/test-utils'; +import { ModalModule } from 'ngx-bootstrap/modal'; +import { ToastrModule } from 'ngx-toastr'; +import { of } from 'rxjs'; +import { instance, mock } from 'ts-mockito'; +import { GameTeleComponent } from './game-tele.component'; +import { GameTeleHandlerService } from '../game-tele-handler.service'; + +describe('GameTele integration tests', () => { + class GameTelePage extends EditorPageObject {} + // Constants + const id = 1; + + const expectedFullCreateQuery = + 'DELETE FROM `game_tele` WHERE (`id` = ' + + id + + ');\n' + + 'INSERT INTO `game_tele` (`id`, `position_x`, `position_y`, `position_z`, `orientation`, `map`, `name`) VALUES\n' + + '(' + + id + + ", 0, 0, 0, 0, 0, '');\n"; + + const originalEntity = new GameTele(); + originalEntity.id = 1; + originalEntity.name = ''; + originalEntity.position_x = 0; + originalEntity.position_y = 0; + originalEntity.position_z = 0; + originalEntity.orientation = 0; + originalEntity.map = 0; + + // TestBed Configuration + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [BrowserAnimationsModule, ToastrModule.forRoot(), ModalModule.forRoot(), TranslateTestingModule], + declarations: [], + providers: [ + GameTeleHandlerService, + { + provide: SqliteService, + useValue: instance(mock(SqliteService)), + }, + ], + }).compileComponents(); + })); + + // Setup Function + function setup(creatingNew: boolean) { + const handlerService = TestBed.inject(GameTeleHandlerService); + // Ideally, use a public method or setter to set '_selected' + // For illustration, we're setting it directly + (handlerService as any)._selected = `${id}`; + handlerService.isNew = creatingNew; + + const queryService = TestBed.inject(MysqlQueryService); + const querySpy = spyOn(queryService, 'query').and.returnValue(of([])); + + spyOn(queryService, 'selectAll').and.returnValue(of(creatingNew ? [] : [originalEntity])); + + const _fixture = TestBed.createComponent(GameTeleComponent); + const page = new GameTelePage(_fixture); + _fixture.autoDetectChanges(true); + _fixture.detectChanges(); + return { page, querySpy, handlerService }; + } + + // Creating New Tests + describe('Creating new', () => { + let page: GameTelePage; + let querySpy: jasmine.Spy; + let handlerService: GameTeleHandlerService; + + beforeEach(() => { + ({ page, querySpy, handlerService } = setup(true)); + }); + + it('should correctly initialise', () => { + page.expectQuerySwitchToBeHidden(); + page.expectFullQueryToBeShown(); + page.expectFullQueryToContain(expectedFullCreateQuery); + querySpy.calls.reset(); + }); + + it('should correctly update the unsaved status', () => { + const field = 'name'; + expect(handlerService.isGameTeleUnsaved).toBe(false); + page.setInputValueById(field, 'ABC'); + expect(handlerService.isGameTeleUnsaved).toBe(true); + page.setInputValueById(field, ''); + expect(handlerService.isGameTeleUnsaved).toBe(false); + }); + + it('changing a property and executing the query should correctly work', () => { + const expectedQuery = + 'DELETE FROM `game_tele` WHERE (`id` = 1);\n' + + 'INSERT INTO `game_tele` (`id`, `position_x`, `position_y`, `position_z`, `orientation`, `map`, `name`) VALUES\n' + + "(1, 0, 0, 0, 0, 0, 'ABC');\n"; + + querySpy.calls.reset(); + + page.setInputValueById('name', 'ABC'); + page.expectFullQueryToContain(expectedQuery); + + page.clickExecuteQuery(); + + expect(querySpy).toHaveBeenCalledTimes(1); + expect(querySpy.calls.mostRecent().args[0]).toContain(expectedQuery); + }); + }); + + // Editing Existing Tests + describe('Editing existing', () => { + let page: GameTelePage; + let querySpy: jasmine.Spy; + + beforeEach(() => { + ({ page, querySpy } = setup(false)); + }); + + it('should correctly initialise', () => { + page.expectDiffQueryToBeShown(); + page.expectDiffQueryToBeEmpty(); + page.expectFullQueryToContain(expectedFullCreateQuery); + }); + + it('changing all properties and executing the query should correctly work', () => { + const expectedQuery = + "UPDATE `game_tele` SET `position_x` = 1, `position_y` = 2, `position_z` = 3, `orientation` = 4, `map` = 5, `name` = '6' " + + 'WHERE (`id` = 1);'; + querySpy.calls.reset(); + + page.setInputValueById('position_x', 1); + page.setInputValueById('position_y', 2); + page.setInputValueById('position_z', 3); + page.setInputValueById('orientation', 4); + page.setInputValueById('map', 5); + page.setInputValueById('name', '6'); + // If you have a method to change all fields, consider using it + // page.changeAllFields(originalEntity, ['name'], values); + page.expectDiffQueryToContain(expectedQuery); + + page.clickExecuteQuery(); + expect(querySpy).toHaveBeenCalledTimes(1); + expect(querySpy.calls.mostRecent().args[0]).toContain(expectedQuery); + }); + + it('changing values should correctly update the queries', () => { + page.setInputValueById('name', 'ABCD'); + page.expectDiffQueryToContain("UPDATE `game_tele` SET `name` = 'ABCD' WHERE (`id` = 1);"); + page.expectFullQueryToContain( + 'DELETE FROM `game_tele` WHERE (`id` = 1);\n' + + 'INSERT INTO `game_tele` (`id`, `position_x`, `position_y`, `position_z`, `orientation`, `map`, `name`) VALUES\n' + + "(1, 0, 0, 0, 0, 0, 'ABCD');\n", + ); + + page.setInputValueById('position_x', 1.234); + page.expectDiffQueryToContain("UPDATE `game_tele` SET `position_x` = 1.234, `name` = 'ABCD' WHERE (`id` = 1);"); + page.expectFullQueryToContain( + 'DELETE FROM `game_tele` WHERE (`id` = 1);\n' + + 'INSERT INTO `game_tele` (`id`, `position_x`, `position_y`, `position_z`, `orientation`, `map`, `name`) VALUES\n' + + "(1, 1.234, 0, 0, 0, 0, 'ABCD');\n", + ); + + querySpy.calls.reset(); + }); + }); +}); diff --git a/libs/features/game-tele/src/edit-game-tele/game-tele.service.spec.ts b/libs/features/game-tele/src/edit-game-tele/game-tele.service.spec.ts new file mode 100644 index 0000000000..199295bd5b --- /dev/null +++ b/libs/features/game-tele/src/edit-game-tele/game-tele.service.spec.ts @@ -0,0 +1,26 @@ +import { TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { MysqlQueryService, SqliteService } from '@keira/shared/db-layer'; +import { ToastrService } from 'ngx-toastr'; +import { instance, mock } from 'ts-mockito'; +import { GameTeleService } from './game-tele.service'; + +describe('GameTeleService', () => { + beforeEach(() => + TestBed.configureTestingModule({ + imports: [RouterTestingModule], + providers: [ + { provide: MysqlQueryService, useValue: instance(mock(MysqlQueryService)) }, + { provide: ToastrService, useValue: instance(mock(ToastrService)) }, + { provide: SqliteService, useValue: instance(mock(SqliteService)) }, + GameTeleService, + GameTeleService, + ], + }), + ); + + it('should be created', () => { + const service: GameTeleService = TestBed.inject(GameTeleService); + expect(service).toBeTruthy(); + }); +}); diff --git a/libs/features/game-tele/src/edit-game-tele/game-tele.service.ts b/libs/features/game-tele/src/edit-game-tele/game-tele.service.ts new file mode 100644 index 0000000000..2f2a935e91 --- /dev/null +++ b/libs/features/game-tele/src/edit-game-tele/game-tele.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { SingleRowEditorService } from '@keira/shared/base-abstract-classes'; +import { GAME_TELE_ID, GAME_TELE_NAME, GAME_TELE_TABLE, GameTele } from '@keira/shared/acore-world-model'; +import { GameTeleHandlerService } from '../game-tele-handler.service'; + +@Injectable({ + providedIn: 'root', +}) +export class GameTeleService extends SingleRowEditorService { + /* istanbul ignore next */ // because of: https://github.com/gotwarlost/istanbul/issues/690 + constructor(protected override readonly handlerService: GameTeleHandlerService) { + super(GameTele, GAME_TELE_TABLE, GAME_TELE_ID, GAME_TELE_NAME, true, handlerService); + } +} diff --git a/libs/features/game-tele/src/game-tele-handler.service.spec.ts b/libs/features/game-tele/src/game-tele-handler.service.spec.ts new file mode 100644 index 0000000000..efdb60f6e2 --- /dev/null +++ b/libs/features/game-tele/src/game-tele-handler.service.spec.ts @@ -0,0 +1,17 @@ +import { TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { GameTeleHandlerService } from './game-tele-handler.service'; + +describe('GameTeleHandlerService', () => { + beforeEach(() => + TestBed.configureTestingModule({ + imports: [RouterTestingModule], + providers: [GameTeleHandlerService], + }), + ); + + it('should be created', () => { + const service: GameTeleHandlerService = TestBed.inject(GameTeleHandlerService); + expect(service).toBeTruthy(); + }); +}); diff --git a/libs/features/game-tele/src/game-tele-handler.service.ts b/libs/features/game-tele/src/game-tele-handler.service.ts new file mode 100644 index 0000000000..767bc21362 --- /dev/null +++ b/libs/features/game-tele/src/game-tele-handler.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { GAME_TELE_TABLE, GameTele } from '@keira/shared/acore-world-model'; +import { HandlerService } from '@keira/shared/base-abstract-classes'; + +@Injectable({ + providedIn: 'root', +}) +export class GameTeleHandlerService extends HandlerService { + protected readonly mainEditorRoutePath = 'game-tele/tele'; + + get isGameTeleUnsaved(): boolean { + return this.statusMap[GAME_TELE_TABLE]; + } + + protected _statusMap = { + [GAME_TELE_TABLE]: false, + }; + + override select(isNew: boolean, id: string | number | Partial, name?: string) { + super.select(isNew, id, name); + } +} diff --git a/libs/features/game-tele/src/index.ts b/libs/features/game-tele/src/index.ts new file mode 100644 index 0000000000..0cc6f603f1 --- /dev/null +++ b/libs/features/game-tele/src/index.ts @@ -0,0 +1,3 @@ +export { GameTeleComponent } from './edit-game-tele/game-tele.component'; +export { SelectGameTeleComponent } from './select-game-tele/select-game-tele.component'; +export { GameTeleHandlerService } from './game-tele-handler.service'; diff --git a/libs/features/game-tele/src/select-game-tele/select-game-tele.component.html b/libs/features/game-tele/src/select-game-tele/select-game-tele.component.html new file mode 100644 index 0000000000..edd0687d15 --- /dev/null +++ b/libs/features/game-tele/src/select-game-tele/select-game-tele.component.html @@ -0,0 +1,65 @@ + + +
+
+ +
+ +
+

+
+
+ +
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+ + + + @if (selectService.rows) { +
+ + + + + + + + + +
+ } +
+
diff --git a/libs/features/game-tele/src/select-game-tele/select-game-tele.component.ts b/libs/features/game-tele/src/select-game-tele/select-game-tele.component.ts new file mode 100644 index 0000000000..a216d3163f --- /dev/null +++ b/libs/features/game-tele/src/select-game-tele/select-game-tele.component.ts @@ -0,0 +1,35 @@ +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; +import { SelectComponent } from '@keira/shared/base-abstract-classes'; +import { GAME_TELE_CUSTOM_STARTING_ID, GAME_TELE_ID, GAME_TELE_TABLE, GameTele } from '@keira/shared/acore-world-model'; +import { NgxDatatableModule } from '@siemens/ngx-datatable'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { GameTeleHandlerService } from '../game-tele-handler.service'; +import { SelectGameTeleService } from './select-game-tele.service'; +import { WIKI_BASE_URL } from '@keira/shared/constants'; +import { CreateComponent, HighlightjsWrapperComponent, TopBarComponent } from '@keira/shared/base-editor-components'; +import { MapSelectorBtnComponent } from '@keira/shared/selectors'; + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + templateUrl: './select-game-tele.component.html', + standalone: true, + imports: [ + FormsModule, + ReactiveFormsModule, + TranslateModule, + NgxDatatableModule, + CreateComponent, + HighlightjsWrapperComponent, + TopBarComponent, + MapSelectorBtnComponent, + ], +}) +export class SelectGameTeleComponent extends SelectComponent { + protected readonly entityTable = GAME_TELE_TABLE; + protected readonly entityIdField = GAME_TELE_ID; + readonly customStartingId = GAME_TELE_CUSTOM_STARTING_ID; + protected readonly selectService = inject(SelectGameTeleService); + readonly handlerService = inject(GameTeleHandlerService); + protected readonly WIKI_BASE_URL = WIKI_BASE_URL; +} diff --git a/libs/features/game-tele/src/select-game-tele/select-game-tele.integration.spec.ts b/libs/features/game-tele/src/select-game-tele/select-game-tele.integration.spec.ts new file mode 100644 index 0000000000..3492327cf6 --- /dev/null +++ b/libs/features/game-tele/src/select-game-tele/select-game-tele.integration.spec.ts @@ -0,0 +1,163 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { Router } from '@angular/router'; +import { MysqlQueryService, SqliteService } from '@keira/shared/db-layer'; +import { SelectPageObject, TranslateTestingModule } from '@keira/shared/test-utils'; +import { ModalModule } from 'ngx-bootstrap/modal'; +import { ToastrModule } from 'ngx-toastr'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { of } from 'rxjs'; +import { SelectGameTeleComponent } from './select-game-tele.component'; +import { instance, mock } from 'ts-mockito'; +import { GameTeleHandlerService } from '../game-tele-handler.service'; +import { GameTele } from '@keira/shared/acore-world-model'; + +describe('SelectConditions integration tests', () => { + class SelectGameTelePage extends SelectPageObject {} + /** + * Setup function to initialize the component, spies, and page object. + * Returns the fixture, page, and component instances for each test. + */ + function setup() { + // Inject Services + const router = TestBed.inject(Router); + const navigateSpy = spyOn(router, 'navigate'); + const queryService = TestBed.inject(MysqlQueryService); + const querySpy = spyOn(queryService, 'query').and.returnValue(of([{ max: 1 }])); + + // Create Component Fixture and Page Object + const fixture: ComponentFixture = TestBed.createComponent(SelectGameTeleComponent); + const page: SelectGameTelePage = new SelectGameTelePage(fixture); + const component: SelectGameTeleComponent = fixture.componentInstance; + + // Initialize Change Detection + fixture.autoDetectChanges(true); + fixture.detectChanges(); + + return { page, component, navigateSpy, querySpy }; + } + + /** + * TestBed Configuration + * - Declares the component in the `declarations` array. + * - Moves `SelectGameTeleComponent` from `imports` to `declarations`. + */ + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [BrowserAnimationsModule, ToastrModule.forRoot(), ModalModule.forRoot(), TranslateTestingModule], + declarations: [], + providers: [ + GameTeleHandlerService, + { + provide: SqliteService, + useValue: instance(mock(SqliteService)), + }, + ], + }).compileComponents(); + })); + + it('should correctly initialise', waitForAsync(async () => { + const { page, component, querySpy } = setup(); + await page.fixture.whenStable(); + expect(page.createInput.value).toEqual(`${component.customStartingId}`); + page.expectNewEntityFree(); + expect(querySpy).toHaveBeenCalledWith('SELECT MAX(id) AS max FROM game_tele;'); + expect(page.queryWrapper.innerText).toContain('SELECT * FROM `game_tele` LIMIT 50'); + })); + + for (const { id, name, limit, expectedQuery } of [ + { + id: 1, + name: 'ABC', + limit: '100', + expectedQuery: "SELECT * FROM `game_tele` WHERE (`id` LIKE '%1%') AND (`name` LIKE '%ABC%') LIMIT 100", + }, + { + id: 2, + name: '', + limit: '100', + expectedQuery: "SELECT * FROM `game_tele` WHERE (`id` LIKE '%2%') LIMIT 100", + }, + { + id: null, + name: 'AB', + limit: '100', + expectedQuery: "SELECT * FROM `game_tele` WHERE (`name` LIKE '%AB%') LIMIT 100", + }, + ]) { + it(`searching an existing entity should correctly work [id: ${id}, name: ${name}]`, () => { + const { page, component: _component, navigateSpy: _navigateSpy, querySpy } = setup(); + querySpy.calls.reset(); + + // Set input values based on the test case + if (id !== null) { + page.setInputValue(page.searchIdInput, `${id}`); + } + if (name) { + page.setInputValue(page.searchNameInput, name); + } + + page.setInputValue(page.searchLimitInput, limit); + + // Validate the query in the UI + expect(page.queryWrapper.innerText).toContain(expectedQuery); + + // Trigger the search + page.clickElement(page.searchBtn); + + // Validate the query was executed as expected + expect(querySpy).toHaveBeenCalledTimes(1); + expect(querySpy.calls.mostRecent().args[0]).toBe(expectedQuery); + }); + } + + it('searching and selecting an existing entity from the datatable should correctly work', () => { + const { page, component: _component, navigateSpy, querySpy } = setup(); + const results = [ + { + id: 1, + name: 'Test', + position_x: 1, + position_y: 2, + position_z: 3, + orientation: 4, + map: 5, + }, + { + id: 2, + name: 'Test2', + position_x: 2, + position_y: 3, + position_z: 4, + orientation: 5, + map: 6, + }, + { + id: 3, + name: 'Test3', + position_x: 3, + position_y: 4, + position_z: 5, + orientation: 6, + map: 7, + }, + ] as GameTele[]; + + querySpy.calls.reset(); + querySpy.and.returnValue(of(results)); + + page.clickElement(page.searchBtn); + + const row0 = page.getDatatableRowExternal(0); + const row1 = page.getDatatableRowExternal(1); + const row2 = page.getDatatableRowExternal(2); + + expect(row0.innerText).toContain(results[0].name.toString()); + expect(row1.innerText).toContain(results[1].name.toString()); + expect(row2.innerText).toContain(results[2].name.toString()); + + page.clickElement(page.getDatatableCellExternal(1, 1)); + + expect(navigateSpy).toHaveBeenCalledTimes(1); + expect(navigateSpy).toHaveBeenCalledWith(['game-tele/tele']); + }); +}); diff --git a/libs/features/game-tele/src/select-game-tele/select-game-tele.service.ts b/libs/features/game-tele/src/select-game-tele/select-game-tele.service.ts new file mode 100644 index 0000000000..c50a9f7a36 --- /dev/null +++ b/libs/features/game-tele/src/select-game-tele/select-game-tele.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import { SelectService } from '@keira/shared/base-abstract-classes'; +import { MysqlQueryService } from '@keira/shared/db-layer'; +import { GameTeleHandlerService } from '../game-tele-handler.service'; +import { GAME_TELE_ID, GAME_TELE_NAME, GAME_TELE_SEARCH_FIELDS, GAME_TELE_TABLE, GameTele } from '@keira/shared/acore-world-model'; + +@Injectable({ + providedIn: 'root', +}) +export class SelectGameTeleService extends SelectService { + /* istanbul ignore next */ // because of: https://github.com/gotwarlost/istanbul/issues/690 + constructor( + override readonly queryService: MysqlQueryService, + public override readonly handlerService: GameTeleHandlerService, + ) { + super(queryService, handlerService, GAME_TELE_TABLE, GAME_TELE_ID, GAME_TELE_NAME, GAME_TELE_SEARCH_FIELDS); + } +} diff --git a/libs/features/game-tele/tsconfig.json b/libs/features/game-tele/tsconfig.json new file mode 100644 index 0000000000..5cf0a16564 --- /dev/null +++ b/libs/features/game-tele/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "es2022", + "useDefineForClassFields": false, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../../tsconfig.base.json", + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/libs/features/game-tele/tsconfig.lib.json b/libs/features/game-tele/tsconfig.lib.json new file mode 100644 index 0000000000..f68063a517 --- /dev/null +++ b/libs/features/game-tele/tsconfig.lib.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../dist/out-tsc", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "exclude": ["src/**/*.spec.ts", "jest.config.ts", "src/**/*.test.ts"], + "include": ["src/**/*.ts"] +} diff --git a/libs/features/game-tele/tsconfig.spec.json b/libs/features/game-tele/tsconfig.spec.json new file mode 100644 index 0000000000..b864ec66ae --- /dev/null +++ b/libs/features/game-tele/tsconfig.spec.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "types": ["jasmine", "node"] + }, + "include": ["**/*.spec.ts", "**/*.d.ts"], + "exclude": ["dist", "release", "node_modules"] +} diff --git a/libs/main/main-window/src/sidebar/sidebar.component.html b/libs/main/main-window/src/sidebar/sidebar.component.html index 29b29618a0..fd05bdf0db 100644 --- a/libs/main/main-window/src/sidebar/sidebar.component.html +++ b/libs/main/main-window/src/sidebar/sidebar.component.html @@ -727,6 +727,33 @@
+ +
diff --git a/libs/main/main-window/src/sidebar/sidebar.component.ts b/libs/main/main-window/src/sidebar/sidebar.component.ts index 9e1487e720..0318110229 100644 --- a/libs/main/main-window/src/sidebar/sidebar.component.ts +++ b/libs/main/main-window/src/sidebar/sidebar.component.ts @@ -22,6 +22,7 @@ import { PageTextHandlerService, AcoreStringHandlerService, } from '@keira/features/texts'; +import { GameTeleHandlerService } from '@keira/features/game-tele'; import { LocationService } from '@keira/shared/common-services'; import { MysqlService } from '@keira/shared/db-layer'; import { SaiHandlerService } from '@keira/shared/sai-editor'; @@ -45,6 +46,7 @@ interface MenuStats { texts: ToggleType; gossip: ToggleType; spell: ToggleType; + gameTele: ToggleType; } @Component({ @@ -84,6 +86,7 @@ export class SidebarComponent { texts: 'up', gossip: 'up', spell: 'up', + gameTele: 'up', }; private readonly IMAGES_COUNT = 7; private readonly RANDOM_IMAGE = Math.floor(Math.random() * this.IMAGES_COUNT) + 1; @@ -107,6 +110,7 @@ export class SidebarComponent { protected readonly broadcastTextHandlerService = inject(BroadcastTextHandlerService); protected readonly npcTextHandlerService = inject(NpcTextHandlerService); protected readonly acoreStringHandlerService = inject(AcoreStringHandlerService); + protected readonly gameTeleHandlerService = inject(GameTeleHandlerService); private readonly locationService = inject(LocationService); getSideBarState(): boolean { @@ -142,6 +146,7 @@ export class SidebarComponent { this.menuStates.texts = 'up'; this.menuStates.gossip = 'up'; this.menuStates.spell = 'up'; + this.menuStates.gameTele = 'up'; } logout(): void { diff --git a/libs/shared/acore-world-model/src/entities/game-tele.type.ts b/libs/shared/acore-world-model/src/entities/game-tele.type.ts new file mode 100644 index 0000000000..748ae75691 --- /dev/null +++ b/libs/shared/acore-world-model/src/entities/game-tele.type.ts @@ -0,0 +1,17 @@ +import { TableRow } from '@keira/shared/constants'; + +export const GAME_TELE_CUSTOM_STARTING_ID = 10_000; +export const GAME_TELE_TABLE = 'game_tele'; +export const GAME_TELE_ID = 'id'; +export const GAME_TELE_NAME = 'name'; +export const GAME_TELE_SEARCH_FIELDS = ['id', 'name', 'map']; + +export class GameTele extends TableRow { + id: number = 0; + position_x: number = 0; + position_y: number = 0; + position_z: number = 0; + orientation: number = 0; + map: number = 0; + name: string = ''; +} diff --git a/libs/shared/acore-world-model/src/index.ts b/libs/shared/acore-world-model/src/index.ts index a2a069fc63..fc91d8e4af 100644 --- a/libs/shared/acore-world-model/src/index.ts +++ b/libs/shared/acore-world-model/src/index.ts @@ -29,6 +29,7 @@ export * from './entities/gameobject-spawn.type'; export * from './entities/gameobject-spawn-addon.type'; export * from './entities/gameobject-template.type'; export * from './entities/gameobject-template-addon.type'; +export * from './entities/game-tele.type'; export * from './entities/gossip-menu.type'; export * from './entities/gossip-menu-option.type'; export * from './entities/holiday.type'; diff --git a/libs/shared/selectors/src/search/game-tele-search.service.ts b/libs/shared/selectors/src/search/game-tele-search.service.ts new file mode 100644 index 0000000000..e8a7d5a7f8 --- /dev/null +++ b/libs/shared/selectors/src/search/game-tele-search.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { MysqlQueryService } from '@keira/shared/db-layer'; +import { GAME_TELE_SEARCH_FIELDS, GAME_TELE_TABLE, GameTele } from '@keira/shared/acore-world-model'; +import { SearchService } from '@keira/shared/base-abstract-classes'; + +@Injectable({ + providedIn: 'root', +}) +export class GameTeleSearchService extends SearchService { + /* istanbul ignore next */ // because of: https://github.com/gotwarlost/istanbul/issues/690 + constructor(override readonly queryService: MysqlQueryService) { + super(queryService, GAME_TELE_TABLE, GAME_TELE_SEARCH_FIELDS); + } +} diff --git a/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.spec.ts b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.spec.ts new file mode 100644 index 0000000000..5c051540ed --- /dev/null +++ b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { GameTeleSelectorBtnComponent } from './game-tele-selector-btn.component'; +import { ModalModule } from 'ngx-bootstrap/modal'; + +describe('GameTeleSelectorBtnComponent', () => { + let component: GameTeleSelectorBtnComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ModalModule.forRoot(), GameTeleSelectorBtnComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(GameTeleSelectorBtnComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.ts b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.ts new file mode 100644 index 0000000000..efeb999b6b --- /dev/null +++ b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-btn.component.ts @@ -0,0 +1,14 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { GameTeleSelectorModalComponent } from './game-tele-selector-modal.component'; +import { BaseSelectorBtnComponent } from '../base-selector/base-selector-btn.component'; + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'keira-creature-selector-btn', + templateUrl: '../base-selector/base-selector-btn.component.html', + styleUrls: ['../base-selector/base-selector-btn.component.scss'], + standalone: true, +}) +export class GameTeleSelectorBtnComponent extends BaseSelectorBtnComponent { + protected readonly modalComponentClass = GameTeleSelectorModalComponent; +} diff --git a/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.html b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.html new file mode 100644 index 0000000000..bceb08f785 --- /dev/null +++ b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.html @@ -0,0 +1,53 @@ + + + diff --git a/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.spec.ts b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.spec.ts new file mode 100644 index 0000000000..20595f3687 --- /dev/null +++ b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.spec.ts @@ -0,0 +1,33 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { BsModalRef } from 'ngx-bootstrap/modal'; +import { instance, mock } from 'ts-mockito'; +import { GameTeleSelectorModalComponent } from './game-tele-selector-modal.component'; +import { TranslateTestingModule } from '@keira/shared/test-utils'; +import { MysqlQueryService } from '@keira/shared/db-layer'; +import { GameTeleSearchService } from '../../search/game-tele-search.service'; + +describe('GameTeleSelectorModalComponent', () => { + let component: GameTeleSelectorModalComponent; + let fixture: ComponentFixture; + let searchService: GameTeleSearchService; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [GameTeleSelectorModalComponent, TranslateTestingModule], + providers: [BsModalRef, { provide: MysqlQueryService, useValue: instance(mock(MysqlQueryService)) }], + }).compileComponents(); + })); + + beforeEach(() => { + searchService = TestBed.inject(GameTeleSearchService); + searchService.query = '--mock query'; + + fixture = TestBed.createComponent(GameTeleSelectorModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.ts b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.ts new file mode 100644 index 0000000000..27eb8ff2a0 --- /dev/null +++ b/libs/shared/selectors/src/selectors/game-tele-selector/game-tele-selector-modal.component.ts @@ -0,0 +1,20 @@ +import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; +import { GAME_TELE_ID, GameTele } from '@keira/shared/acore-world-model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgxDatatableModule } from '@siemens/ngx-datatable'; +import { SearchSelectorModalComponent } from '../base-selector/search-selector-modal.component'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { GameTeleSearchService } from '../../search/game-tele-search.service'; +import { HighlightjsWrapperComponent } from '@keira/shared/base-editor-components'; + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'keira-game-tele-selector-modal', + templateUrl: './game-tele-selector-modal.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, NgxDatatableModule, TranslateModule, HighlightjsWrapperComponent], +}) +export class GameTeleSelectorModalComponent extends SearchSelectorModalComponent { + protected entityIdField = GAME_TELE_ID; + protected searchService = inject(GameTeleSearchService); +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 610ba0de7d..3a9cd54727 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -28,6 +28,7 @@ "@keira/features/creature": ["libs/features/creature/src/index.ts"], "@keira/features/dashboard": ["libs/features/dashboard/src/index.ts"], "@keira/features/gameobject": ["libs/features/gameobject/src/index.ts"], + "@keira/features/game-tele": ["libs/features/game-tele/src/index.ts"], "@keira/features/gossip": ["libs/features/gossip/src/index.ts"], "@keira/features/item": ["libs/features/item/src/index.ts"], "@keira/features/other-loots": ["libs/features/other-loots/src/index.ts"], From 2033d5b3602b377ce26b7487325a140222840987 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 18:57:57 +0100 Subject: [PATCH 17/18] chore(deps): update dependency electron to v34 (#3254) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc876857d8..2ac48d450a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,7 +70,7 @@ "bootstrap": "5.3.3", "conventional-changelog-cli": "4.1.0", "cross-env": "7.0.3", - "electron": "33.3.1", + "electron": "34.0.0", "electron-builder": "25.1.8", "electron-reload": "1.5.0", "eslint": "8.57.1", @@ -13128,9 +13128,9 @@ } }, "node_modules/electron": { - "version": "33.3.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-33.3.1.tgz", - "integrity": "sha512-Z7l2bVgpdKxHQMI4i0CirBX2n+iCYKOx5mbzNM3BpOyFELwlobEXKmzCmEnwP+3EcNeIhUQyIEBFQxN06QgdIw==", + "version": "34.0.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-34.0.0.tgz", + "integrity": "sha512-fpaPb0lifoUJ6UJa4Lk8/0B2Ku/xDZWdc1Gkj67jbygTCrvSon0qquju6Ltx1Kz23GRqqlIHXiy9EvrjpY7/Wg==", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -13279,9 +13279,9 @@ "license": "ISC" }, "node_modules/electron/node_modules/@types/node": { - "version": "20.17.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.12.tgz", - "integrity": "sha512-vo/wmBgMIiEA23A/knMfn/cf37VnuF52nZh5ZoW0GWt4e4sxNquibrMRJ7UQsA06+MBx9r/H1jsI9grYjQCQlw==", + "version": "20.17.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.14.tgz", + "integrity": "sha512-w6qdYetNL5KRBiSClK/KWai+2IMEJuAj+EujKCumalFOwXtvOXaEan9AuwcRID2IcOIAWSIfR495hBtgKlx2zg==", "license": "MIT", "dependencies": { "undici-types": "~6.19.2" diff --git a/package.json b/package.json index b2d9e4a8af..ea29dbb6e7 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "bootstrap": "5.3.3", "conventional-changelog-cli": "4.1.0", "cross-env": "7.0.3", - "electron": "33.3.1", + "electron": "34.0.0", "electron-builder": "25.1.8", "electron-reload": "1.5.0", "eslint": "8.57.1", From 3dcc52cf4cbac00c62e7f481f5dd89f3ae6bba4e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 18:58:24 +0100 Subject: [PATCH 18/18] chore(deps): update dependency @types/node to v22.10.7 (#3257) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2ac48d450a..7e69844dec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,7 +62,7 @@ "@types/jasminewd2": "2.0.13", "@types/jquery": "3.5.32", "@types/mysql": "2.15.26", - "@types/node": "22.10.6", + "@types/node": "22.10.7", "@types/sqlite3": "3.1.11", "@types/sqlstring": "2.3.2", "@typescript-eslint/eslint-plugin": "7.18.0", @@ -8382,9 +8382,9 @@ } }, "node_modules/@types/node": { - "version": "22.10.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.6.tgz", - "integrity": "sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ==", + "version": "22.10.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.7.tgz", + "integrity": "sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg==", "license": "MIT", "dependencies": { "undici-types": "~6.20.0" diff --git a/package.json b/package.json index ea29dbb6e7..a55b7128ae 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@types/jasminewd2": "2.0.13", "@types/jquery": "3.5.32", "@types/mysql": "2.15.26", - "@types/node": "22.10.6", + "@types/node": "22.10.7", "@types/sqlite3": "3.1.11", "@types/sqlstring": "2.3.2", "@typescript-eslint/eslint-plugin": "7.18.0",