@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,70 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/cartSkuCard/components/discountReason/index.tsx
|
|
30
|
+
var discountReason_exports = {};
|
|
31
|
+
__export(discountReason_exports, {
|
|
32
|
+
default: () => discountReason_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(discountReason_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import__ = require("../../index");
|
|
39
|
+
var DiscountReason = (props) => {
|
|
40
|
+
const { dataSource = {}, hideDivider } = props;
|
|
41
|
+
const { total, origin_total, symbol, tip, num, discount_reason } = dataSource;
|
|
42
|
+
const isDiscount = (0, import_react.useMemo)(() => {
|
|
43
|
+
if (!origin_total) return false;
|
|
44
|
+
return Number(total) != Number(origin_total);
|
|
45
|
+
}, [total, origin_total]);
|
|
46
|
+
const renderDivider = () => {
|
|
47
|
+
return isDiscount && discount_reason && !hideDivider ? /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }) : null;
|
|
48
|
+
};
|
|
49
|
+
const renderDiscountReason = () => {
|
|
50
|
+
if (isDiscount && discount_reason) {
|
|
51
|
+
if (Array.isArray(discount_reason)) {
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: `${import__.PREFIX}_discount-reason`,
|
|
56
|
+
style: { display: "flex", flexWrap: "wrap", gap: "4px" }
|
|
57
|
+
},
|
|
58
|
+
discount_reason.map((reason, index) => {
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { key: index, color: "red" }, reason);
|
|
60
|
+
})
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}_discount-reason` }, /* @__PURE__ */ import_react.default.createElement("span", null, `${import_utils.locales.getText(
|
|
64
|
+
"pisell2.product.card.discount.reason"
|
|
65
|
+
)}: ${discount_reason}`));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderDivider(), renderDiscountReason());
|
|
69
|
+
};
|
|
70
|
+
var discountReason_default = DiscountReason;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/cartSkuCard/components/holders/index.tsx
|
|
30
|
+
var holders_exports = {};
|
|
31
|
+
__export(holders_exports, {
|
|
32
|
+
default: () => holders_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(holders_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_iconfont = __toESM(require("../../../../iconfont"));
|
|
37
|
+
var import__ = require("../../index");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var holderIconMap = {
|
|
41
|
+
"form": "pisell2-file-05",
|
|
42
|
+
"minors": "pisell2-user-check-01",
|
|
43
|
+
"waiver": "pisell2-file-lock-03"
|
|
44
|
+
};
|
|
45
|
+
var Holders = (props) => {
|
|
46
|
+
const { dataSource = {} } = props;
|
|
47
|
+
const { holders, holder_id } = dataSource;
|
|
48
|
+
if (!holder_id || (holder_id == null ? void 0 : holder_id.length) === 0) {
|
|
49
|
+
if (dataSource.isFormSubject) {
|
|
50
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "holder-item unassigned" }, dataSource.holderMaxCount > 1 ? /* @__PURE__ */ import_react.default.createElement("span", null, dataSource.holderMaxCount, "/", dataSource.holderMaxCount, " ") : null, /* @__PURE__ */ import_react.default.createElement("span", { className: "holder-label" }, import_utils.locales.getText("pisell2.cart.sku-card.unassigned")));
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
;
|
|
55
|
+
const renderHolder = (id) => {
|
|
56
|
+
if (!id) return null;
|
|
57
|
+
const holder = holders.find((item) => item.id === id);
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "holder-item", key: id }, /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { className: "holder-icon", type: holderIconMap[(dataSource == null ? void 0 : dataSource.holderType) || "minors"] }), /* @__PURE__ */ import_react.default.createElement("span", { className: "holder-label" }, (holder == null ? void 0 : holder.label) || id));
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__holders` }, Array.isArray(holder_id) ? holder_id == null ? void 0 : holder_id.map((id) => {
|
|
61
|
+
return renderHolder(id);
|
|
62
|
+
}) : renderHolder(holder_id));
|
|
63
|
+
};
|
|
64
|
+
var holders_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,73 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/cartSkuCard/components/packages/index.tsx
|
|
30
|
+
var packages_exports = {};
|
|
31
|
+
__export(packages_exports, {
|
|
32
|
+
default: () => packages_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(packages_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_collapsibleList = __toESM(require("../../../components/Packages/components/collapsibleList"));
|
|
39
|
+
var import_basicInfo = __toESM(require("../basicInfo"));
|
|
40
|
+
var import__ = require("../../index");
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var Packages = ({ isShowImage, dataSource = {} }) => {
|
|
43
|
+
const { bundle = [], symbol = "$" } = dataSource;
|
|
44
|
+
return (bundle == null ? void 0 : bundle.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__packages-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `packages-title` }, import_utils.locales.getText("pisell2.cart.sku-card.packages.title")), /* @__PURE__ */ import_react.default.createElement(
|
|
45
|
+
import_collapsibleList.default,
|
|
46
|
+
{
|
|
47
|
+
style: {
|
|
48
|
+
marginTop: 4
|
|
49
|
+
},
|
|
50
|
+
list: bundle || [],
|
|
51
|
+
renderItem: (item) => {
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
53
|
+
import_basicInfo.default,
|
|
54
|
+
{
|
|
55
|
+
isShowImage,
|
|
56
|
+
dataSource: {
|
|
57
|
+
...item,
|
|
58
|
+
name: item.title,
|
|
59
|
+
image: item.cover,
|
|
60
|
+
symbol
|
|
61
|
+
},
|
|
62
|
+
style: {
|
|
63
|
+
border: "1px solid #D0D5DD",
|
|
64
|
+
borderRadius: 4,
|
|
65
|
+
padding: 4
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
))) : null;
|
|
72
|
+
};
|
|
73
|
+
var packages_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,44 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/productCard/cartSkuCard/components/packages/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
_formatAmount: () => _formatAmount,
|
|
23
|
+
minusSign: () => minusSign
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(utils_exports);
|
|
26
|
+
var import_utils = require("@pisell/utils");
|
|
27
|
+
var minusSign = (item, type) => {
|
|
28
|
+
if (type === "total") {
|
|
29
|
+
const _price2 = (item == null ? void 0 : item.bundle_sum_price) || 0;
|
|
30
|
+
const isMarkdown2 = (item == null ? void 0 : item.bundle_sum_type) === "markdown";
|
|
31
|
+
return _price2 > 0 && isMarkdown2 ? "-" : "";
|
|
32
|
+
}
|
|
33
|
+
const _price = (item == null ? void 0 : item.price) || 0;
|
|
34
|
+
const isMarkdown = (item == null ? void 0 : item.price_type) === "markdown";
|
|
35
|
+
return _price > 0 && isMarkdown ? "-" : "";
|
|
36
|
+
};
|
|
37
|
+
var _formatAmount = (price = 0, amountSymbol, digit) => {
|
|
38
|
+
return (0, import_utils.formatAmount)(price, digit, amountSymbol);
|
|
39
|
+
};
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
_formatAmount,
|
|
43
|
+
minusSign
|
|
44
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/cartSkuCard/components/resources/index.tsx
|
|
30
|
+
var resources_exports = {};
|
|
31
|
+
__export(resources_exports, {
|
|
32
|
+
default: () => resources_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(resources_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var import__ = require("../../index");
|
|
39
|
+
var colors = [
|
|
40
|
+
"magenta",
|
|
41
|
+
"volcano",
|
|
42
|
+
"orange",
|
|
43
|
+
"gold",
|
|
44
|
+
"green",
|
|
45
|
+
"cyan",
|
|
46
|
+
"blue",
|
|
47
|
+
"geekblue",
|
|
48
|
+
"purple"
|
|
49
|
+
];
|
|
50
|
+
function getColor(n) {
|
|
51
|
+
return colors[n * 31 % colors.length];
|
|
52
|
+
}
|
|
53
|
+
var Resources = (props) => {
|
|
54
|
+
const { dataSource = {} } = props;
|
|
55
|
+
const { multiResources, isMultipleResource } = dataSource;
|
|
56
|
+
const renderResourceItem = (item, index) => {
|
|
57
|
+
const { id: ids, lists, _id } = item;
|
|
58
|
+
return Array.isArray(ids) ? ids.map((id) => {
|
|
59
|
+
const targetRes = lists.find((l) => l.id === id);
|
|
60
|
+
if (targetRes == null ? void 0 : targetRes.label) {
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { color: getColor(_id), className: "resource-tag" }, targetRes.label);
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}) : null;
|
|
65
|
+
};
|
|
66
|
+
if (isMultipleResource && (multiResources == null ? void 0 : multiResources.length) > 0) {
|
|
67
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__resources` }, multiResources.map(renderResourceItem));
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
};
|
|
71
|
+
var resources_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,77 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/cartSkuCard/components/sales/index.tsx
|
|
30
|
+
var sales_exports = {};
|
|
31
|
+
__export(sales_exports, {
|
|
32
|
+
default: () => sales_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(sales_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_collapsibleList = __toESM(require("../../../components/Packages/components/collapsibleList"));
|
|
38
|
+
var import_basicInfo = __toESM(require("../basicInfo"));
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var import__ = require("../../index");
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var Sales = ({ hideDivider, dataSource, isShowImage }) => {
|
|
43
|
+
const { relation_products = [], symbol = "$" } = dataSource || {};
|
|
44
|
+
let other_products = relation_products.map((p) => {
|
|
45
|
+
return {
|
|
46
|
+
...p,
|
|
47
|
+
name: p == null ? void 0 : p.product_title,
|
|
48
|
+
price: p == null ? void 0 : p.payment_price,
|
|
49
|
+
symbol,
|
|
50
|
+
num: p == null ? void 0 : p.product_quantity,
|
|
51
|
+
total: p == null ? void 0 : p.payment_price
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
return (other_products == null ? void 0 : other_products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, hideDivider ? null : /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}_sales-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `sales-title` }, import_utils.locales.getText("pisell2.cart.sku-card.sales.title")), /* @__PURE__ */ import_react.default.createElement(
|
|
55
|
+
import_collapsibleList.default,
|
|
56
|
+
{
|
|
57
|
+
list: other_products || [],
|
|
58
|
+
renderItem: (item) => {
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
60
|
+
import_basicInfo.default,
|
|
61
|
+
{
|
|
62
|
+
isShowImage,
|
|
63
|
+
style: {
|
|
64
|
+
border: "1px solid #D0D5DD",
|
|
65
|
+
borderRadius: 4,
|
|
66
|
+
padding: 4
|
|
67
|
+
},
|
|
68
|
+
dataSource: {
|
|
69
|
+
...item
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
))) : null;
|
|
76
|
+
};
|
|
77
|
+
var sales_default = Sales;
|