()
| 51841 | return "#" + JSON.stringify(dss); |
| 51842 | } |
| 51843 | render() { |
| 51844 | const closeDialog = ()=>{ |
| 51845 | this.setState({ |
| 51846 | dialogMode: null |
| 51847 | }); |
| 51848 | }; |
| 51849 | let shortcut; |
| 51850 | if (this.state.url && !(0, _url.invalidUrlError)(this.state.url) && !this.state.urlError) shortcut = this.getUrlShortcut(this.state.url, this.state.urlType); |
| 51851 | return [ |
| 51852 | /*#__PURE__*/ _react.createElement((0, _sanddanceExplorer.controls).Dialog, { |
| 51853 | key: "local", |
| 51854 | hidden: !(this.state.dialogMode === "local"), |
| 51855 | onDismiss: closeDialog, |
| 51856 | dialogContentProps: { |
| 51857 | className: `sanddance-dialog ${this.props.theme}`, |
| 51858 | type: (0, _base.base).fluentUI.DialogType.normal, |
| 51859 | title: (0, _language.strings).dialogTitleLocal, |
| 51860 | subText: (0, _language.strings).dialogSubtextLocal |
| 51861 | } |
| 51862 | }, /*#__PURE__*/ _react.createElement("input", { |
| 51863 | type: "file", |
| 51864 | onChange: (e)=>this.upload(e), |
| 51865 | disabled: this.state.working |
| 51866 | }), this.state.uploadFormatError && /*#__PURE__*/ _react.createElement("div", { |
| 51867 | className: "error" |
| 51868 | }, this.state.uploadFormatError)), |
| 51869 | /*#__PURE__*/ _react.createElement((0, _sanddanceExplorer.controls).Dialog, { |
| 51870 | key: "url", |
| 51871 | hidden: !(this.state.dialogMode === "url"), |
| 51872 | onDismiss: closeDialog, |
| 51873 | dialogContentProps: { |
| 51874 | className: `sanddance-dialog ${this.props.theme}`, |
| 51875 | type: (0, _base.base).fluentUI.DialogType.normal, |
| 51876 | title: (0, _language.strings).dialogTitleUrl |
| 51877 | }, |
| 51878 | buttons: [ |
| 51879 | /*#__PURE__*/ _react.createElement((0, _base.base).fluentUI.PrimaryButton, { |
| 51880 | key: 0, |
| 51881 | onClick: (e)=>this.loadUrl(), |
| 51882 | iconProps: { |
| 51883 | iconName: "CloudDownload" |
| 51884 | }, |
| 51885 | text: (0, _language.strings).dialogLoadButton, |
| 51886 | disabled: this.state.working |
| 51887 | }) |
| 51888 | ] |
| 51889 | }, /*#__PURE__*/ _react.createElement("section", null, /*#__PURE__*/ _react.createElement((0, _base.base).fluentUI.TextField, { |
| 51890 | label: (0, _language.strings).labelUrl, |
| 51891 | placeholder: (0, _language.strings).urlInputPlaceholder, |
| 51892 | onKeyUp: (e)=>e.keyCode === 13 && this.loadUrl(), |
| 51893 | onChange: (e, url)=>this.setState({ |
| 51894 | url, |
| 51895 | urlError: "" |
| 51896 | }), |
| 51897 | value: this.state.url, |
| 51898 | disabled: this.state.working |
| 51899 | }), this.state.urlError && /*#__PURE__*/ _react.createElement("div", { |
| 51900 | className: "error" |
nothing calls this directly
no test coverage detected