MCPcopy Create free account
hub / github.com/microsoft/SandDance / DialogBase1

Function DialogBase1

docs/app/js/sanddance-app.js:42804–42824  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

42802var DialogBase = /** @class */ function(_super) {
42803 (0, _tslib.__extends)(DialogBase1, _super);
42804 function DialogBase1(props) {
42805 var _this = _super.call(this, props) || this;
42806 _this._getSubTextId = function() {
42807 // eslint-disable-next-line deprecation/deprecation
42808 var _a = _this.props, ariaDescribedById = _a.ariaDescribedById, modalProps = _a.modalProps, dialogContentProps = _a.dialogContentProps, subText = _a.subText;
42809 var id = modalProps && modalProps.subtitleAriaId || ariaDescribedById;
42810 if (!id) id = (dialogContentProps && dialogContentProps.subText || subText) && _this._defaultSubTextId;
42811 return id;
42812 };
42813 _this._getTitleTextId = function() {
42814 // eslint-disable-next-line deprecation/deprecation
42815 var _a = _this.props, ariaLabelledById = _a.ariaLabelledById, modalProps = _a.modalProps, dialogContentProps = _a.dialogContentProps, title = _a.title;
42816 var id = modalProps && modalProps.titleAriaId || ariaLabelledById;
42817 if (!id) id = (dialogContentProps && dialogContentProps.title || title) && _this._defaultTitleTextId;
42818 return id;
42819 };
42820 _this._id = (0, _utilities.getId)("Dialog");
42821 _this._defaultTitleTextId = _this._id + "-title";
42822 _this._defaultSubTextId = _this._id + "-subText";
42823 return _this;
42824 }
42825 DialogBase1.prototype.render = function() {
42826 var _a, _b;
42827 var _c = this.props, /* eslint-disable deprecation/deprecation */ className = _c.className, containerClassName = _c.containerClassName, contentClassName = _c.contentClassName, elementToFocusOnDismiss = _c.elementToFocusOnDismiss, firstFocusableSelector = _c.firstFocusableSelector, forceFocusInsideTrap = _c.forceFocusInsideTrap, styles = _c.styles, hidden = _c.hidden, ignoreExternalFocusing = _c.ignoreExternalFocusing, isBlocking = _c.isBlocking, isClickableOutsideFocusTrap = _c.isClickableOutsideFocusTrap, isDarkOverlay = _c.isDarkOverlay, isOpen = _c.isOpen, onDismiss = _c.onDismiss, onDismissed = _c.onDismissed, onLayerDidMount = _c.onLayerDidMount, responsiveMode = _c.responsiveMode, subText = _c.subText, theme = _c.theme, title = _c.title, topButtonsProps = _c.topButtonsProps, type = _c.type, /* eslint-enable deprecation/deprecation */ minWidth = _c.minWidth, maxWidth = _c.maxWidth, modalProps = _c.modalProps;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected