Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refactor-date-picker' into refac…
Browse files Browse the repository at this point in the history
…tor-date-picker
  • Loading branch information
AlekseyManetov committed Mar 27, 2024
2 parents 0c9b12a + 2c1237e commit 310a18e
Show file tree
Hide file tree
Showing 42 changed files with 2,428 additions and 3,204 deletions.
26 changes: 13 additions & 13 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/app",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"description": "EPAM Unified UI landing",
"author": "EPAM",
"license": "MIT",
Expand All @@ -17,19 +17,19 @@
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@elastic/apm-rum": "^5.14.0",
"@epam/assets": "5.7.0-alpha.0",
"@epam/draft-rte": "5.7.0-alpha.0",
"@epam/electric": "5.7.0-alpha.0",
"@epam/assets": "5.7.0",
"@epam/draft-rte": "5.7.0",
"@epam/electric": "5.7.0",
"@epam/internal": "0.0.1",
"@epam/loveship": "5.7.0-alpha.0",
"@epam/promo": "5.7.0-alpha.0",
"@epam/uui": "5.7.0-alpha.0",
"@epam/uui-components": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0-alpha.0",
"@epam/uui-db": "5.7.0-alpha.0",
"@epam/uui-docs": "5.7.0-alpha.0",
"@epam/uui-editor": "5.7.0-alpha.0",
"@epam/uui-timeline": "5.7.0-alpha.0",
"@epam/loveship": "5.7.0",
"@epam/promo": "5.7.0",
"@epam/uui": "5.7.0",
"@epam/uui-components": "5.7.0",
"@epam/uui-core": "5.7.0",
"@epam/uui-db": "5.7.0",
"@epam/uui-docs": "5.7.0",
"@epam/uui-editor": "5.7.0",
"@epam/uui-timeline": "5.7.0",
"@udecode/plate-common": "25.0.1",
"amplitude-js": "8.9.1",
"classnames": "2.2.6",
Expand Down
83 changes: 66 additions & 17 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,69 @@
# 5.x.x - xx.xx.2024
# 5.7.0 - 25.03.2024

**What's New**
* Scaling icons
* Added possibility to pin columns to the right side of the table via columns config dialog
* [DataTable]: added Expand All/Collapse All
* [Paginator]: added `isDisabled` property.
* [ColumnsConfigurationModal]
* Added the ability to pin columns to the right.
* New Scaling Icons Approach:
- Components now define the icon size based on their `props.size` value. You no longer need to pass an icon with an appropriate size for the component's size. The provided icon will now be scaled by the component itself.
- Added a new icons pack, new icons placed under the '@epam/assets/icon' path. Old icons still exist under the '@epam/assets/icon/common' path.
- This change doesn't require any immediate action from your side. You can continue using icons from the old icons pack. However, please note that icons which were passed to the components without adhering to the guidelines may now be scaled according to these guidelines.
* [DataTable]: Added possibility to pin columns to the right side of the table via columns config dialog
* [DataTable]: added 'Expand All/Collapse All' action in table header. They isn't rendered by default, to turn on pass `showFoldAll={ true }` to the DataTable props.
* [RTE]: added serialazer/deserializer for MD format. Read more [here](https://uui.epam.com/documents?id=rteSerializers&category=richTextEditor&theme=electric#md_format).
* [RTE]: added `onFocus` prop
* [IconButton]: added property `size`;
* [TimePicker]: added property `disableClear` to disable inputs' clear cross, if it needs;
* [FlexRow]: added property `topBorder` to add border on the top of the FlexRow;
* [Modals]: now the Modals closed by default if the URL was changed. You can turn this off passing `disableCloseOnRouterChange={true}` prop to ModalBlocker component.
* [Modals]: added `maxHeight` prop
* [Paginator]: added `isDisabled` property
* [IconButton]: added property `size`
* [TimePicker]: added property `disableClear` to disable inputs' clear cross
* [FlexRow]: deprecated property `spacing`, it will be removed in future releases. Please use `columnGap` instead. `spacing` prop now works via `columnGap`.
* [FlexRow]: added property `topBorder` to add border on the top of the FlexRow
* [FileUpload]: move wordings to the i18n
* [Modals]: added property `maxHeight` it equals `80dvh` in desktop mode and `100dvh` in mobile.
* [Modals]: added property `maxHeight` it equals `80dvh` in desktop mode and `100dvh` in mobile.
* [ColumnsConfigurationModal]: set `height` and `maxHeight` equals to `95dvh` and `mobile breakpoint` changed from 640px to `720px` as in all other modals.
* [DatePicker] renderDay prop callback signature updated
* [RangeDatePicker] renderDay prop callback signature updated
* [DatePickerBody] props breaking changes
* [RangeDatePickerBody] props breaking changes
* [ColumnsConfigurationModal]: small visual tweaks
* [Avatar]: changed default avatar img


**What's Fixed**
* [PickerInput]: fixed loading of selectedId with parents.
* Fixed partially selected with predefined selected value.
* Fixed fetching missing parents for selected element in PickerInput.
* [PickerInput]: fixed 'unknown records' removing
* [PickerInput]: Fixed focus reset after clicking outside
* [PickerInput]: fixed unnecessary PickerInput `onValueChange` calls on `dataSourceState` change(search, focusedIndex change) in single select with `valueType=entity`.
* [PickerList]: aligned caption by the left side in the footer.
* [DropdownContainer]: disable scroll to the focused element after dropdown close
* [DropdownContainer]: fixed warning about incorrect ref in React strict mode
* [Avatar]: change type of 'img' prop to also accept null value
* [RTE]: fixed table border rendering issues in Firefox
* [RTE]: fixed placeholder position in Safari
* [RTE]: fixed editor focusable area and appearing cursor on first click
* [RTE]: disable image resizing in readonly mode
* [RTE]: Fixed the position of the selected text toolbar within ShadowRoot for Chromium browsers.
* [DataTable]: changed default column `minWidht` value for resizing. For first columns now it's `78px`, for others `54px`.
* [DataTable]: prevent sorting change on column resize;
* [Blocker]: changed the exit animation duration from 1000ms to 200ms
* [ApiContext]: 'auth-lost' and 'connection-lost' errors in 'manual' error handling mode now handled by ApiContext itself
* [ApiContext]: add link to the login page in 'auth lost' modal
* [IconButton]: fixed property `isDropdown`;
* [Switch]: fixed property `isReadonly`;
* [TextArea]: fixed ability to scroll when `readonly` or `disable`;
* [Modals]: change 'accent' buttons to 'primary' in UUI built in modals
* [Badge]: small style tweaks according to the design

# 5.6.2 - 15.03.2024

**What's Fixed**
* [PickerInput]: fixed toggler blur in case searchPosition = 'none' i18n
* [ColumnsConfigurationModal]: small visual tweaks
* [Avatar]: changed default avatar img


**What's Fixed**
* [PickerInput]: fixed loading of selectedId with parents.
* Fixed returning checked = [] if emptyValue is not passed to PickerInput.(!!!need to revert!!!)
* Fixed partially selected with predefined selected value.
* Fixed fetching missing parents for selected element in PickerInput.
* [PickerInput]: fixed 'unknown records' removing
Expand All @@ -27,18 +73,21 @@
* [DropdownContainer]: disable scroll to the focused element after dropdown close
* [DropdownContainer]: fixed warning about incorrect ref in React strict mode
* [Avatar]: change type of 'img' prop to also accept null value
* [RTE]: fixed tabled border rendering issues in Firefox
* [RTE]: fixed table border rendering issues in Firefox
* [RTE]: fixed placeholder position in Safari
* [RTE]: fixed editor focusable area and appearing cursor on first click
* [RTE]: disable image resizing in readonly mode
* [RTE]: Fixed the position of the selected text toolbar within ShadowRoot for Chromium browsers.
* [DataTable]: changed default column `minWidht` value for resizing. For first columns now it's `78px`, for others `54px`.
* [DataTable]: prevent sorting change on column resize;
* [Blocker]: changed the exit animation duration from 1000ms to 200ms
* [SlateEditor]: Fixed the position of the selected text toolbar within ShadowRoot for Chromium browsers.
* [ApiContext]: 'auth-lost' and 'connection-lost' errors in 'manual' error handling mode now handled by ApiContext itself
* [ApiContext]: add link to the login page in 'auth lost' modal
* [IconButton]: fixed property `isDropdown`;
* [Switch]: fixed property `isReadonly`;
* [TextArea]: fixed ability to scroll when `readonly` or `disable`;
* [ModalBlocker]: now the Modals closed by default if the URL was changed. You can turn this off using property `disableCloseOnRouterChange`={true}.
* [FlexRow]: deprecated property `spacing`, it will be removed in future release. Please use `columnGap` instead. See more: https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap
* [DataTableHeaderCell]: stopped other onClick events during resizing process;
* [Modals]: change 'accent' buttons to 'primary' in UUI built in modals
* [Badge]: small style tweaks according to the design

# 5.6.2 - 15.03.2024

Expand Down
10 changes: 5 additions & 5 deletions draft-rte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/draft-rte",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"author": "EPAM",
"license": "MIT",
"main": "index.js",
Expand All @@ -11,10 +11,10 @@
"prepublish": "yarn build"
},
"dependencies": {
"@epam/assets": "5.7.0-alpha.0",
"@epam/loveship": "5.7.0-alpha.0",
"@epam/uui-components": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0-alpha.0",
"@epam/assets": "5.7.0",
"@epam/loveship": "5.7.0",
"@epam/uui-components": "5.7.0",
"@epam/uui-core": "5.7.0",
"@types/draft-js": "0.10.23",
"classnames": "^2.2.6",
"draft-convert": "^2.1.2",
Expand Down
2 changes: 1 addition & 1 deletion epam-assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/assets",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"description": "EPAM Assets Library",
"author": "EPAM",
"license": "MIT",
Expand Down
10 changes: 5 additions & 5 deletions epam-electric/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/electric",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"description": "EPAM UUI components set branded with 'electric' style",
"author": "EPAM",
"license": "MIT",
Expand All @@ -12,10 +12,10 @@
"prepublish": "yarn build"
},
"dependencies": {
"@epam/assets": "5.7.0-alpha.0",
"@epam/uui": "5.7.0-alpha.0",
"@epam/uui-components": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0-alpha.0"
"@epam/assets": "5.7.0",
"@epam/uui": "5.7.0",
"@epam/uui-components": "5.7.0",
"@epam/uui-core": "5.7.0"
},
"devDependencies": {
"mockdate": "^3.0.5"
Expand Down
10 changes: 5 additions & 5 deletions epam-promo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/promo",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"description": "EPAM UUI4 components set",
"author": "EPAM",
"license": "MIT",
Expand All @@ -12,10 +12,10 @@
"prepublish": "yarn build"
},
"dependencies": {
"@epam/assets": "5.7.0-alpha.0",
"@epam/uui": "5.7.0-alpha.0",
"@epam/uui-components": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0-alpha.0",
"@epam/assets": "5.7.0",
"@epam/uui": "5.7.0",
"@epam/uui-components": "5.7.0",
"@epam/uui-core": "5.7.0",
"@types/classnames": "2.2.6",
"@types/lodash.isequal": "4.5.5",
"@types/lodash.sortby": "4.7.6",
Expand Down
10 changes: 5 additions & 5 deletions extra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/uui-extra",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"description": "EPAM UUI components set branded with 'loveship' style",
"author": "EPAM",
"license": "MIT",
Expand All @@ -12,10 +12,10 @@
},
"dependencies": {
"@epam/assets": "4.5.3",
"@epam/loveship": "5.7.0-alpha.0",
"@epam/promo": "5.7.0-alpha.0",
"@epam/uui-components": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0-alpha.0",
"@epam/loveship": "5.7.0",
"@epam/promo": "5.7.0",
"@epam/uui-components": "5.7.0",
"@epam/uui-core": "5.7.0",
"@types/shallowequal": "^1.1.1",
"immutable": "3.8.2",
"shallowequal": "^1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"npmClient": "yarn",
"useWorkspaces": true,
"exact": true
Expand Down
10 changes: 5 additions & 5 deletions loveship/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/loveship",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"description": "EPAM UUI components set branded with 'loveship' style",
"author": "EPAM",
"license": "MIT",
Expand All @@ -12,10 +12,10 @@
"prepublish": "yarn build"
},
"dependencies": {
"@epam/assets": "5.7.0-alpha.0",
"@epam/uui": "5.7.0-alpha.0",
"@epam/uui-components": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0-alpha.0",
"@epam/assets": "5.7.0",
"@epam/uui": "5.7.0",
"@epam/uui-components": "5.7.0",
"@epam/uui-core": "5.7.0",
"@types/classnames": "2.2.6",
"@types/lodash.isequal": "4.5.5",
"@types/lodash.sortby": "4.7.6",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@types/node": "16.18.4",
"cross-env": "^7.0.3",
"husky": "8.0.3",
"lerna": "3.22.1",
"lerna": "5.6.2",
"lint-staged": "12.5.0",
"tslib": "^2.6.2",
"typedoc": "0.17.4",
Expand Down
2 changes: 1 addition & 1 deletion templates/uui-cra-template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/cra-template-uui",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"keywords": [
"UUI",
"react",
Expand Down
4 changes: 2 additions & 2 deletions test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/uui-test-utils",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"author": "EPAM",
"license": "MIT",
"private": false,
Expand All @@ -11,7 +11,7 @@
"prepublish": "yarn build"
},
"dependencies": {
"@epam/uui-core": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.4.3",
"@types/react-test-renderer": "18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion uui-build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/uui-build",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"bin": {
"epam-uui-build": "./bin/cli.js"
},
Expand Down
4 changes: 2 additions & 2 deletions uui-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epam/uui-components",
"version": "5.7.0-alpha.0",
"version": "5.7.0",
"description": "EPAM UUI Components",
"author": "EPAM",
"license": "MIT",
Expand All @@ -12,7 +12,7 @@
"prepublish": "yarn build"
},
"dependencies": {
"@epam/uui-core": "5.7.0-alpha.0",
"@epam/uui-core": "5.7.0",
"@popperjs/core": "2.9.0",
"@types/classnames": "2.2.6",
"@types/lodash.clone": "4.5.6",
Expand Down
18 changes: 13 additions & 5 deletions uui-components/src/inputs/DatePicker/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import dayjs, { Dayjs } from 'dayjs';
import localeData from 'dayjs/plugin/localeData.js';
import updateLocale from 'dayjs/plugin/updateLocale.js';
import {
arrayToMatrix, cx, CX, IHasCX, IHasForwardedRef, IHasRawProps,
arrayToMatrix, cx, IHasCX, IHasForwardedRef, IHasRawProps,
} from '@epam/uui-core';
import { Day, DayProps } from './Day';
import { uuiDaySelection } from './calendarConstants';
Expand All @@ -18,12 +18,14 @@ import css from './Calendar.module.scss';
export interface CalendarProps<TSelection> extends IHasCX, IHasRawProps<HTMLAttributes<HTMLDivElement>>, IHasForwardedRef<HTMLDivElement> {
value?: TSelection;
onValueChange: (day: Dayjs) => void;
month: Dayjs;
renderDay?: (renderProps: DayProps) => ReactElement<Element>;
filter?(day: Dayjs): boolean;
hideAnotherMonths?: boolean;
cx?: CX;
isHoliday?: (day: Dayjs) => boolean;
/**
* Represents displayed month
*/
month: Dayjs;
}

dayjs.extend(localeData);
Expand Down Expand Up @@ -124,7 +126,10 @@ export function Calendar<TSelection>(props: CalendarProps<TSelection>) {

const renderWeekdays = () =>
dayjs.weekdaysShort(true).map((weekday, index) => (
<div key={ `${weekday}-${index}` } className={ uuiDaySelection.weekday }>
<div
key={ `${weekday}-${index}` }
className={ uuiDaySelection.weekday }
>
{weekday}
</div>
));
Expand All @@ -139,7 +144,10 @@ export function Calendar<TSelection>(props: CalendarProps<TSelection>) {
<div className={ uuiDaySelection.weekdaysContainer }>
{renderWeekdays()}
</div>
<div className={ uuiDaySelection.days } style={ { height: weeksHeight } }>
<div
className={ uuiDaySelection.days }
style={ { height: weeksHeight } }
>
{renderDaysTable()}
</div>
</div>
Expand Down
Loading

0 comments on commit 310a18e

Please sign in to comment.