Skip to content

Commit 63c344b

Browse files
committed
Merge branch 'dev' into worldMap
2 parents 7badf2c + a269ac4 commit 63c344b

File tree

13 files changed

+222
-118
lines changed

13 files changed

+222
-118
lines changed

CHANGELOG.json

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,47 @@
44
"version": "3.22.0",
55
"changes": {
66
"new": [
7-
7+
88
],
99
"enhancements": [
1010
"SharePoint Framework v1.21.1 support [#1998](https://github.com/pnp/sp-dev-fx-controls-react/pull/1998)",
1111
"`ListItemComments`: Implement like and unlike ability to list item comments control [#1974](https://github.com/pnp/sp-dev-fx-controls-react/pull/1974)",
1212
"`ListItemComments`: Need a feature to view the list of users who liked a comment [#2003](https://github.com/pnp/sp-dev-fx-controls-react/issues/2003)",
13-
"`ListItemComments`: Clickable links [#1969](https://github.com/pnp/sp-dev-fx-controls-react/issues/1969)"
13+
"`ListItemComments`: Clickable links [#1969](https://github.com/pnp/sp-dev-fx-controls-react/issues/1969)",
14+
"`Polish translations`: Updates Polish translations. Closes #1991](https://github.com/pnp/sp-dev-fx-controls-react/issues/1991)",
15+
"`Dashboard`: Dashboard widget rowspan [#2007](https://github.com/pnp/sp-dev-fx-controls-react/pull/2007)",
16+
"`ListItemComments`: Guest user @-mentions and styling fix for ListItemComments [#1990](https://github.com/pnp/sp-dev-fx-controls-react/pull/1990)",
17+
"`GridLayout`: 1852 - Grid layout settings as parameters [#1976](https://github.com/pnp/sp-dev-fx-controls-react/pull/1976)"
1418
],
1519
"fixes": [
1620
"`DynamicForm`: Added choice radio button handling [#1798](https://github.com/pnp/sp-dev-fx-controls-react/pull/1798)",
1721
"`FilePicker`: Global quill styles from FilePicker overwrite other quill editors [#1996](https://github.com/pnp/sp-dev-fx-controls-react/issues/1996)",
18-
"`FilePicker`: Unable to browse through organization assets library when located on root site [#1784](https://github.com/pnp/sp-dev-fx-controls-react/issues/1784)"
22+
"`FilePicker`: Unable to browse through organization assets library when located on root site [#1784](https://github.com/pnp/sp-dev-fx-controls-react/issues/1784)",
23+
"`Calendar`: Fix - fix-typo-enableOnHover [#2021](https://github.com/pnp/sp-dev-fx-controls-react/pull/2021)",
24+
"`Dynamic Form`: Hotfix for issue 2014 [#2026](https://github.com/pnp/sp-dev-fx-controls-react/issues/2014)",
25+
"`ListItemAttachments`: Update ListItemAttachments.tsx: let user set webUrl fix for issue 1975 [#2009](https://github.com/pnp/sp-dev-fx-controls-react/issues/1975",
26+
"`FilePicker`: Files keep loading when previewing all files in OneDrive [#2021](https://github.com/pnp/sp-dev-fx-controls-react/issues/1994)",
27+
"`ListItemAttachments`: ListItemAttachments cancel event is hanging the control [#1982](https://github.com/pnp/sp-dev-fx-controls-react/issues/1966)",
28+
"`filePicker`: FilePicker order of tabs and default tab[#1980](https://github.com/pnp/sp-dev-fx-controls-react/issues/921) ",
29+
"`ListView` ListView: add new prop - flattenItems [#189](https://github.com/pnp/sp-dev-fx-controls-react/issues/189) , [#222](https://github.com/pnp/sp-dev-fx-controls-react/issues/222)",
30+
"`DynamicForm`: issue with fields that are not part of [#1986](https://github.com/pnp/sp-dev-fx-controls-react/issues/1986)"
1931
]
2032
},
2133
"contributions": [
2234
"[Alberto Gutierrez Perez](https://github.com/albegut)",
2335
"[Alex Terentiev](https://github.com/AJIXuMuK)",
36+
"[Antanina Druzhkina](https://github.com/Ateina)",
37+
"[Floris Pleegzorg Oost-Vlaanderen](https://github.com/Floris-Pleegzorg-Oost-Vlaanderen)",
2438
"[Guido Zambarda](https://github.com/GuidoZam)",
25-
"[Sandeep P S](https://github.com/Sandeep-FED)"
26-
]
39+
"[Joseph Jang](https://github.com/heesungjang)",
40+
"[Michał Kornet](https://github.com/mkm17)",
41+
"[Michaël Maillot](https://github.com/michaelmaillot)",
42+
"[Nishkalank Bezawada](https://github.com/NishkalankBezawada)",
43+
"[Patrik Hellgren](https://github.com/PatrikHellgren)",
44+
"[Sandeep P S](https://github.com/Sandeep-FED)",
45+
"[Valeras Narbutas](https://github.com/ValerasNarbutas)",
46+
"[wuxiaojun514](https://github.com/wuxiaojun514)"
47+
]
2748
},
2849
{
2950
"version": "3.21.0",

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,28 @@
88
- `ListItemComments`: Implement like and unlike ability to list item comments control [#1974](https://github.com/pnp/sp-dev-fx-controls-react/pull/1974)
99
- `ListItemComments`: Need a feature to view the list of users who liked a comment [#2003](https://github.com/pnp/sp-dev-fx-controls-react/issues/2003)
1010
- `ListItemComments`: Clickable links [#1969](https://github.com/pnp/sp-dev-fx-controls-react/issues/1969)
11+
- `Polish translations`: Updates Polish translations. Closes #1991](https://github.com/pnp/sp-dev-fx-controls-react/issues/1991)
12+
- `Dashboard`: Dashboard widget rowspan [#2007](https://github.com/pnp/sp-dev-fx-controls-react/pull/2007)
13+
- `ListItemComments`: Guest user @-mentions and styling fix for ListItemComments [#1990](https://github.com/pnp/sp-dev-fx-controls-react/pull/1990)
14+
- `GridLayout`: 1852 - Grid layout settings as parameters [#1976](https://github.com/pnp/sp-dev-fx-controls-react/pull/1976)
1115

1216
### Fixes
1317

1418
- `DynamicForm`: Added choice radio button handling [#1798](https://github.com/pnp/sp-dev-fx-controls-react/pull/1798)
1519
- `FilePicker`: Global quill styles from FilePicker overwrite other quill editors [#1996](https://github.com/pnp/sp-dev-fx-controls-react/issues/1996)
1620
- `FilePicker`: Unable to browse through organization assets library when located on root site [#1784](https://github.com/pnp/sp-dev-fx-controls-react/issues/1784)
21+
- `Calendar`: Fix - fix-typo-enableOnHover [#2021](https://github.com/pnp/sp-dev-fx-controls-react/pull/2021)
22+
- `Dynamic Form`: Hotfix for issue 2014 [#2026](https://github.com/pnp/sp-dev-fx-controls-react/issues/2014)
23+
- `ListItemAttachments`: Update ListItemAttachments.tsx: let user set webUrl fix for issue 1975 [#2009](https://github.com/pnp/sp-dev-fx-controls-react/issues/1975
24+
- `FilePicker`: Files keep loading when previewing all files in OneDrive [#2021](https://github.com/pnp/sp-dev-fx-controls-react/issues/1994)
25+
- `ListItemAttachments`: ListItemAttachments cancel event is hanging the control [#1982](https://github.com/pnp/sp-dev-fx-controls-react/issues/1966)
26+
- `filePicker`: FilePicker order of tabs and default tab[#1980](https://github.com/pnp/sp-dev-fx-controls-react/issues/921)
27+
- `ListView` ListView: add new prop - flattenItems [#189](https://github.com/pnp/sp-dev-fx-controls-react/issues/189) , [#222](https://github.com/pnp/sp-dev-fx-controls-react/issues/222)
28+
- `DynamicForm`: issue with fields that are not part of [#1986](https://github.com/pnp/sp-dev-fx-controls-react/issues/1986)
1729

1830
### Contributors
1931

20-
Special thanks to our contributors (in alphabetical order): [Alberto Gutierrez Perez](https://github.com/albegut), [Alex Terentiev](https://github.com/AJIXuMuK), [Guido Zambarda](https://github.com/GuidoZam), [Sandeep P S](https://github.com/Sandeep-FED).
32+
Special thanks to our contributors (in alphabetical order): [Alberto Gutierrez Perez](https://github.com/albegut), [Alex Terentiev](https://github.com/AJIXuMuK), [Antanina Druzhkina](https://github.com/Ateina), [Floris Pleegzorg Oost-Vlaanderen](https://github.com/Floris-Pleegzorg-Oost-Vlaanderen), [Guido Zambarda](https://github.com/GuidoZam), [Joseph Jang](https://github.com/heesungjang), [Michał Kornet](https://github.com/mkm17), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Patrik Hellgren](https://github.com/PatrikHellgren), [Sandeep P S](https://github.com/Sandeep-FED), [Valeras Narbutas](https://github.com/ValerasNarbutas), [wuxiaojun514](https://github.com/wuxiaojun514).
2133

2234
## 3.21.0
2335

docs/documentation/docs/about/release-notes.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,28 @@
88
- `ListItemComments`: Implement like and unlike ability to list item comments control [#1974](https://github.com/pnp/sp-dev-fx-controls-react/pull/1974)
99
- `ListItemComments`: Need a feature to view the list of users who liked a comment [#2003](https://github.com/pnp/sp-dev-fx-controls-react/issues/2003)
1010
- `ListItemComments`: Clickable links [#1969](https://github.com/pnp/sp-dev-fx-controls-react/issues/1969)
11+
- `Polish translations`: Updates Polish translations. Closes #1991](https://github.com/pnp/sp-dev-fx-controls-react/issues/1991)
12+
- `Dashboard`: Dashboard widget rowspan [#2007](https://github.com/pnp/sp-dev-fx-controls-react/pull/2007)
13+
- `ListItemComments`: Guest user @-mentions and styling fix for ListItemComments [#1990](https://github.com/pnp/sp-dev-fx-controls-react/pull/1990)
14+
- `GridLayout`: 1852 - Grid layout settings as parameters [#1976](https://github.com/pnp/sp-dev-fx-controls-react/pull/1976)
1115

1216
### Fixes
1317

1418
- `DynamicForm`: Added choice radio button handling [#1798](https://github.com/pnp/sp-dev-fx-controls-react/pull/1798)
1519
- `FilePicker`: Global quill styles from FilePicker overwrite other quill editors [#1996](https://github.com/pnp/sp-dev-fx-controls-react/issues/1996)
1620
- `FilePicker`: Unable to browse through organization assets library when located on root site [#1784](https://github.com/pnp/sp-dev-fx-controls-react/issues/1784)
21+
- `Calendar`: Fix - fix-typo-enableOnHover [#2021](https://github.com/pnp/sp-dev-fx-controls-react/pull/2021)
22+
- `Dynamic Form`: Hotfix for issue 2014 [#2026](https://github.com/pnp/sp-dev-fx-controls-react/issues/2014)
23+
- `ListItemAttachments`: Update ListItemAttachments.tsx: let user set webUrl fix for issue 1975 [#2009](https://github.com/pnp/sp-dev-fx-controls-react/issues/1975
24+
- `FilePicker`: Files keep loading when previewing all files in OneDrive [#2021](https://github.com/pnp/sp-dev-fx-controls-react/issues/1994)
25+
- `ListItemAttachments`: ListItemAttachments cancel event is hanging the control [#1982](https://github.com/pnp/sp-dev-fx-controls-react/issues/1966)
26+
- `filePicker`: FilePicker order of tabs and default tab[#1980](https://github.com/pnp/sp-dev-fx-controls-react/issues/921)
27+
- `ListView` ListView: add new prop - flattenItems [#189](https://github.com/pnp/sp-dev-fx-controls-react/issues/189) , [#222](https://github.com/pnp/sp-dev-fx-controls-react/issues/222)
28+
- `DynamicForm`: issue with fields that are not part of [#1986](https://github.com/pnp/sp-dev-fx-controls-react/issues/1986)
1729

1830
### Contributors
1931

20-
Special thanks to our contributors (in alphabetical order): [Alberto Gutierrez Perez](https://github.com/albegut), [Alex Terentiev](https://github.com/AJIXuMuK), [Guido Zambarda](https://github.com/GuidoZam), [Sandeep P S](https://github.com/Sandeep-FED).
32+
Special thanks to our contributors (in alphabetical order): [Alberto Gutierrez Perez](https://github.com/albegut), [Alex Terentiev](https://github.com/AJIXuMuK), [Antanina Druzhkina](https://github.com/Ateina), [Floris Pleegzorg Oost-Vlaanderen](https://github.com/Floris-Pleegzorg-Oost-Vlaanderen), [Guido Zambarda](https://github.com/GuidoZam), [Joseph Jang](https://github.com/heesungjang), [Michał Kornet](https://github.com/mkm17), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Patrik Hellgren](https://github.com/PatrikHellgren), [Sandeep P S](https://github.com/Sandeep-FED), [Valeras Narbutas](https://github.com/ValerasNarbutas), [wuxiaojun514](https://github.com/wuxiaojun514).
2133

2234
## 3.21.0
2335

docs/documentation/docs/controls/FilePicker.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ The FilePicker component can be configured with the following properties:
107107
| includePageLibraries | boolean | no | Specifies if Site Pages library to be visible on Sites tab |
108108
| allowExternalLinks | boolean | no | Specifies if external links should be allowed. |
109109
| checkIfFileExists | boolean | no | When using file links, this property allows the user to choose if the control should check if the link point to a file that exists or not. |
110+
| tabOrder | FilePickerTab[]| no | Defines a custom display order for the tabs. Tabs not listed will follow their default order. |
111+
| defaultSelectedTab | FilePickerTab | no | Sets the default selected tab. If not specified, the first visible tab is used. |
110112

111-
interface `IFilePickerResult`
113+
Interface `IFilePickerResult`
112114

113115
Provides options for carousel buttons location.
114116

@@ -120,4 +122,20 @@ Provides options for carousel buttons location.
120122
| fileSize | number | Size of the result (in bytes). Set only for file upload |
121123
| downloadFileContent | () => Promise<File> | Function allows to download file content. Returns File object. |
122124

125+
Enum `FilePickerTab`
126+
127+
Represents the available tabs in the File Picker component. Each tab corresponds to a different source from which users can select files.
128+
129+
| Name | Description |
130+
|-----------------|-------------------------------------------------------|
131+
| Recent | Displays recently used files. |
132+
| StockImages | Shows stock image selection. |
133+
| Web | Allows searching files from the web. |
134+
| OrgAssets | Displays organizational assets. |
135+
| OneDrive | Allows file selection from OneDrive. |
136+
| Site | Enables browsing site files. |
137+
| Upload | Provides option to upload local files. |
138+
| Link | Lets the user add a file via a URL. |
139+
| MultipleUpload | Supports uploading multiple files at once. |
140+
123141
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/filePicker/FilePicker)

src/controls/calendar/EventPopoverCard.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import {
1313

1414
import { EventDetailsPopover } from "./EventDetailsPopover";
1515
import { IEvent } from "./models/IEvents";
16-
import { Stack } from "@nuvemerudita/react-controls";
17-
import { useUtils } from "./hooks/useUtils";
16+
import { Stack } from "@nuvemerudita/react-controls";
17+
import { useUtils } from "./hooks/useUtils";
1818
import { useWeekViewStyles } from "./hooks/useWeekViewStyles";
1919

2020
interface EventPopoverCardProps {
@@ -35,15 +35,18 @@ export const EventPopoverCard: React.FC<EventPopoverCardProps> = ({
3535
eventCount,
3636
}) => {
3737
const headerId = useId();
38-
const { styles, applyEventHouverColorClass , appyDynamicStyles} = useWeekViewStyles();
38+
const { styles, applyEventHouverColorClass, appyDynamicStyles } =
39+
useWeekViewStyles();
3940
const cardRef = React.useRef<HTMLDivElement>(null);
4041
const { formatDate } = useUtils();
4142

4243
const cardContent = React.useMemo(
4344
() => (
4445
<div>
4546
<Stack columnGap={4} verticalAlign="center">
46-
<Caption1Strong className={styles.eventTitle}>{event.title}</Caption1Strong>
47+
<Caption1Strong className={styles.eventTitle}>
48+
{event.title}
49+
</Caption1Strong>
4750
<Stack
4851
columnGap={4}
4952
horizontal
@@ -57,7 +60,7 @@ export const EventPopoverCard: React.FC<EventPopoverCardProps> = ({
5760
</Stack>
5861
</div>
5962
),
60-
[event]
63+
[event],
6164
);
6265

6366
return (
@@ -66,12 +69,14 @@ export const EventPopoverCard: React.FC<EventPopoverCardProps> = ({
6669
key={event.id}
6770
className={mergeClasses(
6871
styles.eventCard,
69-
applyEventHouverColorClass(colors.backgroundColor, colors.backgroundColor),
70-
appyDynamicStyles(eventIndex, eventCount, rowHeight, spanSlots)
72+
applyEventHouverColorClass(
73+
colors.backgroundColor,
74+
colors.backgroundColor,
75+
),
76+
appyDynamicStyles(eventIndex, eventCount, rowHeight, spanSlots),
7177
)}
72-
7378
>
74-
{event.enableOnHouver ? (
79+
{event.enableOnHover ? (
7580
<Popover
7681
withArrow
7782
mouseLeaveDelay={50}
@@ -82,9 +87,7 @@ export const EventPopoverCard: React.FC<EventPopoverCardProps> = ({
8287
<PopoverTrigger>{cardContent}</PopoverTrigger>
8388
<PopoverSurface
8489
aria-labelledby={headerId}
85-
className={mergeClasses(
86-
styles.popoverContent,
87-
)}
90+
className={mergeClasses(styles.popoverContent)}
8891
>
8992
<EventDetailsPopover event={event} />
9093
</PopoverSurface>

src/controls/calendar/RenderEventToDayOfMonth.tsx

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable @typescript-eslint/explicit-function-return-type */
22
/* eslint-disable @typescript-eslint/no-explicit-any */
3-
import * as React from 'react';
3+
import * as React from "react";
44

55
import {
66
Caption1,
@@ -10,15 +10,15 @@ import {
1010
PositioningImperativeRef,
1111
mergeClasses,
1212
useId,
13-
} from '@fluentui/react-components';
14-
import { endOfDay, isWithinInterval, startOfDay } from 'date-fns';
13+
} from "@fluentui/react-components";
14+
import { endOfDay, isWithinInterval, startOfDay } from "date-fns";
1515

16-
import { Card } from '@nuvemerudita/react-controls';
17-
import { EventDetailsPopover } from './EventDetailsPopover';
18-
import { IEvent } from './models/IEvents';
19-
import { IEventColors } from './models/IEventColors';
20-
import { useCalendarStyles } from './hooks/useCalendarStyles';
21-
import { useUtils } from './hooks/useUtils';
16+
import { Card } from "@nuvemerudita/react-controls";
17+
import { EventDetailsPopover } from "./EventDetailsPopover";
18+
import { IEvent } from "./models/IEvents";
19+
import { IEventColors } from "./models/IEventColors";
20+
import { useCalendarStyles } from "./hooks/useCalendarStyles";
21+
import { useUtils } from "./hooks/useUtils";
2222

2323
export interface IRenderEventToDayOfMonthProps {
2424
events: IEvent[];
@@ -43,7 +43,7 @@ export const RenderEventToDayOfMonth: React.FunctionComponent<
4343
onCardHoverChange(true, eventTitle);
4444
}
4545
},
46-
[onCardHoverChange]
46+
[onCardHoverChange],
4747
);
4848

4949
const handleMouseLeave = React.useCallback(
@@ -52,15 +52,15 @@ export const RenderEventToDayOfMonth: React.FunctionComponent<
5252
onCardHoverChange(false, eventTitle);
5353
}
5454
},
55-
[onCardHoverChange]
55+
[onCardHoverChange],
5656
);
5757

5858
// Set the target for the popover
5959
const buttonRef = React.useCallback(
6060
(el: HTMLDivElement | null) => {
6161
positioningRef.current?.setTarget(el);
6262
},
63-
[positioningRef]
63+
[positioningRef],
6464
);
6565

6666
// Render the card
@@ -74,22 +74,22 @@ export const RenderEventToDayOfMonth: React.FunctionComponent<
7474
styles.eventCard,
7575
applyEventHouverColorClass(
7676
colors.backgroundColor,
77-
colors.backgroundColor
78-
)
77+
colors.backgroundColor,
78+
),
7979
)}
8080
paddingTop="4px"
8181
paddingBottom="4px"
8282
paddingLeft="8px"
8383
paddingRight="8px"
84-
marginTop={index === 0 ? '0px' : '5px'}
84+
marginTop={index === 0 ? "0px" : "5px"}
8585
cardHeader={<Caption1>{calEvent.title}</Caption1>}
8686
onMouseEnter={() => handleMouseEnter(calEvent.title)}
8787
onMouseLeave={() => handleMouseLeave(calEvent.title)}
8888
/>
8989
</div>
9090
);
9191
},
92-
[handleMouseEnter, handleMouseLeave, applyEventHouverColorClass]
92+
[handleMouseEnter, handleMouseLeave, applyEventHouverColorClass],
9393
);
9494

9595
const renderCardWithPopOver = React.useCallback(
@@ -109,18 +109,15 @@ export const RenderEventToDayOfMonth: React.FunctionComponent<
109109
</PopoverTrigger>
110110
<PopoverSurface
111111
aria-labelledby={headerId}
112-
className={mergeClasses(
113-
styles.popoverContent,
114-
115-
)}
112+
className={mergeClasses(styles.popoverContent)}
116113
>
117114
<EventDetailsPopover event={calEvent} />
118115
</PopoverSurface>
119116
</Popover>
120117
</>
121118
);
122119
},
123-
[renderCard]
120+
[renderCard],
124121
);
125122

126123
if (!events || !events?.length) return <> </>;
@@ -150,11 +147,11 @@ export const RenderEventToDayOfMonth: React.FunctionComponent<
150147
return React.cloneElement(customRender as React.ReactElement, {
151148
className: mergeClasses(
152149
(customRender.props as any).className,
153-
styles.eventCard
150+
styles.eventCard,
154151
),
155152
});
156153
}
157-
return calEvent.enableOnHouver
154+
return calEvent.enableOnHover
158155
? renderCardWithPopOver(calEvent, index, colors)
159156
: renderCard(index, calEvent, colors);
160157
})}

0 commit comments

Comments
 (0)