@pisell/materials 6.11.107 → 6.11.109
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 +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/Pagination/index.d.ts +0 -1
- package/es/components/PisellTabbar/constants.d.ts +47 -0
- package/es/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
- package/es/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
- package/es/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
- package/es/components/PisellTabbar/types.d.ts +90 -0
- package/es/components/PisellTabbar/utils/index.d.ts +69 -0
- package/es/components/SafeAreaTop/index.d.ts +5 -0
- package/es/components/SafeAreaTop/types.d.ts +9 -0
- package/es/components/appVersionControl/index.d.ts +0 -1
- package/es/components/buttonGroupPreview/index.js +2 -1
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/es/components/filter/components/Dropdown/types.d.ts +15 -0
- package/es/components/filter/components/FilterButton/types.d.ts +29 -0
- package/es/components/filter/types.d.ts +52 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/page/index.d.ts +0 -1
- package/es/components/pisell-config-provider/context.d.ts +22 -0
- package/es/components/pisellAdjustPrice/index.d.ts +0 -1
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +22 -0
- package/es/components/pisellFilter/index.d.ts +0 -1
- package/es/components/pisellFilter/type.d.ts +7 -0
- package/es/components/pisellFind/index.d.ts +34 -12
- package/es/components/pisellFind/index.js +114 -18
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +6 -1
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +6 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +24 -18
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.js +4 -6
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/es/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/es/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/es/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/es/components/pisellInput/index.d.ts +0 -1
- package/es/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +7 -0
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +4 -2
- package/es/components/pisellShellFrame/PisellShellFrame.d.ts +13 -0
- package/es/components/pisellShellFrame/types.d.ts +62 -0
- package/es/components/pisellToast/squareToast/index.d.ts +15 -0
- package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
- package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +3 -14
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +2 -3
- package/es/components/productCard/cartSkuCard/components/Gift/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -11
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +0 -8
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.less +4 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/specs/index.js +5 -1
- package/es/components/productCard/cartSkuCard/components/specs/index.less +0 -24
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +1 -4
- package/es/components/productCard/cartSkuCard/components/weighing/index.less +2 -10
- package/es/components/productCard/cartSkuCard/index.less +0 -2
- package/es/components/productCard/cartSkuCard/locales.d.ts +203 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/Header/EditButton/index.d.ts +0 -1
- package/es/components/productCard/components/Header/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -1
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +3 -1
- package/es/components/productCard/lineItem/BookingLineItem.js +39 -21
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +9 -0
- package/es/components/productCard/lineItem/components/Holders/index.js +74 -0
- package/es/components/productCard/lineItem/components/Holders/index.less +39 -0
- package/es/components/productCard/lineItem/components/TimeRange/index.d.ts +0 -1
- package/es/components/productCard/lineItem/index.d.ts +11 -7
- package/es/components/productCard/lineItem/index.js +89 -27
- package/es/components/productCard/lineItem/index.less +40 -3
- package/es/components/productCard/lineItem/locales.d.ts +23 -0
- package/es/components/productCard/lineItem/types.d.ts +4 -0
- package/es/components/productCard/locales.d.ts +138 -0
- package/es/components/productCard/types.d.ts +1 -0
- package/es/components/select/index.d.ts +9 -0
- package/es/components/select-time/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/locales/en-US.d.ts +565 -0
- package/es/locales/ja.d.ts +533 -0
- package/es/locales/pt.d.ts +533 -0
- package/es/locales/zh-CN.d.ts +560 -0
- package/es/locales/zh-TW.d.ts +560 -0
- package/lib/components/Pagination/index.d.ts +0 -1
- package/lib/components/PisellTabbar/constants.d.ts +47 -0
- package/lib/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
- package/lib/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
- package/lib/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
- package/lib/components/PisellTabbar/types.d.ts +90 -0
- package/lib/components/PisellTabbar/utils/index.d.ts +69 -0
- package/lib/components/SafeAreaTop/index.d.ts +5 -0
- package/lib/components/SafeAreaTop/types.d.ts +9 -0
- package/lib/components/appVersionControl/index.d.ts +0 -1
- package/lib/components/buttonGroupPreview/index.js +2 -1
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/lib/components/filter/components/Dropdown/types.d.ts +15 -0
- package/lib/components/filter/components/FilterButton/types.d.ts +29 -0
- package/lib/components/filter/types.d.ts +52 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/page/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/context.d.ts +22 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -1
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
- package/lib/components/pisellFilter/index.d.ts +0 -1
- package/lib/components/pisellFilter/type.d.ts +7 -0
- package/lib/components/pisellFind/index.d.ts +34 -12
- package/lib/components/pisellFind/index.js +80 -5
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +6 -1
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +6 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +36 -17
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.js +3 -5
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.d.ts +6 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/lib/components/pisellHierarchicalSummaryList/components/Row.d.ts +35 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/lib/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/lib/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/lib/components/pisellInput/index.d.ts +0 -1
- package/lib/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +7 -0
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +1 -1
- package/lib/components/pisellShellFrame/PisellShellFrame.d.ts +13 -0
- package/lib/components/pisellShellFrame/types.d.ts +62 -0
- package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
- package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
- package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -11
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +2 -3
- package/lib/components/productCard/cartSkuCard/components/Gift/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +10 -22
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +0 -8
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +4 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +11 -1
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +0 -24
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +4 -6
- package/lib/components/productCard/cartSkuCard/components/weighing/index.less +2 -10
- package/lib/components/productCard/cartSkuCard/index.less +0 -2
- package/lib/components/productCard/cartSkuCard/locales.d.ts +203 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/EditButton/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -1
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +3 -1
- package/lib/components/productCard/lineItem/BookingLineItem.js +40 -48
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +9 -0
- package/lib/components/productCard/lineItem/components/Holders/index.js +83 -0
- package/lib/components/productCard/lineItem/components/Holders/index.less +39 -0
- package/lib/components/productCard/lineItem/components/TimeRange/index.d.ts +0 -1
- package/lib/components/productCard/lineItem/index.d.ts +11 -7
- package/lib/components/productCard/lineItem/index.js +63 -21
- package/lib/components/productCard/lineItem/index.less +40 -3
- package/lib/components/productCard/lineItem/locales.d.ts +23 -0
- package/lib/components/productCard/lineItem/types.d.ts +4 -0
- package/lib/components/productCard/locales.d.ts +138 -0
- package/lib/components/productCard/types.d.ts +1 -0
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/select-time/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/locales/en-US.d.ts +565 -0
- package/lib/locales/ja.d.ts +533 -0
- package/lib/locales/pt.d.ts +533 -0
- package/lib/locales/zh-CN.d.ts +560 -0
- package/lib/locales/zh-TW.d.ts +560 -0
- package/lowcode/pisell-find/meta.ts +19 -0
- package/package.json +1 -1
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +0 -7
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/es/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/es/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/es/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/es/components/PisellScrollView/types.d.ts +0 -203
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -23
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/es/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/es/components/pisellGridPro/index.d.ts +0 -4
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +0 -290
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +0 -7
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +0 -26
- package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +0 -21
- package/lib/components/PisellCards/components/TextCard/types.d.ts +0 -270
- package/lib/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/lib/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/lib/components/PisellScrollView/types.d.ts +0 -203
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -23
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/lib/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/lib/components/pisellGridPro/index.d.ts +0 -4
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { locales } from '@pisell/utils';
|
|
3
|
+
import Iconfont from "../../../../iconfont";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var PREFIX = 'pisell-line-item';
|
|
6
|
+
var holderIconMap = {
|
|
7
|
+
form: 'pisell2-file-05',
|
|
8
|
+
minors: 'pisell2-user-check-01',
|
|
9
|
+
waiver: 'pisell2-file-lock-03'
|
|
10
|
+
};
|
|
11
|
+
var isEmptyHolderId = function isEmptyHolderId(value) {
|
|
12
|
+
if (Array.isArray(value)) return value.length === 0;
|
|
13
|
+
return value === undefined || value === null || value === '';
|
|
14
|
+
};
|
|
15
|
+
var normalizeHolderIds = function normalizeHolderIds(value) {
|
|
16
|
+
if (isEmptyHolderId(value)) return [];
|
|
17
|
+
return Array.isArray(value) ? value : [value];
|
|
18
|
+
};
|
|
19
|
+
var pickHolderId = function pickHolderId(dataSource) {
|
|
20
|
+
var _ref, _ref2, _dataSource$holder_id, _dataSource$metadata, _dataSource$_extend, _dataSource$_extend2;
|
|
21
|
+
return (_ref = (_ref2 = (_dataSource$holder_id = dataSource === null || dataSource === void 0 ? void 0 : dataSource.holder_id) !== null && _dataSource$holder_id !== void 0 ? _dataSource$holder_id : dataSource === null || dataSource === void 0 || (_dataSource$metadata = dataSource.metadata) === null || _dataSource$metadata === void 0 ? void 0 : _dataSource$metadata.holder_id) !== null && _ref2 !== void 0 ? _ref2 : dataSource === null || dataSource === void 0 || (_dataSource$_extend = dataSource._extend) === null || _dataSource$_extend === void 0 || (_dataSource$_extend = _dataSource$_extend.product) === null || _dataSource$_extend === void 0 || (_dataSource$_extend = _dataSource$_extend.metadata) === null || _dataSource$_extend === void 0 ? void 0 : _dataSource$_extend.holder_id) !== null && _ref !== void 0 ? _ref : dataSource === null || dataSource === void 0 || (_dataSource$_extend2 = dataSource._extend) === null || _dataSource$_extend2 === void 0 || (_dataSource$_extend2 = _dataSource$_extend2.product) === null || _dataSource$_extend2 === void 0 || (_dataSource$_extend2 = _dataSource$_extend2._extend) === null || _dataSource$_extend2 === void 0 ? void 0 : _dataSource$_extend2.holder_id;
|
|
22
|
+
};
|
|
23
|
+
var pickHolderMaxCount = function pickHolderMaxCount(dataSource, holderIds) {
|
|
24
|
+
var _ref3, _ref4, _ref5, _ref6, _ref7, _dataSource$holderMax, _dataSource$_extend3, _dataSource$_extend4, _dataSource$_extend5;
|
|
25
|
+
var count = ((_ref3 = (_ref4 = (_ref5 = (_ref6 = (_ref7 = (_dataSource$holderMax = dataSource === null || dataSource === void 0 ? void 0 : dataSource.holderMaxCount) !== null && _dataSource$holderMax !== void 0 ? _dataSource$holderMax : dataSource === null || dataSource === void 0 ? void 0 : dataSource.holder_max_count) !== null && _ref7 !== void 0 ? _ref7 : dataSource === null || dataSource === void 0 ? void 0 : dataSource.number) !== null && _ref6 !== void 0 ? _ref6 : dataSource === null || dataSource === void 0 || (_dataSource$_extend3 = dataSource._extend) === null || _dataSource$_extend3 === void 0 || (_dataSource$_extend3 = _dataSource$_extend3.product) === null || _dataSource$_extend3 === void 0 ? void 0 : _dataSource$_extend3.num) !== null && _ref5 !== void 0 ? _ref5 : dataSource === null || dataSource === void 0 || (_dataSource$_extend4 = dataSource._extend) === null || _dataSource$_extend4 === void 0 || (_dataSource$_extend4 = _dataSource$_extend4.product) === null || _dataSource$_extend4 === void 0 ? void 0 : _dataSource$_extend4.product_quantity) !== null && _ref4 !== void 0 ? _ref4 : dataSource === null || dataSource === void 0 || (_dataSource$_extend5 = dataSource._extend) === null || _dataSource$_extend5 === void 0 || (_dataSource$_extend5 = _dataSource$_extend5.product) === null || _dataSource$_extend5 === void 0 || (_dataSource$_extend5 = _dataSource$_extend5._extend) === null || _dataSource$_extend5 === void 0 ? void 0 : _dataSource$_extend5.quantity) !== null && _ref3 !== void 0 ? _ref3 : holderIds.length) || 1;
|
|
26
|
+
return Number(count) || 1;
|
|
27
|
+
};
|
|
28
|
+
var LineItemHolders = function LineItemHolders(props) {
|
|
29
|
+
var _props$dataSource = props.dataSource,
|
|
30
|
+
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource,
|
|
31
|
+
_props$holderOptions = props.holderOptions,
|
|
32
|
+
holderOptions = _props$holderOptions === void 0 ? [] : _props$holderOptions,
|
|
33
|
+
isFormSubject = props.isFormSubject;
|
|
34
|
+
var holderIds = useMemo(function () {
|
|
35
|
+
return normalizeHolderIds(pickHolderId(dataSource));
|
|
36
|
+
}, [dataSource]);
|
|
37
|
+
var holderMaxCount = pickHolderMaxCount(dataSource, holderIds);
|
|
38
|
+
var showUnassigned = Boolean(isFormSubject || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.isFormSubject));
|
|
39
|
+
var holderType = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.holderType) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.holder_type) || 'minors';
|
|
40
|
+
var holderIcon = holderIconMap[holderType] || holderIconMap.minors;
|
|
41
|
+
if (!holderIds.length) {
|
|
42
|
+
if (!showUnassigned) return null;
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "".concat(PREFIX, "__holders")
|
|
45
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "holder-item unassigned"
|
|
47
|
+
}, holderMaxCount > 1 ? /*#__PURE__*/React.createElement("span", null, holderMaxCount, "/", holderMaxCount, ' ') : null, /*#__PURE__*/React.createElement("span", {
|
|
48
|
+
className: "holder-label"
|
|
49
|
+
}, locales.getText('pisell2.cart.sku-card.unassigned'))));
|
|
50
|
+
}
|
|
51
|
+
var renderHolder = function renderHolder(id, index) {
|
|
52
|
+
var _holder$label;
|
|
53
|
+
var holder = holderOptions.find(function (item) {
|
|
54
|
+
return String(item.id) === String(id);
|
|
55
|
+
});
|
|
56
|
+
var label = (_holder$label = holder === null || holder === void 0 ? void 0 : holder.label) !== null && _holder$label !== void 0 ? _holder$label : String(id);
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "holder-item",
|
|
59
|
+
key: "".concat(id, "-").concat(index)
|
|
60
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
61
|
+
className: "holder-icon"
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
63
|
+
type: holderIcon
|
|
64
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
65
|
+
className: "holder-label"
|
|
66
|
+
}, label));
|
|
67
|
+
};
|
|
68
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: "".concat(PREFIX, "__holders")
|
|
70
|
+
}, holderIds.map(function (id, index) {
|
|
71
|
+
return renderHolder(id, index);
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
export default LineItemHolders;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.pisell-line-item__holders {
|
|
2
|
+
user-select: none;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
|
|
7
|
+
.holder-item {
|
|
8
|
+
min-width: 30px;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
|
|
14
|
+
.holder-icon {
|
|
15
|
+
margin-right: 2px;
|
|
16
|
+
color: #7f56da;
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.holder-label {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
color: #667085;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 20px;
|
|
27
|
+
text-overflow: ellipsis;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.unassigned {
|
|
33
|
+
color: red;
|
|
34
|
+
|
|
35
|
+
.holder-label {
|
|
36
|
+
color: red;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import type { ProductCardTypes } from '../types';
|
|
2
|
-
import type { itemType, LineItemStatusOption, LineItemType } from './types';
|
|
2
|
+
import type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
|
|
3
3
|
import './index.less';
|
|
4
4
|
export declare const PREFIX = "pisell-line-item";
|
|
5
|
-
export type { itemType, LineItemStatusOption, LineItemType } from './types';
|
|
5
|
+
export type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType, } from './types';
|
|
6
6
|
declare type LocalizedText = string | Record<string, unknown> | null | undefined;
|
|
7
7
|
export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
8
8
|
dataSource: any;
|
|
9
9
|
itemType?: itemType;
|
|
10
10
|
type?: LineItemType;
|
|
11
|
+
isShowBookingHeader: boolean;
|
|
11
12
|
rightActions?: any[];
|
|
12
13
|
escapeDom?: string;
|
|
13
14
|
statusOptions?: LineItemStatusOption[];
|
|
14
15
|
statusLoading?: boolean;
|
|
15
16
|
statusDisabled?: boolean;
|
|
16
17
|
isShowRelatedProduct?: boolean;
|
|
18
|
+
holderOptions?: LineItemHolderOption[];
|
|
17
19
|
onBookingStatusChange?: (status: string, item: any) => void;
|
|
18
20
|
}
|
|
19
21
|
export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
|
|
@@ -30,8 +32,8 @@ export declare const convertProductToLineItemProduct: (product: any, translation
|
|
|
30
32
|
quantity: any;
|
|
31
33
|
price: any;
|
|
32
34
|
total: any;
|
|
33
|
-
origin_total:
|
|
34
|
-
original_total:
|
|
35
|
+
origin_total: string | number | undefined;
|
|
36
|
+
original_total: string | number | undefined;
|
|
35
37
|
source_product_price: any;
|
|
36
38
|
selling_price: any;
|
|
37
39
|
payment_price: any;
|
|
@@ -41,23 +43,25 @@ export declare const convertProductToLineItemProduct: (product: any, translation
|
|
|
41
43
|
product_sku: any;
|
|
42
44
|
product_bundle: any;
|
|
43
45
|
bundle: any;
|
|
44
|
-
product_option_string:
|
|
46
|
+
product_option_string: any;
|
|
47
|
+
options: any[];
|
|
45
48
|
discount_list: any;
|
|
46
49
|
promotions: any;
|
|
50
|
+
discount_reason: any;
|
|
47
51
|
isGift: boolean;
|
|
48
52
|
giftData: any;
|
|
49
53
|
_origin: any;
|
|
50
54
|
_extend: {
|
|
51
55
|
other: {
|
|
52
56
|
product_id: any;
|
|
53
|
-
option: any;
|
|
57
|
+
option: any[];
|
|
54
58
|
bundle: any;
|
|
55
59
|
product_variant_id: any;
|
|
56
60
|
quantity: any;
|
|
57
61
|
};
|
|
58
62
|
note: any;
|
|
59
63
|
total: any;
|
|
60
|
-
origin_total:
|
|
64
|
+
origin_total: string | number | undefined;
|
|
61
65
|
payment_price: any;
|
|
62
66
|
};
|
|
63
67
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["dataSource", "itemType", "type", "rightActions", "escapeDom", "isShowImage", "isShowDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "onBookingStatusChange", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
|
|
1
|
+
var _excluded = ["dataSource", "itemType", "type", "isShowBookingHeader", "rightActions", "escapeDom", "isShowImage", "isShowDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
|
|
2
2
|
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); }
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
@@ -27,10 +27,32 @@ var translateText = function translateText(text, translationOriginal) {
|
|
|
27
27
|
if (!text) return '';
|
|
28
28
|
return translationOriginal(text);
|
|
29
29
|
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 解析行级划线原价(composite 单价)。
|
|
33
|
+
* SalesSdk/OS 行数据用 original_price;legacy cacheItem 用 original_total / _extend.origin_total。
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* resolveLineOriginTotal({ original_price: '8.00', selling_price: '5.00' }); // '8.00'
|
|
37
|
+
*/
|
|
38
|
+
var resolveLineOriginTotal = function resolveLineOriginTotal(product) {
|
|
39
|
+
var _product$_extend, _product$metadata;
|
|
40
|
+
var candidates = [product === null || product === void 0 ? void 0 : product.original_total, product === null || product === void 0 ? void 0 : product.original_price, product === null || product === void 0 || (_product$_extend = product._extend) === null || _product$_extend === void 0 ? void 0 : _product$_extend.origin_total, product === null || product === void 0 || (_product$metadata = product.metadata) === null || _product$metadata === void 0 || (_product$metadata = _product$metadata.origin) === null || _product$metadata === void 0 || (_product$metadata = _product$metadata._extend) === null || _product$metadata === void 0 ? void 0 : _product$metadata.origin_total];
|
|
41
|
+
for (var _i = 0, _candidates = candidates; _i < _candidates.length; _i++) {
|
|
42
|
+
var candidate = _candidates[_i];
|
|
43
|
+
if (candidate !== undefined && candidate !== null && candidate !== '') {
|
|
44
|
+
return candidate;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
};
|
|
30
49
|
var convertBundleOption = function convertBundleOption(option, translationOriginal) {
|
|
50
|
+
var _option$add_price, _ref, _option$num;
|
|
31
51
|
return _objectSpread(_objectSpread({}, option), {}, {
|
|
32
52
|
id: option.option_group_item_id,
|
|
33
|
-
name: translateText(option.name, translationOriginal)
|
|
53
|
+
name: translateText(option.name, translationOriginal),
|
|
54
|
+
price: (_option$add_price = option.add_price) !== null && _option$add_price !== void 0 ? _option$add_price : option.price,
|
|
55
|
+
num: (_ref = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref !== void 0 ? _ref : 1
|
|
34
56
|
});
|
|
35
57
|
};
|
|
36
58
|
var convertBundle = function convertBundle(bundle, translationOriginal) {
|
|
@@ -44,15 +66,8 @@ var convertBundle = function convertBundle(bundle, translationOriginal) {
|
|
|
44
66
|
product_id: bundle.bundle_product_id,
|
|
45
67
|
_bundle_product_id: bundle.bundle_product_id,
|
|
46
68
|
product_variant_id: bundle.bundle_variant_id,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
bundle_title: title,
|
|
50
|
-
num: bundle.num,
|
|
51
|
-
quantity: bundle.num,
|
|
52
|
-
price: price,
|
|
53
|
-
total: bundle.bundle_payment_price,
|
|
54
|
-
origin_total: bundle.bundle_selling_price,
|
|
55
|
-
original_total: bundle.bundle_selling_price,
|
|
69
|
+
total: bundle.bundle_selling_price,
|
|
70
|
+
origin_total: bundle.original_total,
|
|
56
71
|
custom_price: bundle.custom_price,
|
|
57
72
|
custom_price_type: bundle.custom_price_type,
|
|
58
73
|
custom_price_type_ext: bundle.price_type_ext,
|
|
@@ -61,14 +76,51 @@ var convertBundle = function convertBundle(bundle, translationOriginal) {
|
|
|
61
76
|
_origin: bundle
|
|
62
77
|
});
|
|
63
78
|
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 读取行级规格:优先 product_sku.option,回落 legacy product_option_item。
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* resolveLineItemOptions({ product_sku: { option: [{ name: 'Large' }] } });
|
|
85
|
+
*/
|
|
86
|
+
var resolveLineItemOptions = function resolveLineItemOptions(product) {
|
|
87
|
+
var _product$product_sku;
|
|
88
|
+
var skuOptions = product === null || product === void 0 || (_product$product_sku = product.product_sku) === null || _product$product_sku === void 0 ? void 0 : _product$product_sku.option;
|
|
89
|
+
if (Array.isArray(skuOptions) && skuOptions.length > 0) {
|
|
90
|
+
return skuOptions;
|
|
91
|
+
}
|
|
92
|
+
if (Array.isArray(product === null || product === void 0 ? void 0 : product.product_option_item)) {
|
|
93
|
+
return product.product_option_item;
|
|
94
|
+
}
|
|
95
|
+
return [];
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 将 OS 规格项映射为 CartSkuCard 可直接渲染的 options。
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* mapLineItemOptions([{ name: 'Large', add_price: 1, num: 2 }], translateText);
|
|
103
|
+
*/
|
|
104
|
+
var mapLineItemOptions = function mapLineItemOptions(options, translationOriginal) {
|
|
105
|
+
return options.map(function (option) {
|
|
106
|
+
var _option$name, _option$add_price2, _ref2, _option$num2;
|
|
107
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
108
|
+
name: translateText((_option$name = option.name) !== null && _option$name !== void 0 ? _option$name : option.title, translationOriginal),
|
|
109
|
+
price: (_option$add_price2 = option.add_price) !== null && _option$add_price2 !== void 0 ? _option$add_price2 : option.price,
|
|
110
|
+
num: (_ref2 = (_option$num2 = option.num) !== null && _option$num2 !== void 0 ? _option$num2 : option.quantity) !== null && _ref2 !== void 0 ? _ref2 : 1
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
};
|
|
64
114
|
export var convertProductToLineItemProduct = function convertProductToLineItemProduct(product, translationOriginal, symbol) {
|
|
65
|
-
var _product$
|
|
115
|
+
var _product$metadata2, _ref3, _product$num, _ref4, _product$num2, _product$metadata3, _product$metadata4, _product$discount_lis, _product$discount_lis2, _product$metadata5, _product$metadata6, _ref5, _product$num3;
|
|
66
116
|
var title = translateText(product.product_title || product.title, translationOriginal);
|
|
67
117
|
var bundle = (product.product_bundle || []).map(function (bundleItem) {
|
|
68
118
|
return convertBundle(bundleItem, translationOriginal);
|
|
69
119
|
});
|
|
70
|
-
|
|
71
|
-
|
|
120
|
+
var lineOriginTotal = resolveLineOriginTotal(product);
|
|
121
|
+
var lineOptions = mapLineItemOptions(resolveLineItemOptions(product), translationOriginal);
|
|
122
|
+
var mapped = {
|
|
123
|
+
_id: ((_product$metadata2 = product.metadata) === null || _product$metadata2 === void 0 ? void 0 : _product$metadata2.unique_identification_number) || product.order_detail_id || product.product_id,
|
|
72
124
|
id: product.product_id,
|
|
73
125
|
product_id: product.product_id,
|
|
74
126
|
product_variant_id: product.product_variant_id,
|
|
@@ -77,13 +129,13 @@ export var convertProductToLineItemProduct = function convertProductToLineItemPr
|
|
|
77
129
|
name: title,
|
|
78
130
|
cover: product.cover,
|
|
79
131
|
image: product.cover,
|
|
80
|
-
num: (
|
|
81
|
-
quantity: (
|
|
82
|
-
price: (_product$
|
|
83
|
-
total:
|
|
84
|
-
origin_total:
|
|
85
|
-
original_total:
|
|
86
|
-
source_product_price: (_product$
|
|
132
|
+
num: (_ref3 = (_product$num = product.num) !== null && _product$num !== void 0 ? _product$num : product.product_quantity) !== null && _ref3 !== void 0 ? _ref3 : 1,
|
|
133
|
+
quantity: (_ref4 = (_product$num2 = product.num) !== null && _product$num2 !== void 0 ? _product$num2 : product.product_quantity) !== null && _ref4 !== void 0 ? _ref4 : 1,
|
|
134
|
+
price: (_product$metadata3 = product.metadata) === null || _product$metadata3 === void 0 ? void 0 : _product$metadata3.source_product_price,
|
|
135
|
+
total: product.selling_price,
|
|
136
|
+
origin_total: lineOriginTotal,
|
|
137
|
+
original_total: lineOriginTotal,
|
|
138
|
+
source_product_price: (_product$metadata4 = product.metadata) === null || _product$metadata4 === void 0 ? void 0 : _product$metadata4.source_product_price,
|
|
87
139
|
selling_price: product.selling_price,
|
|
88
140
|
payment_price: product.payment_price,
|
|
89
141
|
tax_fee: product.tax_fee,
|
|
@@ -92,26 +144,32 @@ export var convertProductToLineItemProduct = function convertProductToLineItemPr
|
|
|
92
144
|
product_sku: product.product_sku,
|
|
93
145
|
product_bundle: bundle,
|
|
94
146
|
bundle: bundle,
|
|
95
|
-
product_option_string: product.
|
|
147
|
+
product_option_string: product.product_option_string,
|
|
148
|
+
options: lineOptions,
|
|
96
149
|
discount_list: product.discount_list,
|
|
97
150
|
promotions: product.promotions,
|
|
98
|
-
|
|
151
|
+
discount_reason: (_product$discount_lis = (_product$discount_lis2 = product.discount_list) === null || _product$discount_lis2 === void 0 || (_product$discount_lis2 = _product$discount_lis2.find(function (d) {
|
|
152
|
+
return (d === null || d === void 0 ? void 0 : d.type) === 'product';
|
|
153
|
+
})) === null || _product$discount_lis2 === void 0 || (_product$discount_lis2 = _product$discount_lis2.discount) === null || _product$discount_lis2 === void 0 ? void 0 : _product$discount_lis2.message) !== null && _product$discount_lis !== void 0 ? _product$discount_lis : (_product$metadata5 = product.metadata) === null || _product$metadata5 === void 0 ? void 0 : _product$metadata5.product_discount_reason,
|
|
154
|
+
// 促销赠品走 metadata._giftInfo;礼品卡走 gift_card(对齐 legacy formatProducts isGift)
|
|
155
|
+
isGift: Boolean(product.gift_card || product.isGift || product._isGiftPromotion || ((_product$metadata6 = product.metadata) === null || _product$metadata6 === void 0 ? void 0 : _product$metadata6._giftInfo) || product._giftInfo),
|
|
99
156
|
giftData: product.giftData,
|
|
100
157
|
_origin: product,
|
|
101
158
|
_extend: {
|
|
102
159
|
other: {
|
|
103
160
|
product_id: product.product_id,
|
|
104
|
-
option:
|
|
161
|
+
option: lineOptions,
|
|
105
162
|
bundle: product.product_bundle,
|
|
106
163
|
product_variant_id: product.product_variant_id,
|
|
107
|
-
quantity: (
|
|
164
|
+
quantity: (_ref5 = (_product$num3 = product.num) !== null && _product$num3 !== void 0 ? _product$num3 : product.product_quantity) !== null && _ref5 !== void 0 ? _ref5 : 1
|
|
108
165
|
},
|
|
109
166
|
note: product.note,
|
|
110
|
-
total: product.
|
|
111
|
-
origin_total:
|
|
167
|
+
total: product.selling_price,
|
|
168
|
+
origin_total: lineOriginTotal,
|
|
112
169
|
payment_price: product.payment_price
|
|
113
170
|
}
|
|
114
171
|
};
|
|
172
|
+
return mapped;
|
|
115
173
|
};
|
|
116
174
|
var LineItem = function LineItem(props) {
|
|
117
175
|
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _dataSource$_extend2;
|
|
@@ -120,6 +178,7 @@ var LineItem = function LineItem(props) {
|
|
|
120
178
|
itemType = props.itemType,
|
|
121
179
|
_props$type = props.type,
|
|
122
180
|
type = _props$type === void 0 ? 'a9' : _props$type,
|
|
181
|
+
isShowBookingHeader = props.isShowBookingHeader,
|
|
123
182
|
_props$rightActions = props.rightActions,
|
|
124
183
|
rightActions = _props$rightActions === void 0 ? [] : _props$rightActions,
|
|
125
184
|
escapeDom = props.escapeDom,
|
|
@@ -143,6 +202,7 @@ var LineItem = function LineItem(props) {
|
|
|
143
202
|
statusDisabled = _props$statusDisabled === void 0 ? false : _props$statusDisabled,
|
|
144
203
|
_props$isShowRelatedP = props.isShowRelatedProduct,
|
|
145
204
|
isShowRelatedProduct = _props$isShowRelatedP === void 0 ? true : _props$isShowRelatedP,
|
|
205
|
+
holderOptions = props.holderOptions,
|
|
146
206
|
onBookingStatusChange = props.onBookingStatusChange,
|
|
147
207
|
onAction = props.onAction,
|
|
148
208
|
onDelete = props.onDelete,
|
|
@@ -190,6 +250,7 @@ var LineItem = function LineItem(props) {
|
|
|
190
250
|
dataSource: dataSource,
|
|
191
251
|
type: type,
|
|
192
252
|
cartSkuType: type,
|
|
253
|
+
isShowBookingHeader: isShowBookingHeader,
|
|
193
254
|
relatedProductDataSource: relatedProductDataSource,
|
|
194
255
|
rightActions: rightActions,
|
|
195
256
|
escapeDom: escapeDom,
|
|
@@ -203,6 +264,7 @@ var LineItem = function LineItem(props) {
|
|
|
203
264
|
statusLoading: statusLoading,
|
|
204
265
|
statusDisabled: statusDisabled,
|
|
205
266
|
isShowRelatedProduct: isShowRelatedProduct,
|
|
267
|
+
holderOptions: holderOptions,
|
|
206
268
|
onBookingStatusChange: onBookingStatusChange,
|
|
207
269
|
onAction: onAction,
|
|
208
270
|
onDelete: onDelete,
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
&__delete-btn {
|
|
19
19
|
width: 34px;
|
|
20
20
|
height: 34px;
|
|
21
|
-
border: 1px solid
|
|
21
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
22
22
|
border-radius: 8px;
|
|
23
|
-
background:
|
|
24
|
-
color: #
|
|
23
|
+
background: var(--Gray-100, #f2f4f7);
|
|
24
|
+
color: var(--Gray-500, #667085);
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
padding: 0;
|
|
27
27
|
display: inline-flex;
|
|
@@ -33,6 +33,21 @@
|
|
|
33
33
|
color: currentColor;
|
|
34
34
|
font-size: 20px;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
&--inline {
|
|
38
|
+
width: auto;
|
|
39
|
+
height: auto;
|
|
40
|
+
border: none;
|
|
41
|
+
border-radius: 0;
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: #667085;
|
|
44
|
+
padding: 10px;
|
|
45
|
+
|
|
46
|
+
> span {
|
|
47
|
+
color: currentColor;
|
|
48
|
+
font-size: 20px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
36
51
|
}
|
|
37
52
|
|
|
38
53
|
&__swipe-delete {
|
|
@@ -148,6 +163,28 @@
|
|
|
148
163
|
padding: 8px;
|
|
149
164
|
}
|
|
150
165
|
|
|
166
|
+
&__booking-detail--with-delete {
|
|
167
|
+
position: relative;
|
|
168
|
+
|
|
169
|
+
.pisell-line-item__booking-detail-content {
|
|
170
|
+
padding-right: 40px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.pisell-line-item__delete-btn--inline {
|
|
174
|
+
position: absolute;
|
|
175
|
+
top: 0;
|
|
176
|
+
right: 0;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&__booking-detail-content {
|
|
181
|
+
min-width: 0;
|
|
182
|
+
flex: 1;
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
gap: 4px;
|
|
186
|
+
}
|
|
187
|
+
|
|
151
188
|
&__booking-field {
|
|
152
189
|
min-width: 0;
|
|
153
190
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.line-item.resource': string;
|
|
4
|
+
'pisell2.line-item.time': string;
|
|
5
|
+
};
|
|
6
|
+
'zh-CN': {
|
|
7
|
+
'pisell2.line-item.resource': string;
|
|
8
|
+
'pisell2.line-item.time': string;
|
|
9
|
+
};
|
|
10
|
+
'zh-HK': {
|
|
11
|
+
'pisell2.line-item.resource': string;
|
|
12
|
+
'pisell2.line-item.time': string;
|
|
13
|
+
};
|
|
14
|
+
ja: {
|
|
15
|
+
'pisell2.line-item.resource': string;
|
|
16
|
+
'pisell2.line-item.time': string;
|
|
17
|
+
};
|
|
18
|
+
pt: {
|
|
19
|
+
'pisell2.line-item.resource': string;
|
|
20
|
+
'pisell2.line-item.time': string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
4
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
5
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
6
|
+
'pisell2.product.card.discount.reason': string;
|
|
7
|
+
'pisell2.product.card.discount.note': string;
|
|
8
|
+
'pisell2.product.card.edit': string;
|
|
9
|
+
'pisell2.product.card.discount.add.note': string;
|
|
10
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
11
|
+
'pisell2.product.card.confirm': string;
|
|
12
|
+
'pisell2.product.card.cancel': string;
|
|
13
|
+
'pisell2.product.card.note.pla': string;
|
|
14
|
+
'pisell2.product.card.items.package': string;
|
|
15
|
+
'pisell2.product.card.view-all': string;
|
|
16
|
+
'pisell2.product.card.view-less': string;
|
|
17
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
18
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
19
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
20
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
21
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
22
|
+
'pisell2.product.card.sales': string;
|
|
23
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
24
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
25
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
26
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
27
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
28
|
+
};
|
|
29
|
+
'zh-CN': {
|
|
30
|
+
'pisell2.product.card.edit': string;
|
|
31
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
32
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
33
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
34
|
+
'pisell2.product.card.discount.reason': string;
|
|
35
|
+
'pisell2.product.card.discount.note': string;
|
|
36
|
+
'pisell2.product.card.discount.add.note': string;
|
|
37
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
38
|
+
'pisell2.product.card.confirm': string;
|
|
39
|
+
'pisell2.product.card.cancel': string;
|
|
40
|
+
'pisell2.product.card.note.pla': string;
|
|
41
|
+
'pisell2.product.card.items.package': string;
|
|
42
|
+
'pisell2.product.card.view-all': string;
|
|
43
|
+
'pisell2.product.card.view-less': string;
|
|
44
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
45
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
46
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
47
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
48
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
49
|
+
'pisell2.product.card.sales': string;
|
|
50
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
51
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
52
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
53
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
54
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
55
|
+
};
|
|
56
|
+
'zh-HK': {
|
|
57
|
+
'pisell2.product.card.edit': string;
|
|
58
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
59
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
60
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
61
|
+
'pisell2.product.card.discount.reason': string;
|
|
62
|
+
'pisell2.product.card.discount.note': string;
|
|
63
|
+
'pisell2.product.card.discount.add.note': string;
|
|
64
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
65
|
+
'pisell2.product.card.confirm': string;
|
|
66
|
+
'pisell2.product.card.cancel': string;
|
|
67
|
+
'pisell2.product.card.note.pla': string;
|
|
68
|
+
'pisell2.product.card.items.package': string;
|
|
69
|
+
'pisell2.product.card.view-all': string;
|
|
70
|
+
'pisell2.product.card.view-less': string;
|
|
71
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
72
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
73
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
74
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
75
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
76
|
+
'pisell2.product.card.sales': string;
|
|
77
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
78
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
79
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
80
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
81
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
82
|
+
};
|
|
83
|
+
ja: {
|
|
84
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
85
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
86
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
87
|
+
'pisell2.product.card.discount.reason': string;
|
|
88
|
+
'pisell2.product.card.discount.note': string;
|
|
89
|
+
'pisell2.product.card.edit': string;
|
|
90
|
+
'pisell2.product.card.discount.add.note': string;
|
|
91
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
92
|
+
'pisell2.product.card.confirm': string;
|
|
93
|
+
'pisell2.product.card.cancel': string;
|
|
94
|
+
'pisell2.product.card.note.pla': string;
|
|
95
|
+
'pisell2.product.card.items.package': string;
|
|
96
|
+
'pisell2.product.card.view-all': string;
|
|
97
|
+
'pisell2.product.card.view-less': string;
|
|
98
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
99
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
100
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
101
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
102
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
103
|
+
'pisell2.product.card.sales': string;
|
|
104
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
105
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
106
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
107
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
108
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
109
|
+
};
|
|
110
|
+
pt: {
|
|
111
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
112
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
113
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
114
|
+
'pisell2.product.card.discount.reason': string;
|
|
115
|
+
'pisell2.product.card.discount.note': string;
|
|
116
|
+
'pisell2.product.card.edit': string;
|
|
117
|
+
'pisell2.product.card.discount.add.note': string;
|
|
118
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
119
|
+
'pisell2.product.card.confirm': string;
|
|
120
|
+
'pisell2.product.card.cancel': string;
|
|
121
|
+
'pisell2.product.card.note.pla': string;
|
|
122
|
+
'pisell2.product.card.items.package': string;
|
|
123
|
+
'pisell2.product.card.view-all': string;
|
|
124
|
+
'pisell2.product.card.view-less': string;
|
|
125
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
126
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
127
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
128
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
129
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
130
|
+
'pisell2.product.card.sales': string;
|
|
131
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
132
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
133
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
134
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
135
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Select as OriginalSelect } from 'antd';
|
|
3
|
+
import type { SelectProps } from 'antd';
|
|
4
|
+
import './index.less';
|
|
5
|
+
interface CompoundedComponent extends React.ForwardRefExoticComponent<SelectProps> {
|
|
6
|
+
Option: typeof OriginalSelect.Option;
|
|
7
|
+
}
|
|
8
|
+
declare const Select: CompoundedComponent;
|
|
9
|
+
export default Select;
|