Skip to content

Commit 6aa8978

Browse files
xjerwaaarongreenwald
authored andcommitted
[Fabric] Upgrade office-ui-fabric-react to v6.201.1 (#135)
* Update to Fabric v6.201.1 * Minor binding fixes
1 parent e3e7c8c commit 6aa8978

28 files changed

+263
-185
lines changed

libs/fabric/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@angular/core": "^8.0.2",
5050
"@angular/platform-browser-dynamic": "^8.0.2",
5151
"@angular/platform-browser": "^8.0.2",
52-
"office-ui-fabric-react": "6.151.0",
52+
"office-ui-fabric-react": "6.201.1",
5353
"react-dom": "^16.6.3",
5454
"react": "^16.6.3"
5555
}

libs/fabric/src/lib/components/breadcrumb/breadcrumb.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import { IBreadcrumbItem, IBreadcrumbProps } from 'office-ui-fabric-react/lib/Br
3030
[overflowIndex]="overflowIndex"
3131
[styles]="styles"
3232
[theme]="theme"
33+
[focusZoneProps]="focusZoneProps"
34+
[tooltipHostProps]="tooltipHostProps"
3335
[RenderItem]="renderItem && onRenderItem"
3436
[ReduceData]="onReduceData"
3537
>
@@ -51,6 +53,8 @@ export class FabBreadcrumbComponent extends ReactWrapperComponent<IBreadcrumbPro
5153
@Input() overflowIndex?: IBreadcrumbProps['overflowIndex'];
5254
@Input() styles?: IBreadcrumbProps['styles'];
5355
@Input() theme?: IBreadcrumbProps['theme'];
56+
@Input() focusZoneProps?: IBreadcrumbProps['focusZoneProps'];
57+
@Input() tooltipHostProps?: IBreadcrumbProps['tooltipHostProps'];
5458

5559
@Input() renderItem?: InputRendererOptions<IBreadcrumbItem>;
5660
@Input('reduceData') onReduceData?: IBreadcrumbProps['onReduceData'];

libs/fabric/src/lib/components/calendar/directives/calendar-strings-directive.component.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,30 @@ export class CalendarStringsDirective {
1515
@Input() days: ICalendarStrings['days'];
1616
@Input() shortDays: ICalendarStrings['shortDays'];
1717
@Input() goToToday: ICalendarStrings['goToToday'];
18-
@Input() weekNumberFormatString: ICalendarStrings['weekNumberFormatString'];
18+
@Input() prevMonthAriaLabel?: ICalendarStrings['prevMonthAriaLabel'];
19+
@Input() nextMonthAriaLabel?: ICalendarStrings['nextMonthAriaLabel'];
20+
@Input() prevYearAriaLabel?: ICalendarStrings['prevYearAriaLabel'];
21+
@Input() nextYearAriaLabel?: ICalendarStrings['nextYearAriaLabel'];
22+
@Input() prevYearRangeAriaLabel?: ICalendarStrings['prevYearRangeAriaLabel'];
23+
@Input() nextYearRangeAriaLabel?: ICalendarStrings['nextYearRangeAriaLabel'];
24+
@Input() closeButtonAriaLabel?: ICalendarStrings['closeButtonAriaLabel'];
25+
@Input() weekNumberFormatString?: ICalendarStrings['weekNumberFormatString'];
26+
1927

20-
2128
get strings(): ICalendarStrings {
2229
return {
2330
months: this.months,
2431
shortMonths: this.shortMonths,
2532
days: this.days,
2633
shortDays: this.shortDays,
2734
goToToday: this.goToToday,
35+
prevMonthAriaLabel: this.prevMonthAriaLabel,
36+
nextMonthAriaLabel: this.nextMonthAriaLabel,
37+
prevYearAriaLabel: this.prevYearAriaLabel,
38+
nextYearAriaLabel: this.nextYearAriaLabel,
39+
prevYearRangeAriaLabel: this.prevYearRangeAriaLabel,
40+
nextYearRangeAriaLabel: this.nextYearRangeAriaLabel,
41+
closeButtonAriaLabel: this.closeButtonAriaLabel,
2842
weekNumberFormatString: this.weekNumberFormatString
2943
}
3044
}

libs/fabric/src/lib/components/callout/callout.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
5353
[theme]="theme"
5454
[styles]="styles"
5555
[hidden]="hidden"
56+
[shouldRestoreFocus]="shouldRestoreFocus"
5657
(onLayerMounted)="onLayerMounted.emit()"
5758
(onPositioned)="onPositioned.emit($event)"
5859
(onDismiss)="onDismiss.emit($event)"
@@ -67,7 +68,6 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
6768
export class FabCalloutComponent extends ReactWrapperComponent<ICalloutProps> {
6869
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;
6970

70-
@Input() componentRef?: ICalloutProps['componentRef'];
7171
@Input() target?: ICalloutProps['target'];
7272
@Input() directionalHint?: ICalloutProps['directionalHint'];
7373
@Input() directionalHintForRTL?: ICalloutProps['directionalHintForRTL'];
@@ -98,6 +98,7 @@ export class FabCalloutComponent extends ReactWrapperComponent<ICalloutProps> {
9898
@Input() theme?: ICalloutProps['theme'];
9999
@Input() styles?: ICalloutProps['styles'];
100100
@Input() hidden?: ICalloutProps['hidden'];
101+
@Input() shouldRestoreFocus?: ICalloutProps['shouldRestoreFocus'];
101102

102103
@Output() readonly onLayerMounted = new EventEmitter<void>();
103104
@Output() readonly onPositioned = new EventEmitter<{ positions?: ICalloutPositionedInfo }>();

libs/fabric/src/lib/components/callout/focus-trap-callout.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
5454
[theme]="theme"
5555
[styles]="styles"
5656
[hidden]="hidden"
57+
[shouldRestoreFocus]="shouldRestoreFocus"
5758
[focusTrapProps]="focusTrapProps"
5859
(onLayerMounted)="onLayerMounted.emit()"
5960
(onPositioned)="onPositioned.emit($event)"
@@ -67,9 +68,8 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
6768
changeDetection: ChangeDetectionStrategy.OnPush,
6869
})
6970
export class FabFocusTrapCalloutComponent extends ReactWrapperComponent<IFocusTrapCalloutProps> {
70-
@ViewChild('reactNode') protected reactNodeRef: ElementRef;
71+
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;
7172

72-
@Input() componentRef?: IFocusTrapCalloutProps['componentRef'];
7373
@Input() target?: IFocusTrapCalloutProps['target'];
7474
@Input() directionalHint?: IFocusTrapCalloutProps['directionalHint'];
7575
@Input() directionalHintForRTL?: IFocusTrapCalloutProps['directionalHintForRTL'];
@@ -100,6 +100,7 @@ export class FabFocusTrapCalloutComponent extends ReactWrapperComponent<IFocusTr
100100
@Input() theme?: IFocusTrapCalloutProps['theme'];
101101
@Input() styles?: IFocusTrapCalloutProps['styles'];
102102
@Input() hidden?: IFocusTrapCalloutProps['hidden'];
103+
@Input() shouldRestoreFocus?: IFocusTrapCalloutProps['shouldRestoreFocus'];
103104
@Input() focusTrapProps?: IFocusTrapCalloutProps['focusTrapProps'];
104105

105106
@Output() readonly onLayerMounted = new EventEmitter<void>();

libs/fabric/src/lib/components/combo-box/base-combo-box.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export abstract class FabBaseComboBoxComponent extends ReactWrapperComponent<ICo
4040
@Input() isButtonAriaHidden?: IComboBoxProps['isButtonAriaHidden'];
4141
@Input() ariaDescribedBy?: IComboBoxProps['ariaDescribedBy'];
4242
@Input() keytipProps?: IComboBoxProps['keytipProps'];
43+
@Input() persistMenu?: IComboBoxProps['persistMenu'];
44+
@Input() shouldRestoreFocus?: IComboBoxProps['shouldRestoreFocus'];
4345
@Input() resolveOptions?: (options: IComboBoxOption[]) => IComboBoxOption[] | PromiseLike<IComboBoxOption[]>;
4446

4547
@Input() renderLowerContent?: InputRendererOptions<IComboBoxProps>;
@@ -62,6 +64,7 @@ export abstract class FabBaseComboBoxComponent extends ReactWrapperComponent<ICo
6264
}>();
6365
@Output() readonly onMenuOpen = new EventEmitter<void>();
6466
@Output() readonly onMenuDismissed = new EventEmitter<void>();
67+
@Output() readonly onMenuDismiss = new EventEmitter<void>();
6568
@Output() readonly onScrollToItem = new EventEmitter<{ itemIndex: number }>();
6669

6770
@ContentChild(ComboBoxOptionsDirective, { static: true }) readonly comboBoxOptionsDirective?: ComboBoxOptionsDirective;

libs/fabric/src/lib/components/combo-box/combo-box.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
3737
[isButtonAriaHidden]="isButtonAriaHidden"
3838
[ariaDescribedBy]="ariaDescribedBy"
3939
[keytipProps]="keytipProps"
40+
[persistMenu]="persistMenu"
41+
[shouldRestoreFocus]="shouldRestoreFocus"
4042
[RenderLowerContent]="renderLowerContent && onRenderLowerContent"
4143
[ItemClick]="onItemClickHandler"
4244
[Change]="onChangeHandler"
@@ -45,6 +47,7 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
4547
[ScrollToItem]="onScrollToItemHandler"
4648
(onMenuOpen)="onMenuOpen.emit()"
4749
(onMenuDismissed)="onMenuDismissed.emit()"
50+
(onMenuDismiss)="onMenuDismiss.emit()"
4851
>
4952
</ComboBox>
5053
`,

libs/fabric/src/lib/components/combo-box/virtualized-combo-box.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
3737
[isButtonAriaHidden]="isButtonAriaHidden"
3838
[ariaDescribedBy]="ariaDescribedBy"
3939
[keytipProps]="keytipProps"
40+
[persistMenu]="persistMenu"
41+
[shouldRestoreFocus]="shouldRestoreFocus"
4042
[RenderLowerContent]="renderLowerContent && onRenderLowerContent"
4143
[ItemClick]="onItemClickHandler"
4244
[Change]="onChangeHandler"
@@ -45,6 +47,7 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
4547
[ScrollToItem]="onScrollToItemHandler"
4648
(onMenuOpen)="onMenuOpen.emit()"
4749
(onMenuDismissed)="onMenuDismissed.emit()"
50+
(onMenuDismiss)="onMenuDismiss.emit()"
4851
>
4952
</VirtualizedComboBox>
5053
`,

libs/fabric/src/lib/components/command-bar/command-bar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export class FabCommandBarComponent extends ReactWrapperComponent<ICommandBarPro
203203
onRenderIcon: (item: IContextualMenuItem) => iconRenderer({ contextualMenuItem: item }),
204204
},
205205
renderer &&
206-
({ onRender: (item, dismissMenu) => renderer({ item, dismissMenu }) } as Pick<ICommandBarItemProps, 'onRender'>)
206+
({ onRender: (item, dismissMenu) => renderer({ item, dismissMenu }) } as Pick<ICommandBarItemProps, 'onRender'>)
207207
) as ICommandBarItemProps;
208208
}
209209
}

libs/fabric/src/lib/components/details-list/details-list.component.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { InputRendererOptions, JsxRenderFunc, ReactWrapperComponent } from '@ang
2222
import {
2323
DetailsListBase,
2424
IColumn,
25+
IDetailsListCheckboxProps,
2526
IDetailsFooterProps,
2627
IDetailsHeaderProps,
2728
IDetailsListProps,
@@ -64,7 +65,9 @@ import { DetailsListGroupsDirective } from './directives/details-list-groups.dir
6465
[disableSelectionZone]="disableSelectionZone"
6566
[dragDropEvents]="dragDropEvents"
6667
[enableShimmer]="enableShimmer"
68+
[enableUpdateAnimations]="enableUpdateAnimations"
6769
[enterModalSelectionOnTouch]="enterModalSelectionOnTouch"
70+
[getCellValueKey]="getCellValueKey"
6871
[getGroupHeight]="getGroupHeight"
6972
[getKey]="getKey"
7073
[getRowAriaDescribedBy]="getRowAriaDescribedBy"
@@ -87,9 +90,11 @@ import { DetailsListGroupsDirective } from './directives/details-list-groups.dir
8790
[skipViewportMeasures]="skipViewportMeasures"
8891
[styles]="styles"
8992
[theme]="theme"
93+
[useFastIcons]="useFastIcons"
9094
[usePageCache]="usePageCache"
9195
[useReducedRowRenderer]="useReducedRowRenderer"
9296
[viewport]="viewport"
97+
[RenderCheckbox]="renderCheckbox && onRenderCheckbox"
9398
[RenderDetailsFooter]="renderDetailsFooter && onRenderDetailsFooter"
9499
[RenderDetailsHeader]="renderDetailsHeader && onRenderDetailsHeader"
95100
[RenderMissingItem]="renderMissingItem && onRenderMissingItem"
@@ -136,6 +141,7 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
136141
@Input() isHeaderVisible?: IDetailsListProps['isHeaderVisible'];
137142
@Input() constrainMode?: IDetailsListProps['constrainMode'];
138143
@Input() rowElementEventMap?: IDetailsListProps['rowElementEventMap'];
144+
@Input() getCellValueKey?: IDetailsListProps['getCellValueKey'];
139145
@Input() dragDropEvents?: IDetailsListProps['dragDropEvents'];
140146
@Input() enableShimmer?: IDetailsListProps['enableShimmer'];
141147
@Input() viewport?: IDetailsListProps['viewport'];
@@ -160,11 +166,14 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
160166
@Input() useReducedRowRenderer?: IDetailsListProps['useReducedRowRenderer'];
161167
@Input() cellStyleProps?: IDetailsListProps['cellStyleProps'];
162168
@Input() disableSelectionZone?: IDetailsListProps['disableSelectionZone'];
169+
@Input() enableUpdateAnimations?: IDetailsListProps['enableUpdateAnimations'];
170+
@Input() useFastIcons?: IDetailsListProps['useFastIcons'];
163171

164172
// Inherited members (IWithViewportProps)
165173
@Input() skipViewportMeasures?: IDetailsListProps['skipViewportMeasures'];
166174

167175
// Render members
176+
@Input() renderCheckbox?: InputRendererOptions<IDetailsListCheckboxProps>;
168177
@Input() renderDetailsFooter?: InputRendererOptions<IDetailsFooterProps>;
169178
@Input() renderDetailsHeader?: InputRendererOptions<IDetailsHeaderProps>;
170179
@Input() renderMissingItem?: InputRendererOptions<IMissingItemRenderContext>;
@@ -191,6 +200,10 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
191200

192201
private readonly _subscriptions: Subscription[] = [];
193202

203+
onRenderCheckbox: (
204+
props?: IDetailsListCheckboxProps,
205+
defaultRender?: JsxRenderFunc<IDetailsListCheckboxProps>
206+
) => JSX.Element;
194207
onRenderDetailsFooter: (
195208
props?: IDetailsFooterProps,
196209
defaultRender?: JsxRenderFunc<IDetailsFooterProps>
@@ -218,6 +231,7 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
218231
}
219232

220233
ngOnInit() {
234+
this.onRenderCheckbox = this.createRenderPropHandler(this.renderCheckbox);
221235
this.onRenderDetailsFooter = this.createRenderPropHandler(this.renderDetailsFooter);
222236
this.onRenderDetailsHeader = this.createRenderPropHandler(this.renderDetailsHeader);
223237
this.onRenderRow = this.createRenderPropHandler(this.renderRow);
@@ -340,9 +354,9 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
340354
{},
341355
omit(options, 'render'),
342356
renderer &&
343-
({
344-
onRender: (item?: any, index?: number, column?: IColumn) => renderer({ item, index, column }),
345-
} as Pick<IColumn, 'onRender'>)
357+
({
358+
onRender: (item?: any, index?: number, column?: IColumn) => renderer({ item, index, column }),
359+
} as Pick<IColumn, 'onRender'>)
346360
) as IColumn;
347361
}
348362

0 commit comments

Comments
 (0)