|
| 1 | + |
| 2 | + |
| 3 | +<!DOCTYPE html> |
| 4 | +<html lang="en"> |
| 5 | + |
| 6 | +<head> |
| 7 | + |
| 8 | + <meta charset="utf-8"> |
| 9 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 10 | + <title> guides/similarity-index/similarity-view-created-index.js</title> |
| 11 | + |
| 12 | + <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script> |
| 13 | + <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> |
| 14 | + <script src="./build/entry.js"></script> |
| 15 | + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> |
| 16 | + <!--[if lt IE 9]> |
| 17 | + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> |
| 18 | + <![endif]--> |
| 19 | + <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet"> |
| 20 | + <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> |
| 21 | + <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css"> |
| 22 | + <link type="text/css" rel="stylesheet" href="styles/app.min.css"> |
| 23 | + <link type="text/css" rel="stylesheet" href="styles/iframe.css"> |
| 24 | + <link type="text/css" rel="stylesheet" href=""> |
| 25 | + <script async defer src="https://buttons.github.io/buttons.js"></script> |
| 26 | + |
| 27 | + |
| 28 | +</head> |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +<body class="layout small-header"> |
| 33 | + <div id="stickyNavbarOverlay"></div> |
| 34 | + |
| 35 | + |
| 36 | +<div class="top-nav"> |
| 37 | + <div class="inner"> |
| 38 | + <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false"> |
| 39 | + <span aria-hidden="true"></span> |
| 40 | + <span aria-hidden="true"></span> |
| 41 | + <span aria-hidden="true"></span> |
| 42 | + </a> |
| 43 | + <div class="logo"> |
| 44 | + |
| 45 | + |
| 46 | + <a href="index.html"> |
| 47 | + <h1 class="navbar-item">GraphDB Workbench Plugins</h1> |
| 48 | + </a> |
| 49 | + |
| 50 | + </div> |
| 51 | + <div class="menu"> |
| 52 | + |
| 53 | + <div class="navigation"> |
| 54 | + <a |
| 55 | + href="index.html" |
| 56 | + class="link" |
| 57 | + > |
| 58 | + Documentation |
| 59 | + </a> |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | +</div> |
| 67 | + <div id="main"> |
| 68 | + <div |
| 69 | + class="sidebar " |
| 70 | + id="sidebarNav" |
| 71 | + > |
| 72 | + |
| 73 | + <nav> |
| 74 | + |
| 75 | + <h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Modules</h3><ul><li><a href="module-Interactive%2520Guide.html">Interactive Guide</a></li></ul><h3>Classes</h3><ul><li><a href="PluginServiceInterface.html">PluginServiceInterface</a></li></ul><h3>Global</h3><ul><li><a href="global.html#COMMON_DOM_EVENTS">COMMON_DOM_EVENTS</a></li><li><a href="global.html#_configureInteractions">_configureInteractions</a></li><li><a href="global.html#allowAll">allowAll</a></li><li><a href="global.html#allowEvents">allowEvents</a></li><li><a href="global.html#beforeShowPromise">beforeShowPromise</a></li><li><a href="global.html#preventDefault">preventDefault</a></li></ul></div> |
| 76 | + |
| 77 | + </nav> |
| 78 | + </div> |
| 79 | + <div class="core" id="main-content-wrapper"> |
| 80 | + <div class="content"> |
| 81 | + <header class="page-title"> |
| 82 | + <p>Source</p> |
| 83 | + <h1>guides/similarity-index/similarity-view-created-index.js</h1> |
| 84 | + </header> |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + <section> |
| 91 | + <article> |
| 92 | + <pre class="prettyprint source linenums"><code>const CREATE_SIMILARITY_INDEX_DEFAULT = 'guide.step-action.create-similarity-index'; |
| 93 | +const VIEW_CREATED_INDEX_DEFAULT = 'guide.step_plugin.similarity-view-created-index'; |
| 94 | + |
| 95 | +/** |
| 96 | + * @name similarity-view-created-index |
| 97 | + * @memberof module:Interactive Guide |
| 98 | + * |
| 99 | + * @description |
| 100 | + * This step highlights the newly created similarity index in the Existing Indexes table. The default index to highlight |
| 101 | + * is the first index, unless <code>options.rowIndex</code> is specified. |
| 102 | + * |
| 103 | + * View the newly created similarity index<br> |
| 104 | + * <img src="resources/guides/similarity-index/similarity-view-created-index.png" style="height:200px; border: solid; border-width:1px"/><br> |
| 105 | + * |
| 106 | + * This step can be configured using the common options defined in [Options](#.Options). Additionally, it supports: |
| 107 | + * |
| 108 | + * @property {string} [options.content] - The content of the dialog. |
| 109 | + * @property {string} [options.title] - The title of the dialog. |
| 110 | + * @property {number} [options.rowIndex] - The index of the row to focus on. |
| 111 | + * |
| 112 | + * @example |
| 113 | + * ```JSON |
| 114 | + * { |
| 115 | + * "guideBlockName": "similarity-view-created-index", |
| 116 | + * "options": { |
| 117 | + * "title": { |
| 118 | + * "en": "Explore Similarity index" |
| 119 | + * }, |
| 120 | + * "content": "In the <b>Existing Indexes</b> table, you can now see the <b>SpellSimIndex</b> which is the similarity index we created with the previous query.", |
| 121 | + * "rowIndex": 1 |
| 122 | + * } |
| 123 | + * } |
| 124 | + * |
| 125 | + */ |
| 126 | +const step = { |
| 127 | + guideBlockName: 'similarity-view-created-index', |
| 128 | + getSteps: (options, services) => { |
| 129 | + const GuideUtils = services.GuideUtils; |
| 130 | + return [ |
| 131 | + { |
| 132 | + guideBlockName: 'focus-element', |
| 133 | + options: { |
| 134 | + content: options.content || 'guide.step_plugin.similarity-view-created-index', |
| 135 | + class: 'view-created-index', |
| 136 | + ...(options.title ?? {title: CREATE_SIMILARITY_INDEX_DEFAULT}), |
| 137 | + ...options, |
| 138 | + elementSelector: GuideUtils.getGuideElementSelector(`similarity-index-name-${options.rowIndex || 0}`) |
| 139 | + } |
| 140 | + } |
| 141 | + ]; |
| 142 | + }, |
| 143 | + translationBundle: { |
| 144 | + en: { |
| 145 | + [CREATE_SIMILARITY_INDEX_DEFAULT]: 'Create Similarity index', |
| 146 | + [VIEW_CREATED_INDEX_DEFAULT]: 'In the <b>Existing Indexes</b> table, you can now see the <b>SpellSimIndex</b> which is the similarity index we created with the previous query.', |
| 147 | + }, |
| 148 | + fr: { |
| 149 | + [CREATE_SIMILARITY_INDEX_DEFAULT]: 'Créer un indice de similitude', |
| 150 | + [VIEW_CREATED_INDEX_DEFAULT]: 'Dans le tableau <b>Index existants</b>, vous pouvez maintenant voir le <b>SpellSimIndex</b> qui est l\'index de similarité que nous avons créé avec la requête précédente.' |
| 151 | + } |
| 152 | + } |
| 153 | +}; |
| 154 | + |
| 155 | +export function register(registry) { |
| 156 | + registry.add('guide.step', step); |
| 157 | +} |
| 158 | +</code></pre> |
| 159 | + </article> |
| 160 | + </section> |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + </div> |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + </div> |
| 170 | + <div id="side-nav" class="side-nav"> |
| 171 | + </div> |
| 172 | + </div> |
| 173 | +<script src="scripts/app.min.js"></script> |
| 174 | +<script>PR.prettyPrint();</script> |
| 175 | +<script src="scripts/linenumber.js"> </script> |
| 176 | + |
| 177 | + |
| 178 | +</body> |
| 179 | +</html> |
0 commit comments