mirror of
https://github.com/flynx/pWiki.git
synced 2026-10-03 12:51:40 +00:00
Compare commits
3 Commits
b9b11ecbda
...
49ee54539f
| Author | SHA1 | Date | |
|---|---|---|---|
| 49ee54539f | |||
| 3829ce9764 | |||
| 8b5f156816 |
26
v3/package-lock.json
generated
26
v3/package-lock.json
generated
@ -13,10 +13,12 @@
|
|||||||
"ig-actions": "*",
|
"ig-actions": "*",
|
||||||
"ig-features": "*",
|
"ig-features": "*",
|
||||||
"ig-object": "*",
|
"ig-object": "*",
|
||||||
"ig-test": "*",
|
|
||||||
"ig-types": "*",
|
"ig-types": "*",
|
||||||
"requirejs": "*",
|
"requirejs": "*",
|
||||||
"uuid": "*"
|
"uuid": "*"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"ig-test": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/balanced-match": {
|
"node_modules/balanced-match": {
|
||||||
@ -44,6 +46,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
||||||
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
|
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.1.90"
|
"node": ">=0.1.90"
|
||||||
@ -53,12 +56,14 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/fs.realpath": {
|
"node_modules/fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/glob": {
|
"node_modules/glob": {
|
||||||
@ -91,6 +96,7 @@
|
|||||||
"version": "2.17.2",
|
"version": "2.17.2",
|
||||||
"resolved": "https://registry.npmjs.org/ig-argv/-/ig-argv-2.17.2.tgz",
|
"resolved": "https://registry.npmjs.org/ig-argv/-/ig-argv-2.17.2.tgz",
|
||||||
"integrity": "sha512-EGm3Sx1vo9gnQKh2CJKdyNyY0IsKljz2zTUt1SV3BrErtRvFz3WuH5ltoD0ErSEUmyY5mtOklTrFSmXqA2joLQ==",
|
"integrity": "sha512-EGm3Sx1vo9gnQKh2CJKdyNyY0IsKljz2zTUt1SV3BrErtRvFz3WuH5ltoD0ErSEUmyY5mtOklTrFSmXqA2joLQ==",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ig-object": "^5.4.16"
|
"ig-object": "^5.4.16"
|
||||||
@ -100,6 +106,7 @@
|
|||||||
"version": "5.6.0",
|
"version": "5.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/ig-object/-/ig-object-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/ig-object/-/ig-object-5.6.0.tgz",
|
||||||
"integrity": "sha512-5MAUWSwfHKQNrgLroXxBHjlhrhVbhzlVqvUcfMDjUeK/ufWQ9THE0HDcvhfu+YrPfRjTR2QpD2Ygp+2H4O0C6g==",
|
"integrity": "sha512-5MAUWSwfHKQNrgLroXxBHjlhrhVbhzlVqvUcfMDjUeK/ufWQ9THE0HDcvhfu+YrPfRjTR2QpD2Ygp+2H4O0C6g==",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-3-Clause"
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/ig-doc": {
|
"node_modules/ig-doc": {
|
||||||
@ -141,9 +148,10 @@
|
|||||||
"license": "BSD-3-Clause"
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/ig-test": {
|
"node_modules/ig-test": {
|
||||||
"version": "1.6.7",
|
"version": "1.6.9",
|
||||||
"resolved": "https://registry.npmjs.org/ig-test/-/ig-test-1.6.7.tgz",
|
"resolved": "https://registry.npmjs.org/ig-test/-/ig-test-1.6.9.tgz",
|
||||||
"integrity": "sha512-+gHKSemPMbMk+UjDaY74BwYmxWh1tRPa6vnoDf8aauXaFdoYkYLKM6lhEB5koerTXK69M9aPw609o7r91O5Z6Q==",
|
"integrity": "sha512-4XpSQjMDhogxrbtKvIHyoV750MZSOKOEz/Yg1UM5cwwTloAfCUgZWqMe+3KADCF4Ncqb9Bgdowf/cfvM0Pn3eg==",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colors": "1.4.0",
|
"colors": "1.4.0",
|
||||||
@ -159,12 +167,14 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/ig-test/node_modules/brace-expansion": {
|
"node_modules/ig-test/node_modules/brace-expansion": {
|
||||||
"version": "1.1.15",
|
"version": "1.1.15",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz",
|
||||||
"integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==",
|
"integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
@ -176,6 +186,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||||
"deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
|
"deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs.realpath": "^1.0.0",
|
"fs.realpath": "^1.0.0",
|
||||||
@ -196,12 +207,14 @@
|
|||||||
"version": "5.6.0",
|
"version": "5.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/ig-object/-/ig-object-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/ig-object/-/ig-object-5.6.0.tgz",
|
||||||
"integrity": "sha512-5MAUWSwfHKQNrgLroXxBHjlhrhVbhzlVqvUcfMDjUeK/ufWQ9THE0HDcvhfu+YrPfRjTR2QpD2Ygp+2H4O0C6g==",
|
"integrity": "sha512-5MAUWSwfHKQNrgLroXxBHjlhrhVbhzlVqvUcfMDjUeK/ufWQ9THE0HDcvhfu+YrPfRjTR2QpD2Ygp+2H4O0C6g==",
|
||||||
|
"dev": true,
|
||||||
"license": "BSD-3-Clause"
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/ig-test/node_modules/minimatch": {
|
"node_modules/ig-test/node_modules/minimatch": {
|
||||||
"version": "3.1.5",
|
"version": "3.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
|
||||||
"integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
|
"integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
@ -226,6 +239,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||||
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"once": "^1.3.0",
|
"once": "^1.3.0",
|
||||||
@ -236,6 +250,7 @@
|
|||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
@ -281,6 +296,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
@ -290,6 +306,7 @@
|
|||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
@ -341,6 +358,7 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1286,16 +1286,6 @@ module.parser = {
|
|||||||
// This also works for cases where slots override slots they
|
// This also works for cases where slots override slots they
|
||||||
// are contained in, this will not lead to recursion.
|
// are contained in, this will not lead to recursion.
|
||||||
//
|
//
|
||||||
// XXX do we actually need <content/>??
|
|
||||||
// <slot slot>
|
|
||||||
// <slot slot.content/>
|
|
||||||
// </slot>
|
|
||||||
// XXX do we show a slot with unfilled content???
|
|
||||||
// ...what's the point in having <content>, can't is just
|
|
||||||
// be replaced by a slot?
|
|
||||||
// ...content + hidden allows us not just to fill a slot
|
|
||||||
// but to also place it...
|
|
||||||
// XXX revise/document how shown/hidden work...
|
|
||||||
// XXX revise the use of hidden/shown use mechanic and if it's
|
// XXX revise the use of hidden/shown use mechanic and if it's
|
||||||
// needed...
|
// needed...
|
||||||
slot: Macro(
|
slot: Macro(
|
||||||
@ -1321,50 +1311,22 @@ module.parser = {
|
|||||||
: name in slots)
|
: name in slots)
|
||||||
|
|
||||||
// set slot value...
|
// set slot value...
|
||||||
// XXX simplify this...
|
|
||||||
var stack = []
|
|
||||||
slots[name]
|
|
||||||
&& stack.push(slots[name])
|
|
||||||
delete slots[name]
|
|
||||||
text = text ?
|
text = text ?
|
||||||
parser.expand(this, text ?? [], state)
|
parser.expand(this, text ?? [], state)
|
||||||
: text
|
: text
|
||||||
if(body && text){
|
if(body && text){
|
||||||
stack.push(body)
|
|
||||||
var slot = text
|
var slot = text
|
||||||
} else {
|
} else {
|
||||||
var slot = body ?? text }
|
var slot = body ?? text }
|
||||||
var original = slot
|
slots[name] = slot
|
||||||
slots[name]
|
|
||||||
&& stack.unshift(slot)
|
|
||||||
slot = slots[name] ??= slot
|
|
||||||
// handle <content/>...
|
|
||||||
for(prev of stack.reverse()){
|
|
||||||
// get the first <content/>
|
|
||||||
// NOTE: this is a flat search because we can't
|
|
||||||
// have indirect nesting (see: .group(..))
|
|
||||||
for(var i in prev){
|
|
||||||
if(typeof(prev[i]) != 'string'
|
|
||||||
&& prev[i].name == 'content'){
|
|
||||||
break }
|
|
||||||
i = null }
|
|
||||||
i != null
|
|
||||||
&& (prev[i].value = [...slot])
|
|
||||||
&& slot.splice(0, slot.length,
|
|
||||||
...prev
|
|
||||||
// remove nested slot handlers...
|
|
||||||
// XXX do we need this???
|
|
||||||
.filter(function(e){
|
|
||||||
return typeof(e) != 'function'
|
|
||||||
|| e.slot != name }) ) }
|
|
||||||
return hidden ?
|
return hidden ?
|
||||||
''
|
''
|
||||||
: Object.assign(
|
: Object.assign(
|
||||||
function(st){
|
function(st){
|
||||||
return ((st ?? state).slots ?? {})[name]
|
return ((st ?? state).slots ?? {})[name]
|
||||||
?? original },
|
?? slot },
|
||||||
{slot: name}) }) }),
|
{slot: name}) }) }),
|
||||||
'content': ['slot'],
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@ -54,24 +54,8 @@ test.Setups({
|
|||||||
...ins.map(function(e){
|
...ins.map(function(e){
|
||||||
return e + '<slot slot>third</slot>' }),
|
return e + '<slot slot>third</slot>' }),
|
||||||
'third' ] },
|
'third' ] },
|
||||||
slot_content_empty: function(assert){
|
|
||||||
return [
|
|
||||||
'@slot(slot body="[[ <content/> ]]")',
|
|
||||||
'<slot slot>[[ <content/> ]]</slot>',
|
|
||||||
'[[ ]]' ] },
|
|
||||||
slot_content_default: function(assert){
|
|
||||||
return [
|
|
||||||
'@slot(slot default body="[[ <content/> ]]")',
|
|
||||||
'<slot slot default>[[ <content/> ]]</slot>',
|
|
||||||
'[[ default ]]' ] },
|
|
||||||
slot_content_fill: function(assert){
|
|
||||||
var ins = this.slot_content_default(assert)
|
|
||||||
var expect = ins.pop()
|
|
||||||
return [
|
|
||||||
...ins.map(function(i){
|
|
||||||
return i +'@slot(slot value)' }),
|
|
||||||
expect.replace('default', 'value') ] },
|
|
||||||
|
|
||||||
|
// XXX these are an alternative to <content/>...
|
||||||
slot_nested: function(assert){
|
slot_nested: function(assert){
|
||||||
return [
|
return [
|
||||||
'<slot slot>[[ <slot slot.content/> ]]</slot>@slot(slot.content value)',
|
'<slot slot>[[ <slot slot.content/> ]]</slot>@slot(slot.content value)',
|
||||||
@ -81,42 +65,7 @@ test.Setups({
|
|||||||
'<slot slot>[[ <slot slot.content/> ]]</slot>@slot(slot value)',
|
'<slot slot>[[ <slot slot.content/> ]]</slot>@slot(slot value)',
|
||||||
'value' ] },
|
'value' ] },
|
||||||
|
|
||||||
// XXX the question with the next tow is:
|
/* XXX SHOWN_HIDDEN
|
||||||
// should body override or nest?
|
|
||||||
// ...both are logical but in either case the result should be
|
|
||||||
// consistent.
|
|
||||||
//
|
|
||||||
// XXX should the new body/content override or expand the original???
|
|
||||||
slot_content_content: function(assert){
|
|
||||||
var ins = this.slot_content_default(assert)
|
|
||||||
var expect = ins.pop()
|
|
||||||
return [
|
|
||||||
...ins.map(function(i){
|
|
||||||
return i +'@slot(slot body="(( @content() ))")' }),
|
|
||||||
// XXX should this override the default above???
|
|
||||||
//expect.replace('default', '(( default ))') ] },
|
|
||||||
expect.replace('default', '(( ))') ] },
|
|
||||||
slot_content_content_content: function(assert){
|
|
||||||
var ins = this.slot_content_content(assert)
|
|
||||||
var expect = ins.pop()
|
|
||||||
return [
|
|
||||||
...ins.map(function(i){
|
|
||||||
return i +'@slot(slot body="<< @content() >>")' }),
|
|
||||||
// XXX should this override the default above???
|
|
||||||
//expect.replace('default', '(( default ))') ] },
|
|
||||||
expect.replace('(( ))', '(( << >> ))') ] },
|
|
||||||
// XXX if we are expanding (see above) why are we overriding here???
|
|
||||||
slot_content_content_fill: function(assert){
|
|
||||||
var ins = this.slot_content_content(assert)
|
|
||||||
var expect = ins.pop()
|
|
||||||
return [
|
|
||||||
...ins.map(function(i){
|
|
||||||
return i +'@slot(slot value)' }),
|
|
||||||
expect.replace('(( ))', '(( value ))') ] },
|
|
||||||
//expect.replace('(( ))', 'value') ] },
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// XXX these need to be revised...
|
// XXX these need to be revised...
|
||||||
// ...do we actually need hidden/shown???
|
// ...do we actually need hidden/shown???
|
||||||
//
|
//
|
||||||
@ -146,6 +95,7 @@ test.Setups({
|
|||||||
...ins.map(function(i){
|
...ins.map(function(i){
|
||||||
return i +'@slot(slot shown)' }),
|
return i +'@slot(slot shown)' }),
|
||||||
'' ] },
|
'' ] },
|
||||||
|
//*/
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user