@pisell/materials 6.12.1 → 6.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +14 -14
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.d.ts +0 -1
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +0 -1
- package/es/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/es/components/pisellInput/components/BankCard/index.d.ts +0 -1
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +0 -1
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +8 -1
- package/es/components/pisellSort/index.d.ts +0 -1
- package/es/components/pisellTooltip/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +2 -2
- package/es/components/productCard/components/Packages/utils.d.ts +2 -2
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +1 -0
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +1 -0
- package/es/components/productCard/lineItem/index.d.ts +1 -0
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +14 -14
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.d.ts +0 -1
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +0 -1
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/lib/components/pisellInput/components/BankCard/index.d.ts +0 -1
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +0 -1
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +2 -1
- package/lib/components/pisellSort/index.d.ts +0 -1
- package/lib/components/pisellTooltip/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +2 -2
- package/lib/components/productCard/components/Packages/utils.d.ts +2 -2
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +1 -0
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +1 -0
- package/lib/components/productCard/lineItem/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +0 -7
- package/es/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/es/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/es/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
- package/es/components/PisellScrollView/types.d.ts +0 -203
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/es/components/PisellSuperTabs/hooks/useTabsState.d.ts +0 -7
- package/es/components/PisellSuperTabs/types.d.ts +0 -212
- package/es/components/PisellTabbar/constants.d.ts +0 -47
- package/es/components/PisellTabbar/hooks/useActiveKey.d.ts +0 -55
- package/es/components/PisellTabbar/hooks/useExpand.d.ts +0 -42
- package/es/components/PisellTabbar/template/Template1/constants.d.ts +0 -10
- package/es/components/PisellTabbar/types.d.ts +0 -92
- package/es/components/PisellTabbar/utils/index.d.ts +0 -69
- package/es/components/SafeAreaTop/index.d.ts +0 -5
- package/es/components/SafeAreaTop/types.d.ts +0 -9
- package/es/components/buttonGroupPreview/index.d.ts +0 -19
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -26
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -15
- package/es/components/filter/components/Dropdown/types.d.ts +0 -15
- package/es/components/filter/components/FilterButton/types.d.ts +0 -29
- package/es/components/filter/types.d.ts +0 -52
- package/es/components/keyboard/index.d.ts +0 -22
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -23
- package/es/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/es/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
- package/es/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
- package/es/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/es/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.d.ts +0 -59
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +0 -33
- package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/pisellLookup/components/SearchHistory.d.ts +0 -7
- package/es/components/pisellLookup/types.d.ts +0 -761
- package/es/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.d.ts +0 -8
- package/es/components/pisellMobileDateRangePicker/index.d.ts +0 -2
- package/es/components/pisellMobileDateRangePicker/types.d.ts +0 -28
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.d.ts +0 -4
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +0 -18
- package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.d.ts +0 -14
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.d.ts +0 -18
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/resourceWallConstants.d.ts +0 -2
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.d.ts +0 -8
- package/es/components/pisellReservationSchedule/locales.d.ts +0 -43
- package/es/components/pisellReservationSchedule/types.d.ts +0 -52
- package/es/components/pisellReservationScheduleBand/types.d.ts +0 -68
- package/es/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.d.ts +0 -9
- package/es/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
- package/es/components/pisellShellFrame/types.d.ts +0 -62
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -29
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +0 -40
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -37
- package/es/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
- package/es/components/pisellTimeNavigator/types.d.ts +0 -175
- package/es/components/pisellTimeNavigator/utils/index.d.ts +0 -79
- package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -145
- package/es/components/pisellToast/squareToast/index.d.ts +0 -15
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -28
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -203
- package/es/components/productCard/components/Action/index.d.ts +0 -4
- package/es/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/es/components/productCard/lineItem/locales.d.ts +0 -38
- package/es/components/productCard/lineItem/types.d.ts +0 -13
- package/es/components/productCard/locales.d.ts +0 -138
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -96
- package/es/components/select/index.d.ts +0 -9
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/locales/en-US.d.ts +0 -566
- package/es/locales/ja.d.ts +0 -534
- package/es/locales/pt.d.ts +0 -534
- package/es/locales/zh-CN.d.ts +0 -561
- package/es/locales/zh-TW.d.ts +0 -561
- package/lib/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +0 -7
- package/lib/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/lib/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/lib/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
- package/lib/components/PisellScrollView/types.d.ts +0 -203
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/lib/components/PisellSuperTabs/hooks/useTabsState.d.ts +0 -7
- package/lib/components/PisellSuperTabs/types.d.ts +0 -212
- package/lib/components/PisellTabbar/constants.d.ts +0 -47
- package/lib/components/PisellTabbar/hooks/useActiveKey.d.ts +0 -55
- package/lib/components/PisellTabbar/hooks/useExpand.d.ts +0 -42
- package/lib/components/PisellTabbar/template/Template1/constants.d.ts +0 -10
- package/lib/components/PisellTabbar/types.d.ts +0 -92
- package/lib/components/PisellTabbar/utils/index.d.ts +0 -69
- package/lib/components/SafeAreaTop/index.d.ts +0 -5
- package/lib/components/SafeAreaTop/types.d.ts +0 -9
- package/lib/components/buttonGroupPreview/index.d.ts +0 -19
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -26
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -15
- package/lib/components/filter/components/Dropdown/types.d.ts +0 -15
- package/lib/components/filter/components/FilterButton/types.d.ts +0 -29
- package/lib/components/filter/types.d.ts +0 -52
- package/lib/components/keyboard/index.d.ts +0 -22
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -23
- package/lib/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/lib/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
- package/lib/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
- package/lib/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/lib/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.d.ts +0 -59
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +0 -33
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/pisellLookup/components/SearchHistory.d.ts +0 -7
- package/lib/components/pisellLookup/types.d.ts +0 -761
- package/lib/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.d.ts +0 -8
- package/lib/components/pisellMobileDateRangePicker/index.d.ts +0 -2
- package/lib/components/pisellMobileDateRangePicker/types.d.ts +0 -28
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.d.ts +0 -4
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +0 -18
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.d.ts +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.d.ts +0 -18
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/resourceWallConstants.d.ts +0 -2
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.d.ts +0 -8
- package/lib/components/pisellReservationSchedule/locales.d.ts +0 -43
- package/lib/components/pisellReservationSchedule/types.d.ts +0 -52
- package/lib/components/pisellReservationScheduleBand/types.d.ts +0 -68
- package/lib/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.d.ts +0 -9
- package/lib/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
- package/lib/components/pisellShellFrame/types.d.ts +0 -62
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -29
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +0 -40
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -37
- package/lib/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
- package/lib/components/pisellTimeNavigator/types.d.ts +0 -175
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +0 -79
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -145
- package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -28
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -203
- package/lib/components/productCard/components/Action/index.d.ts +0 -4
- package/lib/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/lib/components/productCard/lineItem/locales.d.ts +0 -38
- package/lib/components/productCard/lineItem/types.d.ts +0 -13
- package/lib/components/productCard/locales.d.ts +0 -138
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -96
- package/lib/components/select/index.d.ts +0 -9
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/locales/en-US.d.ts +0 -566
- package/lib/locales/ja.d.ts +0 -534
- package/lib/locales/pt.d.ts +0 -534
- package/lib/locales/zh-CN.d.ts +0 -561
- package/lib/locales/zh-TW.d.ts +0 -561
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { Dayjs } from 'dayjs';
|
|
2
|
-
import type { TimeRangeOption } from '../types';
|
|
3
|
-
export interface UseTimeAxisOptions {
|
|
4
|
-
range?: TimeRangeOption;
|
|
5
|
-
stepMinutes: number;
|
|
6
|
-
referenceDate: Dayjs;
|
|
7
|
-
orientation: 'horizontal' | 'vertical';
|
|
8
|
-
/** 横向时每格宽度(px),竖向时每格高度(px) */
|
|
9
|
-
cellSizePx: number;
|
|
10
|
-
}
|
|
11
|
-
export interface TimeAxisState {
|
|
12
|
-
rangeStart: Dayjs;
|
|
13
|
-
rangeEnd: Dayjs;
|
|
14
|
-
/** 每格起点时间序列(含 head / tail,对齐到 step 网格) */
|
|
15
|
-
ticks: Dayjs[];
|
|
16
|
-
/** 与 `ticks` 一一对应的格宽(px);head / tail 可 < cellSizePx,中间格 = cellSizePx */
|
|
17
|
-
cellWidthsPx: number[];
|
|
18
|
-
/** 时间转主轴偏移(px) */
|
|
19
|
-
timeToOffset: (t: Dayjs) => number;
|
|
20
|
-
/** 主轴偏移(px)转时间(最近刻度,用于刻度对齐) */
|
|
21
|
-
offsetToTime: (offset: number) => Dayjs | null;
|
|
22
|
-
/** 主轴偏移(px)转时间(连续插值,用于拖动时按分钟步长显示) */
|
|
23
|
-
offsetToTimeContinuous: (offset: number) => Dayjs | null;
|
|
24
|
-
/** 主轴总长度(px) */
|
|
25
|
-
totalLengthPx: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* 时间轴刻度与时间↔像素换算。
|
|
29
|
-
*
|
|
30
|
-
* 格子拆分策略见 {@link getAxisCells}:当 `range.start` / `range.end` 不在 `stepMinutes` 网格上时,
|
|
31
|
-
* 首尾出现宽度按时间比例缩小的 head/tail 格,中间格保持 step 整步并落在网格整点上。
|
|
32
|
-
*
|
|
33
|
-
* 时间→像素仍是线性映射 `dotOffsetPx + (t - rangeStart) / step × cellSize`,与 head/tail 是否存在无关:
|
|
34
|
-
* `dotOffsetPx`(横向 = `cellSize/2`,竖向 = 0)为 rangeStart 在轴内的像素位置;轴两端各保留 `dotOffsetPx`
|
|
35
|
-
* 留白以居中 rangeStart / rangeEnd。
|
|
36
|
-
*/
|
|
37
|
-
export declare function useTimeAxis(options: UseTimeAxisOptions): TimeAxisState;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PisellTimeNavigator 布局与尺寸常量(与 Figma / 交互 spec 对齐)
|
|
3
|
-
*/
|
|
4
|
-
/** 横向每格宽度(px),Figma 约 82;axis-moves 固定用此值 */
|
|
5
|
-
export declare const CELL_SIZE_H = 82;
|
|
6
|
-
/**
|
|
7
|
-
* 横向「此刻」橙区目标宽度(px):按 axis-moves 下一格多的比例换算;
|
|
8
|
-
* 滚动轴与 cursor-moves 压格时同宽。
|
|
9
|
-
*/
|
|
10
|
-
export declare const CURRENT_TIME_GRADIENT_WIDTH_H_PX: number;
|
|
11
|
-
/** 竖向每格高度(px) */
|
|
12
|
-
export declare const CELL_SIZE_V = 20;
|
|
13
|
-
/** 横向「Now」按钮占位,避免刻度被挡 */
|
|
14
|
-
export declare const CURSOR_MOVES_NOW_RESERVE_PX = 56;
|
|
15
|
-
/** cursor-moves 横向:轴与视口左右边距 */
|
|
16
|
-
export declare const CURSOR_MOVES_H_PADDING_PX = 8;
|
|
17
|
-
/** cursor-moves 横向:每格最小宽度(再小刻度不可读) */
|
|
18
|
-
export declare const CURSOR_MOVES_MIN_CELL_PX = 8;
|
|
19
|
-
/** 密度层高度:时间轴 48px 内留少量上下边距 */
|
|
20
|
-
export declare const DENSITY_LAYER_HEIGHT = 46;
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import type { Dayjs } from 'dayjs';
|
|
3
|
-
/**
|
|
4
|
-
* value / defaultValue 的 dayjs 兼容类型(组件内部统一为 Dayjs)
|
|
5
|
-
*/
|
|
6
|
-
export declare type TimeNavigatorValue = Dayjs | string | null;
|
|
7
|
-
/**
|
|
8
|
-
* 时间范围(HH:mm 或 HH:mm:ss,相对 referenceDate 的营业日)
|
|
9
|
-
* - 同自然日:如 08:00–22:00
|
|
10
|
-
* - 跨日:结束钟面 ≤ 开始时视为次日结束,如 02:01–02:00 表示至次日 02:00
|
|
11
|
-
*/
|
|
12
|
-
export interface TimeRangeOption {
|
|
13
|
-
start: string;
|
|
14
|
-
end: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* 拖动/指示器模式
|
|
18
|
-
* - axis-moves:指示器固定视口中央,刻度移动(默认)
|
|
19
|
-
* - cursor-moves:刻度固定,指示器在轴上移动
|
|
20
|
-
*/
|
|
21
|
-
export declare type CursorMode = 'axis-moves' | 'cursor-moves';
|
|
22
|
-
/**
|
|
23
|
-
* 布局方向
|
|
24
|
-
*/
|
|
25
|
-
export declare type TimeNavigatorOrientation = 'horizontal' | 'vertical';
|
|
26
|
-
/**
|
|
27
|
-
* PisellTimeNavigator 组件 Props
|
|
28
|
-
*/
|
|
29
|
-
export interface PisellTimeNavigatorProps {
|
|
30
|
-
/**
|
|
31
|
-
* 当前选中时间(受控)。支持 dayjs 实例或可被 dayjs 解析的字符串
|
|
32
|
-
*/
|
|
33
|
-
value?: TimeNavigatorValue;
|
|
34
|
-
/**
|
|
35
|
-
* 时间变更回调(受控时必传)
|
|
36
|
-
*/
|
|
37
|
-
onChange?: (value: Dayjs) => void;
|
|
38
|
-
/**
|
|
39
|
-
* 默认选中时间(非受控)
|
|
40
|
-
*/
|
|
41
|
-
defaultValue?: TimeNavigatorValue;
|
|
42
|
-
/**
|
|
43
|
-
* 时间轴锚定到的日历日(startOf day)。`range` 的 HH:mm 均相对于该日。
|
|
44
|
-
* 不传则与历史一致:取「当天」0 点,避免跨天后刻度错位。
|
|
45
|
-
*/
|
|
46
|
-
referenceDate?: TimeNavigatorValue;
|
|
47
|
-
/**
|
|
48
|
-
* 是否 Realtime 模式:value 自动跟随系统当前时间更新
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
realtime?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* 时间范围(支持跨日营业,见 {@link TimeRangeOption})。不传则默认当日 00:00–24:00
|
|
54
|
-
*/
|
|
55
|
-
range?: TimeRangeOption;
|
|
56
|
-
/**
|
|
57
|
-
* 吸附步长(分钟),如 15、30、60
|
|
58
|
-
* @default 15
|
|
59
|
-
*/
|
|
60
|
-
stepMinutes?: number;
|
|
61
|
-
/**
|
|
62
|
-
* 大刻度间隔(分钟),用于整点刻度;不传则与 stepMinutes 一致或 60
|
|
63
|
-
* @default 60
|
|
64
|
-
*/
|
|
65
|
-
majorStepMinutes?: number;
|
|
66
|
-
/**
|
|
67
|
-
* 指示器/轴移动模式
|
|
68
|
-
* @default 'axis-moves'
|
|
69
|
-
*/
|
|
70
|
-
cursorMode?: CursorMode;
|
|
71
|
-
/**
|
|
72
|
-
* 横向或竖向展示
|
|
73
|
-
* @default 'horizontal'
|
|
74
|
-
*/
|
|
75
|
-
orientation?: TimeNavigatorOrientation;
|
|
76
|
-
/**
|
|
77
|
-
* 横向且 `cursorMode === 'axis-moves'` 时,每个时间槽的像素宽度(格间距)。
|
|
78
|
-
* 不传则 **82**(`CELL_SIZE_H`)。`cursor-moves` 时格宽由视口压缩计算,本字段不生效。
|
|
79
|
-
*/
|
|
80
|
-
horizontalAxisCellSizePx?: number;
|
|
81
|
-
/**
|
|
82
|
-
* 横向时间轴轨道高度(px):滚动容器、轴、`scale`/`cursor` 层共用的高度。
|
|
83
|
-
* 仅 `orientation === 'horizontal'` 时生效;不传为 **48**(默认设计规格)。
|
|
84
|
-
*/
|
|
85
|
-
horizontalTrackHeightPx?: number;
|
|
86
|
-
/**
|
|
87
|
-
* 营业时间范围(视觉高亮,可选限制选择范围)
|
|
88
|
-
*/
|
|
89
|
-
businessHours?: TimeRangeOption;
|
|
90
|
-
/**
|
|
91
|
-
* 禁用时间段,禁止选中(点击/吸附到该区间无效)
|
|
92
|
-
*/
|
|
93
|
-
disabledRanges?: TimeRangeOption[];
|
|
94
|
-
/**
|
|
95
|
-
* 是否显示 Now 按钮(固定入口)
|
|
96
|
-
* @default true
|
|
97
|
-
*/
|
|
98
|
-
showNowButton?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* 为 true 时禁止用户拖动/滚动时间轴、点击刻度改时间(仍随 `value` 程序性对齐视口;用于「跟随当前时刻」等只读轴)
|
|
101
|
-
* @default false
|
|
102
|
-
*/
|
|
103
|
-
userInteractionLocked?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* 是否吸附到 step 刻度
|
|
106
|
-
* @default false
|
|
107
|
-
*/
|
|
108
|
-
snapToStep?: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* 是否开启惯性滚动(拖动松手后减速)
|
|
111
|
-
* @default false
|
|
112
|
-
*/
|
|
113
|
-
inertia?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* 过去时间淡化背景色(CSS 颜色值)
|
|
116
|
-
*/
|
|
117
|
-
pastTimeFade?: string;
|
|
118
|
-
/**
|
|
119
|
-
* 容器样式覆盖
|
|
120
|
-
*/
|
|
121
|
-
containerStyle?: CSSProperties;
|
|
122
|
-
/**
|
|
123
|
-
* 刻度层样式覆盖
|
|
124
|
-
*/
|
|
125
|
-
scaleStyle?: CSSProperties;
|
|
126
|
-
/**
|
|
127
|
-
* 时间气泡/竖线样式覆盖(区分 realtime 时由组件内部应用主题色)
|
|
128
|
-
*/
|
|
129
|
-
cursorStyle?: CSSProperties;
|
|
130
|
-
/**
|
|
131
|
-
* Now 按钮样式覆盖
|
|
132
|
-
*/
|
|
133
|
-
nowButtonStyle?: CSSProperties;
|
|
134
|
-
/**
|
|
135
|
-
* 自定义类名
|
|
136
|
-
*/
|
|
137
|
-
className?: string;
|
|
138
|
-
/**
|
|
139
|
-
* 根节点自定义样式
|
|
140
|
-
*/
|
|
141
|
-
style?: CSSProperties;
|
|
142
|
-
/**
|
|
143
|
-
* dayjs locale
|
|
144
|
-
*/
|
|
145
|
-
locale?: string;
|
|
146
|
-
/**
|
|
147
|
-
* 时间气泡展示格式(dayjs format)
|
|
148
|
-
* @default 'HH:mm'
|
|
149
|
-
*/
|
|
150
|
-
timeFormat?: string;
|
|
151
|
-
/**
|
|
152
|
-
* 自定义游标/拖拽气泡文案;不传则按 `timeFormat` 格式化 `value`。
|
|
153
|
-
* 预约跨日营业可传相对顶栏锚定日的「次日 HH:mm」。
|
|
154
|
-
*/
|
|
155
|
-
formatTimeLabel?: (value: Dayjs) => string;
|
|
156
|
-
/**
|
|
157
|
-
* 自定义 Now 按钮内容(覆盖默认文案与图标时使用)
|
|
158
|
-
*/
|
|
159
|
-
renderNowButton?: () => ReactNode;
|
|
160
|
-
/**
|
|
161
|
-
* 横向轴上与刻度槽位数一致的密度序列(任意正数,内部按最大值归一化折线高度)
|
|
162
|
-
*/
|
|
163
|
-
densitySeries?: number[];
|
|
164
|
-
/**
|
|
165
|
-
* 未传 `densitySeries` 时按 `referenceDate` 拉取;日历日变更会重新请求,过期响应丢弃
|
|
166
|
-
*/
|
|
167
|
-
loadDensity?: (params: {
|
|
168
|
-
referenceDate: Dayjs;
|
|
169
|
-
stepMinutes: number;
|
|
170
|
-
}) => Promise<number[]>;
|
|
171
|
-
/**
|
|
172
|
-
* 用户开始操作时间轴(拖轴、点刻度、键盘、拖指针等)时回调;用于上层关闭「跟随当前」等。
|
|
173
|
-
*/
|
|
174
|
-
onUserInteraction?: () => void;
|
|
175
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { type Dayjs } from 'dayjs';
|
|
2
|
-
import type { TimeNavigatorValue, TimeRangeOption } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* 解析 value 为 Dayjs,无效则返回 null。
|
|
5
|
-
* 支持 dayjs 可解析的日期时间;纯时间字符串(如 '12:00'、'14:30')会基于 reference 的日期解析。
|
|
6
|
-
*/
|
|
7
|
-
export declare function parseValue(value: TimeNavigatorValue, reference?: Dayjs): Dayjs | null;
|
|
8
|
-
/** 日历时间轴默认步长(分钟),与历史「整点列」一致 */
|
|
9
|
-
export declare const DEFAULT_CALENDAR_SLOT_STEP_MINUTES = 60;
|
|
10
|
-
/**
|
|
11
|
-
* 按营业日 {@link TimeRangeOption} 在锚定自然日零点展开,生成日视图时间轴「列左边界」:
|
|
12
|
-
* 值为相对 `reference.startOf('day')` 的**浮点小时**(可 ≥24,表示次日时刻),步长为 `slotStepMinutes`。
|
|
13
|
-
*/
|
|
14
|
-
export declare function buildCalendarTimelineSlotStartsFromRange(range: TimeRangeOption | undefined, anchorDate: Date | Dayjs, slotStepMinutes?: number): number[];
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated 语义上等价于 {@link buildCalendarTimelineSlotStartsFromRange}(..., 60);保留兼容导出。
|
|
17
|
-
*/
|
|
18
|
-
export declare function buildCalendarHourSlotsFromRange(range: TimeRangeOption | undefined, anchorDate: Date | Dayjs): number[];
|
|
19
|
-
/**
|
|
20
|
-
* 将 range 转为 [startDayjs, endDayjs](reference 为营业锚定日的 0 点)
|
|
21
|
-
* - 同日内:如 08:00–22:00
|
|
22
|
-
* - 跨日营业:结束钟面早于或等于开始(如 02:01–次日 02:00)时,end 解析为 reference 的次日同一时刻
|
|
23
|
-
*/
|
|
24
|
-
export declare function getRangeBounds(range: TimeRangeOption | undefined, reference: Dayjs): [Dayjs, Dayjs];
|
|
25
|
-
/**
|
|
26
|
-
* 自动挑选「能让 `now` 落入 [refDay + range.start, refDay + range.end] 营业窗口」的锚定日。
|
|
27
|
-
*
|
|
28
|
-
* 调用方未显式传入 `referenceDate` 时使用:保证当前时刻始终在轴可视范围内,
|
|
29
|
-
* 横向「现在」橙色高亮 / 竖向当前时间横线永远展示。
|
|
30
|
-
*
|
|
31
|
-
* 解析顺序:
|
|
32
|
-
* 1. 先尝试 `now.startOf('day')`(典型场景:跨日营业 18:00–04:00 时,下午 20:00 直接命中今天的窗口);
|
|
33
|
-
* 2. 命中失败时尝试前一日(如营业 16:00–次日 16:00,now = 中午 12:00 时窗口需锚到昨天);
|
|
34
|
-
* 3. 再尝试次日(如营业 16:00–次日 16:00,now 处于「即将进入下一个营业日」的边界附近);
|
|
35
|
-
* 4. 三个候选都不包含 now(营业时段较短且 now 落在闭店时段,如 09:00–22:00 + now=23:00)时,
|
|
36
|
-
* 回退到 `now.startOf('day')`,保持原有行为,不强行扭曲日期。
|
|
37
|
-
*/
|
|
38
|
-
export declare function pickReferenceDateContainingNow(range: TimeRangeOption | undefined, now: Dayjs): Dayjs;
|
|
39
|
-
/**
|
|
40
|
-
* 将时间吸附到 step 分钟刻度(0、15、30、45 等):四舍五入到最近刻度。
|
|
41
|
-
*/
|
|
42
|
-
export declare function snapToStepMinutes(t: Dayjs, stepMinutes: number): Dayjs;
|
|
43
|
-
/**
|
|
44
|
-
* 判断时间是否落在任一禁用区间内(按绝对时间与区间 [start,end) 比较)
|
|
45
|
-
* 注:与主时间轴同 reference 的跨日 range 一致时需传入同一营业锚定日解析出的区间。
|
|
46
|
-
*/
|
|
47
|
-
export declare function isInDisabledRanges(t: Dayjs, disabledRanges: TimeRangeOption[] | undefined): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 在 [rangeStart, rangeEnd] 内按 stepMinutes 生成等步刻度时间列表(Dayjs)。
|
|
50
|
-
*
|
|
51
|
-
* @deprecated 仅用于不需要「头/尾 partial 格」的场景;时间轴渲染请用 {@link getAxisCells}。
|
|
52
|
-
*/
|
|
53
|
-
export declare function getTicks(rangeStart: Dayjs, rangeEnd: Dayjs, stepMinutes: number): Dayjs[];
|
|
54
|
-
/**
|
|
55
|
-
* 时间轴上一格的描述:起始时间 + 跨度(分钟)。
|
|
56
|
-
* - 中间格:跨度 = `stepMinutes`,起点对齐到 step 网格(如 15 分钟一格时落在 `:00/:15/:30/:45`);
|
|
57
|
-
* - head 格:当 `rangeStart` 不在网格上时存在,起点 = `rangeStart`,跨度 < step;
|
|
58
|
-
* - tail 格:当 `rangeEnd` 不在网格上时存在,起点 = 最后一个对齐点,跨度 < step。
|
|
59
|
-
*/
|
|
60
|
-
export interface AxisCell {
|
|
61
|
-
start: Dayjs;
|
|
62
|
-
widthMinutes: number;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* 把 [`rangeStart`, `rangeEnd`] 切成「对齐到 step 网格」的格子序列:
|
|
66
|
-
*
|
|
67
|
-
* 1. 找到第一个 ≥ `rangeStart` 且分钟为 `stepMinutes` 整数倍的对齐点;
|
|
68
|
-
* 2. 若对齐点严格大于 `rangeStart`,先放一格 head(`rangeStart` → 对齐点),跨度 < step;
|
|
69
|
-
* 3. 中间按 step 步进,每格起点都落在网格上;
|
|
70
|
-
* 4. 若 `rangeEnd` 落在两个对齐点之间,最后多出一格 tail(最后对齐点 → `rangeEnd`),跨度 < step。
|
|
71
|
-
*
|
|
72
|
-
* `rangeStart` / `rangeEnd` 都恰落在网格上时退化为完全等步格。
|
|
73
|
-
*/
|
|
74
|
-
export declare function getAxisCells(rangeStart: Dayjs, rangeEnd: Dayjs, stepMinutes: number): AxisCell[];
|
|
75
|
-
/**
|
|
76
|
-
* 横向时间轴「格」数量,与 useTimeAxis 中 cells 算法一致。
|
|
77
|
-
* 用于 cursor-moves 模式下计算压缩后的每格像素宽度。
|
|
78
|
-
*/
|
|
79
|
-
export declare function getHorizontalAxisSlotCount(range: TimeRangeOption | undefined, referenceDate: Dayjs, stepMinutes: number): number;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { Dayjs } from 'dayjs';
|
|
3
|
-
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign } from '../pisellDateTimeDisplay/types';
|
|
4
|
-
export type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign, };
|
|
5
|
-
/**
|
|
6
|
-
* 字段类型(时间区间、日期、星期、持续时长)
|
|
7
|
-
* - time: 时间区间块(HH:mm-HH:mm 或跨天起止)
|
|
8
|
-
* - date: 日期块
|
|
9
|
-
* - weekday: 星期块
|
|
10
|
-
* - duration: 持续时长块
|
|
11
|
-
*/
|
|
12
|
-
export declare type TimeRangeFieldType = 'time' | 'date' | 'weekday' | 'duration';
|
|
13
|
-
/**
|
|
14
|
-
* 持续时长格式配置
|
|
15
|
-
*/
|
|
16
|
-
export interface DurationFormatConfig {
|
|
17
|
-
/**
|
|
18
|
-
* 是否显示秒
|
|
19
|
-
* @default false
|
|
20
|
-
* @example true -> "2h30m23s" | false -> "2h30m"
|
|
21
|
-
*/
|
|
22
|
-
showSeconds?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 字段配置
|
|
26
|
-
*/
|
|
27
|
-
export interface TimeRangeFieldConfig {
|
|
28
|
-
/**
|
|
29
|
-
* 是否显示时间区间块
|
|
30
|
-
* @default true
|
|
31
|
-
*/
|
|
32
|
-
showTimeRange?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 是否显示日期块
|
|
35
|
-
* @default true
|
|
36
|
-
*/
|
|
37
|
-
showDate?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* 是否显示星期块
|
|
40
|
-
* @default true
|
|
41
|
-
*/
|
|
42
|
-
showWeekday?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 是否显示持续时长块
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
showDuration?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 字段顺序(四类块可任意排序;默认 时间 日期 星期 持续时长,可实现「持续时间在前」等)
|
|
50
|
-
* @default ['weekday', 'date', 'time', 'duration'] 换行顺序:先持续时间 → 结束时间(跨天)→ 开始/结束时间与日期 → 星期
|
|
51
|
-
*/
|
|
52
|
-
fieldOrder?: TimeRangeFieldType[];
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* startAt / endAt 的 dayjs 兼容值
|
|
56
|
-
*/
|
|
57
|
-
export declare type DayjsLike = Dayjs | string | number;
|
|
58
|
-
/**
|
|
59
|
-
* PisellTimeRangeDisplay 组件 Props
|
|
60
|
-
*/
|
|
61
|
-
export interface PisellTimeRangeDisplayProps {
|
|
62
|
-
/**
|
|
63
|
-
* 开始时间(dayjs 兼容值)
|
|
64
|
-
*/
|
|
65
|
-
startAt: DayjsLike;
|
|
66
|
-
/**
|
|
67
|
-
* 结束时间(dayjs 兼容值)
|
|
68
|
-
*/
|
|
69
|
-
endAt: DayjsLike;
|
|
70
|
-
/**
|
|
71
|
-
* 文本对齐方式(单行/多行均生效)
|
|
72
|
-
* @default 'center'
|
|
73
|
-
*/
|
|
74
|
-
textAlign?: TextAlign;
|
|
75
|
-
/**
|
|
76
|
-
* 字段显示与排序配置
|
|
77
|
-
*/
|
|
78
|
-
fields?: TimeRangeFieldConfig;
|
|
79
|
-
/**
|
|
80
|
-
* 同一天时是否显示具体日期
|
|
81
|
-
* @default true
|
|
82
|
-
*/
|
|
83
|
-
showDateForSameDay?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* 时间格式配置(复用 PisellDateTimeDisplay)
|
|
86
|
-
*/
|
|
87
|
-
timeFormat?: TimeFormatConfig;
|
|
88
|
-
/**
|
|
89
|
-
* 日期格式配置(复用 PisellDateTimeDisplay)
|
|
90
|
-
*/
|
|
91
|
-
dateFormat?: DateFormatConfig;
|
|
92
|
-
/**
|
|
93
|
-
* 星期格式配置(复用 PisellDateTimeDisplay)
|
|
94
|
-
*/
|
|
95
|
-
weekdayFormat?: WeekdayFormatConfig;
|
|
96
|
-
/**
|
|
97
|
-
* 持续时长格式配置
|
|
98
|
-
*/
|
|
99
|
-
durationFormat?: DurationFormatConfig;
|
|
100
|
-
/**
|
|
101
|
-
* 容器样式
|
|
102
|
-
*/
|
|
103
|
-
containerStyle?: ContainerStyleConfig;
|
|
104
|
-
/**
|
|
105
|
-
* 时间区间文本样式
|
|
106
|
-
*/
|
|
107
|
-
timeStyle?: TextStyleConfig;
|
|
108
|
-
/**
|
|
109
|
-
* 开始时间文本样式,会覆盖 timeStyle 中的同名字段
|
|
110
|
-
*/
|
|
111
|
-
startTimeStyle?: TextStyleConfig;
|
|
112
|
-
/**
|
|
113
|
-
* 结束时间文本样式,会覆盖 timeStyle 中的同名字段
|
|
114
|
-
*/
|
|
115
|
-
endTimeStyle?: TextStyleConfig;
|
|
116
|
-
/**
|
|
117
|
-
* 日期文本样式
|
|
118
|
-
*/
|
|
119
|
-
dateStyle?: TextStyleConfig;
|
|
120
|
-
/**
|
|
121
|
-
* 星期文本样式
|
|
122
|
-
*/
|
|
123
|
-
weekdayStyle?: TextStyleConfig;
|
|
124
|
-
/**
|
|
125
|
-
* 持续时长文本样式
|
|
126
|
-
*/
|
|
127
|
-
durationStyle?: TextStyleConfig;
|
|
128
|
-
/**
|
|
129
|
-
* dayjs locale(语言代码)
|
|
130
|
-
* @default 优先使用全局配置,其次浏览器语言
|
|
131
|
-
*/
|
|
132
|
-
locale?: string;
|
|
133
|
-
/**
|
|
134
|
-
* 自定义类名
|
|
135
|
-
*/
|
|
136
|
-
className?: string;
|
|
137
|
-
/**
|
|
138
|
-
* 自定义样式
|
|
139
|
-
*/
|
|
140
|
-
style?: CSSProperties;
|
|
141
|
-
/**
|
|
142
|
-
* 点击回调
|
|
143
|
-
*/
|
|
144
|
-
onClick?: () => void;
|
|
145
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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;
|
|
@@ -1,13 +0,0 @@
|
|
|
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 };
|
|
@@ -1,28 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,25 +0,0 @@
|
|
|
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;
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface InputItem {
|
|
2
|
-
start_date: string;
|
|
3
|
-
end_date: string;
|
|
4
|
-
total: number;
|
|
5
|
-
num: number;
|
|
6
|
-
}
|
|
7
|
-
interface OutputItem {
|
|
8
|
-
start_date: string;
|
|
9
|
-
end_date: string;
|
|
10
|
-
total: number;
|
|
11
|
-
num: number;
|
|
12
|
-
}
|
|
13
|
-
export declare function formatDateRanges(list: InputItem[]): OutputItem[];
|
|
14
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare type NativeProps<S extends string = never> = {
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: React.CSSProperties & Partial<Record<S, string>>;
|
|
6
|
-
};
|
|
7
|
-
declare type PropagationEvent = 'click';
|
|
8
|
-
import './index.less';
|
|
9
|
-
declare type SideType = 'left' | 'right';
|
|
10
|
-
export declare type SwipeActionRef = {
|
|
11
|
-
close: () => void;
|
|
12
|
-
show: (side?: SideType) => void;
|
|
13
|
-
};
|
|
14
|
-
declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
|
|
15
|
-
export declare type Action = {
|
|
16
|
-
key: string | number;
|
|
17
|
-
text: ReactNode;
|
|
18
|
-
color?: ActionColor | string;
|
|
19
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
20
|
-
style?: React.CSSProperties;
|
|
21
|
-
};
|
|
22
|
-
export declare type SwipeActionProps = {
|
|
23
|
-
rightActions?: Action[];
|
|
24
|
-
leftActions?: Action[];
|
|
25
|
-
onAction?: (action: Action, e: React.MouseEvent) => void;
|
|
26
|
-
closeOnTouchOutside?: boolean;
|
|
27
|
-
closeOnAction?: boolean;
|
|
28
|
-
children: ReactNode;
|
|
29
|
-
stopPropagation?: PropagationEvent[];
|
|
30
|
-
onActionsReveal?: (side: SideType) => void;
|
|
31
|
-
onClose?: () => void;
|
|
32
|
-
escapeDom?: string;
|
|
33
|
-
} & NativeProps<'--background'>;
|
|
34
|
-
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
35
|
-
rightActions?: Action[] | undefined;
|
|
36
|
-
leftActions?: Action[] | undefined;
|
|
37
|
-
onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
|
|
38
|
-
closeOnTouchOutside?: boolean | undefined;
|
|
39
|
-
closeOnAction?: boolean | undefined;
|
|
40
|
-
children: ReactNode;
|
|
41
|
-
stopPropagation?: "click"[] | undefined;
|
|
42
|
-
onActionsReveal?: ((side: SideType) => void) | undefined;
|
|
43
|
-
onClose?: (() => void) | undefined;
|
|
44
|
-
escapeDom?: string | undefined;
|
|
45
|
-
} & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
|
|
46
|
-
export {};
|