@quenk/wml 2.14.1 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/compile/codegen.d.ts +9 -0
- package/lib/compile/codegen.js +45 -3
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +55 -1
- package/lib/parse/ast.d.ts +20 -6
- package/lib/parse/ast.js +25 -8
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +27 -6
- package/lib/parse/generated.js +2914 -2403
- package/lib/parse/test.js +29 -56
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +29 -68
- package/lib/parse/wml.y +59 -19
- package/lib/view/frame.d.ts +43 -31
- package/lib/view/frame.js +10 -55
- package/lib/view/frame.js.map +1 -1
- package/lib/view/frame.ts +69 -62
- package/lib/view/index.d.ts +7 -6
- package/lib/view/index.js +3 -2
- package/lib/view/index.js.map +1 -1
- package/lib/view/index.ts +9 -7
- package/package.json +6 -2
package/lib/parse/test.js
CHANGED
|
@@ -112,39 +112,12 @@ exports.tests = {
|
|
|
112
112
|
{% endif %}
|
|
113
113
|
</Tag>`,
|
|
114
114
|
},
|
|
115
|
-
"should parse short fun statements": {
|
|
116
|
-
input: "{% fun vue () = <View/> %}",
|
|
117
|
-
},
|
|
118
|
-
"should parse short fun statements with arguments": {
|
|
119
|
-
input: "{% fun vue (a:String, b:String, c:String) = " +
|
|
120
|
-
"<View a={{a}} b={{b}} c={{c}}/> %}",
|
|
121
|
-
},
|
|
122
|
-
"should parse short fun statements with type parameters": {
|
|
123
|
-
input: "{% fun vue [A,B:C,C] (a:A, b:B) = " + "{{ (a + b) + c }} %}",
|
|
124
|
-
},
|
|
125
|
-
"should parse extended fun statements": {
|
|
126
|
-
input: "{% fun vue () %} <View/> {% endfun %}",
|
|
127
|
-
},
|
|
128
|
-
"should parse extended fun statements with arguments": {
|
|
129
|
-
input: "{% fun vue (a:String, b:String, c:String) %}" +
|
|
130
|
-
"<View a={{a}} b={{b}} c={{c}}/> {% endfun %}",
|
|
131
|
-
},
|
|
132
|
-
"should parse extended fun statements with type parameters": {
|
|
133
|
-
input: "{% fun vue [A,B:C,C] (a:A, b:B) %} {{ ((a + b) + c) }} {% endfun %}",
|
|
134
|
-
},
|
|
135
115
|
"should parse binary expressions": {
|
|
136
116
|
input: "<p>{{(Styles.A + Styles.B)}}</p>",
|
|
137
117
|
},
|
|
138
118
|
"should parse complicated expressions": {
|
|
139
119
|
input: '<div class={{((Styles.A + " ") + Style.B)}}/>',
|
|
140
120
|
},
|
|
141
|
-
"should allow for statement as child of fun": {
|
|
142
|
-
input: "{% fun sven () %} {% for a in b %} {{b}} {% endfor %} {% endfun %}",
|
|
143
|
-
},
|
|
144
|
-
"should allow if statement as child of fun": {
|
|
145
|
-
input: "{% fun ate (o:Object) %} {% if a %} {{a}} {% else %} {{a}} " +
|
|
146
|
-
"{% endif %} {% endfun %}",
|
|
147
|
-
},
|
|
148
121
|
"should allow for booleans in interpolations": {
|
|
149
122
|
input: "<bool active={{true}}>{{if fun() then false else true}}</bool>",
|
|
150
123
|
},
|
|
@@ -192,33 +165,9 @@ exports.tests = {
|
|
|
192
165
|
"should allow fun application with context": {
|
|
193
166
|
input: "<div>{{ <panel(@,12)> }}</div>",
|
|
194
167
|
},
|
|
195
|
-
"should parse list types": {
|
|
196
|
-
input: "{% fun action [A] (s: String[], a:A[]) = {{ '${s}${a}' }} %}",
|
|
197
|
-
},
|
|
198
168
|
"should allow context properties as fun application": {
|
|
199
169
|
input: "<div>{{ <@action()> }}</div>",
|
|
200
170
|
},
|
|
201
|
-
"should allow view statements after short fun": {
|
|
202
|
-
input: `
|
|
203
|
-
|
|
204
|
-
{% fun template [A] (d: Date[A], o:A, _:String, __:A[]) = {{String(o)}} %}
|
|
205
|
-
|
|
206
|
-
{% view Results [A](Date[A]) %}
|
|
207
|
-
|
|
208
|
-
<ul>
|
|
209
|
-
|
|
210
|
-
{% for option,index in [1,3,4] %}
|
|
211
|
-
|
|
212
|
-
<li>{{option}}and{{index}}</li>
|
|
213
|
-
|
|
214
|
-
{% else %}
|
|
215
|
-
|
|
216
|
-
<p>De nada!</p>
|
|
217
|
-
|
|
218
|
-
{% endfor %}
|
|
219
|
-
|
|
220
|
-
</ul>`,
|
|
221
|
-
},
|
|
222
171
|
"should allow actual code": {
|
|
223
172
|
input: `
|
|
224
173
|
{% import (Table) from "@quenk/wml-widgets/lib/data/table" %}
|
|
@@ -272,9 +221,6 @@ exports.tests = {
|
|
|
272
221
|
|
|
273
222
|
</Panel>`,
|
|
274
223
|
},
|
|
275
|
-
"should recognize type parameters": {
|
|
276
|
-
input: "{% fun test[A:String] (a:A) %} {{a}} {% endfun %}",
|
|
277
|
-
},
|
|
278
224
|
"should allow ifs without elses": {
|
|
279
225
|
input: "{% view Test (Object) %}" +
|
|
280
226
|
"<div> {% if (value == true) %} <span/> {% endif %} </div>",
|
|
@@ -455,8 +401,6 @@ exports.tests = {
|
|
|
455
401
|
"[comment] should parse html comments": `<!-- This is an html comment. -->`,
|
|
456
402
|
"[comment] should parse wml comments": `{# This is a wml comment #}`,
|
|
457
403
|
"[comment] should parse wml comments in statements": `{% view Name {# This is a comment! #} (Object) %} <div/> %}`,
|
|
458
|
-
"[fun] should parse multi dimensional array parameters": `
|
|
459
|
-
{% fun test (value:List[][]) %}<p/>{% endfun %}`,
|
|
460
404
|
"should allow index access on context properties": `{% view Test (Object) %}
|
|
461
405
|
<div>
|
|
462
406
|
{% if @["type"] == 1 %}
|
|
@@ -496,5 +440,34 @@ exports.tests = {
|
|
|
496
440
|
m-20,10 h 10
|
|
497
441
|
m-20,10 h 10" />
|
|
498
442
|
</svg>`,
|
|
443
|
+
"should support part statements": `
|
|
444
|
+
{% part myPart0 (Ctx) %}
|
|
445
|
+
{% let name:String = "Me" %}
|
|
446
|
+
<h1>{{@name}}</h1>
|
|
447
|
+
{% endpart %}
|
|
448
|
+
|
|
449
|
+
{% part myPart1 (Ctx) %}<h1>{{@name}}</h1>{% endpart %}
|
|
450
|
+
|
|
451
|
+
{% part myPart2 (Ctx from "..") %}<h1>{{@name}}</h1>{% endpart %}
|
|
452
|
+
|
|
453
|
+
{% part myPart3 where name: String %}<h1>{{@name}}</h1>{% endpart %}
|
|
454
|
+
|
|
455
|
+
{% part myPart4 where name: String %}
|
|
456
|
+
{% let name:String = "Me" %}
|
|
457
|
+
<h1>{{@name}}</h1>
|
|
458
|
+
{% endpart %}
|
|
459
|
+
`,
|
|
460
|
+
"should support use statments": `
|
|
461
|
+
<div>
|
|
462
|
+
{% use part myPart %}
|
|
463
|
+
{% use view MyView %}
|
|
464
|
+
{% use part path.to.part %}
|
|
465
|
+
{% use view path.to.View %}
|
|
466
|
+
{% use part @path.to.part %}
|
|
467
|
+
{% use view @path.to.View %}
|
|
468
|
+
{% use view SomeView(@) %}
|
|
469
|
+
{% use part path.to.part({}) %}
|
|
470
|
+
</div>
|
|
471
|
+
`,
|
|
499
472
|
};
|
|
500
473
|
//# sourceMappingURL=test.js.map
|
package/lib/parse/test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAA2B;IAC3C,+BAA+B,EAAE;QAC/B,KAAK,EAAE,2CAA2C;KACnD;IACD,2BAA2B,EAAE;QAC3B,KAAK,EAAE,qCAAqC;KAC7C;IACD,uCAAuC,EAAE;QACvC,KAAK,EAAE,qDAAqD;KAC7D;IACD,iCAAiC,EAAE;QACjC,KAAK,EAAE,WAAW;KACnB;IACD,mDAAmD,EAAE;QACnD,KAAK,EAAE,6DAA6D;KACrE;IACD,mDAAmD,EAAE;QACnD,KAAK,EAAE,4BAA4B;KACpC;IACD,mDAAmD,EAAE;QACnD,KAAK,EAAE,8CAA8C;KACtD;IACD,2BAA2B,EAAE;QAC3B,KAAK,EAAE,uCAAuC;KAC/C;IACD,2CAA2C,EAAE;QAC3C,KAAK,EAAE,wDAAwD;KAChE;IACD,8CAA8C,EAAE;QAC9C,KAAK,EAAE,oEAAoE;KAC5E;IACD,iDAAiD,EAAE;QACjD,KAAK,EAAE,wBAAwB;KAChC;IACD,iDAAiD,EAAE;QACjD,KAAK,EACH,uDAAuD;YACvD,gCAAgC;KACnC;IACD,iDAAiD,EAAE;QACjD,KAAK,EACH,8CAA8C;YAC9C,gCAAgC;KACnC;IACD,+BAA+B,EAAE;QAC/B,KAAK,EACH,oCAAoC;YACpC,uCAAuC;YACvC,cAAc;YACd,oDAAoD;YACpD,gBAAgB;YAChB,kCAAkC;YAClC,+DAA+D;YAC/D,eAAe;YACf,aAAa;YACb,eAAe;YACf,UAAU;KACb;IACD,gCAAgC,EAAE;QAChC,KAAK,EACH,QAAQ;YACR,2BAA2B;YAC3B,wBAAwB;YACxB,cAAc;YACd,SAAS;KACZ;IACD,gCAAgC,EAAE;QAChC,KAAK,EACH,QAAQ;YACR,2BAA2B;YAC3B,kCAAkC;YAClC,cAAc;YACd,SAAS;KACZ;IACD,kCAAkC,EAAE;QAClC,KAAK,EAAE;;;;;;eAMI;KACZ;IACD,kCAAkC,EAAE;QAClC,KAAK,EAAE,yDAAyD;KACjE;IAED,mCAAmC,EAAE;QACnC,KAAK,EAAE,oCAAoC;KAC5C;IAED,6CAA6C,EAAE;QAC7C,KAAK,EAAE,kCAAkC;KAC1C;IAED,oBAAoB,EAAE;QACpB,KAAK,EAAE,yDAAyD;KACjE;IACD,+BAA+B,EAAE;QAC/B,KAAK,EAAE,4DAA4D;KACpE;IAED,8BAA8B,EAAE;QAC9B,KAAK,EAAE,+CAA+C;KACvD;IACD,iCAAiC,EAAE;QACjC,KAAK,EACH,kFAAkF;KACrF;IAED,oCAAoC,EAAE;QACpC,KAAK,EAAE;;;;;;;;;eASI;KACZ;IAED,
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAA2B;IAC3C,+BAA+B,EAAE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AC5C,KAAK,EAAE;;;;;;;;;;WAUA;KACR;IAED,kCAAkC,EAAE;QAClC,KAAK,EAAE;;;;;;;;;;;qEAW0D;KAClE;IAED,gEAAgE,EAAE,kDAAkD;IAEpH,8BAA8B,EAAE,qEAAqE;IAErG,yBAAyB,EAAE,6CAA6C;IAExE,6BAA6B,EAAE,8CAA8C;IAE7E,gDAAgD,EAC9C,0CAA0C;IAE5C,qCAAqC,EAAE;;;;;;;;;;;;;eAa1B;IAEb,sBAAsB,EAAE;;;;;;OAMnB;IAEL,+BAA+B,EAAE,+EAA+E;IAEhH,sCAAsC,EAAE,mFAAmF;IAE3H,mCAAmC,EAAE;;KAElC;IAEH,kCAAkC,EAAE;;;;KAIjC;IAEH,sCAAsC,EAAE,mCAAmC;IAE3E,qCAAqC,EAAE,6BAA6B;IAEpE,mDAAmD,EAAE,6DAA6D;IAElH,iDAAiD,EAAE;;;;;aAKxC;IAEX,oCAAoC,EAAE;;;;;WAK7B;IAET,uCAAuC,EAAE,8DAA8D;IAEvG,yDAAyD,EAAE,qDAAqD;IAEhH,gDAAgD,EAAE,wEAAwE;IAE1H,0CAA0C,EAAE;;;;;WAKnC;IAET,oDAAoD,EAAE,iCAAiC;IAEvF,8DAA8D,EAAE;;;;;;;;;;;;;;;;WAgBvD;IACT,gCAAgC,EAAE;;;;;;;;;;;;;;;;KAgB/B;IACH,8BAA8B,EAAE;;;;;;;;;;;GAW/B;CACF,CAAC"}
|
package/lib/parse/test.ts
CHANGED
|
@@ -121,35 +121,6 @@ export const tests: { [key: string]: any } = {
|
|
|
121
121
|
</Tag>`,
|
|
122
122
|
},
|
|
123
123
|
|
|
124
|
-
"should parse short fun statements": {
|
|
125
|
-
input: "{% fun vue () = <View/> %}",
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
"should parse short fun statements with arguments": {
|
|
129
|
-
input:
|
|
130
|
-
"{% fun vue (a:String, b:String, c:String) = " +
|
|
131
|
-
"<View a={{a}} b={{b}} c={{c}}/> %}",
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
"should parse short fun statements with type parameters": {
|
|
135
|
-
input: "{% fun vue [A,B:C,C] (a:A, b:B) = " + "{{ (a + b) + c }} %}",
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
"should parse extended fun statements": {
|
|
139
|
-
input: "{% fun vue () %} <View/> {% endfun %}",
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
"should parse extended fun statements with arguments": {
|
|
143
|
-
input:
|
|
144
|
-
"{% fun vue (a:String, b:String, c:String) %}" +
|
|
145
|
-
"<View a={{a}} b={{b}} c={{c}}/> {% endfun %}",
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
"should parse extended fun statements with type parameters": {
|
|
149
|
-
input:
|
|
150
|
-
"{% fun vue [A,B:C,C] (a:A, b:B) %} {{ ((a + b) + c) }} {% endfun %}",
|
|
151
|
-
},
|
|
152
|
-
|
|
153
124
|
"should parse binary expressions": {
|
|
154
125
|
input: "<p>{{(Styles.A + Styles.B)}}</p>",
|
|
155
126
|
},
|
|
@@ -158,14 +129,6 @@ export const tests: { [key: string]: any } = {
|
|
|
158
129
|
input: '<div class={{((Styles.A + " ") + Style.B)}}/>',
|
|
159
130
|
},
|
|
160
131
|
|
|
161
|
-
"should allow for statement as child of fun": {
|
|
162
|
-
input: "{% fun sven () %} {% for a in b %} {{b}} {% endfor %} {% endfun %}",
|
|
163
|
-
},
|
|
164
|
-
"should allow if statement as child of fun": {
|
|
165
|
-
input:
|
|
166
|
-
"{% fun ate (o:Object) %} {% if a %} {{a}} {% else %} {{a}} " +
|
|
167
|
-
"{% endif %} {% endfun %}",
|
|
168
|
-
},
|
|
169
132
|
"should allow for booleans in interpolations": {
|
|
170
133
|
input: "<bool active={{true}}>{{if fun() then false else true}}</bool>",
|
|
171
134
|
},
|
|
@@ -215,33 +178,9 @@ export const tests: { [key: string]: any } = {
|
|
|
215
178
|
"should allow fun application with context": {
|
|
216
179
|
input: "<div>{{ <panel(@,12)> }}</div>",
|
|
217
180
|
},
|
|
218
|
-
"should parse list types": {
|
|
219
|
-
input: "{% fun action [A] (s: String[], a:A[]) = {{ '${s}${a}' }} %}",
|
|
220
|
-
},
|
|
221
181
|
"should allow context properties as fun application": {
|
|
222
182
|
input: "<div>{{ <@action()> }}</div>",
|
|
223
183
|
},
|
|
224
|
-
"should allow view statements after short fun": {
|
|
225
|
-
input: `
|
|
226
|
-
|
|
227
|
-
{% fun template [A] (d: Date[A], o:A, _:String, __:A[]) = {{String(o)}} %}
|
|
228
|
-
|
|
229
|
-
{% view Results [A](Date[A]) %}
|
|
230
|
-
|
|
231
|
-
<ul>
|
|
232
|
-
|
|
233
|
-
{% for option,index in [1,3,4] %}
|
|
234
|
-
|
|
235
|
-
<li>{{option}}and{{index}}</li>
|
|
236
|
-
|
|
237
|
-
{% else %}
|
|
238
|
-
|
|
239
|
-
<p>De nada!</p>
|
|
240
|
-
|
|
241
|
-
{% endfor %}
|
|
242
|
-
|
|
243
|
-
</ul>`,
|
|
244
|
-
},
|
|
245
184
|
"should allow actual code": {
|
|
246
185
|
input: `
|
|
247
186
|
{% import (Table) from "@quenk/wml-widgets/lib/data/table" %}
|
|
@@ -296,10 +235,6 @@ export const tests: { [key: string]: any } = {
|
|
|
296
235
|
</Panel>`,
|
|
297
236
|
},
|
|
298
237
|
|
|
299
|
-
"should recognize type parameters": {
|
|
300
|
-
input: "{% fun test[A:String] (a:A) %} {{a}} {% endfun %}",
|
|
301
|
-
},
|
|
302
|
-
|
|
303
238
|
"should allow ifs without elses": {
|
|
304
239
|
input:
|
|
305
240
|
"{% view Test (Object) %}" +
|
|
@@ -533,9 +468,6 @@ export const tests: { [key: string]: any } = {
|
|
|
533
468
|
|
|
534
469
|
"[comment] should parse wml comments in statements": `{% view Name {# This is a comment! #} (Object) %} <div/> %}`,
|
|
535
470
|
|
|
536
|
-
"[fun] should parse multi dimensional array parameters": `
|
|
537
|
-
{% fun test (value:List[][]) %}<p/>{% endfun %}`,
|
|
538
|
-
|
|
539
471
|
"should allow index access on context properties": `{% view Test (Object) %}
|
|
540
472
|
<div>
|
|
541
473
|
{% if @["type"] == 1 %}
|
|
@@ -582,4 +514,33 @@ export const tests: { [key: string]: any } = {
|
|
|
582
514
|
m-20,10 h 10
|
|
583
515
|
m-20,10 h 10" />
|
|
584
516
|
</svg>`,
|
|
517
|
+
"should support part statements": `
|
|
518
|
+
{% part myPart0 (Ctx) %}
|
|
519
|
+
{% let name:String = "Me" %}
|
|
520
|
+
<h1>{{@name}}</h1>
|
|
521
|
+
{% endpart %}
|
|
522
|
+
|
|
523
|
+
{% part myPart1 (Ctx) %}<h1>{{@name}}</h1>{% endpart %}
|
|
524
|
+
|
|
525
|
+
{% part myPart2 (Ctx from "..") %}<h1>{{@name}}</h1>{% endpart %}
|
|
526
|
+
|
|
527
|
+
{% part myPart3 where name: String %}<h1>{{@name}}</h1>{% endpart %}
|
|
528
|
+
|
|
529
|
+
{% part myPart4 where name: String %}
|
|
530
|
+
{% let name:String = "Me" %}
|
|
531
|
+
<h1>{{@name}}</h1>
|
|
532
|
+
{% endpart %}
|
|
533
|
+
`,
|
|
534
|
+
"should support use statments": `
|
|
535
|
+
<div>
|
|
536
|
+
{% use part myPart %}
|
|
537
|
+
{% use view MyView %}
|
|
538
|
+
{% use part path.to.part %}
|
|
539
|
+
{% use view path.to.View %}
|
|
540
|
+
{% use part @path.to.part %}
|
|
541
|
+
{% use view @path.to.View %}
|
|
542
|
+
{% use view SomeView(@) %}
|
|
543
|
+
{% use part path.to.part({}) %}
|
|
544
|
+
</div>
|
|
545
|
+
`,
|
|
585
546
|
};
|
package/lib/parse/wml.y
CHANGED
|
@@ -77,8 +77,9 @@ Text ({DoubleStringCharacter}*)|({SingleStringCharacter}*)
|
|
|
77
77
|
<CONTROL>'import' return 'IMPORT';
|
|
78
78
|
<CONTROL>'from' return 'FROM';
|
|
79
79
|
<CONTROL>'as' return 'AS';
|
|
80
|
-
<CONTROL>'
|
|
81
|
-
<CONTROL>'
|
|
80
|
+
<CONTROL>'part' return 'PART';
|
|
81
|
+
<CONTROL>'endpart' return 'ENDPART';
|
|
82
|
+
<CONTROL>'use' return 'USE';
|
|
82
83
|
<CONTROL>'for' return 'FOR';
|
|
83
84
|
<CONTROL>'endfor' return 'ENDFOR';
|
|
84
85
|
<CONTROL>'if' return 'IF';
|
|
@@ -101,6 +102,7 @@ Text ({DoubleStringCharacter}*)|({SingleStringCharacter}*)
|
|
|
101
102
|
<CONTROL>'where' return 'WHERE';
|
|
102
103
|
<CONTROL>'let' return 'LET';
|
|
103
104
|
<CONTROL>'to' return 'TO';
|
|
105
|
+
<CONTROL>'with' return 'WITH';
|
|
104
106
|
<CONTROL>{Constructor} return 'CONSTRUCTOR';
|
|
105
107
|
<CONTROL>{Identifier} return 'IDENTIFIER';
|
|
106
108
|
<CONTROL>'@' return '@';
|
|
@@ -249,7 +251,7 @@ export
|
|
|
249
251
|
|
|
250
252
|
| view_statement
|
|
251
253
|
|
|
252
|
-
|
|
|
254
|
+
| part_statment
|
|
253
255
|
|
|
254
256
|
| element
|
|
255
257
|
{$$ = $1; }
|
|
@@ -398,24 +400,53 @@ view_directives
|
|
|
398
400
|
{ $$ = $1.concat($2); }
|
|
399
401
|
;
|
|
400
402
|
|
|
401
|
-
|
|
403
|
+
part_statment
|
|
404
|
+
: '{%' PART unqualified_identifier '(' view_statement_context ')' '%}'
|
|
405
|
+
view_directives children
|
|
406
|
+
'{%' ENDPART '%}'
|
|
407
|
+
{$$ = new yy.ast.PartStatement($3, $5, $8, $9, @$); }
|
|
402
408
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
'{%'
|
|
406
|
-
{$$ = new yy.ast.
|
|
409
|
+
| '{%' PART unqualified_identifier '(' view_statement_context ')' '%}'
|
|
410
|
+
children
|
|
411
|
+
'{%' ENDPART '%}'
|
|
412
|
+
{$$ = new yy.ast.PartStatement($3, $5, [], $8, @$); }
|
|
407
413
|
|
|
408
|
-
| '{%'
|
|
409
|
-
|
|
410
|
-
'{%'
|
|
411
|
-
{$$ = new yy.ast.
|
|
414
|
+
| '{%' PART unqualified_identifier '%}'
|
|
415
|
+
view_directives children
|
|
416
|
+
'{%' ENDPART '%}'
|
|
417
|
+
{$$ = new yy.ast.PartStatement($3, undefined, $5, $6, @$); }
|
|
418
|
+
|
|
419
|
+
| '{%' PART unqualified_identifier '%}'
|
|
420
|
+
children
|
|
421
|
+
'{%' ENDPART '%}'
|
|
422
|
+
{$$ = new yy.ast.PartStatement($3, undefined, [], $5, @$); }
|
|
412
423
|
|
|
413
|
-
| '{%'
|
|
414
|
-
|
|
415
|
-
{
|
|
424
|
+
| '{%' PART unqualified_identifier WHERE context_members '%}'
|
|
425
|
+
view_directives children
|
|
426
|
+
'{%' ENDPART '%}'
|
|
427
|
+
{$$ = new yy.ast.PartStatement($3, $5, $7, $8, @$); }
|
|
416
428
|
|
|
417
|
-
| '{%'
|
|
418
|
-
|
|
429
|
+
| '{%' PART unqualified_identifier WHERE context_members '%}'
|
|
430
|
+
children
|
|
431
|
+
'{%' ENDPART '%}'
|
|
432
|
+
{$$ = new yy.ast.PartStatement($3, $5, [], $7, @$); }
|
|
433
|
+
;
|
|
434
|
+
|
|
435
|
+
use_statement
|
|
436
|
+
: '{%' USE PART use_target WITH expression '%}'
|
|
437
|
+
{$$ = new yy.ast.UsePartStatement($4, $7, @$); }
|
|
438
|
+
|
|
439
|
+
| '{%' USE PART use_target '%}'
|
|
440
|
+
{$$ = new yy.ast.UsePartStatement($4, undefined, @$); }
|
|
441
|
+
|
|
442
|
+
| '{%' USE VIEW use_target '%}'
|
|
443
|
+
{$$ = new yy.ast.UseViewStatement($4, @$); }
|
|
444
|
+
;
|
|
445
|
+
|
|
446
|
+
use_target
|
|
447
|
+
: (construct_expression | call_expression | member_expression
|
|
448
|
+
| context_property | unqualified_constructor | unqualified_identifier
|
|
449
|
+
| context_variable)
|
|
419
450
|
;
|
|
420
451
|
|
|
421
452
|
type_parameters
|
|
@@ -689,7 +720,7 @@ filter
|
|
|
689
720
|
;
|
|
690
721
|
|
|
691
722
|
control
|
|
692
|
-
: (for_statement|if_statement)
|
|
723
|
+
: (for_statement|if_statement|use_statement)
|
|
693
724
|
{$$ = $1;}
|
|
694
725
|
;
|
|
695
726
|
|
|
@@ -966,7 +997,10 @@ member_expression_head:
|
|
|
966
997
|
;
|
|
967
998
|
|
|
968
999
|
member_expression_tail
|
|
969
|
-
:
|
|
1000
|
+
: unqualified_identifier
|
|
1001
|
+
| unqualified_constructor
|
|
1002
|
+
| string_literal
|
|
1003
|
+
| keyword
|
|
970
1004
|
;
|
|
971
1005
|
|
|
972
1006
|
function_expression
|
|
@@ -1088,3 +1122,9 @@ binary_operator
|
|
|
1088
1122
|
{ $$ = $1; }
|
|
1089
1123
|
;
|
|
1090
1124
|
|
|
1125
|
+
keyword
|
|
1126
|
+
: (IMPORT | FROM | AS | TYPE | CONTEXT | WHERE | LET | VIEW | PART |
|
|
1127
|
+
ENDPART | FOR | IN | OF | TO | ENDFOR | IF | ELSE | ENDIF | USE |
|
|
1128
|
+
TRUE | FALSE | INSTANCEOF | WITH)
|
|
1129
|
+
{$$ = new yy.ast.UnqualifiedIdentifier($1, @$)}
|
|
1130
|
+
;
|
package/lib/view/frame.d.ts
CHANGED
|
@@ -47,6 +47,10 @@ declare class SetList {
|
|
|
47
47
|
* wml ids and groups.
|
|
48
48
|
*/
|
|
49
49
|
export interface Frame {
|
|
50
|
+
/**
|
|
51
|
+
* tree when sets is the rendered DOM content of the view
|
|
52
|
+
*/
|
|
53
|
+
tree?: Content;
|
|
50
54
|
/**
|
|
51
55
|
* root sets the root element of a View's tree.
|
|
52
56
|
*/
|
|
@@ -68,37 +72,14 @@ export interface Frame {
|
|
|
68
72
|
* this one.
|
|
69
73
|
*/
|
|
70
74
|
view(view: View): Content;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
root(el: Content): void;
|
|
80
|
-
node(tag: string, attrs: Attrs, children: Content[]): Content;
|
|
81
|
-
widget(w: Widget, attrs: Attrs): Content;
|
|
82
|
-
view(view: View): Content;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* ViewFrame contains helper methods for retreiving elements by id or
|
|
86
|
-
* group freeing the View class of such logic.
|
|
87
|
-
*/
|
|
88
|
-
export declare class ViewFrame implements Frame {
|
|
89
|
-
nodes: SetList;
|
|
90
|
-
widgets: Map<number, Widget>;
|
|
91
|
-
groups: Map<WMLId, Index[]>;
|
|
92
|
-
ids: Map<string, number>;
|
|
93
|
-
indexes: Map<number, string>;
|
|
94
|
-
tree?: Content | undefined;
|
|
95
|
-
constructor(nodes?: SetList, widgets?: Map<number, Widget>, groups?: Map<WMLId, Index[]>, ids?: Map<string, number>, indexes?: Map<number, string>, tree?: Content | undefined);
|
|
96
|
-
_register(id: WMLId, node: Content, widget?: Widget): void;
|
|
97
|
-
_registerGroupMember(id: WMLId, node: Content, widget?: Widget): void;
|
|
98
|
-
root(el: Content): void;
|
|
99
|
-
node(tag: string, attrs: Attrs, children: Content[]): Content;
|
|
100
|
-
widget(w: Widget, attrs: Attrs): Content;
|
|
101
|
-
view(view: View): Content;
|
|
75
|
+
/**
|
|
76
|
+
* register content and widget under the specified id.
|
|
77
|
+
*/
|
|
78
|
+
register(id: WMLId, node: Content, widget?: Widget): void;
|
|
79
|
+
/**
|
|
80
|
+
* registerGroupMember registers a content and widget as a member of a group.
|
|
81
|
+
*/
|
|
82
|
+
registerGroupMember(id: WMLId, node: Content, widget?: Widget): void;
|
|
102
83
|
/**
|
|
103
84
|
* findById returns the entry stored for the specified wml element.
|
|
104
85
|
*/
|
|
@@ -123,5 +104,36 @@ export declare class ViewFrame implements Frame {
|
|
|
123
104
|
* replaceByGroup allows WMLElement replaced by using a group identifier.
|
|
124
105
|
*/
|
|
125
106
|
replaceByGroup(next: ViewFrame, id: WMLId): void;
|
|
107
|
+
/**
|
|
108
|
+
* destroy the frame.
|
|
109
|
+
*
|
|
110
|
+
* Currently a no-op but may be used in the future.
|
|
111
|
+
*/
|
|
112
|
+
destroy(): void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* ViewFrame contains helper methods for retreiving elements by id or
|
|
116
|
+
* group freeing the View class of such logic.
|
|
117
|
+
*/
|
|
118
|
+
export declare class ViewFrame implements Frame {
|
|
119
|
+
nodes: SetList;
|
|
120
|
+
widgets: Map<number, Widget>;
|
|
121
|
+
groups: Map<WMLId, Index[]>;
|
|
122
|
+
ids: Map<string, number>;
|
|
123
|
+
indexes: Map<number, string>;
|
|
124
|
+
tree?: Content | undefined;
|
|
125
|
+
constructor(nodes?: SetList, widgets?: Map<number, Widget>, groups?: Map<WMLId, Index[]>, ids?: Map<string, number>, indexes?: Map<number, string>, tree?: Content | undefined);
|
|
126
|
+
register(id: WMLId, node: Content, widget?: Widget): void;
|
|
127
|
+
registerGroupMember(id: WMLId, node: Content, widget?: Widget): void;
|
|
128
|
+
root(el: Content): void;
|
|
129
|
+
node(tag: string, attrs: Attrs, children: Content[]): Content;
|
|
130
|
+
widget(w: Widget, attrs: Attrs): Content;
|
|
131
|
+
view(view: View): Content;
|
|
132
|
+
findById(id: WMLId): Maybe<Entry>;
|
|
133
|
+
findByGroup(id: WMLId): Entry[];
|
|
134
|
+
replaceByIndex(next: ViewFrame, idx: Index): void;
|
|
135
|
+
replaceById(next: ViewFrame, id: WMLId): void;
|
|
136
|
+
replaceByGroup(next: ViewFrame, id: WMLId): void;
|
|
137
|
+
destroy(): void;
|
|
126
138
|
}
|
|
127
139
|
export {};
|
package/lib/view/frame.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ViewFrame =
|
|
3
|
+
exports.ViewFrame = void 0;
|
|
4
4
|
const dom = require("../dom");
|
|
5
5
|
const maybe_1 = require("@quenk/noni/lib/data/maybe");
|
|
6
6
|
const monitor_1 = require("../dom/monitor");
|
|
@@ -47,33 +47,6 @@ class SetList {
|
|
|
47
47
|
this.cache.delete(node);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
51
|
-
* MultiFrame is a composite that allows more than one Frame to be rendered
|
|
52
|
-
* at the same time.
|
|
53
|
-
*/
|
|
54
|
-
class MultiFrame {
|
|
55
|
-
constructor(frames = []) {
|
|
56
|
-
this.frames = frames;
|
|
57
|
-
}
|
|
58
|
-
root(el) {
|
|
59
|
-
for (let f of this.frames) {
|
|
60
|
-
f.root(el);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
node(tag, attrs, children) {
|
|
64
|
-
let results = this.frames.map((f) => f.node(tag, attrs, children));
|
|
65
|
-
return results[0] ?? dom.createElement('div', {}, []);
|
|
66
|
-
}
|
|
67
|
-
widget(w, attrs) {
|
|
68
|
-
let results = this.frames.map((f) => f.widget(w, attrs));
|
|
69
|
-
return results[0] ?? dom.createElement('div', {}, []);
|
|
70
|
-
}
|
|
71
|
-
view(view) {
|
|
72
|
-
let results = this.frames.map((f) => f.view(view));
|
|
73
|
-
return results[0] ?? dom.createElement('div', {}, []);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.MultiFrame = MultiFrame;
|
|
77
50
|
/**
|
|
78
51
|
* ViewFrame contains helper methods for retreiving elements by id or
|
|
79
52
|
* group freeing the View class of such logic.
|
|
@@ -87,7 +60,7 @@ class ViewFrame {
|
|
|
87
60
|
this.indexes = indexes;
|
|
88
61
|
this.tree = tree;
|
|
89
62
|
}
|
|
90
|
-
|
|
63
|
+
register(id, node, widget) {
|
|
91
64
|
let idx = this.nodes.add(node);
|
|
92
65
|
this.ids.set(id, idx);
|
|
93
66
|
this.indexes.set(idx, id);
|
|
@@ -95,7 +68,7 @@ class ViewFrame {
|
|
|
95
68
|
this.widgets.set(idx, widget);
|
|
96
69
|
}
|
|
97
70
|
}
|
|
98
|
-
|
|
71
|
+
registerGroupMember(id, node, widget) {
|
|
99
72
|
let group = this.groups.get(id) ?? [];
|
|
100
73
|
let idx = this.nodes.add(node);
|
|
101
74
|
group.push(idx);
|
|
@@ -109,18 +82,18 @@ class ViewFrame {
|
|
|
109
82
|
node(tag, attrs, children) {
|
|
110
83
|
let elm = dom.createElement(tag, attrs, children, (attrs.wml && attrs.wml.ns) || "");
|
|
111
84
|
if (attrs?.wml?.id)
|
|
112
|
-
this.
|
|
85
|
+
this.register(attrs.wml.id, elm);
|
|
113
86
|
if (attrs?.wml?.group)
|
|
114
|
-
this.
|
|
87
|
+
this.registerGroupMember(attrs.wml.group, elm);
|
|
115
88
|
return elm;
|
|
116
89
|
}
|
|
117
90
|
widget(w, attrs) {
|
|
118
91
|
let tree = w.render();
|
|
119
92
|
monitor_1.DOMMonitor.getInstance().monitor(tree, w);
|
|
120
93
|
if (attrs?.wml?.id)
|
|
121
|
-
this.
|
|
94
|
+
this.register(attrs.wml.id, tree, w);
|
|
122
95
|
if (attrs?.wml?.group)
|
|
123
|
-
this.
|
|
96
|
+
this.registerGroupMember(attrs.wml.group, tree, w);
|
|
124
97
|
return tree;
|
|
125
98
|
}
|
|
126
99
|
view(view) {
|
|
@@ -129,9 +102,6 @@ class ViewFrame {
|
|
|
129
102
|
this.root = root;
|
|
130
103
|
return tree;
|
|
131
104
|
}
|
|
132
|
-
/**
|
|
133
|
-
* findById returns the entry stored for the specified wml element.
|
|
134
|
-
*/
|
|
135
105
|
findById(id) {
|
|
136
106
|
let idx = this.ids.get(id) ?? -1;
|
|
137
107
|
let node = this.nodes.get(idx);
|
|
@@ -142,9 +112,6 @@ class ViewFrame {
|
|
|
142
112
|
widget: this.widgets.get(idx),
|
|
143
113
|
});
|
|
144
114
|
}
|
|
145
|
-
/**
|
|
146
|
-
* findByGroup returns all the entries stored fro a group.
|
|
147
|
-
*/
|
|
148
115
|
findByGroup(id) {
|
|
149
116
|
let result = [];
|
|
150
117
|
for (let idx of this.groups.get(id) ?? []) {
|
|
@@ -156,18 +123,10 @@ class ViewFrame {
|
|
|
156
123
|
}
|
|
157
124
|
return result;
|
|
158
125
|
}
|
|
159
|
-
/**
|
|
160
|
-
* replaceByIndex performs the heavy work of replacing a WMLElement
|
|
161
|
-
* with the corresponding index from another ViewFrame.
|
|
162
|
-
*
|
|
163
|
-
* The replaced element will have its DOM content redrawn if a parentNode
|
|
164
|
-
* is detected.
|
|
165
|
-
*/
|
|
166
126
|
replaceByIndex(next, idx) {
|
|
167
127
|
let originalNode = this.nodes.get(idx);
|
|
168
|
-
let id = this.indexes.get(idx) ?? "";
|
|
169
128
|
if (idx == null || originalNode == null) {
|
|
170
|
-
console.warn(`Not replacing missing
|
|
129
|
+
console.warn(`Not replacing missing element by index ${idx}!`);
|
|
171
130
|
return;
|
|
172
131
|
}
|
|
173
132
|
let { parentNode } = originalNode;
|
|
@@ -177,6 +136,7 @@ class ViewFrame {
|
|
|
177
136
|
// Remove references since the node no longer exists.
|
|
178
137
|
this.nodes.delete(idx);
|
|
179
138
|
this.widgets.delete(idx);
|
|
139
|
+
let id = this.indexes.get(idx) ?? "";
|
|
180
140
|
this.ids.delete(id);
|
|
181
141
|
this.indexes.delete(idx);
|
|
182
142
|
if (parentNode)
|
|
@@ -190,15 +150,9 @@ class ViewFrame {
|
|
|
190
150
|
if (parentNode)
|
|
191
151
|
parentNode.replaceChild(node, originalNode);
|
|
192
152
|
}
|
|
193
|
-
/**
|
|
194
|
-
* replaceById allows WMLElement replacement by using an id.
|
|
195
|
-
*/
|
|
196
153
|
replaceById(next, id) {
|
|
197
154
|
this.replaceByIndex(next, this.ids.get(id) ?? -1);
|
|
198
155
|
}
|
|
199
|
-
/**
|
|
200
|
-
* replaceByGroup allows WMLElement replaced by using a group identifier.
|
|
201
|
-
*/
|
|
202
156
|
replaceByGroup(next, id) {
|
|
203
157
|
let group = this.groups.get(id) ?? [];
|
|
204
158
|
let newGroup = [];
|
|
@@ -209,6 +163,7 @@ class ViewFrame {
|
|
|
209
163
|
}
|
|
210
164
|
this.groups.set(id, newGroup);
|
|
211
165
|
}
|
|
166
|
+
destroy() { }
|
|
212
167
|
}
|
|
213
168
|
exports.ViewFrame = ViewFrame;
|
|
214
169
|
//# sourceMappingURL=frame.js.map
|