Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(comp:date-picker): add DatePickerPanel & DateRangePickerPanel #964

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

sallerli1
Copy link
Contributor

@sallerli1 sallerli1 commented Jun 18, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

What is the new behavior?

抽离日期面板以及日期范围面板 作为 IxDatePickerPanel 、IxDateRangePickerPanel 暴露

Other information

更新部分文档中的样式变量

@idux-bot
Copy link

idux-bot bot commented Jun 18, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jun 18, 2022

Codecov Report

Merging #964 (04a7c69) into main (c1fef9c) will decrease coverage by 0.00%.
The diff coverage is 94.24%.

❗ Current head 04a7c69 differs from pull request most recent head dcaf52c. Consider uploading reports for the commit dcaf52c to get more accurate results

@@            Coverage Diff             @@
##             main     #964      +/-   ##
==========================================
- Coverage   92.67%   92.66%   -0.01%     
==========================================
  Files         706      709       +3     
  Lines       69123    69320     +197     
  Branches     8064     8088      +24     
==========================================
+ Hits        64058    64236     +178     
- Misses       5065     5084      +19     
Impacted Files Coverage Δ
...s/date-picker/src/composables/useKeyboardEvents.ts 51.21% <50.00%> (ø)
...nts/date-picker/src/composables/useOverlayState.ts 93.33% <81.81%> (-6.67%) ⬇️
...omponents/date-picker/src/content/RangeContent.tsx 93.22% <88.33%> (-4.76%) ⬇️
...ges/components/date-picker/src/content/Content.tsx 93.20% <90.69%> (+0.06%) ⬆️
.../date-picker/src/composables/useRangePanelState.ts 91.66% <91.66%> (ø)
...ackages/components/date-picker/src/panel/Panel.tsx 94.93% <94.93%> (ø)
...es/components/date-picker/src/panel/RangePanel.tsx 95.60% <95.60%> (ø)
...ents/date-picker/src/composables/useActiveValue.ts 96.02% <96.02%> (ø)
...omponents/date-picker/__tests__/datePicker.spec.ts 100.00% <100.00%> (ø)
...ents/date-picker/__tests__/dateRangePicker.spec.ts 100.00% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1fef9c...dcaf52c. Read the comment docs.

@sallerli1 sallerli1 changed the title [WIP]feat(comp:date-picker): add DatePickerPanel & DateRangePickerPanel feat(comp:date-picker): add DatePickerPanel & DateRangePickerPanel Jun 22, 2022
@sallerli1 sallerli1 force-pushed the feat-extract-data-panel-saller branch 2 times, most recently from ef79ff0 to 01c5bae Compare June 22, 2022 09:27
visiblePanel: [String, Boolean] as PropType<'datePanel' | 'timePanel'>,

onChange: [Function, Array] as PropType<MaybeArray<(value: Date | undefined) => void>>,
'onUpdate:activeDate': [Function, Array] as PropType<MaybeArray<(date: Date | undefined) => void>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要么这里改成 onUpdate:activeValue, 要么上面的 activeValue 改成 activeDate ?

type: Object as PropType<TimePanelOptions>,
default: () => ({}),
},
visiblePanel: [String, Boolean] as PropType<'datePanel' | 'timePanel'>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
visiblePanel: [String, Boolean] as PropType<'datePanel' | 'timePanel'>,
visible: [String, Boolean] as PropType<'date' | 'time' | ‘boolean’>,

cellTooltip: Function as PropType<(cell: { value: Date; disabled: boolean }) => string | void>,
disabledDate: Function as PropType<(date: Date) => boolean>,
value: Date as PropType<Date>,
defaultOpenValue: Date as PropType<Date>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对于 panel 来说,这个 API 名字是不是得改下?
这个 API 现在看起来有点多余,群里问问有人用过这个 API 不?没人用就干掉?

>
export type DatePickerPanelInstance = InstanceType<DefineComponent<DatePickerPanelProps>>

export const dateRangePickerPanelProps = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟上面的都是一样的问题。

import { dateRangePickerPanelProps } from '../types'

export default defineComponent({
name: 'IxDateRangePickerPanel',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: 'IxDateRangePickerPanel',
name: 'IxDateRangePanel',

import { applyDateTime } from '../utils'

export default defineComponent({
name: 'IxDatePickerPanel',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: 'IxDatePickerPanel',
name: 'IxDatePanel',

Comment on lines 24 to 28
import {
IxDatePicker,
IxDatePickerPanel,
IxDateRangePicker,
IxDateRangePickerPanel,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import {
IxDatePicker,
IxDatePickerPanel,
IxDateRangePicker,
IxDateRangePickerPanel,
import {
IxDatePicker,
IxDatePanel,
IxDateRangePicker,
IxDateRangePanel,

@sallerli1 sallerli1 force-pushed the feat-extract-data-panel-saller branch 2 times, most recently from 3ed8a44 to 90a5d7e Compare June 28, 2022 07:24
@sallerli1 sallerli1 force-pushed the feat-extract-data-panel-saller branch from 90a5d7e to 04a7c69 Compare June 29, 2022 07:13
@sallerli1 sallerli1 force-pushed the feat-extract-data-panel-saller branch from 04a7c69 to dcaf52c Compare June 29, 2022 07:23
@danranVm danranVm merged commit 2a343c1 into IDuxFE:main Jun 30, 2022
@sallerli1 sallerli1 deleted the feat-extract-data-panel-saller branch February 20, 2023 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants