@pisell/materials 6.3.4 → 6.4.2
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 +4 -4
- package/build/lowcode/preview.js +150 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +28 -24
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +34 -30
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/icon/index.js +5 -5
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.d.ts +1 -0
- package/es/components/list/index.js +6 -6
- 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 +42 -3
- package/es/components/pisellCardList/index.less +9 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +4 -0
- package/es/components/pisellCheckboxGroup/index.js +23 -4
- package/es/components/pisellCheckboxGroup/index.less +28 -1
- 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.js +3 -0
- package/es/components/pisellWalletPassCard/index.d.ts +53 -1
- package/es/components/pisellWalletPassCard/index.js +333 -75
- package/es/components/pisellWalletPassCard/index.less +48 -11
- 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 +27 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +93 -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 +32 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -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 +45 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +292 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -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 +201 -0
- package/es/components/productCard/cartSkuCard/index.less +33 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/cartSkuCard/locales.js +30 -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 +5 -2
- package/es/components/productCard/index.less +6 -0
- package/es/components/productCard/locales.js +3 -0
- package/es/components/qrcode/index.js +1 -1
- package/es/components/sort/components/InlineMenu/index.js +1 -1
- package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
- package/es/components/table/Actions/component/ViewMode/index.js +1 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Header/Buttons/index.js +5 -5
- 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/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.js +4 -4
- package/es/components/table/Table/fields/date/Edit/index.js +1 -1
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/Edit/index.js +5 -5
- package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
- package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
- package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
- package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
- package/es/components/table/hooks/useTransFilterSetting.js +5 -5
- package/es/components/translation/utils.js +5 -5
- 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/walletCard/Guide/index.js +12 -1
- package/es/hooks/useResponsive.js +2 -2
- package/es/index.d.ts +1 -0
- package/es/locales/en-US.d.ts +6 -0
- package/es/locales/en-US.js +9 -2
- package/es/locales/zh-CN.d.ts +6 -0
- package/es/locales/zh-CN.js +9 -2
- package/es/locales/zh-TW.d.ts +6 -0
- package/es/locales/zh-TW.js +9 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/miniRedux.js +8 -9
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/list/index.d.ts +1 -0
- package/lib/components/lowCodePage/index.js +1 -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 +42 -3
- package/lib/components/pisellCardList/index.less +9 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +4 -0
- package/lib/components/pisellCheckboxGroup/index.js +22 -1
- package/lib/components/pisellCheckboxGroup/index.less +28 -1
- 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.js +3 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +53 -1
- package/lib/components/pisellWalletPassCard/index.js +253 -59
- package/lib/components/pisellWalletPassCard/index.less +48 -11
- 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 +27 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +82 -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 +52 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -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 +45 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +339 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -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 +239 -0
- package/lib/components/productCard/cartSkuCard/index.less +33 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/cartSkuCard/locales.js +61 -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 +6 -2
- package/lib/components/productCard/index.less +6 -0
- package/lib/components/productCard/locales.js +12 -3
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- 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/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/utils/index.js +1 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- 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/walletCard/Guide/index.js +11 -1
- package/lib/hooks/useResponsive.js +3 -6
- package/lib/index.d.ts +1 -0
- package/lib/locales/en-US.d.ts +6 -0
- package/lib/locales/en-US.js +9 -2
- package/lib/locales/zh-CN.d.ts +6 -0
- package/lib/locales/zh-CN.js +9 -2
- package/lib/locales/zh-TW.d.ts +6 -0
- package/lib/locales/zh-TW.js +9 -2
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/lowcode/pisell-card-list/meta.ts +50 -1
- package/lowcode/pisell-wallet-pass-card/actionsMeta.ts +7 -0
- package/lowcode/virtual-keyboard/meta.ts +131 -0
- package/package.json +7 -4
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
|
@@ -25,15 +25,25 @@
|
|
|
25
25
|
|
|
26
26
|
.actions-btn-wrapper {
|
|
27
27
|
position: absolute;
|
|
28
|
-
top:
|
|
29
|
-
right:
|
|
28
|
+
top: 0px;
|
|
29
|
+
right: 0px;
|
|
30
30
|
z-index: 2;
|
|
31
31
|
display: flex;
|
|
32
|
-
gap:
|
|
32
|
+
gap: 0px;
|
|
33
|
+
z-index: 3;
|
|
33
34
|
|
|
34
35
|
& > div {
|
|
35
36
|
cursor: pointer;
|
|
36
37
|
}
|
|
38
|
+
.pisell-card-status-icon {
|
|
39
|
+
padding: 12px 8px;
|
|
40
|
+
}
|
|
41
|
+
.pisell-card-actions-edit-btn {
|
|
42
|
+
padding: 12px 8px 20px;
|
|
43
|
+
}
|
|
44
|
+
.pisell-card-actions-detail-btn {
|
|
45
|
+
padding: 12px 8px 20px;
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
.pisell-wallet-pass-card-body {
|
|
@@ -47,12 +57,13 @@
|
|
|
47
57
|
display: flex;
|
|
48
58
|
flex-direction: column;
|
|
49
59
|
justify-content: space-between;
|
|
60
|
+
position: relative;
|
|
61
|
+
z-index: 2;
|
|
50
62
|
}
|
|
51
63
|
|
|
52
64
|
.pisell-card-name-wrap {
|
|
53
65
|
font-weight: 500;
|
|
54
66
|
line-height: 20px;
|
|
55
|
-
|
|
56
67
|
white-space: nowrap;
|
|
57
68
|
overflow: hidden;
|
|
58
69
|
text-overflow: ellipsis;
|
|
@@ -95,7 +106,7 @@
|
|
|
95
106
|
.pisell-card-amount-item-value {
|
|
96
107
|
font-size: 20px;
|
|
97
108
|
font-weight: 600;
|
|
98
|
-
line-height:
|
|
109
|
+
line-height: 20px;
|
|
99
110
|
overflow: hidden;
|
|
100
111
|
text-overflow: ellipsis;
|
|
101
112
|
}
|
|
@@ -188,10 +199,10 @@
|
|
|
188
199
|
.pisell-card-name-wrap {
|
|
189
200
|
font-weight: 600;
|
|
190
201
|
font-size: 16px;
|
|
191
|
-
max-width: calc(100% - 96px);
|
|
192
202
|
white-space: nowrap;
|
|
193
203
|
overflow: hidden;
|
|
194
204
|
text-overflow: ellipsis;
|
|
205
|
+
min-width: 12px;
|
|
195
206
|
}
|
|
196
207
|
|
|
197
208
|
.pisell-card-store-name {
|
|
@@ -208,19 +219,36 @@
|
|
|
208
219
|
visibility: hidden;
|
|
209
220
|
flex-direction: row;
|
|
210
221
|
align-items: center;
|
|
222
|
+
margin-bottom: 4px;
|
|
223
|
+
|
|
224
|
+
.pisell-card-amount-item-label-icon {
|
|
225
|
+
font-size: 20px;
|
|
226
|
+
margin-right: 8px;
|
|
227
|
+
}
|
|
211
228
|
|
|
212
229
|
.pisell-card-amount-item-label,
|
|
213
230
|
.pisell-card-amount-item-value {
|
|
214
|
-
color: var(--
|
|
215
|
-
font-size: 20px;
|
|
231
|
+
color: var(--Gray-500, #667085);
|
|
216
232
|
font-style: normal;
|
|
217
233
|
font-weight: 600;
|
|
218
234
|
}
|
|
235
|
+
.pisell-card-amount-item-label {
|
|
236
|
+
font-size: 14px;
|
|
237
|
+
}
|
|
238
|
+
.pisell-card-amount-item-value {
|
|
239
|
+
font-size: 20px;
|
|
240
|
+
}
|
|
219
241
|
}
|
|
220
242
|
|
|
221
243
|
&.active {
|
|
222
244
|
.pisell-wallet-pass-card-redeem {
|
|
223
|
-
|
|
245
|
+
.pisell-card-amount-item-label,
|
|
246
|
+
.pisell-card-amount-item-value {
|
|
247
|
+
color: var(--Primary-600, #7f56d9);
|
|
248
|
+
}
|
|
249
|
+
.pisell-card-amount-item-value {
|
|
250
|
+
text-decoration: underline;
|
|
251
|
+
}
|
|
224
252
|
}
|
|
225
253
|
}
|
|
226
254
|
|
|
@@ -239,8 +267,17 @@
|
|
|
239
267
|
|
|
240
268
|
.pisell-card-checked-icon {
|
|
241
269
|
position: absolute;
|
|
242
|
-
bottom:
|
|
243
|
-
right:
|
|
270
|
+
bottom: 0;
|
|
271
|
+
right: 0;
|
|
272
|
+
padding: 16px 16px 16px 32px;
|
|
273
|
+
z-index: 10;
|
|
274
|
+
.pisell-lowcode-radio-wrapper {
|
|
275
|
+
margin: 0;
|
|
276
|
+
}
|
|
277
|
+
.pisell-lowcode-radio-inner {
|
|
278
|
+
width: 20px;
|
|
279
|
+
height: 20px;
|
|
280
|
+
}
|
|
244
281
|
}
|
|
245
282
|
}
|
|
246
283
|
|
|
@@ -0,0 +1,80 @@
|
|
|
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/AmountFooter/index.tsx
|
|
30
|
+
var AmountFooter_exports = {};
|
|
31
|
+
__export(AmountFooter_exports, {
|
|
32
|
+
default: () => AmountFooter_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(AmountFooter_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_antd2 = require("antd");
|
|
39
|
+
var import_icons = require("@ant-design/icons");
|
|
40
|
+
var import_utils = require("../packages/utils");
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var import_utils2 = require("@pisell/utils");
|
|
43
|
+
var import__ = require("../../index");
|
|
44
|
+
var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
45
|
+
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
46
|
+
const isDiscount = (0, import_react.useMemo)(() => {
|
|
47
|
+
if (!origin_total) return false;
|
|
48
|
+
return Number(total) != Number(origin_total);
|
|
49
|
+
}, [total, origin_total]);
|
|
50
|
+
const renderDiscountReason = () => {
|
|
51
|
+
if (isDiscount && discount_reason && type === "total") {
|
|
52
|
+
if (Array.isArray(discount_reason)) {
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}_discount-reason` }, discount_reason.map((reason, index) => {
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd2.Tag, { key: index, color: "red" }, reason);
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
return /* @__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}_discount-reason` }, /* @__PURE__ */ import_react.default.createElement("span", null, `${import_utils2.locales.getText(
|
|
58
|
+
"pisell2.product.card.discount.reason"
|
|
59
|
+
)}: ${discount_reason}`)));
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !hideDivider ? /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className: (0, import_classnames.default)(
|
|
67
|
+
`${import__.PREFIX}__product-footer`,
|
|
68
|
+
hideDivider && `${import__.PREFIX}__hide-divider-footer`,
|
|
69
|
+
isOnlyTotal && `${import__.PREFIX}__only-total-footer`
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price-wrap`) }, !isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total, symbol)), tip ? /* @__PURE__ */ import_react.default.createElement(import_antd2.Tooltip, { title: import_utils2.locales.getText(tip), destroyTooltipOnHide: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
+
import_icons.QuestionCircleOutlined,
|
|
74
|
+
{
|
|
75
|
+
style: { fontSize: "16px", color: "#1570ef" }
|
|
76
|
+
}
|
|
77
|
+
)) : null), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null, /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-origin-total` }, (0, import_utils._formatAmount)(origin_total * num, symbol, 2)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total * num, symbol))))
|
|
78
|
+
), renderDiscountReason());
|
|
79
|
+
};
|
|
80
|
+
var AmountFooter_default = Footer;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.pisell-cart-sku-card {
|
|
2
|
+
&__product-footer {
|
|
3
|
+
color: var(--Gray-500, #667085);
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-weight: 600;
|
|
7
|
+
line-height: 20px;
|
|
8
|
+
> div {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
&__only-total-footer {
|
|
14
|
+
> div {
|
|
15
|
+
justify-content: end !important;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__footer-price {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 4px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__footer-discount {
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
line-height: 18px;
|
|
29
|
+
text-decoration-line: line-through;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__footer-total {
|
|
33
|
+
color: var(--Gray-900, #101828);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__footer-origin-total {
|
|
37
|
+
color: var(--Gray-500, #667085);
|
|
38
|
+
text-align: center;
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
line-height: 18px; /* 150% */
|
|
43
|
+
text-decoration-line: line-through;
|
|
44
|
+
margin-right: 8px;
|
|
45
|
+
display: inline-block;
|
|
46
|
+
transform: translateY(-1px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__hide-divider-footer {
|
|
50
|
+
margin-top: 8px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-product-item-discount-reason {
|
|
54
|
+
color: var(--gray-500, #667085);
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
font-style: normal;
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
line-height: 20px;
|
|
59
|
+
margin-top: 4px;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
gap: 4px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
|
|
65
|
+
> span {
|
|
66
|
+
display: inline-block;
|
|
67
|
+
max-width: 100%;
|
|
68
|
+
text-overflow: ellipsis;
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
border-radius: 4px;
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -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/MultiDay/index.tsx
|
|
30
|
+
var MultiDay_exports = {};
|
|
31
|
+
__export(MultiDay_exports, {
|
|
32
|
+
default: () => MultiDay_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(MultiDay_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_AmountFooter = __toESM(require("../AmountFooter"));
|
|
39
|
+
var import_utils = require("../../../utils");
|
|
40
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var import_utils2 = require("./utils");
|
|
43
|
+
var import__ = require("../../index");
|
|
44
|
+
var MultiDay = ({ dataSource, hideDivider }) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const { items, symbol, locale } = dataSource;
|
|
47
|
+
let translationOriginal = (text) => "";
|
|
48
|
+
const context = (0, import_useEngineContext.default)();
|
|
49
|
+
const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
|
|
50
|
+
translationOriginal = (utils == null ? void 0 : utils.translationOriginal) || (utils == null ? void 0 : utils.translation);
|
|
51
|
+
const lists = (0, import_react.useMemo)(() => {
|
|
52
|
+
return (0, import_utils2.formatDateRanges)([dataSource]);
|
|
53
|
+
}, [items, dataSource]);
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__multi-day-wrap`) }, lists == null ? void 0 : lists.map((m, index) => {
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: index }, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: "4px 0" } }), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__multi-day`) }, /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_utils.formatMultiDayDate)({ ...m, locale })), /* @__PURE__ */ import_react.default.createElement(
|
|
56
|
+
import_AmountFooter.default,
|
|
57
|
+
{
|
|
58
|
+
item: { ...m, symbol },
|
|
59
|
+
hideDivider: true
|
|
60
|
+
}
|
|
61
|
+
)));
|
|
62
|
+
}), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__multi-day-total-wrap`) }, /* @__PURE__ */ import_react.default.createElement(
|
|
63
|
+
import_AmountFooter.default,
|
|
64
|
+
{
|
|
65
|
+
item: { ...dataSource, num: 1 },
|
|
66
|
+
type: "total",
|
|
67
|
+
isOnlyTotal: true
|
|
68
|
+
}
|
|
69
|
+
)));
|
|
70
|
+
};
|
|
71
|
+
var MultiDay_default = MultiDay;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.pisell-cart-sku-card {
|
|
2
|
+
&__multi-day-wrap {
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
&__multi-day {
|
|
6
|
+
color: var(--Gray-500, #667085);
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
line-height: 20px;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__multi-day-total {
|
|
15
|
+
color: var(--Gray-900, #101828);
|
|
16
|
+
text-align: right;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: 20px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__multi-day-total-discount {
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
font-weight: 400;
|
|
27
|
+
line-height: 18px;
|
|
28
|
+
text-decoration-line: line-through;
|
|
29
|
+
color: var(--Gray-500, #667085);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface InputItem {
|
|
2
|
+
start_date: string;
|
|
3
|
+
end_date: string;
|
|
4
|
+
total: number;
|
|
5
|
+
num: number;
|
|
6
|
+
}
|
|
7
|
+
interface OutputItem {
|
|
8
|
+
start_date: string;
|
|
9
|
+
end_date: string;
|
|
10
|
+
total: number;
|
|
11
|
+
num: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatDateRanges(list: InputItem[]): OutputItem[];
|
|
14
|
+
export {};
|
|
@@ -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/MultiDay/utils.ts
|
|
30
|
+
var utils_exports = {};
|
|
31
|
+
__export(utils_exports, {
|
|
32
|
+
formatDateRanges: () => formatDateRanges
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(utils_exports);
|
|
35
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
+
function formatDateRanges(list) {
|
|
37
|
+
const result = [];
|
|
38
|
+
let currentGroup = null;
|
|
39
|
+
list.forEach((item, index) => {
|
|
40
|
+
const currentStartDate = (0, import_dayjs.default)(item.start_date);
|
|
41
|
+
const currentEndDate = (0, import_dayjs.default)(item.end_date);
|
|
42
|
+
const currentTotal = item.total;
|
|
43
|
+
const currentNum = item.num;
|
|
44
|
+
if (!currentGroup) {
|
|
45
|
+
currentGroup = {
|
|
46
|
+
...item,
|
|
47
|
+
start_date: currentStartDate.format("YYYY-MM-DD"),
|
|
48
|
+
end_date: currentEndDate.format("YYYY-MM-DD"),
|
|
49
|
+
total: currentTotal,
|
|
50
|
+
num: currentNum
|
|
51
|
+
};
|
|
52
|
+
} else {
|
|
53
|
+
const prevEndDate = (0, import_dayjs.default)(currentGroup.end_date);
|
|
54
|
+
if (currentTotal === currentGroup.total && prevEndDate.isSame(currentStartDate, "day")) {
|
|
55
|
+
currentGroup.end_date = currentEndDate.format("YYYY-MM-DD");
|
|
56
|
+
currentGroup.num += currentNum;
|
|
57
|
+
} else {
|
|
58
|
+
result.push(currentGroup);
|
|
59
|
+
currentGroup = {
|
|
60
|
+
...item,
|
|
61
|
+
start_date: currentStartDate.format("YYYY-MM-DD"),
|
|
62
|
+
end_date: currentEndDate.format("YYYY-MM-DD"),
|
|
63
|
+
total: currentTotal,
|
|
64
|
+
num: currentNum
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (index === list.length - 1 && currentGroup) {
|
|
69
|
+
result.push(currentGroup);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
formatDateRanges
|
|
77
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
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/Note/index.tsx
|
|
30
|
+
var Note_exports = {};
|
|
31
|
+
__export(Note_exports, {
|
|
32
|
+
default: () => Note_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Note_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_antd = require("antd");
|
|
39
|
+
var import__ = require("../../index");
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var Note = (props) => {
|
|
42
|
+
const { item, type, openNote, disabledEdit } = props;
|
|
43
|
+
return (item == null ? void 0 : item.note) || !disabledEdit ? /* @__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: (0, import_classnames.default)(`${import__.PREFIX}__note-wrap`) }, (item == null ? void 0 : item.note) ? /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__note-text`) }, import_utils.locales.getText("pisell2.product.card.discount.note"), ": ", item.note) : null, !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
className: `${import__.PREFIX}__note-btn`,
|
|
47
|
+
onClick: (e) => {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
openNote();
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
(item == null ? void 0 : item.note) ? import_utils.locales.getText("pisell2.product.card.discount.edit.note") : import_utils.locales.getText("pisell2.product.card.discount.add.note")
|
|
54
|
+
) : null)) : null;
|
|
55
|
+
};
|
|
56
|
+
var Note_default = Note;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.pisell-cart-sku-card {
|
|
2
|
+
&__note-wrap {
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
color: var(--Gray-900, #101828);
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
line-height: 20px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__note-text {
|
|
13
|
+
color: #101828;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
line-height: 20px;
|
|
17
|
+
word-break: keep-all;
|
|
18
|
+
word-wrap: normal;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__note-btn {
|
|
22
|
+
color: var(--Blue-600, #1570ef);
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IProps {
|
|
4
|
+
isShowImage?: boolean;
|
|
5
|
+
dataSource: {
|
|
6
|
+
image?: string;
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
options?: any[];
|
|
9
|
+
product_option_string?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
symbol?: string;
|
|
12
|
+
price?: string | number;
|
|
13
|
+
total?: number;
|
|
14
|
+
origin_total?: number;
|
|
15
|
+
num?: number;
|
|
16
|
+
holder_id?: any;
|
|
17
|
+
};
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** 作为主商品卡片展示
|
|
20
|
+
* 1. 影响商品数量 tag 的位置
|
|
21
|
+
* 2. isMain 且 type 为 a5,展示holder
|
|
22
|
+
*/
|
|
23
|
+
isMainProduct?: boolean;
|
|
24
|
+
type?: 'a2' | 'a5';
|
|
25
|
+
}
|
|
26
|
+
declare const BasicInfo: (props: IProps) => JSX.Element;
|
|
27
|
+
export default BasicInfo;
|