ftdsy-attr 2.1.1 → 2.1.3
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.
- package/dist/ftdsy-attr.cjs.js +17878 -1
- package/dist/ftdsy-attr.cjs.js.map +1 -1
- package/dist/ftdsy-attr.d.ts +15 -11
- package/dist/ftdsy-attr.esm.mjs +17858 -0
- package/dist/ftdsy-attr.esm.mjs.map +1 -0
- package/package.json +13 -9
- package/dist/ftdsy-attr.esm.js +0 -2
- package/dist/ftdsy-attr.esm.js.map +0 -1
- package/dist/index.html +0 -845
- package/dist/types/api/tb/index.d.ts +0 -3
- package/dist/types/category/bags/bags_leather.d.ts +0 -16
- package/dist/types/category/bags/bags_motion.d.ts +0 -16
- package/dist/types/category/clothing/clothing_accessory.d.ts +0 -16
- package/dist/types/category/clothing/clothing_children.d.ts +0 -16
- package/dist/types/category/clothing/clothing_jewelry.d.ts +0 -16
- package/dist/types/category/clothing/clothing_men.d.ts +0 -16
- package/dist/types/category/clothing/clothing_motion.d.ts +0 -16
- package/dist/types/category/clothing/clothing_underwear.d.ts +0 -16
- package/dist/types/category/clothing/clothing_women.d.ts +0 -16
- package/dist/types/category/departmentStore/departmentStore_bedding.d.ts +0 -16
- package/dist/types/category/departmentStore/departmentStore_commodity.d.ts +0 -17
- package/dist/types/category/departmentStore/departmentStore_flower.d.ts +0 -16
- package/dist/types/category/departmentStore/departmentStore_holidaysupplies.d.ts +0 -17
- package/dist/types/category/departmentStore/departmentStore_homefabric.d.ts +0 -16
- package/dist/types/category/departmentStore/departmentStore_petanimal.d.ts +0 -16
- package/dist/types/category/departmentStore/departmentStore_storage.d.ts +0 -16
- package/dist/types/category/departmentStore/departmentStore_tableware.d.ts +0 -17
- package/dist/types/category/index.d.ts +0 -7
- package/dist/types/category/motherBaby/motherBaby_bady.d.ts +0 -16
- package/dist/types/category/motherBaby/motherBaby_gravida.d.ts +0 -16
- package/dist/types/category/numeral/numeral_accessory.d.ts +0 -16
- package/dist/types/category/numeral/numeral_camera.d.ts +0 -16
- package/dist/types/category/numeral/numeral_computer.d.ts +0 -16
- package/dist/types/category/numeral/numeral_game.d.ts +0 -17
- package/dist/types/category/numeral/numeral_smart.d.ts +0 -17
- package/dist/types/category/shoes/shoes_children.d.ts +0 -16
- package/dist/types/category/shoes/shoes_men.d.ts +0 -16
- package/dist/types/category/shoes/shoes_motion.d.ts +0 -16
- package/dist/types/category/shoes/shoes_women.d.ts +0 -16
- package/dist/types/category/sportsOutdoor/sportsOutdoor_outdoors.d.ts +0 -16
- package/dist/types/category/sportsOutdoor/sportsOutdoor_sports.d.ts +0 -16
- package/dist/types/category/type.d.ts +0 -18
- package/dist/types/category/vehicle/vehicle_cycling.d.ts +0 -16
- package/dist/types/category/vehicle/vehicle_electricvehicle.d.ts +0 -16
- package/dist/types/category/vehicle/vehicle_motorcycle.d.ts +0 -16
- package/dist/types/main.d.ts +0 -42
- package/dist/types/models/defaultModel.d.ts +0 -16
- package/dist/types/models/index.d.ts +0 -4
- package/dist/types/models/modal.d.ts +0 -11
- package/dist/types/platform/albb.d.ts +0 -6
- package/dist/types/platform/albb.type.d.ts +0 -27
- package/dist/types/platform/dy.d.ts +0 -3
- package/dist/types/platform/dy.type.d.ts +0 -48
- package/dist/types/platform/jd.d.ts +0 -3
- package/dist/types/platform/jd.type.d.ts +0 -30
- package/dist/types/platform/ks.d.ts +0 -3
- package/dist/types/platform/ks.type.d.ts +0 -41
- package/dist/types/platform/pdd.d.ts +0 -6
- package/dist/types/platform/pdd.type.d.ts +0 -28
- package/dist/types/platform/shopee.d.ts +0 -6
- package/dist/types/platform/shopee.type.d.ts +0 -28
- package/dist/types/platform/tb.d.ts +0 -7
- package/dist/types/platform/tb.type.d.ts +0 -63
- package/dist/types/platform/tiktok.d.ts +0 -6
- package/dist/types/platform/tiktok.type.d.ts +0 -1
- package/dist/types/platform/tm.d.ts +0 -5
- package/dist/types/platform/tm.type.d.ts +0 -1
- package/dist/types/platform/wxsph.d.ts +0 -6
- package/dist/types/platform/wxsph.type.d.ts +0 -9
- package/dist/types/platform/xhs.d.ts +0 -6
- package/dist/types/platform/xhs.type.d.ts +0 -16
- package/dist/types/property/index.d.ts +0 -10
- package/dist/types/property/matchProperty.d.ts +0 -6
- package/dist/types/property/perpareProperty.d.ts +0 -9
- package/dist/types/property/predictionProperty.d.ts +0 -8
- package/dist/types/property/type.d.ts +0 -69
- package/dist/types/type.d.ts +0 -67
- package/dist/types/utils/axios.d.ts +0 -15
- package/dist/types/utils/error.d.ts +0 -12
- package/dist/types/utils/is/index.d.ts +0 -23
- package/dist/types/utils/utils.d.ts +0 -34
package/dist/ftdsy-attr.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
type Pt = 'pdd' | 'tb' | 'jd' | 'dy' | 'shopee' | 'xhs' | 'ks' | 'dsy' | 'albb' | 'shopeebt' | 'tgc' | 'wxsph' | 'tiktok' | 'tm' | 'tiktokUs';
|
|
2
2
|
type PropertyType = 'unknown' | 'input' | 'singleSelect' | 'multiSelect' | 'treeSingleSelect' | 'inputComponent' | 'multiComplex' | 'date' | 'image';
|
|
3
3
|
type RuleName = 'requiredRule' | 'maxLengthRule' | 'valueTypeRule' | 'maxItemsRule' | 'format' | 'regexRule';
|
|
4
|
-
type ComponentType = 'input' | 'unit' | 'select';
|
|
4
|
+
type ComponentType = 'input' | 'unit' | 'select' | 'operator' | 'label';
|
|
5
5
|
type goodsAttr = {
|
|
6
6
|
id?: string;
|
|
7
7
|
attr_name: string;
|
|
8
8
|
value: string | string[];
|
|
9
9
|
value_id?: string | string[];
|
|
10
10
|
};
|
|
11
|
-
type
|
|
11
|
+
type PropertyOption = {
|
|
12
12
|
label: string;
|
|
13
13
|
value: string;
|
|
14
14
|
parent_value?: string[];
|
|
15
15
|
value_path?: string;
|
|
16
16
|
value_ids_path?: string[];
|
|
17
|
-
children?:
|
|
17
|
+
children?: PropertyOption[];
|
|
18
18
|
};
|
|
19
19
|
type PropertyComponent = {
|
|
20
20
|
type: string;
|
|
21
21
|
name?: string;
|
|
22
22
|
placeholder?: string;
|
|
23
|
-
options:
|
|
23
|
+
options: PropertyOption[];
|
|
24
24
|
text?: string;
|
|
25
25
|
precision?: number;
|
|
26
26
|
};
|
|
@@ -29,12 +29,16 @@ type Rule = {
|
|
|
29
29
|
value: string;
|
|
30
30
|
exProperty?: string;
|
|
31
31
|
};
|
|
32
|
+
type Condition = {
|
|
33
|
+
parent_id: string;
|
|
34
|
+
parent_value_ids: string[];
|
|
35
|
+
};
|
|
32
36
|
type DsyAttr = {
|
|
33
37
|
property_id: string;
|
|
34
38
|
property_required: boolean;
|
|
35
39
|
property_name: string;
|
|
36
40
|
property_type: PropertyType;
|
|
37
|
-
property_values:
|
|
41
|
+
property_values: PropertyOption[];
|
|
38
42
|
property_component?: PropertyComponent[];
|
|
39
43
|
property_tips?: string;
|
|
40
44
|
rules: Rule[];
|
|
@@ -44,10 +48,6 @@ type DsyAttr = {
|
|
|
44
48
|
measure_templates?: any;
|
|
45
49
|
isCStore?: boolean;
|
|
46
50
|
};
|
|
47
|
-
type Condition = {
|
|
48
|
-
parent_id: string;
|
|
49
|
-
parent_value_ids: string[];
|
|
50
|
-
};
|
|
51
51
|
type DsyAttrValue = {
|
|
52
52
|
valueId: string | string[];
|
|
53
53
|
value: string | string[];
|
|
@@ -67,8 +67,8 @@ type MatchDatas = {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
declare const _default: {
|
|
70
|
-
version: string;
|
|
71
70
|
createCategoryProperties: typeof createCategoryProperties;
|
|
71
|
+
getOriginProperty: typeof getOriginProperty;
|
|
72
72
|
matchCategoryProperties: typeof matchCategoryProperties;
|
|
73
73
|
createCategoryPropertyTemplate: typeof createCategoryPropertyTemplate;
|
|
74
74
|
};
|
|
@@ -77,6 +77,10 @@ declare const _default: {
|
|
|
77
77
|
* 转换自定义属性列表,
|
|
78
78
|
* */
|
|
79
79
|
declare function createCategoryProperties(platform: Pt, ptAttrs: any): DsyAttr[] | null;
|
|
80
|
+
/**
|
|
81
|
+
* 自定义属性类型装换回原来的类型
|
|
82
|
+
* */
|
|
83
|
+
declare function getOriginProperty(platform: Pt, type: string): string;
|
|
80
84
|
/**
|
|
81
85
|
* 匹配属性值
|
|
82
86
|
* @param matchDatas 匹配数据
|
|
@@ -108,4 +112,4 @@ declare function matchCategoryProperties(matchDatas: MatchDatas, matchLevel?: nu
|
|
|
108
112
|
declare function createCategoryPropertyTemplate(properties: (DsyAttrWithValue | goodsAttr)[]): goodsAttr[];
|
|
109
113
|
|
|
110
114
|
export { _default as default };
|
|
111
|
-
export type { ComponentType, Condition, DsyAttr, DsyAttrValue, DsyAttrWithValue, MatchDatas, PropertyComponent, PropertyType, Pt, Rule, RuleName, goodsAttr
|
|
115
|
+
export type { ComponentType, Condition, DsyAttr, DsyAttrValue, DsyAttrWithValue, MatchDatas, PropertyComponent, PropertyOption, PropertyType, Pt, Rule, RuleName, goodsAttr };
|