1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-05 19:53:17 +00:00
Commit Graph

141 Commits

Author SHA1 Message Date
Rizwan
2b0204422d Sortan filter for alpha-numeric filter (#3134)
* Sortan filter for alpha-numeric filter

* Removing Case sensitive option, Removing default value for isAlphanumeric parameter, updating formatting

* Formatting changes

* Formatting changes
2018-03-05 11:09:25 +00:00
Skeeve
5963adf92e Bugfix/3117 inconsistent each (#3124)
* Following Jeremy's proposal of using a new suffix

* typo fixed
2018-02-17 18:51:18 +00:00
Jermolene
e4b10d42f9 Optimise the tag filter
Spending a bit more time with Chrome dev tools, and further to 254e1ca, this optimisation reduces the rendering time for the sample TOC from 1.9s to about 0.9s...
2017-12-21 16:13:47 +00:00
Jermolene
d7a6816307 Add jsonstringify operator 2017-10-29 15:53:53 +00:00
Jermolene
aa417fe899 Add new "lookup" filter 2017-09-07 15:48:00 +01:00
Xavier Cazin
a7b57d7f97 allbefore:include should be the identity function when applied to 1st item (#2842)
* fr-FR translation of additional error strings

* allbefore:include should be the identity function when applied to the 1st item
2017-06-29 18:02:33 +01:00
Jermolene
f4656b0f25 Add support dragging to the bottom of a list 2017-03-20 22:02:55 +00:00
Jermolene
eba1c3c160 Improve support for drag and drop
Documentation TBD
2017-03-19 19:33:56 +00:00
Jermolene
ad1c2a6571 Fix problem with 'has' operator
Fixes problem introduced in 6085936475
2017-02-23 14:27:43 +00:00
Tobias Beer
6085936475 Introduce "field" suffix for "has" filter operator (#2066)
* has:field — tested & documented

allows to test whether a field exists

* fixed inverted condition

* added from version to docs
2017-02-22 12:13:59 +00:00
Jermolene
cd2bc88658 Add "enlist" operator
Fixes #2767
2017-02-21 15:17:47 +00:00
Jermolene
9fc2086b71 Optimise sameday filter
I used this test:

console.time();for(var t=0; t<200; t++)
{$tw.wiki.filterTiddlers("[all[tiddlers+shadows]sameday[20170210]]");};c
onsole.timeEnd()

Before this patch, I got speeds of approx 190ms, versus 140ms
afterwards.

Note that the ability to add a cache property like this is only
possible because tiddler objects are immutable.
2017-02-21 08:31:05 +00:00
Jermolene
73ded6a82a Add new "count" filter operator
See discussion here:
https://groups.google.com/d/msgid/tiddlywiki/fe51b7f5-5369-493b-82e5-94c
18e863fe0%40googlegroups.com?utm_medium=email&utm_source=footer
2017-02-08 20:11:44 +00:00
Matt Lauber
9c3a6976f0 #2312 Prevent move filter from wrapping (#2658)
given a list `A B C D` if I run `A B C D +[move:-1 [A]]` I get `B C A D`.  However, if I were to do `A B C D +[move:1[D]]` it doesn't wrap around, and I get `A B C D`.  This fixes that such that `A B C D +[move:-1 [A]]` gives 'A B C D`
2016-12-16 17:58:45 +00:00
Jermolene
9a38642141 Add new "order" filter operator 2016-11-28 19:16:08 +00:00
Jermolene
a3dc3b4b98 Add new [all[tags]] filter operator 2016-11-28 19:04:04 +00:00
Jermolene
c65d08240b Add strict mode to tag operator 2016-11-28 13:42:30 +00:00
Jermolene
c460cc03a4 Change "is" filter with blank operand to pass through arguments 2016-11-28 13:42:06 +00:00
Jeremy Ruston
a9b54d6fce Revert "Add provisional version of new tagger manager" 2016-11-28 10:40:55 +00:00
Jermolene
8e033eb0d4 Add new "all[tags]" filter operator 2016-11-27 14:52:04 +00:00
Jermolene
0b4669621a Return all tiddlers when "is" filter operand is missing 2016-11-27 14:51:51 +00:00
Jermolene
e98d324e66 Add provisional version of new tagger manager
For discussion
2016-11-26 12:48:47 +00:00
Jermolene
b4b77d1681 Add new filter operators for various string encoding/decodings 2016-10-18 09:18:32 +01:00
Jermolene
ffcbcbfa82 Add new 'minlength' operator
Fixes #1493
2016-10-11 09:26:20 +01:00
Tobias Beer
f575389d89 Update wikiparserrules operator for no operand (#2193)
* return all wikiparserrules w/o operand

* simpler layout & code / updated instruction details

Also wanted to link each rule to the official docs using a dictionary at
`$:/language/Docs/ParserRules/`. However, without #2194 this is not
doable.
2016-10-08 13:04:11 +01:00
Myeongjin
6388f859d1 Add localisable strings for error (#2447)
* Add localisable strings for error

* Update tiddler Transclusion Basic Usage in fr-FR
2016-05-17 21:58:47 +01:00
nameanyone
19ee5bcf4e "days" filter: yesterday and tomorrow edge cases (#2364)
* Change the negation logic to address an edge case

Make it possible to get an interval ending with yesterday or starting with tomorrow.

* "days" filter: adjust documentation
2016-04-27 17:23:46 +01:00
Matt Lauber
899c5cb835 Update has.js 2016-02-18 11:51:29 -05:00
Matt Lauber
5a14b37686 Update to check if empty sting OR (is array AND is empty) 2016-02-16 08:08:09 -05:00
Matt Lauber
22145e2e51 Fix for #2274
List fields (such as tags) when evaluated to produce tiddlers result in empty arrays.  Using the exact not equals, an empty array is not the same as an empty string.  By using equivelent not equals, we state that the field is either != "" or anything that can be coerced to "".  Which, based on https://dorey.github.io/JavaScript-Equality-Table/ is `false` `0` `[]` or `[[]]`` neither `false` nor `0` can be set as a tiddler field as both will end up being quoted (`"false"`, `"0"`) so this should work.
2016-02-15 08:31:23 -05:00
William Jackson
48987e186a Tidied up the code in the filters 2015-12-28 10:31:39 +02:00
Jermolene
57ceffd67c Merge #1909 from @nameanyone 2015-12-23 12:19:47 +00:00
Jeremy Ruston
da36f1c728 Merge pull request #2037 from matabele/Listops
ActionListopsWidget
2015-12-06 19:04:26 +00:00
Tobias Beer
ef3e44eb48 rename suffix each:list to each_list-item
based on #1422, improves readability of the filter expression

tests passed
2015-11-13 11:07:24 +01:00
William Jackson
befb13dde1 Update x-listops.js
Change default suffix for append[], prepend[] and remove[] operators from 1 to All
2015-11-08 09:49:07 +02:00
William Jackson
817882a404 Update x-listops.js
Added prefix and suffix options to 'append' and 'prepend' operators
2015-10-27 10:17:07 +02:00
William Jackson
3e445b8853 Update x-listops.js
Corrected the logic of the 'allafter' filter and added a new 'move' filter.
2015-10-22 16:40:36 +02:00
William Jackson
49894abaf4 Create x-listops.js
These filters are designed to be used with the action-listops widget.
2015-10-18 18:37:08 +02:00
Tobias Beer
b34e4f628d adopted style recommendations 2015-10-08 14:21:57 +02:00
Tobias Beer
32c41479cc using variable declaration for readability 2015-10-08 14:18:55 +02:00
Tobias Beer
95eb8810b6 removed pushOnce 2015-10-08 14:07:12 +02:00
Tobias Beer
91b5547cdf adopted style recommendations 2015-10-08 14:07:08 +02:00
Tobias Beer
d0a24bd9f0 added $tw.utils.pushOnce
retained check for basic each nonetheless

tests pass
2015-10-08 14:07:06 +02:00
Tobias Beer
f684a6beb0 fixed helper function and added tests
tests: ok
2015-10-08 14:07:00 +02:00
Tobias Beer
a88ead9c0f removed conditional from iterator
I'd really like to see a profiler run against the two to see the
performance impact of one over the other
2015-10-08 14:06:57 +02:00
Tobias Beer
c3cbbc3f66 renamed value to items 2015-10-08 14:06:54 +02:00
Tobias Beer
f9464dfaf8 using variable declaration for readability 2015-10-08 14:06:51 +02:00
Tobias Beer
baca2703f1 added list suffix for each filter
implements #1369

when the suffix is `list`, interprets the field as a list of individual
tiddler titles and returns all titles referenced in the list field of
the source list, existing or not
2015-10-08 14:06:48 +02:00
Jermolene
d5e690a06d First pass at global disabling of parser rules
This is to address #1875 more quickly than via #345.

This commit only includes a partial implementation of the UI - see the
ticket for details.
2015-07-30 12:28:29 +01:00
Jermolene
32f6d7f1b0 Revert getTiddlerData() and add getTiddlerDataCached()
For backwards compatibility, we now explicitly request the cacheable
version of this method.

Fixes #1873
2015-07-10 16:43:50 +01:00