260326_01_ENH: 일부 설정 파일들 리펙토링
This commit is contained in:
44
src/types/filter.types.ts
Normal file
44
src/types/filter.types.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
export type FilterChild = {
|
||||
value: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export type FilterItem = {
|
||||
variable: string;
|
||||
variableName: string;
|
||||
};
|
||||
|
||||
export type TotalFilterItem = FilterItem & {
|
||||
children: FilterChild[];
|
||||
};
|
||||
|
||||
export enum CategoryTargetType {
|
||||
PENETRATION = "PENETRATION",
|
||||
PURCHASE = "PURCHASE",
|
||||
INTENDED = "INTENDED"
|
||||
}
|
||||
|
||||
export enum CategoryTargetData {
|
||||
PROFILE = 11,
|
||||
PENETRATION_CHANGE = 21,
|
||||
BRAND = 12,
|
||||
TYPE_SPEC = 13,
|
||||
BEHAVIOR = 14,
|
||||
PURCHASE_CHANNEL = 32,
|
||||
PAYMENT_METHOD = 15,
|
||||
}
|
||||
|
||||
export type CategoryTargetTypeItem = {
|
||||
label: string;
|
||||
value: CategoryTargetType;
|
||||
}
|
||||
|
||||
export type TargetChild = {
|
||||
label: string;
|
||||
value: CategoryTargetData;
|
||||
}
|
||||
|
||||
export type CategoryTargetItem = {
|
||||
type: CategoryTargetType[];
|
||||
children: TargetChild[];
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import {BANNER_GROUP, BANNER_KEY_MAP, PRODUCT_KEY_MAP, PRODUCTS_FILTER_ITEM} from "@/const/lgConst";
|
||||
import {CategoryTargetType} from "@/config/filter.types";
|
||||
import {BANNER_GROUP} from "@/const/lg-banner.const";
|
||||
import {BANNER_KEY_MAP, PRODUCT_KEY_MAP} from "@/const/lg-schema.const";
|
||||
import {PRODUCTS_FILTER_ITEM} from "@/const/lg-product.const";
|
||||
import {CategoryTargetType} from "@/types/filter.types";
|
||||
import {EChartsOption} from "echarts";
|
||||
|
||||
export type ProductKey = keyof typeof PRODUCT_KEY_MAP;
|
||||
@@ -107,4 +109,4 @@ export type CategoryResolvedField = CategoryFieldSpec & {
|
||||
export type BuildPageModeConfigResult = {
|
||||
fields: CategoryResolvedField[];
|
||||
variableIdMap: Record<string, string>;
|
||||
};
|
||||
};
|
||||
13
src/types/menu.types.ts
Normal file
13
src/types/menu.types.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export type TopMenuItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
path: string;
|
||||
/** 현재 경로가 이 탭에 해당하는지 판별하는 함수 */
|
||||
match?: (pathname: string) => boolean;
|
||||
};
|
||||
|
||||
export type SubMenuItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
path: string;
|
||||
};
|
||||
Reference in New Issue
Block a user