UNPKG

graphdb-workbench

Version:
2 lines 2.65 kB
export const __webpack_id__=12940;export const __webpack_ids__=[12940,30553,89598];export const __webpack_modules__={12940:(e,r,t)=>{t.r(r);var n=t(5949),o=t(89598),l=t(30553),s=t(304);const c={buttonStyle:"position: absolute; top: 0; right: 0; margin-right: 24px"},i=s.LoggerProvider.logger;function u(e){const r=(0,n.A)().use(o.markdownCodeCopyPlugin).use(l.markdownOpenInSparqlEditorPlugin,c);return{renderMarkdown:(t,s)=>{try{return e.trustAsHtml((e=>e?(0,n.A)().use(o.markdownCodeCopyPlugin,e).use(l.markdownOpenInSparqlEditorPlugin,_.merge({},c,e)):r)(s).render(t))}catch(r){return i.error("Error rendering markdown:",r),e.trustAsHtml(t)}}}}angular.module("graphdb.framework.core.services.markdown-service",[]).service("MarkdownService",u),u.$inject=["$sce"]},30553:(e,r,t)=>{t.r(r),t.d(r,{markdownOpenInSparqlEditorPlugin:()=>l});const n={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function o(e,r){return r=_.merge({},n,r),(...t)=>{const[n,o]=t,l=n[o],s=n[o].content.replaceAll('"',"&quot;").replaceAll("'","&apos;"),c=e(...t);return"fence"===l.type&&"sparql"===l.info&&c.trim()?`<div style="position: relative">\n ${c}\n <open-in-sparql-editor\n style="${r.buttonStyle}"\n class="${r.buttonClass}"\n execute-query="${r.executeQuery}"\n repository-id="${r.repositoryId}"\n query="${s}">\n </open-in-sparql-editor>\n </div>`:c}}const l=(e,r)=>{e.renderer.rules.code_block=o(e.renderer.rules.code_block,r),e.renderer.rules.fence=o(e.renderer.rules.fence,r)}},89598:(e,r,t)=>{t.r(r),t.d(r,{markdownCodeCopyPlugin:()=>l});const n={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function o(e,r){return r=_.merge({},n,r),(...t)=>{const[n,o]=t,l=n[o],s=n[o].content.replaceAll('"',"&quot;").replaceAll("'","&apos;"),c=e(...t);return"fence"===l.type&&c.trim()?`<div style="position: relative">\n ${c}\n <copy-to-clipboard\n style="${r.buttonStyle}"\n class="${r.buttonClass}"\n tooltip-text="ttyg.chat_panel.btn.copy_sparql.tooltip"\n text-to-copy="${s}">\n </copy-to-clipboard>\n </div>`:c}}const l=(e,r)=>{e.renderer.rules.code_block=o(e.renderer.rules.code_block,r),e.renderer.rules.fence=o(e.renderer.rules.fence,r)}}}; //# sourceMappingURL=12940.7a45ae43d5f3ba6e7d83.bundle.js.map