mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 10:54:46 +00:00
Compare commits
132 Commits
custom-cop
...
fix-typing
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b034587390 | ||
|
|
3372eb3ba6 | ||
|
|
b878feca59 | ||
|
|
5758d0b313 | ||
|
|
753b289ba9 | ||
|
|
ad5661ef1c | ||
|
|
bc18bd9261 | ||
|
|
5aa889859a | ||
|
|
eb6f3a423a | ||
|
|
25edf0e212 | ||
|
|
eeeb9f97a9 | ||
|
|
8f1792df20 | ||
|
|
e19f86482a | ||
|
|
53924de313 | ||
|
|
d2c2ada33c | ||
|
|
b906515c69 | ||
|
|
8928b6e603 | ||
|
|
73163386c1 | ||
|
|
32c75cbb68 | ||
|
|
b60abadf33 | ||
|
|
a9b6de8c35 | ||
|
|
84d1c81bb2 | ||
|
|
c25b8e3056 | ||
|
|
b81a1f22fe | ||
|
|
703edd154c | ||
|
|
64e6a9a946 | ||
|
|
068b76b07d | ||
|
|
f060ba75ff | ||
|
|
7beaddb293 | ||
|
|
1937789ee2 | ||
|
|
2f2806c00c | ||
|
|
87adbe0b14 | ||
|
|
6554b5c9f4 | ||
|
|
c93d4c52fc | ||
|
|
f3b129c245 | ||
|
|
74c9e4465d | ||
|
|
0f4bc93a7e | ||
|
|
05bff57b65 | ||
|
|
0dcf7e91bf | ||
|
|
f50c2a2e64 | ||
|
|
a42dad6a5c | ||
|
|
cff685ea11 | ||
|
|
791c7fac63 | ||
|
|
b90c3841c9 | ||
|
|
a5e05e4eec | ||
|
|
05792a9de3 | ||
|
|
1c1f0ff4e8 | ||
|
|
d253503335 | ||
|
|
a16dab9710 | ||
|
|
18152aa7c8 | ||
|
|
f15b6a26da | ||
|
|
5d06b922d3 | ||
|
|
0031a95dfe | ||
|
|
eecd40723e | ||
|
|
5b9f4751ea | ||
|
|
b6cf098c5f | ||
|
|
5c63262feb | ||
|
|
3b88f0e741 | ||
|
|
b49ecf886b | ||
|
|
02ccec7ea8 | ||
|
|
14c5628d35 | ||
|
|
4bd3576432 | ||
|
|
756ef697dd | ||
|
|
11f562a918 | ||
|
|
083489102e | ||
|
|
cd8c483f67 | ||
|
|
c8cbf6853e | ||
|
|
153b66e4ee | ||
|
|
93c9323d0f | ||
|
|
4cd66697ad | ||
|
|
741aef55e4 | ||
|
|
8eb08820ac | ||
|
|
4ca883fd9b | ||
|
|
2f4c21e374 | ||
|
|
6239384e7b | ||
|
|
ead36cf329 | ||
|
|
cdd3f4b6a2 | ||
|
|
fdb86e7881 | ||
|
|
b4ac1e6b35 | ||
|
|
91e0b2afb6 | ||
|
|
2d5b935b1c | ||
|
|
177ba4b56e | ||
|
|
6f248bf5b5 | ||
|
|
4bda8cfee6 | ||
|
|
93d32d59aa | ||
|
|
e30746d5e5 | ||
|
|
3e1d8fa598 | ||
|
|
32cbc97a0c | ||
|
|
d276e0aa25 | ||
|
|
3243adc3a5 | ||
|
|
bf9865af20 | ||
|
|
08c7a8805b | ||
|
|
12c551ef05 | ||
|
|
a67c0e1399 | ||
|
|
7ec8334005 | ||
|
|
1a57d08feb | ||
|
|
5db3eeeaa2 | ||
|
|
e4c682d04b | ||
|
|
240496d85c | ||
|
|
78ace99685 | ||
|
|
3ddd10d373 | ||
|
|
6833ccdb97 | ||
|
|
36a9e3f54e | ||
|
|
789d64f768 | ||
|
|
25ec52b912 | ||
|
|
4be81b2bf4 | ||
|
|
423075e89d | ||
|
|
51ad11401b | ||
|
|
352272905e | ||
|
|
eb15dc8408 | ||
|
|
33bc77f46f | ||
|
|
4860b14315 | ||
|
|
913d15dc53 | ||
|
|
9e1babdf82 | ||
|
|
ea173ec83d | ||
|
|
40801f3c29 | ||
|
|
312b3b2037 | ||
|
|
f8ae96118a | ||
|
|
7337b6da63 | ||
|
|
416c6ee0d4 | ||
|
|
743bc4933f | ||
|
|
4055501f71 | ||
|
|
ac855b0065 | ||
|
|
7a50b2b554 | ||
|
|
65d9384261 | ||
|
|
da8d4ecfae | ||
|
|
6a84ae332d | ||
|
|
e35793bc38 | ||
|
|
3af2a0ae6f | ||
|
|
f3614c1e47 | ||
|
|
78fb4a2c1d | ||
|
|
3e27093c94 |
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.3.3
|
||||
TW5_BUILD_VERSION=v5.3.5
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
@@ -393,6 +393,17 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/highlight/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# /plugins/tiddlywiki/geospatial/index.html Demo wiki with geospatial plugin
|
||||
# /plugins/tiddlywiki/geospatial/empty.html Empty wiki with geospatial plugin
|
||||
node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/geospatialdemo \
|
||||
--verbose \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/geospatial/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/geospatial/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
######################################################
|
||||
#
|
||||
# Language editions
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
title: $:/boot/boot.css
|
||||
type: text/css
|
||||
|
||||
/*
|
||||
Basic styles used before we boot up the parsing engine
|
||||
*/
|
||||
@@ -25,11 +25,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"file": "boot.css",
|
||||
"fields": {
|
||||
"title": "$:/boot/boot.css",
|
||||
"type": "text/css"
|
||||
}
|
||||
"file": "boot.css.tid",
|
||||
"isTiddlerFile": true
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
5
core/images/input-button.tid
Normal file
5
core/images/input-button.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/images/input-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
\parameters (size:"22pt")
|
||||
<svg width=<<size>> height=<<size>> class="tc-image-input-button tc-image-button" viewBox="0 0 22 22"><path d="M1.375 22h19.249c.365 0 .716-.145.973-.404v.001c.258-.257.404-.607.403-.972v-11a1.376 1.376 0 0 0-2.75 0v9.625H2.75V9.625a1.376 1.376 0 0 0-2.75 0v11C0 21.384.617 22 1.375 22Z"/><path d="m9.732 11.904-1.541-1.541a1.375 1.375 0 1 0-1.944 1.944l3.887 3.888c.258.258.608.402.973.402h-.001c.353 0 .705-.134.974-.402l3.888-3.889a1.376 1.376 0 0 0 .001-1.944 1.377 1.377 0 0 0-1.946 0l-1.541 1.542V1.376a1.375 1.375 0 1 0-2.75 0v10.528Z"/></svg>
|
||||
@@ -1,7 +1,7 @@
|
||||
title: $:/core/images/default-layout
|
||||
title: $:/core/images/standard-layout
|
||||
tags: $:/tags/Image
|
||||
|
||||
\parameters (size:"22pt")
|
||||
<svg width=<<size>> height=<<size>> class="tc-image-default-layout tc-image-button" viewBox="0 0 128 128">
|
||||
<svg width=<<size>> height=<<size>> class="tc-image-standard-layout tc-image-button" viewBox="0 0 128 128">
|
||||
<path d="M71.93 72A8.07 8.07 0 0 1 80 80.07v7.86A8.071 8.071 0 0 1 71.93 96H8.07A8.067 8.067 0 0 1 0 87.93v-7.86A8.072 8.072 0 0 1 8.07 72h63.86Zm0 32a8.07 8.07 0 0 1 8.07 8.07v7.86a8.071 8.071 0 0 1-8.07 8.07H8.07A8.067 8.067 0 0 1 0 119.93v-7.86A8.072 8.072 0 0 1 8.07 104h63.86Zm0-104A8.068 8.068 0 0 1 80 8.07v47.86A8.073 8.073 0 0 1 71.93 64H8.07A8.07 8.07 0 0 1 0 55.93V8.07A8.072 8.072 0 0 1 8.07 0h63.86Zm48 0c2.14 0 4.193.85 5.706 2.364A8.067 8.067 0 0 1 128 8.07v111.86c0 2.14-.85 4.193-2.364 5.706A8.067 8.067 0 0 1 119.93 128H96.07c-2.14 0-4.193-.85-5.706-2.364A8.067 8.067 0 0 1 88 119.93V8.07c0-2.14.85-4.193 2.364-5.706A8.067 8.067 0 0 1 96.07 0h23.86ZM116 24h-16a3.995 3.995 0 0 0-2.828 1.172 3.995 3.995 0 0 0 0 5.656A3.995 3.995 0 0 0 100 32h16a3.995 3.995 0 0 0 2.828-1.172 3.995 3.995 0 0 0 0-5.656A3.995 3.995 0 0 0 116 24Z"/>
|
||||
</svg>
|
||||
@@ -104,6 +104,8 @@ ShowSideBar/Caption: show sidebar
|
||||
ShowSideBar/Hint: Show sidebar
|
||||
TagManager/Caption: tag manager
|
||||
TagManager/Hint: Open tag manager
|
||||
TestCaseImport/Caption: import tiddlers
|
||||
TestCaseImport/Hint: Import tiddlers
|
||||
Timestamp/Caption: timestamps
|
||||
Timestamp/Hint: Choose whether modifications update timestamps
|
||||
Timestamp/On/Caption: timestamps are on
|
||||
|
||||
@@ -65,6 +65,10 @@ sidebar-tab-foreground-selected: Sidebar tab foreground for selected tabs
|
||||
sidebar-tab-foreground: Sidebar tab foreground
|
||||
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
|
||||
sidebar-tiddler-link-foreground: Sidebar tiddler link foreground
|
||||
stability-stable: Badge for stability level "stable"
|
||||
stability-experimental: Badge for stability level "experimental"
|
||||
stability-deprecated: Badge for stability level "deprecated"
|
||||
stability-legacy: Badge for stability level "legacy"
|
||||
testcase-accent-level-1: Test case accent colour with no nesting
|
||||
testcase-accent-level-2: Test case accent colour with 2nd level nesting
|
||||
testcase-accent-level-3: Test case accent colour with 3rd level nesting or higher
|
||||
|
||||
@@ -70,7 +70,7 @@ No: No
|
||||
OfficialPluginLibrary: Official ~TiddlyWiki Plugin Library
|
||||
OfficialPluginLibrary/Hint: The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
PageTemplate/Description: the default ~TiddlyWiki layout
|
||||
PageTemplate/Name: Default ~PageTemplate
|
||||
PageTemplate/Name: Standard Layout
|
||||
PluginReloadWarning: Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to ~JavaScript plugins to take effect
|
||||
RecentChanges/DateFormat: DDth MMM YYYY
|
||||
Shortcuts/Input/AdvancedSearch/Hint: Open the ~AdvancedSearch panel from within the sidebar search field
|
||||
|
||||
@@ -16,11 +16,11 @@ Filter operator for returning all the backtranscludes from a tiddler
|
||||
Export our filter function
|
||||
*/
|
||||
exports.backtranscludes = function(source,operator,options) {
|
||||
var results = [];
|
||||
var results = new $tw.utils.LinkedList();
|
||||
source(function(tiddler,title) {
|
||||
$tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title));
|
||||
results.pushTop(options.wiki.getTiddlerBacktranscludes(title));
|
||||
});
|
||||
return results;
|
||||
return results.makeTiddlerIterator(options.wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -127,7 +127,7 @@ function diffPartsToChars(text1,text2,mode) {
|
||||
if(lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) : (lineHash[line] !== undefined)) {
|
||||
chars += String.fromCharCode(lineHash[line]);
|
||||
} else {
|
||||
if (lineArrayLength == maxLines) {
|
||||
if(lineArrayLength == maxLines) {
|
||||
line = text.substring(lineStart);
|
||||
lineEnd = text.length;
|
||||
}
|
||||
@@ -217,7 +217,10 @@ exports.splitregexp = function(source,operator,options) {
|
||||
return ["RegExp error: " + ex];
|
||||
}
|
||||
source(function(tiddler,title) {
|
||||
Array.prototype.push.apply(result,title.split(regExp));
|
||||
var parts = title.split(regExp).map(function(part){
|
||||
return part || ""; // make sure it's a string
|
||||
});
|
||||
Array.prototype.push.apply(result,parts);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
@@ -264,7 +267,7 @@ exports.pad = function(source,operator,options) {
|
||||
} else {
|
||||
var padString = "",
|
||||
padStringLength = targetLength - title.length;
|
||||
while (padStringLength > padString.length) {
|
||||
while(padStringLength > padString.length) {
|
||||
padString += fill;
|
||||
}
|
||||
//make sure we do not exceed the specified length
|
||||
|
||||
@@ -20,7 +20,7 @@ exports.transcludes = function(source,operator,options) {
|
||||
source(function(tiddler,title) {
|
||||
results.pushTop(options.wiki.getTiddlerTranscludes(title));
|
||||
});
|
||||
return results.toArray();
|
||||
return results.makeTiddlerIterator(options.wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -75,7 +75,7 @@ BackSubIndexer.prototype._getTarget = function(tiddler) {
|
||||
}
|
||||
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
|
||||
if(parser) {
|
||||
return this.wiki[this.extractor](parser.tree);
|
||||
return this.wiki[this.extractor](parser.tree, tiddler.fields.title);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ exports.parseStringLiteral = function(source,pos) {
|
||||
var match = reString.exec(source);
|
||||
if(match && match.index === pos) {
|
||||
node.value = match[1] !== undefined ? match[1] :(
|
||||
match[2] !== undefined ? match[2] : match[3]
|
||||
match[2] !== undefined ? match[2] : match[3]
|
||||
);
|
||||
node.end = pos + match[0].length;
|
||||
return node;
|
||||
|
||||
@@ -29,13 +29,16 @@ exports.init = function(parser) {
|
||||
|
||||
exports.parse = function() {
|
||||
var reEnd = /(\r?\n```$)/mg;
|
||||
var languageStart = this.parser.pos + 3,
|
||||
languageEnd = languageStart + this.match[1].length;
|
||||
// Move past the match
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
|
||||
// Look for the end of the block
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
var match = reEnd.exec(this.parser.source),
|
||||
text;
|
||||
text,
|
||||
codeStart = this.parser.pos;
|
||||
// Process the block
|
||||
if(match) {
|
||||
text = this.parser.source.substring(this.parser.pos,match.index);
|
||||
@@ -48,8 +51,8 @@ exports.parse = function() {
|
||||
return [{
|
||||
type: "codeblock",
|
||||
attributes: {
|
||||
code: {type: "string", value: text},
|
||||
language: {type: "string", value: this.match[1]}
|
||||
code: {type: "string", value: text, start: codeStart, end: this.parser.pos},
|
||||
language: {type: "string", value: this.match[1], start: languageStart, end: languageEnd}
|
||||
}
|
||||
}];
|
||||
};
|
||||
|
||||
@@ -33,7 +33,8 @@ exports.parse = function() {
|
||||
// Look for the end marker
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
var match = reEnd.exec(this.parser.source),
|
||||
text;
|
||||
text,
|
||||
start = this.parser.pos;
|
||||
// Process the text
|
||||
if(match) {
|
||||
text = this.parser.source.substring(this.parser.pos,match.index);
|
||||
@@ -47,7 +48,9 @@ exports.parse = function() {
|
||||
tag: "code",
|
||||
children: [{
|
||||
type: "text",
|
||||
text: text
|
||||
text: text,
|
||||
start: start,
|
||||
end: this.parser.pos
|
||||
}]
|
||||
}];
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@ exports.init = function(parser) {
|
||||
|
||||
exports.parse = function() {
|
||||
// Move past the match
|
||||
var start = this.parser.pos;
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Create the link unless it is suppressed
|
||||
if(this.match[0].substr(0,1) === "~") {
|
||||
@@ -46,7 +47,7 @@ exports.parse = function() {
|
||||
rel: {type: "string", value: "noopener noreferrer"}
|
||||
},
|
||||
children: [{
|
||||
type: "text", text: this.match[0]
|
||||
type: "text", text: this.match[0], start: start, end: this.parser.pos
|
||||
}]
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -31,6 +31,16 @@ exports.init = function(parser) {
|
||||
|
||||
exports.parse = function() {
|
||||
// Move past the match
|
||||
var filterStart = this.parser.pos + 3;
|
||||
var filterEnd = filterStart + this.match[1].length;
|
||||
var toolTipStart = filterEnd + 1;
|
||||
var toolTipEnd = toolTipStart + (this.match[2] ? this.match[2].length : 0);
|
||||
var templateStart = toolTipEnd + 2;
|
||||
var templateEnd = templateStart + (this.match[3] ? this.match[3].length : 0);
|
||||
var styleStart = templateEnd + 2;
|
||||
var styleEnd = styleStart + (this.match[4] ? this.match[4].length : 0);
|
||||
var classesStart = styleEnd + 1;
|
||||
var classesEnd = classesStart + (this.match[5] ? this.match[5].length : 0);
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Get the match details
|
||||
var filter = this.match[1],
|
||||
@@ -42,21 +52,21 @@ exports.parse = function() {
|
||||
var node = {
|
||||
type: "list",
|
||||
attributes: {
|
||||
filter: {type: "string", value: filter}
|
||||
filter: {type: "string", value: filter, start: filterStart, end: filterEnd},
|
||||
},
|
||||
isBlock: true
|
||||
};
|
||||
if(tooltip) {
|
||||
node.attributes.tooltip = {type: "string", value: tooltip};
|
||||
node.attributes.tooltip = {type: "string", value: tooltip, start: toolTipStart, end: toolTipEnd};
|
||||
}
|
||||
if(template) {
|
||||
node.attributes.template = {type: "string", value: template};
|
||||
node.attributes.template = {type: "string", value: template, start: templateStart, end: templateEnd};
|
||||
}
|
||||
if(style) {
|
||||
node.attributes.style = {type: "string", value: style};
|
||||
node.attributes.style = {type: "string", value: style, start: styleStart, end: styleEnd};
|
||||
}
|
||||
if(classes) {
|
||||
node.attributes.itemClass = {type: "string", value: classes.split(".").join(" ")};
|
||||
node.attributes.itemClass = {type: "string", value: classes.split(".").join(" "), start: classesStart, end: classesEnd};
|
||||
}
|
||||
return [node];
|
||||
};
|
||||
|
||||
@@ -30,6 +30,16 @@ exports.init = function(parser) {
|
||||
};
|
||||
|
||||
exports.parse = function() {
|
||||
var filterStart = this.parser.pos + 3;
|
||||
var filterEnd = filterStart + this.match[1].length;
|
||||
var toolTipStart = filterEnd + 1;
|
||||
var toolTipEnd = toolTipStart + (this.match[2] ? this.match[2].length : 0);
|
||||
var templateStart = toolTipEnd + 2;
|
||||
var templateEnd = templateStart + (this.match[3] ? this.match[3].length : 0);
|
||||
var styleStart = templateEnd + 2;
|
||||
var styleEnd = styleStart + (this.match[4] ? this.match[4].length : 0);
|
||||
var classesStart = styleEnd + 1;
|
||||
var classesEnd = classesStart + (this.match[5] ? this.match[5].length : 0);
|
||||
// Move past the match
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Get the match details
|
||||
@@ -42,20 +52,20 @@ exports.parse = function() {
|
||||
var node = {
|
||||
type: "list",
|
||||
attributes: {
|
||||
filter: {type: "string", value: filter}
|
||||
filter: {type: "string", value: filter, start: filterStart, end: filterEnd},
|
||||
}
|
||||
};
|
||||
if(tooltip) {
|
||||
node.attributes.tooltip = {type: "string", value: tooltip};
|
||||
node.attributes.tooltip = {type: "string", value: tooltip, start: toolTipStart, end: toolTipEnd};
|
||||
}
|
||||
if(template) {
|
||||
node.attributes.template = {type: "string", value: template};
|
||||
node.attributes.template = {type: "string", value: template, start: templateStart, end: templateEnd};
|
||||
}
|
||||
if(style) {
|
||||
node.attributes.style = {type: "string", value: style};
|
||||
node.attributes.style = {type: "string", value: style, start: styleStart, end: styleEnd};
|
||||
}
|
||||
if(classes) {
|
||||
node.attributes.itemClass = {type: "string", value: classes.split(".").join(" ")};
|
||||
node.attributes.itemClass = {type: "string", value: classes.split(".").join(" "), start: classesStart, end: classesEnd};
|
||||
}
|
||||
return [node];
|
||||
};
|
||||
|
||||
@@ -45,10 +45,11 @@ exports.parse = function() {
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
match = reEnd.exec(this.parser.source);
|
||||
if(match) {
|
||||
var start = this.parser.pos;
|
||||
this.parser.pos = reEnd.lastIndex;
|
||||
// Add a line break if the terminator was a line break
|
||||
if(match[2]) {
|
||||
tree.push({type: "element", tag: "br"});
|
||||
tree.push({type: "element", tag: "br", start: start, end: this.parser.pos});
|
||||
}
|
||||
}
|
||||
} while(match && !match[1]);
|
||||
|
||||
@@ -30,15 +30,17 @@ exports.parse = function() {
|
||||
// Move past the !s
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Parse any classes, whitespace and then the heading itself
|
||||
var classStart = this.parser.pos;
|
||||
var classes = this.parser.parseClasses();
|
||||
var classEnd = this.parser.pos;
|
||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||
var tree = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||
// Return the heading
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "h" + headingLevel,
|
||||
tag: "h" + headingLevel,
|
||||
attributes: {
|
||||
"class": {type: "string", value: classes.join(" ")}
|
||||
"class": {type: "string", value: classes.join(" "), start: classStart, end: classEnd}
|
||||
},
|
||||
children: tree
|
||||
}];
|
||||
|
||||
@@ -44,6 +44,10 @@ Parse the most recent match
|
||||
exports.parse = function() {
|
||||
// Retrieve the most recent match so that recursive calls don't overwrite it
|
||||
var tag = this.nextTag;
|
||||
if (!tag.isSelfClosing) {
|
||||
tag.openTagStart = tag.start;
|
||||
tag.openTagEnd = tag.end;
|
||||
}
|
||||
this.nextTag = null;
|
||||
// Advance the parser position to past the tag
|
||||
this.parser.pos = tag.end;
|
||||
@@ -60,6 +64,27 @@ exports.parse = function() {
|
||||
var reEnd = new RegExp("(" + reEndString + ")","mg");
|
||||
tag.children = this.parser.parseInlineRun(reEnd,{eatTerminator: true});
|
||||
}
|
||||
tag.end = this.parser.pos;
|
||||
tag.closeTagEnd = tag.end;
|
||||
if (tag.closeTagEnd === tag.openTagEnd || this.parser.source[tag.closeTagEnd - 1] !== '>') {
|
||||
tag.closeTagStart = tag.end;
|
||||
} else {
|
||||
tag.closeTagStart = tag.closeTagEnd - 2;
|
||||
var closeTagMinPos = tag.children.length > 0 ? tag.children[tag.children.length-1].end : tag.openTagEnd;
|
||||
if (!Number.isSafeInteger(closeTagMinPos)) closeTagMinPos = tag.openTagEnd;
|
||||
while (tag.closeTagStart >= closeTagMinPos) {
|
||||
var char = this.parser.source[tag.closeTagStart];
|
||||
if (char === '>') {
|
||||
tag.closeTagStart = -1;
|
||||
break;
|
||||
}
|
||||
if (char === '<') break;
|
||||
tag.closeTagStart -= 1;
|
||||
}
|
||||
if (tag.closeTagStart < closeTagMinPos) {
|
||||
tag.closeTagStart = tag.end;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Return the tag
|
||||
return [tag];
|
||||
|
||||
@@ -122,9 +122,9 @@ exports.parseImage = function(source,pos) {
|
||||
}
|
||||
pos = token.end;
|
||||
if(token.match[1]) {
|
||||
node.attributes.tooltip = {type: "string", value: token.match[1].trim()};
|
||||
node.attributes.tooltip = {type: "string", value: token.match[1].trim(),start: token.start,end:token.start + token.match[1].length - 1};
|
||||
}
|
||||
node.attributes.source = {type: "string", value: (token.match[2] || "").trim()};
|
||||
node.attributes.source = {type: "string", value: (token.match[2] || "").trim(), start: token.start + (token.match[1] ? token.match[1].length : 0), end: token.end - 2};
|
||||
// Update the end position
|
||||
node.end = pos;
|
||||
return node;
|
||||
|
||||
@@ -38,13 +38,14 @@ exports.parse = function() {
|
||||
// Parse the filter terminated by a line break
|
||||
var reMatch = /(.*)(?:$|\r?\n)/mg;
|
||||
reMatch.lastIndex = this.parser.pos;
|
||||
var filterStart = this.parser.source;
|
||||
var match = reMatch.exec(this.parser.source);
|
||||
this.parser.pos = reMatch.lastIndex;
|
||||
// Parse tree nodes to return
|
||||
return [{
|
||||
type: "importvariables",
|
||||
attributes: {
|
||||
filter: {type: "string", value: match[1]}
|
||||
filter: {type: "string", value: match[1], start: filterStart, end: this.parser.pos}
|
||||
},
|
||||
children: []
|
||||
}];
|
||||
|
||||
@@ -74,6 +74,7 @@ exports.parse = function() {
|
||||
// Match the list marker
|
||||
var reMatch = /([\*#;:>]+)/mg;
|
||||
reMatch.lastIndex = this.parser.pos;
|
||||
var start = this.parser.pos;
|
||||
var match = reMatch.exec(this.parser.source);
|
||||
if(!match || match.index !== this.parser.pos) {
|
||||
break;
|
||||
@@ -94,9 +95,21 @@ exports.parse = function() {
|
||||
}
|
||||
// Construct the list element or reuse the previous one at this level
|
||||
if(listStack.length <= t) {
|
||||
var listElement = {type: "element", tag: listInfo.listTag, children: [
|
||||
{type: "element", tag: listInfo.itemTag, children: []}
|
||||
]};
|
||||
var listElement = {
|
||||
type: "element",
|
||||
tag: listInfo.listTag,
|
||||
children: [
|
||||
{
|
||||
type: "element",
|
||||
tag: listInfo.itemTag,
|
||||
children: [],
|
||||
start: start,
|
||||
end: this.parser.pos,
|
||||
}
|
||||
],
|
||||
start: start,
|
||||
end: this.parser.pos,
|
||||
};
|
||||
// Link this list element into the last child item of the parent list item
|
||||
if(t) {
|
||||
var prevListItem = listStack[t-1].children[listStack[t-1].children.length-1];
|
||||
@@ -105,21 +118,33 @@ exports.parse = function() {
|
||||
// Save this element in the stack
|
||||
listStack[t] = listElement;
|
||||
} else if(t === (match[0].length - 1)) {
|
||||
listStack[t].children.push({type: "element", tag: listInfo.itemTag, children: []});
|
||||
listStack[t].children.push({
|
||||
type: "element",
|
||||
tag: listInfo.itemTag,
|
||||
children: [],
|
||||
start: start,
|
||||
end: this.parser.pos,
|
||||
});
|
||||
}
|
||||
}
|
||||
if(listStack.length > match[0].length) {
|
||||
listStack.splice(match[0].length,listStack.length - match[0].length);
|
||||
}
|
||||
// Process the body of the list item into the last list item
|
||||
var classStart = this.parser.pos;
|
||||
var lastListChildren = listStack[listStack.length-1].children,
|
||||
lastListItem = lastListChildren[lastListChildren.length-1],
|
||||
classes = this.parser.parseClasses();
|
||||
var classEnd = this.parser.pos;
|
||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||
var tree = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||
lastListItem.children.push.apply(lastListItem.children,tree);
|
||||
lastListItem.end = this.parser.pos;
|
||||
listStack[listStack.length-1].end = this.parser.pos;
|
||||
if(classes.length > 0) {
|
||||
$tw.utils.addClassToParseTreeNode(lastListItem,classes.join(" "));
|
||||
lastListItem.attributes.class.start = classStart;
|
||||
lastListItem.attributes.class.end = classEnd;
|
||||
}
|
||||
// Consume any whitespace following the list item
|
||||
this.parser.skipWhitespace();
|
||||
|
||||
@@ -96,15 +96,20 @@ exports.parseLink = function(source,pos) {
|
||||
splitPos = null;
|
||||
}
|
||||
// Pull out the tooltip and URL
|
||||
var tooltip, URL;
|
||||
var tooltip, URL, urlStart;
|
||||
textNode.start = pos;
|
||||
if(splitPos) {
|
||||
urlStart = splitPos + 1;
|
||||
URL = source.substring(splitPos + 1,closePos).trim();
|
||||
textNode.text = source.substring(pos,splitPos).trim();
|
||||
textNode.end = splitPos;
|
||||
} else {
|
||||
urlStart = pos;
|
||||
URL = source.substring(pos,closePos).trim();
|
||||
textNode.text = URL;
|
||||
textNode.end = closePos;
|
||||
}
|
||||
node.attributes.href = {type: "string", value: URL};
|
||||
node.attributes.href = {type: "string", value: URL, start: urlStart, end: closePos};
|
||||
node.attributes.target = {type: "string", value: "_blank"};
|
||||
node.attributes.rel = {type: "string", value: "noopener noreferrer"};
|
||||
// Update the end position
|
||||
|
||||
@@ -29,32 +29,39 @@ exports.init = function(parser) {
|
||||
|
||||
exports.parse = function() {
|
||||
// Move past the match
|
||||
var start = this.parser.pos + 2;
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Process the link
|
||||
var text = this.match[1],
|
||||
link = this.match[2] || text;
|
||||
link = this.match[2] || text,
|
||||
textEndPos = this.parser.source.indexOf("|", start);
|
||||
if (textEndPos < 0 || textEndPos > this.matchRegExp.lastIndex) {
|
||||
textEndPos = this.matchRegExp.lastIndex - 2;
|
||||
}
|
||||
var linkStart = this.match[2] ? (start + this.match[1].length + 1) : start;
|
||||
var linkEnd = linkStart + link.length;
|
||||
if($tw.utils.isLinkExternal(link)) {
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "a",
|
||||
attributes: {
|
||||
href: {type: "string", value: link},
|
||||
href: {type: "string", value: link, start: linkStart, end: linkEnd},
|
||||
"class": {type: "string", value: "tc-tiddlylink-external"},
|
||||
target: {type: "string", value: "_blank"},
|
||||
rel: {type: "string", value: "noopener noreferrer"}
|
||||
},
|
||||
children: [{
|
||||
type: "text", text: text
|
||||
type: "text", text: text, start: start, end: textEndPos
|
||||
}]
|
||||
}];
|
||||
} else {
|
||||
return [{
|
||||
type: "link",
|
||||
attributes: {
|
||||
to: {type: "string", value: link}
|
||||
to: {type: "string", value: link, start: linkStart, end: linkEnd}
|
||||
},
|
||||
children: [{
|
||||
type: "text", text: text
|
||||
type: "text", text: text, start: start, end: textEndPos
|
||||
}]
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -28,9 +28,13 @@ exports.parse = function() {
|
||||
// Move past the <s
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Parse any classes, whitespace and then the optional cite itself
|
||||
var classStart = this.parser.pos;
|
||||
classes.push.apply(classes, this.parser.parseClasses());
|
||||
var classEnd = this.parser.pos;
|
||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||
var citeStart = this.parser.pos;
|
||||
var cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||
var citeEnd = this.parser.pos;
|
||||
// before handling the cite, parse the body of the quote
|
||||
var tree = this.parser.parseBlocks(reEndString);
|
||||
// If we got a cite, put it before the text
|
||||
@@ -38,18 +42,24 @@ exports.parse = function() {
|
||||
tree.unshift({
|
||||
type: "element",
|
||||
tag: "cite",
|
||||
children: cite
|
||||
children: cite,
|
||||
start: citeStart,
|
||||
end: citeEnd
|
||||
});
|
||||
}
|
||||
// Parse any optional cite
|
||||
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
|
||||
citeStart = this.parser.pos;
|
||||
cite = this.parser.parseInlineRun(/(\r?\n)/mg);
|
||||
citeEnd = this.parser.pos;
|
||||
// If we got a cite, push it
|
||||
if(cite.length > 0) {
|
||||
tree.push({
|
||||
type: "element",
|
||||
tag: "cite",
|
||||
children: cite
|
||||
children: cite,
|
||||
start: citeStart,
|
||||
end: citeEnd
|
||||
});
|
||||
}
|
||||
// Return the blockquote element
|
||||
@@ -57,7 +67,7 @@ exports.parse = function() {
|
||||
type: "element",
|
||||
tag: "blockquote",
|
||||
attributes: {
|
||||
class: { type: "string", value: classes.join(" ") },
|
||||
class: { type: "string", value: classes.join(" "), start: classStart, end: classEnd },
|
||||
},
|
||||
children: tree
|
||||
}];
|
||||
|
||||
@@ -29,10 +29,11 @@ exports.init = function(parser) {
|
||||
exports.parse = function() {
|
||||
var match = this.match[0];
|
||||
// Move past the match
|
||||
var start = this.parser.pos;
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Create the link unless it is suppressed
|
||||
if(match.substr(0,1) === "~") {
|
||||
return [{type: "text", text: match.substr(1)}];
|
||||
return [{type: "text", text: match.substr(1), start: start+1, end: this.parser.pos}];
|
||||
} else {
|
||||
return [{
|
||||
type: "link",
|
||||
@@ -41,10 +42,12 @@ exports.parse = function() {
|
||||
},
|
||||
children: [{
|
||||
type: "text",
|
||||
text: match
|
||||
text: match,
|
||||
start: start,
|
||||
end: this.parser.pos
|
||||
}]
|
||||
}];
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -150,7 +150,7 @@ exports.parse = function() {
|
||||
} else {
|
||||
// Otherwise, create a new row if this one is of a different type
|
||||
if(rowType !== currRowType) {
|
||||
rowContainer = {type: "element", tag: rowContainerTypes[rowType], children: []};
|
||||
rowContainer = {type: "element", tag: rowContainerTypes[rowType], children: [], start: this.parser.pos, end: this.parser.pos};
|
||||
table.children.push(rowContainer);
|
||||
currRowType = rowType;
|
||||
}
|
||||
@@ -178,6 +178,7 @@ exports.parse = function() {
|
||||
// Increment the row count
|
||||
rowCount++;
|
||||
}
|
||||
rowContainer.end = this.parser.pos;
|
||||
}
|
||||
rowMatch = rowRegExp.exec(this.parser.source);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ exports.parse = function() {
|
||||
renderType = this.match[2];
|
||||
// Move past the match
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
var start = this.parser.pos;
|
||||
// Look for the end of the block
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
var match = reEnd.exec(this.parser.source),
|
||||
@@ -74,7 +75,9 @@ exports.parse = function() {
|
||||
tag: "pre",
|
||||
children: [{
|
||||
type: "text",
|
||||
text: text
|
||||
text: text,
|
||||
start: start,
|
||||
end: this.parser.pos
|
||||
}]
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ exports.parse = function() {
|
||||
// Get the details of the match
|
||||
var linkText = this.match[0];
|
||||
// Move past the macro call
|
||||
var start = this.parser.pos;
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// If the link starts with the unwikilink character then just output it as plain text
|
||||
if(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {
|
||||
@@ -57,7 +58,9 @@ exports.parse = function() {
|
||||
},
|
||||
children: [{
|
||||
type: "text",
|
||||
text: linkText
|
||||
text: linkText,
|
||||
start: start,
|
||||
end: this.parser.pos
|
||||
}]
|
||||
}];
|
||||
};
|
||||
|
||||
@@ -91,6 +91,11 @@ var WikiParser = function(type,text,options) {
|
||||
} else {
|
||||
topBranch.push.apply(topBranch,this.parseBlocks());
|
||||
}
|
||||
// Build rules' name map
|
||||
this.usingRuleMap = {};
|
||||
$tw.utils.each(this.pragmaRules, function (ruleInfo) { self.usingRuleMap[ruleInfo.rule.name] = Object.getPrototypeOf(ruleInfo.rule); });
|
||||
$tw.utils.each(this.blockRules, function (ruleInfo) { self.usingRuleMap[ruleInfo.rule.name] = Object.getPrototypeOf(ruleInfo.rule); });
|
||||
$tw.utils.each(this.inlineRules, function (ruleInfo) { self.usingRuleMap[ruleInfo.rule.name] = Object.getPrototypeOf(ruleInfo.rule); });
|
||||
// Return the parse tree
|
||||
};
|
||||
|
||||
@@ -209,8 +214,13 @@ WikiParser.prototype.parsePragmas = function() {
|
||||
break;
|
||||
}
|
||||
// Process the pragma rule
|
||||
var start = this.pos;
|
||||
var subTree = nextMatch.rule.parse();
|
||||
if(subTree.length > 0) {
|
||||
// Set the start and end positions of the pragma rule if
|
||||
if (subTree[0].start === undefined) subTree[0].start = start;
|
||||
if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos;
|
||||
$tw.utils.each(subTree, function (node) { node.rule = nextMatch.rule.name; });
|
||||
// Quick hack; we only cope with a single parse tree node being returned, which is true at the moment
|
||||
currentTreeBranch.push.apply(currentTreeBranch,subTree);
|
||||
subTree[0].children = [];
|
||||
@@ -235,7 +245,15 @@ WikiParser.prototype.parseBlock = function(terminatorRegExpString) {
|
||||
// Look for a block rule that applies at the current position
|
||||
var nextMatch = this.findNextMatch(this.blockRules,this.pos);
|
||||
if(nextMatch && nextMatch.matchIndex === this.pos) {
|
||||
return nextMatch.rule.parse();
|
||||
var start = this.pos;
|
||||
var subTree = nextMatch.rule.parse();
|
||||
// Set the start and end positions of the first and last blocks if they're not already set
|
||||
if (subTree.length > 0) {
|
||||
if (subTree[0].start === undefined) subTree[0].start = start;
|
||||
if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos;
|
||||
}
|
||||
$tw.utils.each(subTree, function (node) { node.rule = nextMatch.rule.name; });
|
||||
return subTree;
|
||||
}
|
||||
// Treat it as a paragraph if we didn't find a block rule
|
||||
var start = this.pos;
|
||||
@@ -332,7 +350,16 @@ WikiParser.prototype.parseInlineRunUnterminated = function(options) {
|
||||
this.pos = nextMatch.matchIndex;
|
||||
}
|
||||
// Process the run rule
|
||||
tree.push.apply(tree,nextMatch.rule.parse());
|
||||
var start = this.pos;
|
||||
var subTree = nextMatch.rule.parse();
|
||||
// Set the start and end positions of the first and last child if they're not already set
|
||||
if (subTree.length > 0) {
|
||||
// Set the start and end positions of the first and last child if they're not already set
|
||||
if (subTree[0].start === undefined) subTree[0].start = start;
|
||||
if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos;
|
||||
}
|
||||
$tw.utils.each(subTree, function (node) { node.rule = nextMatch.rule.name; });
|
||||
tree.push.apply(tree,subTree);
|
||||
// Look for the next run rule
|
||||
nextMatch = this.findNextMatch(this.inlineRules,this.pos);
|
||||
}
|
||||
@@ -383,7 +410,15 @@ WikiParser.prototype.parseInlineRunTerminatedExtended = function(terminatorRegEx
|
||||
this.pos = inlineRuleMatch.matchIndex;
|
||||
}
|
||||
// Process the inline rule
|
||||
tree.push.apply(tree,inlineRuleMatch.rule.parse());
|
||||
var start = this.pos;
|
||||
var subTree = inlineRuleMatch.rule.parse();
|
||||
// Set the start and end positions of the first and last child if they're not already set
|
||||
if (subTree.length > 0) {
|
||||
if (subTree[0].start === undefined) subTree[0].start = start;
|
||||
if (subTree[subTree.length - 1].end === undefined) subTree[subTree.length - 1].end = this.pos;
|
||||
}
|
||||
$tw.utils.each(subTree, function (node) { node.rule = inlineRuleMatch.rule.name; });
|
||||
tree.push.apply(tree,subTree);
|
||||
// Look for the next inline rule
|
||||
inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);
|
||||
// Look for the next terminator match
|
||||
@@ -409,7 +444,7 @@ WikiParser.prototype.pushTextWidget = function(array,text,start,end) {
|
||||
text = $tw.utils.trim(text);
|
||||
}
|
||||
if(text) {
|
||||
array.push({type: "text", text: text, start: start, end: end});
|
||||
array.push({type: "text", text: text, start: start, end: end});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -462,4 +497,3 @@ WikiParser.prototype.amendRules = function(type,names) {
|
||||
exports["text/vnd.tiddlywiki"] = WikiParser;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ function SaverHandler(options) {
|
||||
if($tw.browser) {
|
||||
$tw.rootWidget.addEventListener("tm-save-wiki",function(event) {
|
||||
self.saveWiki({
|
||||
wiki: event.widget.wiki,
|
||||
template: event.param,
|
||||
downloadType: "text/plain",
|
||||
variables: event.paramObject
|
||||
@@ -102,6 +103,7 @@ function SaverHandler(options) {
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tm-download-file",function(event) {
|
||||
self.saveWiki({
|
||||
wiki: event.widget.wiki,
|
||||
method: "download",
|
||||
template: event.param,
|
||||
downloadType: "text/plain",
|
||||
@@ -147,20 +149,22 @@ Save the wiki contents. Options are:
|
||||
method: "save", "autosave" or "download"
|
||||
template: the tiddler containing the template to save
|
||||
downloadType: the content type for the saved file
|
||||
wiki: optional wiki, overriding the default wiki specified in the constructor
|
||||
*/
|
||||
SaverHandler.prototype.saveWiki = function(options) {
|
||||
options = options || {};
|
||||
var self = this,
|
||||
wiki = options.wiki || this.wiki,
|
||||
method = options.method || "save";
|
||||
// Ignore autosave if disabled
|
||||
if(method === "autosave" && ($tw.config.disableAutoSave || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
|
||||
if(method === "autosave" && ($tw.config.disableAutoSave || wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
|
||||
return false;
|
||||
}
|
||||
var variables = options.variables || {},
|
||||
template = (options.template ||
|
||||
this.wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
|
||||
wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
|
||||
downloadType = options.downloadType || "text/plain",
|
||||
text = this.wiki.renderTiddler(downloadType,template,options),
|
||||
text = wiki.renderTiddler(downloadType,template,options),
|
||||
callback = function(err) {
|
||||
if(err) {
|
||||
alert($tw.language.getString("Error/WhileSaving") + ":\n\n" + err);
|
||||
|
||||
@@ -37,7 +37,9 @@ HeaderAuthenticator.prototype.authenticateRequest = function(request,response,st
|
||||
return false;
|
||||
} else {
|
||||
// authenticatedUsername will be undefined for anonymous users
|
||||
state.authenticatedUsername = $tw.utils.decodeURIComponentSafe(username);
|
||||
if(username) {
|
||||
state.authenticatedUsername = $tw.utils.decodeURIComponentSafe(username);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -61,7 +61,7 @@ exports.startup = function() {
|
||||
// Collect the shadow tiddlers of any modified plugins
|
||||
$tw.utils.each(changes.modifiedPlugins,function(pluginTitle) {
|
||||
var pluginInfo = $tw.wiki.getPluginInfo(pluginTitle);
|
||||
if(pluginInfo) {
|
||||
if(pluginInfo && pluginInfo.tiddlers) {
|
||||
$tw.utils.each(Object.keys(pluginInfo.tiddlers),function(title) {
|
||||
changedShadowTiddlers[title] = false;
|
||||
});
|
||||
|
||||
@@ -29,7 +29,11 @@ var THROTTLE_REFRESH_TIMEOUT = 400;
|
||||
|
||||
exports.startup = function() {
|
||||
// Set up the title
|
||||
$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE,{document: $tw.fakeDocument, parseAsInline: true});
|
||||
$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE, {
|
||||
document: $tw.fakeDocument,
|
||||
parseAsInline: true,
|
||||
importPageMacros: true,
|
||||
});
|
||||
$tw.titleContainer = $tw.fakeDocument.createElement("div");
|
||||
$tw.titleWidgetNode.render($tw.titleContainer,null);
|
||||
document.title = $tw.titleContainer.textContent;
|
||||
|
||||
@@ -39,6 +39,7 @@ exports.startup = function() {
|
||||
method: params.method,
|
||||
body: params.body,
|
||||
binary: params.binary,
|
||||
useDefaultHeaders: params.useDefaultHeaders,
|
||||
oncompletion: params.oncompletion,
|
||||
onprogress: params.onprogress,
|
||||
bindStatus: params["bind-status"],
|
||||
@@ -47,7 +48,11 @@ exports.startup = function() {
|
||||
headers: getPropertiesWithPrefix(params,"header-"),
|
||||
passwordHeaders: getPropertiesWithPrefix(params,"password-header-"),
|
||||
queryStrings: getPropertiesWithPrefix(params,"query-"),
|
||||
passwordQueryStrings: getPropertiesWithPrefix(params,"password-query-")
|
||||
passwordQueryStrings: getPropertiesWithPrefix(params,"password-query-"),
|
||||
basicAuthUsername: params["basic-auth-username"],
|
||||
basicAuthUsernameFromStore: params["basic-auth-username-from-store"],
|
||||
basicAuthPassword: params["basic-auth-password"],
|
||||
basicAuthPasswordFromStore: params["basic-auth-password-from-store"]
|
||||
});
|
||||
});
|
||||
$tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) {
|
||||
@@ -68,7 +73,10 @@ exports.startup = function() {
|
||||
});
|
||||
// Install the copy-to-clipboard mechanism
|
||||
$tw.rootWidget.addEventListener("tm-copy-to-clipboard",function(event) {
|
||||
$tw.utils.copyToClipboard(event.param);
|
||||
$tw.utils.copyToClipboard(event.param,{
|
||||
successNotification: event.paramObject && event.paramObject.successNotification,
|
||||
failureNotification: event.paramObject && event.paramObject.failureNotification
|
||||
});
|
||||
});
|
||||
// Install the tm-focus-selector message
|
||||
$tw.rootWidget.addEventListener("tm-focus-selector",function(event) {
|
||||
|
||||
@@ -93,7 +93,9 @@ exports.startup = function() {
|
||||
updateAddressBar: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_UPDATE_ADDRESS_BAR,"yes").trim() === "yes" ? "permalink" : "none",
|
||||
updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(),
|
||||
targetTiddler: event.param || event.tiddlerTitle,
|
||||
copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permalink" : "none"
|
||||
copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permalink" : "none",
|
||||
successNotification: event.paramObject && event.paramObject.successNotification,
|
||||
failureNotification: event.paramObject && event.paramObject.failureNotification
|
||||
});
|
||||
});
|
||||
// Listen for the tm-permaview message
|
||||
@@ -102,7 +104,9 @@ exports.startup = function() {
|
||||
updateAddressBar: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_UPDATE_ADDRESS_BAR,"yes").trim() === "yes" ? "permaview" : "none",
|
||||
updateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,"no").trim(),
|
||||
targetTiddler: event.param || event.tiddlerTitle,
|
||||
copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permaview" : "none"
|
||||
copyToClipboard: $tw.wiki.getTiddlerText(CONFIG_PERMALINKVIEW_COPY_TO_CLIPBOARD,"yes").trim() === "yes" ? "permaview" : "none",
|
||||
successNotification: event.paramObject && event.paramObject.successNotification,
|
||||
failureNotification: event.paramObject && event.paramObject.failureNotification
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -177,6 +181,8 @@ options.updateAddressBar: "permalink", "permaview" or "no" (defaults to "permavi
|
||||
options.updateHistory: "yes" or "no" (defaults to "no")
|
||||
options.copyToClipboard: "permalink", "permaview" or "no" (defaults to "no")
|
||||
options.targetTiddler: optional title of target tiddler for permalink
|
||||
options.successNotification: optional title of tiddler to use as the notification in case of success
|
||||
options.failureNotification: optional title of tiddler to use as the notification in case of failure
|
||||
*/
|
||||
function updateLocationHash(options) {
|
||||
// Get the story and the history stack
|
||||
@@ -205,14 +211,18 @@ function updateLocationHash(options) {
|
||||
break;
|
||||
}
|
||||
// Copy URL to the clipboard
|
||||
var url = "";
|
||||
switch(options.copyToClipboard) {
|
||||
case "permalink":
|
||||
$tw.utils.copyToClipboard($tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler));
|
||||
url = $tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler);
|
||||
break;
|
||||
case "permaview":
|
||||
$tw.utils.copyToClipboard($tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler) + ":" + encodeURIComponent($tw.utils.stringifyList(storyList)));
|
||||
url = $tw.utils.getLocationPath() + "#" + encodeURIComponent(targetTiddler) + ":" + encodeURIComponent($tw.utils.stringifyList(storyList));
|
||||
break;
|
||||
}
|
||||
if(url) {
|
||||
$tw.utils.copyToClipboard(url,{successNotification: options.successNotification, failureNotification: options.failureNotification});
|
||||
}
|
||||
// Only change the location hash if we must, thus avoiding unnecessary onhashchange events
|
||||
if($tw.utils.getLocationHash() !== $tw.locationHash) {
|
||||
if(options.updateHistory === "yes") {
|
||||
|
||||
@@ -82,6 +82,10 @@ ClassicStoryView.prototype.remove = function(widget) {
|
||||
removeElement = function() {
|
||||
widget.removeChildDomNodes();
|
||||
};
|
||||
// Blur the focus if it is within the descendents of the node we are removing
|
||||
if($tw.utils.domContains(targetElement,targetElement.ownerDocument.activeElement)) {
|
||||
targetElement.ownerDocument.activeElement.blur();
|
||||
}
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
removeElement();
|
||||
|
||||
@@ -292,7 +292,9 @@ exports.copyToClipboard = function(text,options) {
|
||||
} catch (err) {
|
||||
}
|
||||
if(!options.doNotNotify) {
|
||||
$tw.notifier.display(succeeded ? "$:/language/Notifications/CopiedToClipboard/Succeeded" : "$:/language/Notifications/CopiedToClipboard/Failed");
|
||||
var successNotification = options.successNotification || "$:/language/Notifications/CopiedToClipboard/Succeeded",
|
||||
failureNotification = options.failureNotification || "$:/language/Notifications/CopiedToClipboard/Failed"
|
||||
$tw.notifier.display(succeeded ? successNotification : failureNotification);
|
||||
}
|
||||
document.body.removeChild(textArea);
|
||||
};
|
||||
|
||||
@@ -69,7 +69,7 @@ HttpClient.prototype.cancelAllHttpRequests = function() {
|
||||
for(var t=this.requests.length - 1; t--; t>=0) {
|
||||
var requestInfo = this.requests[t];
|
||||
requestInfo.request.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.requests = [];
|
||||
this.updateRequestTracker();
|
||||
@@ -100,6 +100,10 @@ headers: hashmap of header name to header value to be sent with the request
|
||||
passwordHeaders: hashmap of header name to password store name to be sent with the request
|
||||
queryStrings: hashmap of query string parameter name to parameter value to be sent with the request
|
||||
passwordQueryStrings: hashmap of query string parameter name to password store name to be sent with the request
|
||||
basicAuthUsername: plain username for basic authentication
|
||||
basicAuthUsernameFromStore: name of password store entry containing username
|
||||
basicAuthPassword: plain password for basic authentication
|
||||
basicAuthPasswordFromStore: name of password store entry containing password
|
||||
*/
|
||||
function HttpClientRequest(options) {
|
||||
var self = this;
|
||||
@@ -112,6 +116,7 @@ function HttpClientRequest(options) {
|
||||
this.method = options.method || "GET";
|
||||
this.body = options.body || "";
|
||||
this.binary = options.binary || "";
|
||||
this.useDefaultHeaders = options.useDefaultHeaders !== "false" ? true : false,
|
||||
this.variables = options.variables;
|
||||
var url = options.url;
|
||||
$tw.utils.each(options.queryStrings,function(value,name) {
|
||||
@@ -128,6 +133,11 @@ function HttpClientRequest(options) {
|
||||
$tw.utils.each(options.passwordHeaders,function(value,name) {
|
||||
self.requestHeaders[name] = $tw.utils.getPassword(value) || "";
|
||||
});
|
||||
this.basicAuthUsername = options.basicAuthUsername || (options.basicAuthUsernameFromStore && $tw.utils.getPassword(options.basicAuthUsernameFromStore)) || "";
|
||||
this.basicAuthPassword = options.basicAuthPassword || (options.basicAuthPasswordFromStore && $tw.utils.getPassword(options.basicAuthPasswordFromStore)) || "";
|
||||
if(this.basicAuthUsername && this.basicAuthPassword) {
|
||||
this.requestHeaders.Authorization = "Basic " + $tw.utils.base64Encode(this.basicAuthUsername + ":" + this.basicAuthPassword);
|
||||
}
|
||||
}
|
||||
|
||||
HttpClientRequest.prototype.send = function(callback) {
|
||||
@@ -156,6 +166,7 @@ HttpClientRequest.prototype.send = function(callback) {
|
||||
this.xhr = $tw.utils.httpRequest({
|
||||
url: this.url,
|
||||
type: this.method,
|
||||
useDefaultHeaders: this.useDefaultHeaders,
|
||||
headers: this.requestHeaders,
|
||||
data: this.body,
|
||||
returnProp: this.binary === "" ? "responseText" : "response",
|
||||
@@ -231,7 +242,8 @@ Make an HTTP request. Options are:
|
||||
exports.httpRequest = function(options) {
|
||||
var type = options.type || "GET",
|
||||
url = options.url,
|
||||
headers = options.headers || {accept: "application/json"},
|
||||
useDefaultHeaders = options.useDefaultHeaders !== false ? true : false,
|
||||
headers = options.headers || (useDefaultHeaders ? {accept: "application/json"} : {}),
|
||||
hasHeader = function(targetHeader) {
|
||||
targetHeader = targetHeader.toLowerCase();
|
||||
var result = false;
|
||||
@@ -257,7 +269,7 @@ exports.httpRequest = function(options) {
|
||||
if(hasHeader("Content-Type") && ["application/x-www-form-urlencoded","multipart/form-data","text/plain"].indexOf(getHeader["Content-Type"]) === -1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
},
|
||||
returnProp = options.returnProp || "responseText",
|
||||
request = new XMLHttpRequest(),
|
||||
@@ -307,10 +319,10 @@ exports.httpRequest = function(options) {
|
||||
request.setRequestHeader(headerTitle,header);
|
||||
});
|
||||
}
|
||||
if(data && !hasHeader("Content-Type")) {
|
||||
if(data && !hasHeader("Content-Type") && useDefaultHeaders) {
|
||||
request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
|
||||
}
|
||||
if(!hasHeader("X-Requested-With") && !isSimpleRequest(type,headers)) {
|
||||
if(!hasHeader("X-Requested-With") && !isSimpleRequest(type,headers) && useDefaultHeaders) {
|
||||
request.setRequestHeader("X-Requested-With","TiddlyWiki");
|
||||
}
|
||||
// Send data
|
||||
|
||||
@@ -66,7 +66,12 @@ LogWidget.prototype.log = function() {
|
||||
});
|
||||
|
||||
for(var v in this.variables) {
|
||||
allVars[v] = this.getVariable(v,{defaultValue:""});
|
||||
var variable = this.parentWidget && this.parentWidget.variables[v];
|
||||
if(variable && variable.isFunctionDefinition) {
|
||||
allVars[v] = variable.value;
|
||||
} else {
|
||||
allVars[v] = this.getVariable(v,{defaultValue:""});
|
||||
}
|
||||
}
|
||||
if(this.filter) {
|
||||
filteredVars = this.wiki.compileFilter(this.filter).call(this.wiki,this.wiki.makeTiddlerIterator(allVars));
|
||||
|
||||
@@ -262,7 +262,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
ButtonWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.popupAbsCoords || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) {
|
||||
if(changedAttributes.tooltip || changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.popupAbsCoords || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -31,34 +31,49 @@ DataWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
var jsonPayload = JSON.stringify(this.readDataTiddlerValues(),null,4);
|
||||
var textNode = this.document.createTextNode(jsonPayload);
|
||||
parent.insertBefore(textNode,nextSibling);
|
||||
this.domNodes.push(textNode);
|
||||
this.dataPayload = this.computeDataTiddlerValues(); // Array of $tw.Tiddler objects
|
||||
this.domNode = this.document.createTextNode(this.readDataTiddlerValuesAsJson());
|
||||
parent.insertBefore(this.domNode,nextSibling);
|
||||
this.domNodes.push(this.domNode);
|
||||
};
|
||||
|
||||
/*
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
DataWidget.prototype.execute = function() {
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
// Nothing to do here
|
||||
};
|
||||
|
||||
/*
|
||||
Read the tiddler value(s) from a data widget – must be called after the .render() method
|
||||
Read the tiddler value(s) from a data widget as an array of tiddler field objects (not $tw.Tiddler objects)
|
||||
*/
|
||||
DataWidget.prototype.readDataTiddlerValues = function() {
|
||||
var results = [];
|
||||
$tw.utils.each(this.dataPayload,function(tiddler,index) {
|
||||
results.push(tiddler.getFieldStrings());
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
/*
|
||||
Read the tiddler value(s) from a data widget as an array of tiddler field objects (not $tw.Tiddler objects)
|
||||
*/
|
||||
DataWidget.prototype.readDataTiddlerValuesAsJson = function() {
|
||||
return JSON.stringify(this.readDataTiddlerValues(),null,4);
|
||||
};
|
||||
|
||||
/*
|
||||
Compute list of tiddlers from a data widget
|
||||
*/
|
||||
DataWidget.prototype.computeDataTiddlerValues = function() {
|
||||
var self = this;
|
||||
// Start with a blank object
|
||||
var item = Object.create(null);
|
||||
// Read any attributes not prefixed with $
|
||||
var item = Object.create(null);
|
||||
$tw.utils.each(this.attributes,function(value,name) {
|
||||
if(name.charAt(0) !== "$") {
|
||||
item[name] = value;
|
||||
}
|
||||
});
|
||||
item = new $tw.Tiddler(item);
|
||||
// Deal with $tiddler, $filter or $compound-tiddler attributes
|
||||
var tiddlers = [],title;
|
||||
if(this.hasAttribute("$tiddler")) {
|
||||
@@ -76,7 +91,9 @@ DataWidget.prototype.readDataTiddlerValues = function() {
|
||||
var titles = this.wiki.filterTiddlers(filter);
|
||||
$tw.utils.each(titles,function(title) {
|
||||
var tiddler = self.wiki.getTiddler(title);
|
||||
tiddlers.push(tiddler);
|
||||
if(tiddler) {
|
||||
tiddlers.push(tiddler);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -86,21 +103,22 @@ DataWidget.prototype.readDataTiddlerValues = function() {
|
||||
tiddlers.push.apply(tiddlers,this.extractCompoundTiddler(title));
|
||||
}
|
||||
}
|
||||
// Convert the literal item to field strings
|
||||
item = item.getFieldStrings();
|
||||
if(tiddlers.length === 0) {
|
||||
// Return the literal item if none of the special attributes were used
|
||||
if(!this.hasAttribute("$tiddler") && !this.hasAttribute("$filter") && !this.hasAttribute("$compound-tiddler")) {
|
||||
if(Object.keys(item).length > 0 && !!item.title) {
|
||||
return [item];
|
||||
return [new $tw.Tiddler(item)];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
} else {
|
||||
var results = [];
|
||||
$tw.utils.each(tiddlers,function(tiddler,index) {
|
||||
var fields = tiddler.getFieldStrings();
|
||||
results.push($tw.utils.extend({},fields,item));
|
||||
});
|
||||
return results;
|
||||
// Apply the item fields to each of the tiddlers
|
||||
delete item.title; // Do not overwrite the title
|
||||
if(Object.keys(item).length > 0) {
|
||||
$tw.utils.each(tiddlers,function(tiddler,index) {
|
||||
tiddlers[index] = new $tw.Tiddler(tiddler,item);
|
||||
});
|
||||
}
|
||||
return tiddlers;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -134,12 +152,33 @@ DataWidget.prototype.extractCompoundTiddler = function(title) {
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
DataWidget.prototype.refresh = function(changedTiddlers) {
|
||||
// It would be expensive to calculate whether the changedTiddlers impact the filter
|
||||
// identified by the $filter attribute so we just refresh ourselves unconditionally
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
var changedAttributes = this.computeAttributes();
|
||||
var newPayload = this.computeDataTiddlerValues();
|
||||
if(hasPayloadChanged(this.dataPayload,newPayload)) {
|
||||
this.dataPayload = newPayload;
|
||||
this.domNode.textContent = this.readDataTiddlerValuesAsJson();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Compare two arrays of tiddlers and return true if they are different
|
||||
*/
|
||||
function hasPayloadChanged(a,b) {
|
||||
if(a.length === b.length) {
|
||||
for(var t=0; t<a.length; t++) {
|
||||
if(!(a[t].isEqual(b[t]))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
exports.data = DataWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -74,6 +74,18 @@ ParametersWidget.prototype.execute = function() {
|
||||
self.setVariable(variableName,getValue(name));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// There is no parent transclude. i.e. direct rendering.
|
||||
// We use default values only.
|
||||
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(self.parseTreeNode),function(attr,index) {
|
||||
var name = attr.name;
|
||||
// If the attribute name starts with $$ then reduce to a single dollar
|
||||
if(name.substr(0,2) === "$$") {
|
||||
name = name.substr(1);
|
||||
}
|
||||
var value = self.getAttribute(attr.name,"");
|
||||
self.setVariable(name,value);
|
||||
});
|
||||
}
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
|
||||
@@ -316,7 +316,8 @@ Widget.prototype.getStateQualifier = function(name) {
|
||||
Make a fake widget with specified variables, suitable for variable lookup in filters
|
||||
*/
|
||||
Widget.prototype.makeFakeWidgetWithVariables = function(variables) {
|
||||
var self = this;
|
||||
var self = this,
|
||||
variables = variables || {};
|
||||
return {
|
||||
getVariable: function(name,opts) {
|
||||
if($tw.utils.hop(variables,name)) {
|
||||
@@ -334,7 +335,7 @@ Widget.prototype.makeFakeWidgetWithVariables = function(variables) {
|
||||
};
|
||||
} else {
|
||||
opts = opts || {};
|
||||
opts.variables = variables;
|
||||
opts.variables = $tw.utils.extend(variables,opts.variables);
|
||||
return self.getVariableInfo(name,opts);
|
||||
};
|
||||
},
|
||||
|
||||
@@ -551,28 +551,41 @@ exports.getTiddlerBacklinks = function(targetTitle) {
|
||||
|
||||
|
||||
/*
|
||||
Return an array of tiddler titles that are directly transcluded within the given parse tree
|
||||
Return an array of tiddler titles that are directly transcluded within the given parse tree. `title` is the tiddler being parsed, we will ignore its self-referential transclusions, only return
|
||||
*/
|
||||
exports.extractTranscludes = function(parseTreeRoot) {
|
||||
exports.extractTranscludes = function(parseTreeRoot, title) {
|
||||
// Count up the transcludes
|
||||
var transcludes = [],
|
||||
checkParseTree = function(parseTree, parentNode) {
|
||||
for(var t=0; t<parseTree.length; t++) {
|
||||
var parseTreeNode = parseTree[t];
|
||||
if(parseTreeNode.type === "transclude" && parseTreeNode.attributes.$tiddler && parseTreeNode.attributes.$tiddler.type === "string") {
|
||||
var value;
|
||||
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
|
||||
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
|
||||
value = parentNode.attributes.tiddler.value;
|
||||
} else {
|
||||
value = parseTreeNode.attributes.$tiddler.value;
|
||||
if(parseTreeNode.type === "transclude") {
|
||||
if(parseTreeNode.attributes.$tiddler && parseTreeNode.attributes.$tiddler.type === "string") {
|
||||
var value;
|
||||
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
|
||||
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
|
||||
// Empty value (like `{{!!field}}`) means self-referential transclusion.
|
||||
value = parentNode.attributes.tiddler.value || title;
|
||||
} else {
|
||||
value = parseTreeNode.attributes.$tiddler.value;
|
||||
}
|
||||
} else if(parseTreeNode.attributes.tiddler && parseTreeNode.attributes.tiddler.type === "string") {
|
||||
// Old transclude widget usage
|
||||
value = parseTreeNode.attributes.tiddler.value;
|
||||
} else if(parseTreeNode.attributes.$field && parseTreeNode.attributes.$field.type === "string") {
|
||||
// Empty value (like `<$transclude $field='created'/>`) means self-referential transclusion.
|
||||
value = title;
|
||||
} else if(parseTreeNode.attributes.field && parseTreeNode.attributes.field.type === "string") {
|
||||
// Old usage with Empty value (like `<$transclude field='created'/>`)
|
||||
value = title;
|
||||
}
|
||||
if(transcludes.indexOf(value) === -1) {
|
||||
transcludes.push(value);
|
||||
// Deduplicate the result.
|
||||
if(value && transcludes.indexOf(value) === -1) {
|
||||
$tw.utils.pushTop(transcludes,value);
|
||||
}
|
||||
}
|
||||
if(parseTreeNode.children) {
|
||||
checkParseTree(parseTreeNode.children, parseTreeNode);
|
||||
checkParseTree(parseTreeNode.children,parseTreeNode);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -591,7 +604,8 @@ exports.getTiddlerTranscludes = function(title) {
|
||||
// Parse the tiddler
|
||||
var parser = self.parseTiddler(title);
|
||||
if(parser) {
|
||||
return self.extractTranscludes(parser.tree);
|
||||
// this will ignore self-referential transclusions from `title`
|
||||
return self.extractTranscludes(parser.tree,title);
|
||||
}
|
||||
return [];
|
||||
});
|
||||
|
||||
@@ -82,6 +82,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
||||
sidebar-tiddler-link-foreground-hover: #458588
|
||||
sidebar-tiddler-link-foreground: #98971a
|
||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||
stability-deprecated: #cc241d
|
||||
stability-experimental: #d79921
|
||||
stability-legacy: #458588
|
||||
stability-stable: #98971a
|
||||
static-alert-foreground: #B48EAD
|
||||
tab-background-selected: #ebdbb2
|
||||
tab-background: #665c54
|
||||
|
||||
@@ -82,6 +82,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
||||
sidebar-tiddler-link-foreground-hover: #A3BE8C
|
||||
sidebar-tiddler-link-foreground: #81A1C1
|
||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||
stability-deprecated: #bf616a
|
||||
stability-experimental: #d08770
|
||||
stability-legacy: #88c0d0
|
||||
stability-stable: #a3be8c
|
||||
static-alert-foreground: #B48EAD
|
||||
tab-background-selected: #ECEFF4
|
||||
tab-background: #4C566A
|
||||
|
||||
@@ -18,7 +18,7 @@ button-foreground: #93a1a1
|
||||
code-background: #073642
|
||||
code-border: #586e75
|
||||
code-foreground: #93a1a1
|
||||
dirty-indicator: inherit
|
||||
dirty-indicator: #dc322f
|
||||
download-background: #859900
|
||||
download-foreground: #073642
|
||||
dragger-background: #073642
|
||||
@@ -72,6 +72,10 @@ sidebar-tab-foreground-selected: #93a1a1
|
||||
sidebar-tiddler-link-foreground: #2aa198
|
||||
sidebar-tiddler-link-foreground-hover: #eee8d5
|
||||
site-title-foreground: #d33682
|
||||
stability-deprecated: #dc322f
|
||||
stability-experimental: #b58900
|
||||
stability-legacy: #268bd2
|
||||
stability-stable: #859900
|
||||
static-alert-foreground: #93a1a1
|
||||
tab-background: #073642
|
||||
tab-background-selected: #002b36
|
||||
|
||||
@@ -18,7 +18,7 @@ button-foreground: #586e75
|
||||
code-background: #eee8d5
|
||||
code-border: #93a1a1
|
||||
code-foreground: #586e75
|
||||
dirty-indicator: inherit
|
||||
dirty-indicator: #dc322f
|
||||
download-background: #859900
|
||||
download-foreground: #eee8d5
|
||||
dragger-background: #eee8d5
|
||||
@@ -72,6 +72,10 @@ sidebar-tab-foreground-selected: #586e75
|
||||
sidebar-tiddler-link-foreground: #2aa198
|
||||
sidebar-tiddler-link-foreground-hover: #002b36
|
||||
site-title-foreground: #d33682
|
||||
stability-deprecated: #dc322f
|
||||
stability-experimental: #b58900
|
||||
stability-legacy: #268bd2
|
||||
stability-stable: #859900
|
||||
static-alert-foreground: #586e75
|
||||
tab-background: #eee8d5
|
||||
tab-background-selected: #fdf6e3
|
||||
|
||||
@@ -82,6 +82,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
|
||||
sidebar-tiddler-link-foreground-hover: #444444
|
||||
sidebar-tiddler-link-foreground: #999999
|
||||
site-title-foreground: <<colour tiddler-title-foreground>>
|
||||
stability-stable: #008000
|
||||
stability-experimental: #c07c00
|
||||
stability-deprecated: #ff0000
|
||||
stability-legacy: #0000ff
|
||||
static-alert-foreground: #aaaaaa
|
||||
tab-background-selected: #ffffff
|
||||
tab-background: #d8d8d8
|
||||
@@ -95,7 +99,7 @@ table-footer-background: #a8a8a8
|
||||
table-header-background: #f0f0f0
|
||||
tag-background: #ec6
|
||||
tag-foreground: #ffffff
|
||||
testcase-accent-level-1: #84C5E6
|
||||
testcase-accent-level-1: #c1eaff
|
||||
testcase-accent-level-2: #E3B740
|
||||
testcase-accent-level-3: #5FD564
|
||||
tiddler-background: <<colour background>>
|
||||
|
||||
@@ -9,7 +9,7 @@ list-before:
|
||||
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]">
|
||||
|
||||
<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> style="border-top:1px solid #eee;">
|
||||
<div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> >
|
||||
|
||||
!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
title: $:/core/ui/PageTemplate
|
||||
name: {{$:/language/PageTemplate/Name}}
|
||||
description: {{$:/language/PageTemplate/Description}}
|
||||
icon: $:/core/images/default-layout
|
||||
icon: $:/core/images/standard-layout
|
||||
code-body: yes
|
||||
|
||||
\whitespace trim
|
||||
@@ -15,7 +15,7 @@ title: $:/core/ui/testcases/DefaultTemplate
|
||||
<div class="tc-test-case-wrapper">
|
||||
<div class="tc-test-case-header">
|
||||
<h2>
|
||||
<$genesis $type={{{ [<linkTarget>!match[]then[$link]else[div]] }}} to=<<testcaseTiddler>>>
|
||||
<$genesis $type={{{ [<linkTarget>!match[]then[$link]else[span]] }}} to=<<testcaseTiddler>>>
|
||||
<%if [<testResult>!match[]] %>
|
||||
<span class={{{ tc-test-case-result-icon [<testResult>!match[fail]then[tc-test-case-result-icon-pass]] [<testResult>match[fail]then[tc-test-case-result-icon-fail]] +[join[ ]] }}}>
|
||||
<%if [<testResult>!match[fail]] %>
|
||||
@@ -27,6 +27,31 @@ title: $:/core/ui/testcases/DefaultTemplate
|
||||
<%endif%>
|
||||
<$view tiddler="Description" mode="inline"/>
|
||||
</$genesis>
|
||||
<span class="tc-test-case-toolbar">
|
||||
<$button popup=`$(state)$-more`
|
||||
tooltip={{$:/language/Buttons/More/Hint}}
|
||||
aria-label={{$:/language/Buttons/More/Caption}}
|
||||
class="tc-btn-invisible"
|
||||
selectedClass="tc-selected"
|
||||
>
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
<$let
|
||||
tv-config-toolbar-icons="yes"
|
||||
tv-config-toolbar-text="yes"
|
||||
tv-config-toolbar-class="tc-btn-invisible"
|
||||
>
|
||||
<$reveal state=`$(state)$-more` type="popup" position="belowleft" animate="yes">
|
||||
<div class="tc-drop-down">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TestCase/Actions]!has[draft.of]]"
|
||||
variable="listItem"
|
||||
>
|
||||
<$transclude tiddler=<<listItem>> mode="inline"/>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
||||
</$let>
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
<%if [[Narrative]is[tiddler]] %>
|
||||
@@ -46,7 +71,7 @@ title: $:/core/ui/testcases/DefaultTemplate
|
||||
<%endif%>
|
||||
<div class="tc-test-case-panes">
|
||||
<div class="tc-test-case-source">
|
||||
<$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix<state>] -Description -Narrative -ExpectedResult -Output Output +[putfirst[]] -[has[plugin-type]]" state=<<state>> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/>
|
||||
<$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix<state>] -Description -Narrative -Output Output +[putfirst[]] -[has[plugin-type]]" state=<<state>> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/>
|
||||
</div>
|
||||
<div class="tc-test-case-divider">
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,9 @@ title: $:/core/ui/testcases/DefaultTemplate/SourceTabs
|
||||
</table>
|
||||
</$list>
|
||||
<$edit class="tc-edit-texteditor" tiddler=<<currentTab>>/>
|
||||
<div class="tc-test-case-footer-toolbar">
|
||||
<$macrocall $name="copy-to-clipboard" src={{{ [<currentTab>get[text]] }}}/>
|
||||
</div>
|
||||
\end
|
||||
|
||||
<$transclude $variable="body" $mode="inline"/>
|
||||
|
||||
4
core/ui/TestCases/actions/Export.tid
Normal file
4
core/ui/TestCases/actions/Export.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/ui/testcases/actions/Export
|
||||
tags: $:/tags/TestCase/Actions
|
||||
|
||||
<$macrocall $name="exportButton" exportFilter="[all[tiddlers]sort[]] -[prefix[$:/state/]] -Description -Narrative -ExpectedResult -Output Output +[putfirst[]] -[has[plugin-type]]" lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||
11
core/ui/TestCases/actions/Import.tid
Normal file
11
core/ui/TestCases/actions/Import.tid
Normal file
@@ -0,0 +1,11 @@
|
||||
title: $:/core/ui/testcases/actions/Import
|
||||
tags: $:/tags/TestCase/Actions
|
||||
|
||||
\whitespace trim
|
||||
<$button tooltip={{$:/language/Buttons/TestCaseImport/Hint}} aria-label={{$:/language/Buttons/TestCaseImport/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$action-sendmessage $message="tm-import-tiddlers" $param=<<payloadTiddlers>>/>
|
||||
{{$:/core/images/input-button}}
|
||||
<span class="tc-btn-text">
|
||||
<$text text={{$:/language/Buttons/TestCaseImport/Caption}}/>
|
||||
</span>
|
||||
</$button>
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.3.4/index.html
|
||||
url: https://tiddlywiki.com/library/v5.3.5/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
title: $:/core/macros/CSS
|
||||
tags: $:/tags/Macro $:/tags/Global
|
||||
|
||||
\procedure colour(name)
|
||||
<!-- Needs to stay that way for backwards compatibility. See GH issue: #8326 -->
|
||||
\define colour(name)
|
||||
\whitespace trim
|
||||
<$transclude $tiddler={{$:/palette}} $index=`$(name)$`>
|
||||
<$transclude $tiddler="$:/palettes/Vanilla" $index=`$(name)$`>
|
||||
<$transclude $tiddler=`$:/config/DefaultColourMappings/$(name)$`/>
|
||||
<$transclude tiddler={{$:/palette}} index="$name$">
|
||||
<$transclude tiddler="$:/palettes/Vanilla" index="$name$">
|
||||
<$transclude tiddler="$:/config/DefaultColourMappings/$name$"/>
|
||||
</$transclude>
|
||||
</$transclude>
|
||||
\end
|
||||
|
||||
\procedure color(name)
|
||||
<$macrocall $name=colour name=`$(name)$`/>
|
||||
\end
|
||||
\define color(name) <<colour $name$>>
|
||||
|
||||
\function box-shadow(shadow)
|
||||
[[ -webkit-box-shadow: $(shadow)$;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/core/macros/tag-picker
|
||||
tags: tags: $:/tags/Macro $:/tags/Global
|
||||
tags: $:/tags/Macro $:/tags/Global
|
||||
first-search-filter: [subfilter<tagListFilter>!is[system]search:title<userInput>sort[]]
|
||||
second-search-filter: [subfilter<tagListFilter>is[system]search:title<userInput>sort[]]
|
||||
|
||||
@@ -154,8 +154,10 @@ The second ESC tries to close the "draft tiddler"
|
||||
|
||||
\function _tf.getUserInput() [<storeTitle>get[text]]
|
||||
\function _tf.getTag() [<newTagNameTiddler>get[text]]
|
||||
<!-- Use this function if tag-picker is a stand alone macro. Otherwise use "newTagNameTiddler" defined for fieldmangler in EditTemplate -->
|
||||
\function _tf.makeTagNameTiddler() [[$:/temp/NewTagName]] [<tagField>!match[tags]] +[join[/]] [<qualify>] +[join[]]
|
||||
|
||||
<!-- keep those variables because they may "blead" into macros using old syntax -->
|
||||
<!-- keep those variables because they may "bleed" into macros using old syntax -->
|
||||
<$let
|
||||
palette={{$:/palette}}
|
||||
colourA={{{ [<palette>getindex[foreground]] }}}
|
||||
@@ -164,7 +166,7 @@ The second ESC tries to close the "draft tiddler"
|
||||
|
||||
saveTiddler={{{ [<tiddler>is[blank]then<currentTiddler>else<tiddler>] }}}
|
||||
|
||||
newTagNameTiddler={{{ [[$:/temp/NewTagName]] [<tagField>!match[tags]] +[join[/]] [<qualify>] +[join[]] }}}
|
||||
newTagNameTiddler={{{ [[newTagNameTiddler]is[variable]then<newTagNameTiddler>] :else[<_tf.makeTagNameTiddler>] }}}
|
||||
storeTitle={{{ [[$:/temp/NewTagName/input]] [<tagField>!match[tags]] +[join[/]] [<qualify>] +[join[]] }}}
|
||||
|
||||
newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">>
|
||||
@@ -179,4 +181,4 @@ The second ESC tries to close the "draft tiddler"
|
||||
>
|
||||
<$macrocall $name="tag-picker-inner"/>
|
||||
</$let>
|
||||
\end
|
||||
\end
|
||||
|
||||
2
core/wiki/tags/TestCaseActions.tid
Normal file
2
core/wiki/tags/TestCaseActions.tid
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/TestCase/Actions
|
||||
list:
|
||||
4
editions/geospatialdemo/tiddlers/DefaultTiddlers.tid
Normal file
4
editions/geospatialdemo/tiddlers/DefaultTiddlers.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/DefaultTiddlers
|
||||
|
||||
HelloThere
|
||||
$:/plugins/tiddlywiki/geospatial
|
||||
14
editions/geospatialdemo/tiddlers/Features.tid
Normal file
14
editions/geospatialdemo/tiddlers/Features.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
title: GeoFeatures
|
||||
tags: $:/tags/GeospatialDemo
|
||||
|
||||
This is a list of all the tiddlers containing ~GeoJSON feature collections in this wiki (identified by the tag <<tag "$:/tags/GeoFeature">>). A ~GeoJSON feature collection is a list of features, each of which consists of a geometry and associated metadata.
|
||||
|
||||
<ul>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoFeature]sort[caption]]">
|
||||
<li>
|
||||
<$link>
|
||||
<$transclude field="caption"><$view field="title"/></$view>
|
||||
</$link>
|
||||
</li>
|
||||
</$list>
|
||||
</ul>
|
||||
27
editions/geospatialdemo/tiddlers/Flickr Demo.tid
Normal file
27
editions/geospatialdemo/tiddlers/Flickr Demo.tid
Normal file
@@ -0,0 +1,27 @@
|
||||
title: Flickr Demo
|
||||
caption: Flickr
|
||||
tags: $:/tags/GeospatialDemo
|
||||
|
||||
! Retrieve Geotagged Flickr Photos
|
||||
|
||||
This demo will not work until you have set a Flickr API key in the [[Geospatial plugin settings|$:/plugins/tiddlywiki/geospatial/settings]].
|
||||
|
||||
<$button>
|
||||
<$macrocall $name="flickr-get-album-items" albumID={{$:/config/flickr-param/album-id}}/>
|
||||
Get Flickr album
|
||||
</$button> <$edit-text tiddler="$:/config/flickr-param/album-id" tag="input"/> (parameter should be an album ID, e.g. 72157630297432522)
|
||||
|
||||
<$button>
|
||||
<$macrocall $name="flickr-get-interesting-items"/>
|
||||
Get Flickr interesting items
|
||||
</$button>
|
||||
|
||||
<$button>
|
||||
<$macrocall $name="flickr-get-photos-of-user-items" userID={{$:/config/flickr-param/user-id}}/>
|
||||
Get Flickr photos of user
|
||||
</$button> <$edit-text tiddler="$:/config/flickr-param/user-id" tag="input"/> (parameter should be a user ID, e.g. 35468148136@N01)
|
||||
|
||||
<$button>
|
||||
<$macrocall $name="flickr-get-group-items" groupID={{$:/config/flickr-param/group-id}}/>
|
||||
Get Flickr group
|
||||
</$button> <$edit-text tiddler="$:/config/flickr-param/group-id" tag="input"/> (parameter should be an group ID, e.g. 22075379@N00)
|
||||
BIN
editions/geospatialdemo/tiddlers/Geospatial Plugin Logo.png
Normal file
BIN
editions/geospatialdemo/tiddlers/Geospatial Plugin Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 509 KiB |
@@ -0,0 +1,2 @@
|
||||
title: Geospatial Plugin Logo
|
||||
type: image/png
|
||||
37
editions/geospatialdemo/tiddlers/HelloThere.tid
Normal file
37
editions/geospatialdemo/tiddlers/HelloThere.tid
Normal file
@@ -0,0 +1,37 @@
|
||||
title: HelloThere
|
||||
|
||||
//The latest build of the Geospatial Plugin can be found at:// https://tiddlywiki5-git-geospatial-plugin-jermolene.vercel.app/plugins/tiddlywiki/geospatial/index.html
|
||||
|
||||
!! Introduction
|
||||
|
||||
{{$:/plugins/tiddlywiki/geospatial/readme}}
|
||||
|
||||
!! Prerequisites
|
||||
|
||||
This demo requires that the API keys needed to access external services be obtained by the end user and manually configured. These keys are stored in the browser and so only need to be set up once. See the ''Settings'' tab of [[the plugin|$:/plugins/tiddlywiki/geospatial]] for details.
|
||||
|
||||
!! Demos
|
||||
|
||||
* Visit the ~GeoFeatures and ~GeoMarkers tabs to see the data loaded into this wiki
|
||||
* Click on a link to a layer or marker to open the corresponding tiddler that includes a map
|
||||
* Use the Flickr tab to retrieve geotagged photographs from Flickr
|
||||
* Visit a ~GeoMarker tiddler and use the "Call ~TravelTime" button to calculate an isochrone from that location using the ~TravelTime API
|
||||
|
||||
! Map Showing All Features and Markers
|
||||
|
||||
<$geomap
|
||||
state=<<qualify "$:/state/demo-map">>
|
||||
startPosition="bounds"
|
||||
>
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/GeoBaseLayer]]">
|
||||
<$geobaselayer title=<<currentTiddler>>/>
|
||||
</$list>
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/GeoMarker]]">
|
||||
<$geolayer lat={{!!lat}} long={{!!long}} alt={{!!alt}} color={{!!color}} name={{!!caption}}/>
|
||||
</$list>
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/GeoFeature]]">
|
||||
<$geolayer json={{!!text}} color={{!!color}} name={{!!caption}}/>
|
||||
</$list>
|
||||
</$geomap>
|
||||
|
||||
<<tabs tabsList:"[all[tiddlers+shadows]tag[$:/tags/GeospatialDemo]]" default:"GeoMarkers">>
|
||||
53
editions/geospatialdemo/tiddlers/Markers.tid
Normal file
53
editions/geospatialdemo/tiddlers/Markers.tid
Normal file
@@ -0,0 +1,53 @@
|
||||
title: GeoMarkers
|
||||
tags: $:/tags/GeospatialDemo
|
||||
|
||||
|
||||
|
||||
\procedure onsuccess()
|
||||
<$action-setfield
|
||||
$tiddler="CurrentLocation"
|
||||
tags="$:/tags/GeoMarker"
|
||||
timestamp=<<timestamp>>
|
||||
lat=<<latitude>>
|
||||
long=<<longitude>>
|
||||
alt=<<altitude>>
|
||||
accuracy=<<accuracy>>
|
||||
altitudeAccuracy=<<altitudeAccuracy>>
|
||||
heading=<<heading>>
|
||||
speed=<<speed>>
|
||||
/>
|
||||
\end
|
||||
\procedure onerror()
|
||||
<$action-setfield
|
||||
$tiddler="CurrentLocation"
|
||||
$field="text"
|
||||
$value=<<error>>
|
||||
/>
|
||||
\end
|
||||
\procedure onclick()
|
||||
<$action-sendmessage
|
||||
$message="tm-request-geolocation"
|
||||
actionsSuccess=<<onsuccess>>
|
||||
actionsError=<<onerror>>
|
||||
/>
|
||||
\end
|
||||
|
||||
This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (identified by the tag <<tag "$:/tags/GeoMarker">>). A ~GeoJSON marker identifies a location via latitude and longitude (and optional altitude) and may also contain associated metadata in JSON format.
|
||||
|
||||
Click this button to create a marker from the current location. Your browser will ask for permission before granting the request. On some browsers it takes a couple of seconds for the location to appear.
|
||||
|
||||
<$button actions=<<onclick>>>
|
||||
Request location
|
||||
</$button>
|
||||
|
||||
{{CurrentLocation}}
|
||||
|
||||
<ul>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort[caption]]">
|
||||
<li>
|
||||
<$link>
|
||||
<$view field="caption"><$view field="title"/></$view>
|
||||
</$link>
|
||||
</li>
|
||||
</$list>
|
||||
</ul>
|
||||
3
editions/geospatialdemo/tiddlers/SiteSubtitle.tid
Normal file
3
editions/geospatialdemo/tiddlers/SiteSubtitle.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/SiteSubtitle
|
||||
|
||||
Geographic Data Features for ~TiddlyWiki
|
||||
3
editions/geospatialdemo/tiddlers/SiteTitle.tid
Normal file
3
editions/geospatialdemo/tiddlers/SiteTitle.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/SiteTitle
|
||||
|
||||
[img width=200 [Geospatial Plugin Logo]]<br>Geospatial Plugin
|
||||
@@ -0,0 +1,6 @@
|
||||
title: $:/plugins/geospatial/demo/ViewTemplateBodyFilters
|
||||
tags: $:/tags/ViewTemplateBodyFilter
|
||||
list-before: $:/config/ViewTemplateBodyFilters/stylesheet
|
||||
|
||||
[tag[$:/tags/GeoFeature]then[ui/geofeature]]
|
||||
[tag[$:/tags/GeoMarker]then[ui/geomarker]]
|
||||
@@ -0,0 +1,9 @@
|
||||
title: cities/LimehouseTownHall
|
||||
tags: $:/tags/GeoMarker
|
||||
caption: Limehouse Town Hall
|
||||
lat: 51.51216651476898
|
||||
long: -0.03138562132137639
|
||||
alt: 0
|
||||
|
||||
This is Limehouse Town Hall!
|
||||
|
||||
9
editions/geospatialdemo/tiddlers/cities/Motovun.tid
Normal file
9
editions/geospatialdemo/tiddlers/cities/Motovun.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: cities/Motovun
|
||||
tags: $:/tags/GeoMarker
|
||||
icon: Motovun Jack.svg
|
||||
caption: Motovun
|
||||
lat: 45.336453407749225
|
||||
long: 13.828231379455806
|
||||
alt: 0
|
||||
|
||||
This is Motovun!
|
||||
8
editions/geospatialdemo/tiddlers/cities/NewYork.tid
Normal file
8
editions/geospatialdemo/tiddlers/cities/NewYork.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: cities/NewYork
|
||||
tags: $:/tags/GeoMarker
|
||||
caption: New York
|
||||
lat: 40.712778
|
||||
long: -74.006111
|
||||
alt: 0
|
||||
|
||||
This is New York!
|
||||
8
editions/geospatialdemo/tiddlers/cities/Oxford.tid
Normal file
8
editions/geospatialdemo/tiddlers/cities/Oxford.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: cities/Oxford
|
||||
tags: $:/tags/GeoMarker
|
||||
caption: Oxford
|
||||
lat: 51.751944
|
||||
long: -1.257778
|
||||
alt: 0
|
||||
|
||||
This is Oxford!
|
||||
8
editions/geospatialdemo/tiddlers/cities/Toronto.tid
Normal file
8
editions/geospatialdemo/tiddlers/cities/Toronto.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: cities/Toronto
|
||||
tags: $:/tags/GeoMarker
|
||||
caption: Toronto
|
||||
lat: 43.651070
|
||||
long: -79.347015
|
||||
alt: 0
|
||||
|
||||
This is Toronto!
|
||||
8
editions/geospatialdemo/tiddlers/cities/Winchester.tid
Normal file
8
editions/geospatialdemo/tiddlers/cities/Winchester.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: cities/Winchester
|
||||
tags: $:/tags/GeoMarker
|
||||
caption: Winchester
|
||||
lat: 51.0632
|
||||
long: -1.308
|
||||
alt: 0
|
||||
|
||||
This is Winchester!
|
||||
@@ -0,0 +1,5 @@
|
||||
title: $:/config/flickr-param/
|
||||
|
||||
album-id: 72157630297432522
|
||||
user-id: 35468148136@N01
|
||||
group-id: 22075379@N00
|
||||
4
editions/geospatialdemo/tiddlers/default-import-spec.tid
Normal file
4
editions/geospatialdemo/tiddlers/default-import-spec.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/config/plugins/tiddlywiki/xlsx-utils/default-import-spec
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
$:/_importspec/RealEstate/
|
||||
BIN
editions/geospatialdemo/tiddlers/favicon.png
Normal file
BIN
editions/geospatialdemo/tiddlers/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
2
editions/geospatialdemo/tiddlers/favicon.png.meta
Normal file
2
editions/geospatialdemo/tiddlers/favicon.png.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
title: $:/favicon.ico
|
||||
type: image/png
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
title: $:/geospatialdemo/features/canada-census-subdivision-millesime
|
||||
caption: Canada Census Subdivisions Millesime
|
||||
type: application/json
|
||||
tags: $:/tags/GeoFeature
|
||||
color: #f8f
|
||||
109
editions/geospatialdemo/tiddlers/features/denver-bikerental.tid
Normal file
109
editions/geospatialdemo/tiddlers/features/denver-bikerental.tid
Normal file
@@ -0,0 +1,109 @@
|
||||
title: $:/geospatialdemo/features/denver/bikerental
|
||||
caption: Denver bike rentals as ~GeoJSON points
|
||||
tags: $:/tags/GeoFeature
|
||||
type: application/json
|
||||
color: blue
|
||||
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-104.9998241,
|
||||
39.7471494
|
||||
]
|
||||
},
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is a B-Cycle Station. Come pick up a bike and pay by the hour. What a deal!"
|
||||
},
|
||||
"id": 51
|
||||
},
|
||||
{
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-104.9983545,
|
||||
39.7502833
|
||||
]
|
||||
},
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is a B-Cycle Station. Come pick up a bike and pay by the hour. What a deal!"
|
||||
},
|
||||
"id": 52
|
||||
},
|
||||
{
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-104.9963919,
|
||||
39.7444271
|
||||
]
|
||||
},
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is a B-Cycle Station. Come pick up a bike and pay by the hour. What a deal!"
|
||||
},
|
||||
"id": 54
|
||||
},
|
||||
{
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-104.9960754,
|
||||
39.7498956
|
||||
]
|
||||
},
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is a B-Cycle Station. Come pick up a bike and pay by the hour. What a deal!"
|
||||
},
|
||||
"id": 55
|
||||
},
|
||||
{
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-104.9933717,
|
||||
39.7477264
|
||||
]
|
||||
},
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is a B-Cycle Station. Come pick up a bike and pay by the hour. What a deal!"
|
||||
},
|
||||
"id": 57
|
||||
},
|
||||
{
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-104.9913392,
|
||||
39.7432392
|
||||
]
|
||||
},
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is a B-Cycle Station. Come pick up a bike and pay by the hour. What a deal!"
|
||||
},
|
||||
"id": 58
|
||||
},
|
||||
{
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
-104.9788452,
|
||||
39.6933755
|
||||
]
|
||||
},
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is a B-Cycle Station. Come pick up a bike and pay by the hour. What a deal!"
|
||||
},
|
||||
"id": 74
|
||||
}
|
||||
]
|
||||
}
|
||||
63
editions/geospatialdemo/tiddlers/features/denver-campus.tid
Normal file
63
editions/geospatialdemo/tiddlers/features/denver-campus.tid
Normal file
@@ -0,0 +1,63 @@
|
||||
title: $:/geospatialdemo/features/denver/campus
|
||||
caption: Denver Auraria West Campus as ~GeoJSON multipolygons
|
||||
tags: $:/tags/GeoFeature
|
||||
type: application/json
|
||||
color: purple
|
||||
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "This is the Auraria West Campus",
|
||||
"style": {
|
||||
"weight": 2,
|
||||
"color": "#999",
|
||||
"opacity": 1,
|
||||
"fillColor": "#B0DE5C",
|
||||
"fillOpacity": 0.8
|
||||
}
|
||||
},
|
||||
"geometry": {
|
||||
"type": "MultiPolygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
[-105.00432014465332, 39.74732195489861],
|
||||
[-105.00715255737305, 39.74620006835170],
|
||||
[-105.00921249389647, 39.74468219277038],
|
||||
[-105.01067161560059, 39.74362625960105],
|
||||
[-105.01195907592773, 39.74290029616054],
|
||||
[-105.00989913940431, 39.74078835902781],
|
||||
[-105.00758171081543, 39.74059036160317],
|
||||
[-105.00346183776855, 39.74059036160317],
|
||||
[-105.00097274780272, 39.74059036160317],
|
||||
[-105.00062942504881, 39.74072235994946],
|
||||
[-105.00020027160645, 39.74191033368865],
|
||||
[-105.00071525573731, 39.74276830198601],
|
||||
[-105.00097274780272, 39.74369225589818],
|
||||
[-105.00097274780272, 39.74461619742136],
|
||||
[-105.00123023986816, 39.74534214278395],
|
||||
[-105.00183105468751, 39.74613407445653],
|
||||
[-105.00432014465332, 39.74732195489861]
|
||||
],[
|
||||
[-105.00361204147337, 39.74354376414072],
|
||||
[-105.00301122665405, 39.74278480127163],
|
||||
[-105.00221729278564, 39.74316428375108],
|
||||
[-105.00283956527711, 39.74390674342741],
|
||||
[-105.00361204147337, 39.74354376414072]
|
||||
]
|
||||
],[
|
||||
[
|
||||
[-105.00942707061768, 39.73989736613708],
|
||||
[-105.00942707061768, 39.73910536278566],
|
||||
[-105.00685214996338, 39.73923736397631],
|
||||
[-105.00384807586671, 39.73910536278566],
|
||||
[-105.00174522399902, 39.73903936209552],
|
||||
[-105.00041484832764, 39.73910536278566],
|
||||
[-105.00041484832764, 39.73979836621592],
|
||||
[-105.00535011291504, 39.73986436617916],
|
||||
[-105.00942707061768, 39.73989736613708]
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
56
editions/geospatialdemo/tiddlers/features/denver-freebus.tid
Normal file
56
editions/geospatialdemo/tiddlers/features/denver-freebus.tid
Normal file
@@ -0,0 +1,56 @@
|
||||
title: $:/geospatialdemo/features/denver/freebus
|
||||
caption: Denver free bus routes as ~GeoJSON linestrings
|
||||
tags: $:/tags/GeoFeature
|
||||
type: application/json
|
||||
color: green
|
||||
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[-105.00341892242432, 39.75383843460583],
|
||||
[-105.0008225440979, 39.751891803969535]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"popupContent": "This is a free bus line that will take you across downtown.",
|
||||
"underConstruction": false
|
||||
},
|
||||
"id": 1
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[-105.0008225440979, 39.751891803969535],
|
||||
[-104.99820470809937, 39.74979664004068]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"popupContent": "This is a free bus line that will take you across downtown.",
|
||||
"underConstruction": true
|
||||
},
|
||||
"id": 2
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[-104.99820470809937, 39.74979664004068],
|
||||
[-104.98689651489258, 39.741052354709055]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"popupContent": "This is a free bus line that will take you across downtown.",
|
||||
"underConstruction": false
|
||||
},
|
||||
"id": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
title: $:/geospatialdemo/features/denver/lightrail
|
||||
caption: Denver light rail stops as ~GeoJSON points
|
||||
tags: $:/tags/GeoFeature
|
||||
type: application/json
|
||||
color: red
|
||||
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "18th & California Light Rail Stop"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [-104.98999178409576, 39.74683938093904]
|
||||
}
|
||||
},{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"popupContent": "20th & Welton Light Rail Stop"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [-104.98689115047453, 39.747924136466565]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
title: $:/geospatialdemo/features/harvard-volcanoes-of-the-world
|
||||
caption: Harvard Volcanoes of the World
|
||||
type: application/json
|
||||
tags: $:/tags/GeoFeature/Hidden
|
||||
color: #f88
|
||||
54
editions/geospatialdemo/tiddlers/features/us-states.geojson
Normal file
54
editions/geospatialdemo/tiddlers/features/us-states.geojson
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
title: $:/geospatialdemo/features/us-states
|
||||
caption: US State Boundaries
|
||||
type: application/json
|
||||
tags: $:/tags/GeoFeature
|
||||
color: #88f
|
||||
@@ -0,0 +1,99 @@
|
||||
title: real-estate-demo
|
||||
caption: Real Estate Demo
|
||||
tags: $:/tags/GeospatialDemo
|
||||
|
||||
\define default-display-filter() [<currentTiddler>get<fieldname>]
|
||||
\define default-limit() 10
|
||||
|
||||
This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (identified by the tag <<tag "$:/tags/GeoMarker">>) viewed as both a map and a table.
|
||||
|
||||
<$let
|
||||
schema={{real-estate-demo/schema}}
|
||||
>
|
||||
<div>
|
||||
<$list filter="[<schema>jsonindexes[columns]]" variable="index">
|
||||
<$let
|
||||
config={{{ [<schema>jsonget[columns],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/columns/]] }}}
|
||||
>
|
||||
<div>
|
||||
<$checkbox tiddler=<<config>> field="visible" checked="yes" unchecked="no" default="yes">
|
||||
<$text text={{{ [<schema>jsonget[columns],<index>,[caption]] }}}/>
|
||||
</$checkbox>
|
||||
</div>
|
||||
</$let>
|
||||
</$list>
|
||||
</div>
|
||||
<div>
|
||||
Sorting by
|
||||
<$select tiddler="$:/config/geospatial/demo/real-estate-demo/sort-field" default="title">
|
||||
<$list filter="[<schema>jsonindexes[columns]]" variable="index">
|
||||
<option value={{{ [<schema>jsonget[columns],<index>,[name]] }}}>
|
||||
<$text text={{{ [<schema>jsonget[columns],<index>,[caption]] }}}/>
|
||||
</option>
|
||||
</$list>
|
||||
</$select>
|
||||
<$checkbox tiddler="$:/config/geospatial/demo/real-estate-demo/sort-order" field="text" checked="reverse" unchecked="normal" default="normal">
|
||||
Reverse sort order
|
||||
</$checkbox>
|
||||
</div>
|
||||
<div>
|
||||
Search: <$edit-text tiddler="$:/config/geospatial/demo/real-estate-demo/search" tag="input"/>
|
||||
</div>
|
||||
<div>
|
||||
Limit: <$edit-text tiddler="$:/config/geospatial/demo/real-estate-demo/limit" tag="input" placeholder=<<default-limit>>/>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<$list filter="[<schema>jsonindexes[columns]]" variable="index">
|
||||
<$let
|
||||
config={{{ [<schema>jsonget[columns],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/columns/]] }}}
|
||||
>
|
||||
<$list filter="[<config>get[visible]else[yes]match[yes]]" variable="ignore">
|
||||
<th>
|
||||
<$text text={{{ [<schema>jsonget[columns],<index>,[caption]] }}}/>
|
||||
</th>
|
||||
</$list>
|
||||
</$let>
|
||||
</$list>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<$let
|
||||
sortField={{{ [[$:/config/geospatial/demo/real-estate-demo/sort-field]get[text]else[title]] }}}
|
||||
sortOrder={{{ [[$:/config/geospatial/demo/real-estate-demo/sort-order]get[text]else[normal]] }}}
|
||||
limit={{{ [[$:/config/geospatial/demo/real-estate-demo/limit]get[text]] :else[<default-limit>] }}}
|
||||
>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]search:*{$:/config/geospatial/demo/real-estate-demo/search}nsort<sortField>order<sortOrder>limit<limit>]">
|
||||
<$let
|
||||
rowTiddler=<<currentTiddler>>
|
||||
>
|
||||
<$setmultiplevariables
|
||||
$names="[<schema>jsonindexes[variables]sort[]]"
|
||||
$values="[<schema>jsonindexes[variables]sort[]] :map[<schema>jsonget[variables],<currentTiddler>] :map[subfilter<currentTiddler>]"
|
||||
>
|
||||
<tr>
|
||||
<$list filter="[<schema>jsonindexes[columns]]" variable="index">
|
||||
<$let
|
||||
config={{{ [<schema>jsonget[columns],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/columns/]] }}}
|
||||
>
|
||||
<$list filter="[<config>get[visible]else[yes]match[yes]]" variable="ignore">
|
||||
<td>
|
||||
<$let
|
||||
fieldname={{{ [<schema>jsonget[columns],<index>,[name]] }}}
|
||||
displayFilter={{{ [<schema>jsonget[columns],<index>,[display]] :else[<default-display-filter>] }}}
|
||||
>
|
||||
<$text text={{{ [subfilter<displayFilter>] }}}/>
|
||||
</$let>
|
||||
</td>
|
||||
</$list>
|
||||
</$let>
|
||||
</$list>
|
||||
</tr>
|
||||
</$setmultiplevariables>
|
||||
</$let>
|
||||
</$list>
|
||||
</$let>
|
||||
</tbody>
|
||||
</table>
|
||||
</$let>
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"columns": [
|
||||
{"name": "address", "caption": "Address", "type": "string"},
|
||||
{"name": "broker", "caption": "Broker", "type": "string"},
|
||||
{"name": "city", "caption": "City", "type": "string"},
|
||||
{"name": "lat", "caption": "Latitude", "type": "number"},
|
||||
{"name": "long", "caption": "Longitude", "type": "number"},
|
||||
{"name": "price", "caption": "Price", "type": "number"},
|
||||
{"name": "salesagent", "caption": "Sales Agent", "type": "string"},
|
||||
{"name": "state", "caption": "State", "type": "string"},
|
||||
{"name": "title", "caption": "Title", "type": "string"},
|
||||
{"name": "zipcode", "caption": "Zip Code", "type": "string"},
|
||||
{"name": "census-province", "caption": "Census Province", "type": "string", "display": "[<census-data>jsonget[0],[prov_name_en],[0]]"},
|
||||
{"name": "census-division", "caption": "Census Division", "type": "string", "display": "[<census-data>jsonget[0],[cd_name_en],[0]]"},
|
||||
{"name": "census-subdivision", "caption": "Census Subdivision", "type": "string", "display": "[<census-data>jsonget[0],[csd_name_en],[0]]"},
|
||||
{"name": "nearest-volcano", "caption": "Nearest Volcano", "type": "string", "display": "[{$:/geospatialdemo/features/harvard-volcanoes-of-the-world}geonearestpoint<coords>]"}
|
||||
],
|
||||
"variables": {
|
||||
"coords": "[<rowTiddler>] :map[geopoint{!!long},{!!lat}]",
|
||||
"census-data": "[<rowTiddler>] :map[geopoint{!!long},{!!lat}geolookup{$:/geospatialdemo/features/canada-census-subdivision-millesime}]"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
title: real-estate-demo/schema
|
||||
type: application/json
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import-spec-role: row
|
||||
list: $:/_importspec/RealEstate/PropertiesRow/Field/long $:/_importspec/RealEstate/PropertiesRow/Field/lat $:/_importspec/RealEstate/PropertiesRow/Field/price $:/_importspec/RealEstate/PropertiesRow/Field/broker $:/_importspec/RealEstate/PropertiesRow/Field/salesagent $:/_importspec/RealEstate/PropertiesRow/Field/zipcode $:/_importspec/RealEstate/PropertiesRow/Field/state $:/_importspec/RealEstate/PropertiesRow/Field/city $:/_importspec/RealEstate/PropertiesRow/Field/tags $:/_importspec/RealEstate/PropertiesRow/Field/title $:/_importspec/RealEstate/PropertiesRow/Field/address
|
||||
tags:
|
||||
title: $:/_importspec/RealEstate/PropertiesRow
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -0,0 +1,7 @@
|
||||
import-field-column: Address
|
||||
import-field-name: address
|
||||
import-field-source: column
|
||||
import-spec-role: field
|
||||
title: $:/_importspec/RealEstate/PropertiesRow/Field/address
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import-field-column: Broker
|
||||
import-field-name: broker
|
||||
import-field-source: column
|
||||
import-spec-role: field
|
||||
title: $:/_importspec/RealEstate/PropertiesRow/Field/broker
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user