@pisell/materials 6.2.36 → 6.3.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 +3 -3
- package/build/lowcode/preview.js +164 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +39 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +39 -25
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -10
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/es/components/pisellCardList/index.js +3 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +1 -0
- package/es/components/pisellCheckboxGroup/index.js +15 -1
- package/es/components/pisellGoodPassCard/index.d.ts +0 -1
- package/es/components/pisellGoodPassCard/index.js +5 -17
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellToast/index.js +0 -3
- package/es/components/pisellWalletPassCard/index.d.ts +1 -0
- package/es/components/productCard/components/Action/index.js +1 -14
- package/es/components/productCard/components/Action/index.less +0 -3
- package/es/components/productCard/components/Header/index.js +8 -23
- package/es/components/productCard/components/Header/index.less +1 -16
- package/es/components/productCard/components/MultiDay/index.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +1 -0
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -3
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.less +0 -3
- package/es/components/productCard/index.d.ts +1 -3
- package/es/components/productCard/index.js +2 -5
- package/es/components/productCard/index.less +0 -6
- package/es/components/productCard/locales.js +0 -3
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/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/versionSelect/index.d.ts +1 -0
- package/es/components/virtual-keyboard/index.d.ts +0 -11
- package/es/components/virtual-keyboard/index.js +3 -88
- package/es/components/virtual-keyboard/index.less +1 -33
- package/es/components/walletCard/Guide/index.js +12 -1
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -10
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/lib/components/pisellCardList/index.js +3 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +1 -0
- package/lib/components/pisellCheckboxGroup/index.js +16 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +0 -1
- package/lib/components/pisellGoodPassCard/index.js +4 -31
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellToast/index.js +0 -3
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
- package/lib/components/productCard/components/Action/index.js +0 -9
- package/lib/components/productCard/components/Action/index.less +0 -3
- package/lib/components/productCard/components/Header/index.js +11 -21
- package/lib/components/productCard/components/Header/index.less +1 -16
- package/lib/components/productCard/components/MultiDay/index.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +1 -0
- 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 +0 -3
- package/lib/components/productCard/index.d.ts +1 -3
- package/lib/components/productCard/index.js +2 -6
- package/lib/components/productCard/index.less +0 -6
- package/lib/components/productCard/locales.js +3 -12
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- 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/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/index.d.ts +0 -11
- package/lib/components/virtual-keyboard/index.js +2 -60
- package/lib/components/virtual-keyboard/index.less +1 -33
- package/lib/components/walletCard/Guide/index.js +11 -1
- package/lowcode/_setters/antd-icon-setter/index.tsx +2 -3
- package/lowcode/virtual-keyboard/meta.ts +0 -131
- package/package.json +4 -6
- 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
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +0 -76
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +0 -75
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +0 -82
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +0 -31
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +0 -56
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/Note/index.js +0 -29
- package/es/components/productCard/cartSkuCard/components/Note/index.less +0 -27
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +0 -93
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +0 -117
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +0 -51
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/holders/index.js +0 -32
- package/es/components/productCard/cartSkuCard/components/holders/index.less +0 -32
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/components/packages/index.js +0 -52
- package/es/components/productCard/cartSkuCard/components/packages/index.less +0 -22
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +0 -40
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/resources/index.js +0 -39
- package/es/components/productCard/cartSkuCard/components/resources/index.less +0 -19
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/es/components/productCard/cartSkuCard/components/sales/index.js +0 -57
- package/es/components/productCard/cartSkuCard/components/sales/index.less +0 -22
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/specs/index.js +0 -44
- package/es/components/productCard/cartSkuCard/components/specs/index.less +0 -34
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -45
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +0 -292
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +0 -35
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +0 -54
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +0 -38
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/index.js +0 -203
- package/es/components/productCard/cartSkuCard/index.less +0 -33
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/es/components/productCard/cartSkuCard/locales.js +0 -30
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -25
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/walletCard/Guide/index.d.ts +0 -3
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +0 -80
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +0 -75
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +0 -71
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +0 -31
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +0 -77
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/Note/index.js +0 -56
- package/lib/components/productCard/cartSkuCard/components/Note/index.less +0 -27
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +0 -82
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +0 -117
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +0 -70
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +0 -52
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +0 -32
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +0 -73
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +0 -22
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +0 -44
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +0 -71
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +0 -19
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +0 -77
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +0 -22
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +0 -66
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +0 -34
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -45
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +0 -339
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +0 -35
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +0 -68
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +0 -38
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/index.js +0 -239
- package/lib/components/productCard/cartSkuCard/index.less +0 -33
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/lib/components/productCard/cartSkuCard/locales.js +0 -61
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -25
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/walletCard/Guide/index.d.ts +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export declare const defaultConfig: {
|
|
2
|
-
dark: {
|
|
3
|
-
backgroundColor: string;
|
|
4
|
-
containerBackgroundColor: string;
|
|
5
|
-
buttonBackgroundColor: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
resetButtonBackgroundColor: string;
|
|
8
|
-
resetButtonTextColor: string;
|
|
9
|
-
isDoneButtonFollowTheme: boolean;
|
|
10
|
-
doneButtonBackgroundColor: string;
|
|
11
|
-
doneButtonTextColor: string;
|
|
12
|
-
isShowMainText: boolean;
|
|
13
|
-
mainTextColor: string;
|
|
14
|
-
isShowSubText: boolean;
|
|
15
|
-
subTextColor: string;
|
|
16
|
-
};
|
|
17
|
-
light: {
|
|
18
|
-
backgroundColor: string;
|
|
19
|
-
containerBackgroundColor: string;
|
|
20
|
-
buttonBackgroundColor: string;
|
|
21
|
-
textColor: string;
|
|
22
|
-
resetButtonBackgroundColor: string;
|
|
23
|
-
resetButtonTextColor: string;
|
|
24
|
-
isDoneButtonFollowTheme: boolean;
|
|
25
|
-
doneButtonBackgroundColor: string;
|
|
26
|
-
doneButtonTextColor: string;
|
|
27
|
-
isShowMainText: boolean;
|
|
28
|
-
mainTextColor: string;
|
|
29
|
-
isShowSubText: boolean;
|
|
30
|
-
subTextColor: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface PisellAdjustPriceProps {
|
|
2
|
-
value?: number;
|
|
3
|
-
originValue: number;
|
|
4
|
-
defaultValue?: number;
|
|
5
|
-
onChange?: (val: number) => void;
|
|
6
|
-
selectType?: 'light' | 'dark';
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
containerBackgroundColor?: string;
|
|
9
|
-
buttonBackgroundColor?: string;
|
|
10
|
-
textColor?: string;
|
|
11
|
-
resetButtonBackgroundColor?: string;
|
|
12
|
-
resetButtonTextColor?: string;
|
|
13
|
-
isDoneButtonFollowTheme?: boolean;
|
|
14
|
-
doneButtonBackgroundColor?: string;
|
|
15
|
-
doneButtonTextColor?: string;
|
|
16
|
-
isShowMainText?: boolean;
|
|
17
|
-
mainTextColor?: string;
|
|
18
|
-
isShowSubText?: boolean;
|
|
19
|
-
subTextColor?: string;
|
|
20
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { Divider } from 'antd';
|
|
4
|
-
import { Tag, Tooltip } from 'antd';
|
|
5
|
-
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
6
|
-
import { _formatAmount } from "../packages/utils";
|
|
7
|
-
import "./index.less";
|
|
8
|
-
import { locales } from '@pisell/utils';
|
|
9
|
-
import { PREFIX } from "../../index";
|
|
10
|
-
var Footer = function Footer(_ref) {
|
|
11
|
-
var item = _ref.item,
|
|
12
|
-
hideDivider = _ref.hideDivider,
|
|
13
|
-
type = _ref.type,
|
|
14
|
-
isOnlyTotal = _ref.isOnlyTotal;
|
|
15
|
-
var total = item.total,
|
|
16
|
-
origin_total = item.origin_total,
|
|
17
|
-
symbol = item.symbol,
|
|
18
|
-
tip = item.tip,
|
|
19
|
-
num = item.num,
|
|
20
|
-
discount_reason = item.discount_reason;
|
|
21
|
-
/**
|
|
22
|
-
* @title: 折扣
|
|
23
|
-
* @description:
|
|
24
|
-
* @param {*} useMemo
|
|
25
|
-
* @return {*}
|
|
26
|
-
* @Author: WangHan
|
|
27
|
-
* @Date: 2024-11-22 13:50
|
|
28
|
-
*/
|
|
29
|
-
var isDiscount = useMemo(function () {
|
|
30
|
-
// item中没有该属性则不展示
|
|
31
|
-
if (!origin_total) return false;
|
|
32
|
-
return Number(total) != Number(origin_total);
|
|
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, "_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, "_discount-reason")
|
|
48
|
-
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason))));
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
};
|
|
52
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
53
|
-
style: {
|
|
54
|
-
margin: 0
|
|
55
|
-
}
|
|
56
|
-
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: classNames("".concat(PREFIX, "__product-footer"), hideDivider && "".concat(PREFIX, "__hide-divider-footer"), isOnlyTotal && "".concat(PREFIX, "__only-total-footer"))
|
|
58
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: classNames("".concat(PREFIX, "__footer-price-wrap"))
|
|
60
|
-
}, !isOnlyTotal ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
className: classNames("".concat(PREFIX, "__footer-price"))
|
|
62
|
-
}, /*#__PURE__*/React.createElement("span", null, _formatAmount(total, symbol)), tip ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
63
|
-
title: locales.getText(tip),
|
|
64
|
-
destroyTooltipOnHide: true
|
|
65
|
-
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
66
|
-
style: {
|
|
67
|
-
fontSize: '16px',
|
|
68
|
-
color: '#1570ef'
|
|
69
|
-
}
|
|
70
|
-
})) : null), /*#__PURE__*/React.createElement("span", null, "\xD7".concat(num))) : null, /*#__PURE__*/React.createElement("span", {
|
|
71
|
-
className: "".concat(PREFIX, "__footer-total")
|
|
72
|
-
}, isDiscount ? /*#__PURE__*/React.createElement("span", {
|
|
73
|
-
className: "".concat(PREFIX, "__footer-origin-total")
|
|
74
|
-
}, _formatAmount(origin_total * num, symbol, 2)) : null, /*#__PURE__*/React.createElement("span", null, _formatAmount(total * num, symbol))))), renderDiscountReason());
|
|
75
|
-
};
|
|
76
|
-
export default Footer;
|
|
@@ -1,75 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
|
-
import classNames from 'classnames';
|
|
9
|
-
import { Divider } from 'antd';
|
|
10
|
-
import AmountFooter from "../AmountFooter";
|
|
11
|
-
import { formatMultiDayDate } from "../../../utils";
|
|
12
|
-
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
13
|
-
import "./index.less";
|
|
14
|
-
import { formatDateRanges } from "./utils";
|
|
15
|
-
import { PREFIX } from "../../index";
|
|
16
|
-
var MultiDay = function MultiDay(_ref) {
|
|
17
|
-
var _context$appHelper;
|
|
18
|
-
var dataSource = _ref.dataSource,
|
|
19
|
-
hideDivider = _ref.hideDivider;
|
|
20
|
-
var items = dataSource.items,
|
|
21
|
-
symbol = dataSource.symbol,
|
|
22
|
-
locale = dataSource.locale;
|
|
23
|
-
var translationOriginal = function translationOriginal(text) {
|
|
24
|
-
return '';
|
|
25
|
-
};
|
|
26
|
-
var context = useEngineContext();
|
|
27
|
-
var utils = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
|
|
28
|
-
translationOriginal = (utils === null || utils === void 0 ? void 0 : utils.translationOriginal) || (utils === null || utils === void 0 ? void 0 : utils.translation);
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @title: 商品单价 + 套餐价格
|
|
32
|
-
* @description:
|
|
33
|
-
* @param {*} useMemo
|
|
34
|
-
* @return {*}
|
|
35
|
-
* @Author: WangHan
|
|
36
|
-
* @Date: 2024-12-28 23:00
|
|
37
|
-
*/
|
|
38
|
-
var lists = useMemo(function () {
|
|
39
|
-
// if (!items?.length) return [];
|
|
40
|
-
|
|
41
|
-
// // 套餐明细
|
|
42
|
-
// const bundleDetails = bundle
|
|
43
|
-
// ?.map(
|
|
44
|
-
// (b: any) =>
|
|
45
|
-
// `${translationOriginal(b?.title)} (${symbol}${
|
|
46
|
-
// Number(b.price) * Number(b.num)
|
|
47
|
-
// })`
|
|
48
|
-
// )
|
|
49
|
-
// ?.join('+');
|
|
50
|
-
|
|
51
|
-
return formatDateRanges([dataSource]);
|
|
52
|
-
}, [items, dataSource]);
|
|
53
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: classNames("".concat(PREFIX, "__multi-day-wrap"))
|
|
55
|
-
}, lists === null || lists === void 0 ? void 0 : lists.map(function (m, index) {
|
|
56
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
key: index
|
|
58
|
-
}, /*#__PURE__*/React.createElement(Divider, {
|
|
59
|
-
style: {
|
|
60
|
-
margin: '4px 0'
|
|
61
|
-
}
|
|
62
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: classNames("".concat(PREFIX, "__multi-day"))
|
|
64
|
-
}, /*#__PURE__*/React.createElement("div", null, formatMultiDayDate(_objectSpread(_objectSpread({}, m), {}, {
|
|
65
|
-
locale: locale
|
|
66
|
-
}))), /*#__PURE__*/React.createElement(AmountFooter, {
|
|
67
|
-
item: _objectSpread(_objectSpread({}, m), {}, {
|
|
68
|
-
symbol: symbol
|
|
69
|
-
}),
|
|
70
|
-
hideDivider: true
|
|
71
|
-
})));
|
|
72
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: classNames("".concat(PREFIX, "__multi-day-total-wrap"))
|
|
74
|
-
}, /*#__PURE__*/React.createElement(AmountFooter, {
|
|
75
|
-
item: _objectSpread(_objectSpread({}, dataSource), {}, {
|
|
76
|
-
num: 1
|
|
77
|
-
}),
|
|
78
|
-
type: "total",
|
|
79
|
-
isOnlyTotal: true
|
|
80
|
-
})));
|
|
81
|
-
};
|
|
82
|
-
export default MultiDay;
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,56 +0,0 @@
|
|
|
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 dayjs from 'dayjs';
|
|
8
|
-
|
|
9
|
-
// 定义输入数据的接口
|
|
10
|
-
|
|
11
|
-
// 定义输出数据的接口
|
|
12
|
-
|
|
13
|
-
export function formatDateRanges(list) {
|
|
14
|
-
var result = [];
|
|
15
|
-
var currentGroup = null;
|
|
16
|
-
list.forEach(function (item, index) {
|
|
17
|
-
// Convert string dates using dayjs
|
|
18
|
-
var currentStartDate = dayjs(item.start_date);
|
|
19
|
-
var currentEndDate = dayjs(item.end_date);
|
|
20
|
-
var currentTotal = item.total;
|
|
21
|
-
var currentNum = item.num;
|
|
22
|
-
if (!currentGroup) {
|
|
23
|
-
// Start a new group
|
|
24
|
-
currentGroup = _objectSpread(_objectSpread({}, item), {}, {
|
|
25
|
-
start_date: currentStartDate.format('YYYY-MM-DD'),
|
|
26
|
-
end_date: currentEndDate.format('YYYY-MM-DD'),
|
|
27
|
-
total: currentTotal,
|
|
28
|
-
num: currentNum
|
|
29
|
-
});
|
|
30
|
-
} else {
|
|
31
|
-
var prevEndDate = dayjs(currentGroup.end_date);
|
|
32
|
-
|
|
33
|
-
// Check if current item can be merged with current group
|
|
34
|
-
if (currentTotal === currentGroup.total && prevEndDate.isSame(currentStartDate, 'day')) {
|
|
35
|
-
// Update end date and add up num
|
|
36
|
-
currentGroup.end_date = currentEndDate.format('YYYY-MM-DD');
|
|
37
|
-
currentGroup.num += currentNum;
|
|
38
|
-
} else {
|
|
39
|
-
// Push current group and start a new one
|
|
40
|
-
result.push(currentGroup);
|
|
41
|
-
currentGroup = _objectSpread(_objectSpread({}, item), {}, {
|
|
42
|
-
start_date: currentStartDate.format('YYYY-MM-DD'),
|
|
43
|
-
end_date: currentEndDate.format('YYYY-MM-DD'),
|
|
44
|
-
total: currentTotal,
|
|
45
|
-
num: currentNum
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Push the last group
|
|
51
|
-
if (index === list.length - 1 && currentGroup) {
|
|
52
|
-
result.push(currentGroup);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { locales } from '@pisell/utils';
|
|
4
|
-
import { Divider } from 'antd';
|
|
5
|
-
import { PREFIX } from "../../index";
|
|
6
|
-
import "./index.less";
|
|
7
|
-
var Note = function Note(props) {
|
|
8
|
-
var item = props.item,
|
|
9
|
-
type = props.type,
|
|
10
|
-
openNote = props.openNote,
|
|
11
|
-
disabledEdit = props.disabledEdit;
|
|
12
|
-
return item !== null && item !== void 0 && item.note || !disabledEdit ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
13
|
-
style: {
|
|
14
|
-
margin: 0
|
|
15
|
-
}
|
|
16
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: classNames("".concat(PREFIX, "__note-wrap"))
|
|
18
|
-
}, item !== null && item !== void 0 && item.note ? /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: classNames("".concat(PREFIX, "__note-text"))
|
|
20
|
-
}, locales.getText('pisell2.product.card.discount.note'), ": ", item.note) : null, !disabledEdit ? /*#__PURE__*/React.createElement("span", {
|
|
21
|
-
className: "".concat(PREFIX, "__note-btn"),
|
|
22
|
-
onClick: function onClick(e) {
|
|
23
|
-
e.preventDefault();
|
|
24
|
-
e.stopPropagation();
|
|
25
|
-
openNote();
|
|
26
|
-
}
|
|
27
|
-
}, item !== null && item !== void 0 && item.note ? locales.getText('pisell2.product.card.discount.edit.note') : locales.getText('pisell2.product.card.discount.add.note')) : null)) : null;
|
|
28
|
-
};
|
|
29
|
-
export default Note;
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { image as imageAli, formatAmount } from '@pisell/utils';
|
|
4
|
-
import Specs from "../specs";
|
|
5
|
-
import Holders from "../holders";
|
|
6
|
-
import { PREFIX } from "../../index";
|
|
7
|
-
import "./index.less";
|
|
8
|
-
var BasicInfo = function BasicInfo(props) {
|
|
9
|
-
var isShowImage = props.isShowImage,
|
|
10
|
-
_props$dataSource = props.dataSource,
|
|
11
|
-
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource,
|
|
12
|
-
style = props.style,
|
|
13
|
-
isMainProduct = props.isMainProduct,
|
|
14
|
-
type = props.type;
|
|
15
|
-
var image = dataSource.image,
|
|
16
|
-
bundle = dataSource.bundle,
|
|
17
|
-
options = dataSource.options,
|
|
18
|
-
product_option_string = dataSource.product_option_string,
|
|
19
|
-
name = dataSource.name,
|
|
20
|
-
price = dataSource.price,
|
|
21
|
-
symbol = dataSource.symbol,
|
|
22
|
-
_dataSource$total = dataSource.total,
|
|
23
|
-
total = _dataSource$total === void 0 ? 0 : _dataSource$total,
|
|
24
|
-
_dataSource$origin_to = dataSource.origin_total,
|
|
25
|
-
origin_total = _dataSource$origin_to === void 0 ? 0 : _dataSource$origin_to,
|
|
26
|
-
_dataSource$num = dataSource.num,
|
|
27
|
-
num = _dataSource$num === void 0 ? 1 : _dataSource$num,
|
|
28
|
-
holder_id = dataSource.holder_id;
|
|
29
|
-
var renderNumTag = function renderNumTag() {
|
|
30
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: classNames("num-tag", {
|
|
32
|
-
'is-main': isMainProduct
|
|
33
|
-
})
|
|
34
|
-
}, num < 100 ? num : '99+');
|
|
35
|
-
};
|
|
36
|
-
var hasSpecs = (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (options === null || options === void 0 ? void 0 : options.length) || product_option_string;
|
|
37
|
-
var renderImage = function renderImage() {
|
|
38
|
-
if (!isShowImage) return null;
|
|
39
|
-
if (image) {
|
|
40
|
-
return /*#__PURE__*/React.createElement("img", {
|
|
41
|
-
src: imageAli.ali(image, 64),
|
|
42
|
-
className: "product-cover"
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// 如果没有图片,显示文字图片
|
|
47
|
-
var displayText = name ? name.slice(0, 2) : '';
|
|
48
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
49
|
-
className: "product-cover-text"
|
|
50
|
-
}, displayText);
|
|
51
|
-
};
|
|
52
|
-
if (type === 'a5') {
|
|
53
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: "".concat(PREFIX, "__basic-info"),
|
|
55
|
-
style: style || {}
|
|
56
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
style: {
|
|
58
|
-
width: 20
|
|
59
|
-
}
|
|
60
|
-
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
className: "product-info"
|
|
62
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: "product-name"
|
|
64
|
-
}, name), !holder_id || !(holder_id !== null && holder_id !== void 0 && holder_id.length) ? /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "product-price"
|
|
66
|
-
}, formatAmount(price, 2, symbol)) : /*#__PURE__*/React.createElement(Holders, {
|
|
67
|
-
dataSource: dataSource
|
|
68
|
-
})));
|
|
69
|
-
}
|
|
70
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
className: "".concat(PREFIX, "__basic-info"),
|
|
72
|
-
style: style || {}
|
|
73
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
style: {
|
|
75
|
-
width: 20
|
|
76
|
-
}
|
|
77
|
-
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: "product-info"
|
|
79
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: "product-name"
|
|
81
|
-
}, name), hasSpecs ? /*#__PURE__*/React.createElement(Specs, {
|
|
82
|
-
dataSource: dataSource
|
|
83
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
84
|
-
className: "product-price"
|
|
85
|
-
}, formatAmount(price, 2, symbol))), /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
className: "product-amount"
|
|
87
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
className: "total-amont"
|
|
89
|
-
}, formatAmount(total * num, 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /*#__PURE__*/React.createElement("div", {
|
|
90
|
-
className: "origin-amount"
|
|
91
|
-
}, formatAmount(origin_total * num, 2, symbol)) : null));
|
|
92
|
-
};
|
|
93
|
-
export default BasicInfo;
|