@pisell/materials 6.3.17 → 6.3.18
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +5 -5
- package/build/lowcode/preview.js +144 -144
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/es/components/auto-resize-text/auto-text-size-standalone.js +258 -0
- package/es/components/auto-resize-text/index.d.ts +6 -0
- package/es/components/auto-resize-text/index.js +40 -0
- package/es/components/cardPro/index.js +10 -3
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +16 -16
- package/es/components/iconfont/index.js +1 -1
- package/es/components/keyboard/index.d.ts +22 -0
- package/es/components/keyboard/index.js +159 -0
- package/es/components/keyboard/index.less +44 -0
- package/es/components/page/index.js +5 -2
- package/es/components/pisell-config-provider/context.d.ts +2 -0
- package/es/components/pisell-config-provider/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/index.js +5 -1
- package/es/components/pisellAdjustPrice/type.d.ts +2 -0
- package/es/components/pisellCardList/index.d.ts +32 -2
- package/es/components/pisellCardList/index.js +39 -2
- package/es/components/pisellCardList/index.less +9 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +3 -0
- package/es/components/pisellCheckboxGroup/index.js +9 -4
- package/es/components/pisellCheckboxGroup/index.less +28 -1
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellGoodPassCard/index.d.ts +1 -0
- package/es/components/pisellGoodPassCard/index.js +17 -5
- package/es/components/pisellText/components/Amount/index.js +2 -1
- package/es/components/pisellToast/index.d.ts +1 -0
- package/es/components/pisellToast/index.js +4 -0
- package/es/components/pisellToast/squareToast/index.d.ts +15 -0
- package/es/components/pisellToast/squareToast/index.js +28 -0
- package/es/components/pisellToast/squareToast/index.less +60 -0
- package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/es/components/pisellToast/squareToast/methods.js +136 -0
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
- package/es/components/pisellToast/squareToast/renderImperatively.js +190 -0
- package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/es/components/pisellToast/squareToast/toast.js +60 -0
- package/es/components/pisellWalletPassCard/index.d.ts +53 -1
- package/es/components/pisellWalletPassCard/index.js +333 -73
- package/es/components/pisellWalletPassCard/index.less +47 -9
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +82 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +56 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.js +29 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.less +27 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +28 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +94 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.js +49 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.less +47 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.js +39 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +19 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +57 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.js +44 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +34 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +360 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +74 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +54 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/index.js +194 -0
- package/es/components/productCard/cartSkuCard/index.less +33 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +99 -0
- package/es/components/productCard/cartSkuCard/locales.js +33 -0
- package/es/components/productCard/components/Action/index.js +14 -1
- package/es/components/productCard/components/Action/index.less +3 -0
- package/es/components/productCard/components/Header/index.js +23 -8
- package/es/components/productCard/components/Header/index.less +16 -1
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +3 -1
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
- package/es/components/productCard/index.d.ts +3 -1
- package/es/components/productCard/index.js +7 -2
- package/es/components/productCard/index.less +6 -0
- package/es/components/productCard/locales.js +3 -0
- package/es/components/productCard/status.js +1 -0
- package/es/components/productCard/types.d.ts +1 -0
- package/es/components/productCard/utils.js +8 -1
- package/es/components/select-time/index.d.ts +14 -0
- package/es/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/es/components/table/Table/AddFieldModal/index.js +13 -13
- package/es/components/table/Table/AddFieldModal/index.less +11 -11
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +21 -7
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +44 -25
- package/es/components/virtual-keyboard/Number/index.js +4 -1
- package/es/components/virtual-keyboard/Number/types.d.ts +1 -0
- package/es/components/virtual-keyboard/index.d.ts +11 -0
- package/es/components/virtual-keyboard/index.js +88 -3
- package/es/components/virtual-keyboard/index.less +33 -1
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/es/components/virtualInput/BaseVirtualInput/index.js +163 -0
- package/es/components/virtualInput/BaseVirtualInput/index.less +77 -0
- package/es/components/virtualInput/index.d.ts +24 -0
- package/es/components/virtualInput/index.js +60 -0
- package/es/components/virtualInput/index.less +42 -0
- package/es/index.d.ts +5 -1
- package/es/index.js +5 -2
- package/es/locales/en-US.d.ts +19 -2
- package/es/locales/en-US.js +29 -6
- package/es/locales/zh-CN.d.ts +19 -2
- package/es/locales/zh-CN.js +29 -6
- package/es/locales/zh-TW.d.ts +19 -2
- package/es/locales/zh-TW.js +28 -6
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/lib/components/auto-resize-text/auto-text-size-standalone.js +273 -0
- package/lib/components/auto-resize-text/index.d.ts +6 -0
- package/lib/components/auto-resize-text/index.js +71 -0
- package/lib/components/cardPro/index.js +3 -2
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +16 -16
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/keyboard/index.d.ts +22 -0
- package/lib/components/keyboard/index.js +223 -0
- package/lib/components/keyboard/index.less +44 -0
- package/lib/components/page/index.js +3 -2
- package/lib/components/pisell-config-provider/context.d.ts +2 -0
- package/lib/components/pisell-config-provider/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/index.js +4 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +2 -0
- package/lib/components/pisellCardList/index.d.ts +32 -2
- package/lib/components/pisellCardList/index.js +39 -2
- package/lib/components/pisellCardList/index.less +9 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +3 -0
- package/lib/components/pisellCheckboxGroup/index.js +6 -1
- package/lib/components/pisellCheckboxGroup/index.less +28 -1
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +1 -0
- package/lib/components/pisellGoodPassCard/index.js +31 -4
- package/lib/components/pisellText/components/Amount/index.js +2 -1
- package/lib/components/pisellToast/index.d.ts +1 -0
- package/lib/components/pisellToast/index.js +10 -1
- package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
- package/lib/components/pisellToast/squareToast/index.js +58 -0
- package/lib/components/pisellToast/squareToast/index.less +60 -0
- package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/lib/components/pisellToast/squareToast/methods.js +150 -0
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
- package/lib/components/pisellToast/squareToast/renderImperatively.js +162 -0
- package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/lib/components/pisellToast/squareToast/toast.js +88 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +53 -1
- package/lib/components/pisellWalletPassCard/index.js +257 -59
- package/lib/components/pisellWalletPassCard/index.less +47 -9
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +77 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.js +56 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.less +27 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +28 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +83 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +64 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +47 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +19 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +77 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +66 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +34 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +373 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +74 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +68 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/index.js +229 -0
- package/lib/components/productCard/cartSkuCard/index.less +33 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +99 -0
- package/lib/components/productCard/cartSkuCard/locales.js +64 -0
- package/lib/components/productCard/components/Action/index.js +9 -0
- package/lib/components/productCard/components/Action/index.less +3 -0
- package/lib/components/productCard/components/Header/index.js +21 -11
- package/lib/components/productCard/components/Header/index.less +16 -1
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
- package/lib/components/productCard/index.d.ts +3 -1
- package/lib/components/productCard/index.js +7 -2
- package/lib/components/productCard/index.less +6 -0
- package/lib/components/productCard/locales.js +12 -3
- package/lib/components/productCard/status.js +1 -0
- package/lib/components/productCard/types.d.ts +1 -0
- package/lib/components/productCard/utils.js +8 -1
- package/lib/components/select-time/index.d.ts +14 -0
- package/lib/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/lib/components/table/Table/AddFieldModal/index.js +9 -9
- package/lib/components/table/Table/AddFieldModal/index.less +11 -11
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +19 -2
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +45 -27
- package/lib/components/virtual-keyboard/Number/index.js +3 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +1 -0
- package/lib/components/virtual-keyboard/index.d.ts +11 -0
- package/lib/components/virtual-keyboard/index.js +60 -2
- package/lib/components/virtual-keyboard/index.less +33 -1
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.js +179 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.less +77 -0
- package/lib/components/virtualInput/index.d.ts +24 -0
- package/lib/components/virtualInput/index.js +102 -0
- package/lib/components/virtualInput/index.less +42 -0
- package/lib/index.d.ts +5 -1
- package/lib/index.js +11 -0
- package/lib/locales/en-US.d.ts +19 -2
- package/lib/locales/en-US.js +24 -5
- package/lib/locales/zh-CN.d.ts +19 -2
- package/lib/locales/zh-CN.js +24 -5
- package/lib/locales/zh-TW.d.ts +19 -2
- package/lib/locales/zh-TW.js +23 -5
- package/package.json +4 -4
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
.pisell-cart-sku-card {
|
|
2
|
+
&__basic-info {
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
position: relative;
|
|
6
|
+
min-height: 48px;
|
|
7
|
+
|
|
8
|
+
.num-tag {
|
|
9
|
+
background-color: #7f56da;
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: 0;
|
|
12
|
+
top: 0;
|
|
13
|
+
border-radius: 12px;
|
|
14
|
+
min-width: 24px;
|
|
15
|
+
height: 24px;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
|
|
21
|
+
color: var(--Base-White, #fff);
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
line-height: 16px;
|
|
26
|
+
|
|
27
|
+
&.is-main {
|
|
28
|
+
left: -4px;
|
|
29
|
+
top: -4px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
img {
|
|
34
|
+
width: 48px;
|
|
35
|
+
height: 48px;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
border-radius: 6px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.product-cover-text {
|
|
41
|
+
width: 48px;
|
|
42
|
+
height: 48px;
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
background-color: #DEDEDE;
|
|
46
|
+
color: #7E7E7E;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
font-size: 20px;
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
line-height: 1;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.product-info {
|
|
59
|
+
flex: 1;
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
flex: 1 0 0;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
|
|
66
|
+
.product-name {
|
|
67
|
+
color: var(--Gray-900, #101828);
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
font-style: normal;
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
line-height: 20px;
|
|
72
|
+
width: 100%;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
text-overflow: ellipsis;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
padding-right: 20px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.product-price {
|
|
80
|
+
color: var(--Gray-900, #101828);
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
font-style: normal;
|
|
83
|
+
font-weight: 500;
|
|
84
|
+
line-height: 20px;
|
|
85
|
+
width: 100%;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.product-amount {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 4px;
|
|
93
|
+
flex-wrap: wrap;
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
.total-amont {
|
|
96
|
+
color: var(--Base-Black, #000);
|
|
97
|
+
text-align: center;
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
font-style: normal;
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
line-height: 20px;
|
|
102
|
+
width: 100%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.origin-amount {
|
|
106
|
+
color: var(--Gray-500, #667085);
|
|
107
|
+
text-align: center;
|
|
108
|
+
font-size: 12px;
|
|
109
|
+
font-style: normal;
|
|
110
|
+
font-weight: 400;
|
|
111
|
+
line-height: 18px;
|
|
112
|
+
text-decoration-line: line-through;
|
|
113
|
+
width: 100%;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Divider, Tag } from 'antd';
|
|
3
|
+
import { locales } from '@pisell/utils';
|
|
4
|
+
import { PREFIX } from "../../index";
|
|
5
|
+
var DiscountReason = function DiscountReason(props) {
|
|
6
|
+
var _props$dataSource = props.dataSource,
|
|
7
|
+
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource,
|
|
8
|
+
hideDivider = props.hideDivider;
|
|
9
|
+
var total = dataSource.total,
|
|
10
|
+
origin_total = dataSource.origin_total,
|
|
11
|
+
symbol = dataSource.symbol,
|
|
12
|
+
tip = dataSource.tip,
|
|
13
|
+
num = dataSource.num,
|
|
14
|
+
discount_reason = dataSource.discount_reason;
|
|
15
|
+
var isDiscount = useMemo(function () {
|
|
16
|
+
// item中没有该属性则不展示
|
|
17
|
+
if (!origin_total) return false;
|
|
18
|
+
return Number(total) != Number(origin_total);
|
|
19
|
+
}, [total, origin_total]);
|
|
20
|
+
var renderDivider = function renderDivider() {
|
|
21
|
+
return isDiscount && discount_reason && !hideDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
22
|
+
style: {
|
|
23
|
+
margin: 0
|
|
24
|
+
}
|
|
25
|
+
}) : null;
|
|
26
|
+
};
|
|
27
|
+
var renderDiscountReason = function renderDiscountReason() {
|
|
28
|
+
if (isDiscount && discount_reason) {
|
|
29
|
+
if (Array.isArray(discount_reason)) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "".concat(PREFIX, "_discount-reason"),
|
|
32
|
+
style: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
flexWrap: 'wrap',
|
|
35
|
+
gap: '4px'
|
|
36
|
+
}
|
|
37
|
+
}, discount_reason.map(function (reason, index) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
39
|
+
key: index,
|
|
40
|
+
color: "red"
|
|
41
|
+
}, reason);
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "".concat(PREFIX, "_discount-reason")
|
|
46
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason)));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderDivider(), renderDiscountReason());
|
|
50
|
+
};
|
|
51
|
+
export default DiscountReason;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Iconfont from "../../../../iconfont";
|
|
3
|
+
import { PREFIX } from "../../index";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
import { locales } from '@pisell/utils';
|
|
6
|
+
var holderIconMap = {
|
|
7
|
+
'form': 'pisell2-file-05',
|
|
8
|
+
'minors': 'pisell2-user-check-01',
|
|
9
|
+
'waiver': 'pisell2-file-lock-03'
|
|
10
|
+
};
|
|
11
|
+
var Holders = function Holders(props) {
|
|
12
|
+
var _props$dataSource = props.dataSource,
|
|
13
|
+
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource;
|
|
14
|
+
var holders = dataSource.holders,
|
|
15
|
+
holder_id = dataSource.holder_id;
|
|
16
|
+
if (!holder_id || (holder_id === null || holder_id === void 0 ? void 0 : holder_id.length) === 0) {
|
|
17
|
+
// 如果是Booking Holder为表单的,未选择则显示Unassigned
|
|
18
|
+
if (dataSource.isFormSubject) {
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "holder-item unassigned"
|
|
21
|
+
}, dataSource.holderMaxCount > 1 ? /*#__PURE__*/React.createElement("span", null, dataSource.holderMaxCount, "/", dataSource.holderMaxCount, " ") : null, /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
className: "holder-label"
|
|
23
|
+
}, locales.getText('pisell2.cart.sku-card.unassigned')));
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
;
|
|
28
|
+
var renderHolder = function renderHolder(id) {
|
|
29
|
+
if (!id) return null;
|
|
30
|
+
var holder = holders.find(function (item) {
|
|
31
|
+
return item.id === id;
|
|
32
|
+
});
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "holder-item",
|
|
35
|
+
key: id
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
37
|
+
className: "holder-icon",
|
|
38
|
+
type: holderIconMap[(dataSource === null || dataSource === void 0 ? void 0 : dataSource.holderType) || 'minors']
|
|
39
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
className: "holder-label"
|
|
41
|
+
}, (holder === null || holder === void 0 ? void 0 : holder.label) || id));
|
|
42
|
+
};
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "".concat(PREFIX, "__holders")
|
|
45
|
+
}, Array.isArray(holder_id) ? holder_id === null || holder_id === void 0 ? void 0 : holder_id.map(function (id) {
|
|
46
|
+
return renderHolder(id);
|
|
47
|
+
}) : renderHolder(holder_id));
|
|
48
|
+
};
|
|
49
|
+
export default Holders;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.pisell-cart-sku-card__holders {
|
|
2
|
+
user-select: none;
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
|
|
8
|
+
.holder-item {
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
min-width: 30px;
|
|
14
|
+
|
|
15
|
+
.holder-icon {
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
color: #7f56da;
|
|
18
|
+
margin-right: 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.holder-label {
|
|
22
|
+
color: #667085;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
line-height: 20px;
|
|
26
|
+
display: inline-block;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.unassigned {
|
|
33
|
+
color: red;
|
|
34
|
+
.holder-label {
|
|
35
|
+
color: red;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.holder-item {
|
|
41
|
+
&.unassigned {
|
|
42
|
+
color: red;
|
|
43
|
+
.holder-label {
|
|
44
|
+
color: red;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Divider } from 'antd';
|
|
9
|
+
import { locales } from '@pisell/utils';
|
|
10
|
+
import CollapsibleList from "../../../components/Packages/components/collapsibleList";
|
|
11
|
+
import BasicInfo from "../basicInfo";
|
|
12
|
+
import { PREFIX } from "../../index";
|
|
13
|
+
import "./index.less";
|
|
14
|
+
var Packages = function Packages(_ref) {
|
|
15
|
+
var isShowImage = _ref.isShowImage,
|
|
16
|
+
_ref$dataSource = _ref.dataSource,
|
|
17
|
+
dataSource = _ref$dataSource === void 0 ? {} : _ref$dataSource;
|
|
18
|
+
var _dataSource$bundle = dataSource.bundle,
|
|
19
|
+
bundle = _dataSource$bundle === void 0 ? [] : _dataSource$bundle,
|
|
20
|
+
_dataSource$symbol = dataSource.symbol,
|
|
21
|
+
symbol = _dataSource$symbol === void 0 ? '$' : _dataSource$symbol;
|
|
22
|
+
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
23
|
+
style: {
|
|
24
|
+
margin: 0
|
|
25
|
+
}
|
|
26
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "".concat(PREFIX, "__packages-wrap")
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "packages-title"
|
|
30
|
+
}, locales.getText('pisell2.cart.sku-card.packages.title')), /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
31
|
+
style: {
|
|
32
|
+
marginTop: 4
|
|
33
|
+
},
|
|
34
|
+
list: bundle || [],
|
|
35
|
+
renderItem: function renderItem(item) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(BasicInfo, {
|
|
37
|
+
isShowImage: isShowImage,
|
|
38
|
+
dataSource: _objectSpread(_objectSpread({}, item), {}, {
|
|
39
|
+
name: item.title,
|
|
40
|
+
image: item.cover,
|
|
41
|
+
symbol: symbol
|
|
42
|
+
}),
|
|
43
|
+
style: {
|
|
44
|
+
border: '1px solid #D0D5DD',
|
|
45
|
+
borderRadius: 4,
|
|
46
|
+
padding: 4
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}))) : null;
|
|
51
|
+
};
|
|
52
|
+
export default Packages;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.pisell-cart-sku-card__packages-wrap {
|
|
2
|
+
padding: 0 4px;
|
|
3
|
+
|
|
4
|
+
.packages-title {
|
|
5
|
+
color: #101828;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
line-height: 18px;
|
|
9
|
+
word-wrap: break-word;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pisell2-collapsible-list {
|
|
13
|
+
gap: 4px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.product-info {
|
|
17
|
+
.product-name,
|
|
18
|
+
.product-price {
|
|
19
|
+
color: #667085;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 金额是否是负
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {string} type
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2024-11-22 10:01
|
|
8
|
+
*/
|
|
9
|
+
export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
10
|
+
/**
|
|
11
|
+
* @title: 金额格式化
|
|
12
|
+
* @description:
|
|
13
|
+
* @param {number} price
|
|
14
|
+
* @param {string} amountSymbol
|
|
15
|
+
* @param {number} digit
|
|
16
|
+
* @return {*}
|
|
17
|
+
* @Author: WangHan
|
|
18
|
+
* @Date: 2024-11-22 10:58
|
|
19
|
+
*/
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { formatAmount } from '@pisell/utils';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @title: 金额是否是负
|
|
5
|
+
* @description:
|
|
6
|
+
* @param {string} type
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Author: WangHan
|
|
9
|
+
* @Date: 2024-11-22 10:01
|
|
10
|
+
*/
|
|
11
|
+
export var minusSign = function minusSign(item, type) {
|
|
12
|
+
// 单个商品 + 单规格价格之后的价格
|
|
13
|
+
if (type === 'total') {
|
|
14
|
+
var _price2 = (item === null || item === void 0 ? void 0 : item.bundle_sum_price) || 0;
|
|
15
|
+
var _isMarkdown = (item === null || item === void 0 ? void 0 : item.bundle_sum_type) === 'markdown';
|
|
16
|
+
return _price2 > 0 && _isMarkdown ? '-' : '';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 单个商品的价格
|
|
20
|
+
var _price = (item === null || item === void 0 ? void 0 : item.price) || 0;
|
|
21
|
+
var isMarkdown = (item === null || item === void 0 ? void 0 : item.price_type) === 'markdown';
|
|
22
|
+
return _price > 0 && isMarkdown ? '-' : '';
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @title: 金额格式化
|
|
27
|
+
* @description:
|
|
28
|
+
* @param {number} price
|
|
29
|
+
* @param {string} amountSymbol
|
|
30
|
+
* @param {number} digit
|
|
31
|
+
* @return {*}
|
|
32
|
+
* @Author: WangHan
|
|
33
|
+
* @Date: 2024-11-22 10:58
|
|
34
|
+
*/
|
|
35
|
+
export var _formatAmount = function _formatAmount() {
|
|
36
|
+
var price = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
37
|
+
var amountSymbol = arguments.length > 1 ? arguments[1] : undefined;
|
|
38
|
+
var digit = arguments.length > 2 ? arguments[2] : undefined;
|
|
39
|
+
return formatAmount(price, digit, amountSymbol);
|
|
40
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tag } from 'antd';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import { PREFIX } from "../../index";
|
|
5
|
+
var colors = ['magenta', 'volcano', 'orange', 'gold', 'green', 'cyan', 'blue', 'geekblue', 'purple'];
|
|
6
|
+
function getColor(n) {
|
|
7
|
+
// 用质数扰动 + 取余
|
|
8
|
+
return colors[n * 31 % colors.length];
|
|
9
|
+
}
|
|
10
|
+
var Resources = function Resources(props) {
|
|
11
|
+
var _props$dataSource = props.dataSource,
|
|
12
|
+
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource;
|
|
13
|
+
var multiResources = dataSource.multiResources,
|
|
14
|
+
isMultipleResource = dataSource.isMultipleResource;
|
|
15
|
+
var renderResourceItem = function renderResourceItem(item, index) {
|
|
16
|
+
var ids = item.id,
|
|
17
|
+
lists = item.lists,
|
|
18
|
+
_id = item._id;
|
|
19
|
+
return Array.isArray(ids) ? ids.map(function (id) {
|
|
20
|
+
var targetRes = lists.find(function (l) {
|
|
21
|
+
return l.id === id;
|
|
22
|
+
});
|
|
23
|
+
if (targetRes !== null && targetRes !== void 0 && targetRes.label) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
25
|
+
color: getColor(_id),
|
|
26
|
+
className: "resource-tag"
|
|
27
|
+
}, targetRes.label);
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}) : null;
|
|
31
|
+
};
|
|
32
|
+
if (isMultipleResource && (multiResources === null || multiResources === void 0 ? void 0 : multiResources.length) > 0) {
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "".concat(PREFIX, "__resources")
|
|
35
|
+
}, multiResources.map(renderResourceItem));
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
export default Resources;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.pisell-cart-sku-card__resources {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
|
|
6
|
+
.resource-item {
|
|
7
|
+
min-width: calc(50% - 2px);
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
gap: 4px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.resource-tag {
|
|
14
|
+
max-width: 120px;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
interface IProps {
|
|
3
|
+
hideDivider?: boolean;
|
|
4
|
+
dataSource: {
|
|
5
|
+
symbol?: string;
|
|
6
|
+
relation_products?: any[];
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
};
|
|
9
|
+
isShowImage?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Sales: ({ hideDivider, dataSource, isShowImage }: IProps) => JSX.Element | null;
|
|
12
|
+
export default Sales;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { Divider } from 'antd';
|
|
9
|
+
import CollapsibleList from "../../../components/Packages/components/collapsibleList";
|
|
10
|
+
import BasicInfo from "../basicInfo";
|
|
11
|
+
import { locales } from '@pisell/utils';
|
|
12
|
+
import { PREFIX } from "../../index";
|
|
13
|
+
import "./index.less";
|
|
14
|
+
var Sales = function Sales(_ref) {
|
|
15
|
+
var hideDivider = _ref.hideDivider,
|
|
16
|
+
dataSource = _ref.dataSource,
|
|
17
|
+
isShowImage = _ref.isShowImage;
|
|
18
|
+
var _ref2 = dataSource || {},
|
|
19
|
+
_ref2$relation_produc = _ref2.relation_products,
|
|
20
|
+
relation_products = _ref2$relation_produc === void 0 ? [] : _ref2$relation_produc,
|
|
21
|
+
_ref2$symbol = _ref2.symbol,
|
|
22
|
+
symbol = _ref2$symbol === void 0 ? '$' : _ref2$symbol;
|
|
23
|
+
|
|
24
|
+
// 格式化商品数据
|
|
25
|
+
var other_products = relation_products.map(function (p) {
|
|
26
|
+
return _objectSpread(_objectSpread({}, p), {}, {
|
|
27
|
+
name: p === null || p === void 0 ? void 0 : p.product_title,
|
|
28
|
+
price: p === null || p === void 0 ? void 0 : p.payment_price,
|
|
29
|
+
symbol: symbol,
|
|
30
|
+
num: p === null || p === void 0 ? void 0 : p.product_quantity,
|
|
31
|
+
total: p === null || p === void 0 ? void 0 : p.payment_price
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
return (other_products === null || other_products === void 0 ? void 0 : other_products.length) > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, hideDivider ? null : /*#__PURE__*/React.createElement(Divider, {
|
|
35
|
+
style: {
|
|
36
|
+
margin: 0
|
|
37
|
+
}
|
|
38
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "".concat(PREFIX, "_sales-wrap")
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: "sales-title"
|
|
42
|
+
}, locales.getText('pisell2.cart.sku-card.sales.title')), /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
43
|
+
list: other_products || [],
|
|
44
|
+
renderItem: function renderItem(item) {
|
|
45
|
+
return /*#__PURE__*/React.createElement(BasicInfo, {
|
|
46
|
+
isShowImage: isShowImage,
|
|
47
|
+
style: {
|
|
48
|
+
border: '1px solid #D0D5DD',
|
|
49
|
+
borderRadius: 4,
|
|
50
|
+
padding: 4
|
|
51
|
+
},
|
|
52
|
+
dataSource: _objectSpread({}, item)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}))) : null;
|
|
56
|
+
};
|
|
57
|
+
export default Sales;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.pisell-cart-sku-_sales-wrap {
|
|
2
|
+
padding: 0 4px;
|
|
3
|
+
|
|
4
|
+
._sales-title {
|
|
5
|
+
color: #101828;
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
line-height: 18px;
|
|
9
|
+
word-wrap: break-word;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pisell2-collapsible-list {
|
|
13
|
+
gap: 4px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.product-info {
|
|
17
|
+
.product-name,
|
|
18
|
+
.product-price {
|
|
19
|
+
color: #667085;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { locales } from '@pisell/utils';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import { PREFIX } from "../../index";
|
|
5
|
+
var Specs = function Specs(props) {
|
|
6
|
+
var _props$dataSource = props.dataSource,
|
|
7
|
+
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource;
|
|
8
|
+
var bundle = dataSource.bundle,
|
|
9
|
+
options = dataSource.options,
|
|
10
|
+
product_option_string = dataSource.product_option_string,
|
|
11
|
+
symbol = dataSource.symbol;
|
|
12
|
+
var more = /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
style: {
|
|
14
|
+
color: '#667085',
|
|
15
|
+
fontSize: 10,
|
|
16
|
+
lineHeight: '10px'
|
|
17
|
+
}
|
|
18
|
+
}, locales.getText('pisell2.cart.sku-card.more'));
|
|
19
|
+
if (Array.isArray(bundle) && (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0) {
|
|
20
|
+
var first = bundle[0];
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "".concat(PREFIX, "__specs")
|
|
23
|
+
}, /*#__PURE__*/React.createElement("div", null, first.title), bundle.length > 1 ? more : null);
|
|
24
|
+
}
|
|
25
|
+
if (product_option_string) {
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "".concat(PREFIX, "__specs")
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", null, product_option_string), options.length > 1 ? more : null);
|
|
29
|
+
}
|
|
30
|
+
if (options.length > 0) {
|
|
31
|
+
var _first = options[0];
|
|
32
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: "".concat(PREFIX, "__specs")
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "spec-item"
|
|
36
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
37
|
+
className: "spec-name"
|
|
38
|
+
}, _first.name), /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
className: "spec-num"
|
|
40
|
+
}, /*#__PURE__*/React.createElement("span", null, symbol, _first.price), /*#__PURE__*/React.createElement("span", null), "x", /*#__PURE__*/React.createElement("span", null, _first.num))), options.length > 1 ? more : null);
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
export default Specs;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.pisell-cart-sku-card__specs {
|
|
2
|
+
user-select: none;
|
|
3
|
+
|
|
4
|
+
color: #667085;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
line-height: 20px;
|
|
8
|
+
word-wrap: break-word;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
|
|
11
|
+
> div {
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
text-overflow: ellipsis;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.spec-item {
|
|
18
|
+
display: flex;
|
|
19
|
+
|
|
20
|
+
.spec-name {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
margin-right: 8px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.spec-num {
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: 4px;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|