From 92cb34b719b481faf417760f307241e8f6d777a9 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 2 Jul 2021 22:59:56 +0200
Subject: viewer: types normalization - tag.d.ts
GitHub: closes #301
---
viewer/src/@types/tag.d.ts | 40 ++++++++++++++++-----------------
viewer/src/components/LdProposition.vue | 9 ++++----
viewer/src/components/LdTagInput.vue | 11 ++++-----
viewer/src/services/indexfactory.ts | 29 ++++++++++++------------
viewer/src/services/indexsearch.ts | 13 ++++++-----
viewer/src/store/galleryStore.ts | 13 ++++++-----
viewer/src/views/PanelLeft.vue | 3 ++-
7 files changed, 62 insertions(+), 56 deletions(-)
diff --git a/viewer/src/@types/tag.d.ts b/viewer/src/@types/tag.d.ts
index bb908d3..9ed2c04 100644
--- a/viewer/src/@types/tag.d.ts
+++ b/viewer/src/@types/tag.d.ts
@@ -17,25 +17,25 @@
-- along with this program. If not, see .
*/
-declare namespace Tag {
- interface Node {
- tag: RawTag;
- tagfiltered: RawTag;
- rootPart: boolean;
- childPart: boolean;
- items: Item[];
- children: Index;
- }
- interface Search extends Node {
- parent?: Node;
- operation: string; // Enum Operation
- display: string;
- }
- type SearchByOperation = Record;
- type Index = Record;
+import { Item, RawTag } from "./gallery";
- interface Category {
- tag: string;
- index: Index;
- }
+export interface TagNode {
+ tag: RawTag;
+ tagfiltered: RawTag;
+ rootPart: boolean;
+ childPart: boolean;
+ items: Item[];
+ children: TagIndex;
+}
+export interface TagSearch extends TagNode {
+ parent?: TagNode;
+ operation: string; // Enum Operation
+ display: string;
+}
+export type TagSearchByOperation = Record;
+export type TagIndex = Record;
+
+export interface TagCategory {
+ tag: string;
+ index: TagIndex;
}
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
index 2396d1f..088e249 100644
--- a/viewer/src/components/LdProposition.vue
+++ b/viewer/src/components/LdProposition.vue
@@ -56,15 +56,16 @@