Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/fabric/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@angular/core": "^8.0.2",
"@angular/platform-browser-dynamic": "^8.0.2",
"@angular/platform-browser": "^8.0.2",
"office-ui-fabric-react": "6.151.0",
"office-ui-fabric-react": "6.201.1",
"react-dom": "^16.6.3",
"react": "^16.6.3"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import { IBreadcrumbItem, IBreadcrumbProps } from 'office-ui-fabric-react/lib/Br
[overflowIndex]="overflowIndex"
[styles]="styles"
[theme]="theme"
[focusZoneProps]="focusZoneProps"
[tooltipHostProps]="tooltipHostProps"
[RenderItem]="renderItem && onRenderItem"
[ReduceData]="onReduceData"
>
Expand All @@ -51,6 +53,8 @@ export class FabBreadcrumbComponent extends ReactWrapperComponent<IBreadcrumbPro
@Input() overflowIndex?: IBreadcrumbProps['overflowIndex'];
@Input() styles?: IBreadcrumbProps['styles'];
@Input() theme?: IBreadcrumbProps['theme'];
@Input() focusZoneProps?: IBreadcrumbProps['focusZoneProps'];
@Input() tooltipHostProps?: IBreadcrumbProps['tooltipHostProps'];

@Input() renderItem?: InputRendererOptions<IBreadcrumbItem>;
@Input('reduceData') onReduceData?: IBreadcrumbProps['onReduceData'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,30 @@ export class CalendarStringsDirective {
@Input() days: ICalendarStrings['days'];
@Input() shortDays: ICalendarStrings['shortDays'];
@Input() goToToday: ICalendarStrings['goToToday'];
@Input() weekNumberFormatString: ICalendarStrings['weekNumberFormatString'];
@Input() prevMonthAriaLabel?: ICalendarStrings['prevMonthAriaLabel'];
@Input() nextMonthAriaLabel?: ICalendarStrings['nextMonthAriaLabel'];
@Input() prevYearAriaLabel?: ICalendarStrings['prevYearAriaLabel'];
@Input() nextYearAriaLabel?: ICalendarStrings['nextYearAriaLabel'];
@Input() prevYearRangeAriaLabel?: ICalendarStrings['prevYearRangeAriaLabel'];
@Input() nextYearRangeAriaLabel?: ICalendarStrings['nextYearRangeAriaLabel'];
@Input() closeButtonAriaLabel?: ICalendarStrings['closeButtonAriaLabel'];
@Input() weekNumberFormatString?: ICalendarStrings['weekNumberFormatString'];



get strings(): ICalendarStrings {
return {
months: this.months,
shortMonths: this.shortMonths,
days: this.days,
shortDays: this.shortDays,
goToToday: this.goToToday,
prevMonthAriaLabel: this.prevMonthAriaLabel,
nextMonthAriaLabel: this.nextMonthAriaLabel,
prevYearAriaLabel: this.prevYearAriaLabel,
nextYearAriaLabel: this.nextYearAriaLabel,
prevYearRangeAriaLabel: this.prevYearRangeAriaLabel,
nextYearRangeAriaLabel: this.nextYearRangeAriaLabel,
closeButtonAriaLabel: this.closeButtonAriaLabel,
weekNumberFormatString: this.weekNumberFormatString
}
}
Expand Down
3 changes: 2 additions & 1 deletion libs/fabric/src/lib/components/callout/callout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
[theme]="theme"
[styles]="styles"
[hidden]="hidden"
[shouldRestoreFocus]="shouldRestoreFocus"
(onLayerMounted)="onLayerMounted.emit()"
(onPositioned)="onPositioned.emit($event)"
(onDismiss)="onDismiss.emit($event)"
Expand All @@ -67,7 +68,6 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
export class FabCalloutComponent extends ReactWrapperComponent<ICalloutProps> {
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;

@Input() componentRef?: ICalloutProps['componentRef'];
@Input() target?: ICalloutProps['target'];
@Input() directionalHint?: ICalloutProps['directionalHint'];
@Input() directionalHintForRTL?: ICalloutProps['directionalHintForRTL'];
Expand Down Expand Up @@ -98,6 +98,7 @@ export class FabCalloutComponent extends ReactWrapperComponent<ICalloutProps> {
@Input() theme?: ICalloutProps['theme'];
@Input() styles?: ICalloutProps['styles'];
@Input() hidden?: ICalloutProps['hidden'];
@Input() shouldRestoreFocus?: ICalloutProps['shouldRestoreFocus'];

@Output() readonly onLayerMounted = new EventEmitter<void>();
@Output() readonly onPositioned = new EventEmitter<{ positions?: ICalloutPositionedInfo }>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
[theme]="theme"
[styles]="styles"
[hidden]="hidden"
[shouldRestoreFocus]="shouldRestoreFocus"
[focusTrapProps]="focusTrapProps"
(onLayerMounted)="onLayerMounted.emit()"
(onPositioned)="onPositioned.emit($event)"
Expand All @@ -67,9 +68,8 @@ import { ICalloutPositionedInfo } from 'office-ui-fabric-react/lib/utilities/pos
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FabFocusTrapCalloutComponent extends ReactWrapperComponent<IFocusTrapCalloutProps> {
@ViewChild('reactNode') protected reactNodeRef: ElementRef;
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;

@Input() componentRef?: IFocusTrapCalloutProps['componentRef'];
@Input() target?: IFocusTrapCalloutProps['target'];
@Input() directionalHint?: IFocusTrapCalloutProps['directionalHint'];
@Input() directionalHintForRTL?: IFocusTrapCalloutProps['directionalHintForRTL'];
Expand Down Expand Up @@ -100,6 +100,7 @@ export class FabFocusTrapCalloutComponent extends ReactWrapperComponent<IFocusTr
@Input() theme?: IFocusTrapCalloutProps['theme'];
@Input() styles?: IFocusTrapCalloutProps['styles'];
@Input() hidden?: IFocusTrapCalloutProps['hidden'];
@Input() shouldRestoreFocus?: IFocusTrapCalloutProps['shouldRestoreFocus'];
@Input() focusTrapProps?: IFocusTrapCalloutProps['focusTrapProps'];

@Output() readonly onLayerMounted = new EventEmitter<void>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export abstract class FabBaseComboBoxComponent extends ReactWrapperComponent<ICo
@Input() isButtonAriaHidden?: IComboBoxProps['isButtonAriaHidden'];
@Input() ariaDescribedBy?: IComboBoxProps['ariaDescribedBy'];
@Input() keytipProps?: IComboBoxProps['keytipProps'];
@Input() persistMenu?: IComboBoxProps['persistMenu'];
@Input() shouldRestoreFocus?: IComboBoxProps['shouldRestoreFocus'];
@Input() resolveOptions?: (options: IComboBoxOption[]) => IComboBoxOption[] | PromiseLike<IComboBoxOption[]>;

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

@ContentChild(ComboBoxOptionsDirective, { static: true }) readonly comboBoxOptionsDirective?: ComboBoxOptionsDirective;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
[isButtonAriaHidden]="isButtonAriaHidden"
[ariaDescribedBy]="ariaDescribedBy"
[keytipProps]="keytipProps"
[persistMenu]="persistMenu"
[shouldRestoreFocus]="shouldRestoreFocus"
[RenderLowerContent]="renderLowerContent && onRenderLowerContent"
[ItemClick]="onItemClickHandler"
[Change]="onChangeHandler"
Expand All @@ -45,6 +47,7 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
[ScrollToItem]="onScrollToItemHandler"
(onMenuOpen)="onMenuOpen.emit()"
(onMenuDismissed)="onMenuDismissed.emit()"
(onMenuDismiss)="onMenuDismiss.emit()"
>
</ComboBox>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
[isButtonAriaHidden]="isButtonAriaHidden"
[ariaDescribedBy]="ariaDescribedBy"
[keytipProps]="keytipProps"
[persistMenu]="persistMenu"
[shouldRestoreFocus]="shouldRestoreFocus"
[RenderLowerContent]="renderLowerContent && onRenderLowerContent"
[ItemClick]="onItemClickHandler"
[Change]="onChangeHandler"
Expand All @@ -45,6 +47,7 @@ import { FabBaseComboBoxComponent } from './base-combo-box.component';
[ScrollToItem]="onScrollToItemHandler"
(onMenuOpen)="onMenuOpen.emit()"
(onMenuDismissed)="onMenuDismissed.emit()"
(onMenuDismiss)="onMenuDismiss.emit()"
>
</VirtualizedComboBox>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class FabCommandBarComponent extends ReactWrapperComponent<ICommandBarPro
onRenderIcon: (item: IContextualMenuItem) => iconRenderer({ contextualMenuItem: item }),
},
renderer &&
({ onRender: (item, dismissMenu) => renderer({ item, dismissMenu }) } as Pick<ICommandBarItemProps, 'onRender'>)
({ onRender: (item, dismissMenu) => renderer({ item, dismissMenu }) } as Pick<ICommandBarItemProps, 'onRender'>)
) as ICommandBarItemProps;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { InputRendererOptions, JsxRenderFunc, ReactWrapperComponent } from '@ang
import {
DetailsListBase,
IColumn,
IDetailsListCheckboxProps,
IDetailsFooterProps,
IDetailsHeaderProps,
IDetailsListProps,
Expand Down Expand Up @@ -64,7 +65,9 @@ import { DetailsListGroupsDirective } from './directives/details-list-groups.dir
[disableSelectionZone]="disableSelectionZone"
[dragDropEvents]="dragDropEvents"
[enableShimmer]="enableShimmer"
[enableUpdateAnimations]="enableUpdateAnimations"
[enterModalSelectionOnTouch]="enterModalSelectionOnTouch"
[getCellValueKey]="getCellValueKey"
[getGroupHeight]="getGroupHeight"
[getKey]="getKey"
[getRowAriaDescribedBy]="getRowAriaDescribedBy"
Expand All @@ -87,9 +90,11 @@ import { DetailsListGroupsDirective } from './directives/details-list-groups.dir
[skipViewportMeasures]="skipViewportMeasures"
[styles]="styles"
[theme]="theme"
[useFastIcons]="useFastIcons"
[usePageCache]="usePageCache"
[useReducedRowRenderer]="useReducedRowRenderer"
[viewport]="viewport"
[RenderCheckbox]="renderCheckbox && onRenderCheckbox"
[RenderDetailsFooter]="renderDetailsFooter && onRenderDetailsFooter"
[RenderDetailsHeader]="renderDetailsHeader && onRenderDetailsHeader"
[RenderMissingItem]="renderMissingItem && onRenderMissingItem"
Expand Down Expand Up @@ -136,6 +141,7 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
@Input() isHeaderVisible?: IDetailsListProps['isHeaderVisible'];
@Input() constrainMode?: IDetailsListProps['constrainMode'];
@Input() rowElementEventMap?: IDetailsListProps['rowElementEventMap'];
@Input() getCellValueKey?: IDetailsListProps['getCellValueKey'];
@Input() dragDropEvents?: IDetailsListProps['dragDropEvents'];
@Input() enableShimmer?: IDetailsListProps['enableShimmer'];
@Input() viewport?: IDetailsListProps['viewport'];
Expand All @@ -160,11 +166,14 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
@Input() useReducedRowRenderer?: IDetailsListProps['useReducedRowRenderer'];
@Input() cellStyleProps?: IDetailsListProps['cellStyleProps'];
@Input() disableSelectionZone?: IDetailsListProps['disableSelectionZone'];
@Input() enableUpdateAnimations?: IDetailsListProps['enableUpdateAnimations'];
@Input() useFastIcons?: IDetailsListProps['useFastIcons'];

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

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

private readonly _subscriptions: Subscription[] = [];

onRenderCheckbox: (
props?: IDetailsListCheckboxProps,
defaultRender?: JsxRenderFunc<IDetailsListCheckboxProps>
) => JSX.Element;
onRenderDetailsFooter: (
props?: IDetailsFooterProps,
defaultRender?: JsxRenderFunc<IDetailsFooterProps>
Expand Down Expand Up @@ -218,6 +231,7 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
}

ngOnInit() {
this.onRenderCheckbox = this.createRenderPropHandler(this.renderCheckbox);
this.onRenderDetailsFooter = this.createRenderPropHandler(this.renderDetailsFooter);
this.onRenderDetailsHeader = this.createRenderPropHandler(this.renderDetailsHeader);
this.onRenderRow = this.createRenderPropHandler(this.renderRow);
Expand Down Expand Up @@ -340,9 +354,9 @@ export class FabDetailsListComponent extends ReactWrapperComponent<IDetailsListP
{},
omit(options, 'render'),
renderer &&
({
onRender: (item?: any, index?: number, column?: IColumn) => renderer({ item, index, column }),
} as Pick<IColumn, 'onRender'>)
({
onRender: (item?: any, index?: number, column?: IColumn) => renderer({ item, index, column }),
} as Pick<IColumn, 'onRender'>)
) as IColumn;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class DetailsListColumnDirective extends ChangeableItemDirective<IDetails
@Input() isResizable?: IColumn['isResizable'];
@Input() isMultiline?: IColumn['isMultiline'];
@Input() onRender?: IColumn['onRender'];
@Input() getValueKey?: IColumn['getValueKey'];
@Input() onRenderDivider?: IColumn['onRenderDivider'];
@Input() isFiltered?: IColumn['isFiltered'];
@Input() isGrouped?: IColumn['isGrouped'];
Expand Down
2 changes: 2 additions & 0 deletions libs/fabric/src/lib/components/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export class FabDialogFooterComponent extends ReactWrapperComponent<IDialogFoote
[responsiveMode]="responsiveMode"
[closeButtonAriaLabel]="closeButtonAriaLabel"
[type]="type"
[draggableHeaderClassName]="draggableHeaderClassName"
(onDismiss)="onDismiss.emit($event && $event.nativeEvent)"
>
<ReactContent><ng-content></ng-content></ReactContent>
Expand All @@ -146,6 +147,7 @@ export class FabDialogContentComponent extends ReactWrapperComponent<IDialogCont
@Input() responsiveMode?: IDialogContentProps['responsiveMode'];
@Input() closeButtonAriaLabel?: IDialogContentProps['closeButtonAriaLabel'];
@Input() type?: IDialogContentProps['type'];
@Input() draggableHeaderClassName?: IDialogContentProps['draggableHeaderClassName'];

@Output() readonly onDismiss = new EventEmitter<MouseEvent>();

Expand Down
12 changes: 11 additions & 1 deletion libs/fabric/src/lib/components/divider/divider.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ import { IVerticalDividerProps } from 'office-ui-fabric-react/lib/Divider';
selector: 'fab-vertical-divider',
exportAs: 'fabVerticalDivider',
template: `
<VerticalDivider #reactNode [getClassNames]="getClassNames"> </VerticalDivider>
<VerticalDivider
#reactNode
[getClassNames]="getClassNames"
[theme]="theme"
[styles]="styles"
[className]="className"
>
</VerticalDivider>
`,
styles: ['react-renderer'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -26,6 +33,9 @@ export class FabDividerComponent extends ReactWrapperComponent<IVerticalDividerP
@ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef;

@Input() getClassNames?: IVerticalDividerProps['getClassNames'];
@Input() theme?: IVerticalDividerProps['theme'];
@Input() styles?: IVerticalDividerProps['styles'];
@Input() className?: IVerticalDividerProps['className'];

constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, renderer: Renderer2) {
super(elementRef, changeDetectorRef, renderer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export class DropdownOptionDirective {
@Input() ariaLabel?: IDropdownOption['ariaLabel'];
@Input() selected?: IDropdownOption['selected'];
@Input() disabled?: IDropdownOption['disabled'];
@Input() hidden?: IDropdownOption['hidden'];
@Input() data?: IDropdownOption['data'];
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { DropdownOptionsDirective } from './directives/dropdown-options.directiv
[panelProps]="panelProps"
[errorMessage]="errorMessage"
[placeholder]="placeholder"
[openOnKeyboardFocus]="openOnKeyboardFocus"
[options]="options"
[dropdownWidth]="dropdownWidth"
[responsiveMode]="responsiveMode"
Expand All @@ -54,6 +55,7 @@ import { DropdownOptionsDirective } from './directives/dropdown-options.directiv
[RenderList]="renderList && onRenderList"
[RenderItem]="renderItem && onRenderItem"
[RenderOption]="renderOption && onRenderOption"
[RenderPlaceholder]="renderPlaceholder && onRenderPlaceholder"
[RenderPlaceHolder]="renderPlaceHolder && onRenderPlaceHolder"
[RenderTitle]="renderTitle && onRenderTitle"
[RenderCaretDown]="renderCaretDown && onRenderCaretDown"
Expand All @@ -80,8 +82,9 @@ export class FabDropdownComponent extends ReactWrapperComponent<IDropdownProps>
@Input() calloutProps?: IDropdownProps['calloutProps'];
@Input() panelProps?: IDropdownProps['panelProps'];
@Input() errorMessage?: IDropdownProps['errorMessage'];
@Input() placeholder?: IDropdownProps['placeholder'];
@Input() openOnKeyboardFocus?: IDropdownProps['openOnKeyboardFocus'];

@Input() placeholder: IDropdownProps['placeholder'];
@Input() options: IDropdownProps['options'];
@Input() dropdownWidth?: IDropdownProps['dropdownWidth'];
@Input() responsiveMode?: IDropdownProps['responsiveMode'];
Expand All @@ -98,6 +101,7 @@ export class FabDropdownComponent extends ReactWrapperComponent<IDropdownProps>
@Input() renderList?: InputRendererOptions<ISelectableDroppableTextProps<IDropdown>>;
@Input() renderItem?: InputRendererOptions<ISelectableOption>;
@Input() renderOption?: InputRendererOptions<ISelectableOption>;
@Input() renderPlaceholder?: InputRendererOptions<IDropdownProps>;
@Input() renderPlaceHolder?: InputRendererOptions<IDropdownProps>;
@Input() renderTitle?: InputRendererOptions<IDropdownOption | IDropdownOption[]>;
@Input() renderCaretDown?: InputRendererOptions<IDropdownProps>;
Expand All @@ -115,6 +119,7 @@ export class FabDropdownComponent extends ReactWrapperComponent<IDropdownProps>
) => JSX.Element;
onRenderItem: (props?: ISelectableOption, defaultRender?: JsxRenderFunc<ISelectableOption>) => JSX.Element;
onRenderOption: (props?: ISelectableOption, defaultRender?: JsxRenderFunc<ISelectableOption>) => JSX.Element;
onRenderPlaceholder: (props?: IDropdownProps, defaultRender?: JsxRenderFunc<IDropdownProps>) => JSX.Element;
onRenderPlaceHolder: (props?: IDropdownProps, defaultRender?: JsxRenderFunc<IDropdownProps>) => JSX.Element;
onRenderTitle: (
props?: IDropdownOption | IDropdownOption[],
Expand All @@ -134,6 +139,7 @@ export class FabDropdownComponent extends ReactWrapperComponent<IDropdownProps>
this.onRenderList = this.createRenderPropHandler(this.renderList);
this.onRenderItem = this.createRenderPropHandler(this.renderItem);
this.onRenderOption = this.createRenderPropHandler(this.renderOption);
this.onRenderPlaceholder = this.createRenderPropHandler(this.renderPlaceholder);
this.onRenderPlaceHolder = this.createRenderPropHandler(this.renderPlaceHolder);
this.onRenderTitle = this.createRenderPropHandler(this.renderTitle);
this.onRenderCaretDown = this.createRenderPropHandler(this.renderCaretDown);
Expand Down
Loading