- {this.hasContentItems && (
+ {this.enabledFeatures.content && (
- {this.showStartSeparator && (
-
+ {/* Start separator */}
+ {this.separatorConfig.showStartSeparator && (
+
)}
+
+ {/* Start content items */}
{this.startContent.map(item => {
- const itemInfo = this._contentInfo.find(info => info.id === (item as any)._individualSlot);
+ const itemId = (item as any)._individualSlot as string;
+ const packedSep = this.getPackedSeparatorInfo(item, true);
return (
-
- {this.shouldIncludeSeparator(itemInfo, this.startContentInfoSorted) && (
- // never displayed, only "packed" with last item that was hidden, used for measurement purposes
-
+
+ {packedSep.shouldPack && (
+
)}
);
})}
+
+ {/* Spacer: Grows to fill available space, used to measure if space is tight, should be in DOM always */}
+
+ {/* End content items */}
{this.endContent.map(item => {
- const itemInfo = this._contentInfo.find(info => info.id === (item as any)._individualSlot);
+ const itemId = (item as any)._individualSlot as string;
+ const packedSep = this.getPackedSeparatorInfo(item, false);
return (
-
-
- {this.shouldIncludeSeparator(itemInfo, this.endContentInfoSorted) && (
- // never displayed, only "packed" with last item that was hidden, used for measurement purposes
-
+
+
+ {packedSep.shouldPack && (
+
)}
);
})}
- {this.showEndSeparator && (
-
+
+ {/* End separator */}
+ {this.separatorConfig.showEndSeparator && (
+
)}
)}
- {!this.hasContentItems &&
}
-
- {this.hasSearchField && (
- <>
- {this.showFullWidthSearch && (
-
-
-
-
-
-
- )}
-
-
-
- {!(this.hasSelfCollapsibleSearch || this.hideSearchButton) && (
-
- )}
- >
- )}
- {this.hasAssistant && (
-
-
-
- )}
- {this.showNotifications && (
-
- )}
- {this.customItemsInfo.map(item => (
-
- ))}
-
-
-
- {this.hasProfile && profileButton.call(this)}
- {this.showProductSwitch && (
-
- )}
-
- {ShellBarPopoverTemplate.call(this)}
- >
- );
-}
+ {this.enabledFeatures.search && SearchInBarTemplate.call(this)}
+ {this.enabledFeatures.search && isLegacySearch && ShellBarSearchButtonLegacy.call(this)}
-function profileButton(this: ShellBar) {
- return (
-
+ {/* Custom Items */}
+ {this.sortItems(this.items).map(item => (
+