@pisell/materials 6.1.1 → 6.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +7 -7
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +42 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +47 -32
- package/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/badge/index.d.ts +7 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/collapse/index.d.ts +15 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +5 -4
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/es/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +22 -18
- package/es/components/page/index.d.ts +5 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/es/components/pisellAdjustPrice/index.d.ts +1 -6
- package/es/components/pisellAdjustPrice/index.js +64 -8
- package/es/components/pisellAdjustPrice/index.less +35 -6
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/status.js +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +20 -0
- package/es/components/pisellAdjustPrice/type.js +1 -0
- package/es/components/pisellAnchor/index.d.ts +23 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellCard/index.d.ts +19 -0
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellDropdown/index.d.ts +20 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/es/components/pisellImageCarousels/index.d.ts +18 -0
- package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/es/components/pisellInformationEntry/index.d.ts +33 -0
- package/es/components/pisellList01/index.d.ts +17 -0
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellSectionHeaders/index.d.ts +21 -0
- package/es/components/pisellStatisticList/index.d.ts +21 -0
- package/es/components/pisellToast/index.js +3 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -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 +11 -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 +4 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.js +44 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.js +43 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/es/components/productCard/cartSkuCard/index.js +195 -0
- package/es/components/productCard/cartSkuCard/index.less +69 -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.d.ts +3 -0
- package/es/components/productCard/components/AmountFooter/index.js +22 -6
- package/es/components/productCard/components/AmountFooter/index.less +28 -1
- package/es/components/productCard/components/Divider/index.d.ts +3 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Header/index.js +4 -3
- package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
- package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/components/options/index.less +3 -2
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/index.d.ts +3 -0
- package/es/components/productCard/components/Warning/index.d.ts +7 -0
- package/es/components/productCard/components/Warning/index.js +48 -0
- package/es/components/productCard/index.d.ts +3 -1
- package/es/components/productCard/index.js +10 -8
- package/es/components/productCard/locales.d.ts +84 -0
- package/es/components/productCard/locales.js +6 -3
- package/es/components/productCard/status.d.ts +32 -0
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +84 -0
- package/es/components/productCard/utils.js +8 -6
- package/es/components/section-footers/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/table/hooks/useTableSetting.d.ts +22 -0
- package/es/components/table/types.d.ts +251 -0
- package/es/components/tabs/index.d.ts +16 -0
- package/es/components/translation/index.d.ts +4 -3
- package/es/components/translation/index.js +34 -32
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +3 -20
- package/es/components/virtual-keyboard/Amount/index.js +79 -7
- package/es/components/virtual-keyboard/Amount/index.less +39 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/Amount/types.js +1 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
- package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
- package/es/components/virtual-keyboard/Number/index.d.ts +3 -11
- package/es/components/virtual-keyboard/Number/index.js +77 -7
- package/es/components/virtual-keyboard/Number/index.less +39 -0
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +25 -0
- package/es/components/virtual-keyboard/Number/types.js +1 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
- 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/Guest/index.d.ts +3 -0
- package/es/components/walletCard/Guide/index.d.ts +3 -0
- package/es/components/walletCard/index.d.ts +67 -0
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/badge/index.d.ts +7 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/collapse/index.d.ts +15 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +5 -4
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/lib/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +2 -2
- package/lib/components/page/index.d.ts +5 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
- package/lib/components/pisellAdjustPrice/index.js +119 -57
- package/lib/components/pisellAdjustPrice/index.less +35 -6
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/status.js +60 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
- package/lib/components/pisellAdjustPrice/type.js +17 -0
- package/lib/components/pisellAnchor/index.d.ts +23 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellCard/index.d.ts +19 -0
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellDropdown/index.d.ts +20 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/lib/components/pisellImageCarousels/index.d.ts +18 -0
- package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/lib/components/pisellInformationEntry/index.d.ts +33 -0
- package/lib/components/pisellList01/index.d.ts +17 -0
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
- package/lib/components/pisellStatisticList/index.d.ts +21 -0
- package/lib/components/pisellToast/index.js +3 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -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 +11 -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 +4 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +65 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/lib/components/productCard/cartSkuCard/index.js +216 -0
- package/lib/components/productCard/cartSkuCard/index.less +69 -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.d.ts +3 -0
- package/lib/components/productCard/components/AmountFooter/index.js +16 -6
- package/lib/components/productCard/components/AmountFooter/index.less +28 -1
- package/lib/components/productCard/components/Divider/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/index.js +4 -3
- package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -2
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/components/options/index.less +3 -2
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/index.d.ts +3 -0
- package/lib/components/productCard/components/Warning/index.d.ts +7 -0
- package/lib/components/productCard/components/Warning/index.js +68 -0
- package/lib/components/productCard/index.d.ts +3 -1
- package/lib/components/productCard/index.js +6 -11
- package/lib/components/productCard/locales.d.ts +84 -0
- package/lib/components/productCard/locales.js +6 -3
- package/lib/components/productCard/status.d.ts +32 -0
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +84 -0
- package/lib/components/productCard/utils.js +7 -6
- package/lib/components/section-footers/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
- package/lib/components/table/types.d.ts +251 -0
- package/lib/components/tabs/index.d.ts +16 -0
- package/lib/components/translation/index.d.ts +4 -3
- package/lib/components/translation/index.js +1 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +3 -20
- package/lib/components/virtual-keyboard/Amount/index.js +72 -16
- package/lib/components/virtual-keyboard/Amount/index.less +39 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/Amount/types.js +17 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
- package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
- package/lib/components/virtual-keyboard/Number/index.d.ts +3 -11
- package/lib/components/virtual-keyboard/Number/index.js +65 -11
- package/lib/components/virtual-keyboard/Number/index.less +39 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +25 -0
- package/lib/components/virtual-keyboard/Number/types.js +17 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -20
- 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/Guest/index.d.ts +3 -0
- package/lib/components/walletCard/Guide/index.d.ts +3 -0
- package/lib/components/walletCard/index.d.ts +67 -0
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/lowcode/pisell-adjust-price/meta.ts +168 -0
- package/lowcode/pisell-adjust-price/snippets.ts +1 -0
- package/lowcode/pisell-number-keyboard/meta.ts +167 -0
- package/lowcode/pisell-price-keyboard/meta.ts +167 -0
- package/lowcode/virtual-keyboard/meta.ts +131 -0
- package/package.json +4 -3
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import Iconfont from "../../../../iconfont";
|
|
2
|
+
import React, { useEffect, useMemo } from 'react';
|
|
3
|
+
import { Divider } from 'antd';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
5
|
+
import 'dayjs/locale/zh-cn';
|
|
6
|
+
import 'dayjs/locale/en';
|
|
7
|
+
import 'dayjs/locale/zh-tw';
|
|
8
|
+
import "./index.less";
|
|
9
|
+
import { PREFIX } from "../../index";
|
|
10
|
+
var localeTypes = {
|
|
11
|
+
'en-US': 'en',
|
|
12
|
+
'zh-CN': 'zh-cn',
|
|
13
|
+
'zh-HK': 'zh-tw'
|
|
14
|
+
};
|
|
15
|
+
var TimeRange = function TimeRange(props) {
|
|
16
|
+
var _props$dataSource = props.dataSource,
|
|
17
|
+
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource;
|
|
18
|
+
var start_date = dataSource.start_date,
|
|
19
|
+
end_date = dataSource.end_date,
|
|
20
|
+
_dataSource$locale = dataSource.locale,
|
|
21
|
+
locale = _dataSource$locale === void 0 ? 'en-US' : _dataSource$locale;
|
|
22
|
+
if (!dayjs(start_date).isValid() || !dayjs(end_date).isValid()) return null;
|
|
23
|
+
useEffect(function () {
|
|
24
|
+
dayjs.locale(localeTypes[locale]);
|
|
25
|
+
}, [locale]);
|
|
26
|
+
var isEn = useMemo(function () {
|
|
27
|
+
return locale === 'en-US' || locale === 'en';
|
|
28
|
+
}, [locale]);
|
|
29
|
+
var _format = useMemo(function () {
|
|
30
|
+
return isEn ? 'HH:mm DD/MM/YYYY' : 'YYYY-MM-DD HH:mm';
|
|
31
|
+
}, [isEn]);
|
|
32
|
+
var renderTimeItem = function renderTimeItem(time) {
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "time-range-item"
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
36
|
+
className: "time-icon",
|
|
37
|
+
type: "pisell2-clock"
|
|
38
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
className: "time-str"
|
|
40
|
+
}, dayjs(time).format(_format)));
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
43
|
+
style: {
|
|
44
|
+
margin: '4px 0'
|
|
45
|
+
}
|
|
46
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "".concat(PREFIX, "__time-range")
|
|
48
|
+
}, renderTimeItem(start_date), /*#__PURE__*/React.createElement(Iconfont, {
|
|
49
|
+
className: "joint-icon",
|
|
50
|
+
type: "pisell2-arrow-right"
|
|
51
|
+
}), renderTimeItem(end_date)));
|
|
52
|
+
};
|
|
53
|
+
export default TimeRange;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.pisell-cart-sku-card__time-range {
|
|
2
|
+
user-select: none;
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 8px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
.joint-icon {
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
color: #7f56da;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.time-range-item {
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
|
|
21
|
+
.time-icon {
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
color: #7f56da;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.time-str {
|
|
27
|
+
color: #667085;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
line-height: 20px;
|
|
31
|
+
display: inline-block;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { ProductCardTypes } from '../types';
|
|
3
|
+
interface ISKUCardProps extends ProductCardTypes {
|
|
4
|
+
type: 'a2' | 'a5';
|
|
5
|
+
}
|
|
6
|
+
export declare const PREFIX = "pisell-cart-sku-card";
|
|
7
|
+
declare const CartSkuCard: (props: ISKUCardProps) => JSX.Element;
|
|
8
|
+
export default CartSkuCard;
|
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder", "type"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React, { useMemo, useRef } from 'react';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import { SwipeAction } from 'antd-mobile';
|
|
14
|
+
import { image as imageAli, locales } from '@pisell/utils';
|
|
15
|
+
import localeTexts from "./locales";
|
|
16
|
+
import BasicInfo from "./components/basicInfo";
|
|
17
|
+
import DiscountReason from "./components/discountReason";
|
|
18
|
+
import Holders from "./components/holders";
|
|
19
|
+
import TimeRange from "./components/timeRange";
|
|
20
|
+
import Resources from "./components/resources";
|
|
21
|
+
import Packages from "./components/packages";
|
|
22
|
+
import Sales from "./components/sales";
|
|
23
|
+
import "./index.less";
|
|
24
|
+
import Iconfont from "../../iconfont";
|
|
25
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
26
|
+
import Items from "../components/MultiDay";
|
|
27
|
+
import AmountFooter from "../components/AmountFooter";
|
|
28
|
+
import UseOpenNote from "../hooks/useOpenNote";
|
|
29
|
+
import Note from "../components/Note";
|
|
30
|
+
import Action from "../components/Action";
|
|
31
|
+
import { defaultValue } from "../status";
|
|
32
|
+
export var PREFIX = 'pisell-cart-sku-card';
|
|
33
|
+
var CartSkuCard = function CartSkuCard(props) {
|
|
34
|
+
var _context$appHelper$ut;
|
|
35
|
+
var _props$dataSource = props.dataSource,
|
|
36
|
+
dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
|
|
37
|
+
_props$isShowImage = props.isShowImage,
|
|
38
|
+
isShowImage = _props$isShowImage === void 0 ? defaultValue.isShowImage : _props$isShowImage,
|
|
39
|
+
_props$isShowHolder = props.isShowHolder,
|
|
40
|
+
isShowHolder = _props$isShowHolder === void 0 ? defaultValue.isShowHolder : _props$isShowHolder,
|
|
41
|
+
_props$isShowNote = props.isShowNote,
|
|
42
|
+
isShowNote = _props$isShowNote === void 0 ? defaultValue.isShowNote : _props$isShowNote,
|
|
43
|
+
_props$isShowDelete = props.isShowDelete,
|
|
44
|
+
isShowDelete = _props$isShowDelete === void 0 ? defaultValue.isShowDelete : _props$isShowDelete,
|
|
45
|
+
_props$isShowPackageN = props.isShowPackageNote,
|
|
46
|
+
isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
|
|
47
|
+
_props$isShowEditProd = props.isShowEditProduct,
|
|
48
|
+
isShowEditProduct = _props$isShowEditProd === void 0 ? defaultValue.isShowEditProduct : _props$isShowEditProd,
|
|
49
|
+
onEditProduct = props.onEditProduct,
|
|
50
|
+
_onAction = props.onAction,
|
|
51
|
+
onDelete = props.onDelete,
|
|
52
|
+
onNote = props.onNote,
|
|
53
|
+
onLike = props.onLike,
|
|
54
|
+
onCard = props.onCard,
|
|
55
|
+
onChangeResource = props.onChangeResource,
|
|
56
|
+
onChangeHolder = props.onChangeHolder,
|
|
57
|
+
type = props.type,
|
|
58
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
59
|
+
var useOpenNoteRef = useRef();
|
|
60
|
+
var context = useEngineContext();
|
|
61
|
+
locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
|
|
62
|
+
console.log('prodcut props', props);
|
|
63
|
+
var isShowAction = dataSource.isShowAction,
|
|
64
|
+
actionText = dataSource.actionText;
|
|
65
|
+
var rightActions = useMemo(function () {
|
|
66
|
+
var deleteAction = {
|
|
67
|
+
key: 'delete',
|
|
68
|
+
text: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Iconfont, {
|
|
69
|
+
type: "pisell2-trash-01",
|
|
70
|
+
style: {
|
|
71
|
+
fontSize: 20,
|
|
72
|
+
marginRight: 4
|
|
73
|
+
}
|
|
74
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
75
|
+
style: {
|
|
76
|
+
fontSize: 12
|
|
77
|
+
}
|
|
78
|
+
}, locales.getText('pisell2.cart.sku-card.actions.delete'))),
|
|
79
|
+
color: 'danger',
|
|
80
|
+
onClick: function onClick(e) {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var actions = [];
|
|
87
|
+
if (isShowDelete) {
|
|
88
|
+
actions.push(deleteAction);
|
|
89
|
+
}
|
|
90
|
+
return actions;
|
|
91
|
+
}, [dataSource, onDelete, isShowDelete]);
|
|
92
|
+
var hideDivider = useMemo(function () {
|
|
93
|
+
var bundle = dataSource.bundle,
|
|
94
|
+
relation_products = dataSource.relation_products;
|
|
95
|
+
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (relation_products === null || relation_products === void 0 ? void 0 : relation_products.length);
|
|
96
|
+
}, [dataSource]);
|
|
97
|
+
var renderA2 = function renderA2() {
|
|
98
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
|
|
99
|
+
isShowImage: isShowImage,
|
|
100
|
+
dataSource: dataSource,
|
|
101
|
+
isMainProduct: true
|
|
102
|
+
}), /*#__PURE__*/React.createElement(DiscountReason, {
|
|
103
|
+
dataSource: dataSource
|
|
104
|
+
}), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
|
|
105
|
+
item: dataSource,
|
|
106
|
+
openNote: function openNote() {
|
|
107
|
+
useOpenNoteRef.current.open({
|
|
108
|
+
item: dataSource
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
})) : null);
|
|
112
|
+
};
|
|
113
|
+
var renderA5 = function renderA5() {
|
|
114
|
+
var _dataSource$bundle, _dataSource$items;
|
|
115
|
+
var image = dataSource.image,
|
|
116
|
+
name = dataSource.name;
|
|
117
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isShowDelete ? /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
className: "".concat(PREFIX, "__delete-btn"),
|
|
119
|
+
onClick: function onClick(e) {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
123
|
+
}
|
|
124
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
125
|
+
type: "pisell2-trash-01"
|
|
126
|
+
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
className: "".concat(PREFIX, "__content")
|
|
128
|
+
}, isShowImage && image && /*#__PURE__*/React.createElement("img", {
|
|
129
|
+
src: imageAli.ali(image, 64),
|
|
130
|
+
className: "product-cover"
|
|
131
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
className: "product-info"
|
|
133
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
className: "product-name"
|
|
135
|
+
}, name), /*#__PURE__*/React.createElement(Holders, {
|
|
136
|
+
dataSource: dataSource
|
|
137
|
+
}))), /*#__PURE__*/React.createElement(TimeRange, {
|
|
138
|
+
dataSource: dataSource
|
|
139
|
+
}), /*#__PURE__*/React.createElement(Resources, {
|
|
140
|
+
dataSource: dataSource
|
|
141
|
+
}), /*#__PURE__*/React.createElement(Packages, {
|
|
142
|
+
dataSource: dataSource,
|
|
143
|
+
isShowImage: isShowImage
|
|
144
|
+
}), /*#__PURE__*/React.createElement(Sales, {
|
|
145
|
+
dataSource: dataSource,
|
|
146
|
+
hideDivider: !!(dataSource !== null && dataSource !== void 0 && (_dataSource$bundle = dataSource.bundle) !== null && _dataSource$bundle !== void 0 && _dataSource$bundle.length)
|
|
147
|
+
}), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
|
|
148
|
+
dataSource: dataSource,
|
|
149
|
+
hideDivider: hideDivider
|
|
150
|
+
}) : /*#__PURE__*/React.createElement(AmountFooter, {
|
|
151
|
+
item: dataSource,
|
|
152
|
+
hideDivider: hideDivider,
|
|
153
|
+
type: "total"
|
|
154
|
+
}), /*#__PURE__*/React.createElement(DiscountReason, {
|
|
155
|
+
dataSource: dataSource
|
|
156
|
+
}), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
|
|
157
|
+
item: dataSource,
|
|
158
|
+
openNote: function openNote() {
|
|
159
|
+
useOpenNoteRef.current.open({
|
|
160
|
+
item: dataSource
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
})) : null, isShowAction && actionText ? /*#__PURE__*/React.createElement(Action, {
|
|
164
|
+
item: dataSource,
|
|
165
|
+
onAction: function onAction() {
|
|
166
|
+
return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
|
|
167
|
+
}
|
|
168
|
+
}) : null);
|
|
169
|
+
};
|
|
170
|
+
var renderContent = function renderContent() {
|
|
171
|
+
if (type === 'a5') {
|
|
172
|
+
return renderA5();
|
|
173
|
+
}
|
|
174
|
+
return renderA2();
|
|
175
|
+
};
|
|
176
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SwipeAction, {
|
|
177
|
+
className: classNames("".concat(PREFIX, "-wrapper")),
|
|
178
|
+
rightActions: rightActions
|
|
179
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
180
|
+
className: classNames(PREFIX, "".concat(PREFIX, "--").concat(type)),
|
|
181
|
+
onClick: function onClick(e) {
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
e.stopPropagation();
|
|
184
|
+
onCard === null || onCard === void 0 || onCard(dataSource);
|
|
185
|
+
}
|
|
186
|
+
}, renderContent())), /*#__PURE__*/React.createElement(UseOpenNote, {
|
|
187
|
+
ref: useOpenNoteRef,
|
|
188
|
+
onNoteChange: function onNoteChange(e) {
|
|
189
|
+
onNote === null || onNote === void 0 || onNote(_objectSpread(_objectSpread({}, dataSource), {}, {
|
|
190
|
+
note: e || ''
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
}));
|
|
194
|
+
};
|
|
195
|
+
export default CartSkuCard;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.pisell-cart-sku-card-wrapper {
|
|
2
|
+
border-radius: 4px;
|
|
3
|
+
background: var(--Base-White, #fff);
|
|
4
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pisell-cart-sku-card {
|
|
8
|
+
padding: 4px 8px 4px 4px;
|
|
9
|
+
border-radius: inherit;
|
|
10
|
+
user-select: none;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
&__delete-btn {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
position: absolute;
|
|
16
|
+
padding: 10px;
|
|
17
|
+
top: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
|
|
20
|
+
> span {
|
|
21
|
+
color: #667085;
|
|
22
|
+
font-size: 20px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__content {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 4px;
|
|
29
|
+
|
|
30
|
+
img {
|
|
31
|
+
width: 48px;
|
|
32
|
+
height: 48px;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
border-radius: 6px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.product-info {
|
|
38
|
+
flex: 1;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 4px;
|
|
42
|
+
flex: 1 0 0;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
min-height: 30px;
|
|
46
|
+
|
|
47
|
+
.product-name {
|
|
48
|
+
color: var(--Gray-900, #101828);
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
width: 100%;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.product-price {
|
|
60
|
+
color: var(--Gray-900, #101828);
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
font-style: normal;
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
line-height: 20px;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.card.discount.reason': string;
|
|
4
|
+
'pisell2.cart.sku-card.more': string;
|
|
5
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
6
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
7
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
8
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
9
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
10
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
11
|
+
'pisell2.product.card.discount.note': string;
|
|
12
|
+
'pisell2.product.card.edit': string;
|
|
13
|
+
'pisell2.product.card.discount.add.note': string;
|
|
14
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
15
|
+
'pisell2.product.card.confirm': string;
|
|
16
|
+
'pisell2.product.card.cancel': string;
|
|
17
|
+
'pisell2.product.card.note.pla': string;
|
|
18
|
+
'pisell2.product.card.items.package': string;
|
|
19
|
+
'pisell2.product.card.view-all': string;
|
|
20
|
+
'pisell2.product.card.view-less': string;
|
|
21
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
22
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
23
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
24
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
25
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
26
|
+
'pisell2.product.card.sales': string;
|
|
27
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
28
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
29
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
30
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
31
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
32
|
+
};
|
|
33
|
+
'zh-CN': {
|
|
34
|
+
'pisell2.product.card.discount.reason': string;
|
|
35
|
+
'pisell2.cart.sku-card.more': string;
|
|
36
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
37
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
38
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
39
|
+
'pisell2.product.card.edit': string;
|
|
40
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
41
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
42
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
43
|
+
'pisell2.product.card.discount.note': string;
|
|
44
|
+
'pisell2.product.card.discount.add.note': string;
|
|
45
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
46
|
+
'pisell2.product.card.confirm': string;
|
|
47
|
+
'pisell2.product.card.cancel': string;
|
|
48
|
+
'pisell2.product.card.note.pla': string;
|
|
49
|
+
'pisell2.product.card.items.package': string;
|
|
50
|
+
'pisell2.product.card.view-all': string;
|
|
51
|
+
'pisell2.product.card.view-less': string;
|
|
52
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
53
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
54
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
55
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
56
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
57
|
+
'pisell2.product.card.sales': string;
|
|
58
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
59
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
60
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
61
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
62
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
63
|
+
};
|
|
64
|
+
'zh-HK': {
|
|
65
|
+
'pisell2.product.card.discount.reason': string;
|
|
66
|
+
'pisell2.cart.sku-card.more': string;
|
|
67
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
68
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
69
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
70
|
+
'pisell2.product.card.edit': string;
|
|
71
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
72
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
73
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
74
|
+
'pisell2.product.card.discount.note': string;
|
|
75
|
+
'pisell2.product.card.discount.add.note': string;
|
|
76
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
77
|
+
'pisell2.product.card.confirm': string;
|
|
78
|
+
'pisell2.product.card.cancel': string;
|
|
79
|
+
'pisell2.product.card.note.pla': string;
|
|
80
|
+
'pisell2.product.card.items.package': string;
|
|
81
|
+
'pisell2.product.card.view-all': string;
|
|
82
|
+
'pisell2.product.card.view-less': string;
|
|
83
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
84
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
85
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
86
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
87
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
88
|
+
'pisell2.product.card.sales': string;
|
|
89
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
90
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
91
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
92
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
93
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 localeTexts from "../locales";
|
|
8
|
+
export default {
|
|
9
|
+
en: _objectSpread(_objectSpread({}, localeTexts.en), {}, {
|
|
10
|
+
'pisell2.product.card.discount.reason': 'Discount reason',
|
|
11
|
+
'pisell2.cart.sku-card.more': 'more...',
|
|
12
|
+
'pisell2.cart.sku-card.packages.title': 'Items in package',
|
|
13
|
+
'pisell2.cart.sku-card.sales.title': 'Sales',
|
|
14
|
+
'pisell2.cart.sku-card.actions.delete': 'Delete'
|
|
15
|
+
}),
|
|
16
|
+
'zh-CN': _objectSpread(_objectSpread({}, localeTexts['zh-CN']), {}, {
|
|
17
|
+
'pisell2.product.card.discount.reason': '折扣原因',
|
|
18
|
+
'pisell2.cart.sku-card.more': '更多……',
|
|
19
|
+
'pisell2.cart.sku-card.packages.title': '包含的商品',
|
|
20
|
+
'pisell2.cart.sku-card.sales.title': '销售',
|
|
21
|
+
'pisell2.cart.sku-card.actions.delete': '删除'
|
|
22
|
+
}),
|
|
23
|
+
'zh-HK': _objectSpread(_objectSpread({}, localeTexts['zh-HK']), {}, {
|
|
24
|
+
'pisell2.product.card.discount.reason': '折扣原因',
|
|
25
|
+
'pisell2.cart.sku-card.more': '更多……',
|
|
26
|
+
'pisell2.cart.sku-card.packages.title': '包含的商品',
|
|
27
|
+
'pisell2.cart.sku-card.sales.title': '銷售',
|
|
28
|
+
'pisell2.cart.sku-card.actions.delete': '刪除'
|
|
29
|
+
})
|
|
30
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { Tooltip } from 'antd';
|
|
3
|
+
import { Tag, Tooltip } from 'antd';
|
|
4
4
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
5
5
|
import { _formatAmount } from "../Packages/utils";
|
|
6
6
|
import Divider from "../Divider";
|
|
@@ -31,6 +31,24 @@ var Footer = function Footer(_ref) {
|
|
|
31
31
|
if (!origin_total) return false;
|
|
32
32
|
return Number(total) != Number(origin_total);
|
|
33
33
|
}, [total, origin_total]);
|
|
34
|
+
var renderDiscountReason = function renderDiscountReason() {
|
|
35
|
+
if (isDiscount && discount_reason && type === 'total') {
|
|
36
|
+
if (Array.isArray(discount_reason)) {
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "".concat(prefix, "product-item-discount-reason")
|
|
39
|
+
}, discount_reason.map(function (reason, index) {
|
|
40
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
41
|
+
key: index,
|
|
42
|
+
color: "red"
|
|
43
|
+
}, reason);
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "".concat(prefix, "product-item-discount-reason")
|
|
48
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason))));
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
};
|
|
34
52
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
35
53
|
type: type !== 'total' ? 'inside' : ''
|
|
36
54
|
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -49,10 +67,8 @@ var Footer = function Footer(_ref) {
|
|
|
49
67
|
}
|
|
50
68
|
})) : null), /*#__PURE__*/React.createElement("span", null, "\xD7".concat(num))) : null, /*#__PURE__*/React.createElement("span", {
|
|
51
69
|
className: "".concat(prefix, "packages-product-footer-total")
|
|
52
|
-
},
|
|
53
|
-
className: "".concat(prefix, "packages-product-footer-
|
|
54
|
-
},
|
|
55
|
-
className: "".concat(prefix, "product-item-discount-reason")
|
|
56
|
-
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason)))) : null);
|
|
70
|
+
}, isDiscount ? /*#__PURE__*/React.createElement("span", {
|
|
71
|
+
className: "".concat(prefix, "packages-product-footer-origin-total")
|
|
72
|
+
}, _formatAmount(origin_total * num, symbol, 2)) : null, /*#__PURE__*/React.createElement("span", null, _formatAmount(total * num, symbol))))), renderDiscountReason());
|
|
57
73
|
};
|
|
58
74
|
export default Footer;
|
|
@@ -35,6 +35,19 @@
|
|
|
35
35
|
color: var(--Gray-900, #101828);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
&-packages-product-footer-origin-total {
|
|
39
|
+
color: var(--Gray-500, #667085);
|
|
40
|
+
text-align: center;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
line-height: 18px; /* 150% */
|
|
45
|
+
text-decoration-line: line-through;
|
|
46
|
+
margin-right: 8px;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
transform: translateY(-1px);
|
|
49
|
+
}
|
|
50
|
+
|
|
38
51
|
&-packages-product-hide-divider-footer {
|
|
39
52
|
margin-top: 8px;
|
|
40
53
|
}
|
|
@@ -45,6 +58,20 @@
|
|
|
45
58
|
font-style: normal;
|
|
46
59
|
font-weight: 400;
|
|
47
60
|
line-height: 20px;
|
|
48
|
-
|
|
61
|
+
margin-top: 4px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
gap: 4px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
|
|
67
|
+
>span {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
49
76
|
}
|
|
50
77
|
}
|
|
@@ -26,7 +26,8 @@ var Header = function Header(props) {
|
|
|
26
26
|
name = item.name,
|
|
27
27
|
price = item.price,
|
|
28
28
|
symbol = item.symbol,
|
|
29
|
-
disabled = item.disabled
|
|
29
|
+
disabled = item.disabled,
|
|
30
|
+
relation_products = item.relation_products;
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* @title: 是否显示价格
|
|
@@ -39,8 +40,8 @@ var Header = function Header(props) {
|
|
|
39
40
|
var showPrice = useMemo(function () {
|
|
40
41
|
// 如果有报价单则不需要显示价格
|
|
41
42
|
|
|
42
|
-
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 || (options === null || options === void 0 ? void 0 : options.length) > 0;
|
|
43
|
-
}, [bundle, options]);
|
|
43
|
+
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 || (options === null || options === void 0 ? void 0 : options.length) > 0 || ((relation_products === null || relation_products === void 0 ? void 0 : relation_products.length) || 0) > 0;
|
|
44
|
+
}, [bundle, options, relation_products]);
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* @title: 样式是否居中
|