search.riot refactor WIP

This commit is contained in:
HORVILLE 2023-03-29 16:50:48 +02:00
parent 0e286e3008
commit ea62bb9d3f
8 changed files with 144 additions and 169 deletions

View File

@ -1,5 +1,7 @@
<school> <school>
<main class="container"> <div class="box p-2 m-2">
<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-14.655761718750002%2C40.56389453066509%2C13.601074218750002%2C51.754240074033525&amp;layer=mapnik" style="border-radius: 5px;"></iframe>
<br>
<div class="block control has-icons-left is-inline-block is-pulled-right"> <div class="block control has-icons-left is-inline-block is-pulled-right">
<input class="input" type="search" placeholder="Établissement"> <input class="input" type="search" placeholder="Établissement">
<span class="icon is-small is-left"> <span class="icon is-small is-left">
@ -29,6 +31,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
<script> <script>
@ -51,7 +54,7 @@
this.update({ this.update({
items: response items: response
}) })
console.log(this.state.items) //console.log(this.state.items)
this.state.items.forEach(etablissement => { this.state.items.forEach(etablissement => {
// calcul la moyenne // calcul la moyenne
let pct_sansmention = etablissement.fields.pct_sansmention let pct_sansmention = etablissement.fields.pct_sansmention
@ -60,10 +63,12 @@
let pct_TB = etablissement.fields.pct_tb let pct_TB = etablissement.fields.pct_tb
let pct_TBF = etablissement.fields.pct_tbf let pct_TBF = etablissement.fields.pct_tbf
let moyenne = ((pct_TBF*18)+(pct_TB*16)+(pct_B*14)+(pct_AB*12)+(pct_sansmention*10))/100 // On prend la moyenne des moyennes comprises dans la mention
// Exemple : Assez bien est entre 12 et 14 donc 13.
let moyenne = ((pct_TBF*19)+(pct_TB*17)+(pct_B*15)+(pct_AB*13)+(pct_sansmention*11g))/100
etablissement.fields.moyenne=moyenne etablissement.fields.moyenne=moyenne
console.log(etablissement.fields) //console.log(etablissement.fields)
}) })
this.update() this.update()
}) })

View File

@ -1,13 +1,13 @@
<search> <search>
<div class="box p-1 m-2"> <div class="box p-1 m-2">
<div class="columns m-1"> <div class="columns m-1">
<input onkeydown={searchF} class="input" type="input" placeholder={state.placeholder}> <input onkeydown={filterSearch} onfocusout={filterSearch} class="input" type="input" placeholder={state.placeholder}>
<button class="button ml-1" onclick={back}>&lt;</button> <button class="button ml-1" disabled={!state.currentStep} onclick={cruiseBack}>&lt;</button>
</div> </div>
<div id="list-formations"> <div id="list-formations">
<ul> <ul>
<li class="m-1" each={item in this.state.items}> <li class="m-1" each={item in this.state.items}>
<button class="button is-fullwidth" onclick={()=>filter(item.name)}> <button class="button is-fullwidth" onclick={()=>cruiseForward(item.name)}>
<span style="font-size: .75em;"><strong>{item.name}</strong></span> <span style="font-size: .75em;"><strong>{item.name}</strong></span>
<div style="margin-left: auto;"></div> <div style="margin-left: auto;"></div>
<span class="tag is-primary">{item.count}</span> <span class="tag is-primary">{item.count}</span>
@ -19,23 +19,52 @@
<script> <script>
import PAPI from '../javascript/parcoursup-link.js' import PAPI from '../javascript/parcoursup-link.js'
const searchURL = `https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-parcoursup&timezone=Europe%2FBerlin` function cruiseBack() {
}
function cruiseForward() {
}
function filterSearch() {
}
export default {
onBeforeMount(props, state) {
//Initial state
this.state = {
placeholder: "Formation",
currentStep: 0,
allItems: null,
filter: null,
items: null
}
PAPI.fetchFilieres().then((response) => {
this.state.allItems = response
this.update({
items: filterSearch(this.state.allItems)
})
})
}
}
/*const searchURL = `https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-parcoursup&timezone=Europe%2FBerlin`
async function fetchFiliere(state) { async function fetchFiliere(state) {
if (state.sousfili){ if (state.sousfili){
return PAPI.fetchSpecialites(state.sousfili) return PAPI.fetchSpecialites(state.sousfili)
//var request = await fetch(`${searchURL}&rows=0&sort=tri&facet=fil_lib_voe_acc&refine.form_lib_voe_acc=${state.sousfili}`)
} else if (state.fili && !state.sousfili){ } else if (state.fili && !state.sousfili){
return PAPI.fetchFiliere(state.fili) return PAPI.fetchFiliere(state.fili)
//var request = await fetch(`${searchURL}&rows=0&sort=tri&facet=form_lib_voe_acc&refine.fili=${state.fili}`)
} else if (!state.fili && !state.sousfili){ } else if (!state.fili && !state.sousfili){
return PAPI.fetchFilieres() return PAPI.fetchFilieres()
//var request = await fetch(`${searchURL}&rows=0&sort=tri&facet=fili`) }
} }
//let result = await request.json()
//return result["facet_groups"][0]["facets"]
}
export default function search(){ export default function search(){
return { return {
@ -108,8 +137,6 @@
}) })
} }
} }
} }*/
</script> </script>
</search> </search>

View File

@ -1,30 +1,30 @@
var filiInfo = { var filiInfo = {
css: null, css: null,
exports: null, exports: null,
template: (template, expressionTypes, bindingTypes, getComponent) => template('<div class="box p-1 m-2"><h1 class="title is-4 m-2"><a>BUT</a> / <a>BUT - Production</a> / <a>Informatique</a></h1><div class="box mt-2" style="background-color: #EAEAEA; margin: auto; width: 60%;"><p>Moyenne des admis<span class="is-pulled-right">19.3</span></p><p>Nombre de formations<span class="is-pulled-right">5</span></p><p>Capacité<span class="is-pulled-right">90</span></p><p>Sélectivité</p></div><div class="m-4"><line-graph expr9="expr9" style="height: 6rem;"></line-graph></div><div class="m-4"><line-graph expr10="expr10" style="height: 6rem;"></line-graph></div><div class="m-4"><line-graph expr11="expr11" style="height: 6rem;"></line-graph></div></div>', [{ template: (template, expressionTypes, bindingTypes, getComponent) => template('<div class="box p-1 m-2"><h1 class="title is-4 m-2"><a>BUT</a> / <a>BUT - Production</a> / <a>Informatique</a></h1><div class="box mt-2" style="background-color: #EAEAEA; margin: auto; width: 60%;"><p>Moyenne des admis<span class="is-pulled-right">19.3</span></p><p>Nombre de formations<span class="is-pulled-right">5</span></p><p>Capacité<span class="is-pulled-right">90</span></p><p>Sélectivité</p></div><div class="m-4"><line-graph expr4="expr4" style="height: 6rem;"></line-graph></div><div class="m-4"><line-graph expr5="expr5" style="height: 6rem;"></line-graph></div><div class="m-4"><line-graph expr6="expr6" style="height: 6rem;"></line-graph></div></div>', [{
type: bindingTypes.TAG, type: bindingTypes.TAG,
getComponent: getComponent, getComponent: getComponent,
evaluate: _scope => 'line-graph', evaluate: _scope => 'line-graph',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr9', redundantAttribute: 'expr4',
selector: '[expr9]' selector: '[expr4]'
}, { }, {
type: bindingTypes.TAG, type: bindingTypes.TAG,
getComponent: getComponent, getComponent: getComponent,
evaluate: _scope => 'line-graph', evaluate: _scope => 'line-graph',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr10', redundantAttribute: 'expr5',
selector: '[expr10]' selector: '[expr5]'
}, { }, {
type: bindingTypes.TAG, type: bindingTypes.TAG,
getComponent: getComponent, getComponent: getComponent,
evaluate: _scope => 'line-graph', evaluate: _scope => 'line-graph',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr11', redundantAttribute: 'expr6',
selector: '[expr11]' selector: '[expr6]'
}]), }]),
name: 'fili-info' name: 'fili-info'
}; };

View File

@ -1,38 +1,38 @@
var mainController = { var mainController = {
css: null, css: null,
exports: {}, exports: {},
template: (template, expressionTypes, bindingTypes, getComponent) => template('<div class="columns"><div class="column is-one-third"><div class="box p-3 m-2"><img class="mt-1 ml-5 mr-auto" style="margin: auto;" src="../resources/logo-parcoursup.svg"/></div><search expr12="expr12"></search></div><div class="column"><fili-info expr13="expr13"></fili-info><school expr14="expr14"></school></div></div><school-info expr15="expr15"></school-info>', [{ template: (template, expressionTypes, bindingTypes, getComponent) => template('<div class="columns"><div class="column is-one-third"><div class="box p-3 m-2"><img class="mt-1 ml-5 mr-auto" style="margin: auto;" src="../resources/logo-parcoursup.svg"/></div><search expr0="expr0"></search></div><div class="column"><fili-info expr1="expr1"></fili-info><school expr2="expr2"></school></div></div><school-info expr3="expr3"></school-info>', [{
type: bindingTypes.TAG, type: bindingTypes.TAG,
getComponent: getComponent, getComponent: getComponent,
evaluate: _scope => 'search', evaluate: _scope => 'search',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr12', redundantAttribute: 'expr0',
selector: '[expr12]' selector: '[expr0]'
}, { }, {
type: bindingTypes.TAG, type: bindingTypes.TAG,
getComponent: getComponent, getComponent: getComponent,
evaluate: _scope => 'fili-info', evaluate: _scope => 'fili-info',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr13', redundantAttribute: 'expr1',
selector: '[expr13]' selector: '[expr1]'
}, { }, {
type: bindingTypes.TAG, type: bindingTypes.TAG,
getComponent: getComponent, getComponent: getComponent,
evaluate: _scope => 'school', evaluate: _scope => 'school',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr14', redundantAttribute: 'expr2',
selector: '[expr14]' selector: '[expr2]'
}, { }, {
type: bindingTypes.TAG, type: bindingTypes.TAG,
getComponent: getComponent, getComponent: getComponent,
evaluate: _scope => 'school-info', evaluate: _scope => 'school-info',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr15', redundantAttribute: 'expr3',
selector: '[expr15]' selector: '[expr3]'
}]), }]),
name: 'main-controller' name: 'main-controller'
}; };

View File

@ -10,14 +10,14 @@ var schoolInfo = {
this.update(); this.update();
} }
}, },
template: (template, expressionTypes, bindingTypes, getComponent) => template('<div expr0="expr0" style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: #000000DD;"></div>', [{ template: (template, expressionTypes, bindingTypes, getComponent) => template('<div expr7="expr7" style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: #000000DD;"></div>', [{
type: bindingTypes.IF, type: bindingTypes.IF,
evaluate: _scope => _scope.state.enabled, evaluate: _scope => _scope.state.enabled,
redundantAttribute: 'expr0', redundantAttribute: 'expr7',
selector: '[expr0]', selector: '[expr7]',
template: template('<div style="position: absolute; top: 10%; left: 10%; width: 80%; height: 80%; background: #FFFFFF"><button expr1="expr1" class="delete is-medium">X</button><p><h2></h2></p><line-graph expr2="expr2" style="height: 90px; margin: 10px;"></line-graph></div>', [{ template: template('<div style="position: absolute; top: 10%; left: 10%; width: 80%; height: 80%; background: #FFFFFF"><button expr8="expr8" class="delete is-medium">X</button><p><h2></h2></p><line-graph expr9="expr9" style="height: 90px; margin: 10px;"></line-graph></div>', [{
redundantAttribute: 'expr1', redundantAttribute: 'expr8',
selector: '[expr1]', selector: '[expr8]',
expressions: [{ expressions: [{
type: expressionTypes.EVENT, type: expressionTypes.EVENT,
name: 'onclick', name: 'onclick',
@ -29,8 +29,8 @@ var schoolInfo = {
evaluate: _scope => 'line-graph', evaluate: _scope => 'line-graph',
slots: [], slots: [],
attributes: [], attributes: [],
redundantAttribute: 'expr2', redundantAttribute: 'expr9',
selector: '[expr2]' selector: '[expr9]'
}]) }])
}]), }]),
name: 'school-info' name: 'school-info'

View File

@ -55,7 +55,10 @@ var school = {
let pct_B = etablissement.fields.pct_b; let pct_B = etablissement.fields.pct_b;
let pct_TB = etablissement.fields.pct_tb; let pct_TB = etablissement.fields.pct_tb;
let pct_TBF = etablissement.fields.pct_tbf; let pct_TBF = etablissement.fields.pct_tbf;
let moyenne = (pct_TBF * 18 + pct_TB * 16 + pct_B * 14 + pct_AB * 12 + pct_sansmention * 10) / 100;
// On prend la moyenne des moyennes comprises dans la mention
// Exemple : Assez bien est entre 12 et 14 donc 13.
let moyenne = (pct_TBF * 19 + pct_TB * 17 + pct_B * 15 + pct_AB * 13 + pct_sansmention * 11) / 100;
etablissement.fields.moyenne = moyenne; etablissement.fields.moyenne = moyenne;
console.log(etablissement.fields); console.log(etablissement.fields);
}); });
@ -64,53 +67,53 @@ var school = {
} }
}; };
}, },
template: (template, expressionTypes, bindingTypes, getComponent) => template('<main class="container"><div class="block control has-icons-left is-inline-block is-pulled-right"><input class="input" type="search" placeholder="Établissement"/><span class="icon is-small is-left"><i class="fas fa-search"></i></span></div><table class="table is-fullwidth is-hoverable"><thead><tr><th><abbr title="name">Nom</abbr></th><th><abbr title="city">Ville</abbr></th><th><abbr title="dept">Dpt</abbr></th><th><abbr title="moyenne">Moyenne</abbr></th><th><abbr title="selectivite">Sélectivité</abbr></th></tr></thead><tbody><tr expr58="expr58"></tr></tbody></table></main>', [{ template: (template, expressionTypes, bindingTypes, getComponent) => template('<div class="box p-2 m-2"><iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-14.655761718750002%2C40.56389453066509%2C13.601074218750002%2C51.754240074033525&amp;layer=mapnik" style="border-radius: 5px;"></iframe><br/><div class="block control has-icons-left is-inline-block is-pulled-right"><input class="input" type="search" placeholder="Établissement"/><span class="icon is-small is-left"><i class="fas fa-search"></i></span></div><table class="table is-fullwidth is-hoverable"><thead><tr><th><abbr title="name">Nom</abbr></th><th><abbr title="city">Ville</abbr></th><th><abbr title="dept">Dpt</abbr></th><th><abbr title="moyenne">Moyenne</abbr></th><th><abbr title="selectivite">Sélectivité</abbr></th></tr></thead><tbody><tr expr34="expr34"></tr></tbody></table></div>', [{
type: bindingTypes.EACH, type: bindingTypes.EACH,
getKey: null, getKey: null,
condition: null, condition: null,
template: template('<td expr59="expr59"> </td><td expr60="expr60"> </td><td expr61="expr61"> </td><td expr62="expr62"> </td><td expr63="expr63"> </td>', [{ template: template('<td expr35="expr35"> </td><td expr36="expr36"> </td><td expr37="expr37"> </td><td expr38="expr38"> </td><td expr39="expr39"> </td>', [{
redundantAttribute: 'expr59', redundantAttribute: 'expr35',
selector: '[expr59]', selector: '[expr35]',
expressions: [{ expressions: [{
type: expressionTypes.TEXT, type: expressionTypes.TEXT,
childNodeIndex: 0, childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.fields.g_ea_lib_vx evaluate: _scope => _scope.etablissement.fields.g_ea_lib_vx
}] }]
}, { }, {
redundantAttribute: 'expr60', redundantAttribute: 'expr36',
selector: '[expr60]', selector: '[expr36]',
expressions: [{ expressions: [{
type: expressionTypes.TEXT, type: expressionTypes.TEXT,
childNodeIndex: 0, childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.fields.ville_etab evaluate: _scope => _scope.etablissement.fields.ville_etab
}] }]
}, { }, {
redundantAttribute: 'expr61', redundantAttribute: 'expr37',
selector: '[expr61]', selector: '[expr37]',
expressions: [{ expressions: [{
type: expressionTypes.TEXT, type: expressionTypes.TEXT,
childNodeIndex: 0, childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.fields.dep evaluate: _scope => _scope.etablissement.fields.dep
}] }]
}, { }, {
redundantAttribute: 'expr62', redundantAttribute: 'expr38',
selector: '[expr62]', selector: '[expr38]',
expressions: [{ expressions: [{
type: expressionTypes.TEXT, type: expressionTypes.TEXT,
childNodeIndex: 0, childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.fields.moyenne evaluate: _scope => _scope.etablissement.fields.moyenne
}] }]
}, { }, {
redundantAttribute: 'expr63', redundantAttribute: 'expr39',
selector: '[expr63]', selector: '[expr39]',
expressions: [{ expressions: [{
type: expressionTypes.TEXT, type: expressionTypes.TEXT,
childNodeIndex: 0, childNodeIndex: 0,
evaluate: _scope => _scope.etablissement.fields.taux_acces_ens evaluate: _scope => _scope.etablissement.fields.taux_acces_ens
}] }]
}]), }]),
redundantAttribute: 'expr58', redundantAttribute: 'expr34',
selector: '[expr58]', selector: '[expr34]',
itemName: 'etablissement', itemName: 'etablissement',
indexName: null, indexName: null,
evaluate: _scope => _scope.state.items evaluate: _scope => _scope.state.items

View File

@ -29,147 +29,86 @@ class PAPI {
} }
} }
async function fetchFiliere(state) { function filterSearch() {}
if (state.sousfili) {
return PAPI.fetchSpecialites(state.sousfili);
//var request = await fetch(`${searchURL}&rows=0&sort=tri&facet=fil_lib_voe_acc&refine.form_lib_voe_acc=${state.sousfili}`)
} else if (state.fili && !state.sousfili) {
return PAPI.fetchFiliere(state.fili);
//var request = await fetch(`${searchURL}&rows=0&sort=tri&facet=form_lib_voe_acc&refine.fili=${state.fili}`)
} else if (!state.fili && !state.sousfili) {
return PAPI.fetchFilieres();
//var request = await fetch(`${searchURL}&rows=0&sort=tri&facet=fili`)
}
//let result = await request.json()
//return result["facet_groups"][0]["facets"]
}
var search = { var search = {
css: null, css: null,
exports: function search() { exports: {
return {
onBeforeMount(props, state) { onBeforeMount(props, state) {
// initial state //Initial state
this.state = { this.state = {
placeholder: "Formation", placeholder: "Formation",
items: null, currentStep: 0,
allitems: null, allItems: null,
fili: null, filter: null,
sousfili: null items: null
}; };
fetchFiliere(this.state).then(response => { PAPI.fetchFilieres().then(response => {
this.state.allItems = response;
this.update({ this.update({
items: response, items: filterSearch(this.state.allItems)
allitems: response
});
});
},
searchF(e) {
let responseFiltered = [];
this.state.allitems.forEach(formation => {
if (formation.name.toUpperCase().includes(e.target.value.toUpperCase())) {
responseFiltered.push(formation);
}
});
this.update({
items: responseFiltered
});
},
filter(fili) {
console.log("filter! " + fili);
if (this.state.placeholder === "Filière de formation") {
this.update({
placeholder: "Filière de formation détaillée",
sousfili: fili
});
} else if (this.state.placeholder = "Formation") {
this.update({
placeholder: "Filière de formation",
fili: fili
});
}
fetchFiliere(this.state).then(response => {
this.update({
allitems: response,
items: response
});
console.log(this.state.items);
});
},
back() {
console.log("back");
if (this.state.placeholder === "Filière de formation") {
this.update({
placeholder: "Formation",
fili: null
});
} else if (this.state.placeholder = "Filière de formation détaillée") {
this.update({
placeholder: "Filière de formation",
sousfili: null
});
}
fetchFiliere(this.state).then(response => {
this.update({
allitems: response,
items: response
}); });
}); });
} }
};
}, },
template: (template, expressionTypes, bindingTypes, getComponent) => template('<div class="box p-1 m-2"><div class="columns m-1"><input expr16="expr16" class="input" type="input"/><button expr17="expr17" class="button ml-1">&lt;</button></div><div id="list-formations"><ul><li expr18="expr18" class="m-1"></li></ul></div></div>', [{ template: (template, expressionTypes, bindingTypes, getComponent) => template('<div class="box p-1 m-2"><div class="columns m-1"><input expr10="expr10" class="input" type="input"/><button expr11="expr11" class="button ml-1">&lt;</button></div><div id="list-formations"><ul><li expr12="expr12" class="m-1"></li></ul></div></div>', [{
redundantAttribute: 'expr16', redundantAttribute: 'expr10',
selector: '[expr16]', selector: '[expr10]',
expressions: [{ expressions: [{
type: expressionTypes.EVENT, type: expressionTypes.EVENT,
name: 'onkeydown', name: 'onkeydown',
evaluate: _scope => _scope.searchF evaluate: _scope => _scope.filterSearch
}, {
type: expressionTypes.EVENT,
name: 'onfocusout',
evaluate: _scope => _scope.filterSearch
}, { }, {
type: expressionTypes.ATTRIBUTE, type: expressionTypes.ATTRIBUTE,
name: 'placeholder', name: 'placeholder',
evaluate: _scope => _scope.state.placeholder evaluate: _scope => _scope.state.placeholder
}] }]
}, { }, {
redundantAttribute: 'expr17', redundantAttribute: 'expr11',
selector: '[expr17]', selector: '[expr11]',
expressions: [{ expressions: [{
type: expressionTypes.ATTRIBUTE,
name: 'disabled',
evaluate: _scope => !_scope.state.currentStep
}, {
type: expressionTypes.EVENT, type: expressionTypes.EVENT,
name: 'onclick', name: 'onclick',
evaluate: _scope => _scope.back evaluate: _scope => _scope.cruiseBack
}] }]
}, { }, {
type: bindingTypes.EACH, type: bindingTypes.EACH,
getKey: null, getKey: null,
condition: null, condition: null,
template: template('<button expr19="expr19" class="button is-fullwidth"><span style="font-size: .75em;"><strong expr20="expr20"> </strong></span><div style="margin-left: auto;"></div><span expr21="expr21" class="tag is-primary"> </span></button>', [{ template: template('<button expr13="expr13" class="button is-fullwidth"><span style="font-size: .75em;"><strong expr14="expr14"> </strong></span><div style="margin-left: auto;"></div><span expr15="expr15" class="tag is-primary"> </span></button>', [{
redundantAttribute: 'expr19', redundantAttribute: 'expr13',
selector: '[expr19]', selector: '[expr13]',
expressions: [{ expressions: [{
type: expressionTypes.EVENT, type: expressionTypes.EVENT,
name: 'onclick', name: 'onclick',
evaluate: _scope => () => _scope.filter(_scope.item.name) evaluate: _scope => () => _scope.cruiseForward(_scope.item.name)
}] }]
}, { }, {
redundantAttribute: 'expr20', redundantAttribute: 'expr14',
selector: '[expr20]', selector: '[expr14]',
expressions: [{ expressions: [{
type: expressionTypes.TEXT, type: expressionTypes.TEXT,
childNodeIndex: 0, childNodeIndex: 0,
evaluate: _scope => _scope.item.name evaluate: _scope => _scope.item.name
}] }]
}, { }, {
redundantAttribute: 'expr21', redundantAttribute: 'expr15',
selector: '[expr21]', selector: '[expr15]',
expressions: [{ expressions: [{
type: expressionTypes.TEXT, type: expressionTypes.TEXT,
childNodeIndex: 0, childNodeIndex: 0,
evaluate: _scope => _scope.item.count evaluate: _scope => _scope.item.count
}] }]
}]), }]),
redundantAttribute: 'expr18', redundantAttribute: 'expr12',
selector: '[expr18]', selector: '[expr12]',
itemName: 'item', itemName: 'item',
indexName: null, indexName: null,
evaluate: _scope => _scope.state.items evaluate: _scope => _scope.state.items

View File

@ -1,6 +1,7 @@
body, html { body, html {
width: 100%; width: 100vw;
height: 100%; height: 100vh;
min-height: 100vh;
top: 0px; top: 0px;
left: 0px; left: 0px;
background-color: #EFEFEF; background-color: #EFEFEF;