@zakkzhang/tw5-graph 1.6.4

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.
Files changed (116) hide show
  1. package/README.md +65 -0
  2. package/package.json +39 -0
  3. package/plugins/graph/DefaultColourMappings.multids +8 -0
  4. package/plugins/graph/ViewTemplateBodyFilter/graph.tid +5 -0
  5. package/plugins/graph/ViewTemplateBodyFilter/properties.tid +5 -0
  6. package/plugins/graph/edges/fields/list.tid +7 -0
  7. package/plugins/graph/edges/fields/tags.tid +7 -0
  8. package/plugins/graph/edges/functions/links.tid +8 -0
  9. package/plugins/graph/edges/functions/transcludes.tid +8 -0
  10. package/plugins/graph/fieldtypes/filter.js +212 -0
  11. package/plugins/graph/fieldtypes/list.js +31 -0
  12. package/plugins/graph/fieldtypes/title.js +27 -0
  13. package/plugins/graph/filterrunprefixes/cache.js +118 -0
  14. package/plugins/graph/filters/gettyped.js +26 -0
  15. package/plugins/graph/graphengine.js +38 -0
  16. package/plugins/graph/icon.tid +16 -0
  17. package/plugins/graph/images/drag.tid +13 -0
  18. package/plugins/graph/macros/action.addedge.tid +16 -0
  19. package/plugins/graph/macros/edges.typed.tid +54 -0
  20. package/plugins/graph/macros/graph.view.tid +24 -0
  21. package/plugins/graph/macros/node.default.tid +9 -0
  22. package/plugins/graph/macros/nodes.neighbors.tid +62 -0
  23. package/plugins/graph/macros/nodes.writable.tid +37 -0
  24. package/plugins/graph/macros/properties.persistent.tid +27 -0
  25. package/plugins/graph/macros/properties.popup.tid +76 -0
  26. package/plugins/graph/macros/properties.river.tid +27 -0
  27. package/plugins/graph/macros/properties.settings.tid +56 -0
  28. package/plugins/graph/macros/properties.stack.tid +17 -0
  29. package/plugins/graph/macros/tiddlywiki.files +17 -0
  30. package/plugins/graph/plugin.info +14 -0
  31. package/plugins/graph/presettypes/edges/fields.tid +18 -0
  32. package/plugins/graph/presettypes/edges/functions.tid +5 -0
  33. package/plugins/graph/presettypes/nodes/stack.tid +6 -0
  34. package/plugins/graph/propertytypes/actions.js +15 -0
  35. package/plugins/graph/propertytypes/boolean.js +23 -0
  36. package/plugins/graph/propertytypes/enum.js +25 -0
  37. package/plugins/graph/propertytypes/image.js +140 -0
  38. package/plugins/graph/propertytypes/number.js +24 -0
  39. package/plugins/graph/propertytypes/string.js +13 -0
  40. package/plugins/graph/propertytypes/tiddlywiki.files +17 -0
  41. package/plugins/graph/readme.tid +5 -0
  42. package/plugins/graph/relink/attributes.js +52 -0
  43. package/plugins/graph/relink/attributes.multids +19 -0
  44. package/plugins/graph/relink/configprefix.js +76 -0
  45. package/plugins/graph/relink/fieldedgeprefix.js +39 -0
  46. package/plugins/graph/relink/fields.multids +11 -0
  47. package/plugins/graph/relink/graphprefix.js +28 -0
  48. package/plugins/graph/relink/operators.multids +3 -0
  49. package/plugins/graph/relink/propertyfields.js +81 -0
  50. package/plugins/graph/relink/utils.js +99 -0
  51. package/plugins/graph/settings.tid +13 -0
  52. package/plugins/graph/startup/messages.js +46 -0
  53. package/plugins/graph/stylesheets/base.css.tid +263 -0
  54. package/plugins/graph/stylesheets/fullscreen/core.css +11 -0
  55. package/plugins/graph/stylesheets/fullscreen/core.css.meta +3 -0
  56. package/plugins/graph/stylesheets/fullscreen.css.tid +46 -0
  57. package/plugins/graph/stylesheets/popup.css.tid +107 -0
  58. package/plugins/graph/subfilters.tid +23 -0
  59. package/plugins/graph/tags/GraphToolbar.tid +2 -0
  60. package/plugins/graph/tags/SettingsTab.tid +2 -0
  61. package/plugins/graph/tags/Template.tid +2 -0
  62. package/plugins/graph/tags/ViewEditTemplate.tid +2 -0
  63. package/plugins/graph/templates/live-graph.tid +34 -0
  64. package/plugins/graph/templates/standard-graph.tid +40 -0
  65. package/plugins/graph/ui/Buttons/center.tid +38 -0
  66. package/plugins/graph/ui/Buttons/export.tid +65 -0
  67. package/plugins/graph/ui/Buttons/fullscreen.tid +35 -0
  68. package/plugins/graph/ui/Buttons/settings.tid +28 -0
  69. package/plugins/graph/ui/Buttons/tiddlywiki.files +16 -0
  70. package/plugins/graph/ui/EditTemplate/Edges.tid +22 -0
  71. package/plugins/graph/ui/EditTemplate/Neighbors.tid +35 -0
  72. package/plugins/graph/ui/EditTemplate/Nodes.tid +12 -0
  73. package/plugins/graph/ui/EditTemplate/Popups.tid +27 -0
  74. package/plugins/graph/ui/EditTemplate/Properties.tid +21 -0
  75. package/plugins/graph/ui/EditTemplate/tiddlywiki.files +16 -0
  76. package/plugins/graph/ui/Modals/NewPropertySet.tid +20 -0
  77. package/plugins/graph/ui/Modals/NewView.tid +20 -0
  78. package/plugins/graph/ui/Modals/Select.tid +72 -0
  79. package/plugins/graph/ui/Modals/SelectField.tid +21 -0
  80. package/plugins/graph/ui/Modals/SelectTiddler.tid +15 -0
  81. package/plugins/graph/ui/Modals/Tiddler.tid +22 -0
  82. package/plugins/graph/ui/Modals/TiddlerHeader.tid +15 -0
  83. package/plugins/graph/ui/PropertyTypes/boolean.tid +11 -0
  84. package/plugins/graph/ui/PropertyTypes/color.tid +5 -0
  85. package/plugins/graph/ui/PropertyTypes/enum.tid +15 -0
  86. package/plugins/graph/ui/PropertyTypes/number.tid +17 -0
  87. package/plugins/graph/ui/Settings/Engine.tid +23 -0
  88. package/plugins/graph/ui/Settings/Graphs/EditTemplate.tid +52 -0
  89. package/plugins/graph/ui/Settings/Graphs.tid +49 -0
  90. package/plugins/graph/ui/Settings/Properties/ObjectsTypeTemplate.tid +44 -0
  91. package/plugins/graph/ui/Settings/Properties.tid +14 -0
  92. package/plugins/graph/ui/Settings/Toolbar.tid +5 -0
  93. package/plugins/graph/ui/SideBar/Graph.tid +77 -0
  94. package/plugins/graph/ui/Toolbars/GraphToolbar.tid +15 -0
  95. package/plugins/graph/ui/ViewTemplate/graph-object.tid +13 -0
  96. package/plugins/graph/ui/ViewTemplate/graph.tid +11 -0
  97. package/plugins/graph/ui/ViewTemplate/properties.tid +80 -0
  98. package/plugins/graph/ui/grouped-tabs.tid +109 -0
  99. package/plugins/graph/ui/selector.tid +74 -0
  100. package/plugins/graph/utils.js +148 -0
  101. package/plugins/graph/widgets/action-delay.js +72 -0
  102. package/plugins/graph/widgets/action-modal.js +121 -0
  103. package/plugins/graph/widgets/action-typed.js +56 -0
  104. package/plugins/graph/widgets/action-with.js +70 -0
  105. package/plugins/graph/widgets/boundingbox.js +126 -0
  106. package/plugins/graph/widgets/fieldTranscriber.js +98 -0
  107. package/plugins/graph/widgets/fieldtranscriber/filter.js +93 -0
  108. package/plugins/graph/widgets/fieldtranscriber/json.js +34 -0
  109. package/plugins/graph/widgets/fieldtranscriber/plain.js +11 -0
  110. package/plugins/graph/widgets/graphobject.js +120 -0
  111. package/plugins/graph/widgets/messagerelay.js +115 -0
  112. package/plugins/graph/widgets/properties.js +131 -0
  113. package/plugins/graph/widgets/subclass/edge.js +47 -0
  114. package/plugins/graph/widgets/subclass/graph.js +424 -0
  115. package/plugins/graph/widgets/subclass/node.js +44 -0
  116. package/plugins/graph/widgets/tiddlywiki.files +43 -0
@@ -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
+ &#32;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
+ &#32;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]]" join="{{$:/core/images/left-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
+ &#32;
11
+ <$text text={{{ [<jsonEntry>jsonget[label]] }}} />
@@ -0,0 +1,5 @@
1
+ title: $:/plugins/flibbles/graph/ui/PropertyTypes/color
2
+
3
+ \whitespace trim
4
+
5
+ <$edit-text class="tc-edit-texteditor tc-edit-fieldeditor" tag=input index=<<property>> type=color />
@@ -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]] ~[<increment>multiply[-25]add<default>] }}}
9
+ max={{{ [<jsonEntry>jsonget[max]] ~[<increment>multiply[50]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>
@@ -0,0 +1,49 @@
1
+ title: $:/plugins/flibbles/graph/ui/Settings/Graphs
2
+ tags: $:/tags/flibbles/graph/SettingsTab
3
+ caption: Graphs
4
+
5
+ \whitespace trim
6
+ \procedure graphList() :cache[all[shadows+tiddlers]insertafter{$:/config/flibbles/graph/sidebar}prefix[$:/graph/]else[$:/graph/Default]sort[]]
7
+
8
+ <$transclude $tiddler="$:/plugins/flibbles/graph/ui/grouped-tabs"
9
+ tabsList=<<graphList>>
10
+ default={{{ [subfilter<graphList>] }}}
11
+ explicitState="$:/state/flibbles/graph/settings/graphs"
12
+ >
13
+ <$fill $name=addButton>
14
+ <$button class="group-tab-new">
15
+ {{$:/core/images/new-button}}
16
+ <$action-modal $tiddler="$:/plugins/flibbles/graph/ui/Modals/NewGraph">
17
+ <$vars newTitle=`$:/graph/$(selection)$`>
18
+ <$action-createtiddler $basetitle=<<newTitle>> type="application/json" />
19
+ <$action-setfield $tiddler=<<qualifiedState>> text=<<newTitle>> />
20
+ </$vars>
21
+ </$action-modal>
22
+ <$action-sendmessage $message=tm-focus-selector $param="input.graph-select" />
23
+ </$button>
24
+ </$fill>
25
+ <$fill $name=button>
26
+ <$view tiddler=<<currentTab>> field=caption>
27
+ <$text text={{{ [<currentTab>removeprefix[$:/graph/]] }}} />
28
+ </$view>
29
+ </$fill>
30
+ <$fill $name=body>
31
+ <$let currentTiddler=<<currentTab>> >
32
+ <$transclude $tiddler="$:/plugins/flibbles/graph/ui/Settings/Graphs/EditTemplate" $mode=block />
33
+ </$let>
34
+
35
+ <$button>
36
+
37
+ <$vars graphName={{{ [<currentTab>removeprefix[$:/graph/]] }}}>
38
+ <$action-confirm $message=`Are you sure you wish to delete '$(graphName)$'`>
39
+ <%if [{$:/config/flibbles/graph/sidebar}match<currentTab>] %>
40
+ <$action-deletetiddler $tiddler="$:/config/flibbles/graph/sidebar"/>
41
+ <%endif%>
42
+ <$action-deletetiddler $tiddler=<<currentTab>>/>
43
+ </$action-confirm>
44
+ </$vars>
45
+
46
+ Delete Graph
47
+ </$button>
48
+ </$fill>
49
+ </$transclude>
@@ -0,0 +1,44 @@
1
+ title: $:/plugins/flibbles/graph/ui/Settings/Properties/ObjectsTypeTemplate
2
+
3
+ \define groupPrefix() $:/config/flibbles/graph/$(currentType)$/$(currentGroup)$/
4
+ \whitespace trim
5
+
6
+ <$let
7
+ currentType=<<currentTab>>
8
+ presetPrefix=`$:/plugins/flibbles/graph/presettypes/$(currentType)$/`
9
+ configPrefix=`$:/config/flibbles/graph/$(currentTab)$/`>
10
+
11
+
12
+ <$transclude $tiddler="$:/plugins/flibbles/graph/ui/grouped-tabs"
13
+ groupsList="[all[shadows+tiddlers]removeprefix<presetPrefix>]"
14
+ tabsList="[all[shadows+tiddlers]prefix<groupPrefix>]"
15
+ default={{{ [all[shadows+tiddlers]prefix[$:/graph/]else[$:/graph/core/Default]] }}}
16
+ state=`$:/state/flibbles/graph/settings/$(currentType)$`
17
+ orderFilter="[<currentGroup>addprefix<presetPrefix>get[orderable]match[yes]then<currentGroup>addprefix<configPrefix>]"
18
+ >
19
+ <$fill $name=addButton>
20
+ <$button class="group-tab-new">
21
+ {{$:/core/images/new-button}}
22
+ <$action-modal $tiddler="$:/plugins/flibbles/graph/ui/Modals/NewPropertySet">
23
+ <$vars newTitle=`$(groupPrefix)$$(selection)$`>
24
+ <$action-createtiddler $basetitle=<<newTitle>> type="application/json" />
25
+ <$action-setfield $tiddler=<<tabsState>> text=<<newTitle>> />
26
+ </$vars>
27
+ </$action-modal>
28
+ <$action-sendmessage $message=tm-focus-selector $param="input.graph-select" />
29
+ </$button>
30
+ </$fill>
31
+ <$fill $name=button>
32
+ <$text text={{{ [<currentTab>removeprefix<groupPrefix>] }}} />
33
+ </$fill>
34
+ <$fill $name=body>
35
+
36
+ <$let currentTiddler=<<currentTab>>
37
+ currentCategory={{{ [all[current]removeprefix<configPrefix>split[/]nth[]] }}} >
38
+
39
+ ! <$link><$text text={{{ [all[current]removeprefix<configPrefix>removeprefix<currentCategory>removeprefix[/]] }}} /></$link>
40
+
41
+ {{||$:/core/ui/ViewTemplate/body}}
42
+ </$let>
43
+ </$fill>
44
+ </$transclude>
@@ -0,0 +1,14 @@
1
+ title: $:/plugins/flibbles/graph/ui/Settings/Properties
2
+ tags: $:/tags/flibbles/graph/SettingsTab
3
+ caption: Properties
4
+
5
+ \function .tabs() :cache[all[shadows+tiddlers]removeprefix[$:/plugins/flibbles/graph/presettypes/]splitbefore[/]removesuffix[/]unique[]sort[]]
6
+
7
+ <$parameters default=<<.tabs>> >
8
+
9
+ <$transclude $variable=tabs
10
+ tabsList="[function[.tabs]]"
11
+ default=<<default>>
12
+ state="$:/state/graph/settings/"
13
+ template="$:/plugins/flibbles/graph/ui/Settings/Properties/ObjectsTypeTemplate"
14
+ />
@@ -0,0 +1,5 @@
1
+ title: $:/plugins/flibbles/graph/ui/Settings/Toolbar
2
+ tags: $:/tags/flibbles/graph/SettingsTab
3
+ caption: Toolbar
4
+
5
+ {{$:/plugins/flibbles/graph/ui/Toolbars/GraphToolbar}}