diff --git a/template/wiki/plugins/bimlas/kin-filter/README/concept.svg b/template/wiki/plugins/bimlas/kin-filter/README/concept.svg new file mode 100644 index 00000000..d850019a --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/concept.svg @@ -0,0 +1 @@ +DEPTH12123BASETOFROM \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/kin-filter/README/concept.svg.meta b/template/wiki/plugins/bimlas/kin-filter/README/concept.svg.meta new file mode 100644 index 00000000..f42dcb61 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/concept.svg.meta @@ -0,0 +1,3 @@ +tags: picture +title: $:/plugins/bimlas/kin-filter/README/concept.svg +type: image/svg+xml diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/A.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/A.tid new file mode 100644 index 00000000..70b500af --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/A.tid @@ -0,0 +1,2 @@ +tags: kin-example-top +title: A diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/B.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/B.tid new file mode 100644 index 00000000..9b303845 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/B.tid @@ -0,0 +1,2 @@ +tags: A +title: B diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/C.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/C.tid new file mode 100644 index 00000000..4ec1b82c --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/C.tid @@ -0,0 +1,3 @@ +tags: B +title: C +list: D diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/D.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/D.tid new file mode 100644 index 00000000..518f6103 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/D.tid @@ -0,0 +1,3 @@ +tags: C +title: D +list: E diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/E.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/E.tid new file mode 100644 index 00000000..ea14639f --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/E.tid @@ -0,0 +1,3 @@ +tags: C +title: E +list: G diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/F.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/F.tid new file mode 100644 index 00000000..57f990ba --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/F.tid @@ -0,0 +1,2 @@ +tags: B +title: F diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/G.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/G.tid new file mode 100644 index 00000000..916026f4 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/G.tid @@ -0,0 +1,2 @@ +tags: F +title: G diff --git a/template/wiki/plugins/bimlas/kin-filter/README/example-tree/H.tid b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/H.tid new file mode 100644 index 00000000..44651d73 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/example-tree/H.tid @@ -0,0 +1,2 @@ +tags: F +title: H diff --git a/template/wiki/plugins/bimlas/kin-filter/README/examples.tid b/template/wiki/plugins/bimlas/kin-filter/README/examples.tid new file mode 100644 index 00000000..378d04c4 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/examples.tid @@ -0,0 +1,76 @@ +title: $:/plugins/bimlas/kin-filter/README/examples +type: text/vnd.tiddlywiki + +\define item-class(highlightfilter) <$list filter="[[kin-example-top]kin::to[]subfilter<__highlightfilter__>is[current]first[]]">highlighted-toc-item + +\define kin-example-with-toc(n,eg,ie) +
+ `$eg$` +
→ $ie$
+ <$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> + <$reveal state=<<.state>> type="nomatch" text="show"> +
+
<$button set=<<.state>> setTo="show">Try it
+
+ + <$reveal state=<<.state>> type="match" text="show"> +
+
<$button set=<<.state>> setTo="">Hide
+
+
+ + Results highlighted in the tree: + + <> +
+ + +
+\end + +\define each-level(highlightfilter) +
  • + <$wikify name="transcluded-item-class" text="""<$macrocall $name="item-class" highlightfilter=<<__highlightfilter__>>/>"""> + <$link class=<> ><> + +
      + <$list filter="[[kin-example-top]kin::to[]tag]"> + <$macrocall $name="each-level" highlightfilter=<<__highlightfilter__>>/> + +
    +
  • +\end + +\define kin-toc(highlightfilter) + <$tiddler tiddler="kin-example-top"> + + +\end + + + +Example tree (to really understand, look at the tiddlers): + +<> + +''The tree'' below the examples only helps in understanding the filter, it ''is not part of the output''. + +''Feel free to edit [[this tiddler|$:/plugins/bimlas/kin-filter/README/examples]] to test your own filter expressions as well!'' If you want to undo the changes you made, just delete the tiddler, it will restore itself to its initial state. + +<> +<> +<> +<> +<> +<> +<> +<> +<> diff --git a/template/wiki/plugins/bimlas/kin-filter/README/syntax.tid b/template/wiki/plugins/bimlas/kin-filter/README/syntax.tid new file mode 100644 index 00000000..5cbb4e34 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/README/syntax.tid @@ -0,0 +1,49 @@ +title: $:/plugins/bimlas/kin-filter/README/syntax +type: text/vnd.tiddlywiki + +! Kin filter operator + +* https://gitlab.com/bimlas/tw5-kin-filter (official repository) +* https://github.com/bimlas/tw5-kin-filter (mirror, please star if you like it) + +The purpose of the ''kin'' operator with examples: + +* Finds related tags, related tiddlers in any depth +* Finds out where base tiddler originates and what other elements originate from it +* Finds the ancestors and successors of a family member +* Finds the "leaves" of the branch of the base tiddler in a tree-like structure (where the base tiddler is a leaf) +* Finds the super- and subsets / groups of a mathematical set (where the base tiddler is a set) + +[img[$:/plugins/bimlas/kin-filter/README/concept.svg]] + +|''input''|a [[selection of titles|https://tiddlywiki.com/#Title%20Selection]]| +|''suffix''|the ''kin'' operator uses a rich suffix, see below for details| +|''parameter''|''B'' base tiddler title or nothing| +|''output''|''with parameter B''
    » those input titles which are ''kin with B''
    ''without B''
    » ''all'' tiddler titles which are ''kin with input titles'' (treat input titles as base tiddlers)| +|''`!` output''|''with parameter B''
    » those input titles which are ''//NOT// kin with B''
    ''without parameter B''
    » ignored| + +The ''kin'' operator uses an extended syntax that permits multiple fields and flags to be passed: + +``` +[kin:::[]] +``` + +* ''field'': name of the [[field|https://tiddlywiki.com/#TiddlerFields]] which connecting tiddlers (assumed to be a [[title list|https://tiddlywiki.com/#Title%20List]], defaulting to `tags`) +* ''direction'': collect the tiddler titles in this direction relative to the base tiddler +** ''from'': collect kins of base tiddler pointing from it (including the base tiddler title itself) +** ''to'': collect kins of base tiddler pointing to it (including the base tiddler title itself) +** ''with'': (the default) union of the aboves +* ''depth'': maximum depth of the collected labels in the tree structure relative to the base tiddler (a positive number, not limited by default) +* ''operand'': filter operand, the base tiddler + +''kin'' is a [[modifier|https://tiddlywiki.com/#Selection%20Constructors]], but without ''B'' parameter is a [[constructor|https://tiddlywiki.com/#Selection%20Constructors]]. + +!! Installation instructions + +To add the plugin to your own ~TiddlyWiki5, just drag this link to the browser window: + +$:/plugins/bimlas/kin-filter + +For other installation options see the repositories above. + +//Select the next tab to continue.// diff --git a/template/wiki/plugins/bimlas/kin-filter/kin.js b/template/wiki/plugins/bimlas/kin-filter/kin.js new file mode 100644 index 00000000..3f25998c --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/kin.js @@ -0,0 +1,137 @@ +/*\ +title: $:/plugins/bimlas/kin-filter/kin.js +type: application/javascript +module-type: filteroperator + +Finds out where a tiddler originates from and what other tiddlers originate from it + +\*/ +(function() { + + /*jslint node: true, browser: true */ + /*global $tw: true */ + "use strict"; + + function collectTitlesRecursively(baseTiddler,baseTitle,options) { + var cacheName = "kin-filter-" + baseTitle + "-" + options.fieldName + "-", + titlesPointingFromBase = {}, + titlesPointingToBase = {}, + resultsFrom = [], + resultsTo = []; + + /* Copy of findListingsOfTiddler, but it's searching in shadows as well. */ + function findListingsOfTiddler(targetTitle,fieldName) { + fieldName = fieldName || "list"; + var titles = []; + options.wiki.eachTiddlerPlusShadows(function(tiddler,title) { + var list = $tw.utils.parseStringArray(tiddler.fields[fieldName]); + if(list && list.indexOf(targetTitle) !== -1) { + titles.push(title); + } + }); + return titles; + } + + function addToResultsIfNotFoundAlready(alreadyFound,title,depth) { + if(title in alreadyFound) { + return false; + } + alreadyFound[title] = depth; + return true + } + + function collectTitlesPointingFrom(tiddler,title,currentDepth) { + if(addToResultsIfNotFoundAlready(titlesPointingFromBase,title,currentDepth)) { + currentDepth += 1; + if(tiddler) { + $tw.utils.each(tiddler.getFieldList(options.fieldName),function(targetTitle) { + collectTitlesPointingFrom(options.wiki.getTiddler(targetTitle),targetTitle,currentDepth); + }); + } + } + } + + function collectTitlesPointingTo(title,currentDepth) { + if(addToResultsIfNotFoundAlready(titlesPointingToBase,title,currentDepth)) { + currentDepth += 1; + $tw.utils.each(findListingsOfTiddler(title,options.fieldName),function(targetTitle) { + collectTitlesPointingTo(targetTitle,currentDepth); + }); + } + } + + function getObjectKeysByExpression(object,callback) { + var key, + results = []; + for (key in object) { + if (object.hasOwnProperty(key) && callback(object[key])) { + results.push(key); + } + } + return results; + } + + function getResultsInGivenDepth(cachedData) { + if(options.depth) { + return getObjectKeysByExpression(cachedData,function(value) { + return value <= options.depth; + }) + } else { + return Object.keys(cachedData); + } + } + + if((options.direction === "from") || (options.direction === "with")) { + resultsFrom = $tw.wiki.getGlobalCache(cacheName + "from",function() { + collectTitlesPointingFrom(baseTiddler,baseTitle,0); + return titlesPointingFromBase; + }); + resultsFrom = getResultsInGivenDepth(resultsFrom); + } + if((options.direction === "to") || (options.direction === "with")) { + resultsTo = $tw.wiki.getGlobalCache(cacheName + "to",function() { + collectTitlesPointingTo(baseTitle,0); + return titlesPointingToBase; + }); + resultsTo = getResultsInGivenDepth(resultsTo); + } + return $tw.utils.pushTop(resultsFrom,resultsTo); + } + + /* + Export our filter function + */ + exports.kin = function(source,operator,options) { + var results = [], + needsExclusion = operator.prefix === "!", + suffixes = operator.suffixes || [], + filterOptions = { + wiki: options.wiki, + fieldName: ((suffixes[0] || [])[0] || "tags").toLowerCase(), + direction: ((suffixes[1] || [])[0] || "with").toLowerCase(), + depth: Number((suffixes[2] || [])[0]), + }; + + if((operator.operand === "") && (needsExclusion)) { + return []; + } + + if(operator.operand !== "") { + var baseTitle = operator.operand, + baseTiddler = options.wiki.getTiddler(baseTitle), + foundTitles = collectTitlesRecursively(baseTiddler,baseTitle,filterOptions); + + source(function(tiddler,title) { + if(needsExclusion === (foundTitles.indexOf(title) === -1)) { + results.push(title); + } + }); + } else { + source(function(tiddler,title) { + results = $tw.utils.pushTop(results,collectTitlesRecursively(tiddler,title,filterOptions)); + }); + } + + return results; + } +})(); diff --git a/template/wiki/plugins/bimlas/kin-filter/plugin.info b/template/wiki/plugins/bimlas/kin-filter/plugin.info new file mode 100644 index 00000000..b1b353e4 --- /dev/null +++ b/template/wiki/plugins/bimlas/kin-filter/plugin.info @@ -0,0 +1,10 @@ +{ + "title": "$:/plugins/bimlas/kin-filter", + "description": "Kin filter: Recursively looking for kinship between tiddler titles", + "author": "bimlas", + "version": "1.0.0", + "core-version": ">=5.1.18", + "source": "https://gitlab.com/bimlas/tw5-kin-filter", + "plugin-type": "plugin", + "list": "README/syntax README/examples" +} diff --git a/template/wiki/plugins/bimlas/locator/README/CHANGELOG.tid b/template/wiki/plugins/bimlas/locator/README/CHANGELOG.tid new file mode 100644 index 00000000..b38850e6 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/README/CHANGELOG.tid @@ -0,0 +1,82 @@ +tags: +title: $:/plugins/bimlas/locator/README/CHANGELOG +type: text/vnd.tiddlywiki + +Unreleased + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/master...dev]] + +!! 2.0.0 + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/v1.5.0...v2.0.0]] + +''ALMOST COMPLETE REWRITING, BACKWARDS INCOMPATIBLE CHANGES ARE INTRODUCED'' + +* ''It does not require the `kin` filter operator at all'' +* ''You can filter to any field besides the tags'' +* You can use the standard search from any `locator-view` +* You can use any field to link tiddlers (as "tags") +* You can also navigate through tiddler links +* You can use arbitrary templates to display context items and field values +* ''INCOMPATIBLE CHANGES''
    //Before upgrading to the new version, make a backup (as before upgrading any plugin) and make the following changes.// +** Renamed `locator-tags` to `locator-fields`
    //Change the macro call in your tiddlers// +** `locator-view` does not supporting `finalFilter` and `tagFilter`
    //Remove them from your macrocalls// +** Removed `filter-grandchildren` filter
    //Because it can no longer be passed through parameters.// +** The "Open in Locator sidebar" toolbar button is moved from `$:/plugins/bimlas/locator/viewtemplate/open-in-sidebar` to `$:/plugins/bimlas/locator/viewtemplate/open-in-sidebar` and its code is changed as well
    //Compare the old tiddler with the shadow and note the changes if any. Transfer them to the new tiddler and delete the old tiddler.// + +!! 1.5.0 + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/v1.4.0...v1.5.0]] + +* Move tiddler from current context to higher- or subtopic by drag-n-dropping in the Locator sidebar +* Assign any tiddler to any of the titles in the Locator sidebar by drag-n-dropping +* Show the (top-level) base tag to be able to move the tiddler titles there +* Add button to open search results in advanced search +* Show buttons using the Kin filter only when the filter operator is available +* Fix related tag issue (not all of them were listed) +* Fix whitespace issue +* Refactor the code +* Add tutorial to the demo + +!! 1.4.0 + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/v1.3.1...v1.4.0]] + +* When there was a space in the search string and "new tiddler" button is used from search, the tiddler title was encapsulated (`[[title with spaces]]`) +* When there was a space in any of the breadcrumbs in sidebar and "new tiddler" button is used from it, the tiddler got all of the breadcrumb tags, the title with spaces was encapsulated (literally `[[title with spaces]]` tag) +* Add more tips to [[$:/plugins/bimlas/locator/README/TIPS]] +* Add descriptive tooltip to buttons + +!! 1.3.1 + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/v1.3.0...v1.3.1]] + +* Add base tag if there is no breadcrumbs when creating new tiddler in current context +* Reword documentation + +!! 1.3.0 + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/v1.2.0...v1.3.0]] + +* Create new tiddler from search text + +!! 1.2.0 + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/v1.1.0...v1.2.0]] + +* Add button to create new tiddler in current context +* Ability to use additional filter on tags + +!! 1.1.0 + +[[See GitLab for detailed change history of this release|https://gitlab.com/bimlas/tw5-locator/compare/v1.0.0...v1.1.0]] + +* ''I realized that most functions work without the `kin` filter'' +* Use the same "style" for breadcrumb- and list items +* Show real tags instead of tag pills +* Turn off filter of direct tag in the breadcrumbs by its tag icon +* Ancestor tags in breadcrumbs of search are operating like direct labels, they can be removed one by one + +!! 1.0.0 + +* First public release diff --git a/template/wiki/plugins/bimlas/locator/README/README.tid b/template/wiki/plugins/bimlas/locator/README/README.tid new file mode 100644 index 00000000..2fb19d9e --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/README/README.tid @@ -0,0 +1,38 @@ +tags: +title: $:/plugins/bimlas/locator/README/README +type: text/vnd.tiddlywiki + +! Locator + +Locator provides ''a universal interface for navigating between your tiddlers and searching, filtering them'' without the need to write [[filter expressions|https://tiddlywiki.com/#Filters]]. The plugin contains ''a table of contents widget and an enhanced search engine'' that contains a ''visual filter builder to filter results by tags and field values''. You can ''organize the tiddlers to any number of trees, even by custom fields or links in text''. Unlike [[classic Table of Contents|https://tiddlywiki.com/#Table-of-Contents%20Macros%20(Examples)]], [[standard search|$:/core/ui/AdvancedSearch/Standard]], [[filter search|$:/core/ui/AdvancedSearch/Filter]] and [[list of tags|$:/core/ui/MoreSideBar/Tags]], this plugin handles these functions organically. + +* https://bimlas.gitlab.io/tw5-locator (demo + install) +* https://gitlab.com/bimlas/tw5-locator (main repository) +* https://github.com/bimlas/tw5-locator (mirror, ''please star if you like the plugin'') + +! Benefits compared to built-in solutions + +* ''Shows field values''
    You can mark a tiddler with multiple tags and field values, but in the classic ToC you don't see them while browsing, in Locator you can apply them as filters. +* ''Easy way to search for field values''
    Find tags, field values in the standard search based on part of their name or view the all fields of the search results at a glance. +* ''Limit the scope of search''
    You don't have to store your recipes and family tree in a separate wiki just to make them easier to find: you can define the scope of your search with some clicks (without the need to write filters in [[$:/AdvancedSearch]]). +* ''Reorder the hierarchy with drag-n-drop''
    You can easily move tiddlers between topics by drag-n-dropping them. +* ''Create mindmaps''
    You can associate tiddlers with any field other than the tag, so you can create complex graphs that you can browse through text only user interface. +* ''There is no need to include a table of contents in the main tiddler of each topic''
    Just press the "Locator sidebar" button on the tiddler's toolbar and you can browse it's children, links right away in the sidebar. +* ''Create new tiddler in current scope''
    The "new tiddler" button in Locator creates a new tiddler pre-filled with the currently selected field values and named by the search query (like a special "new here" button). +* ''Phone friendlier''
    The width of the classic ToC is increasing and the size of the text is decrasing as we move down in the context, while Locator remains readable. + +! Usage + +See the [[demo|https://bimlas.gitlab.io/tw5-locator]] for a complete tutorial + +! Installation instructions + +''The plugin consists of separate parts'', each of them can be used on its own, so ''it is possible to use only the parts you like'', but they can be used most effectively together because ''they interact with each other''. + +To add the plugin to your own ~TiddlyWiki5, just drag this link to the browser window and ''create or drag the required tiddlers from the demo'': + +$:/plugins/bimlas/locator + +For other installation options see the links above. + +//Select the next tab to continue.// diff --git a/template/wiki/plugins/bimlas/locator/README/TIPS.tid b/template/wiki/plugins/bimlas/locator/README/TIPS.tid new file mode 100644 index 00000000..dc5e3dca --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/README/TIPS.tid @@ -0,0 +1,55 @@ +tags: +title: $:/plugins/bimlas/locator/README/TIPS +type: text/vnd.tiddlywiki + +! Tips + +!! Organic navigation + +* In `locator-fields`, look for a tag and apply it recursively; the `locator-search` only affects tiddlers associated with it at any depth +* Click on the tag in `locator-fields` and open its tiddler, then click on the "locator sidebar" button; the `locator-view` sidebar will show it's hierarchy +* Navigate in the hierarchy in `locator-view` sidebar then search for a term in `locator-search`; pressing the "search in context" button restricting the search to the context of `locator-view` sidebar +* If you cannot find what you are searching for, then you may want to create a new tiddler, use the "new tiddler" button in one of the Locator macros + +!! Taking good habits + +''To get the least chance of writing the same note you wrote earlier, look for a new tiddler before creating a note. To force yourself'', hide the "new tiddler" button inside the Page Toolbar and ''use the "new tiddler" button inside the Locator search'', so if you want to create a new tiddler you must first look for it. If you are absolutely sure that there is no tiddler yet and you need to create a new tiddler, this solution is also useful because search text defines the default name of the new tiddler. + +!! Let the "Locator sidebar" button automatically focus to the Locator sidebar + +For example, the More -> Tags sidebar is currently open when we use the "Locator sidebar" toolbar button on one of the tiddlers, but we do not see the effect because the Locator sidebar is not visible, thus we need to modify to let button automatically open the corresponding sidebar. + +* If we don't know exactly, look for the sidebar tiddler's title (used as `text` parameter in the code below) +** Open the Advanced Search -> Filter and look for the sidebar name in the `caption` field, for example `[caption[Locator]]` will result [[Locator view]] +* Find the state tiddler that contains the sidebar tiddler's title (used as `$tiddler` parameter in the code below) +** Open the Advanced Search -> Filter and look for `[text[Locator view]]` for example +** Switch between Locator sidebar and another sidebar to see which state tiddler is changing, this is what we are looking for ([[$:/state/tab/sidebar--595412856]] for example) +* Use the name of the state tiddler and the title of the sidebar in the code below and add this line to [[$:/plugins/bimlas/locator/viewtemplate/open-in-sidebar]] tiddler + +``` + +... +<$button tooltip="Browse hierarchy of tag in Locator sidebar" aria-label="locator sidebar" class=<>> + +<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="Locator view"/> +``` + +If you rename the sidebar, you must also update this change! See [[this thread on Google Groups|https://groups.google.com/d/msg/tiddlywiki/xAe_fvhzoCY/UoKZc7ZZDQAJ]] for details. + +!! Speed up (on phones) + +!!! Conditional view + +Because we don't look at the table of contents and search results at the same time, we can ''hide the Locator while we are using the standard search''. + +To achieve this, place the Locator view in the following condition: + +``` +<$reveal type="match" default="" text={{{ [prefix[$:/state/popup/search-dropdown]] }}}> + <> + +``` + +''When you open TiddlyWiki'', the search entry is in focus by default, so ''the Locator sidebar is not visible''. To fix this, change the text of [[$:/config/Search/AutoFocus]] [[hidden setting|https://tiddlywiki.com/#Hidden%20Setting%3A%20Search%20AutoFocus]] to `false`. + +//Select the next tab to continue.// diff --git a/template/wiki/plugins/bimlas/locator/README/macros.tid b/template/wiki/plugins/bimlas/locator/README/macros.tid new file mode 100644 index 00000000..579b3a90 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/README/macros.tid @@ -0,0 +1,56 @@ +tags: +title: $:/plugins/bimlas/locator/README/macros +type: text/vnd.tiddlywiki + +! Usage of the macros + +!! `locator-view` + +This is ''a [[Table of Contents macro|https://tiddlywiki.com/#Table-of-Contents%20Macros%20(Examples)]] that lets you navigate the wiki'' just as you would with a file manager on the file system. The macro can be placed anywhere you want, for example put it in the sidebar. + +* Create a new tiddler +* Add the [[$:/tags/SideBar]] tag +* Add the `caption` field to change the title of the tab ("Contents" for example) +* Call the macro by placing this text in the tiddler: + +``` +<> +``` + +Optional parameters: + +; `fieldOfRelationship` (`tags` by default) +: The default field which the tree is based on. + +; `templateOfContextItems` (`$:/plugins/bimlas/locator/field-templates/link` by default) +: The default template to display the context items with. + +!! `locator-search` and `locator-fields` + +The `locator-search` macro can be used in the same way as standard search, but ''you can narrow the scope of the search to the context by the fields filter'', in `locator-fields` you can `search for field values`. + +* Create a new tiddler +* Add the [[$:/tags/SearchResults]] tag +* Add the `caption` field to change the title of the tab ("Locator" for example) +* Call the macro by placing this text in the tiddler: + +``` +<> +``` + +Do the same with `<>` macro. + +If you want to use `locator-fields` in the sidebar (like the sidebar -> More -> Tags tab) insted of standard search, you should also define the `searchTiddler` variable before the macro call: + +* Create a new tiddler +* Add the [[$:/tags/SideBar]] tag +* Add the `caption` field to change the title of the tab ("Fields" for example) +* Call the macro by placing this text in the tiddler: + +``` +<$vars searchTiddler=" "> + <> + +``` + +//Select the next tab to continue.// diff --git a/template/wiki/plugins/bimlas/locator/actions/add-field-value.tid b/template/wiki/plugins/bimlas/locator/actions/add-field-value.tid new file mode 100644 index 00000000..aa3e6361 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/actions/add-field-value.tid @@ -0,0 +1,15 @@ +tags: $:/tags/Actions +title: $:/plugins/bimlas/locator/actions/add-field-value +type: text/vnd.tiddlywiki + +\define assign-value() + <$action-setfield $tiddler=<> $field=<> $value=<>/> +\end + +\define assign-list-item() + <$action-listops $tiddler=<> $field=<> $subfilter="[all[current]]"/> +\end + +<$list filter="[titlesubfilter]" emptyMessage=<> variable="null"> + <> + diff --git a/template/wiki/plugins/bimlas/locator/actions/add-to-history.tid b/template/wiki/plugins/bimlas/locator/actions/add-to-history.tid new file mode 100644 index 00000000..2dea542e --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/actions/add-to-history.tid @@ -0,0 +1,6 @@ +tags: $:/tags/Actions +title: $:/plugins/bimlas/locator/actions/add-to-history +type: text/vnd.tiddlywiki + +<$action-listops $tiddler=<> $field="history" $subfilter="[all[current]]"/> +{{$:/plugins/bimlas/locator/actions/remove-filters}} diff --git a/template/wiki/plugins/bimlas/locator/actions/move-to-another-context.tid b/template/wiki/plugins/bimlas/locator/actions/move-to-another-context.tid new file mode 100644 index 00000000..ed487c54 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/actions/move-to-another-context.tid @@ -0,0 +1,27 @@ +tags: $:/tags/Actions +title: $:/plugins/bimlas/locator/actions/move-to-another-context +type: text/vnd.tiddlywiki + +\define add-action-tiddler-to-current-tiddler() + <$tiddler tiddler={{{ [subfilterlast[]] }}}> + {{||$:/plugins/bimlas/locator/actions/remove-field-value}} + + {{||$:/plugins/bimlas/locator/actions/add-field-value}} +\end + +\define add-current-tiddler-to-action-tiddler() + <$vars originalCurrentTiddler=<>> + <$tiddler tiddler=<>> + <$vars actionTiddler={{{ [subfilterlast[]] }}}> + {{||$:/plugins/bimlas/locator/actions/remove-field-value}} + + <$vars actionTiddler=<>> + {{||$:/plugins/bimlas/locator/actions/add-field-value}} + + + +\end + +<$list filter="[titlelocator-direction-of-traverseregexp[to]]" emptyMessage=<> variable="null"> + <> + diff --git a/template/wiki/plugins/bimlas/locator/actions/remove-field-value.tid b/template/wiki/plugins/bimlas/locator/actions/remove-field-value.tid new file mode 100644 index 00000000..2fe03f70 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/actions/remove-field-value.tid @@ -0,0 +1,15 @@ +tags: $:/tags/Actions +title: $:/plugins/bimlas/locator/actions/remove-field-value +type: text/vnd.tiddlywiki + +\define remove-value() + <$action-setfield $tiddler=<> $field=<> $value=""/> +\end + +\define remove-list-item() + <$action-listops $tiddler=<> $field=<> $subfilter="-[all[current]]"/> +\end + +<$list filter="[titlesubfilter]" emptyMessage=<> variable="null"> + <> + diff --git a/template/wiki/plugins/bimlas/locator/actions/remove-filters.tid b/template/wiki/plugins/bimlas/locator/actions/remove-filters.tid new file mode 100644 index 00000000..11172db9 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/actions/remove-filters.tid @@ -0,0 +1,7 @@ +tags: $:/tags/Actions +title: $:/plugins/bimlas/locator/actions/remove-filters +type: text/vnd.tiddlywiki + +<$action-deletetiddler $tiddler=<>/> +<$action-deletetiddler $tiddler=<>/> +<$action-setfield $tiddler=<> opened-fields-filters=""/> \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/buttons/clear-search-input.tid b/template/wiki/plugins/bimlas/locator/buttons/clear-search-input.tid new file mode 100644 index 00000000..4e020785 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/clear-search-input.tid @@ -0,0 +1,8 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/clear-search-input +type: text/vnd.tiddlywiki + +<$button tooltip="Clear search text, show all results" class=<>> + <$action-setfield $tiddler="$:/temp/search" text=" "/> + {{$:/core/images/preview-open}} + diff --git a/template/wiki/plugins/bimlas/locator/buttons/collapse-history.tid b/template/wiki/plugins/bimlas/locator/buttons/collapse-history.tid new file mode 100644 index 00000000..fdb77975 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/collapse-history.tid @@ -0,0 +1,8 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/collapse-history +type: text/vnd.tiddlywiki + +<$button tooltip="Collapse history" class=<>> + <$action-listops $tiddler=<> $field="history" $filter="[titleeach:list-item[history]last[]]"/> + {{$:/core/images/fold-button}} + diff --git a/template/wiki/plugins/bimlas/locator/buttons/context-arrow.tid b/template/wiki/plugins/bimlas/locator/buttons/context-arrow.tid new file mode 100644 index 00000000..273a5753 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/context-arrow.tid @@ -0,0 +1,7 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/context-arrow +type: text/vnd.tiddlywiki + +<$list filter="[titlefield:invert-direction[yes]]" emptyMessage={{$:/core/images/right-arrow}}> + {{$:/core/images/left-arrow}} + diff --git a/template/wiki/plugins/bimlas/locator/buttons/copy-filter-to-advanced-search.tid b/template/wiki/plugins/bimlas/locator/buttons/copy-filter-to-advanced-search.tid new file mode 100644 index 00000000..f4201edd --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/copy-filter-to-advanced-search.tid @@ -0,0 +1,16 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/copy-filter-to-advanced-search +type: text/vnd.tiddlywiki + + +<$wikify name="filter" text="<> +[search{<>}]"> + <$button tooltip="Continue filtering in advanced search" class=<>> + <$action-setfield $tiddler="$:/temp/advancedsearch" text=<>/> + <$action-setfield $tiddler="$:/state/tab--1498284803" text="$:/core/ui/AdvancedSearch/Filter"/> + <$action-navigate $to="$:/AdvancedSearch"/> + {{$:/core/images/advanced-search-button}} + + diff --git a/template/wiki/plugins/bimlas/locator/buttons/create-new-tiddler.tid b/template/wiki/plugins/bimlas/locator/buttons/create-new-tiddler.tid new file mode 100644 index 00000000..96fddf5b --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/create-new-tiddler.tid @@ -0,0 +1,39 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/create-new-tiddler +type: text/vnd.tiddlywiki + +\define add-as-list() + <$action-listops $tiddler="$:/temp/bimlas/locator/new-tiddler" $field=<> $subfilter=<<__valueAsFilter__>>/> +\end + +\define add-as-value() + <$action-setfield $tiddler="$:/temp/bimlas/locator/new-tiddler" $field=<> $value={{{ [subfilter<__valueAsFilter__>] }}}/> +\end + +\define add-field-value(valueAsFilter) + <$list filter="[titlesubfilter]" emptyMessage=<>> + <> + +\end + +\define add-filters-as-field-values() + <$list filter="[titleindexes[]]" variable="field"> + <$list filter="[titlelocator-selected-field-valuesfirst[]]"> + <locator-selected-field-values]">> + + +\end + +\define add-to-current-context() + <$set name="field" filter=<>> + <last[]]">> + +\end + +<$button tooltip="Create new tiddler in the current context" class=<>> + <> + <> + <$action-sendmessage $message="tm-new-tiddler" $param="$:/temp/bimlas/locator/new-tiddler" title={{{ [title] [title{$:/language/DefaultNewTiddlerTitle}] -[[]] +[first[]] }}}/> + <$action-deletetiddler $tiddler="$:/temp/bimlas/locator/new-tiddler"/> + {{$:/core/images/new-button}} + diff --git a/template/wiki/plugins/bimlas/locator/buttons/go-down-to-context.tid b/template/wiki/plugins/bimlas/locator/buttons/go-down-to-context.tid new file mode 100644 index 00000000..b2bdde2a --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/go-down-to-context.tid @@ -0,0 +1,22 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/go-down-to-context +type: text/vnd.tiddlywiki + +\define node() + <$button tooltip="Go to context, show chidlren of this tiddler" class=<> actions={{$:/plugins/bimlas/locator/actions/add-to-history}}> + {{$:/plugins/bimlas/locator/buttons/context-arrow}} + +\end + +\define leaf() + <$button class=<>> + {{$:/core/images/blank}} + +\end + +\define go-down-to-context() + + <$list filter="[all[current]locator-enlist-children:$(currentField)$] [titlefield:allow-to-open-leaves[yes]] +[first[]]" emptyMessage=<> variable="null"><> +\end + +<> diff --git a/template/wiki/plugins/bimlas/locator/buttons/go-up-to-context.tid b/template/wiki/plugins/bimlas/locator/buttons/go-up-to-context.tid new file mode 100644 index 00000000..d761d6e6 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/go-up-to-context.tid @@ -0,0 +1,12 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/go-up-to-context +type: text/vnd.tiddlywiki + +\define actions() + <$action-listops $tiddler=<> $field="history" $filter="[subfilterallbefore] [all[current]]"/> + {{$:/plugins/bimlas/locator/actions/remove-filters}} +\end + +<$button tooltip="Go to context, show chidlren of this tiddler" class=<> actions=<>> + {{$:/plugins/bimlas/locator/buttons/context-arrow}} + diff --git a/template/wiki/plugins/bimlas/locator/buttons/open-field-settings.tid b/template/wiki/plugins/bimlas/locator/buttons/open-field-settings.tid new file mode 100644 index 00000000..180c795c --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/open-field-settings.tid @@ -0,0 +1,11 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/open-field-settings +type: text/vnd.tiddlywiki + +<$button + to="$:/plugins/bimlas/locator/settings/settings" + tooltip="Open field settings" + class=<> +> + {{$:/core/images/options-button}}<$list filter="[title!regexp[^\$:/state/bimlas/locator/search/]]" variable="null"> Open field settings + \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/buttons/remove-filters-of-current-field.tid b/template/wiki/plugins/bimlas/locator/buttons/remove-filters-of-current-field.tid new file mode 100644 index 00000000..ae3fa45e --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/remove-filters-of-current-field.tid @@ -0,0 +1,18 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/remove-filters-of-current-field +type: text/vnd.tiddlywiki + +\define actions() + <$action-setfield $tiddler=<> $index=<> $value=""/> + <$action-setfield $tiddler=<> $index=<> $value=""/> + <$action-listops $tiddler=<> $field="opened-fields-filters" $subfilter="-[]"/> + <$list filter="[regexp[yes]]" variable="null"> + <$action-setfield $tiddler="$:/state/bimlas/locator/search/recursive-filters/" $index=<> $value=""/> + +\end + +<$list filter="[title] [title] +[locator-selected-field-valuesfirst[]]" variable="null"> + <$button tooltip="Remove field filters" class=<> actions=<>> + {{$:/core/images/cancel-button}} + + \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/buttons/remove-filters.tid b/template/wiki/plugins/bimlas/locator/buttons/remove-filters.tid new file mode 100644 index 00000000..9a46f641 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/remove-filters.tid @@ -0,0 +1,9 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/remove-filters +type: text/vnd.tiddlywiki + +<$list filter="[title] [title] +[locator-selected-field-values[]first[]]" variable="null"> + <$button tooltip="Remove field filters" class=<> actions={{$:/plugins/bimlas/locator/actions/remove-filters}}> + {{$:/core/images/cancel-button}} + + \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/buttons/search-in-context.tid b/template/wiki/plugins/bimlas/locator/buttons/search-in-context.tid new file mode 100644 index 00000000..b8174c0b --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/search-in-context.tid @@ -0,0 +1,40 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/search-in-context +type: text/vnd.tiddlywiki + +\define copy-field(sourceTiddler destinationTiddler field) + <$set name="value" tiddler=<<__sourceTiddler__>> field=<<__field__>>> + <$action-setfield $tiddler=<<__destinationTiddler__>> $field=<<__field__>> $value=<>/> + +\end + +\define clear-data-tiddler(tiddler) + <$action-deletetiddler $tiddler=<<__tiddler__>>/> + <$action-setfield $tiddler=<<__tiddler__>> type="application/json"/> +\end + +\define search-in-current-context() + <$action-listops $tiddler="$:/state/bimlas/locator/search/intersection/" $index={{{ [subfilter] }}} $subfilter="[subfilterlast[]]"/> + <$action-listops $tiddler="$:/state/bimlas/locator/search/recursive-filters/" $index={{{ [subfilter] }}} $filter="[subfilterlast[]]"/> +\end + +\define copy-filters() + <$macrocall $name="copy-field" sourceTiddler=<> destinationTiddler="$:/state/bimlas/locator/search/intersection/" field="text"/> + <$macrocall $name="copy-field" sourceTiddler=<> destinationTiddler="$:/state/bimlas/locator/search/difference/" field="text"/> +\end + +\define reset-search-context() + <$action-deletetiddler $tiddler="$:/state/bimlas/locator/search/context/"/> + <$list filter="[regexp[yes]]" variable="null"> + <$macrocall $name="clear-data-tiddler" tiddler="$:/state/bimlas/locator/search/recursive-filters/"/> + + <$macrocall $name="clear-data-tiddler" tiddler="$:/state/bimlas/locator/search/intersection/"/> + <$macrocall $name="clear-data-tiddler" tiddler="$:/state/bimlas/locator/search/difference/"/> +\end + +<$button tooltip="Restrict search to this context (in full depth)" class=<>> + <> + <> + <> + {{$:/core/images/advanced-search-button}} + diff --git a/template/wiki/plugins/bimlas/locator/buttons/toggle-context-settings.tid b/template/wiki/plugins/bimlas/locator/buttons/toggle-context-settings.tid new file mode 100644 index 00000000..d9917a51 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/buttons/toggle-context-settings.tid @@ -0,0 +1,19 @@ +tags: +title: $:/plugins/bimlas/locator/buttons/toggle-context-settings +type: text/vnd.tiddlywiki + +\define opened() + <$button tooltip="Toggle context settings" class=<>> + <$action-setfield $tiddler=<> $field="context-settings-opened" $value=""/> + {{$:/core/images/options-button}} + +\end + +\define closed() + <$button tooltip="Toggle context settings" class=<>> + <$action-setfield $tiddler=<> $field="context-settings-opened" $value="yes"/> + {{$:/core/images/options-button}} + +\end + +<$list filter="[titlefield:context-settings-opened[yes]]" emptyMessage=<>><> \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/edit-template/locator-references.tid b/template/wiki/plugins/bimlas/locator/edit-template/locator-references.tid new file mode 100644 index 00000000..8fd708ab --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/edit-template/locator-references.tid @@ -0,0 +1,41 @@ +list-after: $:/core/ui/EditTemplate/title +tags: $:/tags/EditTemplate +title: $:/plugins/bimlas/locator/edit-template/locator-references +type: text/vnd.tiddlywiki + +\define prompt() + The following references to this tiddler in //<<__field__>>// [[Locator field|$:/plugins/bimlas/locator/settings/settings]] will not be automatically updated: +\end + +\define children-by-field(field) + <$list filter="[title{!!draft.of}locator-enlist-children:$field$[]first[]]" variable="null"> + <$vars stateTiddler=<> > + + <$reveal type="nomatch" state=<> text="show"> + <$button set=<> setTo="show" class="tc-btn-invisible"> + {{$:/core/images/right-arrow}} + <> + + + <$reveal type="match" state=<> text="show"> + <$button set=<> setTo="hide" class="tc-btn-invisible"> + {{$:/core/images/down-arrow}} + <> + + + + <$reveal type="match" state=<> text="show"> + <$list filter="[title{!!draft.of}locator-enlist-children:$field$[]]" template="$:/core/ui/ListItemTemplate"> + <$link/> + + + + + +\end + +<$reveal state="!!draft.title" type="nomatch" text={{!!draft.of}} tag="div"> + <$list filter="[locator-enlist-relationship-fields[]] -[[tags]] -[[list]] -[[LINKS-IN-TEXT]]" variable="currentField"> + <$macrocall $name="children-by-field" field=<>/> + + \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/color.tid b/template/wiki/plugins/bimlas/locator/field-templates/color.tid new file mode 100644 index 00000000..6ea055df --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/color.tid @@ -0,0 +1,6 @@ +caption: Color +tags: $:/tags/bimlas/locator/field-templates +title: $:/plugins/bimlas/locator/field-templates/color +type: text/vnd.tiddlywiki + +> disabled> <$view field="title"/> \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/edit-fields-plus-transclusion.tid b/template/wiki/plugins/bimlas/locator/field-templates/edit-fields-plus-transclusion.tid new file mode 100644 index 00000000..e5520424 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/edit-fields-plus-transclusion.tid @@ -0,0 +1,16 @@ +caption: Edit fields + Transclusion +tags: $:/tags/bimlas/locator/context-item-templates +title: $:/plugins/bimlas/locator/field-templates/edit-fields-plus-transclusion +type: text/vnd.tiddlywiki + +\define frame-classes() tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ + +{{||$:/plugins/bimlas/locator/field-templates/link}} +
    > data-tiddler-title=<>> + <$fieldmangler> + {{||$:/core/ui/EditTemplate/tags}} + {{||$:/core/ui/EditTemplate/fields}} + +
    +<$transclude mode="block"/> +
    \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/edit-fields.tid b/template/wiki/plugins/bimlas/locator/field-templates/edit-fields.tid new file mode 100644 index 00000000..12278fb9 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/edit-fields.tid @@ -0,0 +1,15 @@ +caption: Edit fields +tags: $:/tags/bimlas/locator/context-item-templates +title: $:/plugins/bimlas/locator/field-templates/edit-fields +type: text/vnd.tiddlywiki + +\define frame-classes() tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ + +{{||$:/plugins/bimlas/locator/field-templates/link}} +
    > data-tiddler-title=<>> + <$fieldmangler> + {{||$:/core/ui/EditTemplate/tags}} + {{||$:/core/ui/EditTemplate/fields}} + +
    +
    \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/fields-plus-transclusion.tid b/template/wiki/plugins/bimlas/locator/field-templates/fields-plus-transclusion.tid new file mode 100644 index 00000000..04534d05 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/fields-plus-transclusion.tid @@ -0,0 +1,9 @@ +caption: Fields + Transclusion +tags: $:/tags/bimlas/locator/context-item-templates +title: $:/plugins/bimlas/locator/field-templates/fields-plus-transclusion +type: text/vnd.tiddlywiki + +{{||$:/plugins/bimlas/locator/field-templates/link}} +{{||$:/plugins/bimlas/locator/viewtemplate/field-list}} +<$transclude mode="block"/> +
    \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/fields.tid b/template/wiki/plugins/bimlas/locator/field-templates/fields.tid new file mode 100644 index 00000000..f263ada7 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/fields.tid @@ -0,0 +1,8 @@ +caption: Fields +tags: $:/tags/bimlas/locator/context-item-templates +title: $:/plugins/bimlas/locator/field-templates/fields +type: text/vnd.tiddlywiki + +{{||$:/plugins/bimlas/locator/field-templates/link}} +{{||$:/plugins/bimlas/locator/viewtemplate/field-list}} +
    \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/icon.tid b/template/wiki/plugins/bimlas/locator/field-templates/icon.tid new file mode 100644 index 00000000..6529da9d --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/icon.tid @@ -0,0 +1,6 @@ +caption: Icon +tags: $:/tags/bimlas/locator/field-templates +title: $:/plugins/bimlas/locator/field-templates/icon +type: text/vnd.tiddlywiki + + {{||$:/plugins/bimlas/locator/field-templates/link}} \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/link.tid b/template/wiki/plugins/bimlas/locator/field-templates/link.tid new file mode 100644 index 00000000..5902326d --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/link.tid @@ -0,0 +1,8 @@ +caption: Link +tags: $:/tags/bimlas/locator/field-templates $:/tags/bimlas/locator/context-item-templates +title: $:/plugins/bimlas/locator/field-templates/link +type: text/vnd.tiddlywiki + +<$link to=<>> + <$transclude field="caption"><$view field="title"/> + \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/tag.tid b/template/wiki/plugins/bimlas/locator/field-templates/tag.tid new file mode 100644 index 00000000..496340a7 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/tag.tid @@ -0,0 +1,6 @@ +caption: Tag +tags: $:/tags/bimlas/locator/field-templates +title: $:/plugins/bimlas/locator/field-templates/tag +type: text/vnd.tiddlywiki + +<> \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/text.tid b/template/wiki/plugins/bimlas/locator/field-templates/text.tid new file mode 100644 index 00000000..68a491bf --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/text.tid @@ -0,0 +1,6 @@ +caption: Text +tags: $:/tags/bimlas/locator/field-templates +title: $:/plugins/bimlas/locator/field-templates/text +type: text/vnd.tiddlywiki + +<$view field="title"/> \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/field-templates/transclusion.tid b/template/wiki/plugins/bimlas/locator/field-templates/transclusion.tid new file mode 100644 index 00000000..d921b50a --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/field-templates/transclusion.tid @@ -0,0 +1,9 @@ +caption: Transclusion +tags: $:/tags/bimlas/locator/context-item-templates +title: $:/plugins/bimlas/locator/field-templates/transclusion +type: text/vnd.tiddlywiki + +{{||$:/plugins/bimlas/locator/field-templates/link}} +
    +<$transclude mode="block"/> +
    \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/locator-fields.tid b/template/wiki/plugins/bimlas/locator/locator-fields.tid new file mode 100644 index 00000000..2acb9d4e --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/locator-fields.tid @@ -0,0 +1,36 @@ +tags: $:/tags/Macro +title: $:/plugins/bimlas/locator/macros/locator-fields +type: text/vnd.tiddlywiki + +\define locator-fields() + + <$importvariables filter="[all[tiddlers+shadows]prefix[$:/plugins/bimlas/locator/macros/]]"> + <$vars + contextState="$:/state/bimlas/locator/search/context/" + intersectionState="$:/state/bimlas/locator/search/intersection/" + differenceState="$:/state/bimlas/locator/search/difference/" + recursiveFilteringAvailable="yes" + > + + {{$:/plugins/bimlas/locator/templates/search-toolbar}} {{$:/plugins/bimlas/locator/buttons/remove-filters}} + +

    <$checkbox tiddler=<> field="limit-to-fields-of-filtered-tiddlers" checked="yes" unchecked="no" default="yes"> Limit to fields of filtered tiddlers

    + + <$list filter="[subfilterfirst[]]" emptyMessage="""<$list filter="0" variable="resultCount" template="$:/language/Search/Matches"/>"""> + <$list filter="[subfiltercount[]]" variable="resultCount" template="$:/language/Search/Matches"/> + + + + <$set name="filterContextItems" filter="[field:limit-to-fields-of-filtered-tiddlers[no]]" value="[!is[system]]" emptyValue=<>> + <$vars searchedFieldValue={{$(searchTiddler)$}}> + {{$:/plugins/bimlas/locator/templates/field-names}} + + + + <$list filter="[subfilterfirst[]]"> + <$list filter="[subfilterlimit[250]]" template="$:/core/ui/ListItemTemplate"/> + + + + +\end diff --git a/template/wiki/plugins/bimlas/locator/locator-search.tid b/template/wiki/plugins/bimlas/locator/locator-search.tid new file mode 100644 index 00000000..3549f6eb --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/locator-search.tid @@ -0,0 +1,32 @@ +tags: $:/tags/Macro +title: $:/plugins/bimlas/locator/macros/locator-search +type: text/vnd.tiddlywiki + +\define locator-search() + + <$importvariables filter="[all[tiddlers+shadows]prefix[$:/plugins/bimlas/locator/macros/]]"> + <$vars + contextState="$:/state/bimlas/locator/search/context/" + intersectionState="$:/state/bimlas/locator/search/intersection/" + differenceState="$:/state/bimlas/locator/search/difference/" + filterContextItems="[subfiltersearch{$(searchTiddler)$}]" + recursiveFilteringAvailable="yes" + > + + {{$:/plugins/bimlas/locator/templates/search-toolbar}} + + <$list filter="[subfiltercount[]]" variable="resultCount" template="$:/language/Search/Matches"/> + + {{$:/plugins/bimlas/locator/templates/fields-filter}} + + //{{$:/language/Search/Matches/Title}}// + + <$list filter="[subfiltersearch:title{$(searchTiddler)$}limit[250]]" template="$:/core/ui/ListItemTemplate"/> + + //{{$:/language/Search/Matches/All}}// + + <$list filter="[subfilterlimit[250]]" template="$:/core/ui/ListItemTemplate"/> + + + +\end diff --git a/template/wiki/plugins/bimlas/locator/locator-view.tid b/template/wiki/plugins/bimlas/locator/locator-view.tid new file mode 100644 index 00000000..6fafbc20 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/locator-view.tid @@ -0,0 +1,39 @@ +tags: $:/tags/Macro +title: $:/plugins/bimlas/locator/macros/locator-view +type: text/vnd.tiddlywiki + +\define locator-view(baseTitle fieldOfRelationship:"tags" templateOfContextItems:"$:/plugins/bimlas/locator/field-templates/link") + + <$importvariables filter="[all[tiddlers+shadows]prefix[$:/plugins/bimlas/locator/macros/]]"> + <$vars + contextState="$:/state/bimlas/locator/view/context/$(currentTiddler)$" + intersectionState="$:/state/bimlas/locator/view/intersection/$(currentTiddler)$" + differenceState="$:/state/bimlas/locator/view/difference/$(currentTiddler)$" + defaultFieldOfRelationship=<<__fieldOfRelationship__>> + > + + <$vars currentField={{{ [subfilter] }}}> + <$vars filterContextItems=<>> +
    + + {{$:/plugins/bimlas/locator/templates/history}} + + --- + + {{$:/plugins/bimlas/locator/templates/context-settings}} +
    + {{||$:/plugins/bimlas/locator/templates/view-toolbar}} +
    + {{$:/plugins/bimlas/locator/templates/fields-filter}} +
      + <$list filter="[subfilterregexp[^LINKS-IN-TEXT$]]" emptyMessage={{$:/plugins/bimlas/locator/templates/list-of-context-items}}> + {{||$:/plugins/bimlas/locator/templates/list-of-links-in-text}} + +
    + +
    + + + + +\end diff --git a/template/wiki/plugins/bimlas/locator/macros/css-classes.tid b/template/wiki/plugins/bimlas/locator/macros/css-classes.tid new file mode 100644 index 00000000..f4582b1d --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/macros/css-classes.tid @@ -0,0 +1,6 @@ +tags: +title: $:/plugins/bimlas/locator/macros/css-classes +type: text/vnd.tiddlywiki + +\define link-button-class(additionalClasses) tc-btn-invisible tc-tiddlylink bimlas-locator $additionalClasses$ +\define menu-list-item-class() tc-menu-list-item bimlas-locator \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/macros/filters.tid b/template/wiki/plugins/bimlas/locator/macros/filters.tid new file mode 100644 index 00000000..ecd14fd5 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/macros/filters.tid @@ -0,0 +1,18 @@ +tags: +title: $:/plugins/bimlas/locator/macros/filters +type: text/vnd.tiddlywiki + +\define filter-history() [<__baseTitle__>] [titleeach:list-item[history]] -[[]] +\define filter-selected-field-values() [title] [title] +[locator-selected-field-values] +\define filter-field-is-list() [addprefix[$:/config/bimlas/locator/fields/]field:field-type[list]] +\define filter-unfiltered-view-context-items() [subfilterlast[]locator-enlist-children:$(currentField)$!has[draft.of]] +\define filter-view-context() [subfilterlast[]locator-enlist-children:$(currentField)$!has[draft.of]locator-fields-filter!locator-fields-filter] +\define filter-search-context() [!is[system]locator-fields-filter:recursive[$(intersectionState)$]!locator-fields-filter:recursive[$(differenceState)$]] +\define filter-field-of-relationship() [titleget[field-of-relationship]] [] +[first[]] + + \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/macros/javascript-filters.js b/template/wiki/plugins/bimlas/locator/macros/javascript-filters.js new file mode 100644 index 00000000..47644519 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/macros/javascript-filters.js @@ -0,0 +1,325 @@ +/*\ +title: $:/plugins/bimlas/locator/macros/javascript-filters.js +type: application/javascript +module-type: filteroperator + +Special filters used by Locator + +\*/ +(function() { + + /*jslint node: true, browser: true */ + /*global $tw: true */ + "use strict"; + + function getFieldDefinition(options,field) { + var fieldOptionsTiddler = "$:/config/bimlas/locator/fields/" + field; + + return options.wiki.getCacheForTiddler(fieldOptionsTiddler,"fieldListingOperator",function() { + var fieldOptions = options.wiki.getTiddler(fieldOptionsTiddler) || {fields: {}}; + var filterOperators = options.wiki.getFilterOperators(); + var fieldDefinitions = { + "value": { + fieldType: "value", + direction: fieldOptions.fields["field-direction"], + enlistChildren: { + "to": function(title,input,prefix) { + return filterOperators["field"](input,{operand: title,prefix: prefix,suffix: field},options); + }, + "from": function(title,unusedInput,unusedPrefix) { + return (options.wiki.getTiddler(title) || {fields: {}}).fields[field] || [] + } + } + }, + "list": { + fieldType: "list", + direction: fieldOptions.fields["field-direction"], + enlistChildren: { + "to": function(title,input,prefix) { + return filterOperators["contains"](input,{operand: title,prefix: prefix,suffix: field},options); + }, + "from": function(title,unusedInput,unusedPrefix) { + return options.wiki.getTiddlerList(title,field) || []; + } + } + } + }; + var linksInTextDefinition = { + fieldType: "value", + direction: fieldOptions.fields["field-direction"], + enlistChildren: { + "to": function(title,unusedInput,unusedPrefix) { + return options.wiki.getTiddlerBacklinks(title); + }, + "from": function(title,unusedInput,unusedPrefix) { + return options.wiki.getTiddlerLinks(title); + } + } + }; + + return field === "LINKS-IN-TEXT" + ? linksInTextDefinition + : fieldDefinitions[fieldOptions.fields["field-type"] || "value"]; + }); + } + + function getActiveFilters(options,filterState) { + return options.wiki.getCacheForTiddler(filterState,"activeFilters",function() { + var filteredFields = options.wiki.getTiddlerDataCached(filterState,{}); + var results = {}; + + $tw.utils.each(filteredFields,function(valuesAsString,field) { + var values = $tw.utils.parseStringArray(valuesAsString) || []; + if(values.length) { + results[field] = values; + } + }); + + return results; + }); + } + + function applyFieldsFilters(source,options,filterState,filterFunc,prefix) { + var activeFilters = getActiveFilters(options,filterState); + var results = source; + + if(!Object.keys(activeFilters).length) return results; + + $tw.utils.each(activeFilters,function(values,field) { + $tw.utils.each(values,function(value) { + if(value === "ANY-VALUE") { + var filterOperators = options.wiki.getFilterOperators(); + results = filterOperators["has"](results,{operand: field,prefix: prefix},options); + } else { + results = filterFunc(results,field,value,prefix); + } + results = options.wiki.makeTiddlerIterator(results); + }); + }); + + return results; + } + + function getDirectionOfTraverse(options,contextState,fieldOfRelationship) { + var direction = getFieldDefinition(options,fieldOfRelationship).direction; + + if(isDirectionInverted(options,contextState)) { + direction = invertDirection(direction); + } + + return direction; + } + + function isDirectionInverted(options,contextState) { + var contextStateTiddler = options.wiki.getTiddler(contextState) || {fields: []}; + return contextStateTiddler.fields["invert-direction"] === "yes" + } + + function invertDirection(direction) { + return ["from","to"][(direction === "from") + 0]; + } + + function enlistChildren(options,parentTitle,fieldOfRelationship,directionOfTraverse) { + return options.wiki.getGlobalCache("bimlas-locator-enlist-children-" + parentTitle + "-" + fieldOfRelationship + "-" + directionOfTraverse, function() { + var fieldDefinition = getFieldDefinition(options, fieldOfRelationship); + var allTiddlers = options.wiki.makeTiddlerIterator(options.wiki.getTiddlers()); + return fieldDefinition.enlistChildren[directionOfTraverse](parentTitle,allTiddlers); + }); + } + + /* + Filter titles matching to Locator fields filter + + Input: list of tiddlers + Param: filterState + Prefix: "!" to exclude matching tiddlers + Suffix: "recusive" enables recursive filtering + */ + exports["locator-fields-filter"] = function(source,operator,options) { + var results = source; + var activeRecursiveFilters = getActiveFilters(options,"$:/state/bimlas/locator/search/recursive-filters/"); + + if(operator.suffix === "recursive") { + results = applyFieldsFilters(results,options,operator.operand,recursiveFilterFunc,operator.prefix); + } else { + results = applyFieldsFilters(results,options,operator.operand,directFilterFunc,operator.prefix); + } + + return results; + + function directFilterFunc(input,field,value,prefix) { + var fieldDefinition = getFieldDefinition(options,field); + return fieldDefinition.enlistChildren["to"](value,input,prefix); + } + + function recursiveFilterFunc(input,field,fieldValue,prefix) { + var isRecursiveFilteringActive = $tw.utils.hop(activeRecursiveFilters,field) && (activeRecursiveFilters[field].indexOf(fieldValue) >= 0); + if(!isRecursiveFilteringActive) { + return directFilterFunc(input,field,fieldValue,prefix); + } + + var fieldDirection = getFieldDefinition(options,field).direction; + var children = []; + collectChildrenRecursively(fieldValue); + var compareFunc = (prefix !== "!") + ? function(index) { return index >= 0 } + : function(index) { return index < 0 }; + var results = []; + + input(function(tiddler,title) { + if(compareFunc(children.indexOf(title))) { + results = $tw.utils.pushTop(results, title); + } + }); + + return results; + + function collectChildrenRecursively(parent) { + $tw.utils.each(enlistChildren(options,parent,field,fieldDirection),function(child) { + if(children.indexOf(child) < 0) { + $tw.utils.pushTop(children, child); + $tw.utils.pushTop(children, collectChildrenRecursively(child)); + } + }); + } + } + }; + + /* + Filter fields that are not disabled in Locator field options + + Input: list of fields + Param (optional): if called from toggleable fields filter (`locator-view` and `locator-search`), set to "nested" + */ + exports["locator-enabled-fields"] = function(source,operator,options) { + var typeOfFieldsFilter = operator.operand || "regular"; + var excludedFields = options.wiki.filterTiddlers("[all[tiddlers+shadows]field:hide-in-" + typeOfFieldsFilter + "-fields-filter[yes]removeprefix[$:/config/bimlas/locator/fields/]]") || []; + var results = []; + + source(function(tiddler,title) { + if(excludedFields.indexOf(title) < 0) { + results.push(title); + } + }); + + return results; + }; + + /* + List fields which can be used to build tree ("tags" for example) + + Input: none + Param (optional): field to check if it's a relationship field + */ + exports["locator-enlist-relationship-fields"] = function(source,operator,options) { + var relationshipFields = options.wiki.getGlobalCache("bimlas-locator-enlist-relationship-fields",function() { + return options.wiki.filterTiddlers("[all[tiddlers+shadows]prefix[$:/config/bimlas/locator/fields/]has[field-direction]removeprefix[$:/config/bimlas/locator/fields/]]"); + }); + + if(operator.operand) { + return relationshipFields.indexOf(operator.operand) >= 0 + ? [operator.operand] + : []; + } + + return relationshipFields; + }; + + /* + List field values according to Locator field settings + + Input: list of tiddlers + Param: field + */ + exports["locator-enlist-field-values"] = function(source,operator,options) { + var fieldDefinition = getFieldDefinition(options,operator.operand); + var results = []; + + source(function(tiddler,title) { + if(!tiddler) return; + + var value = fieldDefinition.enlistChildren["from"](title); + + if(!value) return; + + results = $tw.utils.pushTop(results,value); + }); + + return results; + }; + + /* + List of active field filters + + Input: filterState + Param (optional): field + */ + exports["locator-selected-field-values"] = function(source,operator,options) { + var activeFilters = {}; + + source(function(tiddler,title) { + $tw.utils.each(getActiveFilters(options,title),function(value,key) { + activeFilters[key] = $tw.utils.pushTop(activeFilters[key] || [],value); + }); + }); + + if(!Object.keys(activeFilters).length) return []; + + return operator.operand + ? activeFilters[operator.operand] || [] + : ["TODO: Join active filter values (array of arrays)"]; + }; + + /* + List of active field names + + Input: filterState + Param (optional): none + */ + exports["locator-selected-field-names"] = function(source,operator,options) { + var fieldNames = []; + + source(function(tiddler,title) { + fieldNames = $tw.utils.pushTop(fieldNames,Object.keys(getActiveFilters(options,title))); + }); + + return fieldNames; + }; + + /* + List children of input elements based on selected relationship field + + Input: parent tiddlers + Param (optional): contextState + Suffix: field of relationship + */ + exports["locator-enlist-children"] = function(source,operator,options) { + var fieldOfRelationship = operator.suffix; + var directionOfTraverse = getDirectionOfTraverse(options,operator.operand,fieldOfRelationship); + var results = []; + + source(function(tiddler,title) { + results = $tw.utils.pushTop(results, enlistChildren(options,title,fieldOfRelationship,directionOfTraverse)); + results = options.wiki.sortByList(results,title); + }); + + return results; + }; + + /* + Get direction of traverse: field direction + optional invert direction + + Input: contextState + Param: field of relationship + */ + exports["locator-direction-of-traverse"] = function(source,operator,options) { + var results = []; + + source(function(tiddler,title) { + results = [getDirectionOfTraverse(options,title,operator.operand)]; + }); + + return results; + }; + +})(); diff --git a/template/wiki/plugins/bimlas/locator/macros/template-macros.tid b/template/wiki/plugins/bimlas/locator/macros/template-macros.tid new file mode 100644 index 00000000..0cb88582 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/macros/template-macros.tid @@ -0,0 +1,11 @@ +tags: +title: $:/plugins/bimlas/locator/macros/template-macros +type: text/vnd.tiddlywiki + +\define droppable-menu-list-item(content actions) + <$droppable actions=<<__actions__>>> +
    + <<__content__>> +
    + +\end \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/plugin.info b/template/wiki/plugins/bimlas/locator/plugin.info new file mode 100644 index 00000000..ad34674f --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/plugin.info @@ -0,0 +1,10 @@ +{ + "title": "$:/plugins/bimlas/locator", + "description": "Locator: Discover and search by context", + "author": "bimlas", + "version": "2.0.0", + "core-version": ">=5.1.18", + "source": "https://gitlab.com/bimlas/tw5-locator", + "plugin-type": "plugin", + "list": "README/README README/macros README/TIPS README/CHANGELOG" +} diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/LINKS-IN-TEXT.tid b/template/wiki/plugins/bimlas/locator/settings/fields/LINKS-IN-TEXT.tid new file mode 100644 index 00000000..04163b5e --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/LINKS-IN-TEXT.tid @@ -0,0 +1,6 @@ +tags: +title: $:/config/bimlas/locator/fields/LINKS-IN-TEXT +type: text/vnd.tiddlywiki +field-direction: from + +$:/plugins/bimlas/locator/field-templates/link \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/bag.tid b/template/wiki/plugins/bimlas/locator/settings/fields/bag.tid new file mode 100644 index 00000000..f3341862 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/bag.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/bag +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/caption.tid b/template/wiki/plugins/bimlas/locator/settings/fields/caption.tid new file mode 100644 index 00000000..554fea32 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/caption.tid @@ -0,0 +1,4 @@ +tags: +title: $:/config/bimlas/locator/fields/caption +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/color.tid b/template/wiki/plugins/bimlas/locator/settings/fields/color.tid new file mode 100644 index 00000000..1089b9e9 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/color.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/color +type: text/vnd.tiddlywiki + +$:/plugins/bimlas/locator/field-templates/color \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/created.tid b/template/wiki/plugins/bimlas/locator/settings/fields/created.tid new file mode 100644 index 00000000..eb27024f --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/created.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/created +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/draft.of.tid b/template/wiki/plugins/bimlas/locator/settings/fields/draft.of.tid new file mode 100644 index 00000000..de0c0613 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/draft.of.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/draft.of +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/draft.title.tid b/template/wiki/plugins/bimlas/locator/settings/fields/draft.title.tid new file mode 100644 index 00000000..db6e1e4a --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/draft.title.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/draft.title +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/icon.tid b/template/wiki/plugins/bimlas/locator/settings/fields/icon.tid new file mode 100644 index 00000000..4efdd52c --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/icon.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/icon +type: text/vnd.tiddlywiki + +$:/plugins/bimlas/locator/field-templates/icon \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/list-after.tid b/template/wiki/plugins/bimlas/locator/settings/fields/list-after.tid new file mode 100644 index 00000000..307616d3 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/list-after.tid @@ -0,0 +1,7 @@ +tags: +title: $:/config/bimlas/locator/fields/list-after +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes + +$:/plugins/bimlas/locator/field-templates/link \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/list-before.tid b/template/wiki/plugins/bimlas/locator/settings/fields/list-before.tid new file mode 100644 index 00000000..3c2e9ff1 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/list-before.tid @@ -0,0 +1,7 @@ +tags: +title: $:/config/bimlas/locator/fields/list-before +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes + +$:/plugins/bimlas/locator/field-templates/link \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/list.tid b/template/wiki/plugins/bimlas/locator/settings/fields/list.tid new file mode 100644 index 00000000..588d0a1c --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/list.tid @@ -0,0 +1,8 @@ +tags: +title: $:/config/bimlas/locator/fields/list +type: text/vnd.tiddlywiki +field-type: list +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes + +$:/plugins/bimlas/locator/field-templates/link \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/modified.tid b/template/wiki/plugins/bimlas/locator/settings/fields/modified.tid new file mode 100644 index 00000000..11ca4802 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/modified.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/modified +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/revision.tid b/template/wiki/plugins/bimlas/locator/settings/fields/revision.tid new file mode 100644 index 00000000..7c74fe55 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/revision.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/revision +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/tags.tid b/template/wiki/plugins/bimlas/locator/settings/fields/tags.tid new file mode 100644 index 00000000..88ac6e97 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/tags.tid @@ -0,0 +1,7 @@ +tags: +title: $:/config/bimlas/locator/fields/tags +type: text/vnd.tiddlywiki +field-type: list +field-direction: to + +$:/plugins/bimlas/locator/field-templates/tag \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/text.tid b/template/wiki/plugins/bimlas/locator/settings/fields/text.tid new file mode 100644 index 00000000..7fbce9fb --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/text.tid @@ -0,0 +1,5 @@ +tags: +title: $:/config/bimlas/locator/fields/text +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/title.tid b/template/wiki/plugins/bimlas/locator/settings/fields/title.tid new file mode 100644 index 00000000..c845d596 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/title.tid @@ -0,0 +1,7 @@ +tags: +title: $:/config/bimlas/locator/fields/title +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes +hide-in-regular-fields-filter: yes + +$:/plugins/bimlas/locator/field-templates/link \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/fields/type.tid b/template/wiki/plugins/bimlas/locator/settings/fields/type.tid new file mode 100644 index 00000000..360d314f --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/fields/type.tid @@ -0,0 +1,4 @@ +tags: +title: $:/config/bimlas/locator/fields/type +type: text/vnd.tiddlywiki +hide-in-nested-fields-filter: yes \ No newline at end of file diff --git a/template/wiki/plugins/bimlas/locator/settings/settings.tid b/template/wiki/plugins/bimlas/locator/settings/settings.tid new file mode 100644 index 00000000..d48b24d9 --- /dev/null +++ b/template/wiki/plugins/bimlas/locator/settings/settings.tid @@ -0,0 +1,143 @@ +tags: +title: $:/plugins/bimlas/locator/settings/settings +type: text/vnd.tiddlywiki + +\define show-in-fields() + <$select field="hide-in-nested-fields-filter" default=""> + + + in nested filter (`locator-view`, `locator-search`)
    + <$select field="hide-in-regular-fields-filter" default=""> + + + in regular filter (`locator-fields` and tiddler info) +\end + +\define field-type() + <$select field="field-type" default=""> + + + +\end + +\define field-direction() + <$select field="field-direction" default=""> + + + + + +\end + +\define template() + <$select field="text" default="$:/plugins/bimlas/locator/field-templates/text"> + <$list filter="[all[tiddlers+shadows]tag[$:/tags/bimlas/locator/field-templates]]"> + + + + <$transclude/> +\end + +\define settings(field) + <$importvariables filter="[all[tiddlers+shadows]prefix[$:/plugins/bimlas/locator/macros/]]"> + +

    <$link to="$:/config/bimlas/locator/fields/$field$"><$text text=<<__field__>>/>

    + +
    + + + + + + + + + + + + + + + + + + + + +
    Description//{{$:/language/Docs/Fields/$field$}}//
    Show in fields filter + <> +
    Field type + <> +

    //Does the field contain a single value (for example `Franz Kafka`) or a list of values (`[[Franz Kafka]] [[Dostojevskij]]`)?//

    +
    Does the field represent a tree? + <> +

    //If the field contains the title(s) of other tiddler(s) (like "tags"), set it to "Yes".//

    +
    Template + <