tiddlywiki 5.2.0 → 5.2.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/boot/boot.js +40 -3
- package/contributing.md +1 -1
- package/core/language/en-GB/ControlPanel.multids +15 -0
- package/core/modules/editor/engines/framed.js +1 -1
- package/core/modules/editor/engines/simple.js +1 -1
- package/core/modules/editor/factory.js +1 -1
- package/core/modules/editor/operations/text/focus-editor.js +17 -0
- package/core/modules/filterrunprefixes/cascade.js +53 -0
- package/core/modules/filterrunprefixes/filter.js +16 -9
- package/core/modules/filterrunprefixes/map.js +16 -9
- package/core/modules/filterrunprefixes/reduce.js +16 -18
- package/core/modules/filterrunprefixes/sort.js +10 -8
- package/core/modules/filters/listops.js +12 -0
- package/core/modules/filters/math.js +29 -0
- package/core/modules/filters/strings.js +11 -9
- package/core/modules/parsers/wikiparser/rules/html.js +4 -2
- package/core/modules/parsers/wikiparser/wikiparser.js +11 -8
- package/core/modules/server/routes/put-tiddler.js +1 -1
- package/core/modules/utils/dom/dragndrop.js +8 -2
- package/core/modules/utils/utils.js +0 -18
- package/core/modules/widgets/action-sendmessage.js +17 -7
- package/core/modules/widgets/action-setmultiplefields.js +86 -0
- package/core/modules/widgets/codeblock.js +7 -1
- package/core/modules/widgets/dropzone.js +2 -1
- package/core/modules/widgets/let.js +96 -0
- package/core/modules/widgets/link.js +2 -1
- package/core/modules/widgets/setmultiplevariables.js +81 -0
- package/core/modules/widgets/vars.js +2 -4
- package/core/modules/widgets/widget.js +20 -16
- package/core/modules/wiki.js +9 -4
- package/core/ui/Components/tag-link.tid +1 -1
- package/core/ui/ControlPanel/Cascades/EditTemplateBody.tid +9 -0
- package/core/ui/ControlPanel/Cascades/StoryTiddler.tid +9 -0
- package/core/ui/ControlPanel/Cascades/TiddlerColour.tid +9 -0
- package/core/ui/ControlPanel/Cascades/TiddlerIcon.tid +9 -0
- package/core/ui/ControlPanel/Cascades/ViewTemplateBody.tid +9 -0
- package/core/ui/ControlPanel/Cascades/ViewTemplateTitle.tid +9 -0
- package/core/ui/ControlPanel/Cascades.tid +9 -0
- package/core/ui/EditTemplate/body/canonical-uri.tid +13 -0
- package/core/ui/EditTemplate/body/default.tid +38 -0
- package/core/ui/EditTemplate/body.tid +1 -51
- package/core/ui/EditTemplate/tags.tid +1 -1
- package/core/ui/EditorToolbar/link-dropdown.tid +1 -1
- package/core/ui/EditorToolbar/preview.tid +4 -4
- package/core/ui/ListTaggedCascade.tid +14 -0
- package/core/ui/PageTemplate/story.tid +1 -1
- package/core/ui/PluginListItemTemplate.tid +13 -3
- package/core/ui/StoryTiddlerTemplate.tid +3 -0
- package/core/ui/TagPickerTagTemplate.tid +3 -3
- package/core/ui/TagTemplate.tid +1 -1
- package/core/ui/TiddlerIcon.tid +8 -0
- package/core/ui/ViewTemplate/body/blank.tid +3 -0
- package/core/ui/ViewTemplate/body/code.tid +3 -0
- package/core/ui/ViewTemplate/body/default.tid +7 -0
- package/core/ui/ViewTemplate/{import.tid → body/import.tid} +1 -2
- package/core/ui/ViewTemplate/body/plugin.tid +10 -0
- package/core/ui/ViewTemplate/body.tid +1 -9
- package/core/ui/ViewTemplate/title/default.tid +6 -0
- package/core/ui/ViewTemplate/title/system.tid +6 -0
- package/core/ui/ViewTemplate/title.tid +4 -17
- package/core/wiki/config/EditTemplateBodyFilters.multids +5 -0
- package/core/wiki/config/OfficialPluginLibrary.tid +1 -1
- package/core/wiki/config/StoryTiddlerTemplateFilters.multids +5 -0
- package/core/wiki/config/TiddlerColourFilters.multids +5 -0
- package/core/wiki/config/TiddlerIconFilters.multids +5 -0
- package/core/wiki/config/ViewTemplateBodyFilters.multids +8 -0
- package/core/wiki/config/ViewTemplateTitleFilters.multids +5 -0
- package/core/wiki/debugstylesheets.tid +9 -0
- package/core/wiki/macros/tag.tid +3 -1
- package/core/wiki/peek-stylesheets.tid +3 -0
- package/core/wiki/tags/EditTemplateBodyFilter.tid +2 -0
- package/core/wiki/tags/StoryTiddlerTemplateFilter.tid +2 -0
- package/core/wiki/tags/TiddlerColourFilter.tid +3 -0
- package/core/wiki/tags/TiddlerIconFilter.tid +3 -0
- package/core/wiki/tags/ViewTemplateBodyFilter.tid +3 -0
- package/core/wiki/tags/ViewTemplateTitleFilter.tid +3 -0
- package/editions/fr-FR/tiddlers/HelloThumbnail - Latest Version.tid +1 -1
- package/editions/prerelease/tiddlers/{Release 5.2.1.tid → Release 5.2.2.tid } +10 -18
- package/editions/test/tiddlers/tests/test-filters.js +4 -0
- package/editions/test/tiddlers/tests/test-html-parser.js +17 -11
- package/editions/test/tiddlers/tests/test-prefixes-filter.js +50 -0
- package/editions/test/tiddlers/tests/test-widget.js +34 -0
- package/editions/test/tiddlers/tests/test-wikitext-parser.js +30 -30
- package/editions/tw5.com/tiddlers/$__StoryList.tid +3 -3
- package/editions/tw5.com/tiddlers/{License.tid → about/License.tid} +0 -0
- package/editions/tw5.com/tiddlers/commands/NamedCommandParameters.tid +2 -2
- package/editions/tw5.com/tiddlers/community/Contributing.tid +2 -2
- package/editions/tw5.com/tiddlers/community/TW Icons by morosanuae.tid +2 -2
- package/editions/tw5.com/tiddlers/community/TiddlyWiki Hangouts.tid +2 -2
- package/editions/tw5.com/tiddlers/community/editions/_Noteself_ by Danielo Rodriguez.tid +2 -2
- package/editions/tw5.com/tiddlers/community/examples/Reveal.js by Devin Weaver.tid +2 -2
- package/editions/tw5.com/tiddlers/community/plugins/Encrypt single tiddler plugin.tid +2 -2
- package/editions/tw5.com/tiddlers/community/plugins/TiddlyMap by Felix Kuppers.tid +2 -2
- package/editions/tw5.com/tiddlers/community/resources/TW5 Magick.tid +2 -2
- package/editions/tw5.com/tiddlers/community/resources/_Dynamic Tables_ by Jed Carty.tid +2 -2
- package/editions/tw5.com/tiddlers/community/resources/_TiddlyServer_ by Matt Lauber.tid +5 -3
- package/editions/tw5.com/tiddlers/community/resources/_muritest_ by Simon Huber.tid +2 -2
- package/editions/tw5.com/tiddlers/concepts/Cascades.tid +47 -0
- package/editions/tw5.com/tiddlers/concepts/Concepts.tid +5 -3
- package/editions/tw5.com/tiddlers/concepts/Edit Template Body Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/Messages.tid +2 -2
- package/editions/tw5.com/tiddlers/concepts/ModuleType.tid +2 -2
- package/editions/tw5.com/tiddlers/concepts/Order of Tagged Tiddlers.tid +1 -1
- package/editions/tw5.com/tiddlers/concepts/Railroad Diagrams.tid +2 -1
- package/editions/tw5.com/tiddlers/concepts/Story Tiddler Template Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/Story Tiddler Template.tid +13 -0
- package/editions/tw5.com/tiddlers/concepts/TagTiddlers.tid +1 -1
- package/editions/tw5.com/tiddlers/concepts/Tiddler Colour Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/Tiddler Icon Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/View Template Body Cascade.tid +19 -0
- package/editions/tw5.com/tiddlers/concepts/View Template Title Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/customising/Alternative page layouts.tid +1 -1
- package/editions/tw5.com/tiddlers/customising/Creating new toolbar buttons.tid +35 -0
- package/editions/tw5.com/tiddlers/customising/Customise TiddlyWiki.tid +3 -3
- package/editions/tw5.com/tiddlers/customising/Customising TiddlyWiki's user interface.tid +75 -0
- package/editions/tw5.com/tiddlers/definitions/BT.tid +3 -2
- package/editions/tw5.com/tiddlers/definitions/MathML.tid +2 -2
- package/editions/tw5.com/tiddlers/definitions/Osmosoft.tid +3 -2
- package/editions/tw5.com/tiddlers/definitions/node-webkit.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Alice in Wonderland.tid +4 -3707
- package/editions/tw5.com/tiddlers/demonstrations/Apple.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/Caruso - Ave Maria.tid +1 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Demo Tiddler List with Custom Story Tiddler Template.tid +10 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Styles.tid +31 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Template.tid +25 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/TiddlerTemplateFilter.tid +5 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomTiddlerColourCascadeDemo/CustomTiddlerColourCascadeDemo.tid +9 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomTiddlerIconCascadeDemo/CustomTiddlerIconCascadeDemo.tid +9 -0
- package/editions/tw5.com/tiddlers/demonstrations/ImageGallery Example.tid +5 -16
- package/editions/tw5.com/tiddlers/demonstrations/KeyboardDrivenInput/Demonstration_ keyboard-driven-input Macro.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/KeyboardDrivenInput/kdi-demo-configtid.tid +4 -3
- package/editions/tw5.com/tiddlers/demonstrations/SampleNotification.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleTiddlerFirst.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleTiddlerSecond.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleTiddlerThird.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleWizard.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleWizard2.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Contents.tid +3 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/First.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/FirstOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/FirstThree.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/FirstTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Second.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThree.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/ThirdOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/ThirdThree.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/ThirdTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/Tagged with TagMacro.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Compose ballad.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Get the Ring.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Go to Mordor.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Kill the Dragon.tid +4 -4
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Make the beds.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/done.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/task.tid +3 -2
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Days of the Week.tid +5 -4
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Friday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Monday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Saturday.tid +3 -2
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Sunday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Thursday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Tuesday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Wednesday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/sampletag1.tid +3 -0
- package/editions/tw5.com/tiddlers/demonstrations/sampletag2.tid +3 -0
- package/editions/tw5.com/tiddlers/features/DateFormat.tid +7 -1
- package/editions/tw5.com/tiddlers/features/LazyLoading.tid +2 -3
- package/editions/tw5.com/tiddlers/features/Scalability.tid +4 -2
- package/editions/tw5.com/tiddlers/filters/acos Operator.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/asin Operator.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/atan Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/atan2 Operator.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/cos Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/deserializers Operator.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/acos Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/asin Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/atan Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/atan2 Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/cos Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/cycle Operator (Examples).tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/log Operator (Examples).tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/lookup Operator (Examples).tid +2 -1
- package/editions/tw5.com/tiddlers/filters/examples/match Operator (Examples).tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/search-replace Operator (Examples).tid +8 -2
- package/editions/tw5.com/tiddlers/filters/examples/sin Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/subfilter Operator (Examples).tid +25 -3
- package/editions/tw5.com/tiddlers/filters/examples/tan Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/zth Operator (Examples).tid +10 -0
- package/editions/tw5.com/tiddlers/filters/list.tid +2 -2
- package/editions/tw5.com/tiddlers/filters/nth.tid +9 -7
- package/editions/tw5.com/tiddlers/filters/range.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/sin Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/storyviews.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/subfilter Operator.tid +4 -2
- package/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix (Examples).tid +46 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid +20 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Expression.tid +4 -2
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix (Examples).tid +30 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix.tid +27 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix (Examples).tid +7 -36
- package/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix (Examples).tid +36 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix (Examples).tid +26 -1
- package/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix.tid +9 -1
- package/editions/tw5.com/tiddlers/filters/syntax/Named Filter Run Prefix.tid +2 -2
- package/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix (Examples).tid +27 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix.tid +38 -0
- package/editions/tw5.com/tiddlers/filters/tan Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/zth Operator.tid +18 -0
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Android.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Chrome.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Internet Explorer.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Node.js.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Online.tid +2 -2
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Safari.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - iOS.tid +2 -1
- package/editions/tw5.com/tiddlers/{AllTiddlers.tid → hellothere/AllTiddlers.tid} +0 -0
- package/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +1 -1
- package/editions/tw5.com/tiddlers/hellothere/Some of the things you can do with TiddlyWiki.tid +2 -2
- package/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Badge.svg.tid +1 -0
- package/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Link.tid +1 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting NewImageType.tid +3 -1
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting ShowEditPreviewPerTiddler.tid +10 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ Typin Refresh Delay.tid +2 -2
- package/editions/tw5.com/tiddlers/howtos/Creating SubStories.tid +21 -33
- package/editions/tw5.com/tiddlers/howtos/Debugging Stylesheets.tid +11 -0
- package/editions/tw5.com/tiddlers/howtos/How to create a custom story tiddler template.tid +40 -0
- package/editions/tw5.com/tiddlers/howtos/How to create a custom tiddler colour rule.tid +36 -0
- package/editions/tw5.com/tiddlers/howtos/How to create a custom tiddler icon rule.tid +36 -0
- package/editions/tw5.com/tiddlers/howtos/How to create dynamic editor toolbar buttons.tid +2 -2
- package/editions/tw5.com/tiddlers/howtos/Simple ways to write protect tiddlers.tid +4 -5
- package/editions/tw5.com/tiddlers/howtos/Text preview.tid +6 -2
- package/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid +8 -4
- package/editions/tw5.com/tiddlers/images/Icon Gallery.tid +14 -0
- package/editions/tw5.com/tiddlers/images/New Release Banner.png +0 -0
- package/editions/tw5.com/tiddlers/languages/LanguageGallery.tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/colour-picker Macro (Example 1).tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/image-picker Macro (Example 1).tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/image-picker Macro (Example 2).tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/unusedtitle Macro (Examples 1).tid +2 -2
- package/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid +2 -2
- package/editions/tw5.com/tiddlers/mechanisms/StateMechanism.tid +2 -2
- package/editions/tw5.com/tiddlers/messages/SampleModal.tid +2 -1
- package/editions/tw5.com/tiddlers/messages/SampleWindowTemplate.tid +10 -0
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid +3 -0
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid +22 -4
- package/editions/tw5.com/tiddlers/nodejs/Environment Variables on Node.js.tid +4 -2
- package/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid +10 -3
- package/editions/tw5.com/tiddlers/nodejs/tiddlywiki.files_Files.tid +6 -5
- package/editions/tw5.com/tiddlers/nodejs/tiddlywiki.info_Files.tid +2 -2
- package/editions/tw5.com/tiddlers/platforms/TiddlyFox Apocalypse.tid +2 -2
- package/editions/tw5.com/tiddlers/platforms/TiddlyWiki in the Sky for TiddlyWeb.tid +3 -8
- package/editions/tw5.com/tiddlers/plugins/Plugin Types.tid +2 -2
- package/editions/tw5.com/tiddlers/reference/Reference.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/BetaReleases.tid +2 -2
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.1.tid +118 -0
- package/editions/tw5.com/tiddlers/releasenotes/ReleaseTemplate.tid +3 -0
- package/editions/tw5.com/tiddlers/releasenotes/alpha/AlphaReleases.tid +2 -2
- package/editions/tw5.com/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Example package.json for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Example web.config for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Saving via WebDAV.tid +31 -1
- package/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid +6 -2
- package/editions/tw5.com/tiddlers/{TableOfContents.tid → system/TableOfContents.tid} +0 -0
- package/editions/tw5.com/tiddlers/system/doc-macros.tid +17 -0
- package/editions/tw5.com/tiddlers/system/doc-styles.tid +32 -1
- package/editions/tw5.com/tiddlers/system/operator-macros.tid +12 -5
- package/editions/tw5.com/tiddlers/system/operator-template.tid +8 -8
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Image.tid +2 -2
- package/editions/tw5.com/tiddlers/variables/examples/Sample Headings 1-2-3.tid +2 -1
- package/editions/tw5.com/tiddlers/variables/examples/Sample Headings 3-4-5.tid +2 -1
- package/editions/tw5.com/tiddlers/variables/examples/Sample Headings 4-5-6.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Template.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionListopsWidget.tid +52 -2
- package/editions/tw5.com/tiddlers/widgets/ActionSendMessageWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/ActionSetMultipleFieldsWidget.tid +31 -0
- package/editions/tw5.com/tiddlers/widgets/ActionWidget Execution Modes.tid +5 -2
- package/editions/tw5.com/tiddlers/widgets/ActionWidgets.tid +4 -4
- package/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/DroppableWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/DropzoneWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid +8 -19
- package/editions/tw5.com/tiddlers/widgets/EditWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/EventCatcherWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/FieldManglerWidget.tid +3 -3
- package/editions/tw5.com/tiddlers/{Keyboard Codes.tid → widgets/Keyboard Codes.tid} +0 -0
- package/editions/tw5.com/tiddlers/widgets/KeyboardWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/LetWidget.tid +57 -0
- package/editions/tw5.com/tiddlers/widgets/LinkCatcherWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ListopsData.tid +1 -0
- package/editions/tw5.com/tiddlers/widgets/MessageCatcherWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/MessageHandlerWidgets.tid +13 -0
- package/editions/tw5.com/tiddlers/widgets/NavigatorWidget.tid +5 -2
- package/editions/tw5.com/tiddlers/widgets/RadioWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/RangeWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/SelectWidget.tid +15 -2
- package/editions/tw5.com/tiddlers/widgets/SetMultipleVariablesWidget.tid +33 -0
- package/editions/tw5.com/tiddlers/widgets/The Extended Listops Filters.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/TriggeringWidgets.tid +13 -0
- package/editions/tw5.com/tiddlers/widgets/VarsWidget.tid +7 -5
- package/editions/tw5.com/tiddlers/wikitext/Transclusion and Substitution.tid +3 -2
- package/languages/pl-PL/ControlPanel.multids +1 -1
- package/languages/pl-PL/Docs/PaletteColours.multids +1 -1
- package/languages/pl-PL/Import.multids +1 -1
- package/languages/pl-PL/Misc.multids +2 -2
- package/languages/pl-PL/SideBar.multids +1 -1
- package/languages/zh-Hans/ControlPanel.multids +15 -0
- package/languages/zh-Hant/ControlPanel.multids +15 -0
- package/licenses/cla-individual.md +10 -0
- package/package.json +1 -1
- package/plugins/tiddlywiki/codemirror/engine.js +55 -2
- package/readme.md +2 -2
- package/themes/tiddlywiki/vanilla/ThemeTweaks.tid +7 -3
- package/themes/tiddlywiki/vanilla/base.tid +6 -0
- package/themes/tiddlywiki/vanilla/reset.tid +1 -1
- package/core/ui/ViewTemplate/plugin.tid +0 -15
- package/editions/tw5.com/tiddlers/customising/Page and tiddler layout customisation.tid +0 -63
- package/editions/tw5.com/tiddlers/demonstrations/SampleAlert.tid +0 -9
@@ -978,22 +978,4 @@ exports.makeCompareFunction = function(type,options) {
|
|
978
978
|
return (types[type] || types[options.defaultType] || types.number);
|
979
979
|
};
|
980
980
|
|
981
|
-
exports.decodeURIComponentSafe = function(str) {
|
982
|
-
var value = str;
|
983
|
-
try {
|
984
|
-
value = decodeURIComponent(str);
|
985
|
-
} catch(e) {
|
986
|
-
}
|
987
|
-
return value;
|
988
|
-
};
|
989
|
-
|
990
|
-
exports.decodeURISafe = function(str) {
|
991
|
-
var value = str;
|
992
|
-
try {
|
993
|
-
value = decodeURI(str);
|
994
|
-
} catch(e) {
|
995
|
-
}
|
996
|
-
return value;
|
997
|
-
};
|
998
|
-
|
999
981
|
})();
|
@@ -39,6 +39,8 @@ SendMessageWidget.prototype.execute = function() {
|
|
39
39
|
this.actionParam = this.getAttribute("$param");
|
40
40
|
this.actionName = this.getAttribute("$name");
|
41
41
|
this.actionValue = this.getAttribute("$value","");
|
42
|
+
this.actionNames = this.getAttribute("$names");
|
43
|
+
this.actionValues = this.getAttribute("$values");
|
42
44
|
};
|
43
45
|
|
44
46
|
/*
|
@@ -59,13 +61,20 @@ Invoke the action associated with this widget
|
|
59
61
|
SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
60
62
|
// Get the string parameter
|
61
63
|
var param = this.actionParam;
|
62
|
-
// Assemble the
|
64
|
+
// Assemble the parameters as a hashmap
|
63
65
|
var paramObject = Object.create(null);
|
64
|
-
|
66
|
+
// Add names/values pairs if present
|
67
|
+
if(this.actionNames && this.actionValues) {
|
68
|
+
var names = this.wiki.filterTiddlers(this.actionNames,this),
|
69
|
+
values = this.wiki.filterTiddlers(this.actionValues,this);
|
70
|
+
$tw.utils.each(names,function(name,index) {
|
71
|
+
paramObject[name] = values[index] || "";
|
72
|
+
});
|
73
|
+
}
|
74
|
+
// Add raw parameters
|
65
75
|
$tw.utils.each(this.attributes,function(attribute,name) {
|
66
76
|
if(name.charAt(0) !== "$") {
|
67
77
|
paramObject[name] = attribute;
|
68
|
-
count++;
|
69
78
|
}
|
70
79
|
});
|
71
80
|
// Add name/value pair if present
|
@@ -73,14 +82,15 @@ SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
|
73
82
|
paramObject[this.actionName] = this.actionValue;
|
74
83
|
}
|
75
84
|
// Dispatch the message
|
76
|
-
|
85
|
+
var params = {
|
77
86
|
type: this.actionMessage,
|
78
87
|
param: param,
|
79
88
|
paramObject: paramObject,
|
89
|
+
event: event,
|
80
90
|
tiddlerTitle: this.getVariable("currentTiddler"),
|
81
|
-
navigateFromTitle: this.getVariable("storyTiddler")
|
82
|
-
|
83
|
-
|
91
|
+
navigateFromTitle: this.getVariable("storyTiddler")
|
92
|
+
};
|
93
|
+
this.dispatchEvent(params);
|
84
94
|
return true; // Action was invoked
|
85
95
|
};
|
86
96
|
|
@@ -0,0 +1,86 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/core/modules/widgets/action-setmultiplefields.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: widget
|
5
|
+
|
6
|
+
Action widget to set multiple fields or indexes on a tiddler
|
7
|
+
|
8
|
+
\*/
|
9
|
+
(function(){
|
10
|
+
|
11
|
+
/*jslint node: true, browser: true */
|
12
|
+
/*global $tw: false */
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
16
|
+
|
17
|
+
var SetMultipleFieldsWidget = function(parseTreeNode,options) {
|
18
|
+
this.initialise(parseTreeNode,options);
|
19
|
+
};
|
20
|
+
|
21
|
+
/*
|
22
|
+
Inherit from the base widget class
|
23
|
+
*/
|
24
|
+
SetMultipleFieldsWidget.prototype = new Widget();
|
25
|
+
|
26
|
+
/*
|
27
|
+
Render this widget into the DOM
|
28
|
+
*/
|
29
|
+
SetMultipleFieldsWidget.prototype.render = function(parent,nextSibling) {
|
30
|
+
this.computeAttributes();
|
31
|
+
this.execute();
|
32
|
+
};
|
33
|
+
|
34
|
+
/*
|
35
|
+
Compute the internal state of the widget
|
36
|
+
*/
|
37
|
+
SetMultipleFieldsWidget.prototype.execute = function() {
|
38
|
+
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
39
|
+
this.actionFields = this.getAttribute("$fields");
|
40
|
+
this.actionIndexes = this.getAttribute("$indexes");
|
41
|
+
this.actionValues = this.getAttribute("$values");
|
42
|
+
this.actionTimestamp = this.getAttribute("$timestamp","yes") === "yes";
|
43
|
+
};
|
44
|
+
|
45
|
+
/*
|
46
|
+
Refresh the widget by ensuring our attributes are up to date
|
47
|
+
*/
|
48
|
+
SetMultipleFieldsWidget.prototype.refresh = function(changedTiddlers) {
|
49
|
+
var changedAttributes = this.computeAttributes();
|
50
|
+
if(changedAttributes["$tiddler"] || changedAttributes["$fields"] || changedAttributes["$indexes"] || changedAttributes["$values"] || changedAttributes["$timestamp"]) {
|
51
|
+
this.refreshSelf();
|
52
|
+
return true;
|
53
|
+
}
|
54
|
+
return this.refreshChildren(changedTiddlers);
|
55
|
+
};
|
56
|
+
|
57
|
+
/*
|
58
|
+
Invoke the action associated with this widget
|
59
|
+
*/
|
60
|
+
SetMultipleFieldsWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
61
|
+
var tiddler = this.wiki.getTiddler(this.actionTiddler),
|
62
|
+
names, values = this.wiki.filterTiddlers(this.actionValues,this);
|
63
|
+
if(this.actionFields) {
|
64
|
+
var additions = {};
|
65
|
+
names = this.wiki.filterTiddlers(this.actionFields,this);
|
66
|
+
$tw.utils.each(names,function(fieldname,index) {
|
67
|
+
additions[fieldname] = values[index] || "";
|
68
|
+
});
|
69
|
+
var creationFields = this.actionTimestamp ? this.wiki.getCreationFields() : undefined,
|
70
|
+
modificationFields = this.actionTimestamp ? this.wiki.getModificationFields() : undefined;
|
71
|
+
this.wiki.addTiddler(new $tw.Tiddler(creationFields,tiddler,{title: this.actionTiddler},modificationFields,additions));
|
72
|
+
} else if(this.actionIndexes) {
|
73
|
+
var data = this.wiki.getTiddlerData(this.actionTiddler,Object.create(null));
|
74
|
+
names = this.wiki.filterTiddlers(this.actionIndexes,this);
|
75
|
+
$tw.utils.each(names,function(name,index) {
|
76
|
+
data[name] = values[index] || "";
|
77
|
+
});
|
78
|
+
this.wiki.setTiddlerData(this.actionTiddler,data,{},{suppressTimestamp: !this.actionTimestamp});
|
79
|
+
}
|
80
|
+
return true; // Action was invoked
|
81
|
+
};
|
82
|
+
|
83
|
+
exports["action-setmultiplefields"] = SetMultipleFieldsWidget;
|
84
|
+
|
85
|
+
})();
|
86
|
+
|
@@ -52,7 +52,13 @@ CodeBlockWidget.prototype.execute = function() {
|
|
52
52
|
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
53
53
|
*/
|
54
54
|
CodeBlockWidget.prototype.refresh = function(changedTiddlers) {
|
55
|
-
|
55
|
+
var changedAttributes = this.computeAttributes();
|
56
|
+
if(changedAttributes.code || changedAttributes.language) {
|
57
|
+
this.refreshSelf();
|
58
|
+
return true;
|
59
|
+
} else {
|
60
|
+
return false;
|
61
|
+
}
|
56
62
|
};
|
57
63
|
|
58
64
|
exports.codeblock = CodeBlockWidget;
|
@@ -198,7 +198,8 @@ DropZoneWidget.prototype.handleDropEvent = function(event) {
|
|
198
198
|
this.resetState();
|
199
199
|
// Import any files in the drop
|
200
200
|
var numFiles = 0;
|
201
|
-
|
201
|
+
// If we have type text/vnd.tiddlywiki then skip trying to import files
|
202
|
+
if(dataTransfer.files && !$tw.utils.dragEventContainsType(event,"text/vnd.tiddler")) {
|
202
203
|
numFiles = this.wiki.readFiles(dataTransfer.files,{
|
203
204
|
callback: readFileCallback,
|
204
205
|
deserializer: this.dropzoneDeserializer
|
@@ -0,0 +1,96 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/core/modules/widgets/let.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: widget
|
5
|
+
|
6
|
+
This widget allows defining multiple variables at once, while allowing
|
7
|
+
the later variables to depend upon the earlier ones.
|
8
|
+
|
9
|
+
```
|
10
|
+
\define helloworld() Hello world!
|
11
|
+
<$let currentTiddler="target" value={{!!value}} currentTiddler="different">
|
12
|
+
{{!!value}} will be different from <<value>>
|
13
|
+
</$let>
|
14
|
+
```
|
15
|
+
|
16
|
+
\*/
|
17
|
+
(function(){
|
18
|
+
|
19
|
+
/*jslint node: true, browser: true */
|
20
|
+
/*global $tw: false */
|
21
|
+
"use strict";
|
22
|
+
|
23
|
+
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
24
|
+
|
25
|
+
var LetWidget = function(parseTreeNode,options) {
|
26
|
+
// Initialise
|
27
|
+
this.initialise(parseTreeNode,options);
|
28
|
+
};
|
29
|
+
|
30
|
+
/*
|
31
|
+
Inherit from the base widget class
|
32
|
+
*/
|
33
|
+
LetWidget.prototype = new Widget();
|
34
|
+
|
35
|
+
/*
|
36
|
+
Render this widget into the DOM
|
37
|
+
*/
|
38
|
+
LetWidget.prototype.render = function(parent,nextSibling) {
|
39
|
+
this.parentDomNode = parent;
|
40
|
+
this.computeAttributes();
|
41
|
+
this.execute();
|
42
|
+
this.renderChildren(parent,nextSibling);
|
43
|
+
};
|
44
|
+
|
45
|
+
LetWidget.prototype.computeAttributes = function() {
|
46
|
+
// Before computing attributes, we must make clear that none of the
|
47
|
+
// existing attributes are staged for lookup, even on a refresh
|
48
|
+
var changedAttributes = {},
|
49
|
+
self = this;
|
50
|
+
this.currentValueFor = Object.create(null);
|
51
|
+
$tw.utils.each(this.parseTreeNode.orderedAttributes,function(attribute,index) {
|
52
|
+
var value = self.computeAttribute(attribute),
|
53
|
+
name = attribute.name;
|
54
|
+
if(name.charAt(0) !== "$") {
|
55
|
+
// Now that it's prepped, we're allowed to look this variable up
|
56
|
+
// when defining later variables
|
57
|
+
self.currentValueFor[name] = value;
|
58
|
+
}
|
59
|
+
});
|
60
|
+
// Run through again, setting variables and looking for differences
|
61
|
+
$tw.utils.each(this.currentValueFor,function(value,name) {
|
62
|
+
if (self.attributes[name] !== value) {
|
63
|
+
self.attributes[name] = value;
|
64
|
+
self.setVariable(name,value);
|
65
|
+
changedAttributes[name] = true;
|
66
|
+
}
|
67
|
+
});
|
68
|
+
return changedAttributes;
|
69
|
+
};
|
70
|
+
|
71
|
+
LetWidget.prototype.getVariableInfo = function(name,options) {
|
72
|
+
// Special handling: If this variable exists in this very $let, we can
|
73
|
+
// use it, but only if it's been staged.
|
74
|
+
if ($tw.utils.hop(this.currentValueFor,name)) {
|
75
|
+
return {
|
76
|
+
text: this.currentValueFor[name]
|
77
|
+
};
|
78
|
+
}
|
79
|
+
return Widget.prototype.getVariableInfo.call(this,name,options);
|
80
|
+
};
|
81
|
+
|
82
|
+
/*
|
83
|
+
Refresh the widget by ensuring our attributes are up to date
|
84
|
+
*/
|
85
|
+
LetWidget.prototype.refresh = function(changedTiddlers) {
|
86
|
+
var changedAttributes = this.computeAttributes();
|
87
|
+
if($tw.utils.count(changedAttributes) > 0) {
|
88
|
+
this.refreshSelf();
|
89
|
+
return true;
|
90
|
+
}
|
91
|
+
return this.refreshChildren(changedTiddlers);
|
92
|
+
};
|
93
|
+
|
94
|
+
exports["let"] = LetWidget;
|
95
|
+
|
96
|
+
})();
|
@@ -207,7 +207,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|
207
207
|
*/
|
208
208
|
LinkWidget.prototype.refresh = function(changedTiddlers) {
|
209
209
|
var changedAttributes = this.computeAttributes();
|
210
|
-
if(changedAttributes.to || changedTiddlers[this.to] || changedAttributes["aria-label"] || changedAttributes.tooltip
|
210
|
+
if(changedAttributes.to || changedTiddlers[this.to] || changedAttributes["aria-label"] || changedAttributes.tooltip ||
|
211
|
+
changedAttributes["class"] || changedAttributes.tabindex || changedAttributes.draggable || changedAttributes.tag) {
|
211
212
|
this.refreshSelf();
|
212
213
|
return true;
|
213
214
|
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/core/modules/widgets/setmultiplevariables.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: widget
|
5
|
+
|
6
|
+
Widget to set multiple variables at once from a list of names and a list of values
|
7
|
+
|
8
|
+
\*/
|
9
|
+
(function(){
|
10
|
+
|
11
|
+
/*jslint node: true, browser: true */
|
12
|
+
/*global $tw: false */
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
16
|
+
|
17
|
+
var SetMultipleVariablesWidget = function(parseTreeNode,options) {
|
18
|
+
this.initialise(parseTreeNode,options);
|
19
|
+
};
|
20
|
+
|
21
|
+
/*
|
22
|
+
Inherit from the base widget class
|
23
|
+
*/
|
24
|
+
SetMultipleVariablesWidget.prototype = new Widget();
|
25
|
+
|
26
|
+
/*
|
27
|
+
Render this widget into the DOM
|
28
|
+
*/
|
29
|
+
SetMultipleVariablesWidget.prototype.render = function(parent,nextSibling) {
|
30
|
+
this.parentDomNode = parent;
|
31
|
+
this.computeAttributes();
|
32
|
+
this.execute();
|
33
|
+
this.renderChildren(parent,nextSibling);
|
34
|
+
};
|
35
|
+
|
36
|
+
/*
|
37
|
+
Compute the internal state of the widget
|
38
|
+
*/
|
39
|
+
SetMultipleVariablesWidget.prototype.execute = function() {
|
40
|
+
// Setup our variables
|
41
|
+
this.setVariables();
|
42
|
+
// Construct the child widgets
|
43
|
+
this.makeChildWidgets();
|
44
|
+
};
|
45
|
+
|
46
|
+
|
47
|
+
SetMultipleVariablesWidget.prototype.setVariables = function() {
|
48
|
+
// Set the variables
|
49
|
+
var self = this,
|
50
|
+
filterNames = this.getAttribute("$names",""),
|
51
|
+
filterValues = this.getAttribute("$values","");
|
52
|
+
this.variableNames = [];
|
53
|
+
this.variableValues = [];
|
54
|
+
if(filterNames && filterValues) {
|
55
|
+
this.variableNames = this.wiki.filterTiddlers(filterNames,this);
|
56
|
+
this.variableValues = this.wiki.filterTiddlers(filterValues,this);
|
57
|
+
$tw.utils.each(this.variableNames,function(varname,index) {
|
58
|
+
self.setVariable(varname,self.variableValues[index]);
|
59
|
+
});
|
60
|
+
}
|
61
|
+
};
|
62
|
+
|
63
|
+
/*
|
64
|
+
Refresh the widget by ensuring our attributes are up to date
|
65
|
+
*/
|
66
|
+
SetMultipleVariablesWidget.prototype.refresh = function(changedTiddlers) {
|
67
|
+
var filterNames = this.getAttribute("$names",""),
|
68
|
+
filterValues = this.getAttribute("$values",""),
|
69
|
+
variableNames = this.wiki.filterTiddlers(filterNames,this),
|
70
|
+
variableValues = this.wiki.filterTiddlers(filterValues,this);
|
71
|
+
if(!$tw.utils.isArrayEqual(this.variableNames,variableNames) || !$tw.utils.isArrayEqual(this.variableValues,variableValues)) {
|
72
|
+
this.refreshSelf();
|
73
|
+
return true;
|
74
|
+
}
|
75
|
+
return this.refreshChildren(changedTiddlers);
|
76
|
+
};
|
77
|
+
|
78
|
+
exports["setmultiplevariables"] = SetMultipleVariablesWidget;
|
79
|
+
|
80
|
+
})();
|
81
|
+
|
@@ -29,14 +29,12 @@ var VarsWidget = function(parseTreeNode,options) {
|
|
29
29
|
/*
|
30
30
|
Inherit from the base widget class
|
31
31
|
*/
|
32
|
-
VarsWidget.prototype =
|
32
|
+
VarsWidget.prototype = new Widget();
|
33
33
|
|
34
34
|
/*
|
35
35
|
Render this widget into the DOM
|
36
36
|
*/
|
37
37
|
VarsWidget.prototype.render = function(parent,nextSibling) {
|
38
|
-
// Call the constructor
|
39
|
-
Widget.call(this);
|
40
38
|
this.parentDomNode = parent;
|
41
39
|
this.computeAttributes();
|
42
40
|
this.execute();
|
@@ -63,7 +61,7 @@ Refresh the widget by ensuring our attributes are up to date
|
|
63
61
|
*/
|
64
62
|
VarsWidget.prototype.refresh = function(changedTiddlers) {
|
65
63
|
var changedAttributes = this.computeAttributes();
|
66
|
-
if(
|
64
|
+
if($tw.utils.count(changedAttributes) > 0) {
|
67
65
|
this.refreshSelf();
|
68
66
|
return true;
|
69
67
|
}
|
@@ -122,7 +122,7 @@ Widget.prototype.getVariableInfo = function(name,options) {
|
|
122
122
|
});
|
123
123
|
// Only substitute variable references if this variable was defined with the \define pragma
|
124
124
|
if(variable.isMacroDefinition) {
|
125
|
-
value = this.substituteVariableReferences(value);
|
125
|
+
value = this.substituteVariableReferences(value,options);
|
126
126
|
}
|
127
127
|
return {
|
128
128
|
text: value,
|
@@ -175,10 +175,10 @@ Widget.prototype.resolveVariableParameters = function(formalParams,actualParams)
|
|
175
175
|
return results;
|
176
176
|
};
|
177
177
|
|
178
|
-
Widget.prototype.substituteVariableReferences = function(text) {
|
178
|
+
Widget.prototype.substituteVariableReferences = function(text,options) {
|
179
179
|
var self = this;
|
180
180
|
return (text || "").replace(/\$\(([^\)\$]+)\)\$/g,function(match,p1,offset,string) {
|
181
|
-
return self.getVariable(p1,{defaultValue: ""});
|
181
|
+
return options.variables && options.variables[p1] || (self.getVariable(p1,{defaultValue: ""}));
|
182
182
|
});
|
183
183
|
};
|
184
184
|
|
@@ -263,19 +263,9 @@ Compute the current values of the attributes of the widget. Returns a hashmap of
|
|
263
263
|
*/
|
264
264
|
Widget.prototype.computeAttributes = function() {
|
265
265
|
var changedAttributes = {},
|
266
|
-
self = this
|
267
|
-
value;
|
266
|
+
self = this;
|
268
267
|
$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {
|
269
|
-
|
270
|
-
value = self.wiki.filterTiddlers(attribute.filter,self)[0] || "";
|
271
|
-
} else if(attribute.type === "indirect") {
|
272
|
-
value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler"));
|
273
|
-
} else if(attribute.type === "macro") {
|
274
|
-
value = self.getVariable(attribute.value.name,{params: attribute.value.params});
|
275
|
-
} else { // String attribute
|
276
|
-
value = attribute.value;
|
277
|
-
}
|
278
|
-
// Check whether the attribute has changed
|
268
|
+
var value = self.computeAttribute(attribute);
|
279
269
|
if(self.attributes[name] !== value) {
|
280
270
|
self.attributes[name] = value;
|
281
271
|
changedAttributes[name] = true;
|
@@ -284,6 +274,20 @@ Widget.prototype.computeAttributes = function() {
|
|
284
274
|
return changedAttributes;
|
285
275
|
};
|
286
276
|
|
277
|
+
Widget.prototype.computeAttribute = function(attribute) {
|
278
|
+
var value;
|
279
|
+
if(attribute.type === "filtered") {
|
280
|
+
value = this.wiki.filterTiddlers(attribute.filter,this)[0] || "";
|
281
|
+
} else if(attribute.type === "indirect") {
|
282
|
+
value = this.wiki.getTextReference(attribute.textReference,"",this.getVariable("currentTiddler"));
|
283
|
+
} else if(attribute.type === "macro") {
|
284
|
+
value = this.getVariable(attribute.value.name,{params: attribute.value.params});
|
285
|
+
} else { // String attribute
|
286
|
+
value = attribute.value;
|
287
|
+
}
|
288
|
+
return value;
|
289
|
+
};
|
290
|
+
|
287
291
|
/*
|
288
292
|
Check for the presence of an attribute
|
289
293
|
*/
|
@@ -570,7 +574,7 @@ Widget.prototype.invokeActions = function(triggeringWidget,event) {
|
|
570
574
|
for(var t=0; t<this.children.length; t++) {
|
571
575
|
var child = this.children[t],
|
572
576
|
childIsActionWidget = !!child.invokeAction,
|
573
|
-
actionRefreshPolicy = child.getVariable("tv-action-refresh-policy");
|
577
|
+
actionRefreshPolicy = child.getVariable("tv-action-refresh-policy"); // Default is "once"
|
574
578
|
// Refresh the child if required
|
575
579
|
if(childIsActionWidget || actionRefreshPolicy === "always") {
|
576
580
|
child.refreshSelf();
|
package/core/modules/wiki.js
CHANGED
@@ -81,7 +81,7 @@ exports.setText = function(title,field,index,value,options) {
|
|
81
81
|
} else {
|
82
82
|
delete data[index];
|
83
83
|
}
|
84
|
-
this.setTiddlerData(title,data,
|
84
|
+
this.setTiddlerData(title,data,{},{suppressTimestamp: options.suppressTimestamp});
|
85
85
|
} else {
|
86
86
|
var tiddler = this.getTiddler(title),
|
87
87
|
fields = {title: title};
|
@@ -856,19 +856,24 @@ Set a tiddlers content to a JavaScript object. Currently this is done by setting
|
|
856
856
|
title: title of tiddler
|
857
857
|
data: object that can be serialised to JSON
|
858
858
|
fields: optional hashmap of additional tiddler fields to be set
|
859
|
+
options: optional hashmap of options including:
|
860
|
+
suppressTimestamp: if true, don't set the creation/modification timestamps
|
859
861
|
*/
|
860
|
-
exports.setTiddlerData = function(title,data,fields) {
|
862
|
+
exports.setTiddlerData = function(title,data,fields,options) {
|
863
|
+
options = options || {};
|
861
864
|
var existingTiddler = this.getTiddler(title),
|
865
|
+
creationFields = options.suppressTimestamp ? {} : this.getCreationFields(),
|
866
|
+
modificationFields = options.suppressTimestamp ? {} : this.getModificationFields(),
|
862
867
|
newFields = {
|
863
868
|
title: title
|
864
|
-
|
869
|
+
};
|
865
870
|
if(existingTiddler && existingTiddler.fields.type === "application/x-tiddler-dictionary") {
|
866
871
|
newFields.text = $tw.utils.makeTiddlerDictionary(data);
|
867
872
|
} else {
|
868
873
|
newFields.type = "application/json";
|
869
874
|
newFields.text = JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);
|
870
875
|
}
|
871
|
-
this.addTiddler(new $tw.Tiddler(
|
876
|
+
this.addTiddler(new $tw.Tiddler(creationFields,existingTiddler,fields,newFields,modificationFields));
|
872
877
|
};
|
873
878
|
|
874
879
|
/*
|
@@ -1,7 +1,7 @@
|
|
1
1
|
title: $:/core/ui/Components/tag-link
|
2
2
|
|
3
3
|
<$link>
|
4
|
-
<$set name="backgroundColor" value={{
|
4
|
+
<$set name="backgroundColor" value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
5
5
|
<span style=<<tag-styles>> class="tc-tag-label">
|
6
6
|
<$view field="title" format="text"/>
|
7
7
|
</span>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
title: $:/core/ui/ControlPanel/EditTemplateBody
|
2
|
+
tags: $:/tags/ControlPanel/Cascades
|
3
|
+
caption: {{$:/language/ControlPanel/EditTemplateBody/Caption}}
|
4
|
+
|
5
|
+
\define lingo-base() $:/language/ControlPanel/EditTemplateBody/
|
6
|
+
|
7
|
+
<<lingo Hint>>
|
8
|
+
|
9
|
+
{{$:/tags/EditTemplateBodyFilter||$:/snippets/ListTaggedCascade}}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
title: $:/core/ui/ControlPanel/StoryTiddler
|
2
|
+
tags: $:/tags/ControlPanel/Cascades
|
3
|
+
caption: {{$:/language/ControlPanel/StoryTiddler/Caption}}
|
4
|
+
|
5
|
+
\define lingo-base() $:/language/ControlPanel/StoryTiddler/
|
6
|
+
|
7
|
+
<<lingo Hint>>
|
8
|
+
|
9
|
+
{{$:/tags/StoryTiddlerTemplateFilter||$:/snippets/ListTaggedCascade}}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
title: $:/core/ui/ControlPanel/TiddlerColour
|
2
|
+
tags: $:/tags/ControlPanel/Cascades
|
3
|
+
caption: {{$:/language/ControlPanel/TiddlerColour/Caption}}
|
4
|
+
|
5
|
+
\define lingo-base() $:/language/ControlPanel/TiddlerColour/
|
6
|
+
|
7
|
+
<<lingo Hint>>
|
8
|
+
|
9
|
+
{{$:/tags/TiddlerColourFilter||$:/snippets/ListTaggedCascade}}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
title: $:/core/ui/ControlPanel/TiddlerIcon
|
2
|
+
tags: $:/tags/ControlPanel/Cascades
|
3
|
+
caption: {{$:/language/ControlPanel/TiddlerIcon/Caption}}
|
4
|
+
|
5
|
+
\define lingo-base() $:/language/ControlPanel/TiddlerIcon/
|
6
|
+
|
7
|
+
<<lingo Hint>>
|
8
|
+
|
9
|
+
{{$:/tags/TiddlerIconFilter||$:/snippets/ListTaggedCascade}}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
title: $:/core/ui/ControlPanel/ViewTemplateBody
|
2
|
+
tags: $:/tags/ControlPanel/Cascades
|
3
|
+
caption: {{$:/language/ControlPanel/ViewTemplateBody/Caption}}
|
4
|
+
|
5
|
+
\define lingo-base() $:/language/ControlPanel/ViewTemplateBody/
|
6
|
+
|
7
|
+
<<lingo Hint>>
|
8
|
+
|
9
|
+
{{$:/tags/ViewTemplateBodyFilter||$:/snippets/ListTaggedCascade}}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
title: $:/core/ui/ControlPanel/ViewTemplateTitle
|
2
|
+
tags: $:/tags/ControlPanel/Cascades
|
3
|
+
caption: {{$:/language/ControlPanel/ViewTemplateTitle/Caption}}
|
4
|
+
|
5
|
+
\define lingo-base() $:/language/ControlPanel/ViewTemplateTitle/
|
6
|
+
|
7
|
+
<<lingo Hint>>
|
8
|
+
|
9
|
+
{{$:/tags/ViewTemplateTitleFilter||$:/snippets/ListTaggedCascade}}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
title: $:/core/ui/ControlPanel/Cascades
|
2
|
+
tags: $:/tags/ControlPanel/Advanced
|
3
|
+
caption: {{$:/language/ControlPanel/Cascades/Caption}}
|
4
|
+
|
5
|
+
{{$:/language/ControlPanel/Cascades/Hint}}
|
6
|
+
|
7
|
+
<div class="tc-control-panel">
|
8
|
+
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Cascades]!has[draft.of]]" default="$:/core/ui/ControlPanel/StoryTiddler"/>
|
9
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
title: $:/core/ui/EditTemplate/body/canonical-uri
|
2
|
+
|
3
|
+
\define lingo-base() $:/language/EditTemplate/Body/
|
4
|
+
|
5
|
+
<div class="tc-message-box">
|
6
|
+
|
7
|
+
<<lingo External/Hint>>
|
8
|
+
|
9
|
+
<a href={{!!_canonical_uri}}><$text text={{!!_canonical_uri}}/></a>
|
10
|
+
|
11
|
+
<$edit-text field="_canonical_uri" class="tc-edit-fields" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"></$edit-text>
|
12
|
+
|
13
|
+
</div>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
title: $:/core/ui/EditTemplate/body/default
|
2
|
+
|
3
|
+
\define config-visibility-title()
|
4
|
+
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
5
|
+
\end
|
6
|
+
|
7
|
+
\define importFileActions()
|
8
|
+
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
9
|
+
\end
|
10
|
+
|
11
|
+
<$set name="edit-preview-state" value={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}>
|
12
|
+
<$vars importTitle=<<qualify $:/ImportImage>> importState=<<qualify $:/state/ImportImage>> >
|
13
|
+
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> ><$reveal stateTitle=<<edit-preview-state>> type="match" text="yes">
|
14
|
+
<div class="tc-tiddler-preview">
|
15
|
+
|
16
|
+
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
17
|
+
|
18
|
+
<div class="tc-tiddler-preview-preview">
|
19
|
+
|
20
|
+
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">
|
21
|
+
|
22
|
+
<$transclude tiddler="$:/core/ui/EditTemplate/body/preview/output" mode="inline"/>
|
23
|
+
|
24
|
+
</$transclude>
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
</div>
|
29
|
+
</$reveal>
|
30
|
+
|
31
|
+
<$reveal stateTitle=<<edit-preview-state>> type="nomatch" text="yes">
|
32
|
+
|
33
|
+
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
34
|
+
|
35
|
+
</$reveal>
|
36
|
+
</$dropzone>
|
37
|
+
</$vars>
|
38
|
+
</$set>
|