bmc-common-resource 1.1.135 → 1.1.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,17 +2,17 @@
2
2
  * 品项与房间、分组的映射关系
3
3
  * 定义各品项对应的可用房间和分组
4
4
  */
5
- import { RoomData, GroupData, ClassifyRoomGroupMapType } from './types/index';
6
- export declare const CLASSIFY_ROOM_GROUP_MAP: ClassifyRoomGroupMapType;
5
+ import { RoomData, GroupData } from './types/index';
7
6
  /**
8
7
  * 根据品项代码获取对应的房间和分组
9
8
  * @param classifyType 品项类型常量名
10
9
  * @param classifyRoomGroupMap 品项房间分组映射对象(JSON格式)
10
+ * @param productCategoryMap 产品分类列表
11
11
  * @param groupCategoryMap 分组分类映射对象(JSON格式)
12
12
  * @param roomOptions 房间选项
13
13
  * @returns 包含房间、分组和产品分类的嵌套数组
14
14
  */
15
- export declare function getClassifyRoomsAndGroups(classifyType: string, classifyRoomGroupMap: any, groupCategoryMap: any, roomOptions: any[]): RoomData[];
15
+ export declare function getClassifyRoomsAndGroups(classifyType: string, classifyRoomGroupMap: any, productCategoryMap: any, groupCategoryMap: any, roomOptions: any[]): RoomData[];
16
16
  /**
17
17
  * 根据品项代码和房间代码获取可用的分组
18
18
  * @param classifyType 品项类型常量名
@@ -21,7 +21,7 @@ export declare function getClassifyRoomsAndGroups(classifyType: string, classify
21
21
  * @param groupCategoryMap 分组分类映射对象(JSON格式)
22
22
  * @returns 包含分组和产品分类的嵌套数组
23
23
  */
24
- export declare function getGroupsByClassifyAndRoom(classifyType: string, roomType: string, classifyRoomGroupMap: any, groupCategoryMap: any): GroupData[];
24
+ export declare function getGroupsByClassifyAndRoom(classifyType: string, roomType: string, classifyRoomGroupMap: any, groupCategoryMap: any, productCategoryMap: any): GroupData[];
25
25
  /**
26
26
  * 根据品项代码获取品项的基本配置信息
27
27
  * @param classifyCode 品项类型代码(如CUSTOM_FURNITURE)
@@ -42,7 +42,7 @@ export declare function getClassifyBaseInfo(classifyCode: string, classifyRoomGr
42
42
  * @param classifyType 品项类型,如果提供则在该品项下查找
43
43
  * @param classifyRoomGroupMap 品项房间分组映射对象(JSON格式)
44
44
  * @param groupCategoryMap 分组分类映射对象(JSON格式)
45
+ * @param productCategoryMap 产品分类映射
45
46
  * @returns 匹配的分组类型代码(如CABINET_TYPE),未找到返回null
46
47
  */
47
- export declare function getGroupTypeByProductCategory(productCategory: string, mainCategoryCode: string, classifyType: string, classifyRoomGroupMap: any, groupCategoryMap: any): string | null;
48
- export default CLASSIFY_ROOM_GROUP_MAP;
48
+ export declare function getGroupTypeByProductCategory(productCategory: string, mainCategoryCode: string, classifyType: string, classifyRoomGroupMap: any, groupCategoryMap: any, productCategoryMap: any): string | null;
@@ -2,10 +2,7 @@
2
2
  * 分组类型定义
3
3
  * 定义系统中所有可用的分组类型及其对应的功能分类产品
4
4
  */
5
- import { GroupType, ProductCategoryData } from './types/index';
6
- export declare const BASE_GROUP_TYPES: Record<string, GroupType>;
7
- export declare const CLASSIFY_GROUP_TYPES: Record<string, Record<string, GroupType>>;
8
- export declare const GROUP_TYPES: Record<string, GroupType>;
5
+ import { ProductCategoryData } from './types/index';
9
6
  /**
10
7
  * 获取排序后的分组类型数组
11
8
  * @param groupCategoryMap 分组、产品分类映射(JSON格式)
@@ -25,7 +22,7 @@ export declare function getGroupTypeByKey(groupTypeKey: string, groupCategoryMap
25
22
  * @param groupCategoryMap 分组、产品分类映射(JSON格式)
26
23
  * @returns 格式化的产品分类对象数组
27
24
  */
28
- export declare function getProductCategoriesByGroupType(groupTypeKey: string, groupCategoryMap: any): ProductCategoryData[];
25
+ export declare function getProductCategoriesByGroupType(groupTypeKey: string, groupCategoryMap: any, productCategoryMap: any): ProductCategoryData[];
29
26
  /**
30
27
  * 获取指定分组的价格单位配置信息
31
28
  * @param groupTypeKey 分组类型键
@@ -36,4 +33,3 @@ export declare function getPriceParamsByGroupType(groupTypeKey: string, groupCat
36
33
  priceUnit?: string[];
37
34
  excludePriceUnit?: string[];
38
35
  };
39
- export default BASE_GROUP_TYPES;
@@ -2,21 +2,15 @@
2
2
  * 产品配置入口文件
3
3
  * 统一导出所有产品相关配置和工具函数
4
4
  */
5
- import ROOM_TYPES, { getSortedRoomTypes, getRoomTypeByKey } from './roomTypes';
6
- import PRODUCT_CATEGORIES, { getProductCategoryByKey, getAllProductCategories, ProductCategory } from './productCategories';
7
- import GROUP_TYPES, { getSortedGroupTypes, getGroupTypeByKey, getProductCategoriesByGroupType, getPriceParamsByGroupType } from './groupTypes';
8
- import CLASSIFY_ROOM_GROUP_MAP, { getClassifyRoomsAndGroups, getGroupsByClassifyAndRoom, getClassifyBaseInfo, getGroupTypeByProductCategory } from './classifyRoomGroupMap';
5
+ import { getProductCategoryByKey, getAllProductCategories, ProductCategory } from './productCategories';
6
+ import { getSortedGroupTypes, getGroupTypeByKey, getProductCategoriesByGroupType, getPriceParamsByGroupType } from './groupTypes';
7
+ import { getClassifyRoomsAndGroups, getGroupsByClassifyAndRoom, getClassifyBaseInfo, getGroupTypeByProductCategory } from './classifyRoomGroupMap';
9
8
  import { calculateProductMeasure, getMeasureUnitInfo, getAllMeasureUnits, isDimensionRequired, isDimensionRelated, ItemUnitMeasureCalculator } from './measure';
10
9
  import getCategoryViewSetting from './categoryFormMap';
11
10
  export * from './types/index';
12
- export * from './mappings';
13
11
  export * from './models';
14
- export { ROOM_TYPES, GROUP_TYPES, PRODUCT_CATEGORIES, CLASSIFY_ROOM_GROUP_MAP, calculateProductMeasure, getMeasureUnitInfo, getAllMeasureUnits, isDimensionRequired, isDimensionRelated, ItemUnitMeasureCalculator, getClassifyRoomsAndGroups, getGroupsByClassifyAndRoom, getClassifyBaseInfo, getSortedRoomTypes, getRoomTypeByKey, getSortedGroupTypes, getGroupTypeByKey, getProductCategoriesByGroupType, getPriceParamsByGroupType, getGroupTypeByProductCategory, getProductCategoryByKey, getAllProductCategories, getCategoryViewSetting, ProductCategory };
12
+ export { calculateProductMeasure, getMeasureUnitInfo, getAllMeasureUnits, isDimensionRequired, isDimensionRelated, ItemUnitMeasureCalculator, getClassifyRoomsAndGroups, getGroupsByClassifyAndRoom, getClassifyBaseInfo, getSortedGroupTypes, getGroupTypeByKey, getProductCategoriesByGroupType, getPriceParamsByGroupType, getGroupTypeByProductCategory, getProductCategoryByKey, getAllProductCategories, getCategoryViewSetting, ProductCategory };
15
13
  interface SolutionModuleExports {
16
- ROOM_TYPES: typeof ROOM_TYPES;
17
- GROUP_TYPES: typeof GROUP_TYPES;
18
- PRODUCT_CATEGORIES: typeof PRODUCT_CATEGORIES;
19
- CLASSIFY_ROOM_GROUP_MAP: typeof CLASSIFY_ROOM_GROUP_MAP;
20
14
  calculateProductMeasure: typeof calculateProductMeasure;
21
15
  getMeasureUnitInfo: typeof getMeasureUnitInfo;
22
16
  getAllMeasureUnits: typeof getAllMeasureUnits;
@@ -26,8 +20,6 @@ interface SolutionModuleExports {
26
20
  getClassifyRoomsAndGroups: typeof getClassifyRoomsAndGroups;
27
21
  getGroupsByClassifyAndRoom: typeof getGroupsByClassifyAndRoom;
28
22
  getClassifyBaseInfo: typeof getClassifyBaseInfo;
29
- getSortedRoomTypes: typeof getSortedRoomTypes;
30
- getRoomTypeByKey: typeof getRoomTypeByKey;
31
23
  getSortedGroupTypes: typeof getSortedGroupTypes;
32
24
  getGroupTypeByKey: typeof getGroupTypeByKey;
33
25
  getProductCategoriesByGroupType: typeof getProductCategoriesByGroupType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmc-common-resource",
3
- "version": "1.1.135",
3
+ "version": "1.1.136",
4
4
  "description": "通用枚举、常量和资源的npm包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -1,24 +0,0 @@
1
- /**
2
- * 分组与产品项的映射关系
3
- */
4
- /**
5
- * 分组与默认产品项的映射关系配置
6
- * key: 分组ID
7
- * value: 该分组默认包含的产品项ID数组
8
- */
9
- export declare const GROUP_ITEM_MAPPING: Record<string, string[]>;
10
- /**
11
- * 获取指定分组默认包含的产品项ID列表
12
- * @param groupId 分组ID
13
- * @returns 产品项ID数组
14
- */
15
- export declare function getItemsByGroupId(groupId: string): string[];
16
- /**
17
- * 获取指定分组默认包含的产品项对象列表
18
- * @param groupId 分组ID
19
- * @returns 产品项对象数组
20
- */
21
- export declare function getItemObjectsByGroupId(groupId: string): {
22
- itemId: string;
23
- categoryName: string;
24
- }[];
@@ -1,5 +0,0 @@
1
- /**
2
- * 映射关系统一导出
3
- */
4
- export * from './room-group-mapping';
5
- export * from './group-item-mapping';
@@ -1,31 +0,0 @@
1
- /**
2
- * 房间与分组的映射关系
3
- */
4
- /**
5
- * 房间与分组的映射关系配置
6
- * key: 房间ID
7
- * value: 该房间可用的分组ID数组
8
- */
9
- export declare const ROOM_GROUP_MAPPING: Record<string, string[]>;
10
- /**
11
- * 获取指定房间可用的分组ID列表
12
- * @param roomId 房间ID
13
- * @returns 分组ID数组
14
- */
15
- export declare function getGroupsByRoomId(roomId: string): string[];
16
- /**
17
- * 获取指定房间可用的分组对象列表
18
- * @param roomId 房间ID
19
- * @returns 分组对象数组
20
- */
21
- export declare function getGroupObjectsByRoomId(roomId: string): {
22
- groupId: string;
23
- groupName: string;
24
- }[];
25
- /**
26
- * 检查指定分组是否可用于指定房间
27
- * @param roomId 房间ID
28
- * @param groupId 分组ID
29
- * @returns 是否可用
30
- */
31
- export declare function isGroupAvailableForRoom(roomId: string, groupId: string): boolean;
@@ -1,18 +0,0 @@
1
- /**
2
- * 房间类型定义
3
- * 定义系统中所有可用的房间类型
4
- */
5
- import { RoomType } from './types/index';
6
- export declare const ROOM_TYPES: Record<string, RoomType>;
7
- /**
8
- * 获取排序后的房间类型数组
9
- * @returns 按order排序的房间类型数组
10
- */
11
- export declare function getSortedRoomTypes(): RoomType[];
12
- /**
13
- * 根据房间类型键获取房间信息
14
- * @param roomTypeKey 房间类型键
15
- * @returns 房间类型信息
16
- */
17
- export declare function getRoomTypeByKey(roomTypeKey: string): RoomType | null;
18
- export default ROOM_TYPES;