Skip to content

Commit acdabfb

Browse files
committed
Merge branch 'develop' into 2620-size-tokens-des-dev-alert
2 parents 4f1e9ee + eb89838 commit acdabfb

File tree

48 files changed

+60075
-50716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+60075
-50716
lines changed

.github/pull_request_template.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
- TSDoc comments for public interfaces is updated/provided or not needed
99
-->
1010

11-
#### Issue link(if exists):
12-
1311
### Description:
12+
13+
14+
#### Issue link:
15+
16+
#### QA notes:

app/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@epam/app",
3-
"version": "5.11.0-rc.0",
3+
"version": "5.11.0",
44
"description": "EPAM Unified UI landing",
55
"author": "EPAM",
66
"license": "MIT",
@@ -17,19 +17,19 @@
1717
"dependencies": {
1818
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
1919
"@elastic/apm-rum": "^5.14.0",
20-
"@epam/assets": "5.11.0-rc.0",
21-
"@epam/draft-rte": "5.11.0-rc.0",
22-
"@epam/electric": "5.11.0-rc.0",
20+
"@epam/assets": "5.11.0",
21+
"@epam/draft-rte": "5.11.0",
22+
"@epam/electric": "5.11.0",
2323
"@epam/internal": "0.0.2",
24-
"@epam/loveship": "5.11.0-rc.0",
25-
"@epam/promo": "5.11.0-rc.0",
26-
"@epam/uui": "5.11.0-rc.0",
27-
"@epam/uui-components": "5.11.0-rc.0",
28-
"@epam/uui-core": "5.11.0-rc.0",
29-
"@epam/uui-db": "5.11.0-rc.0",
30-
"@epam/uui-docs": "5.11.0-rc.0",
31-
"@epam/uui-editor": "5.11.0-rc.0",
32-
"@epam/uui-timeline": "5.11.0-rc.0",
24+
"@epam/loveship": "5.11.0",
25+
"@epam/promo": "5.11.0",
26+
"@epam/uui": "5.11.0",
27+
"@epam/uui-components": "5.11.0",
28+
"@epam/uui-core": "5.11.0",
29+
"@epam/uui-db": "5.11.0",
30+
"@epam/uui-docs": "5.11.0",
31+
"@epam/uui-editor": "5.11.0",
32+
"@epam/uui-timeline": "5.11.0",
3333
"@tanstack/react-query": "^5.17.19",
3434
"@udecode/plate-common": "31.3.2",
3535
"amplitude-js": "8.9.1",

app/src/demo/tables/editableTable/ProjectTableDemo.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function ProjectTableDemo() {
135135
}, []);
136136

137137
const insertTask = useCallback((position: DropPosition, relativeTask: Task | null = null, existingTask: Task | null = null) => {
138-
const taskToInsert: Task = existingTask ? { ...existingTask, type: 'task' } : { id: lastId--, name: '', type: 'task' };
138+
const taskToInsert: Task = existingTask ? { ...existingTask, type: 'task' } : { id: lastId--, name: '', type: 'task', parentId: null };
139139
const task: Task = setTaskInsertPosition(taskToInsert, relativeTask, position, treeRef.current);
140140

141141
setValue((currentValue) => {
@@ -153,9 +153,11 @@ export function ProjectTableDemo() {
153153
}
154154
}
155155

156-
let currentItems = currentValue.items
157-
.set(task.id, task)
158-
.set(parentTask.id, parentTask);
156+
let currentItems = currentValue.items.set(task.id, task);
157+
158+
if (parentTask) {
159+
currentValue.items.set(parentTask.id, parentTask);
160+
}
159161

160162
if (prevParentTask !== null && prevParentTask !== NOT_FOUND_RECORD) {
161163
currentItems = currentItems.set(prevParentTask.id, prevParentTask);

app/src/demo/tables/editableTable/TimelineMode.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export function TimelineMode({
3131
value={ tableState }
3232
onValueChange={ setTableState }
3333
dataTableFocusManager={ dataTableFocusManager }
34-
showColumnsConfig
3534
allowColumnsResizing
3635
allowColumnsReordering
3736
headerSize="60"

app/src/docs/_examples/multiSwitch/Basic.example.tsx

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
import React, { useState } from 'react';
22
import { FlexCell, MultiSwitch, Text } from '@epam/uui';
3+
4+
import { ReactComponent as TableIcon } from '@epam/assets/icons/content-view_table-outline.svg';
5+
import { ReactComponent as GridIcon } from '@epam/assets/icons/content-view_grid-fill.svg';
6+
import { ReactComponent as DetailsIcon } from '@epam/assets/icons/content-view_detailes-fill.svg';
7+
import { ReactComponent as StarIcon } from '@epam/assets/icons/communication-star-fill.svg';
8+
import { ReactComponent as ClockIcon } from '@epam/assets/icons/action-schedule-outline.svg';
9+
import { ReactComponent as ChatIcon } from '@epam/assets/icons/communication-chat-outline.svg';
10+
311
import css from './BasicExample.module.scss';
412

513
export default function BasicExample() {
6-
const [value, onValueChange] = useState(null);
14+
const [value, onValueChange] = useState('on');
15+
const [userType, userTypeOnValueChange] = useState();
16+
const [view, setView] = useState(1);
17+
const [filter, setFilter] = useState(2);
718

819
return (
920
<FlexCell width="auto" cx={ css.container }>
@@ -18,8 +29,8 @@ export default function BasicExample() {
1829
items={ [
1930
{ id: 1, caption: 'Mentee' }, { id: 2, caption: 'Mentor' }, { id: 3, caption: 'Coordinator' },
2031
] }
21-
value={ value }
22-
onValueChange={ onValueChange }
32+
value={ userType }
33+
onValueChange={ userTypeOnValueChange }
2334
/>
2435
<Text>With Grey border</Text>
2536
<MultiSwitch
@@ -28,18 +39,34 @@ export default function BasicExample() {
2839
{ id: 1, caption: 'Mentee' }, { id: 2, caption: 'Mentor' }, { id: 3, caption: 'Coordinator' },
2940
] }
3041
color="secondary"
31-
value={ value }
32-
onValueChange={ onValueChange }
42+
value={ userType }
43+
onValueChange={ userTypeOnValueChange }
3344
/>
3445
<Text>Disabled</Text>
3546
<MultiSwitch
3647
items={ [
3748
{ id: 1, caption: 'Mentee' }, { id: 2, caption: 'Mentor' }, { id: 3, caption: 'Coordinator' },
3849
] }
39-
value={ value }
40-
onValueChange={ onValueChange }
50+
value={ userType }
51+
onValueChange={ userTypeOnValueChange }
4152
isDisabled
4253
/>
54+
<Text>Icon only</Text>
55+
<MultiSwitch
56+
items={ [
57+
{ id: 1, icon: TableIcon }, { id: 2, icon: GridIcon }, { id: 3, icon: DetailsIcon },
58+
] }
59+
value={ view }
60+
onValueChange={ setView }
61+
/>
62+
<Text>Icon + Label</Text>
63+
<MultiSwitch
64+
items={ [
65+
{ id: 1, icon: StarIcon, caption: 'Starred' }, { id: 2, icon: ClockIcon, caption: 'Latest' }, { id: 3, icon: ChatIcon, caption: 'All chats' },
66+
] }
67+
value={ filter }
68+
onValueChange={ setFilter }
69+
/>
4370
</FlexCell>
4471
);
4572
}

app/src/docs/_examples/pickerInput/LazyTreeSearch.example.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default function LazyTreeSearch() {
1919
getId: (i) => i.id,
2020
getParentId: (i) => i.parentId,
2121
getChildCount: (l) => l.childCount,
22+
selectAll: false,
2223
},
2324
[],
2425
);
@@ -42,6 +43,7 @@ export default function LazyTreeSearch() {
4243
getId: (i) => i.id,
4344
getParentId: (i) => i.parentId,
4445
getChildCount: (l) => l.childCount,
46+
selectAll: false,
4547
},
4648
[],
4749
);

app/src/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { RouterProvider } from 'react-router';
44
import { createBrowserRouter } from 'react-router-dom';
55
import { init as initApm } from '@elastic/apm-rum';
66
import { Router6AdaptedRouter, useUuiServices, UuiContext, IProcessRequest, GAListener } from '@epam/uui-core';
7+
import { i18n } from '@epam/uui';
78
import { AmplitudeListener } from './analyticsEvents';
89
import { svc } from './services';
910
import App from './App';
@@ -19,6 +20,14 @@ import '@epam/assets/theme/theme_eduverse_light.scss';
1920
import '@epam/assets/theme/theme_eduverse_dark.scss';
2021
import './index.module.scss';
2122

23+
i18n.errorHandler.supportLink = (
24+
<>
25+
You can track the service availability at
26+
{' '}
27+
<a href={ `https://status.epam.com/?utm_source=${window.location.host}&utm_medium=ErrorPage&utm_campaign=StatusAquisitionTracking` }>status.epam.com</a>
28+
</>
29+
);
30+
2231
const router6 = createBrowserRouter([
2332
{ path: '*', element: <App /> },
2433
]);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.container {
2+
width: 60vw;
3+
max-width: 1024px;
4+
margin: 24px auto;
5+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import * as React from 'react';
2+
import {
3+
SlateEditor,
4+
defaultPlugins,
5+
imagePlugin,
6+
videoPlugin,
7+
attachmentPlugin,
8+
toDoListPlugin,
9+
baseMarksPlugin,
10+
linkPlugin,
11+
iframePlugin,
12+
notePlugin,
13+
separatorPlugin,
14+
uploadFilePlugin,
15+
tablePlugin,
16+
quotePlugin,
17+
colorPlugin,
18+
superscriptPlugin,
19+
headerPlugin,
20+
listPlugin,
21+
placeholderPlugin,
22+
codeBlockPlugin,
23+
EditorValue,
24+
} from '@epam/uui-editor';
25+
import { svc } from '../../services';
26+
import { demoData } from '@epam/uui-docs';
27+
import css from './RichTextEditorDemo.module.scss';
28+
import { ErrorNotification, Text } from '@epam/uui';
29+
import { FileUploadResponse } from '@epam/uui-core';
30+
31+
interface SlateEditorBasicExampleState {
32+
value: EditorValue;
33+
}
34+
35+
export class RichTextEditorDemoReadonly extends React.Component<any, SlateEditorBasicExampleState> {
36+
state: SlateEditorBasicExampleState = {
37+
value: demoData.slateInitialValue,
38+
};
39+
40+
onChange = (value: EditorValue) => {
41+
this.setState({ value: value });
42+
};
43+
44+
uploadFile = (file: File): Promise<FileUploadResponse> => {
45+
return svc.uuiApi.uploadFile('/upload/uploadFileMock', file, {})
46+
.catch((res) => {
47+
svc.uuiNotifications.show((props) =>
48+
<ErrorNotification { ...props }><Text>{ res.error.message }</Text></ErrorNotification>).catch(() => {});
49+
return Promise.reject(res);
50+
});
51+
};
52+
53+
plugins = [
54+
...defaultPlugins,
55+
...baseMarksPlugin(),
56+
headerPlugin(),
57+
colorPlugin(),
58+
superscriptPlugin(),
59+
listPlugin(),
60+
toDoListPlugin(),
61+
quotePlugin(),
62+
linkPlugin(),
63+
notePlugin(),
64+
uploadFilePlugin({ uploadFile: this.uploadFile }),
65+
attachmentPlugin(),
66+
imagePlugin(),
67+
videoPlugin(),
68+
iframePlugin(),
69+
separatorPlugin(),
70+
tablePlugin(),
71+
placeholderPlugin({
72+
items: [
73+
{
74+
name: 'Name',
75+
field: 'name',
76+
},
77+
{
78+
name: 'Email',
79+
field: 'email',
80+
},
81+
],
82+
}),
83+
codeBlockPlugin(),
84+
];
85+
86+
render() {
87+
return (
88+
<div className={ css.container }>
89+
<SlateEditor
90+
value={ this.state.value }
91+
onValueChange={ this.onChange }
92+
autoFocus={ true }
93+
plugins={ this.plugins }
94+
placeholder="Add description"
95+
minHeight="none"
96+
isReadonly={ true }
97+
/>
98+
</div>
99+
);
100+
}
101+
}

app/src/sandbox/SandboxPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { ReactQueryLocationsTable } from './reactQueryLocationsTable';
2323
import { ProjectTableDemo } from './editableTable';
2424
import { RtlExample } from './rtl/Rtl-example';
2525
import { DemoForm } from './rtl/form/DemoForm';
26+
import { RichTextEditorDemoReadonly } from './RTE-readonly/RichTextEditorDemo';
2627

2728
export function SandboxPage() {
2829
const items = useMemo(
@@ -41,7 +42,8 @@ export function SandboxPage() {
4142
{ id: 'SkillsBatteryPopover', name: 'Skills', component: Skills },
4243
{ id: 'TableCellsStylesSandbox', name: 'Table Cells/Rows styles', component: TableCellsStylesSandbox },
4344
{ id: 'AdaptivePanel', name: 'Adaptive panel', component: AdaptivePanelDemo },
44-
{ id: 'RTEDemo', name: 'RTE Demo', component: RichTextEditorDemo },
45+
{ id: 'RTEDemo', name: 'RTE Contents', component: RichTextEditorDemo },
46+
{ id: 'RTE-readonly', name: 'RTE Readonly', component: RichTextEditorDemoReadonly },
4547
{ id: 'tokens', name: 'Tokens' },
4648
{ parentId: 'tokens', id: 'tokensPalette', name: 'Palette', component: PalettePage },
4749
{ id: 'rtl-example', name: 'Rtl-example', component: RtlExample },

0 commit comments

Comments
 (0)