(props)
| 52243 | } |
| 52244 | } |
| 52245 | function SnapshotExport(props) { |
| 52246 | return /*#__PURE__*/ _react.createElement((0, _sanddanceExplorer.controls).Dialog, { |
| 52247 | hidden: false, |
| 52248 | onDismiss: props.onDismiss, |
| 52249 | dialogContentProps: { |
| 52250 | className: `sanddance-dialog ${props.theme} sanddance-export`, |
| 52251 | type: (0, _base.base).fluentUI.DialogType.normal, |
| 52252 | title: (0, _language.strings).dialogTitleSnapshotsExport |
| 52253 | } |
| 52254 | }, /*#__PURE__*/ _react.createElement("ul", null, /*#__PURE__*/ _react.createElement("li", null, /*#__PURE__*/ _react.createElement("strong", null, (0, _language.strings).labelSnapshotsExportHTMLTitle), /*#__PURE__*/ _react.createElement("div", null, (0, _language.strings).labelSnapshotsExportHTMLDescription), /*#__PURE__*/ _react.createElement((0, _base.base).fluentUI.PrimaryButton, { |
| 52255 | iconProps: { |
| 52256 | iconName: "Download" |
| 52257 | }, |
| 52258 | text: `${(0, _language.strings).buttonExport} ${(0, _language.strings).labelSnapshotsExportHTMLTitle}`, |
| 52259 | onClick: (e)=>{ |
| 52260 | const clean = cleanSnapshots(props.snapshots); |
| 52261 | const html = (0, _sanddanceExplorer.getEmbedHTML)(props.explorer.state.dataContent.data, props.dataSource.displayName, clean); |
| 52262 | (0, _download.downloadData)(html, `${props.dataSource.displayName}.html`); |
| 52263 | } |
| 52264 | })), /*#__PURE__*/ _react.createElement("li", null, /*#__PURE__*/ _react.createElement("strong", null, (0, _language.strings).labelSnapshotsExportMarkdownTitle), /*#__PURE__*/ _react.createElement("div", null, (0, _language.strings).labelSnapshotsExportMarkdownDescription), /*#__PURE__*/ _react.createElement((0, _base.base).fluentUI.PrimaryButton, { |
| 52265 | iconProps: { |
| 52266 | iconName: "Download" |
| 52267 | }, |
| 52268 | text: `${(0, _language.strings).buttonExport} ${(0, _language.strings).labelSnapshotsExportMarkdownTitle}`, |
| 52269 | onClick: (e)=>{ |
| 52270 | const sections = props.snapshots.map((snapshot)=>{ |
| 52271 | const section = [ |
| 52272 | `## ${snapshot.title}` |
| 52273 | ]; |
| 52274 | section.push(snapshot.description); |
| 52275 | section.push("\n"); |
| 52276 | const url = `${location.origin}/#${encodeURIComponent(serializeSnapshot(snapshot))}`; |
| 52277 | section.push(markdownImageLink(snapshot.title, snapshot.image, url)); |
| 52278 | return section.join("\n"); |
| 52279 | }); |
| 52280 | sections.unshift(`# ${props.dataSource.displayName}`); |
| 52281 | (0, _download.downloadData)(sections.join("\n\n"), `${props.dataSource.displayName}.snapshots.md`); |
| 52282 | } |
| 52283 | })))); |
| 52284 | } |
| 52285 | |
| 52286 | },{"./base":"6wvRv","./download":"fCo8g","./language":"PbiF5","./url":"7ClBS","@msrvida/sanddance-explorer":"cnuDN","react":"8ePka","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"gu68g":[function(require,module,exports) { |
| 52287 | var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); |
nothing calls this directly
no test coverage detected