@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,248 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
export declare type PisellHierarchicalSummaryListKey = React.Key;
|
|
4
|
+
export interface PisellHierarchicalSummaryListItem {
|
|
5
|
+
/**
|
|
6
|
+
* 行标题。最小字段(必填)
|
|
7
|
+
*/
|
|
8
|
+
label: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* 行数值。允许 ReactNode(string/number/组合展示)。
|
|
11
|
+
* 若不传且开启聚合,可能由 children 聚合得到。
|
|
12
|
+
*/
|
|
13
|
+
value?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* 子级数据(无限层级递归)
|
|
16
|
+
*/
|
|
17
|
+
children?: PisellHierarchicalSummaryListItem[];
|
|
18
|
+
/**
|
|
19
|
+
* 可选:稳定 key(推荐传入以保证展开态稳定)。
|
|
20
|
+
* 不传时组件会基于层级路径生成 key。
|
|
21
|
+
*/
|
|
22
|
+
key?: PisellHierarchicalSummaryListKey;
|
|
23
|
+
/**
|
|
24
|
+
* 可选:是否隐藏该项
|
|
25
|
+
*/
|
|
26
|
+
hidden?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 可选:排序权重,值越小越靠前
|
|
29
|
+
*/
|
|
30
|
+
order?: number;
|
|
31
|
+
/**
|
|
32
|
+
* 可选:条目数提示(如 "N items" / "N 条"),允许 ReactNode
|
|
33
|
+
*/
|
|
34
|
+
itemsCount?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* 可选:信息提示 tooltip 内容(hover 触达)
|
|
37
|
+
*/
|
|
38
|
+
infoTooltip?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* 可选:右侧 value 后附加轻量操作(tag/pill/button 等)
|
|
41
|
+
*/
|
|
42
|
+
extra?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* 可选:覆盖当前行样式
|
|
45
|
+
*/
|
|
46
|
+
rowStyle?: CSSProperties;
|
|
47
|
+
/**
|
|
48
|
+
* 可选:覆盖当前行类名
|
|
49
|
+
*/
|
|
50
|
+
rowClassName?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 可选:自定义展开内容。若设置,行可展开且展开后渲染此内容(不再渲染 children 列表)。
|
|
53
|
+
* 用于在列表中嵌入 Collapse 等自定义区块。
|
|
54
|
+
*/
|
|
55
|
+
expandedContent?: React.ReactNode;
|
|
56
|
+
}
|
|
57
|
+
export interface PisellHierarchicalSummaryListLevelTextStyle {
|
|
58
|
+
fontSize?: number | string;
|
|
59
|
+
fontWeight?: number | string;
|
|
60
|
+
color?: string;
|
|
61
|
+
/** 行高,如 24 或 '24px' */
|
|
62
|
+
lineHeight?: number | string;
|
|
63
|
+
}
|
|
64
|
+
export interface PisellHierarchicalSummaryListIconStyle {
|
|
65
|
+
/** 图标尺寸(px),用于 fontSize 或宽高一致时的边长) */
|
|
66
|
+
size?: number;
|
|
67
|
+
color?: string;
|
|
68
|
+
/** 图标容器宽(px),不传则用 size */
|
|
69
|
+
width?: number;
|
|
70
|
+
/** 图标容器高(px),不传则用 size */
|
|
71
|
+
height?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface PisellHierarchicalSummaryListDividerStyle {
|
|
74
|
+
show?: boolean;
|
|
75
|
+
color?: string;
|
|
76
|
+
style?: 'solid' | 'dashed' | 'dotted';
|
|
77
|
+
}
|
|
78
|
+
export interface PisellHierarchicalSummaryListLevelConfig {
|
|
79
|
+
/**
|
|
80
|
+
* 层级缩进(px)。不传则继承全局 indent 规则。
|
|
81
|
+
*/
|
|
82
|
+
indent?: number;
|
|
83
|
+
/**
|
|
84
|
+
* 是否显示 "·" 分隔符(标题区元信息前的点)
|
|
85
|
+
*/
|
|
86
|
+
showDotSeparator?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 层级内分割线
|
|
89
|
+
*/
|
|
90
|
+
divider?: PisellHierarchicalSummaryListDividerStyle;
|
|
91
|
+
/**
|
|
92
|
+
* 行容器样式(背景/边框/padding/圆角/阴影等)
|
|
93
|
+
*/
|
|
94
|
+
rowStyle?: CSSProperties;
|
|
95
|
+
/**
|
|
96
|
+
* 行容器类名
|
|
97
|
+
*/
|
|
98
|
+
rowClassName?: string;
|
|
99
|
+
/**
|
|
100
|
+
* 标题文本样式
|
|
101
|
+
*/
|
|
102
|
+
labelTextStyle?: PisellHierarchicalSummaryListLevelTextStyle;
|
|
103
|
+
/**
|
|
104
|
+
* 数值文本样式
|
|
105
|
+
*/
|
|
106
|
+
valueTextStyle?: PisellHierarchicalSummaryListLevelTextStyle;
|
|
107
|
+
/**
|
|
108
|
+
* info icon 样式(size/color)
|
|
109
|
+
*/
|
|
110
|
+
infoIconStyle?: PisellHierarchicalSummaryListIconStyle;
|
|
111
|
+
/**
|
|
112
|
+
* 展开/收起箭头 icon 样式(size/color)
|
|
113
|
+
*/
|
|
114
|
+
expandIconStyle?: PisellHierarchicalSummaryListIconStyle;
|
|
115
|
+
/**
|
|
116
|
+
* 行内元信息样式(如 "·"、N items、info icon 的文案颜色/字号等)
|
|
117
|
+
*/
|
|
118
|
+
metaTextStyle?: PisellHierarchicalSummaryListLevelTextStyle;
|
|
119
|
+
}
|
|
120
|
+
export declare type PisellHierarchicalSummaryListAggregateMode = 'none' | 'sum';
|
|
121
|
+
export interface PisellHierarchicalSummaryListAggregateConfig {
|
|
122
|
+
/**
|
|
123
|
+
* 聚合模式
|
|
124
|
+
* - none: 不聚合
|
|
125
|
+
* - sum: 对子级 number 值求和(或使用 getNumberValue 提取)
|
|
126
|
+
* @default 'none'
|
|
127
|
+
*/
|
|
128
|
+
mode?: PisellHierarchicalSummaryListAggregateMode;
|
|
129
|
+
/**
|
|
130
|
+
* 从条目提取 number 值,用于 sum 聚合。
|
|
131
|
+
* 默认:若 item.value 是 number,则使用该值;否则忽略。
|
|
132
|
+
*/
|
|
133
|
+
getNumberValue?: (item: PisellHierarchicalSummaryListItem) => number | null | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* 聚合结果格式化(sum 输出到 value 区)
|
|
136
|
+
*/
|
|
137
|
+
format?: (sum: number, ctx: {
|
|
138
|
+
item: PisellHierarchicalSummaryListItem;
|
|
139
|
+
level: number;
|
|
140
|
+
}) => React.ReactNode;
|
|
141
|
+
}
|
|
142
|
+
export interface PisellHierarchicalSummaryListRenderContext {
|
|
143
|
+
level: number;
|
|
144
|
+
pathKeys: PisellHierarchicalSummaryListKey[];
|
|
145
|
+
expanded: boolean;
|
|
146
|
+
hasChildren: boolean;
|
|
147
|
+
aggregatedValue?: React.ReactNode;
|
|
148
|
+
}
|
|
149
|
+
export interface PisellHierarchicalSummaryListProps {
|
|
150
|
+
/**
|
|
151
|
+
* 数据源
|
|
152
|
+
*/
|
|
153
|
+
items: PisellHierarchicalSummaryListItem[];
|
|
154
|
+
/**
|
|
155
|
+
* 展开项 keys(受控)
|
|
156
|
+
*/
|
|
157
|
+
expandedKeys?: PisellHierarchicalSummaryListKey[];
|
|
158
|
+
/**
|
|
159
|
+
* 默认展开项 keys(非受控)
|
|
160
|
+
*/
|
|
161
|
+
defaultExpandedKeys?: PisellHierarchicalSummaryListKey[];
|
|
162
|
+
/**
|
|
163
|
+
* 默认展开层级(非受控初始化)。0 表示只展示 L1(不默认展开子级)。
|
|
164
|
+
* @default 0
|
|
165
|
+
*/
|
|
166
|
+
defaultExpandedLevel?: number;
|
|
167
|
+
/**
|
|
168
|
+
* 展开项变化回调
|
|
169
|
+
*/
|
|
170
|
+
onExpandedKeysChange?: (keys: PisellHierarchicalSummaryListKey[]) => void;
|
|
171
|
+
/**
|
|
172
|
+
* 手风琴模式:同一层级下仅允许一个子项展开
|
|
173
|
+
* @default false
|
|
174
|
+
*/
|
|
175
|
+
accordion?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* 最大渲染层级(从 1 开始)。超过层级仍保留行,但不再渲染 children。
|
|
178
|
+
*/
|
|
179
|
+
maxRenderLevel?: number;
|
|
180
|
+
/**
|
|
181
|
+
* 最大可展开层级(从 1 开始)。超过层级不显示展开箭头。
|
|
182
|
+
*/
|
|
183
|
+
maxExpandLevel?: number;
|
|
184
|
+
/**
|
|
185
|
+
* 全局缩进(px),作用于 L2+;也可通过 levelConfig 覆盖。
|
|
186
|
+
* @default 16
|
|
187
|
+
*/
|
|
188
|
+
indent?: number;
|
|
189
|
+
/**
|
|
190
|
+
* 行间距(px)
|
|
191
|
+
* @default 8
|
|
192
|
+
*/
|
|
193
|
+
rowGap?: number;
|
|
194
|
+
/**
|
|
195
|
+
* 容器内边距(px 或 CSS 值),不传则使用 less 默认 20px
|
|
196
|
+
*/
|
|
197
|
+
padding?: number | string;
|
|
198
|
+
/**
|
|
199
|
+
* 行内间距(px),用于 1:1 复刻设计稿
|
|
200
|
+
* - row: 行内左右两栏间距
|
|
201
|
+
* - rowLeft: 左侧 label 与 meta(· / N items)间距
|
|
202
|
+
* - meta: meta 内 dot / items-count / info 间距
|
|
203
|
+
* - rowRight: 右侧 value 与 extra / 展开图标间距
|
|
204
|
+
*/
|
|
205
|
+
gaps?: {
|
|
206
|
+
row?: number;
|
|
207
|
+
rowLeft?: number;
|
|
208
|
+
meta?: number;
|
|
209
|
+
rowRight?: number;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* 按层级配置样式与功能开关(key 为 level,从 1 开始)
|
|
213
|
+
*/
|
|
214
|
+
levelConfig?: Record<number, PisellHierarchicalSummaryListLevelConfig>;
|
|
215
|
+
/**
|
|
216
|
+
* 自定义渲染 label
|
|
217
|
+
*/
|
|
218
|
+
renderLabel?: (item: PisellHierarchicalSummaryListItem, ctx: PisellHierarchicalSummaryListRenderContext) => React.ReactNode;
|
|
219
|
+
/**
|
|
220
|
+
* 自定义渲染 value
|
|
221
|
+
*/
|
|
222
|
+
renderValue?: (item: PisellHierarchicalSummaryListItem, ctx: PisellHierarchicalSummaryListRenderContext) => React.ReactNode;
|
|
223
|
+
/**
|
|
224
|
+
* 自定义 key 生成(当 item.key 不存在时使用)
|
|
225
|
+
*/
|
|
226
|
+
getKey?: (item: PisellHierarchicalSummaryListItem, ctx: {
|
|
227
|
+
level: number;
|
|
228
|
+
index: number;
|
|
229
|
+
parentPathKeys: PisellHierarchicalSummaryListKey[];
|
|
230
|
+
}) => PisellHierarchicalSummaryListKey;
|
|
231
|
+
/**
|
|
232
|
+
* 聚合配置:支持内置或外部传入
|
|
233
|
+
*/
|
|
234
|
+
aggregate?: PisellHierarchicalSummaryListAggregateConfig;
|
|
235
|
+
/**
|
|
236
|
+
* 根节点类名
|
|
237
|
+
*/
|
|
238
|
+
className?: string;
|
|
239
|
+
/**
|
|
240
|
+
* 根节点样式
|
|
241
|
+
*/
|
|
242
|
+
style?: CSSProperties;
|
|
243
|
+
/**
|
|
244
|
+
* 是否渲染根节点 div。为 false 时只渲染内部内容(用于外层用同一 DOM 包裹列表与其它区块)。
|
|
245
|
+
* @default true
|
|
246
|
+
*/
|
|
247
|
+
renderRoot?: boolean;
|
|
248
|
+
}
|
|
@@ -238,7 +238,7 @@ var RecordBoardGridView = (props) => {
|
|
|
238
238
|
}) : rawScrollX;
|
|
239
239
|
if ((scroll == null ? void 0 : scroll.autoCalc) && typeof ctx.scrollAreaHeight === "number") {
|
|
240
240
|
const wrapHeight = ctx.scrollAreaHeight;
|
|
241
|
-
const reservedHeight = 40 + uniformSummaryHeight +
|
|
241
|
+
const reservedHeight = 40 + (uniformSummaryHeight > 0 ? uniformSummaryHeight + 25 : 0);
|
|
242
242
|
return {
|
|
243
243
|
x: scrollX ?? sumColumnWidths,
|
|
244
244
|
y: Math.max(wrapHeight - reservedHeight, 100),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PisellShellFrameProps } from './types';
|
|
3
|
+
import './PisellShellFrame.less';
|
|
4
|
+
/**
|
|
5
|
+
* PisellShellFrame:通用壳层布局组件。
|
|
6
|
+
* 支持通过 config 控制各区域显隐,不同展示类型(表格/看板/日历/楼层图等)复用同一壳层。
|
|
7
|
+
*
|
|
8
|
+
* - 顶部:标题区(标题/副标题/辅助信息)、工具区(Toolbar)、统计区(Statistic List,可选折叠)
|
|
9
|
+
* - 中间:滚动承载(可选)+ Layout 插槽(children)
|
|
10
|
+
* - 底部:批量操作条(按选中状态出现)、状态提示区(加载/错误/同步提示等)
|
|
11
|
+
*/
|
|
12
|
+
export declare const PisellShellFrame: React.FC<PisellShellFrameProps>;
|
|
13
|
+
export default PisellShellFrame;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 滚动配置:为 true 时使用默认滚动;为对象时传入样式或 scroll 相关配置。
|
|
4
|
+
*/
|
|
5
|
+
export declare type PisellShellFrameScrollConfig = boolean | {
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* PisellShellFrame 配置:控制各区域的展示与行为。
|
|
11
|
+
* 不同展示类型(表格/看板/日历等)复用同一壳层,通过配置控制显隐。
|
|
12
|
+
*/
|
|
13
|
+
export interface PisellShellFrameConfig {
|
|
14
|
+
/** 是否展示顶部标题区(标题/副标题/辅助信息) */
|
|
15
|
+
showTitle?: boolean;
|
|
16
|
+
/** 是否展示顶部工具区(Toolbar) */
|
|
17
|
+
showToolbar?: boolean;
|
|
18
|
+
/** 是否展示顶部统计区(Statistic List) */
|
|
19
|
+
showStatistic?: boolean;
|
|
20
|
+
/** 统计区是否支持折叠,仅 showStatistic 为 true 时有效 */
|
|
21
|
+
statisticCollapsible?: boolean;
|
|
22
|
+
/** 中间内容区是否使用滚动承载包裹;为 true 时默认 overflow auto */
|
|
23
|
+
scroll?: PisellShellFrameScrollConfig;
|
|
24
|
+
/** 是否展示底部批量操作条(按选中状态出现由调用方控制,此处仅控制是否渲染该槽位) */
|
|
25
|
+
showBatchActionBar?: boolean;
|
|
26
|
+
/** 是否展示底部状态提示区(加载/错误/同步提示等) */
|
|
27
|
+
showStatusArea?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* PisellShellFrame 组件 Props。
|
|
31
|
+
* 通过 config 控制各区域显隐,通过 slot props 传入各区域内容。
|
|
32
|
+
*/
|
|
33
|
+
export interface PisellShellFrameProps {
|
|
34
|
+
/** 类名 */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** 内联样式 */
|
|
37
|
+
style?: CSSProperties;
|
|
38
|
+
/** 区域显隐与行为配置,未传则默认不展示可选区域 */
|
|
39
|
+
config?: PisellShellFrameConfig;
|
|
40
|
+
/** 标题 */
|
|
41
|
+
title?: ReactNode;
|
|
42
|
+
/** 副标题 */
|
|
43
|
+
subtitle?: ReactNode;
|
|
44
|
+
/** 标题区右侧辅助信息 */
|
|
45
|
+
titleExtra?: ReactNode;
|
|
46
|
+
/** 工具栏内容 */
|
|
47
|
+
toolbar?: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* 工具栏正下方、统计/正文之上的"附加条"插槽,渲染于 header 内部。
|
|
50
|
+
* 适用于「统计摘要 / 当前所选筛选标签」等需要紧贴 toolbar 的轻量条目。
|
|
51
|
+
* 当为空时不占位、不渲染外壳。
|
|
52
|
+
*/
|
|
53
|
+
belowToolbar?: ReactNode;
|
|
54
|
+
/** 统计列表内容(如 PisellStatisticList 或自定义) */
|
|
55
|
+
statisticList?: ReactNode;
|
|
56
|
+
/** 主内容(表格/看板/日历/楼层图等),当 config.scroll 为 true 时会被滚动容器包裹 */
|
|
57
|
+
children?: ReactNode;
|
|
58
|
+
/** 批量操作条,通常按选中状态显隐由调用方控制 */
|
|
59
|
+
batchActionBar?: ReactNode;
|
|
60
|
+
/** 状态提示(加载/错误/同步提示等) */
|
|
61
|
+
statusArea?: ReactNode;
|
|
62
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { clear, show, success, info, loading, fail, hide } from './methods';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ToastInstance {
|
|
4
|
+
show: typeof show;
|
|
5
|
+
clear: typeof clear;
|
|
6
|
+
success: typeof success;
|
|
7
|
+
info: typeof info;
|
|
8
|
+
loading: typeof loading;
|
|
9
|
+
fail: typeof fail;
|
|
10
|
+
error: typeof fail;
|
|
11
|
+
hide: typeof hide;
|
|
12
|
+
}
|
|
13
|
+
declare const Toast: ToastInstance;
|
|
14
|
+
export declare const useToast: () => ToastInstance;
|
|
15
|
+
export default Toast;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ToastProps } from './toast';
|
|
3
|
+
interface ToastInstance {
|
|
4
|
+
close: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const show: (configOrContent: Partial<ToastProps> | React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
7
|
+
declare const clear: () => void;
|
|
8
|
+
declare const success: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
9
|
+
declare const info: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
10
|
+
declare const loading: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
11
|
+
declare const fail: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
|
|
12
|
+
declare const hide: () => void;
|
|
13
|
+
export { show, clear, success, info, loading, fail, hide };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { Root } from 'react-dom/client';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare type ImperativeProps = {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
afterClose?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare type TargetElement = ReactElement<ImperativeProps>;
|
|
10
|
+
export declare type ImperativeHandler = {
|
|
11
|
+
close: () => void;
|
|
12
|
+
replace: (element: TargetElement) => void;
|
|
13
|
+
isRendered?: () => boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare type UnmountType = () => Promise<void>;
|
|
16
|
+
export declare type RenderType = (node: React.ReactElement, container: Element | DocumentFragment) => UnmountType;
|
|
17
|
+
declare const MARK = "__pisell_react_root__";
|
|
18
|
+
declare type ContainerType = (Element | DocumentFragment) & {
|
|
19
|
+
[MARK]?: Root;
|
|
20
|
+
};
|
|
21
|
+
export declare function render(node: React.ReactElement, container: ContainerType): void;
|
|
22
|
+
export declare function unmount(container: ContainerType): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated 设置 React 渲染函数以兼容使用。
|
|
25
|
+
*/
|
|
26
|
+
export declare function unstableSetRender(render?: RenderType): RenderType;
|
|
27
|
+
export declare function renderImperatively(element: TargetElement): ImperativeHandler;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
|
|
4
|
+
export interface ToastProps {
|
|
5
|
+
/** Toast 类型 */
|
|
6
|
+
icon?: ToastType | React.ReactNode;
|
|
7
|
+
/** 显示的内容,支持文本或 React 节点 */
|
|
8
|
+
content: React.ReactNode;
|
|
9
|
+
/** 是否显示 */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** 自动关闭时间,单位毫秒,0 表示不自动关闭 */
|
|
12
|
+
duration?: number;
|
|
13
|
+
/** 关闭 */
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
/** 关闭后回调 */
|
|
16
|
+
afterClose?: () => void;
|
|
17
|
+
/** 自定义样式类名 */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** 自定义样式 */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/** 是否显示遮罩 */
|
|
22
|
+
mask?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const Toast: React.FC<ToastProps>;
|
|
25
|
+
export default Toast;
|
|
@@ -45,15 +45,6 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
45
45
|
var _a, _b;
|
|
46
46
|
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
47
47
|
const weighingInfo = (_b = (_a = item == null ? void 0 : item._origin) == null ? void 0 : _a._extend) == null ? void 0 : _b.weighing;
|
|
48
|
-
const formatFooterAmount = (amount, precision = 2) => {
|
|
49
|
-
if (!weighingInfo) {
|
|
50
|
-
return (0, import_utils._formatAmount)(amount, symbol, precision);
|
|
51
|
-
}
|
|
52
|
-
return (0, import_utils2.formatAmountWithOptions)(amount, symbol, {
|
|
53
|
-
precision,
|
|
54
|
-
hideDecimalForWholeNumbers: false
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
48
|
const isDiscount = (0, import_react.useMemo)(() => {
|
|
58
49
|
if (!origin_total) return false;
|
|
59
50
|
return Number(total) != Number(origin_total);
|
|
@@ -88,13 +79,13 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
88
79
|
weighingInfo && `${import__.PREFIX}__footer-price-wrap--weighing`
|
|
89
80
|
)
|
|
90
81
|
},
|
|
91
|
-
!isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null,
|
|
82
|
+
!isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total, symbol)), tip ? /* @__PURE__ */ import_react.default.createElement(import_antd2.Tooltip, { title: import_utils2.locales.getText(tip), destroyTooltipOnHide: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
92
83
|
import_icons.QuestionCircleOutlined,
|
|
93
84
|
{
|
|
94
85
|
style: { fontSize: "16px", color: "#1570ef" }
|
|
95
86
|
}
|
|
96
87
|
)) : null), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
|
|
97
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-origin-total` },
|
|
88
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-origin-total` }, (0, import_utils._formatAmount)(origin_total * num, symbol, 2)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total * num, symbol)))
|
|
98
89
|
)
|
|
99
90
|
), renderDiscountReason());
|
|
100
91
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* 赠品项数据结构
|
|
4
|
+
*/
|
|
5
|
+
export interface IGiftItem {
|
|
6
|
+
/** 图片 URL */
|
|
7
|
+
image?: string;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** 唯一标识 */
|
|
11
|
+
id?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gift 组件 Props
|
|
15
|
+
*/
|
|
16
|
+
export interface IGiftProps {
|
|
17
|
+
/** 是否显示赠品组件 */
|
|
18
|
+
isShow?: boolean;
|
|
19
|
+
/** 赠品总数量(可选择的总数) */
|
|
20
|
+
totalCount?: number;
|
|
21
|
+
/** 已选择的赠品列表 */
|
|
22
|
+
selectedGifts?: IGiftItem[];
|
|
23
|
+
/** 选择的赠品原始数据列表 */
|
|
24
|
+
_selectedOriginGifts?: any[];
|
|
25
|
+
/** 提示文本(未选择时显示) */
|
|
26
|
+
promptText?: string;
|
|
27
|
+
/** 点击事件回调 */
|
|
28
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface InputItem {
|
|
2
|
+
start_date: string;
|
|
3
|
+
end_date: string;
|
|
4
|
+
total: number;
|
|
5
|
+
num: number;
|
|
6
|
+
}
|
|
7
|
+
interface OutputItem {
|
|
8
|
+
start_date: string;
|
|
9
|
+
end_date: string;
|
|
10
|
+
total: number;
|
|
11
|
+
num: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatDateRanges(list: InputItem[]): OutputItem[];
|
|
14
|
+
export {};
|
|
@@ -89,30 +89,18 @@ var BasicInfo = (props) => {
|
|
|
89
89
|
weighingInfo && (Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.weight)) || Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.net_weight)))
|
|
90
90
|
);
|
|
91
91
|
const hasProductMeta = hasSpecs || hasWeighingInfo;
|
|
92
|
-
const basicInfoClassName = (0, import_classnames.default)(`${import__.PREFIX}__basic-info`, {
|
|
93
|
-
[`${import__.PREFIX}__basic-info--weighing`]: hasWeighingInfo
|
|
94
|
-
});
|
|
95
92
|
const renderProductMeta = () => {
|
|
96
93
|
if (!hasProductMeta) {
|
|
97
94
|
return null;
|
|
98
95
|
}
|
|
99
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
100
|
-
|
|
96
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, hasWeighingInfo ? /* @__PURE__ */ import_react.default.createElement(import_weighing.default, { dataSource: weighingInfo, symbol }) : null, hasSpecs ? /* @__PURE__ */ import_react.default.createElement(
|
|
97
|
+
import_specs.default,
|
|
101
98
|
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
hasSpecs ? /* @__PURE__ */ import_react.default.createElement(
|
|
108
|
-
import_specs.default,
|
|
109
|
-
{
|
|
110
|
-
dataSource,
|
|
111
|
-
maxSpecsCount,
|
|
112
|
-
type
|
|
113
|
-
}
|
|
114
|
-
) : null
|
|
115
|
-
);
|
|
99
|
+
dataSource,
|
|
100
|
+
maxSpecsCount,
|
|
101
|
+
type
|
|
102
|
+
}
|
|
103
|
+
) : null);
|
|
116
104
|
};
|
|
117
105
|
const renderProductPrice = () => {
|
|
118
106
|
if (weighingInfo) {
|
|
@@ -147,7 +135,7 @@ var BasicInfo = (props) => {
|
|
|
147
135
|
return _originalTotal !== 0 && _originalTotal != _total;
|
|
148
136
|
}, [isShowOriginalPrice, origin_total, total, hasSpecs, hasWeighingInfo]);
|
|
149
137
|
if (type === "a5") {
|
|
150
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className:
|
|
138
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
|
|
151
139
|
"div",
|
|
152
140
|
{
|
|
153
141
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -158,7 +146,7 @@ var BasicInfo = (props) => {
|
|
|
158
146
|
if (type === "a9") {
|
|
159
147
|
const showAmount = isBundle && !showFooter;
|
|
160
148
|
const _price = showAmount ? Number(price ?? 0) * num : price;
|
|
161
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className:
|
|
149
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
162
150
|
"div",
|
|
163
151
|
{
|
|
164
152
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -166,6 +154,6 @@ var BasicInfo = (props) => {
|
|
|
166
154
|
name
|
|
167
155
|
), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ import_react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `original-price` }, (0, import_utils.formatAmount)(origin_total, 2, symbol)) : null)), renderProductMeta()), renderEdit));
|
|
168
156
|
}
|
|
169
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className:
|
|
157
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
170
158
|
};
|
|
171
159
|
var basicInfo_default = BasicInfo;
|
|
@@ -151,14 +151,6 @@
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
&--weighing {
|
|
155
|
-
.product-info .product-name {
|
|
156
|
-
font-size: 18px;
|
|
157
|
-
line-height: 1.3;
|
|
158
|
-
letter-spacing: -0.01em;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
154
|
.product-info-a9, .product-info-a5 {
|
|
163
155
|
display: flex;
|
|
164
156
|
justify-content: space-between;
|