tw5-graph 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/package.json +39 -0
- package/plugins/graph/DefaultColourMappings.multids +8 -0
- package/plugins/graph/ViewTemplateBodyFilter/graph.tid +5 -0
- package/plugins/graph/ViewTemplateBodyFilter/properties.tid +5 -0
- package/plugins/graph/edges/fields/list.tid +7 -0
- package/plugins/graph/edges/fields/tags.tid +7 -0
- package/plugins/graph/edges/functions/links.tid +8 -0
- package/plugins/graph/edges/functions/transcludes.tid +8 -0
- package/plugins/graph/fieldtypes/filter.js +212 -0
- package/plugins/graph/fieldtypes/list.js +31 -0
- package/plugins/graph/fieldtypes/title.js +27 -0
- package/plugins/graph/filterrunprefixes/cache.js +118 -0
- package/plugins/graph/filters/gettyped.js +26 -0
- package/plugins/graph/graphengine.js +38 -0
- package/plugins/graph/icon.tid +16 -0
- package/plugins/graph/images/drag.tid +13 -0
- package/plugins/graph/macros/action.addedge.tid +16 -0
- package/plugins/graph/macros/edges.typed.tid +54 -0
- package/plugins/graph/macros/graph.view.tid +24 -0
- package/plugins/graph/macros/node.default.tid +9 -0
- package/plugins/graph/macros/nodes.neighbors.tid +62 -0
- package/plugins/graph/macros/nodes.writable.tid +37 -0
- package/plugins/graph/macros/properties.persistent.tid +27 -0
- package/plugins/graph/macros/properties.popup.tid +76 -0
- package/plugins/graph/macros/properties.river.tid +27 -0
- package/plugins/graph/macros/properties.settings.tid +54 -0
- package/plugins/graph/macros/properties.stack.tid +17 -0
- package/plugins/graph/macros/tiddlywiki.files +17 -0
- package/plugins/graph/nodes/neighbors/1.tid +8 -0
- package/plugins/graph/plugin.info +14 -0
- package/plugins/graph/presettypes/edges/fields.tid +18 -0
- package/plugins/graph/presettypes/edges/functions.tid +5 -0
- package/plugins/graph/presettypes/nodes/neighbors.tid +4 -0
- package/plugins/graph/presettypes/nodes/stack.tid +6 -0
- package/plugins/graph/propertytypes/actions.js +15 -0
- package/plugins/graph/propertytypes/boolean.js +23 -0
- package/plugins/graph/propertytypes/color.js +61 -0
- package/plugins/graph/propertytypes/enum.js +25 -0
- package/plugins/graph/propertytypes/filter.js +44 -0
- package/plugins/graph/propertytypes/image.js +185 -0
- package/plugins/graph/propertytypes/number.js +24 -0
- package/plugins/graph/propertytypes/string.js +13 -0
- package/plugins/graph/propertytypes/tiddlywiki.files +17 -0
- package/plugins/graph/readme.tid +5 -0
- package/plugins/graph/relink/attributes.js +52 -0
- package/plugins/graph/relink/attributes.multids +19 -0
- package/plugins/graph/relink/configprefix.js +76 -0
- package/plugins/graph/relink/fieldedgeprefix.js +39 -0
- package/plugins/graph/relink/fields.multids +11 -0
- package/plugins/graph/relink/graphprefix.js +28 -0
- package/plugins/graph/relink/operators.multids +3 -0
- package/plugins/graph/relink/propertyfields.js +81 -0
- package/plugins/graph/relink/utils.js +99 -0
- package/plugins/graph/settings.tid +13 -0
- package/plugins/graph/startup/messages.js +46 -0
- package/plugins/graph/stylesheets/base.css.tid +272 -0
- package/plugins/graph/stylesheets/fullscreen/core.css +11 -0
- package/plugins/graph/stylesheets/fullscreen/core.css.meta +3 -0
- package/plugins/graph/stylesheets/fullscreen.css.tid +48 -0
- package/plugins/graph/stylesheets/popup.css.tid +107 -0
- package/plugins/graph/subfilters.tid +23 -0
- package/plugins/graph/tags/GraphToolbar.tid +2 -0
- package/plugins/graph/tags/SettingsTab.tid +2 -0
- package/plugins/graph/tags/Template.tid +2 -0
- package/plugins/graph/tags/ViewEditTemplate.tid +2 -0
- package/plugins/graph/templates/live-graph.tid +34 -0
- package/plugins/graph/templates/standard-graph.tid +40 -0
- package/plugins/graph/ui/Buttons/center.tid +38 -0
- package/plugins/graph/ui/Buttons/export.tid +65 -0
- package/plugins/graph/ui/Buttons/fullscreen.tid +35 -0
- package/plugins/graph/ui/Buttons/settings.tid +28 -0
- package/plugins/graph/ui/Buttons/tiddlywiki.files +16 -0
- package/plugins/graph/ui/EditTemplate/Edges.tid +22 -0
- package/plugins/graph/ui/EditTemplate/Neighbors.tid +35 -0
- package/plugins/graph/ui/EditTemplate/Nodes.tid +12 -0
- package/plugins/graph/ui/EditTemplate/Popups.tid +27 -0
- package/plugins/graph/ui/EditTemplate/Properties.tid +21 -0
- package/plugins/graph/ui/EditTemplate/tiddlywiki.files +16 -0
- package/plugins/graph/ui/Modals/NewPropertySet.tid +20 -0
- package/plugins/graph/ui/Modals/NewView.tid +20 -0
- package/plugins/graph/ui/Modals/Select.tid +72 -0
- package/plugins/graph/ui/Modals/SelectField.tid +21 -0
- package/plugins/graph/ui/Modals/SelectTiddler.tid +15 -0
- package/plugins/graph/ui/Modals/Tiddler.tid +22 -0
- package/plugins/graph/ui/Modals/TiddlerHeader.tid +15 -0
- package/plugins/graph/ui/PropertyTypes/boolean.tid +11 -0
- package/plugins/graph/ui/PropertyTypes/color.tid +16 -0
- package/plugins/graph/ui/PropertyTypes/enum.tid +15 -0
- package/plugins/graph/ui/PropertyTypes/number.tid +17 -0
- package/plugins/graph/ui/Settings/Engine.tid +23 -0
- package/plugins/graph/ui/Settings/Graphs/EditTemplate.tid +52 -0
- package/plugins/graph/ui/Settings/Graphs.tid +49 -0
- package/plugins/graph/ui/Settings/Properties/ObjectsTypeTemplate.tid +46 -0
- package/plugins/graph/ui/Settings/Properties.tid +14 -0
- package/plugins/graph/ui/Settings/Toolbar.tid +5 -0
- package/plugins/graph/ui/SideBar/Graph.tid +77 -0
- package/plugins/graph/ui/Toolbars/GraphToolbar.tid +15 -0
- package/plugins/graph/ui/ViewTemplate/graph-object.tid +13 -0
- package/plugins/graph/ui/ViewTemplate/graph.tid +11 -0
- package/plugins/graph/ui/ViewTemplate/properties.tid +80 -0
- package/plugins/graph/ui/grouped-tabs.tid +109 -0
- package/plugins/graph/ui/selector.tid +74 -0
- package/plugins/graph/utils/propertyholder.js +80 -0
- package/plugins/graph/utils/widgetiterator.js +47 -0
- package/plugins/graph/utils.js +95 -0
- package/plugins/graph/widgets/action-delay.js +72 -0
- package/plugins/graph/widgets/action-modal.js +121 -0
- package/plugins/graph/widgets/action-typed.js +56 -0
- package/plugins/graph/widgets/action-with.js +70 -0
- package/plugins/graph/widgets/boundingbox.js +126 -0
- package/plugins/graph/widgets/fieldtranscriber/filter.js +93 -0
- package/plugins/graph/widgets/fieldtranscriber/json.js +34 -0
- package/plugins/graph/widgets/fieldtranscriber/plain.js +11 -0
- package/plugins/graph/widgets/fieldtranscriber.js +98 -0
- package/plugins/graph/widgets/graphobject.js +154 -0
- package/plugins/graph/widgets/messagerelay.js +115 -0
- package/plugins/graph/widgets/properties.js +130 -0
- package/plugins/graph/widgets/subclass/edge.js +55 -0
- package/plugins/graph/widgets/subclass/edit-color.js +52 -0
- package/plugins/graph/widgets/subclass/graph.js +380 -0
- package/plugins/graph/widgets/subclass/node.js +56 -0
- package/plugins/graph/widgets/tiddlywiki.files +43 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
description: Export graph
|
|
2
|
+
caption: {{$:/core/images/export-button}} export graph
|
|
3
|
+
|
|
4
|
+
\whitespace trim
|
|
5
|
+
|
|
6
|
+
<%if [subfilter{$:/plugins/flibbles/graph/subfilters##messages}jsonindexes[]prefix[graph-export-]] %>
|
|
7
|
+
<$vars state=<<qualify "$:/state/flibbles/graph/popup/export">>
|
|
8
|
+
imageStore="$:/temp/flibbles/graph/export">
|
|
9
|
+
<$button
|
|
10
|
+
popup=<<state>>
|
|
11
|
+
tooltip="Export graph as image"
|
|
12
|
+
class=graph-export-button>
|
|
13
|
+
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
|
14
|
+
{{$:/core/images/export-button}}
|
|
15
|
+
<%endif%>
|
|
16
|
+
<%if [<tv-config-toolbar-text>match[yes]] %>
|
|
17
|
+
<span class="tc-btn-text">
|
|
18
|
+
<$text text="export graph" />
|
|
19
|
+
</span>
|
|
20
|
+
<%endif%>
|
|
21
|
+
</$button>
|
|
22
|
+
<$reveal state=<<state>> type="popup" position="below" animate="yes">
|
|
23
|
+
<div class="tc-drop-down graph-export-button-dropdown">
|
|
24
|
+
<$list variable=type filter="[subfilter{$:/plugins/flibbles/graph/subfilters##messages}jsonindexes[]removeprefix[graph-export-]]">
|
|
25
|
+
<$button class=`tc-btn-invisible graph-export-type-$(type)$`>
|
|
26
|
+
<$action-sendmessage $message=`graph-export-$(type)$`
|
|
27
|
+
targetTiddler=<<imageStore>> />
|
|
28
|
+
<!-- We wrap our downloading inside action-createtiddler, because
|
|
29
|
+
create-tiddler delays refreshing its contents until its
|
|
30
|
+
invoked, which we need, since that `<%if` block depends on
|
|
31
|
+
content made by prior actions. -->
|
|
32
|
+
<$action-createtiddler $basetitle=<<state>> $overwrite=yes>
|
|
33
|
+
<%if [<imageStore>is[image]!type[image/svg+xml]] %>
|
|
34
|
+
<!-- Don't use tm-download-raw yourself.
|
|
35
|
+
It's a hack. A workaround. A solution for chumps.
|
|
36
|
+
I'm scrapping it as soon as TW supports image downloads -->
|
|
37
|
+
<$action-sendmessage $message="tm-download-raw"
|
|
38
|
+
$param=<<imageStore>>
|
|
39
|
+
filename={{{[{!!title}removeprefix[$:/graph/]] ~[{!!title}]}}}
|
|
40
|
+
type={{{ [<imageStore>get[type]addsuffix[;base64]] }}} />
|
|
41
|
+
<%else%>
|
|
42
|
+
<$action-sendmessage $message="tm-download-file"
|
|
43
|
+
$param="$:/core/templates/plain-text-tiddler"
|
|
44
|
+
currentTiddler=<<imageStore>>
|
|
45
|
+
filename={{{[{!!title}removeprefix[$:/graph/]] ~[{!!title}]}}}
|
|
46
|
+
type={{{ [<imageStore>get[type]] }}} />
|
|
47
|
+
<%endif%>
|
|
48
|
+
</$action-createtiddler>
|
|
49
|
+
<$action-deletetiddler $tiddler=<<imageStore>> />
|
|
50
|
+
<$action-deletetiddler $tiddler=<<state>> />
|
|
51
|
+
<$transclude $field="description" $tiddler=`$:/language/Docs/Types/image/$(type)$`>
|
|
52
|
+
<$fill $name="ts-missing">
|
|
53
|
+
<$transclude $field="description" $tiddler={{{ [[$:/tags/Exporter]tagging[]] :filter[{!!title}get[extension]removeprefix[.]match<type>] }}} >
|
|
54
|
+
<$fill $name="ts-missing">
|
|
55
|
+
<$text text=<<type>> />
|
|
56
|
+
</$fill>
|
|
57
|
+
</$transclude>
|
|
58
|
+
</$fill>
|
|
59
|
+
</$transclude>
|
|
60
|
+
</$button>
|
|
61
|
+
</$list>
|
|
62
|
+
</div>
|
|
63
|
+
</$reveal>
|
|
64
|
+
</$vars>
|
|
65
|
+
<%endif%>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
description: Toggle graph fullscreen mode
|
|
2
|
+
caption: {{$:/core/images/full-screen-button}} fullscreen
|
|
3
|
+
|
|
4
|
+
\procedure fs-actions()
|
|
5
|
+
\whitespace trim
|
|
6
|
+
<% if [<fs-state>is[tiddler]] %>
|
|
7
|
+
<$action-deletetiddler $tiddler=<<fs-state>> />
|
|
8
|
+
<% else %>
|
|
9
|
+
<$action-setfield $tiddler=<<fs-state>> text=graph-fullscreen />
|
|
10
|
+
<% endif %>
|
|
11
|
+
\end
|
|
12
|
+
\procedure fs-refocus()
|
|
13
|
+
\whitespace trim
|
|
14
|
+
<!--Refocus on the fullscreen button so that hitting escape will still disable fullscreen mode -->
|
|
15
|
+
<$action-delay>
|
|
16
|
+
<!--The delay is necessary, because you can't focus on an element that's currently hidden, and the graph may be hidden when this is called. -->
|
|
17
|
+
<$action-sendmessage $message="tm-focus-selector" $param=".graph-fullscreen-button"/>
|
|
18
|
+
\end
|
|
19
|
+
|
|
20
|
+
\parameters (class:graph-fullscreen-button)
|
|
21
|
+
\whitespace trim
|
|
22
|
+
|
|
23
|
+
<$button
|
|
24
|
+
tooltip="Toggle graph fullscreen mode"
|
|
25
|
+
class={{{ [<class>] +[join[ ]] }}}
|
|
26
|
+
actions="<<fs-actions>><<fs-refocus>>" >
|
|
27
|
+
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
|
28
|
+
{{$:/core/images/full-screen-button}}
|
|
29
|
+
<%endif%>
|
|
30
|
+
<%if [<tv-config-toolbar-text>match[yes]] %>
|
|
31
|
+
<span class="tc-btn-text">
|
|
32
|
+
<$text text="fullscreen" />
|
|
33
|
+
</span>
|
|
34
|
+
<%endif%>
|
|
35
|
+
</$button>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
description: Open graph settings
|
|
2
|
+
caption: {{$:/core/images/options-button}} settings
|
|
3
|
+
|
|
4
|
+
\procedure settingsActions()
|
|
5
|
+
\whitespace trim
|
|
6
|
+
<$action-navigate $to="$:/plugins/flibbles/graph/settings"/>
|
|
7
|
+
<$action-setfield
|
|
8
|
+
$tiddler="$:/state/flibbles/graph/settings"
|
|
9
|
+
text="$:/plugins/flibbles/graph/ui/Settings/Graphs" />
|
|
10
|
+
<$action-setfield
|
|
11
|
+
$tiddler="$:/state/flibbles/graph/settings/graphs"
|
|
12
|
+
text=<<currentTiddler>> />
|
|
13
|
+
\end
|
|
14
|
+
|
|
15
|
+
\whitespace trim
|
|
16
|
+
<$button
|
|
17
|
+
tooltip="Open graph settings"
|
|
18
|
+
class="graph-settings-button"
|
|
19
|
+
actions=<<settingsActions>> >
|
|
20
|
+
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
|
21
|
+
{{$:/core/images/options-button}}
|
|
22
|
+
<%endif%>
|
|
23
|
+
<%if [<tv-config-toolbar-text>match[yes]] %>
|
|
24
|
+
<span class="tc-btn-text">
|
|
25
|
+
<$text text="settings" />
|
|
26
|
+
</span>
|
|
27
|
+
<%endif%>
|
|
28
|
+
</$button>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"directories": [
|
|
3
|
+
{
|
|
4
|
+
"path": ".",
|
|
5
|
+
"filesRegExp": "^.*\\.tid$",
|
|
6
|
+
"isTiddlerFile": true,
|
|
7
|
+
"fields": {
|
|
8
|
+
"title": {
|
|
9
|
+
"source": "basename",
|
|
10
|
+
"prefix": "$:/plugins/flibbles/graph/ui/Buttons/"
|
|
11
|
+
},
|
|
12
|
+
"tags": "$:/tags/flibbles/graph/GraphToolbar"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
caption: Edge Types
|
|
2
|
+
|
|
3
|
+
\procedure edgelist(category, default, customAllowed)
|
|
4
|
+
\whitespace trim
|
|
5
|
+
<$vars fieldName=`edges.$(category)$` subfilterName=`edgetypes.$(category)$`>
|
|
6
|
+
<$edit-text field=<<fieldName>> placeholder=<<default>> />
|
|
7
|
+
<br>
|
|
8
|
+
<span class="graph-tiddlers-edgelist">
|
|
9
|
+
<$vars masterFilter="[[$:/plugins/flibbles/graph/subfilters]getindex<subfilterName>] :map:flat[subfilter{!!title}sort[]]"
|
|
10
|
+
customFilter={{{ [{!!title}get<fieldName>!is[blank]else<default>]}}}>
|
|
11
|
+
<$list filter="[<customAllowed>match[yes]] :map:flat[subfilter<masterFilter>subfilter<customFilter>] [subfilter<masterFilter>]" join=", ">
|
|
12
|
+
<span class={{{ [subfilter<masterFilter>subfilter<customFilter>match{!!title}] :then[[active]] ~inactive }}}>
|
|
13
|
+
<$text text={{!!title}} />
|
|
14
|
+
\end
|
|
15
|
+
|
|
16
|
+
\whitespace trim
|
|
17
|
+
|
|
18
|
+
Decide which of the preconfigured edge types will connect your nodes
|
|
19
|
+
|
|
20
|
+
|tc-max-width tc-edit-max-width tc-table-no-border |k
|
|
21
|
+
|Fields |<<edgelist fields "[all[]]" yes>> |
|
|
22
|
+
|Functions |<<edgelist functions "[all[]]" no>> |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
caption: Neighbors
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
You can display all the neighbor nodes associated with the nodes in your graph.
|
|
6
|
+
|
|
7
|
+
<!-- This uses 1 and 0 as values instead of yes and no, because someday, I
|
|
8
|
+
may allow for deeper depth of neighbors. Those would use 2+ -->
|
|
9
|
+
|
|
10
|
+
<!-- It sets two fields, `neighbors.incoming` and `neighbors.outgoing` for
|
|
11
|
+
the same reason. Some day, we may configure those separately, and if so,
|
|
12
|
+
this will be better for backward compatibility. -->
|
|
13
|
+
|
|
14
|
+
<$checkbox field="neighbors.incoming"
|
|
15
|
+
checked=1
|
|
16
|
+
unchecked=0
|
|
17
|
+
default=0
|
|
18
|
+
checkactions="""<$action-setfield $field="neighbors.outgoing" $value=1 />"""
|
|
19
|
+
uncheckactions="""<$action-setfield $field="neighbors.outgoing" />"""
|
|
20
|
+
>
|
|
21
|
+
 Enable neighbors
|
|
22
|
+
</$checkbox>
|
|
23
|
+
|
|
24
|
+
<$reveal type="match"
|
|
25
|
+
text="1"
|
|
26
|
+
stateTitle={{!!title}}
|
|
27
|
+
stateField="neighbors.incoming"
|
|
28
|
+
retain="yes"
|
|
29
|
+
animate="yes">
|
|
30
|
+
|
|
31
|
+
|tc-table-no-border |k
|
|
32
|
+
|Allowed neighbors |<$edit-text field="neighbors.whitelist" placeholder="[!is[system]]" /> |
|
|
33
|
+
|Edges between neighbors |<$checkbox field="neighbors.interedges" checked=yes unchecked=no default=no /> |
|
|
34
|
+
|
|
35
|
+
</$reveal>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
caption: Nodes filter
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
Configure a filter describing what nodes this graph shows
|
|
6
|
+
|
|
7
|
+
<$fieldtranscriber type="application/x-tiddler-filter" field=filter>
|
|
8
|
+
|
|
9
|
+
|tc-table-no-border |k
|
|
10
|
+
|Nodes |<$edit-text tiddler=<<state>> /> |
|
|
11
|
+
|
|
12
|
+
</$fieldtranscriber>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
caption: Popups
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
You can enable popups when hovering over a node.
|
|
6
|
+
|
|
7
|
+
<$checkbox field="popup"
|
|
8
|
+
checked=yes
|
|
9
|
+
unchecked=no
|
|
10
|
+
default=no>
|
|
11
|
+
 Enable node popups
|
|
12
|
+
</$checkbox>
|
|
13
|
+
|
|
14
|
+
<$reveal type="match"
|
|
15
|
+
text="yes"
|
|
16
|
+
stateTitle={{!!title}}
|
|
17
|
+
stateField="popup"
|
|
18
|
+
retain="yes"
|
|
19
|
+
animate="yes">
|
|
20
|
+
|
|
21
|
+
|tc-table-no-border |k
|
|
22
|
+
|Popup template |<$edit-text field="popup.template" placeholder="{{!!text}}" inputActions="<%if [<actionValue>match[]] %><$action-setfield $field='popup.template' />" /> |
|
|
23
|
+
|Popup delay (ms) |<$edit-text field="popup.ms" placeholder="600" type="number" /> |
|
|
24
|
+
|Popup maximum width |<$edit-text field="popup.width" placeholder="300px"/> |
|
|
25
|
+
|Popup maximum height |<$edit-text field="popup.height" placeholder="200px" /> |
|
|
26
|
+
|
|
27
|
+
</$reveal>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
caption: Graph Engine Defaults
|
|
2
|
+
list-after:
|
|
3
|
+
|
|
4
|
+
\whitespace trim
|
|
5
|
+
|
|
6
|
+
<$transclude $tiddler="$:/plugins/flibbles/graph/ui/grouped-tabs"
|
|
7
|
+
tabsList="graph nodes edges"
|
|
8
|
+
default=graph
|
|
9
|
+
class=""
|
|
10
|
+
state= "$:/state/flibbles/graph/editTemplate/properties">
|
|
11
|
+
|
|
12
|
+
<$fill $name=body>
|
|
13
|
+
|
|
14
|
+
<$fieldtranscriber
|
|
15
|
+
type="application/json"
|
|
16
|
+
field=`graph.$(currentTab)$`>
|
|
17
|
+
|
|
18
|
+
<$vars currentTiddler=<<state>>>
|
|
19
|
+
|
|
20
|
+
<$transclude $tiddler="$:/plugins/flibbles/graph/ui/ViewTemplate/properties"
|
|
21
|
+
type=<<currentTab>> />
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"directories": [
|
|
3
|
+
{
|
|
4
|
+
"path": ".",
|
|
5
|
+
"filesRegExp": "^.*\\.tid$",
|
|
6
|
+
"isTiddlerFile": true,
|
|
7
|
+
"fields": {
|
|
8
|
+
"title": {
|
|
9
|
+
"source": "basename",
|
|
10
|
+
"prefix": "$:/plugins/flibbles/graph/ui/EditTemplate/"
|
|
11
|
+
},
|
|
12
|
+
"tags": "$:/tags/flibbles/graph/EditTemplate"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Modals/NewPropertySet
|
|
2
|
+
subtitle: New Property Set
|
|
3
|
+
footer: {{$:/plugins/flibbles/graph/ui/Modals/Select!!footer}}
|
|
4
|
+
mask-closable: yes
|
|
5
|
+
|
|
6
|
+
<p class="tc-edit-field-add">
|
|
7
|
+
|
|
8
|
+
<em class="tc-edit tc-small-gap-right">
|
|
9
|
+
|
|
10
|
+
<$text text="Type in the name for a new set."/>
|
|
11
|
+
|
|
12
|
+
</em></p>
|
|
13
|
+
|
|
14
|
+
<$transclude $tiddler="$:/plugins/flibbles/graph/ui/Modals/Select">
|
|
15
|
+
|
|
16
|
+
<$fill $name=list-item>
|
|
17
|
+
|
|
18
|
+
<div class="tc-menu-list-item">
|
|
19
|
+
|
|
20
|
+
<$link overrideClass="tc-tiddlylink" />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Modals/NewGraph
|
|
2
|
+
subtitle: New Graph
|
|
3
|
+
footer: {{$:/plugins/flibbles/graph/ui/Modals/Select!!footer}}
|
|
4
|
+
mask-closable: yes
|
|
5
|
+
|
|
6
|
+
<p class="tc-edit-field-add">
|
|
7
|
+
|
|
8
|
+
<em class="tc-edit tc-small-gap-right">
|
|
9
|
+
|
|
10
|
+
<$text text="Type in the name for a new graph."/>
|
|
11
|
+
|
|
12
|
+
</em></p>
|
|
13
|
+
|
|
14
|
+
<$transclude $tiddler="$:/plugins/flibbles/graph/ui/Modals/Select">
|
|
15
|
+
|
|
16
|
+
<$fill $name=list-item>
|
|
17
|
+
|
|
18
|
+
<div class="tc-menu-list-item">
|
|
19
|
+
|
|
20
|
+
<$link overrideClass="tc-tiddlylink" />
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Modals/Select
|
|
2
|
+
footer: <$importvariables filter="[all[current]]"><$button actions=<<select-accept-actions>> >Okay</$button> <$button actions=<<select-close-actions>>>Close</$button>
|
|
3
|
+
|
|
4
|
+
\procedure select-accept-actions()
|
|
5
|
+
\whitespace trim
|
|
6
|
+
<$action-sendmessage $message="tm-modal-finish" $param={{$:/temp/graph/select/tiddler}} />
|
|
7
|
+
<$action-sendmessage $message="tm-close-tiddler" />
|
|
8
|
+
<$action-deletetiddler $filter="[[$:/temp/graph/select]] [[$:/temp/graph/select/tiddler]] [[$:/temp/graph/select/selected-item]] [[$:/temp/graph/select/refresh]]" />
|
|
9
|
+
\end
|
|
10
|
+
|
|
11
|
+
\procedure select-click-actions()
|
|
12
|
+
<$action-setfield $tiddler="$:/temp/graph/select/tiddler" text=<<navigateTo>> />
|
|
13
|
+
<<select-accept-actions>>
|
|
14
|
+
\end
|
|
15
|
+
|
|
16
|
+
\procedure select-close-actions()
|
|
17
|
+
\whitespace trim
|
|
18
|
+
<$action-sendmessage $message="tm-close-tiddler" />
|
|
19
|
+
<$action-deletetiddler $filter="[[$:/temp/graph/select]] [[$:/temp/graph/select/tiddler]] [[$:/temp/graph/select/selected-item]] [[$:/temp/graph/select/refresh]]" />
|
|
20
|
+
\end
|
|
21
|
+
|
|
22
|
+
\procedure select-cancel-actions()
|
|
23
|
+
\whitespace trim
|
|
24
|
+
<% if [{$:/temp/graph/select}match[]] %>
|
|
25
|
+
<<select-close-actions>>
|
|
26
|
+
<% elseif [{$:/temp/graph/select}!match{$:/temp/graph/select/tiddler}] %>
|
|
27
|
+
<$action-setfield $tiddler="$:/temp/graph/select/tiddler" text={{$:/temp/graph/select}}/>
|
|
28
|
+
<$action-deletetiddler $filter="$:/temp/graph/select/selected-item" />
|
|
29
|
+
<$action-setfield $tiddler="$:/temp/graph/select/refresh" text="yes"/>
|
|
30
|
+
<% else %>
|
|
31
|
+
<$action-deletetiddler $filter="[[$:/temp/graph/select]] [[$:/temp/graph/select/tiddler]] [[$:/temp/graph/select/selected-item]] [[$:/temp/graph/select/refresh]]" />
|
|
32
|
+
<% endif %>
|
|
33
|
+
\end
|
|
34
|
+
|
|
35
|
+
\whitespace trim
|
|
36
|
+
|
|
37
|
+
<div class="tc-edit-field-add-name-wrapper">
|
|
38
|
+
|
|
39
|
+
<$transclude
|
|
40
|
+
$variable="keyboard-driven-input"
|
|
41
|
+
storeTitle="$:/temp/graph/select"
|
|
42
|
+
tiddler="$:/temp/graph/select/tiddler"
|
|
43
|
+
refreshTitle="$:/temp/graph/select/refresh"
|
|
44
|
+
selectionStateTitle="$:/temp/graph/select/selected-item"
|
|
45
|
+
configTiddlerFilter="[all[current]]"
|
|
46
|
+
tag="input"
|
|
47
|
+
placeholder="Type something"
|
|
48
|
+
class="tc-edit-texteditor graph-select"
|
|
49
|
+
focus=yes
|
|
50
|
+
inputCancelActions=<<select-cancel-actions>>
|
|
51
|
+
inputAcceptActions=<<select-accept-actions>>
|
|
52
|
+
$mode=inline
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<p>
|
|
56
|
+
|
|
57
|
+
<$linkcatcher actions=<<select-click-actions>> >
|
|
58
|
+
|
|
59
|
+
<$list filter={{!!first-search-filter}} >
|
|
60
|
+
|
|
61
|
+
<$list-empty>
|
|
62
|
+
|
|
63
|
+
<$text text="New result" />
|
|
64
|
+
|
|
65
|
+
</$list-empty>
|
|
66
|
+
<$list-template>
|
|
67
|
+
|
|
68
|
+
<span class={{{[{$:/temp/graph/select/tiddler}match<currentTiddler>then[tc-list-item-selected]] }}}>
|
|
69
|
+
|
|
70
|
+
<$slot $name=list-item>
|
|
71
|
+
|
|
72
|
+
<$transclude tiddler="$:/core/ui/ListItemTemplate" mode=inline/>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Modals/SelectField
|
|
2
|
+
subtitle: Select field
|
|
3
|
+
first-search-filter: [subfilter{$:/plugins/flibbles/graph/subfilters##edgetypes.fields}search:title{$:/temp/graph/select}sort[title]limit[10]]
|
|
4
|
+
footer: {{$:/plugins/flibbles/graph/ui/Modals/Select!!footer}}
|
|
5
|
+
mask-closable: yes
|
|
6
|
+
|
|
7
|
+
<p class="tc-edit-field-add">
|
|
8
|
+
|
|
9
|
+
<em class="tc-edit tc-small-gap-right">
|
|
10
|
+
|
|
11
|
+
<$text text="Select an existing field, or type in the name for a new one."/>
|
|
12
|
+
|
|
13
|
+
</em></p>
|
|
14
|
+
|
|
15
|
+
<$transclude $tiddler="$:/plugins/flibbles/graph/ui/Modals/Select">
|
|
16
|
+
|
|
17
|
+
<$fill $name=list-item>
|
|
18
|
+
|
|
19
|
+
<div class="tc-menu-list-item">
|
|
20
|
+
|
|
21
|
+
<$link overrideClass="tc-tiddlylink" />
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Modals/SelectTiddler
|
|
2
|
+
subtitle: Select tiddler
|
|
3
|
+
first-search-filter: [!is[system]!is[draft]search:title{$:/temp/graph/select}sort[title]limit[10]]
|
|
4
|
+
footer: {{$:/plugins/flibbles/graph/ui/Modals/Select!!footer}}
|
|
5
|
+
mask-closable: yes
|
|
6
|
+
|
|
7
|
+
<p class="tc-edit-field-add">
|
|
8
|
+
|
|
9
|
+
<em class="tc-edit tc-small-gap-right">
|
|
10
|
+
|
|
11
|
+
<$text text="Select an existing tiddler, or type in the name for a new one."/>
|
|
12
|
+
|
|
13
|
+
</em></p>
|
|
14
|
+
|
|
15
|
+
<$transclude $tiddler="$:/plugins/flibbles/graph/ui/Modals/Select" />
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Modals/Tiddler
|
|
2
|
+
subtitle: {{$:/plugins/flibbles/graph/ui/Modals/TiddlerHeader}}
|
|
3
|
+
mask-closable: yes
|
|
4
|
+
code-body: yes
|
|
5
|
+
|
|
6
|
+
<$vars
|
|
7
|
+
tv-config-toolbar-icons={{$:/config/Toolbar/Icons}}
|
|
8
|
+
tv-config-toolbar-text={{$:/config/Toolbar/Text}}
|
|
9
|
+
tv-config-toolbar-class={{$:/config/Toolbar/ButtonClass}}>
|
|
10
|
+
|
|
11
|
+
<div class=graph-modal-tiddler>
|
|
12
|
+
|
|
13
|
+
<$linkcatcher actions="""\whitespace trim
|
|
14
|
+
<%if [list[$:/state/flibbles/graph/modal]match<navigateTo>] %>
|
|
15
|
+
<$action-listops $tiddler='$:/state/flibbles/graph/modal' $subfilter='+[allafter:include<navigateTo>]' />
|
|
16
|
+
<%else%>
|
|
17
|
+
<$action-navigate $to=<<navigateTo>> />
|
|
18
|
+
""" >
|
|
19
|
+
|
|
20
|
+
<$tiddler tiddler={{{ [list[$:/state/flibbles/graph/modal]] }}}>
|
|
21
|
+
|
|
22
|
+
<$transclude $tiddler="$:/core/ui/StoryTiddlerTemplate" $mode=inline />
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Modals/TiddlerHeader
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
<div class=graph-modal-tiddler-breadcrumbs>
|
|
6
|
+
<$linkcatcher actions="<$action-listops $tiddler='$:/state/flibbles/graph/modal' $subfilter='+[allafter:include<navigateTo>]' />" >
|
|
7
|
+
<$list filter="[list[$:/state/flibbles/graph/modal]reverse[]]" join="{{$:/core/images/right-arrow}}">
|
|
8
|
+
<%if [list[$:/state/flibbles/graph/modal]first[]match{!!title}] %>
|
|
9
|
+
''<$text text={{!!title}} />''
|
|
10
|
+
<%else%>
|
|
11
|
+
<$link />
|
|
12
|
+
<%endif%>
|
|
13
|
+
</$list>
|
|
14
|
+
</$linkcatcher>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/PropertyTypes/boolean
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
<$checkbox index=<<property>>
|
|
6
|
+
checked=yes
|
|
7
|
+
unchecked=no
|
|
8
|
+
default={{{ [<jsonEntry>jsonget[default]match[true]then[yes]else[no]] }}}
|
|
9
|
+
/>
|
|
10
|
+
 
|
|
11
|
+
<$text text={{{ [<jsonEntry>jsonget[label]] }}} />
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/PropertyTypes/color
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
<$edit-color
|
|
6
|
+
class="tc-edit-texteditor tc-edit-fieldeditor"
|
|
7
|
+
default={{{ [<jsonEntry>jsonget[default]] }}}
|
|
8
|
+
index=<<property>>
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<$edit-text
|
|
12
|
+
tag=input
|
|
13
|
+
class="tc-edit-texteditor tc-edit-fieldeditor"
|
|
14
|
+
default={{{ [<jsonEntry>jsonget[default]] }}}
|
|
15
|
+
index=<<property>>
|
|
16
|
+
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/PropertyTypes/enum
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
<$select
|
|
6
|
+
multiple={{{ [<jsonEntry>jsonget[multiple]match[true]else[]] }}}
|
|
7
|
+
actions="<%if [all[current]getindex<property>match[]] %><$action-setfield $index=<<property>> $value=' '/>"
|
|
8
|
+
index=<<property>>
|
|
9
|
+
default={{{ [<jsonEntry>jsonget[multiple]match[true]then<jsonEntry>jsonget[default]format:titlelist[]join[ ]] ~[<jsonEntry>jsonget[default]] }}} >
|
|
10
|
+
<$list variable=enum filter="[<jsonEntry>jsonget[values]] -[<jsonEntry>jsonget[hidden]]">
|
|
11
|
+
<option value=<<enum>> >
|
|
12
|
+
<$text text=<<enum>> />
|
|
13
|
+
</option>
|
|
14
|
+
</$list>
|
|
15
|
+
</$select>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/PropertyTypes/number
|
|
2
|
+
|
|
3
|
+
\whitespace trim
|
|
4
|
+
|
|
5
|
+
<$let
|
|
6
|
+
increment={{{ [<jsonEntry>jsonget[increment]else[1]] }}}
|
|
7
|
+
default={{{ [<jsonEntry>jsonget[default]else[0]] }}}
|
|
8
|
+
min={{{ [<jsonEntry>jsonget[min]else[0]] }}}
|
|
9
|
+
max={{{ [<jsonEntry>jsonget[max]] ~[<increment>multiply[100]add<min>] }}}
|
|
10
|
+
>
|
|
11
|
+
<$range index=<<property>>
|
|
12
|
+
min=<<min>>
|
|
13
|
+
max=<<max>>
|
|
14
|
+
increment=<<increment>>
|
|
15
|
+
default=<<default>>
|
|
16
|
+
/>
|
|
17
|
+
<span><$text text={{{ [{!!title}getindex<property>else<default>] }}} />
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Settings/Engine
|
|
2
|
+
filter: [[graphengine]modules[]count[]compare:number:gt[1]]
|
|
3
|
+
tags: $:/tags/flibbles/graph/SettingsTab
|
|
4
|
+
caption: Engine
|
|
5
|
+
|
|
6
|
+
\parameters (prompt: "Select a default engine for your TiddlyWiki to use.")
|
|
7
|
+
|
|
8
|
+
<$transclude $variable=prompt />
|
|
9
|
+
|
|
10
|
+
<div class=graph-engine-button-list>
|
|
11
|
+
|
|
12
|
+
<$list filter="[subfilter{$:/plugins/flibbles/graph/subfilters##engine.list}]">
|
|
13
|
+
|
|
14
|
+
<$let name={{{ [all[current]moduleproperty[name]] }}} >
|
|
15
|
+
|
|
16
|
+
<$button class=graph-engine-button selectedClass=active set="$:/config/flibbles/graph/engine" setTo=<<name>> >
|
|
17
|
+
|
|
18
|
+
<div class=graph-icon>
|
|
19
|
+
|
|
20
|
+
<$transclude $tiddler={{{ [all[current]shadowsource[]addsuffix[/icon]is[shadow]] }}} />
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
<$text text=<<name>> />
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
title: $:/plugins/flibbles/graph/ui/Settings/Graphs/EditTemplate
|
|
2
|
+
|
|
3
|
+
\procedure engineSelector()
|
|
4
|
+
\whitespace trim
|
|
5
|
+
<$select field=engine
|
|
6
|
+
actions="<%if [{!!engine}match[]] %><$action-deletefield $field=engine/>">
|
|
7
|
+
<option />
|
|
8
|
+
<$list filter="[{!!engine}!match[]] [subfilter{$:/plugins/flibbles/graph/subfilters##engine.list}moduleproperty[name]]">
|
|
9
|
+
<%if [{!!title}match[]] ~[subfilter{$:/plugins/flibbles/graph/subfilters##engine.list}moduleproperty[name]match{!!title}] %>
|
|
10
|
+
<option>
|
|
11
|
+
<$text text={{!!title}} />
|
|
12
|
+
</option>
|
|
13
|
+
<%else%>
|
|
14
|
+
<option disabled value={{!!title}} class="graph-tiddler-select-warning" >
|
|
15
|
+
<$text text=`$(currentTiddler)$ (not installed!)` />
|
|
16
|
+
</option>
|
|
17
|
+
<%endif%>
|
|
18
|
+
</$list>
|
|
19
|
+
</$select>
|
|
20
|
+
\end
|
|
21
|
+
|
|
22
|
+
\procedure templateSelector()
|
|
23
|
+
\whitespace trim
|
|
24
|
+
<$select field=template default={{{ [[$:/tags/flibbles/graph/Template]tagging[]] }}} >
|
|
25
|
+
<$list filter="[[$:/tags/flibbles/graph/Template]tagging[]]">
|
|
26
|
+
<option value={{!!title}}>
|
|
27
|
+
<$view field=caption>
|
|
28
|
+
<$view field=title />
|
|
29
|
+
</$view>
|
|
30
|
+
</option>
|
|
31
|
+
</$list>
|
|
32
|
+
</$select>
|
|
33
|
+
\end
|
|
34
|
+
|
|
35
|
+
! <$link><$transclude field=caption><$text text={{{ [{!!title}removeprefix[$:/graph/]] }}} /></$transclude></$link>
|
|
36
|
+
|
|
37
|
+
<%if [[graphengine]modules[]count[]compare:number:gt[1]] %>
|
|
38
|
+
|
|
39
|
+
Engine: <<engineSelector>>
|
|
40
|
+
<%endif%>
|
|
41
|
+
|
|
42
|
+
Template: <<templateSelector>>
|
|
43
|
+
|
|
44
|
+
<$list variable="segment" filter="[[$:/tags/flibbles/graph/EditTemplate]tagging[]]">
|
|
45
|
+
|
|
46
|
+
<div class="graph-tiddler-edit-template">
|
|
47
|
+
|
|
48
|
+
!! <$transclude $tiddler=<<segment>> $field="caption"/>
|
|
49
|
+
|
|
50
|
+
<$transclude $tiddler=<<segment>> />
|
|
51
|
+
|
|
52
|
+
</div></$list>
|